# Hamiltonians, groups, graphs and ansätze

Abhinav Anand<EMAIL_ADDRESS>Duke Quantum Center, Duke University,
Durham, NC 27701, USA.  Department of Electrical and Computer Engineering,
Duke University, Durham, NC 27708, USA.  Kenneth R. Brown<EMAIL_ADDRESS>Duke Quantum Center, Duke University, Durham, NC 27701, USA.  Department of
Electrical and Computer Engineering, Duke University, Durham, NC 27708, USA.
Department of Physics, Duke University, Durham, NC 27708, USA.  Department of
Chemistry, Duke University, Durham, NC 27708, USA.

(August 28, 2024)

###### Abstract

One promising application of near-term quantum devices is to prepare trial
wavefunctions using short circuits for solving different problems via
variational algorithms. For this purpose, we introduce a new circuit design
that combines graph-based diagonalization circuits with arbitrary single-qubit
rotation gates to get Hamiltonian-based graph states ansätze (H-GSA). We test
the accuracy of the proposed ansatz in estimating ground state energies of
various molecules of size up to 12-qubits. Additionally, we compare the gate
count and parameter number complexity of the proposed ansatz against
previously proposed schemes and find an order magnitude reduction in gate
count complexity with slight increase in the number of parameters. Our work
represents a significant step towards constructing compact quantum circuits
with good trainability and convergence properties and applications in solving
chemistry and physics problems.

##  I Introduction

As we continue to make progress towards building large quantum computers, we
simultaneously need to keep looking for classically intractable problems that
can be solved using these devices. A class of problems [1, 2, 3, 4] that is
amenable to currently available noisy device is using them to prepare trial
wavefunctions for solving different chemistry and physics problems
variationally. While various proposals [5, 6, 7, 8, 9, 10, 11, 12] for
preparing such states have been put forward in the last few years, there
remain many outstanding challenges [13, 14, 15, 16, 17, 18, 19] that need to
be addressed.

A common challenge is constructing shallow quantum circuits with good
trainability and convergence properties [13, 14, 15]. Recent advances in
understanding of design [20, 21, 22, 23, 24] and trainability [13, 14, 15] of
different circuits have led to some proposals for constructing such circuits.
One direction is finding better optimization strategies [25, 26, 27, 28] which
can overcome some of the shortcoming of the circuit design. Another direction
is to find new design principles to overcome this challenge. These include
using adaptive techniques [9, 10, 11, 12, 29], symmetry-breaking ansätze [30,
31], and using Clifford or near-Clifford unitaries [32, 33, 34], among others
[35].

In this paper, we focus on the latter and introduce a new class of quantum
circuits that we term “Hamiltonian-based graph states ansatz" (H-GSA). The
proposed ansatz uses graph-based diagonalization circuits to incorporate
problem related information and symmetry breaking arbitrary single qubit
rotation layer for faster convergence. This leads to an order of magnitude
reduction in the gate count of the proposed ansatz while maintaining the good
convergence properties of the Hamiltonian variational ansatz. We present
detailed numerical analysis of our ansatz for estimating ground state energies
of different molecules of size up to 12 qubits and find that with a single
layer of the ansatz we can get within desired accuracy for many configurations
of the molecules considered in this study. This suggests that our work can be
useful in many applications where one requires shallow quantum circuits with
good trainability properties, especially when the current devices have limited
coherence times.

The remaining sections of this paper are organized as follows: We present some
preliminary information and the proposed method in sec. II. The results from
different numerical simulations are presented in sec. III, and finally, we
provide some concluding remarks in sec. IV.

##  II Methodology

In this section, we review some background information and present the details
of how to construct a Hamiltonian-based graph states ansatz (H-GSA).

###  II.1 Hamiltonians

In the second-quantized formalism, the electronic Hamiltonian is expressed as

$\hat{H}=\sum_{pq}h_{pq}\hat{a}^{\dagger}_{p}\hat{a}_{p}+\sum_{pq}h_{pqrs}\hat{a}^{\dagger}_{p}\hat{a}^{\dagger}_{q}\hat{a}_{r}\hat{a}_{s},$
(1)

where, $p,q,r,s$ are spin-orbital indices, $\hat{a}^{\dagger}$ and $\hat{a}$
are creation and annihilation operators, respectively, and the coefficients
$h_{pq}$ and $h_{pqrs}$ are one- and two-electron integrals. The second-
quantized Hamiltonian can be transformed to qubit operators using various
mappings, such as Bravyi-Kitaev [36] or Jordan-Wigner [37]. The resulting
Hamiltonian is of the form

$\hat{H}=\sum_{k=1}^{M}c_{k}\hat{P}_{k},$ (2)

where $c_{k}$ is a complex number and $\hat{P}_{k}$ is a Pauli-string
($\\{\hat{I},\hat{\sigma}_{x},\hat{\sigma}_{y},\hat{\sigma}_{z}\\}^{\bigotimes
n}$) on $n$-qubits.

###  II.2 Groups

Given the Hamiltonian of the form in Eq. 2, we now explain how to construct
different groups using the Pauli-strings in the Hamiltonian.

####  II.2.1 Commuting groups

We first review the commutativity property of the terms present in the
Hamiltonian. Given, two Pauli-strings on $n$-qubits,
$\hat{P}_{a}=\bigotimes^{n}\hat{\sigma}^{b}$ and
$\hat{P}_{b}=\bigotimes^{n}_{i}\hat{\sigma}^{b}$, where
$\hat{\sigma}\in\\{\hat{I},\hat{\sigma}_{x},\hat{\sigma}_{y},\hat{\sigma}_{z}\\}$,
we say $\hat{P}_{a}$ and $\hat{P}_{a}$ commute if,

$[\hat{P}_{a},\hat{P}_{b}]=\hat{P}_{a}\hat{P}_{b}-\hat{P}_{b}\hat{P}_{a}=0.$
(3)

This can be further divided into two types, qubit-wise commuting (QWC) and
general commuting (GC), as follows:

$\displaystyle[\hat{P}_{a},\hat{P}_{b}]$
$\displaystyle=\prod^{n}_{i}\hat{\sigma}_{i}^{a}\hat{\sigma}_{i}^{b}-\prod^{n}_{i}\hat{\sigma}_{i}^{b}\hat{\sigma}_{i}^{a}$
$\displaystyle=0\begin{cases}\text{QWC -}&\text{if
$[\hat{\sigma}_{i}^{a},\hat{\sigma}_{i}^{b}]=0,\forall i\in\\{n\\}$, }\\\
\text{GC -}&\text{if $[\hat{\sigma}_{i}^{a},\hat{\sigma}_{i}^{b}]\neq 0$, for
even}\\\ &\text{number of indices $\\{i\\}$.}\\\ \end{cases}$ (4)

It is also well known that given two commuting terms, $\hat{P}_{a}$ and
$\hat{P}_{b}$, there exist a Clifford circuit, $\mathcal{U}$, that
simultaneously diagonalizes them. The choice of the commutativity type - GC vs
QWC - influence the complexity of the Clifford circuit and the number of
mutually commuting groups.

In the last few years, several proposals [38, 39, 40, 41, 42, 43, 44] have
been put forward to find mutually commuting groups within the Hamiltonian. In
this article, we cluster the Hamiltonian in $m-$groups of general commuting
(GC) terms by first putting all terms in the Hamiltonian of the form,
$\hat{P}_{i}=\\{\hat{I},\hat{\sigma}_{z}\\}^{\bigotimes n}$ in a single group
and then following the techniques presented in Ref. [41] for the rest of the
terms. Thus, given a Hamiltonian $\hat{H}$ of the form in Eq. 2, we can
construct $m-$groups, $\mathcal{G}_{i}\equiv\\{\hat{P}_{i}\\}$, such that

$[\hat{P}_{k},\hat{P}_{l}]=0,\forall\hat{P}_{k},\hat{P}_{l}\in\mathcal{G}_{i}.$
(5)

It is known that the maximum number of elements in any of these groups is
$2^{n}$, as we ignore the sign of the terms when forming these groups. It is
also known that the maximum number of independent generators of such groups is
$n$. Given such a group $\mathcal{G}_{i}$, we describe in detail the
construction of a corresponding stabilizer group, $\mathcal{S}_{i}$ in the
next section.

####  II.2.2 Stabilizer groups

We first review the properties of a stabilizer group. A group, $\mathcal{S}$,
is a stabilizer group if it is an abelian subgroup of the n-qubit Pauli group,
$\mathcal{P}^{n}$, and $-\hat{I}\notin\mathcal{S}$. The simultaneous +1
eigenstate of the operators in the group, $\mathcal{S}$, defines the state
stabilized by the group. We use the fact that a product state (the Hartree-
Fock state in particular) is an eigenstate of diagonal Pauli-strings to
construct stabilizer groups from a set of mutually commuting operators, by
following the steps mentioned below.

First, we modify the operators as follows:

  1. 1.

Given an abelian group, $\mathcal{G}_{i}$, find a Clifford unitary,
$\mathcal{U}_{i}$, which diagonalizes the whole group.

  2. 2.

For every operator, $\hat{P}$, in the group, $\mathcal{G}_{i}$, replace it by
$-\hat{P}$ if,

$\mathcal{U}_{i}\hat{P}\mathcal{U}_{i}^{\dagger}\ket{HF}=-\ket{HF},$ (6)

where, $\ket{HF}$ is the Hartree-Fock state on $n$-qubits.

After this step, we have another abelian group,
$\mathcal{G}_{i}^{{}^{\prime}}$, which stabilizes the state
$\ket{\Psi_{s}}=\mathcal{U}^{\dagger}_{i}\ket{HF}$.

Next, we convert the operators to their tableau representations, where every
operator, $\hat{P}$, is represented as a $2n+1$ dimensional binary vector,
$\hat{P}=[X|Z|s]$. Here, $s\in\\{0,1\\}$ represents the sign $(-1)^{s}$ of
$\hat{P}$ and $X$ and $Z$ are $n$-dimensional binary vectors, such that
$(X_{j},Z_{j},P)$ represent the $j$-th component of the operator, $\hat{P}$.
For instance,
$\hat{\sigma}_{x}\hat{I}\hat{\sigma}_{z}\hat{\sigma}_{y}\equiv[1001|0011|0]$.

Once we have the tableau representation of the abelian group,
$\mathcal{G}_{i}^{{}^{\prime}}$, one can use the Gram-Schmidt procedure [45]
to find the independent generators of the group,
$\mathcal{G}_{i}^{{}^{\prime}}$. We use the implementation in Stim [46] for
this step, which given the abelian group, $\mathcal{G}_{i}^{{}^{\prime}}$,
ignores the redundant generators and can output a stabilizer group,
$\mathcal{S}_{i}$, by concatenating the independent generators with arbitrary
independent generators.

###  II.3 Graphs

In this section, we provide details of how to construct the corresponding
graph state given the tableau representation of a stabilizer group.

A graph on $m$-vertices is defined by an adjacency $m\crossproduct m$ binary
matrix, $A$, where $A_{i,j}\neq 0$ if there exists an edge between the $i$-th
and $j$-th vertices. Given a graph, one can then define a graph state as,

$\ket{\Psi_{G}}=\prod_{i<j}\text{CZ}_{i,j}^{A_{i,j}}\text{H}^{\bigotimes
m}\ket{0}^{\bigotimes m},$ (7)

where CZ is the controlled-$\hat{\sigma}_{z}$ gate and H is the Hadamard gate.

It is well known that a stabilizer state, $\ket{\Psi_{s}}$, is local-Clifford
equivalent to a graph state [47, 48], $\ket{\Psi_{g}}$, that is there exists
single-qubit unitaries, $\\{\mathcal{V}_{i}\\}$, such that

$\ket{\Psi}_{g}=\prod_{i}\mathcal{V}_{i}\ket{\Psi}_{s}.$ (8)

We follow the Algorithm 1 in Ref. [49] to find these local Clifford unitaries,
$\\{\mathcal{V}_{i}\\}$, and the graph state $\ket{\Psi}_{g}$ using the
tableau representation of a stabilizer group, $\mathcal{S}_{i}$. One can then
construct Clifford circuits, $\mathcal{U}_{z}$,

$\mathcal{U}_{z}=\prod_{i}\mathcal{V}_{i}\prod_{i<j}\text{CZ}_{i,j}^{A_{i,j}}\text{H}^{\bigotimes
n}$ (9)

by using the graph state, $\ket{\Psi}_{g}$, and the local unitaries,
$\\{\mathcal{V}_{i}\\}$, that simultaneously diagonalize all the operators,
$\hat{P}$, in the corresponding group $\mathcal{G}_{i}$ as

$\hat{P}^{{}^{\prime}}=\mathcal{U}_{z}^{\dagger}\hat{P}\mathcal{U}_{z},$ (10)

where $\hat{P}^{{}^{\prime}}\in\\{\hat{I},\hat{\sigma}_{z}\\}^{\bigotimes n}$
is a diagonal Pauli-string. A similar procedure for constructing such circuits
was proposed in Ref. [50].

Figure 1:  A schematic of a single layer of the Hamiltonian-based graph states
ansatz (H-GSA). The red and green box represent Clifford circuits,
$\mathcal{U}_{z_{i}}^{\dagger}$ and $\mathcal{U}_{z_{i}}$, respectively. An
illustration of the Clifford circuit, $\mathcal{U}_{z_{i}}^{\dagger}$, is
shown in Fig. 2. The blue boxes represents general single qubit rotation gate
of the kind
$R_{z}(\alpha)R_{y}(\beta)R_{z}(\gamma_{j})R_{y}(-\beta)R_{z}(-\alpha)$.

###  II.4 Ansätze

In this section, we present the details of how to use the circuits
$\mathcal{U}_{z}$ to construct an ansatz for approximating low-lying
eigenvalues.

An ansatz is a trial wavefunction, $\ket{\Psi(\theta)}$ defined as the state
after application of a parameterized quantum circuit, $U(\theta)$, as

$\ket{\Psi(\theta}=U(\theta)\ket{\Psi_{0}},$ (11)

where $\ket{\Psi_{0}}$ is some reference function. They are used in
variational algorithms to find the optimal value of an objective function. In
this article, we are interested in finding low-lying eigenvalues of a
molecular Hamiltonian, $\hat{H}$, so our objective function is

$O(\theta)=\bra{\Psi_{0}}U^{\dagger}(\theta)\hat{H}U(\theta)\ket{\Psi_{0}}=\bra{\Psi(\theta)}\hat{H}\ket{\Psi(\theta)},$
(12)

where $\theta$ are parameters that are optimized.

We can construct an ansatz using the molecular Hamiltonian, $\hat{H}$, as
follows:

  1. 1.

Given H, cluster the terms into commuting groups, $\\{\mathcal{G}_{i}\\}$, by
following the procedure in sec. II.2.1.

  2. 2.

Order the groups as per the 1-norm of the terms in the group.

  3. 3.

Use the commuting groups, $\\{\mathcal{G}_{i}\\}$, to construct stabilizer
groups, $\\{\mathcal{S}_{i}\\}$, by following the procedure in sec. II.2.2.

  4. 4.

Construct diagonalization circuits, $\mathcal{U}_{z_{i}}$, for all the
stabilizer group, $\\{\mathcal{S}_{i}\\}$, by following the procedure in sec.
II.3.

  5. 5.

Combine the circuits together as per the order in step 2 to form a
Hamiltonian-based graph states ansatz (H-GSA) of the form,

$\ket{\Psi(\theta)}=\prod_{i}\mathcal{U}_{z_{i}}R(\theta_{i})\mathcal{U}^{\dagger}_{z_{i}}\ket{\Psi_{0}},$
(13)

where $R(\theta_{i})=\bigotimes_{j}^{n}R_{\mathbf{v_{j}}}(\gamma_{j})$ is a
layer of arbitrary single-qubit rotation gates and
$\\{\mathbf{v_{j}},\gamma_{j}\\}\in\\{\theta_{i}\\}$ are free parameters to be
optimized. A schematic of the ansatz is shown in Fig. 1.

Figure 2:  A schematic of the Clifford circuits used in the Hamiltonian-based
graph states ansatz (H-GSA). The pink box represent the circuit represent the
layer of CZ-gates ($\prod_{i<j}\text{CZ}_{i,j}^{A_{i,j}}$) as per the
adjacency matrix, $A$, of the graph state. The blue boxes represent Hadamard
gates and the green boxes represent local Clifford gates, $\mathcal{V}_{i}$.

A single rotation gate, $R_{\mathbf{v_{j}}}(\gamma_{j})$, in the layer,
$R(\theta_{i})$, is a rotation by an angle, $\gamma_{j}$, about an arbitrary
Bloch vector, $\mathbf{v_{j}}=\\{v_{x},v_{y},v_{z}\\}$. It is defined as

$R_{\mathbf{v_{j}}}(\gamma_{j})=R_{z}(\alpha)R_{y}(\beta)R_{z}(\gamma_{j})R_{y}(-\beta)R_{z}(-\alpha),$
(14)

where $\alpha=\arctan(v_{y}/v_{x})$ and $\beta=\arccos(v_{z})$.

We use the H-GSA defined above to minimize the objective function in Eq. 12
and find optimal parameters $\theta^{*}$, that approximates the ground state
energy $E_{g}$

$\bra{\Psi(\theta^{*})}\hat{H}\ket{\Psi(\theta^{*})}\approx E_{g}.$ (15)

##  III Numerical Experiments

In this section, we present results from different numerical simulations to
showcase the applicability of the proposed ansatz. We implement the proposed
ansatz using Tequila [51] and use Qulacs [52] as the backend for the execution
of all the numerical simulations. In all the simulations, we use the BFGS
implementation of SciPy [53] for gradient based optimization of the objective
function, $O(\theta)$. The maximum number of iterations for all the numerical
simulations is fixed to 200, unless stated otherwise.

###  III.1 Trainability of H-GSA

We first discuss the trainability aspect of the proposed ansatz. It was shown
in Ref. [26], that the barren plateau phenomena can be resolved in quantum
algorithms which uses deep parameterized quantum circuits, by choosing an
initialization strategy where the circuit is a product of shallow identity
blocks. The proposed ansatz by construction has such a decomposition,

$U(\theta)=\prod_{i}U_{i}(\theta_{i})=\prod_{i}\mathcal{U}_{z_{i}}R(\theta_{i})\mathcal{U}^{\dagger}_{z_{i}},$
(16)

where every block $U_{i}(\theta_{i})$ is a conjugation of the non-Clifford
circuit rotation layer, $R(\theta_{i})$ by a Clifford unitary
$\mathcal{U}_{z_{i}}$. If we fix $\gamma_{j}$ in Eq. 14 to be a very small
value ($\sim$ 10-6) then $U_{i}(\theta_{i})\approx\hat{I}$, for arbitrary
values of $\alpha$ and $\beta$. Thus, the proposed ansatz has the structure
amenable for optimization with gradient-based methods as shown in Ref. [26].

###  III.2 Simulations for eigenvalue estimation

We use the Bravyi-Kitaev transformation [36] to convert the fermionic
Hamiltonian (Eq. 1) of different molecules to the qubit Hamiltonian as in Eq.
2. We use the Hartree-Fock (HF) state as the initial state in all the
numerical simulation carried out in this paper, however, one can use a better
initial state as proposed in Ref. [31]. In all the simulation, we compare the
result from our simulations to the exact energies calculated using the full
configuration interaction (FCI) method.

We consider molecules of varying sizes for our numerical simulations: smaller
molecules (4-6 qubits) - H2 and LiH, medium-sized molecules (8-10 qubits) - H4
and H2O, and a larger molecule (12 qubits) - N2. The results from these
simulations are detailed in the following subsections. All energy values are
in Hartree units unless specified otherwise.

####  III.2.1 H2 and LiH molecules

We use the full minimal basis set (STO-3G) for the hydrogen molecule and use
only an active space of the lithium hydride molecule. The hydrogen molecule in
this representation has 2-electrons in 4 spin orbitals and the lithium hydride
molecule has 2-electrons in 6 spin orbitals. We then construct the objective
function for these molecules by using the H-GSA as described in sec. II.4.

We randomly sample five different parameter values while maintaining the
identity block initialization scheme discussed in sec. III.1 and run different
numerical simulations to estimate ground statue energies of these molecules.
The results from these numerical simulations are presented in Fig. 3.

a) H2 molecule | b) LiH molecule
---|---
Energy
|
Error in energy
|
Figure 3:  VQE results from optimization of ground state energies for H2 and
LiH molecule using different geometries with a single layer of the H-GSA
ansatz. Top panel: The average value of the energies from the different
simulation runs are plotted. Bottom panel: The average error value in plotted
using the solid blue line and the shaded region represent the area between the
smallest and the largest error value. The red line denotes an error value of
1e-3.

It can be seen from the plots in Fig. 3 that using a single layer of the H-GSA
ansatz, for all the numerical simulations with different random parameter
initializations, we are able to get well within the desired accuracy value
(1e-3) of the exact ground state (FCI) energies of the both the molecules.
This suggest that the proposed ansatz is expressive enough to estimate the
ground state energies of small molecules, while being trainable.

An example demonstration of the proposed ansatz for calculating eigenvalue of
H2 molecule is shown here [54].

####  III.2.2 H4 and H2O molecules

We use the full minimal basis set (STO-3G) for the linear hydrogen chain H4
and an active space of the minimal basis set for the water molecule. The
hydrogen chain has 4-electrons in 8 spin orbitals and the water molecule has
6-electrons in 10 spin orbitals. We use the proposed H-GSA for estimating the
ground state energies of these molecules and run similar numerical simulations
as in sec. III.2.1. The results from the numerical simulations are plotted in
Fig. 4.

a) H4 molecule | b) H2O molecule
---|---
Energy
|
Error in energy
|
Figure 4:  VQE results from optimization of ground state energies for H4 and H2O molecule using different geometries with a single layer of the H-GSA ansatz. Top panel: The average value of the energies from the different simulation runs are plotted. Bottom panel: The average error value in plotted using the solid blue line and the shaded region represent the area between the smallest and the largest error value. The red line denotes an error value of 1e-3. a) 0.5 Å | b) 1.09 Å | c) 2.0 Å | d) 3.0Å
---|---|---|---
Energy
|  |  |
Error in energy
|  |  |
Figure 5:  Optimization trajectories from the numerical simulation for
calculating ground state energies for N2 molecule using different geometries
with a single layer of the H-GSA ansatz. Top panel: The red and green line
correspond to the Hartree-Fock energy and the exact ground state (FCI) energy.
The blue line correspond to the optimization trajectory using a single layer
of H-GSA ansatz. Bottom panel: The red line correspond to the error
corresponding to the HF state. The green line correspond to an error value of
1e-3. The blue line correspond to error in energy during the optimization
runs.

It can be seen from the plots in Fig. 4 that the energies from the numerical
simulations for most molecular configurations are within the desired accuracy
value (1e-3) of the exact FCI energy. For the case of H4 molecule, there are a
few points on the full PES where the smallest error in energy is higher than
1e-3. We attribute this to the fact that the simulations were only carried out
for 200 iterations and some of the runs failed to converge in this time. We
believe these results can be easily improved by wither running the simulation
for larger number of iterations or by using techniques such as the one
presented in Ref. [55].

For the case of water moleulce, it can be seen from the plots in Fig. 4 that
the error in energies for molecules with configuration near equilibrium
geometry are within the desired accuracy value of 1e-3. The errors keep
getting larger than the desired accuracy value of 1e-3 for stretched
configurations before getting close to the desired accuracy for bond length
close to dissociation. This is an expected behavior where a layer of the
proposed ansatz is not expressive enough for highly correlated regimes of
water molecule. We believe that repeating the ansatz multiple times can lead
to better convergence even for these regimes, as observed in simulation with
other studies [31, 30, 17] with Hamiltonian-based ansätze.

####  III.2.3 N2 molecule

In this section, we use an activate space of the minimal basis set (STO-3G)
for the nitrogen (N2) molecule, where the molecule has 6-electrons in 12 spin
orbitals. We use the proposed H-GSA ansatz to calculate eigenvalues of the
molecule at four different bond lengths, 0.5, 1.09. 2.0, and 3.0 Å. We plot
the optimization trajectory for these simulations in Fig. 5.

It can be observed from the plots in Fig. 5 that we are able to carry out
optimization for all configurations. However, we only converge to the exact
ground state energy within desired accuracy for the configuration where the
nitrogen molecule is close to dissociation. For all the other configurations
we observe that the energy converge to a value larger than the true ground
state energy. This is expected behavior as these regimes have higher
correlation compared to the one close to dissociation. We believe that a layer
of the H-GSA ansatz is not expressive enough to represent these highly
correlated ground state wavefunctions and we anticipate better energy
estimates with repeated layer of the ansatz.

###  III.3 Comparison to other ansätze

In this section we analyze and compare the gate count complexity and the
number of parameters in the proposed ansatz to previously proposed Hamiltonian
based schemes. Given a Hamiltonian of the form in eq. 2, an initial state,
$\ket{\Psi_{0}}$ and a set of parameters, $\\{\theta\\}$, we briefly mention
the previous schemes:

  1. 1.

Traditional variational Hamiltonian ansatz (T-VHA) - The ansatz proposed in
Ref. [5] has the form:

$\ket{\Psi(\theta)}=\prod_{k=1}e^{-i\theta_{k}\hat{P}_{k}}\ket{\Psi_{0}}.$
(17)

  2. 2.

Simultaneously diagonalizable variational Hamiltonian ansatz (D-VHA) - This
ansatz has the form:

$\ket{\Psi(\theta)}=\prod_{k=1}^{m}\mathcal{U}^{\dagger}_{k}(\prod_{l=1}^{m_{k}}e^{-i\theta_{kl}\hat{P}_{kl}})\mathcal{U}_{k}\ket{\Psi_{0}},$
(18)

where, $\mathcal{U}_{k}$ are Clifford circuits that diagonalize the Pauli-
strings $\\{\hat{P}_{kl}\\}$.

  3. 3.

Modified variational Hamiltonian ansatz (M-VHA) - This ansatz proposed in Ref.
[31] has the form:

$\displaystyle\ket{\Psi(\theta)}$
$\displaystyle=\prod_{i}^{m}\mathcal{U}_{i}^{\dagger}\bigotimes_{j=1}^{n}\textbf{R}_{x_{j}}(\theta_{x_{i,j}})\textbf{R}_{y_{j}}(\theta_{y_{i,j}})$
$\displaystyle\textbf{R}_{z_{j}}(\theta_{z_{i,j}})\mathcal{U}_{i}\ket{\Psi_{0}},$
(19)

where, $\textbf{R${}_{x}$},\textbf{R${}_{y}$},\textbf{R${}_{z}$}$ are single
qubit rotations and $\mathcal{U}_{k}$ are Clifford circuits.

We first look at the two qubit gate count for all the ansätze mentioned above
for different molecules of size up to 20-qubits and compile them in Tab. 1. It
can be observed from the table that the gate count for the proposed H-GSA
ansatz is constantly an order magnitude smaller than all the previously
proposed Hamiltonian-based schemes. It can be seen from Ref. [56] the gate
count is also comparable to that of other ansätze proposed specifically for
molecular Hamiltonians. This indicates that the ansatz proposed here is very
compact.

Molecule (Ne, Nq) | Number of 2-qubit gates
---|---
| T-VHA | D-VHA | M-VHA | H-GSA
H2 (2,4) | 44 | 56 | 16 | 4
LiH (2,6) | 262 | 356 | 144 | 18
H4 (4,8) | 1320 | 1636 | 722 | 90
H2O (6,10) | 1992 | 2582 | 1128 | 170
N2 (6,12) | 2168 | 2605 | 1056 | 168
BeH2 (6,14) | 6276 | 8862 | 4277 | 690
BH3 (8,16) | 17125 | 24935 | 13245 | 1995
H10 (10,20) | 104130 | 136378 | 67696 | 9235
Table 1: A table containing the two-qubit gate complexity of a single layer of
different Hamiltonian based ansätze. The number (Ne, Nq) in parenthesis
correspond to the number of electrons and qubits, respectively.

Next, we compute the number of parameters in the proposed ansatz and compare
it to other previously proposed Hamiltonian based circuits. We compute the
values for all the different ansätze and compile them in Tab. 2. It can be
seen that the number of parameters nearly doubles as compared to the previous
schemes. However, we point out that the number only grows linearly both, with
the size of the system and the number of commuting groups in the Hamiltonian.

Molecule (Ne, Nq) | Number of Parameters
---|---
| T-VHA/D-VHA | M-VHA/H-GSA
H2 (2,4) | 14 | 12
LiH (2,6) | 61 | 108
H4 (4,8) | 184 | 198
H2O (6,10) | 251 | 476
N2 (6,12) | 246 | 364
BeH2 (6,14) | 665 | 1512
BH3 (8,16) | 1520 | 3174
H10 (10,20) | 7148 | 8200
Table 2: A table containing the number of parameters in a single layer of
different Hamiltonian-based ansätze. The number (Ne, Nq) in parenthesis
correspond to the number of electrons and qubits, respectively.

##  IV Conclusion

We have presented a new method for constructing Hamiltonian-based quantum
circuits for estimating eigenvalues of different Hamiltonians. The quantum
circuit is constructed using graph-based diagonalization circuits and layers
of arbitrary single qubit rotation gates. We note that the structure of the
circuit allows for it to be initialized as a product of shallow identity
blocks. The initialization strategy leads to the proposed ansatz having good
trainability properties while being very shallow but with increased number of
free parameters.

We then validate this using numerical simulations and find that with only a
single layer of the ansatz we are able to get a very good estimate of the
ground state energy for different configurations of various molecules.
However, we observe that as we simulate larger systems a single layer of the
ansatz is not expressible enough, but we expect repeating the ansatz can lead
to better energy estimates. The proposed method serves as a significant step
towards constructing shallow circuits for arbitrary Hamiltonians with
applications in chemistry and physics.

Although we have very shallow circuits, we need to carry out further studies
to estimate resources for practical executions of these circuits on existing
hardware by considering the effect of sampling error and finite precision of
rotation angles on the number of circuit executions for a given accuracy of
estimating eigenvalues. Other directions that need to be worked out is the
dependence of optimization procedure on the performance of our methods.
Further numerical work may help answer some of these questions.

## Acknowledgements

This work was supported by the National Science Foundation (NSF) Quantum Leap
Challenge Institute of Robust Quantum Simulation (QLCI grant OMA-2120757).
A.A. also acknowledges support by the National Science Foundation (Grant No.
DMS-1925919), as part of the work was done when he was visiting the Institute
for Pure and Applied Mathematics (IPAM).

## References

  * Bharti  _et al._ [2022] K. Bharti, A. Cervera-Lierta, T. H. Kyaw, T. Haug, S. Alperin-Lea, A. Anand, M. Degroote, H. Heimonen, J. S. Kottmann, T. Menke, _et al._ , Reviews of Modern Physics 94, 015004 (2022).
  * Cerezo  _et al._ [2021a] M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cincio, _et al._ , Nature Reviews Physics , 1 (2021a).
  * Cao  _et al._ [2019] Y. Cao, J. Romero, J. P. Olson, M. Degroote, P. D. Johnson, M. Kieferová, I. D. Kivlichan, T. Menke, B. Peropadre, N. P. Sawaya, _et al._ , Chemical reviews 119, 10856 (2019).
  * McArdle  _et al._ [2020] S. McArdle, S. Endo, A. Aspuru-Guzik, S. C. Benjamin, and X. Yuan, Reviews of Modern Physics 92, 015003 (2020).
  * Wecker  _et al._ [2015] D. Wecker, M. B. Hastings, and M. Troyer, Physical Review A 92, 042303 (2015).
  * Peruzzo  _et al._ [2014] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’brien, Nature communications 5, 4213 (2014).
  * Anand  _et al._ [2022a] A. Anand, P. Schleich, S. Alperin-Lea, P. W. K. Jensen, S. Sim, M. Díaz-Tinoco, J. S. Kottmann, M. Degroote, A. F. Izmaylov, and A. Aspuru-Guzik, Chemical Society Reviews 10.1039/D1CS00932J (2022a), arXiv:2109.15176 .
  * Kandala  _et al._ [2017] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, and J. M. Gambetta, nature 549, 242 (2017).
  * Tang  _et al._ [2021] H. L. Tang, V. Shkolnikov, G. S. Barron, H. R. Grimsley, N. J. Mayhall, E. Barnes, and S. E. Economou, PRX Quantum 2, 020310 (2021).
  * Grimsley  _et al._ [2019] H. R. Grimsley, S. E. Economou, E. Barnes, and N. J. Mayhall, Nature communications 10, 3007 (2019).
  * Ryabinkin  _et al._ [2018] I. G. Ryabinkin, T.-C. Yen, S. N. Genin, and A. F. Izmaylov, Journal of chemical theory and computation 14, 6317 (2018).
  * Ryabinkin  _et al._ [2020] I. G. Ryabinkin, R. A. Lang, S. N. Genin, and A. F. Izmaylov, Journal of chemical theory and computation 16, 1055 (2020).
  * McClean  _et al._ [2018] J. R. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, and H. Neven, Nature communications 9, 1 (2018).
  * Cerezo  _et al._ [2021b] M. Cerezo, A. Sone, T. Volkoff, L. Cincio, and P. J. Coles, Nature communications 12, 1 (2021b).
  * Wang  _et al._ [2021] S. Wang, E. Fontana, M. Cerezo, K. Sharma, A. Sone, L. Cincio, and P. J. Coles, Nature communications 12, 1 (2021).
  * Cerezo  _et al._ [2022] M. Cerezo, G. Verdon, H.-Y. Huang, L. Cincio, and P. J. Coles, Nature Computational Science 2, 567 (2022).
  * Anand  _et al._ [2022b] A. Anand, S. Alperin-Lea, A. Choquette, and A. Aspuru-Guzik, Exploring the role of parameters in variational quantum algorithms (2022b), arXiv:2209.14405 [quant-ph] .
  * McClean  _et al._ [2016] J. R. McClean, J. Romero, R. Babbush, and A. Aspuru-Guzik, New Journal of Physics 18, 023023 (2016).
  * Anschuetz and Kiani [2022] E. R. Anschuetz and B. T. Kiani, arXiv preprint arXiv:2205.05786 (2022).
  * Sim  _et al._ [2019] S. Sim, P. D. Johnson, and A. Aspuru-Guzik, Advanced Quantum Technologies 2, 1900070 (2019).
  * Benedetti  _et al._ [2019] M. Benedetti, E. Lloyd, S. Sack, and M. Fiorentini, Quantum Science and Technology 4, 043001 (2019).
  * Cong  _et al._ [2019] I. Cong, S. Choi, and M. D. Lukin, Nature Physics 15, 1273 (2019).
  * Zhang  _et al._ [2022] S.-X. Zhang, C.-Y. Hsieh, S. Zhang, and H. Yao, Quantum Science and Technology 7, 045023 (2022).
  * Du  _et al._ [2022] Y. Du, T. Huang, S. You, M.-H. Hsieh, and D. Tao, npj Quantum Information 8, 62 (2022).
  * Skolik  _et al._ [2021] A. Skolik, J. R. McClean, M. Mohseni, P. van der Smagt, and M. Leib, Quantum Machine Intelligence 3, 1 (2021).
  * Grant  _et al._ [2019] E. Grant, L. Wossnig, M. Ostaszewski, and M. Benedetti, Quantum 3, 214 (2019).
  * Anand  _et al._ [2021] A. Anand, M. Degroote, and A. Aspuru-Guzik, Machine Learning: Science and Technology 2, 045012 (2021).
  * Anand  _et al._ [2022c] A. Anand, L. B. Kristensen, F. Frohnert, S. Sim, and A. Aspuru-Guzik, Information flow in parameterized quantum circuits (2022c), arXiv:2207.05149 [quant-ph] .
  * Kottmann  _et al._ [2021a] J. S. Kottmann, A. Anand, and A. Aspuru-Guzik, Chemical science 12, 3497 (2021a).
  * Choquette  _et al._ [2021] A. Choquette, A. Di Paolo, P. K. Barkoutsos, D. Sénéchal, I. Tavernelli, and A. Blais, Physical Review Research 3, 023092 (2021).
  * Anand and Brown [2023] A. Anand and K. R. Brown, Leveraging commuting groups for an efficient variational hamiltonian ansatz (2023), arXiv:2312.08502 [quant-ph] .
  * Schleich  _et al._ [2023] P. Schleich, J. Boen, L. Cincio, A. Anand, J. S. Kottmann, S. Tretiak, P. A. Dub, and A. Aspuru-Guzik, Journal of Chemical Theory and Computation 19, 4952 (2023).
  * Ravi  _et al._ [2022] G. S. Ravi, P. Gokhale, Y. Ding, W. Kirby, K. Smith, J. M. Baker, P. J. Love, H. Hoffmann, K. R. Brown, and F. T. Chong, in  _Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1_ (2022) pp. 15–29.
  * Anand  _et al._ [2022d] A. Anand, J. S. Kottmann, and A. Aspuru-Guzik, Quantum compression with classically simulatable circuits (2022d), arXiv:2207.02961 [quant-ph] .
  * Letcher  _et al._ [2023] A. Letcher, S. Woerner, and C. Zoufal, From tight gradient bounds for parameterized quantum circuits to the absence of barren plateaus in qgans (2023), arXiv:2309.12681 [quant-ph] .
  * Bravyi and Kitaev [2002] S. B. Bravyi and A. Y. Kitaev, Annals of Physics 298, 210 (2002).
  * Jordan and Wigner [1928] P. Jordan and E. P. Wigner, Z. Phys. 47, 14 (1928).
  * Verteletskyi  _et al._ [2020] V. Verteletskyi, T.-C. Yen, and A. F. Izmaylov, The Journal of chemical physics 152 (2020).
  * Izmaylov  _et al._ [2019] A. F. Izmaylov, T.-C. Yen, R. A. Lang, and V. Verteletskyi, Journal of chemical theory and computation 16, 190 (2019).
  * Jena  _et al._ [2019] A. Jena, S. Genin, and M. Mosca, arXiv preprint arXiv:1907.07859 (2019).
  * Crawford  _et al._ [2021] O. Crawford, B. van Straaten, D. Wang, T. Parks, E. Campbell, and S. Brierley, Quantum 5, 385 (2021).
  * Huggins  _et al._ [2021] W. J. Huggins, J. R. McClean, N. C. Rubin, Z. Jiang, N. Wiebe, K. B. Whaley, and R. Babbush, npj Quantum Information 7, 23 (2021).
  * Gokhale  _et al._ [2020] P. Gokhale, O. Angiuli, Y. Ding, K. Gui, T. Tomesh, M. Suchara, M. Martonosi, and F. T. Chong, IEEE Transactions on Quantum Engineering 1, 1 (2020).
  * Zhao  _et al._ [2020] A. Zhao, A. Tranter, W. M. Kirby, S. F. Ung, A. Miyake, and P. J. Love, Physical Review A 101, 062322 (2020).
  * d’Alessandro [2021] D. d’Alessandro,  _Introduction to quantum control and dynamics_ (CRC press, 2021).
  * Gidney [2021] C. Gidney, Quantum 5, 497 (2021).
  * Van den Nest  _et al._ [2004] M. Van den Nest, J. Dehaene, and B. De Moor, Physical Review A 69, 10.1103/physreva.69.022316 (2004).
  * Zeng  _et al._ [2007] B. Zeng, H. Chung, A. W. Cross, and I. L. Chuang, Physical Review A 75, 032325 (2007).
  * Vijayan  _et al._ [2022] M. K. Vijayan, A. Paler, J. Gavriel, C. R. Myers, P. P. Rohde, and S. J. Devitt, Compilation of algorithm-specific graph states for quantum circuits (2022), arXiv:2209.07345 [quant-ph] .
  * Miller  _et al._ [2022] D. Miller, L. E. Fischer, I. O. Sokolov, P. K. Barkoutsos, and I. Tavernelli, arXiv preprint arXiv:2203.03646 (2022).
  * Kottmann  _et al._ [2021b] J. S. Kottmann, S. Alperin-Lea, T. Tamayo-Mendoza, A. Cervera-Lierta, C. Lavigne, T.-C. Yen, V. Verteletskyi, P. Schleich, A. Anand, M. Degroote, _et al._ , Quantum Science and Technology 6, 024009 (2021b).
  * Suzuki  _et al._ [2021] Y. Suzuki, Y. Kawase, Y. Masumura, Y. Hiraga, M. Nakadai, J. Chen, K. M. Nakanishi, K. Mitarai, R. Imai, S. Tamiya, _et al._ , Quantum 5, 559 (2021).
  * Virtanen  _et al._ [2020] P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, _et al._ , Nature methods 17, 261 (2020).
  * [54] https://github.com/AbhinavUofT/Modified_VHA.
  * Cervera-Lierta  _et al._ [2021] A. Cervera-Lierta, J. S. Kottmann, and A. Aspuru-Guzik, PRX Quantum 2, 10.1103/prxquantum.2.020329 (2021).
  * Kottmann and Aspuru-Guzik [2022] J. S. Kottmann and A. Aspuru-Guzik, Physical Review A 105, 10.1103/physreva.105.032449 (2022).