You are on page 1of 28

Evaluating a quantum-classical quantum Monte Carlo algorithm with Matchgate

shadows

Benchen Huang,1, 2 Yi-Ting Chen,3 Brajesh Gupt,1 Martin


Suchara,4, ∗ Anh Tran,1 Sam McArdle,5, † and Giulia Galli2, 6, 7, ‡
1
AWS Worldwide Specialist Organization, Seattle, WA 98170, USA
2
Department of Chemistry, University of Chicago, Chicago, IL 60637, USA
3
Amazon Braket, New York, NY 10018, USA
4
Microsoft Azure Quantum, Redmond, WA 98052, USA
5
AWS Center for Quantum Computing, Pasadena, California, CA 91125, USA
6
Pritzker School of Molecular Engineering, University of Chicago, Chicago, IL 60637, USA
7
Materials Science Division and Center for Molecular Engineering,
arXiv:2404.18303v1 [quant-ph] 28 Apr 2024

Argonne National Laboratory, Lemont, IL 60439, USA


(Dated: April 30, 2024)
Solving the electronic structure problem of molecules and solids to high accuracy is a major chal-
lenge in quantum chemistry and condensed matter physics. The rapid emergence and development
of quantum computers offer a promising route to systematically tackle this problem. Recent work by
Huggins et al. [1] proposed a hybrid quantum-classical quantum Monte Carlo (QC-QMC) algorithm
using Clifford shadows to determine the ground state of a Fermionic Hamiltonian. This approach
displayed inherent noise resilience and the potential for improved accuracy compared to its purely
classical counterpart. Nevertheless, the use of Clifford shadows introduces an exponentially scaling
post-processing cost. In this work, we investigate an improved QC-QMC scheme utilizing the re-
cently developed Matchgate shadows technique [2], which removes the aforementioned exponential
bottleneck. We observe from experiments on quantum hardware that the use of Matchgate shad-
ows in QC-QMC is inherently noise robust. We show that this noise resilience has a more subtle
origin than in the case of Clifford shadows. Nevertheless, we find that classical post-processing,
while asymptotically efficient, requires hours of runtime on thousands of classical CPUs for even the
smallest chemical systems, presenting a major challenge to the scalability of the algorithm.

I. INTRODUCTION algorithms [12, 13]. One popular algorithm to com-


pute Fermionic ground states is the variational quan-
The ability to accurately solve the Schrödinger equa- tum eigensolver (VQE) and its variants [14–17], where
tion for interacting electrons will help tackle a multi- a parameterized quantum circuit is used to generate
tude of problems in physics, chemistry and materials the wavefunction, and its optimization is off-loaded
science, relevant to applications ranging from drug dis- to classical hardware. Nevertheless, current noisy
covery [3] to the design of functional materials [4, 5]. In intermediate-scale quantum (NISQ) hardware is limited
the past century, multiple efforts have been devoted to by the depth of quantum circuits that it can implement.
solving the Schrödinger equation on classical comput- Moreover, VQE faces optimization challenges resulting
ers, either by using suitable approximations and mean- from ansatz– or noise–induced barren plateaus in energy
field theories [6] or by employing nearly exact meth- landscapes [18], as well as large measurement overheads.
ods such as full configuration interaction (FCI) [7] and Recently Huggins et al. [1] proposed a hybrid
quantum Monte Carlo (QMC) [8, 9]. However, known quantum-classical algorithm for quantum Monte Carlo
algorithms for FCI scale exponentially on classical com- (QC-QMC) and applied it to study the dissociation of
puters, while scalable solutions using QMC often suffer diatomic molecules on Google’s Sycamore quantum pro-
from the sign problem [10] and other numerical insta- cessor. The Monte Carlo algorithm is driven by sam-
bilities. In essence, highly entangled many-body wave- pling from a trial state |ΨT ⟩ prepared on the quantum
functions of interacting electrons are hard to represent computer, with the aim of producing smaller bias and
and optimize on classical computers. better accuracy than its purely classical counterpart.
The advent of quantum computers offers a promis- The algorithm uses classical shadows [19] with random
ing route to tackle the interacting electron problem, ei- Clifford circuits to avoid iterative communication be-
ther through quantum [11] or hybrid quantum-classical tween classical and quantum hardware, which is desir-
able on near-term quantum devices as it minimizes la-
tency from quantum-classical communication. Surpris-
∗ M.S.’ contributions to this work were made while employed by ingly, an inherent noise resilience was observed [1] —
Amazon. spurring both academic and industrial interest in the
† sammcard@amazon.com technique [20–26]. Nevertheless, currently known tech-
‡ gagalli@uchicago.edu niques for classically post-processing the Clifford shad-
2

ows scale exponentially with system size, providing a tum hardware systems. These calculations reach agree-
barrier to achieving quantum advantage. ment with the reference values even in the absence of
The inefficiencies of Clifford shadows for QC-QMC error mitigation. In Sec. IV, we discuss the merits and
were recently addressed in Ref. [2] by replacing the Clif- shortcomings of QC-QMC and how it is related to other
ford circuits with Matchgate circuits [27]. To the best quantum-classical hybrid algorithms and purely classi-
of our knowledge, the proposal has not yet been exper- cal QMC methods. Finally, Sec. V concludes our work
imentally evaluated in the literature (although we note with a summary.
recent numerical investigations probing the statistical
properties of Matchgate shadows applied to chemical
systems [26, 28]). In particular, it is unclear whether II. PRELIMINARIES
the Matchgate shadows approach exhibits the noise re-
silience that underpinned the success of the original (un- The workflow of the QC-QMC method is shown in
scalable) Clifford shadows approach [1], as the theoreti- Fig. 1, where the computation on quantum and classical
cal justification for the noise resilience of Clifford shad- hardware is partitioned by classical shadows. In this
ows does not immediately extend to the Matchgate case. section, we first provide a brief overview of the auxiliary-
In addition, while the proposal is formally efficient, its field quantum Monte Carlo (AFQMC) algorithm [33]
practicality for studying realistic systems has yet to be used in the QC-QMC method. Then we introduce the
established. classical shadows formalism and discuss its use in QC-
In this work, we numerically and experimentally QMC. Readers familiar with this background material
study the QC-QMC algorithm, incorporating Match- can skip to the summary of our results in Sec. III.
gate shadows. In particular, we probe the noise re-
silience of the algorithm on quantum hardware. We
observe and theoretically characterize the persistence A. Auxiliary-field quantum Monte Carlo
of the noise resilience that was observed for Clifford
shadows, uncovering a more subtle microscopic origin. Within the electronic structure community, QMC
The Matchgate shadows approach reduces the classical refers to a family of methods that bypass the explicit
post-processing cost from exponential to formally poly- optimization of the many-body wavefunction in an ex-
nomial. However, its use in QC-QMC has high degree ponentially large Hilbert space. Specifically, probabilis-
polynomial scaling in the system size, resulting from tic sampling is applied in a subspace of the full Hilbert
computing the local energy of each QMC walker. The space, resulting in a polynomial scaling of the memory
algorithm also has large constant factors resulting from required for the evaluation of the ground state energy
the number of samples used in the classical shadow post- of a given system. The auxiliary-field quantum Monte
processing, as well as the number of QMC walkers and Carlo (AFQMC) method is one example of projector
the number of QMC timesteps. These final two factors QMC methods where a stochastic imaginary time evo-
are properties of the QMC algorithm itself, rather than lution of the wavefunction is carried out by propagating
aspects of the quantum algorithm. We observe hours of samples on a manifold of nonorthogonal Slater determi-
post-processing runtime for even the smallest chemical nants. Each sample {|ϕl ⟩} is usually called a “walker”.
systems, using thousands of CPUs. This fundamentally The ground state energy is estimated as
challenges the scalability of the approach. We thus vali-
iθl loc
P
date the persistence of one of the major strengths of QC- l wl e El ⟨ΨT |H|ϕl ⟩
E= P iθl
, Elloc = , (1)
QMC, as well as highlight the challenges that must be l w l e ⟨ΨT |ϕl ⟩
overcome if the technique is to provide practical quan-
tum advantage. where Elloc is the local energy of each walker, wl , θl
The rest of the paper is organized as follows. In Sec. II are its weight and phase, H is the electronic structure
we discuss how QC-QMC is performed and the basics of Hamiltonian, and |ΨT ⟩ is a trial state defined as an ap-
classical shadows, which serve as prerequisites for sub- proximation to the true ground state. The walker wave-
sequent discussions. In Sec. III, we first discuss prior function and its weight and phase are updated every
⟨ΨT |ϕi ⟩
work on noise robust classical shadows [29, 30] (and time step according to functions of ⟨Ψ T |ϕj ⟩
that perform
their recently developed Matchgate variants [31, 32]) the imaginary time evolution, see App. A for details.
and give an extension to these methods that mitigate For a generic Hamiltonian, however, similar to other
state preparation noise in QC-QMC. Second, we exper- projector QMC methods, AFQMC suffers from the sign
imentally and analytically confirm the natural noise re- problem, or more precisely, the phase problem where
silience of the Matchgate shadow protocol as used in the phases θl of the walkers are evenly distributed in
QC-QMC. Finally, we apply QC-QMC to simulate the [0, 2π) [33, 34]. It leads to the ground state energy es-
dissociation of hydrogen, and the ground state energy timator, i.e., Eq. 1 (computed from the ensemble av-
of a solid-state spin defect system, on different quan- erage of all the walkers) experiencing an exponentially
3

(a) (b) (c)


H Classical trial state
Quantum trial state
+ Shadows
⋮ 𝑉! 𝑈"

! "
𝑄! , #𝑏! % !!"#$%&

Figure 1: Workflow for the hybrid quantum-classical quantum Monte Carlo (QC-QMC) algorithm: (a). An equal
superposition of the all-zero state |0⟩, and the quantum trial state |ΨT ⟩ is prepared on a quantum computer,
followed by the twirling of random unitary circuits UQ and measurements; (b). The measurement outcomes {|bi ⟩}
and the random circuit unitary UQ —which together constitute the information required to reconstruct classical
shadows—are communicated to the classical computers; (c). The QMC procedure is carried out on a classical
computer, where the walker states |ϕi ⟩ evolve on the potential energy surface from the initial state |ΨI ⟩ towards
the target ground state |Ψg ⟩.

fast decay of the signal-to-noise ratio and a large sta- to |ΨT ⟩. The former approach suffers a significant over-
tistical error. To remedy the phase problem, a com- head in quantum computation due to the large number
mon solution is the so-called phaseless approximation of walkers typically used in AFQMC. In addition, it
(ph) [33], where θl = 0 is enforced by a modified up- requires iterative communication between the classical
date rule, thus constraining the evolution of the walk- and quantum hardware, since |ΨT ⟩ is queried at every
ers, see App. A for details. Such an approximation, time step during the time evolution. We therefore fol-
while controlling the phase problem, introduces a bias lowed the approach of Huggins et al. in this work, and
to the estimated ground state energy. The magnitude we provide a detailed scaling comparison of the two ap-
of the bias is largely determined by how well the trial proaches in Section IV.
state |ΨT ⟩ represents the exact ground state. On classi-
cal computers, |ΨT ⟩ is usually chosen as either a single
Slater determinant, e.g., the Hartree-Fock state, or a
linear combination of Slater determinants, to ensure a
polynomial scaling in computational time [35].
The insight of Ref. [1] is that on a quantum com-
puter, one may efficiently compute overlaps between B. Classical shadows
Slater determinant walker states and a much wider
range of trial states, e.g., the unitary coupled clus-
ter (UCC) state [12, 36]. We refer to implementing As mentioned in the previous subsection, the need to
AFQMC in this way as QC-AFQMC. Such states are po- evaluate ⟨ΨT |ϕ⟩ for all walkers at each time step is a key
tentially “closer” to the target ground state than those consideration for the practicality of the algorithm. In
adopted as classical trials, and could lead to more accu- Ref. [1] it was shown that the measurements required in
rate ground state energy estimations. It is currently QC-AFQMC can be recast into the following framework.
unclear what are the best AFQMC trial states that Let ρ denote the density matrix of an n-qubit quantum
can be prepared on a quantum computer, in low cir- state that we know how to prepare, and {Oi } denote a
cuit depth. This is a similar issue to that of choosing collection of M observables whose expectation values,
a well-motivated and implementable ansatz circuit in i.e., tr(Oi ρ) we wish to estimate. Classical shadow to-
VQE. We will discuss this problem in Sec. IV, and as- mography [19] provides a way to estimate these quanti-
sume for now that a suitable AFQMC trial state can be ties with a cost that only scales logarithmically with M .
efficiently prepared on a quantum computer. Then, the Specifically, it estimates each tr(Oi ρ) up to some error
central issue for the QC-AFQMC scheme lies in how to ϵ by the following procedure: i) choose a distribution D
evaluate the overlap amplitude ⟨ΨT |ϕ⟩ for each walker, of unitary transformations; ii) sample random unitaries
at each timestep. Efforts in the literature have branched U ∈ D from the chosen distribution and iii) measure the
out in two directions: Xu and Li [20] designed circuits state U ρU † in the computational basis {|b⟩} (we refer to
based on the Hadamard test [37] to efficiently compute the tensor products of {|0⟩, |1⟩} of each qubit as the com-
the overlap between the walker states and the trial state. putational basis, i.e., {|b⟩}b∈{0,1}n ) to obtain the mea-
On the other hand, Huggins et al. [1] computed the am- surement outcome |b⟩⟨b|. Consider the state U † |b⟩⟨b|U ;
plitude by using the classical shadows technique applied in expectation, the mapping from ρ to U † |b⟩⟨b|U defines
4

a quantum channel, system size. Moreover, it should be efficient to com-


h i pute
h the expectation
 values
i with respect to the shadows,
M(ρ) := E U † |b̂⟩⟨b̂|U tr Oi M−1 U † |b̂⟩⟨b̂|U , on a classical computer.
U ∼D
X (2) In QC-AFQMC, the overlap amplitude ⟨ΨT |ϕ⟩ is not
= E ⟨b|U ρU † |b⟩U † |b⟩⟨b|U,
U ∼D a physical observable. Nevertheless, it can be measured
b∈{0,1}n
within the framework of classical shadows by rewriting
it as [1]
where E denotes the operation of averaging, and the hat
represents a statistical estimator. ⟨ΨT |ϕ⟩ = 2tr (|ϕ⟩⟨0|ρ)
In the classical shadows framework, we require M to h  i (6)
= 2 E tr |ϕ⟩⟨0|M−1 U † |b̂⟩⟨b̂|U ,
be invertible, which is true if and only if the collection of U ∼D
measurement operators defined by drawing U ∈ D and where ρ is the density matrix corresponding to the state
measuring in the computational basis is tomographically √1 (|0⟩ + |ΨT ⟩) and |0⟩ = |0⟩⊗n . Here |ϕ⟩⟨0| plays the
complete. Assuming that these conditions are satisfied, 2
role of the operator O.
we can apply M−1 to both sides of above equation,
Ref. [1] used random Clifford circuits to perform clas-
yielding
sical shadows, where the overlap amplitude is post-
 h i processed as
ρ = E [ρ̂] = M−1 E U † |b̂⟩⟨b̂|U h i
U ∼D U ∼D
h  i (3) ⟨ΨT |ϕ⟩ = 2f −1 E n ⟨0|U † |b̂⟩⟨b̂|U |ϕ⟩ . (7)
U ∼Cl(2 )
= E M−1 U † |b̂⟩⟨b̂|U .
U ∼D
In the above equation, f = (2n + 1)−1 is the only (non-
We call the collection {M−1 (U † |b̂⟩⟨b̂|U )} the classical trivial) eigenvalue of M, since the Clifford group has
shadows of ρ. These shadows can be used to estimate only one non-trivial irreducible representation (irrep).
the expectation values tr(Oi ρ), The first term ⟨0|U † |b⟩ can be efficiently computed us-
ing the Gottesman-Knill theorem [39], but the second
h  i term ⟨b|U |ϕ⟩, in general, cannot be efficiently estimated
⟨Oi ⟩ = E tr Oi M−1 U † |b̂⟩⟨b̂|U , (4) due to |ϕ⟩ being a random Slater determinant. As noted
U ∼D
in Ref. [1], the method of Ref. [40] could be used to
each within error ϵ with probability at least 1 − δ, with efficiently estimate this quantity up to an additive er-
a number of samples that scales as: ror. Nevertheless, the f −1 prefactor exponentially am-
  plifies this error, eliminating the efficiency of the pro-
log(M/δ) posed scheme.
Nsample = O max Var[ôi ] . (5)
ϵ2 1<i<M Another interesting observation of Ref. [1] is that the
evaluation of overlap ratios, which drives the AFQMC
In the above equation, we define ôi as an estimator of algorithm, is resilient to quantum hardware noise. This
tr(Oi ρ) and Var[ôi ] represents the variance of estima- phenomenon can be understood by first noting that
tor ôi , which could be bounded by the shadow norm noise will change the prefactor f to a modified pref-
of Oi [19]. Importantly for QC-AFQMC, Nsample only actor fe (as explained in detail in Sec. III A). This pref-
scales logarithmically with the number of target observ- actor cancels out when taking the ratio, recovering the
ables M 1 . noiseless result without requiring any additional error
Formally, the condition that the measurement chan- mitigation. We refer to this as having an inherent noise
nel is invertible is sufficient for performing the classical resilience.
shadows protocol. In practice, it is desirable that the Refs. [2, 27, 41, 42] investigated the replacement of the
protocol is efficient both in terms of quantum and clas- random Clifford ensemble with a random Matchgate en-
sical resources. This means that there should be an semble (in some cases restricting to Clifford Matchgates
efficient procedure to sample unitaries U from D and and/or number conserving Matchgates). The Match-
implement them on a quantum computer, and in addi- gate circuit is the qubit representation of the Fermionic
tion the variance of the estimates ôi is polynomial in Gaussian transformation assuming the Jordan-Wigner
(JW) transformation [43] is used. We therefore adopt
the JW mapping throughout this work. Unlike the Clif-
ford group, the Matchgate group has (n + 1) (even) ir-
1 We note that the scaling in Eq. 5 was rigorously proven in reps, see App. D for details. We focus on the results of
Ref. [19] using a median-of-means estimator. Ref. [27, 38] dis- Ref. [2], which
cussed when a mean estimator would suffice for Clifford and
Matchgate shadows, respectively. We observed numerically • Proved the equivalence between the continuous
that a mean estimator suffices for shadows in our small sys- and discrete Matchgate ensembles for classical
tem QC-QMC experiments. shadows.
5

• Explicitly showed how to efficiently compute the which has more subtle origins than in the Clifford case.
overlap between trial states and Slater determi- Third, we apply the QC-AFQMC algorithm to compute
nant states using Matchgate shadows, including i) the dissociation curve of the hydrogen molecule on a
bounding the worst case variance in the estimate. superconducting qubit quantum computer; and ii) the
We refer the interested reader to Ref. [2, Sec.IIID] for a ground state of a negatively charged nitrogen-vacancy
more detailed comparison between these recent works. (NV) center in diamond on a trapped ion quantum com-
The results of Ref. [2] overcame the post-processing lim- puter.
itations of Clifford shadows, showing that overlap am- We use the following notation in this section: we de-
plitude can be computed as note overlap amplitudes obtained from noiseless shad-
n
ows with an ordinary bracket, ⟨ΨT |ϕ⟩, quantities sub-
h  i

X
−1 ject to quantum noise with a tilde bracket, ⟨Ψ^
⟨ΨT |ϕ⟩ = 2 f2l E tr |ϕ⟩⟨0|Π2l UQ |b̂⟩⟨b̂|UQ , T |ϕ⟩, and
Q∼B(2n) we use a tilde plus subscript r to denote quantities ob-
l=0
(8) tained from a robust shadow protocol, ⟨Ψ ^ T |ϕ⟩r .
where the random Matchgate circuits UQ are prepared
by sampling random signed permutation matrices Q
(Q ∈ B(2n), where B represents the Borel group). In
A. Robust Matchgate shadow protocol
Eq. 8, Π2l is the projector associated with the l-th even
irrep, and its eigenvalue f2l is
 −1   Refs. [29, 30] developed a “robust shadow proto-
2n n col”, showing that when the quantum noise is gate-
f2l = . (9)
2l l independent, time-stationary, and Markovian (GTM),
Importantly, Eq. 8 can be efficiently solved using the and the state preparation of ρ is perfect, a noise-free
matrix Pfaffian, with a scaling of O (n − ζ/2)4 by expectation value can be obtained. The protocol works
polynomial interpolation [2], where ζ denotes the num- by replacing the eigenvalue(s) f of M with modified
ber of electrons. As such, the exponential post- value(s) fe that compensates for the effect of noise. The
processing bottleneck present in the Clifford shadows robust scheme uses additional shadow-like circuits to
approach is eliminated through the use of Matchgate estimate the value(s) of fe. It can be viewed as pas-
shadows. sive error mitigation, as the updates are made purely
Inherent noise resilience, analogous to that observed in the classical post-processing of the shadow expecta-
for overlap ratios computed via Clifford shadows, has tion value. The framework was originally applied to
not yet been established for overlap ratios computed global and local Clifford shadows. Recently, two sepa-
via Matchgate shadows. One sufficient but not neces- rate works extended the robust shadow protocol to the
sary condition, (following from the Clifford case), would Matchgate setting [31, 32]. The latter of these works
be fe2l = αf2l , l ∈ {0, 1, . . . , n}, where α is a proportion- observed a close connection between the circuit used for
ality constant. In Sec. III B 2 we investigate the noise re- the robust Matchgate shadow protocol and prior work
silience of overlap ratios computed via Matchgate shad- on Matchgate randomized benchmarking [44]. We will
ows. While our experimental results do not display a closely follow this approach, presenting derivations for
completeness in App. E.
universal proportionality constant between each fe2l and
The robust Matchgate shadows protocol [32] esti-
f2l , we nevertheless find that the computed ratios are
inherently robust to noise, and provide justification for mates {fe2l } using the following steps: i) prepare the
this observation. all-zero state |0⟩ on a quantum computer; ii) sample
Q ∈ B(2n) and apply the Matchgate circuit UQ to |0⟩;
iii) measure in the computational basis and collect mea-
III. RESULTS surement outcomes |b⟩. The expressions used to calcu-
late {fe2l } from these measurement outcomes are given in
In this section, we present our results, divided into App. E. The sample complexity is asymptotically equiv-
three parts. We first introduce prior work on noise alent to that used in the noiseless case [32].
robust classical shadows, and provide an improvement The established robust shadow scheme focuses on
that mitigates state preparation noise in QC-AFQMC. noise in the shadow unitary (UQ in Fig. 1a), and does
Second, we experimentally test for noise resilience of not mitigate any noise occurring during state prepara-
both overlap amplitudes and ratios of overlap ampli- tion (VT in Fig. 1a). We extend the method to (partly)
tudes, evaluated via the Matchgate shadow technique. account for noise that occurs during the state prepara-
Notably, we observe that the ratios are resilient to the tion unitary. In QC-AFQMC, we evaluate the over-
effects of noise (as was previously observed for Clif- lap amplitudes by measuring classical shadows of an
ford shadows [1]). We provide a theoretical explana- equal superposition state √12 (|ΨT ⟩ + |0⟩). This state
tion for the observed noise resilience and its limitations, is prepared via a circuit that first generates a superpo-
6

sition of the Hartree-Fock state with |0⟩ state, and then their accuracy is limited by the effects of noise. The two
applies a unitary VT , such that VT |ΨHF ⟩ = |ΨT ⟩ and robust shadow approaches (accounting for state prepa-
VT |0⟩ = |0⟩ [45]. As discussed above, to estimate the ration error (SP) and not accounting for it) mitigate
values of {fe2l } required in the robust Matchgate proto- the impact of hardware noise. In particular, compen-
col, we apply a Matchgate shadow circuit to the initial sating for the effects of state preparation noise results in
state |0⟩. We can partially account for the noise in the a much smaller deviation from the ideal noiseless values
state preparation circuit in the following way. We mini- than the standard robust approach. This observation
mally alter the QC-AFQMC circuit in Fig. 1a, such that signifies the importance of considering the state prepa-
it measures {fe2l }, by removing the initial Hadamard ration noise when using robust shadows on quantum
gate. In a noiseless setting, this modified version of VT hardware.
would still result in ρ = |0⟩ ⟨0|, as required. In the
noisy setting, we can treat the noise as originating in
the Matchgate circuit, which is then mitigated by the
robust protocol. While we do not yet have a full math-
ematical characterization of the noise models that can
be mitigated by our enhanced robust Matchgate shad-
ows technique, we demonstrate the efficacy of this ap-
proach through numerical simulations and experiments
on quantum hardware, presented in the following sub-
section.

B. Noise resilience of overlap amplitudes and


their ratios
Ψ! 𝜙"

As discussed previously, all of the key quantities used


in the AFQMC algorithm, e.g., the local energy, can be
expressed as linear combinations of the ratio of over-
⟨ΨT |ϕi ⟩
laps ⟨Ψ T |ϕj ⟩
. Hence we can view the propagation in
imaginary time as being driven by these overlap ratios.
We can estimate the individual overlaps from Match-
gate shadows. In this section, we experimentally probe
the impact of noise on both the overlap amplitudes, and
their ratios, by measuring these quantities via Match- Ψ! 𝜙"
gate shadows implemented on the IBM Hanoi super-
conducting qubit quantum computer. As a test sys- Ψ! 𝜙#
tem, we consider the hydrogen molecule in its minimal
STO-3G basis, mapped to four qubits via the Jordan-
Wigner transform. We use a trial state of the form
|ΨT ⟩ = α |1100⟩ + β |0011⟩, which is a linear combina-
tion of the Hartree-Fock configuration and double ex-
cited state, respectively. Figure 2: The mean absolute error (MAE) of overlap
⟨ΨT |ϕi ⟩
amplitudes ⟨ΨT |ϕi ⟩ and overlap ratios ⟨Ψ T |ϕj ⟩
w.r.t.
the number of Matchgate circuits, varying from 40 to
1. Evaluating the overlap amplitudes 10,000. A total of 16,000 Matchgate shadow circuits
are used in this experiment, each using 1024
We compute the overlaps ⟨ΨT |ϕi ⟩ between the trial measurement shots [46]. The raw experimental results
state and 16 randomly sampled Slater determinants, us- (“Exp.”) and noiseless simulation (“Noiseless”) are
ing Eq. 8, as a function of the number of Matchgate plotted in orange circles and blue crosses, respectively.
shadows used. We consider both noisy Matchgate shad- For the two robust protocols (“RShadow” and
ows, and those corrected using the robust Matchgate “RShadow (SP)”), we allocated another 16,000
shadow protocol introduced in Sec. III A. Matchgate circuits for each to determine the
In Fig. 2 (upper panel) we show the mean absolute er- coefficients fe2l , thus doubling the measurement cost.
ror (MAE) of the noisy and noise-robust overlaps, with
respect to the ideal noiseless value. We observe that the
noisy results differ significantly from the true values, and
7

2. Noise resilience in the evaluation of overlap ratios Proof. A full proof is given in App. D 4, and we sketch
a brief outline here. The operation Π2l (|ϕ⟩⟨0|) can be
re-expressed as 2−n jl ⟨0|γj†l |ϕ⟩γjl where γjl are strings
P
Using the results presented in the previous section
for {⟨ΨT |ϕi ⟩}, we can compute the 120 possible ratios of 2l Majorana operators (defined in App. D). The ac-
of overlaps originating from the 16 Slater determinants tion of the Majorana strings is to create “1’s” in the
sampled. In Fig. 2 (lower panel) we show the MAE of |0⟩ state. Only terms with ζ 1’s created contribute
these overlap ratios with respect to the ideal values (and to the sum. Projecting the resulting sum into the re-
verify in Fig. 9 in App. H that this behavior holds for stricted subspace ensures the ‘eigen-operator’ property.
not only the MAE, but the errors associated with each The prefactor is given by counting arguments for the
overlap ratio). We observe the following behavior number of Majorana strings that can yield ζ 1’s for a
given l value.
⟨ΨT |ϕi ⟩ ^
⟨Ψ T |ϕi ⟩r
^
⟨Ψ T |ϕi ⟩
≈ ≈ , (10) The justification for restricting to the [0, ζ]-electron
⟨ΨT |ϕj ⟩ ^
⟨ΨT |ϕj ⟩r ^
⟨ΨT |ϕj ⟩ subspace is that ρ is an equal superposition of |0⟩ and
when the number of shadow circuits exceeds 100. This is |ΨT ⟩, and therefore the trace of ρ with operators out-
an indication of noise resilience in evaluating the overlap side this subspace will necessarily be zero. This will
ratios, suggesting that the robust shadow protocol may still hold approximately true when ρ is reconstructed
not be required for QC-AFQMC. We provide theoretical from a finite number of classical shadows. This oper-
justification for these observations below. ator only appears in the classical post-processing step
The first (approximate) equality in Eq. 10 will not and is therefore not affected by noise. Therefore, the
hold for all noise models, as the robust Matchgate noisy overlap amplitude can be expanded as
shadow protocol is only guaranteed to correct the ef- n
!
† ˆ ˆ
X hD ED Ei
fects of noise if its assumptions (GTM noise, noiseless −1
^
⟨ΨT |ϕ⟩ ≈ 2 f2l b2l E 0 UQ b̃ b̃ UQ ϕ ,
state preparation) are satisfied. Nevertheless, for cases l=0
Q∼B(2n)
where the robust Matchgate protocol is able to correct (13)
the effects of noise the equality of the ratios follows di- where in deriving this equation, we have used
tr AM−1 (B) = tr M−1 (A)B , where operators A, B
 
rectly. In our experiments, we found that the robust
Matchgate protocol was able to correct the individual are in the subspace where M is invertible [2]. This
overlaps up to a small residual error attributed to resid- expression can be compared to Eq. 7 for Clifford shad-
ual state preparation noise. This leads to the approxi- ows, noting the common feature of the separation of
mate equality between the ratios. the expression into a sum over the channel index l, and
The second (approximate) equality shows that the ra- the expectation over the shadow unitaries acting on the
tio of any two uncorrected overlap amplitudes (which walker state |ϕ⟩. In order to mitigate the effects of noise
are themselves inaccurate, see Fig. 2 (upper panel)) with the robust Matchgate shadows approach, we could
yields the same results as ratios of overlaps computed replace f −1 with fe−1
2l 2l
via the robust Matchgate protocol. To understand this !
result, we first restate Eq. 8 for computing the overlap n
† ˆ ˆ
X hD ED Ei
^ −1
in the absence of noise ⟨ΨT |ϕ⟩r ≈ 2 fe2l b2l E 0 UQ b̃ b̃ UQ ϕ .
Q∼B(2n)
n l=0
(14)
h  i

X
−1
⟨ΨT |ϕ⟩ = 2 f2l E tr |ϕ⟩⟨0|Π2l UQ |b̂⟩⟨b̂|UQ .
Q∼B(2n) If the noise satisfies GTM assumptions (and state prepa-
l=0
ration is noise-free), Eq. 14 is able to correct the
EDeffect of
We make use of the following Theorem: ˆ ˆ
P noise that manifests from the deviation of b̃ b̃ from
Theorem 1. For an n qubit state |ϕ⟩ = i ci |i⟩ which ED
is a linear combination of computational basis states |i⟩ b̂ b̂ . If these assumptions on the noise are not satis-
with fixed Hamming weight ζ, fied, robust Matchgate shadows may not be able to per-
  fectly recover the noiseless value. We can now observe
P0,ζ Π2l (|ϕ⟩⟨0|) = b2l |ϕ⟩⟨0|, (11)
that regardless of whether the robust procedure is used,
with the terms corresponding to the sum over l in Eq. 13 and
( n−ζ  ζ ζ Eq. 14 are both independent of |ϕ⟩. As such, when com-
2ζ−n l− ζ2
, if 2 ≤l ≤n− 2 ^
⟨Ψ T |ϕi ⟩r
^
⟨Ψ T |ϕi ⟩
b2l = (12) puting the ratios and , the prefactor will
0, otherwise ^
⟨ΨT |ϕj ⟩r
^
⟨ΨT |ϕj ⟩

Pn cancel between the numerator and denominator, leaving


such that l=0 b2l = 1. Here P0,ζ denotes the projec-
h i
behind a ratio of estimators E . . . that is identi-
tor onto the subspace spanned by the Hamming weight Q∼B(2n)
zero state |0⟩ and computational basis states of Ham- cal for the robust case and the non-robust case. As such,
ming weight ζ. if the ratio of overlaps evaluated via robust Matchgate
8

shadows is able to approximately recover the noiseless


results (as observed in our data), we conclude that the
ratio of overlaps evaluated via regular Matchgate shad-
ows is also able to approximately recover the noiseless
value. This explains the data shown in Fig. 2 (lower
panel).
We emphasize that the cancellation of the pre-factor
Pn e−1
found here, i.e., l=0 f2l b2l , should not be mistaken
with that of the Clifford case, although they have a very
similar form. This prefactor of Matchgate shadows, as Ψ! 𝜙"
a sum, contains the noise information of all (n + 1) even
subspaces of the Matchgate channel. From the Clifford
case, one might naturally think that the cancellation
for the Matchgate shadow is due to fe2l = αf2l where
α is independent of l. We verified that this is not the
case by experimentally determining fe2l . We observed
that αl could differ by up to 20% for different l. These
data are recorded in App. H. Therefore, this cancellation
should be credited to the structure of |ϕ⟩⟨0|, namely be-
ing an eigen-operator of Π2l in the restricted subspace, Ψ! 𝜙"
as proven in Theorem 1. If another observable, without
this property, were chosen, any observed noise resilience Ψ! 𝜙#
would have an alternative origin. For example, Ref. [28]
shows a similar contractive property in evaluating the
ratios, but only for noise models that ensure ⟨0|ρnoise |ϕ⟩
is zero, where ρnoise is the noise corrupted part of the
density matrix.
As discussed above, robust shadows have been shown Figure 3: The MAE of estimating overlap amplitudes
to correct for noise in the shadow circuit, assuming and overlap ratios w.r.t. the number of Matchgate
noiseless state preparation [29], or state preparation af- shadow circuits for the water molecule (8 qubits).
fected by global depolarizing noise [1, 28]. In a realis- These results were obtained through numerical
tic setting, the state preparation step may suffer from simulations under single-qubit asymmetric Pauli noise,
more complicated noise which may prevent the tech- where the Pauli-X, Z and Y error rates are set to 1, 3,
nique from recovering the noiseless result. We per- 2%, respectively.
formed numerical simulations to compute overlap ra-
tios for the water molecule in a (4e, 4o) active space (8
qubits). We employed asymmetric Pauli errors as the rectable) state preparation noise. In the case of coherent
noise model in this simulation (including in the state errors
E during state preparation, we effectively prepare
preparation circuit), and we refer to App. H for more de- e T = U |ΨT ⟩ for some unitary U . As such, while
Ψ
tails. The results, shown in Fig. 3 corroborate the anal- ^
⟨Ψ T |ϕi ⟩r
^
⟨Ψ T |ϕi ⟩
ysis provided above. Specifically, we observe from the we would still observe that ^
≈ ^
, neither
⟨ΨT |ϕj ⟩ ⟨ΨT |ϕj ⟩r
upper panel that when computing ⟨Ψ ^T |ϕi ⟩ the results ratio would likely recover the noiseless value.
differ significantly from the noiseless value. In contrast, Overall, the results of this subsection highlight a lim-
when computing ⟨Ψ ^ T |ϕi ⟩r using the robust Matchgate
itation of the robust Matchgate protocol, and its use in
protocol (with compensation for state preparation error) QC-AFQMC. Nevertheless, these results should be seen
we are able to almost recover the noise-free value. We as an attractive feature of QC-AFQMC, as they suggest
attribute the deviation from the noiseless value to the that the algorithm, driven by overlap ratios, is naturally
presence of some residual state preparation error, which resilient to the impact of many types of noise.
violates the assumptions of the robust shadow proto-
col. In contrast, from the lower panel we observe that
the ratios of overlaps evaluated via the robust Match- C. Computing ground states with QC-AFQMC
gate shadow protocol are no more accurate than those
evaluated using the regular Matchgate shadow proto- Having established the inherent noise resilience of the
col. Moreover, both of these values deviate from the overlap ratios that drive the AFQMC algorithm, we
noiseless value by a small error due to residual (uncor- demonstrate that this property contributes to noise re-
9

silience in the overall algorithm. We first compute the in energy as a function of imaginary time for the 0.75
dissociation curve of the four-qubit hydrogen molecule Å geometry. There is little observable difference (∼ 0.1
studied in the previous subsections using the QC- mHa) between the noisy experiment and its noiseless
AFQMC algorithm implemented on the IBM Hanoi su- classical emulation.
perconducting qubit quantum processor. We then apply We further note that even when the state prepara-
the QC-AFQMC algorithm to compute the ground state tion suffers from coherent errors, the QC-AFQMC algo-
of an NV center in diamond, using the Aria trapped ion rithm is still able to recover accurate ground state en-
quantum processor from IonQ. In both settings, we emu- ergies, providing the effective quantum trial state |Ψe T ⟩,
late practical applications of QC-AFQMC by assuming reconstructed from the noisy shadows, does not appre-
a trial state generated by an imperfect VQE calcula- ciably deviate from |ΨT ⟩. This is a result of the dissipa-
tion. In both cases, we use a tailored UCCSD ansatz, tive nature of the imaginary time process emulated by
see App. H, which was optimized until the energy was AFQMC, which will drive any initial state towards the
approximately 30 ∼ 80 mHa higher than the FCI refer- ground state. This further enhances the inherent noise
ence. resilience of the QC-AFQMC algorithm.
We emphasize that even for the hydrogen molecule
in a minimal basis set, executing the QC-AFQMC algo-
1. Hydrogen molecule dissociation rithm using Matchgate shadows requires a substantial
amount of resources, with classical computation domi-
nating over the quantum subroutine. It was necessary to
In Fig. 4 (upper panel) we show the ground state en-
perfectly parallelize the classical AFQMC propagation,
ergies obtained from QC-AFQMC at 5 different molec-
with one walker per CPU core2 (this is only possible
ular geometries. If we target an error ϵ = 10−2 on any
when not using population control). For each walker, it
overlap, with ≥ 99.99% confidence, the rigorous sample
took approximately 1 minute to post-process the shad-
complexity bounds presented in Eq. 5 imply the need to
ows from 16000 circuits in each timestep. As each step
use ∼ 1.1 × 105 shadow circuits (with one measurement
of the AFQMC algorithm must be performed sequen-
shot per circuit). As shown in Fig. 2, it was sufficient to
tially, it could take up to hours or even days to com-
use only 16000 circuits for each bond length, suggesting
plete the full evolution, see App. H for details. This
the bounds of Eq. 5 are overly pessimistic for the small
total runtime partly comes from the large number of
system studied here. Given the noise resilience observed
shadows, which plays the role of a pre-factor and could
in evaluating the overlap ratios, the use of robust shad-
be further improved by implementing additional paral-
ows was not necessary. In our AFQMC calculations,
lelization among the shadows, for example, processing
we used 4800 walkers for all numerical data presented
the shadows corresponding to a single walker in paral-
here to ensure a negligible variance, and a time step
lel across a number of cores, rather than sequentially
∆τ = 0.005 H.a.−1 resulting in a negligible Trotter er-
on the same core. The total runtime also stems from
ror. We chose the initial walker state to be the Hartree-
a scaling as high as O(n8 ) to evaluate the local energy
Fock state, for each of the five distances studied here.
of each walker, which is discussed in detail in App. B.
The calculation was parallelized across 4800 CPU cores
This high cost presents a practical concern for scaling
(1 core per AFQMC walker), as discussed in more detail
this algorithm to larger systems of practical interest.
below.
In the interest of conserving computational resources,
only two of the five data points (solid points) were ob-
2. Nitrogen-vacancy center ground state
tained using the scalable Matchgate shadows approach
outlined above. The remaining three data points were
obtained using an exponentially scaling approach used We applied the QC-AFQMC algorithm to study the
in Ref. [1] and detailed in App. H 1 d, that is ultimately electronic states of a point defect in a solid. We chose
more efficient than the scalable Matchgate approach for the NV center in diamond, which is widely considered
small system sizes. We verified that the two schemes a promising candidate for quantum sensing and has re-
give the same results for overlap amplitudes. Thus, the cently been applied to imaging high-pressure phase tran-
two Matchgate-obtained points are used as a complete sitions [47] and superconducting systems [48]. To obtain
evaluation of the practicality of the algorithm, while the multireference states we employed a quantum defect em-
remaining three points are only presented to confirm the bedding theory (QDET) [49], which allows us to de-
accuracy of the algorithm in the presence of hardware rive an effective Hamiltonian Heff , by defining an active
noise. space, see App. G for details. This effective Hamilto-
We observe that all five QC-AFQMC calculations
converge to within chemical accuracy of the FCI ref-
erence value, even without the use of the robust shadow
2 Intel Xeon Platinum Processor.
protocol. In Fig. 4 (lower panel) we show the variation
10

where a1 , e denotes the irrep of the single-particle orbital


and the bar symbol represents the spin-down channel.
In Ref. [51], a subset of the current authors investigated
this system using VQE and found that error mitigation
techniques were necessary to obtain an accurate ground
state energy. Here, we use the tailored UCCSD ansatz in
App. H as the quantum trial state for our QC-AFQMC
calculations.
In QC-AFQMC, we used 4000 shadow circuits (with
100 shots each), 4800 walkers and an imaginary time
step of ∆τ = 0.4 H.a.−1 . As can be seen from Fig. 5, the
results obtained on quantum hardware (orange curve)
agree with the noiseless reference (blue curve), which
is within our expectation, given the noise resilience dis-
cussed in Sec. III B 2. Both curves converge to the clas-
sical reference FCI limit, which has been renormalized
to zero.

Figure 4: Estimations of the ground state energy of


the hydrogen molecule at 5 different bond distances
(upper). The QC-AFQMC calculation run on the IBM
Hanoi quantum computer (solid and hollow orange
circles labeled “exp.”) converges within chemical
accuracy for all distances (see inset), with a difference
of ∼ 10−4 H.a. from its simulated noiseless counterpart Figure 5: The QC-AFQMC calculation of an NV
(blue crosses). As discussed in the main text, filled center in diamond using a noiseless quantum simulator
circles denote results obtained with the scalable (blue crosses), and the IonQ Aria quantum computer
Matchgate shadows approach, while the empty circles (orange circles). Converged results of both have an
denote results obtained with the non-scalable approach error on the order of 1 meV compared to classical
outlined in App. H 1 d. The quantum trial state is reference. The inset shows an atomistic model of the
obtained from a noisy VQE simulation (purple defect center. Note that the y axis scale is now in eV
diamond). An imaginary time evolution at 0.75 Å is due to the effective Hamiltonian being downfolded.
plotted in the lower panel, where the auxiliary fields
sampled at each time step are synchronized between The computation was again fully parallelized, with
the raw noisy experiment and noiseless reference. one walker per physical CPU core (4800 physical cores
total). The total runtime required for 400 time steps
was approximately 1.5 hours.
nian is used as the starting point of the QC-AFQMC
calculation.
Although it has been shown [50] that a rather large IV. DISCUSSION
active space is needed to fully converge the computed
neutral excitation energies, here we only chose a min- As we discussed in Sec. I, variational algorithms like
imum model of (4e, 3o) to carry out the QC-AFQMC VQE have been the methods of choice for quantum
calculations, as a proof of principle. The ground state chemistry problems on near-term quantum computers.
has a 3 A2 irrep due to the C3v symmetry of the defect The QC-AFQMC scheme discussed here is complemen-
and its wavefunction can be written as tary to VQE. Specifically, QC-AFQMC could be viewed
3 1 as an error mitigation technique for VQE, where both
A2 = √ (|a1 a1 ex ey ⟩ + |a1 a1 ex ey ⟩) , (15)
2 the inaccuracy of the ansatz used and the noise effects
11

Table I: Comparison of different measurement schemes for QC-AFQMC.

Method for computing ⟨ΨT |ϕ⟩ Vacuum reference [20] Clifford shadows [1] Matchgate shadows [2]

Only offline QC access?


log(M n4 /δ ) √
   
log(M n4 /δ )
 
M n4
Circuit sampling complexitya O ϵ2
O ϵ2
O ϵ2
nlogn

Circuit depth complexityb O(NT + n)

Noise-resilient overlap ratios


   
log(M n4 /δ ) log(M n4 /δ )
{⟨ΨT |ϕ⟩} post-processing complexity O(M ) O ϵ2
M exp(n) O ϵ2
M n4.5 logn
   
log(M n4 /δ ) log(M n4 /δ )
{⟨ΨT |H|ϕ⟩} post-processing complexityc O(M n4 ) O ϵ2
M exp(n) O ϵ2
M n8.5
logn

a M in the scaling should be interpreted as the total number of walker states involved in the algorithm. The logarithmic factor
entering the complexities for the shadow-based methods arises from the use of a median-of-means estimator, and is not present in
the heuristic mean estimator used in this work.
b O(NT ) represents the quantum trial state preparation circuit depth complexity. And the |ϕ⟩ preparation, random Clifford, and
Matchgate circuit for the three schemes all scale as O(n) in depth.
c The local energy numerator can be computed by decomposing it into a linear combination of O(n4 ) overlap amplitudes, due to the
complexity of the Hamiltonian. The number of shadow samples required also contributes to the post-processing cost.

would in principle be corrected by imaginary time evo- in the trial, respectively. This can be compared against
lution. In turn, the quantum trial state used in the the complexities of the quantum algorithm, which is
QC-AFQMC algorithm could come from VQE calcula- summarized in Table. I for the three different proposed
tions (in a smaller active space, or for a reduced prob- approaches for measuring the overlap amplitudes. We
lem size). However, one notable difference from the see that the classical algorithms are more efficient in n
VQE ansatz is that the quantum trial preparation cir- than the classical shadows-based quantum algorithms,
cuit needs to satisfy VT |0⟩ = |0⟩, if following the ap- which scale as O(n8.5 log2 n). As such, the quantum trial
proach used in this work. This additional constraint state would need to lead to a much smaller bias than a
prevents the use of some popular ansatz circuits in VQE, classical multi-Slater trial state with a large number of
such as qubit coupled cluster [52], and circuit simplifi- determinants to be practically advantageous. It is cur-
cation techniques [53]. For some ansatz circuits it may rently an open question as to what kind of quantum trial
be possible to circumvent this limitation by introducing state is best suited for QC-AFQMC. The only criterion
another ancilla qubit, and controlling the implementa- adopted so far is the trial state energy ⟨ΨT |H|ΨT ⟩, but
tion of the ansatz (which can often be done by control- there might exist other, better-suited criteria.
ling select gates, rather than every gate), following the
procedure in App. E of Ref. [32]. While Matchgate classical shadows are formally effi-
cient, they introduce a large post-processing cost. This
The possibility of achieving exponential quantum ad- presents a practical challenge for scaling up the QC-
vantage in solving quantum chemistry problems remains AFQMC algorithm to larger system sizes. To high-
controversial [54]. This is arguably not the direct aim light this, in Fig. 6 we present the classical runtime for
of QC-AFQMC, given that phaseless-AFQMC is already post-processing a single timestep of the QC-AFQMC
a polynomially scaling method. Instead, the motivation algorithm, assuming parallelization with 1 CPU core
of ph-QC-AFQMC is that the trial state used may pro- per walker. Numerical results were obtained for hydro-
vide energies with smaller biases than the purely classi- gen and then extrapolated to larger system sizes us-
cal algorithm. A full comparison requires an improved ing the scaling of the QC-AFQMC algorithm. The re-
understanding of the advantages offered by quantum sults show that our implementation of the algorithm is
trial states over classical trial states. As a proxy for only realistic up to eight spin-orbitals (water). Within
this, we could compare the cost of classical methods each CPU, computation associated with postprocess-
using state-of-the-art techniques [55–58], such as Multi- ing the results of each of the shadow circuits can be
Slater trial states. Two popular implementations us- further parallelized. While not investigated in this pa-
ing Wick’s theorem have the following scaling for eval- per, parallelization between shadow circuits can poten-
uating the local energy, O(M Xn3 + M XNc ) [35] and tially speed up the classical runtime. For example, us-
O(M Xn4 + M Nc ) [59], where M, X, Nc are the number ing one million CPU cores [60] would drive the classical
of walkers, Cholesky vectors, and Slater determinants post-processing of benzene toward a realistic regime, of
12

around 6 hours per time step. Nevertheless, for larger V. CONCLUSIONS


systems such as FeMoco, further optimizations in the
algorithm and/or classical post-processing are still re- In this work, we carried out the first end-to-end ex-
quired to become practical. Compared to the classical perimental evaluation of the recently proposed Match-
shadows approach, the Hadamard-test based approach gate shadows [2] powered QC-AFQMC algorithm for
of Ref. [20] reduces the cost of classical post-processing. quantum chemistry [1]. We observed that the algo-
However, this comes at a price of an increased num- rithm is inherently noise robust, which we find to be
ber of quantum circuit repetitions (scaling linearly with a consequence of the natural noise resilience of evalu-
the number of walkers), leading to similar measurement ating overlap ratios via Matchgate shadows. We pro-
bottlenecks as observed for VQE methods [61]. In ad- vided a theoretical explanation for this observed phe-
dition, this approach requires iterative communication nomenon, which also elucidates limitations in recently
between quantum and classical processors, which may proposed robust Matchgate shadow protocols. We also
be subject to latencies. As such, despite the higher clas- developed improvements to those protocols which can
sical post-processing costs of the classical shadow based mitigate state preparation noise, and may be of inde-
approach, we currently view it as the more promising pendent interest. Nevertheless, despite the tantalizing
approach to QC-AFQMC. noise resilience of the algorithm, our optimized practical
implementations have uncovered a number of challenges
to the scalability of the algorithm. Most prominently,
while the Matchgate shadows protocol is asymptotically
efficient, its high degree polynomial scaling for evalu-
FeMoco
ating the local energy necessitates significant parallel
C6H6 compute resources for classical post-processing. We es-
timate that for larger molecules, we would require sig-
Cu2O2(NH3)22+
H2O nificant amounts of classical post-processing, as shown
Cr2 in Fig. 6. As such, future work should focus on de-
H2 veloping new methods for efficiently computing the lo-
cal energy in QC-AFQMC, with lower post-processing
costs. Many open questions remain about the best trial
states to use for QC-AFQMC, and how to ensure non-
vanishing overlaps between the trial state and walker
states. The merits of QC-AFQMC found in this work,
together with these open research questions, motivate
the importance of further study of this algorithm ap-
plied to larger system sizes, on real quantum devices.
Figure 6: Prediction of the runtime estimation of
classical post-processing for a single time step in the
QC-AFQMC algorithm performed on a single CPU
VI. ACKNOWLEDGEMENT
core. These results were extrapolated from the runtime
of post-processing results from hydrogen. We make the
optimistic assumptions that the error thresholds ϵ, δ in We thank Senrui Chen, Steve Flammia, Liang Jiang,
classical shadows do not need to decrease as the system Andrew Zhao, Kianna Wan, William Huggins, Siyuan
size increases. The scaling is dominated by the local Chen, Yu Jin, Guan Wang, and Ji Liu for fruitful discus-
energy estimation. The system sizes are quantified sions. We thank Eric Kessler and Alexander Dalzell for
using active spaces, taken from literature [52, 62–65]. comments on this manuscript. This work was in part
supported by the Next Generation Quantum Science
and Engineering (Q-NEXT) center that develops quan-
Finally, it has been acknowledged [1] and high- tum science and engineering technologies. Q-NEXT is
lighted [66] that the overlap amplitudes ⟨ΨT |ϕ⟩ are ex- supported by the U.S. Department of Energy, Office
pected to decay exponentially with system size. Al- of Science, National Quantum Information Science Re-
though it remains to be explored how inaccuracies in search Centers. This research used resources of the Oak
evaluating each overlap would affect the accuracy of Ridge Leadership Computing Facility at the Oak Ridge
AFQMC [26], this generally means an exponentially National Laboratory, which is supported by the Office
large number of measurements is needed to control the of Science of the U.S. Department of Energy under Con-
uncertainty in estimating these overlaps. Establishing tract No. DE-AC05-00OR22725. We thank the Amazon
the practical viability of QC-AFQMC will require de- Braket team for facilitating the access to IonQ quantum
veloping an improved understanding of these challenges, computers through Amazon Web Service (AWS), and
and their possible solutions. the access to HPC services on AWS. We acknowledge
13

the use of IBM Quantum services for this work and to short-time propagator can be approximated as
advanced services provided by the IBM Quantum Re-
searchers Program. The views expressed are those of the e−∆τ (H−E0 )
authors and do not reflect the official policy or position ∆τ ∆τ
vγ2 − ∆τ
Y
≈ e−∆τ (H0 −E0 ) e− 2 v0
e 2 e 2 v0
of IBM or the IBM Quantum team. γ (A5)
Z
= dxp(x)B(x) + O(∆τ 2 ),

Appendix A: Auxiliary-field quantum Monte Carlo


where we’ve defined
∆τ

∆τ xγ vγ − ∆τ
Y
The auxiliary-field quantum Monte Carlo (AFQMC) B(x) = e− 2 v0
e 2 v0
e . (A6)
algorithm is a stochastic implementation of the imagi- γ

nary time evolution (ITE) process: The constant prefactor is usually left out and p(x) is the
iN multi-variable standard normal distribution. After this
h τ transformation, we have only one-body terms left, and
e−τ (H−E0 ) |ΨI ⟩ = e−∆τ (H−E0 ) |ΨI ⟩, ∆τ = ,
N the original interacting problem is now mapped onto an
(A1) ensemble of non-interacting problems coupled to a set of
where E0 is some approximated ground state energy auxiliary fields. The probability distribution p(x) in the
typically from mean-field calculations. ITE projects out above expression is realized by an ensemble of walkers
the excited state components in the initial state |ΨI ⟩, |ϕl ⟩, which are evolved as
and the true ground state |Ψg ⟩ is ultimately obtained
as long as |ΨI ⟩ is not orthogonal to it. In general, it is |ϕ(i+1) ⟩ = B(x)|ϕ(i) ⟩, (A7)
often as difficult to realize the ITE in Eq. A1 as solving
the time-independent Schrödinger equation. To rem- where the superscript represents the time step. The
edy this challenge, the Hubbard-Stratonovich transfor- walkers in AFQMC are chosen as nonorthogonal Slater
mation [67, 68] can be employed, where the two-body determinants and stay in the manifold of Slater deter-
interaction in the following form is recast into one-body minants S during evolution, due to the Thouless theo-
coupled to an auxiliary field: rem [71, 72]. The ground state is then estimated by a
mixed energy estimator which is exact and can lead to
Z
dx x2
γ
√ considerable simplifications in practice
∆τ
vγ2
e 2 = √ γ e− 2 e ∆τ xγ vγ , (A2)
2π ⟨ΨT |He−N ∆τ (H−E0 ) |ϕ(0) ⟩
E= , (A8)
⟨ΨT |e−N ∆τ (H−E0 ) |ϕ(0) ⟩
where vγ is a matrix that represents a one-body inter-
action, and xγ is the auxiliary field. To achieve that, where |ΨT ⟩, |ϕ(0) ⟩ are the trial state and initial Slater
the Hamiltonian, typically written in second quantized determinant, respectively.
form, has to be rewritten into a Cholesky decomposed So far we haven’t imposed any constraints on the
format evolution of walkers, which is known as free-projection
AFQMC. The only potential systematic error comes
1 X
hij a†i aj + Vijkl a†i a†j al ak
X
H = H0 + from the Trotterization error. However, free-projection
i,j
2 AFQMC is prone to large fluctuations in the estimated
i,j,k,l
(A3) energy because of an asymptotic instability in τ , also
1X 2
= H0 + v 0 − v , known as the phase problem. The phase problem man-
2 γ γ ifests as the phase θl of walkers evolves into the whole
[0, 2π) range during the random walk (e.g., see Fig. 3 in
where H0 is a constant, h, V are the one- and two- Ref. [34] for visualization), and results in the denomina-
tor in Eq. 1, i.e., l wl eiθl approaching 0 exponentially
P
electron integrals, v0 is the modified one-body interac-
tion, vγ = iLγ , and Lγ is the Cholesky vector of the quickly with τ . This problem could be viewed as a gen-
two-body interactions satisfying eralization of the sign problem, see Refs. [33, 34] for a
detailed discussion.
X X Importance sampling is a variance-reduction tech-
Lγ = Lγpq a†p aq , Vijkl = Lγik Lγ∗
lj . (A4)
nique widely used in QMC methods. It’s also employed
pq γ
to control the phase problem in AFQMC. To do that,
we first note that the Eq. A5 still holds up to a complex-
Note that we’ve assumed a mean-field subtraction [33] valued shift x. Therefore it can be modified as:
in the above Hamiltonian. With it, and the second-
order Trotter formula [69, 70]: eA+B ≈ eA/2 eB eA/2 , the p(x) → p(x − x), B(x) → B(x − x). (A9)
14

To find the best x, we first expand Eq. A8 as Algorithm 1 Auxiliary-field quantum Monte Carlo
R QN −1 (N )
1: Input H, E0 , |ΨT ⟩, |ΨI ⟩, number of walkers M , number
k=0 dxk p(xk − xk )⟨ΨT |H|ϕ ⟩ of time steps N , and step size ∆τ . (H will be decom-
E≈ RQ N −1 (N ) posed into L Cholesky vectors.)
k=0 dxk p(xk − xk )⟨ΨT |ϕ ⟩
R QN −1 (N ) 2: for l = 1 to M do
(k) ⟨ΨT |H|ϕ
k=0 dxk p(xk )I(xk , xk , ϕ ) ⟨ΨT |ϕ(N ) ⟩ ⟩ 3:
(0) (0)
|ϕl ⟩ ← |ΨI ⟩, wl ← 1 ▷ Initialize the walker.
= R QN −1 , 4: for k = 1 to N do
(k) )
k=0 dxk p(xk )I(xk , xk , ϕ 5: for γ = 1 to L do
(A10) √ (k−1)
⟨Ψ |v̂ |ϕl ⟩
6: xγ = − ∆τ T γ (k−1)
⟨ΨT |ϕl ⟩
where we’ve defined 7: Sample x according to distribution p(x)
(k) (k−1)
8: |ϕl ⟩ ← B(x − x)|ϕl ⟩. ▷ Update the walker
|ϕ(N ) ⟩ = B(xN −1 − xN −1 ) . . . B(x0 − x0 )|ϕ(0) ⟩, (A11) (k−1)
(k−1) ⟨ΨT |H|ϕl ⟩
9: El ← (k−1) ▷ Compute local energy
⟨ΨT |ϕl ⟩
and an importance function  (k)

⟨ΨT |ϕl ⟩
10: θ ← arg (k−1) ▷ Compute the phase
⟨ΨT |B(x − x)|ϕ⟩ x·x− x2 ⟨ΨT |ϕl ⟩
I(x, x, ϕ) = e 2 . (A12) 11:
(k)
wl ← wl
(k−1)
×
(k−1)
I(x, x, ϕl ) ▷ Update weight
⟨ΨT |ϕ⟩ (N )
(N ) ⟨ΨT |H|ϕl ⟩
12: El ← (N ) ▷ Compute the local energy
By choosing ⟨ΨT |ϕl ⟩
PM (N ) (N )
wl El
√ 13: Output the energy E ← l
⟨ΨT |vγ |ϕ⟩ PM
wl
(N )
xγ = − ∆τ ⟨vγ ⟩, ⟨vγ ⟩ = , (A13) l

⟨ΨT |ϕ⟩
fluctuations
√ in the importance function to first order
Appendix B: Local energy evaluation with classical
in ∆τ is cancelled [33], leading to a more stable ran-
shadows
dom walk. The dynamic shift, usually referred to as
a force bias, modifies the sampling of the auxiliary
fields by shifting the center of the Gaussian distribu- The most time-consuming step in QC-AFQMC is the
tion p(x) according to the overlap ⟨ΨT |ϕ⟩. The impor- evaluation of the local energy. Here we discuss how
tance function can this task is performed in our implementation compati-
 therefore be further
 approximated as
ble with classical shadows. We first note that the local
I(x, x, ϕ) ≈ exp −∆τ (E loc − E0 ) , known as the local
energy formalism. Introducing the force bias into the energy numerator can be rewritten as
importance sampling would solve the instability if B(x) ⟨ΨT |H|ϕ⟩ = ⟨ΨT |Uϕ Uϕ† HUϕ |Φ0 ⟩
were real, which could be true in special cases. For a X X
general phase problem, however, it doesn’t lead to com- = ⟨ΨT |Uϕ |Φrp ⟩⟨Φrp |H̄|Φ0 ⟩ + ⟨ΨT |Uϕ |Φrs rs
pq ⟩⟨Φpq |H̄|Φ0 ⟩
plete control of the phase problem. pr pqsr
To further control the phase problem, the local energy X X
= ⟨ΨT |ϕrp ⟩⟨Φrp |H̄|Φ0 ⟩ + ⟨ΨT |ϕrs rs
pq ⟩⟨Φpq |H̄|Φ0 ⟩,
in the importance function has to be replaced by its real
pr pqsr
part, leading to θl = 0 and wl > 0 in Eq. 1. A phaseless
(B1)
approximation is also adopted as
where H̄ = Uϕ† HUϕ represents the rotated Hamiltonian
I(x, x, ϕl ) ≈ exp −∆τ (Re Elloc − E0 )
 
    and |Φ0 ⟩, |Φrp ⟩(|Φrspq ⟩) denotes the Hartree-Fock state
⟨ΨT |B(x − x)|ϕl ⟩ and its single (double) excited counterpart. We also
× max 0, cos arg ,
⟨ΨT |ϕl ⟩ have |ϕrp ⟩ = Uϕ |Φrp ⟩. The second line in the above equa-
(A14) tion utilizes the resolution of identity and the fact that
Hamiltonian has only up to two-body interactions.
where abrupt phase changes during the random walk The Hamiltonian rotation can be done with O(n5 )
(k)
are now forbidden. The weight is updated as: wl ← operations. In the above equation, the overlap ampli-
(k−1) (k−1)
wl × I(x, x, ϕl ). Combining these techniques tudes ⟨ΨT |ϕrp ⟩, ⟨ΨT |ϕrspq ⟩ can be calculated with Match-
finally resolves the phase problem, and the whole algo- gate shadows each with complexity O(n4 ), as already
rithm is usually referred to as the phaseless AFQMC discussed in the main text. Each matrix element can
(ph-AFQMC). Note that the phaseless approximation be computed using the Slater-Condon rules with com-
also introduces a bias to the mixed energy estimator, plexity O(1). Due to the number of possible excited
which we seek to systematically improve by using quan- Slater determinants, which scales as O(n4 ), the scal-
tum computation in QC-AFQMC. ing of the evaluation of the local energy for each walker
The whole process of the AFQMC algorithm is sum- would therefore scale as O(n8 + n5 + n4 ) = O(n8 ) using
marized in Alg. 1, following the presentation in Ref. [20]. this approach.
15

We also note that there exist other ways to evaluate where g is an element in G, and the random unitaries
the local energy with Matchgate shadows. Sec.V C of U is a unitary representation of G. Applying Schur’s
Ref. [2] proposed an alternative way to evaluate the local lemma, and assuming no multiplicities in U lead to
energy using the Grassmann algebra. In this approach,
the Hamiltonian is first rewritten into the Majorana for-
X tr(MZ Πλ )
M= f λ Πλ , fλ = , (C2)
malism. Then the mixed estimator of each Majorana tr(Πλ )
λ∈RG
operator ⟨ΨT |γS |ϕ⟩ can be estimated in a similar fash-
ion to the overlap amplitude. This approach leads to a where RG are the irreducible representations (irreps) of
scaling between O(n9 ), due to the relevant matrices be- G. The super-operators Πλ ∈ L(L(Hn )) are orthogonal
ing non-invertible, making it slightly less favorable than projectors onto the irreducible subspaces Γλ , and fλ is
the previous approach. the eigenvalue associated with each orthogonal projec-
tor.

Appendix C: Classical shadows revisited


Appendix D: Matchgate shadows
In this section, we’ll revisit classical shadows from a
group representation perspective, which will be useful In this section, we outline the basics of Matchgate
when we include noise effects. We closely follow the shadows, closely following the presentation in Ref. [2].
presentation in Ref. [29]. The Matchgate unitaries are based on the Majorana for-
We start by introducing the notations and conven- malism. For a system of n orbitals, 2n Majorana oper-
tions used throughout these appendices. We consider ators can be defined as
a n-qubit system with Hilbert space Hn . Its dimen-
sion is denoted by d ≡ 2n . All the n-qubit operators γ2j−1 = aj + a†j , γ2j = −i(aj − a†j ), (D1)
(super-operators) live in a vector space defined as L(Hn )
(L(L(Hn ))). For better clarity, we make use of the Li- for j ∈ [n] := {1, . . . , n}. These have qubit representa-
ouville representation of operators and super-operators: tion
   
1. Operators are notated using the double kets |A⟩⟩ = γ2j−1 = Πj−1 j−1
i=1 Zi Xj , γ2j = Πi=1 Zi Yj , (D2)
√ 1 † A for its length d2 vectorization for A ∈
tr(A A)

L(Hn ) and ⟨⟨B|A⟩⟩ := √ tr(B † A)


; under the Jordan-Wigner (JW) transformation [43],
tr(B † B)tr(A† A) where Xi , Yi , Zi are the Pauli operators on qubit i. For
a subset of indices S ⊆ [2n], we denote by γS the prod-
2. Super-operators, written as cursive letters, are uct of the Majorana operators indexed by the elements
mapped to d2 × d2 matrices: any E ∈ L(L(Hn )) in S in ascending order. That is,
can be specified by its matrix elements Eij :=
⟨⟨Bi |E|Bj ⟩⟩, where {|Bi ⟩⟩} is an orthonormal basis γS := γµ1 . . . γµ|S| , (D3)
for L(L(Hn )).
for S = {µ1 , . . . , µ|S| } ⊆ [2n] with µ1 < · · · < µk .
For any unitary U , its corresponding channel is de-
noted by U(·) := U (·)U † . For any |ϕ⟩ ∈ Hn , |ϕ⟩⟩ is
the vectorization of |ϕ⟩⟨ϕ|. And hats indicate statistical 1. Fermionic Gaussian states
estimators, e.g., ô denotes an estimate for o = tr(Oρ).
Classical shadows are based on a simple measurement
primitive: for the quantum state ρ, apply a unitary Matchgate circuits are qubit representations of
U randomly drawn from a distribution of unitaries D fermionic Gaussian unitaries under the JW transforma-
and measure in the computational basis. This produces tion. The fermionic Gaussian unitaries transform be-
measurement outcomes b ∈ {0, 1}⊗n with probability tween valid sets of Majorana operators {γ2j−1 , γ2j }, j ∈
⟨b|U ρU † |b⟩. One then inverts the unitary on the out- [n]. Fermionic Gaussian states are the ground states
come |b⟩ in post-processing, which amounts to storing and thermal states of non-interacting fermionic Hamil-
a classical representation of U † |b⟩. The distribution D, tonians. An n-mode Gaussian state is any state whose
from which the random unitaries U are drawn, usually density operator ϱ can be written as
can be associated with a group G, e.g., random Clifford n
unitaries and the Clifford group. M can be viewed as a
Y 1
ϱ= (I − iλj γ2j−1 γ2j ) , (D4)
twirl of the measurement channel MZ , giving: j=1
2
X
M := E Ug† MZ Ug , MZ = |b⟩⟩⟨⟨b|, (C1) for some coefficients λj ∈ [−1, 1]. If λj ∈ {−1, 1} for all
g∼G
b∈{0,1}n j ∈ [n], then ϱ is a pure Gaussian state; otherwise, ϱ
16

is a mixed state. For any computational basis state |b⟩, where Q belongs to the orthogonal group O(2n). Match-
for example, we have gate circuits form a continuous group Mn which is in
one-to-one correspondence with the orthogonal group
n
Y 1 O(2n), up to a global phase:
I − i(−1)bj γ2j−1 γ2j .

|b⟩⟨b| = (D5)
j=1
2 Mn = {UQ : Q ∈ O(2n)}. (D13)
Ref. [2] considered two distributions: i). “uniform” dis-
A Gaussian state can also be defined by its two-point
tribution over Mn , where uniformity is more precisely
correlations tr(ϱγµ γν ), which is also known as its co-
given by the normalized Haar measure µ on O(2n);
variance matrix. An n-qubit Gaussian state ρ has its
ii). uniform distribution over the discrete Borel group
covariance matrix defined as:
B(2n), which is the intersection of Mn and the n-qubit
i Clifford group Cln . The second consists of 2n×2n signed
(Cρ )µν := − tr([γµ , γν ]ρ) (D6) permutation matrices:
2
Mn ∩ Cln = {UQ : Q ∈ B(2n)}. (D14)
for µ, ν ∈ [2n], which is a 2n×2n antisymmetric matrix.
For any computational basis state |b⟩⟨b| as an example, (j) (j)
For j ∈ Z>0 , we use EMn and EMn ∩Cln to denote the
its covariance matrix is: j-fold twirl channels corresponding to the distributions
n   over Mn and Mn ∩ Cln , respectively:
M 0 (−1)bj
C|b⟩ := . (D7)
Z
(−1)bj +1 0 (j)
EMn := dµ(Q)UQ⊗j
, (D15)
j=1
O(2n)

A Gaussian state which is also an eigenstate of the (j) 1 X ⊗j


EMn ∩Cln := UQ , (D16)
number operator j=1 a†j aj is known as Slater deter-
Pn |B(2n)|
Q∈B(2n)
minant. Any ζ-fermion Slater determinant |φ⟩ can also
where we’ve used the fact that 2-fold Matchgate twirl
be written as
is hermitian [2]. Since the measurement channel M in
n the classical shadows procedure and the variance of the
|ϕ⟩ = a′† ′† ′†
Vkj ak = UV a†j UV† , (D8)
X
1 . . . aζ |0⟩, aj = estimates obtained from the classical shadows are de-
k=1 termined by the 2- and 3-fold twirls, it is necessary to
(j) (j)
compare EMn and EMn ∩Cln up to j = 3.
for some n × n unitary matrix V . Hence a Slater deter-
minant can also be specified by the first ζ columns of Ref. [2] proved that the j-fold twirl channels of these
V . Finally the Majorana operators {γ ′ }µ∈[2n] have the two distributions are equivalent up to j = 3. Thus,
following relation the discrete ensemble of Clifford Matchgate circuits is
a 3-design for the continuous Haar-uniform distribution

X over all Matchgate circuits, in the same way that the
γ2j−1 = [Re(Vjk )γ2j−1 − Im(Vjk )γ2j ] , (D9)
Clifford group is a unitary 3-design [73]. Ref. [2] stated
k
X this result informally as: “The group of Clifford Match-

γ2j = [Im(Vjk )γ2j−1 + Re(Vjk )γ2j ] . (D10) gate circuits forms a ‘Matchgate 3-design’ ”. In the
k implemented Matchgate shadow protocol, we adopt the
latter since it requires less memory to store a random
So the fermionic Gaussian unitary UQ′ that implements signed permutation matrix compared to an orthogonal
this transformation is given by the orthogonal matrix matrix. An additional virtue of sampling in Mn ∩ Cln is
  that Clifford circuits can be randomly compiled to con-
R11 . . . R1n
 .. . .

Re(Vjk ) − Im(Vjk )
 vert coherent errors into incoherent errors [74] (within
′ .
Q = . . ..  , Rjk := Im(Vjk ) Re(Vjk ) .

the shadow circuit), leading to better satisfaction of
Rn1 . . . Rnn the GTM assumption of noise. Our implementation of
(D11) Matchgate circuits is given in App. F.

3. Matchgate channel
2. Matchgate 3-design

The n-qubit Matchgate group Mn has (2n + 1) irreps,


The adjoint action of Fermionic Gaussian unitaries
so we can define correspondingly (2n + 1) subspaces
UQ on the Majorana operators obeys   
[2n]

X Γk := span γS : S ∈ , k ∈ {0, . . . , 2n},
UQ γµ UQ = Qνµ γν , µ ∈ [2n], (D12) k
ν∈[2n] (D17)
17
  S
where [2n]
denotes the set of subsets of [2n] of car- and pairs(T ) is defined as j∈T {2j − 1, 2j}. We only
k
consider the even subspaces for fermionic simulations.
dinality k. Therefore, we have L(Hn ) = ⊕2n k=0 Γk . For Therefore the Matchgate channel is
fermionic simulations, we usually deal with even oper-
ators so we only look at the even subspaces Γeven = Xn 
2n
−1  
n
⊕nl=0 Γ2l . M=
2l l
Π2l . (D24)
Now we can derive the details of the Matchgate chan- l=0
nel, which will serve as the basis for calculations involv-
With the above definitions and properties of fermionic
ing noise presented in the following section. As we dis-
Gaussian transformation, we can finally discuss how to
cussed above, the measurement channel for any shadow
use the Matchgate shadow to compute the desired over-
scheme can be derived by specifying the 2-fold twirl E (2)
lap integrals. The overlap can first be reconstructed as
 
n    −1
(2) 2n n
X
⊗2

M(ρ) = tr1  EMn ∩Cln |b⟩⟨b| (ρ ⊗ I) ,
X
⟨ΨT |ϕ⟩ = 2
b∈{0,1}n
2l l
i (D25)
l=0
(D18) h 

where tr1 denotes the partial trace over the first tensor × E tr |ϕ⟩⟨0|Π2l UQ |b̂⟩⟨b̂|UQ ,
Q∼B(2n)
component. The 2-fold twirl for the Matchgate group
has the following form where the trace involving Π2l correspond to the coeffi-
cient of z l in the following polynomial [2]
2n
(2) (2) (2)
X
EMn ∩Cln = |Υk ⟩⟩⟨⟨Υk |, (D19) iζ/2
k=0 q|ϕ⟩,|b⟩ (z) =
 −1/2 X h2n−ζ/2 i
(2) 2n × pf C|0⟩ + zW ∗ Q′T QT C|b⟩ QQ′ W †

.
|Υk ⟩⟩ = |γS ⟩⟩|γS ⟩⟩. (D20) Sζ
k  
S∈ [2n]
k The pf in the above equation denotes the matrix Pfaf-
fian, and M |S represents matrix M restricted to rows
The standard derivation can be found in Section IV.B
and columns in set S. ζ is the particle number, C|0⟩
in Ref. [2]. For our purpose, we’ll take a shortcut by
denotes the covariance matrix of the vacuum state, and
assuming all the projectors Π2l ∈ L(L(Hn )) are already
Q′ is an orthogonal matrix defined from the Slater de-
known
X terminant |φ⟩ according to Eq. D11. We’ve also defined
Π2l := |γS ⟩⟩⟨⟨γS |, (D21) the W matrix
 
S∈ [2n] ζ   n  
2l M 1 1 −i M 1 0
√ W = √ , (D26)
where we’ve defined |γS ⟩⟩ = γS / 2n , and ⟨⟨γS |γS ′ ⟩⟩ = j=1
2 1 i j=ζ+1 0 1
δSS ′ . We directly start from Eq. C2, and the eigenvalues
are hence computed as and S ζ := [2n]\{1, 3, . . . , 2ζ − 1}. All these coeffi-
cients can be computed using polynomial interpolation
Tr [MZ Π2l ] in O((n − ζ/2)4 ) time, where ζ is the number of elec-
f2l =
Tr [Π2l ] trons.
P  P 2

S∈ [2n] b∈{0,1}n |⟨⟨γS |b⟩⟩|
= P2l  ⟨⟨γ |γ ⟩⟩ 4. Noise resilience
S S

S∈ [2n]
2l
 −1 2
2n X X (−i)|T | P In this subsection, we prove Theorem 1. This result
= √ (−1) j∈T bj serves as the foundation of noise resilience observed in
2l 2n
b∈{0,1}n T ∈ [n] experiments performed on quantum hardware.
 
l
 −1   P
2n n Theorem 1. For an n qubit state |ϕ⟩ = i ci |i⟩ which
= , is a linear combination of computational basis states |i⟩
2l l
with fixed Hamming weight ζ,
(D22)
 
where we’ve used P0,ζ Π2l (|ϕ⟩⟨0|) = b2l |ϕ⟩⟨0|, (11)
1 X P
with
|b⟩⟩ = √ (−i)|T | (−1) j∈T bj |γpairs(T ) ⟩⟩,
2n  [n]  ( n−ζ  ζ ζ
T∈ 2ζ−n l− ζ2
, if 2 ≤l ≤n− 2
l b2l = (12)
(D23) 0, otherwise
18
Pn
such that l=0 b2l = 1. Here P0,ζ denotes the projec- using the definition ofsuper-operators from App. C. The
tor onto the subspace spanned by the Hamming weight set S contains the 2n2l possible Majorana strings formed
zero state |0⟩ and computational basis states of Ham- by choosing 2l Majorana operators acting on n qubits.
ming weight ζ. Recall the qubit representation of Majorana operators
under the Jordan-Wigner transform
Proof. We expand
 X    
j−1 j−1
  
P0,ζ Π2l (|ϕ⟩⟨0|) = ci P0,ζ Π2l (|i⟩⟨0|) . (D27) γ2j−1 = Πi=1 Zi Xj , γ2j = Πi=1 Zi Yj ,
i

By the results of Lemma 1, We refer to ‘connected’ Majorana operators as pairs


  X of the form γk γk+1 = iZ k+1 for k odd. We refer to
P0,ζ Π2l (|ϕ⟩⟨0|) = ci b2l |i⟩ ⟨0| 2
‘unconnected’ Majorana operators as pairs of the form
i (D28) γi γj such that j ̸= i + 1 if i is odd. Unconnected
= b2l |ϕ⟩ ⟨0| Majorana operators take the form γi γj = pi,j Oi Z ⃗ j−1 Oj
i+1
as required. where pi,j ∈ [±1, ±i] and O ∈ [X, Y ], and the
notation Z ⃗ ab := Nb Zk . Hence, observe that con-
k=a
The above result is proved using the following Lemma. nected Majorana operators act as the identity on
The general proof idea is to write |0⟩, while unconnected Majorana operators act as
γi γj |0⟩ = |0...01i 0...01j 0...0⟩ (up to a complex phase).
⟨0| γS† |i⟩ γS .
X
Πζ (|i⟩ ⟨0|) = 2−n (D29) Because each unconnected pair increases the Hamming

S∈ [2n]

weight by 2, we require γS to contain exactly ζ/2
2l unconnected pairs, and all other pairs to be connected
The action of the Majorana strings is to ‘create elec- pairs. If this requirement is not satisfied, ⟨0| γS† |i⟩ = 0.
trons’ in the |0⟩ state. Terms in the sum evaluate to zero
unless ζ electrons are created. For small/large numbers First consider the case 2l < ζ. In this case, γS con-
of Majorana operators in each string, insufficient elec- tains 2l < ζ Majorana operators, and it is impossible
trons are created, and the whole sum evaluates to zero. to form ζ/2 unconnected pairs. Hence, every term in
In the intermediate regime, each Majorana string can be the sum evaluates to zero, and b2l = 0, as required.
divided into two parts; a part that creates ζ electrons
in the correct positions, and a part that contributes an For 2l > 2n − ζ, observe that because the Hamming
ultimately unimportant phase and increases the multi- weight of |i⟩ is ζ, there are (n − ζ) 0’s in |i⟩. After
plicity of a given term. The more interesting part is placing a connected Majorana pair on each of these
the part that creates the electrons, which acts as a pro- 0 qubits, the remaining number of Majorana oper-
jector from an x-electron subspace to an x + ζ electron ators to distribute onto the ζ 1’s in |i⟩ is given by
subspace. The action of projecting into the subspace 2l − 2(n − ζ) > 2n − ζ − 2(n − ζ) = ζ. It is necessary
spanned by the vacuum state and computational basis to place greater than ζ Majorana operators on the ζ
states with Hamming weight ζ retains only terms that qubits. As a result, at least two of the Majorana’s
project from zero electrons to ζ-electrons. Combina- will form a connected pair. This leaves fewer than ζ/2
torics give the desired values of b2l .
unconnected pairs, so ⟨0| γS† |i⟩ = 0. Hence, every term
Lemma 1. Given an n qubit computational ba- in the sum evaluates to zero, and b2l = 0, as required.
sis state |i⟩ with even Hamming weight ζ, then
P0,ζ Π2l (|i⟩ ⟨0|) = b2l |i⟩ ⟨0| with Proving the result for ζ2 ≤ l ≤ n − ζ2 is more in-
volved, and proceeds via explicit calculation. As dis-
n−ζ 
(
2ζ−n l− ζ , if ζ2 ≤ l ≤ n − ζ2 cussed above, terms in the sum are only non-zero if γS
b2l = 2 (D30) contains exactly ζ/2 unconnected pairs. Denote the ζ
0, otherwise
qubits with value 1 in |i⟩ as [i] = [i1 , ..., iζ ], with iα < iβ
where P0,ζ is the projection from onto the subspace if α < β. Denote the remaining (n−ζ) qubits with value
spanned by the vacuum state and computational basis 0 in |i⟩ as [j] = [j1 , ..., jn−ζ ]. Observe that [i] ∩ [j] = ∅.
states with Hamming weight ζ. The only non-zero terms in the sum correspond to
strings with ζ Majorana operators forming ζ/2 uncon-
Proof. First expand nected pairs on [i] and (2l−ζ) Majorana operators form-
ing l − ζ2 connected pairs on [j]. First consider the part
⟨0| γS† |i⟩ γS
X
Πζ (|i⟩ ⟨0|) = 2−n (D31)
  of the string acting on [i]. The string γi1 γi2 ...γiζ can be
S∈ [2n] written as a tensor product of non-overlapping (com-
2l
19

muting) Pauli strings: nected pairs, denote any such choice as [j̄]. The ‘con-
Nl− ζ
nected part’ of the string can be written as k=12 ıZj̄k ,
ζ−1 √
⃗ (ik+1 −1) Oi . where here we have used ı = −1 to avoid confusion
O
pik ,ik+1 Oik Z (ik +1) k+1
(D32)
k=1
with the index i.
k odd
Then explicitly compute the sum over these Majorana
Note that the qubits acted on by Z are not in the set strings (qubits that are not explicitly acted on in the
[i]. Next, consider the part of the string acting on [j]. following expressions are implicitly acted on with the
n−ζ 
There are l− ζ (paired) locations to place the con- identity operator):
2

⟨0| γS† |i⟩ γS


X
Π2l (|i⟩ ⟨0|) = 2−n
 
S∈ [2n]
2l
 †
ζ−1 l− ζ2
⃗ (ik+1 −1) Oi
X X O O
= 2−n ⟨0|  pik ,ik+1 Oik Z ıZj̄η  |i⟩
 
(ik +1) k+1

[j̄]∈(
n−ζ Oi1 ∈[Xi1 Yi1 ] k=1 η=1
l−
ζ ) k odd
2 Oi2 ∈[Xi2 ,Yi2 ]
...
Oiζ ∈[Xiζ ,Yiζ ]
 
ζ−1 l− ζ2
⃗ (ik+1 −1) Oi
O O
× pik ,ik+1 Oik Z ıZj̄η 
 
(ik +1) k+1
k=1 η=1
k odd
l− ζ2
ζ−1 O D E
⃗ (ik+1 −1) Oi Zj̄ 1i 0...01i 0...0j̄
X X O
= 2−n 0ik ...0ik+1 ...0j̄η Oik Z (ik +1) k+1 η k k+1 η

[j̄]∈(
n−ζ
) Oi1 ∈[Xi1 Yi1 ] k=1 η=1
ζ
l−
2 Oi2 ∈[Xi2 ,Yi2 ] k odd
...
Oiζ ∈[Xiζ ,Yiζ ]
 
⃗ (ik+1 −1) Oi Zj̄
× Oik Z (ik +1) k+1 η
  
Oζ−1  l− ζ2
⃗ (ik+1 −1) Oi 
X X O
= 2−n 

0ik 0ik+1 Oik Oik+1 1ik 1ik+1 Oik Z Zj̄η 
 
 (ik +1) k+1  
 
k=1 Oik ∈[Xik Yik ] ) η=1
n−ζ
k odd [j̄]∈( ζ
l−
Oik+1 ∈[Xik+1 ,Yik+1 ] 2

(D33)

where in the first term of the final line we have swapped the order of the sum and tensor product, such that we are
essentially considering ζ/2 copies of states with Hamming weight two. Using the results of Lemma 2, the first term
in the final line above evaluates to

ζ−1 ζ−1
⃗ (ik+1 −1) = 2ζ |i⟩ ⟨0| ⃗ (ik+1 −1)
O O
2
2 |1⟩ ⟨0|ik ⊗ |1⟩ ⟨0|ik+1 ⊗Z (ik +1) [i] [i] Z (ik +1) (D34)
k=1 k=1
k odd k odd

where we use |x⟩[i] to denote the qubits of computational basis state |x⟩ corresponding to the set [i]. Hence, denoting
20

|y| as the Hamming weight of a computational basis state |y⟩,


 
ζ−1 l− ζ2
⃗ (ik+1 −1)
X O O
P0,ζ [Π2l (|i⟩ ⟨0|)] = 2ζ−n P0,ζ |i⟩[i] ⟨0|[i] Z Zj̄η 
 
(ik +1)
[j̄]∈(
n−ζ k=1 η=1
l−
ζ ) k odd
2
 
ζ
ζ−1 l− 2
⃗ (ik+1 −1)
X X O O
= 2ζ−n |x⟩ ⟨x| |i⟩[i] ⟨0|[i] Z Zj̄η  |y⟩ ⟨y|
 
(ik +1)
n−ζ η=1 (D35)
[j̄]∈(
l−
ζ ) |x|,|y|=[0,ζ] k=1
k odd
2
X
= 2ζ−n |i⟩ ⟨0|
n−ζ
[j̄]∈( ζ )
l−
2
 
n−ζ
= 2ζ−n |i⟩ ⟨0|
l − ζ2

Thus for ζ2 ≤ l ≤ n − ζ
2, P0,ζ [Π2l (|i⟩ ⟨0|)] = 1. Robust shadow protocol
n−ζ 
2ζ−n l− ζ |i⟩ ⟨0|, as required.
2
In this part, we review the robust shadow estima-
tion [29], which serves as a basis for robust Matchgate
shadows. Eq. C2 is particularly useful when it comes to
Lemma 2. The sum noise, where the channel is modified by noise as
X
⃗ j−1 Oj
X tr(MZ ΛΠλ )
⟨0i 0j | Oi Oj |1i 1j ⟩ Oi Z i+1 (D36) Mf= feλ Πλ , feλ = , (E1)
tr(Πλ )
Oi ∈[Xi Yi ] λ∈RG
Oj ∈[Xj ,Yj ]
where feλ is the noisy eigenvalue, Λ denotes the
evaluates to noise channel, and we’ve assumed the noise is
gate-independent, time-stationary, and Markovian
⃗ j−1 (GTM) [29]. Within this assumption, the noise-free ex-
22 |1⟩ ⟨0|i ⊗ |1⟩ ⟨0|j ⊗ Z i+1 (D37) pectation values of tr(Oi ρ) could be retrieved by invert-
ing this noisy channel, if ρ is perfectly prepared on quan-
⃗ ab := Nb Zk .
where Z tum computers. To achieve that, {feλ } need to be de-
k=a
termined first, and different measurement schemes have
been designed for that according to the specific group
Proof. Explicitly computing the terms in the sum yields
G used. Such a protocol is known as robust shadow
estimation [29].
⃗ j−1 .
(Xi Xj − Yi Yj − ı(Xi Yj + Yi Xj )) Z (D38)
i+1

Using the decomposition X = (|0⟩ ⟨1| + |1⟩ ⟨0|) and Y = 2. Noisy Matchgate channel
(−ı |0⟩ ⟨1| + ı |1⟩ ⟨0|) yields
In this section we provide derivations for the recently
2 ⃗ j−1 introduced robust Matchgate shadows approach [31, 32].
2 |1⟩ ⟨0|i ⊗ |1⟩ ⟨0|j ⊗ Z i+1 (D39)
Our derivations closely follow previous work on Match-
gate randomized benchmarking [44], highlighting the
as required. close connection between these two topics.
The robust shadow protocol assumes the quantum
noise satisfies the GTM assumption, in which case the
measurement channel is only modified in the eigenval-
Appendix E: Robust Matchgate shadows ues associated with each projector. The idea is therefore
to determine those noisy coefficients feλ and apply the
In this section, we formulate the robust Matchgate noisy inverse channel M f−1 when computing the expec-
shadow protocol, providing an alternative derivation tation values. For the noisy case, we can generalize the
from those in Refs. [31, 32]. derivation for eigenvalues in the noiseless case into
21
 −1
Tr [MZ ΛΠ2l ] 2n X X
fe2l = = ⟨⟨b|Λ|γS ⟩⟩⟨⟨γS |b⟩⟩
Tr [Π2l ] 2l   n
S∈ [2n] b∈{0,1}
2l
−1 2
(−i)|T |

2n X X P
= √ (−1) j∈T bj ⟨⟨γpairs(T ) |Λ|γpairs(T ) ⟩⟩ (E2)
2l 2n
b∈{0,1}n T ∈ [n]
 
l
 −1
2n X
= ⟨⟨γpairs(T ) |Λ|γpairs(T ) ⟩⟩.
2l  
T ∈ [n]
l

To get fe2l , we need to determine ⟨⟨γpairs(T ) |Λ|γpairs(T ) ⟩⟩, nally, all qubits are measured in the Z-basis. By averag-
which corresponds to the diagonal elements of the Liou- ing over many random sequences, we obtain an estimate
ville representation of noise channel Λ in the |γS ⟩⟩ basis. ĉ2l (m) of the weighted average
Interestingly, a recent work on randomized bench-
marking [44] proposed an efficient way to character- 1 X X
c2l (m) = α2l (b, Q)p(b|Q, m),
ize the noise in the quantum hardware by defining and |B(2n)|m
{Q}∈B(2n) b∈{0,1}n
computing a set of Majorana fidelities λk using ran-
(E3)
dom Matchgate circuits. Here we reformulate some of
where Q = Qm . . . Q1 and p(b|Q, m) represents the prob-
their derivations using our established conventions and
ability of measurement outcome |b⟩. A correlation func-
get more insights into the interpretation and connection
tion α2l has also been defined as
between λk and fe2l .
The protocol consists of multiple rounds with vary- h 

i
ing parameters k ∈ [2n] and circuit sequence lengths α2l (b, Q) = tr |b⟩⟨b|Π2l UQ ρ0 UQ . (E4)
m. Due to our focus on fermionic quantum simulations,
we’ll only discuss the case when k is even. Each round We estimate p(b|Q, m) from the measurement outcomes
starts with the preparation of the all-zero state |0⟩. This received from the quantum computer, whereas we com-
is followed by m Matchgate unitaries UQ1 , . . . , UQm , pute α2l (b, Q) analytically. Assuming the state prepa-
chosen uniformly and independently at random. Fi- ration and measurement (SPAM) are perfect, we have

1 X X
c2l (m) = α2l (b, Qm . . . Q1 )⟨⟨b|ΛUQm . . . ΛUQ1 |0⟩⟩
|B(2n)|m
{Q}∈B(2n) b∈{0,1}n
1 X X
⊗2 ⊗2 ⊗2
= ⟨⟨b ⊗ b|(Π2l ⊗ Λ)UQ (I ⊗ Λ)UQ . . . (I ⊗ Λ)UQ |0 ⊗ 0⟩⟩
|B(2n)|m m m−1 1
{Q}∈B(2n) b∈{0,1}n
" 2n
#m−1 2n (E5)
(2) (2) (2) (2)
X X X
⊗2
= ⟨⟨b |(Π2l ⊗ Λ) |Υk′ ⟩⟩⟨⟨Υk′ |(I ⊗ Λ) |Υk′ ⟩⟩⟨⟨Υk′ |0⊗2 ⟩⟩
b∈{0,1}n k′ =0 k′ =0
h im−1
(2) (2) (2) (2)
X
= ⟨⟨b⊗2 |(I ⊗ Λ)|Υk ⟩⟩ ⟨⟨Υk |(I ⊗ Λ)|Υk ⟩⟩ ⟨⟨Υk |0⊗2 ⟩⟩.
b∈{0,1}n

(2) (2)
Ref. [44] defined the term ⟨⟨Υk |(I ⊗ Λ)|Υk ⟩⟩ as the m = 1 and have
Majorana fidelities λ2l . We also note that the first term X (2) (2)
in the last line is exactly what we’ve derived in Eq. E2 c2l (1) = ⟨⟨b⊗2 |(I ⊗ Λ)|Υk ⟩⟩⟨⟨Υk |0⊗2 ⟩⟩
if we assume SPAM error-free. Therefore, we choose b∈{0,1}n
 −1
2n X X 2
= ⟨⟨b|γS ⟩⟩⟨⟨b|Λ|γS ⟩⟩⟨⟨γS ′ |0⟩⟩
2l
b∈{0,1}n S,S ′ ∈ [2n]
 
2l
 −1   X
1 2n n
= n ⟨⟨γpairs(T ) |Λ|γpairs(T ) ⟩⟩
2 2l l  
T ∈ [n]
l
 
1 n e
= n f2l .
2 l
22

We now have established the relationship between c2l


and fe2l . Therefore the noisy eigenvalues can be ex- 108
tracted either by fitting c2l (m) or simply measuring
c2l (1). For m other than 1, we have:
106
 (m−1)
 2n −1 104
  X
calibration

c2l (m) = c2l (1) 
 ⟨⟨γS |Λ|γS ⟩⟩ ,
2l 
N4
 
S∈ [2n]
2l 102
(E7) N3
which provides a microscopic origin for λ2l .
In actual hardware experiments, SPAM error is un- 101 102
avoidable. For measurement error, it satisfies the GTM system size n
assumption for noisy shadows and therefore it’s not a
concern. For state preparation error, its effect is ab- Figure 7: Sampling complexity for determining the
sorbed into the c2l (1) prefactor [44] above, by replacing Matchgate channel coefficients scales closely to O(n3 ).
|0⟩⟩ with |0⟩
e ⟩ in the first equality of Eq. E5. We further
note that the state preparation error in the shadow ex-
periments, i.e., the noise effects in preparing ρ can also Appendix G: Quantum defect embedding theory
be taken into account in the above framework, as long
as we could mimic as much as possible the state prepa-
ration circuit in determining fe2l . This sets the motiva- Quantum embedding theories [76] are frameworks to
tion for the revised robust Matchgate shadow protocol solve the time-independent Schrödinger equation for
introduced in Sec. III A. We note that if the state prepa- a system of electrons by separating the problem into
ration noise channel Λ′ commutes with the twirl M, i.e., the calculation of the energy levels or density of an
Λ′ ◦ M = M ◦ Λ′ , our revised scheme would correct the active space and those of the remaining environment.
state preparation error perfectly, assuming Λ′ satisfies Each part of the system is described at the quantum-
the GTM assumption. However, this condition may not mechanical level, with the active space being treated
be strictly satisfied in hardware. with a more accurate and computationally more expen-
sive theoretical method than the environment.
Recently, a Green’s function-based quantum embed-
ding theory was proposed for the calculation of defect
3. Variance bound properties in solids, denoted as quantum defect embed-
ding theory (QDET). We’ll provide a high-level descrip-
The variance of c2l (m), defined in Eq. E3, is impor- tion of this method in this section, and we direct inter-
tant to determine the efficiency of the robust protocol. ested readers to Refs. [49, 77] for more details. Similar
A detailed derivation can be found in the Appendix of to other Green’s function-based methods, in QDET the
Ref. [32, 44], assuming no noise. active space is defined by a set of single particle elec-
We numerically test the sampling complexity to de- tronic states. The set includes the states localized in
termine fe2l , as shown in Fig. 7, and find that it scales proximity of the defect or impurity. Within QDET, one
closely to O(n3 ). The complexity comes from bound- constructs an effective Hamiltonian in second quantiza-
ing the variance relative to fn , the smallest coefficient tion which operates on the active space, using a poten-
among all the eigenvalues in the n-qubit Matchgate tial that includes the effect of the environment through
channel. an effective many-body screening term. The Hamilto-
nian is solved using a full configuration interaction (FCI)
approach, thus including correlation effects between the
electronic states of the active space. In essence, us-
Appendix F: Implementation of Matchgate shadows ing QDET one can reduce the complexity of evaluating
many-body states of a small guest region embedded in
The Matchgate circuits are constructed using the a large host system: the problem is reduced to diago-
open source code located at [75], which requires O(n2 ) nalizing a many-body Hamiltonian simply defined on an
gates implemented in O(n) depth. Note that the cur- active space, where the number of degrees of freedom is
rent implementation assumes an even number of parti- much smaller than that required to describe the entire
cles in the system studied. A generalization into odd- supercell of hundreds of atoms.
particle cases can be addressed with ancillary qubits, as In this work, we used QDET to describe strongly
discussed in App. A of Ref. [2]. correlated electronic states of the NV center that are
23

not properly described by single-determinant wavefunc- c. Robust shadow experiments


tions, and hence by DFT. The detailed information of
classical calculations is documented in Ref. [50].
The noise determination phase (to measure fe2l ) and
standard shadow experiments are performed employing
Appendix H: Quantum simulation details
16000 circuits each on the same set of physical qubits
on the same day, to ensure the noise condition stays
the same. Note that the original proposal of shadow
In this section, we provide detailed information on tomography [19] assumes using a single shot for each
quantum simulations performed in this work, on both shadow circuit. For better use of the quantum resources,
quantum hardware platforms and on simulators that can we followed Ref. [46] and all the circuits are executed
emulate the effects of noise.
with 1024 shots. The circuit used for determining fe2l
only differs in the absence of the first Hadamard gate
1. IBM Q experiments for hydrogen from the Matchgate shadow circuits used to compute
the overlap. This construction ensures that the noise
in preparing ρ for QC-AFQMC algorithm is captured
The hydrogen molecule is simulated using 4 qubits on
as much as possible in computing fe2l . The measured
the IBM Quantum Hanoi superconducting qubit device.
values of fe2l are summarized in Table. III.
Having determined the values of fe2l , one can proceed
a. Quantum trial state to apply the robust Matchgate shadows procedure to
overlaps, and overlap ratios. In the main text, we plot-
As we introduced in the main text, the quantum trial ted the mean absolute error (MAE) of 120 overlap ratios
state adopted in the QC-QMC scheme has to satisfy two w.r.t. the number of Matchgate shadow circuits used,
requirements: i). VT |ΨI ⟩ = |ΨT ⟩; ii). VT |0⟩ = |0⟩. This and observed that the robust protocol was able to mit-
implies the conservation of the particle number of the igate the effects of noise. Here, we plot the MAE of 36
initial states. We therefore chose the UCCSD ansatz. separate overlap ratios, randomly chosen from the total
The issue with conventional UCCSD ansatz is that the of 120 tested in the main text, shown in Fig. 9. We
circuit is too deep, with a O(n4 ) two-qubit gate count, can conclude that the noise resilience is present for each
and this is usually beyond the capabilities of NISQ hard- trial, and is not an artifact of averaging.
ware. We, therefore, designed an alternative circuit,
shown in Fig. 8, that constructs effectively a double ex-
citation. Such a circuit assumes only linear connectiv- d. Classical post-processing
ity of the underlying hardware and doesn’t require any
swap of the physical qubits.
As discussed in the main text, in the interest of con-
serving computational resources, only two of the five
|0⟩ H data points (solid points) in Fig. 4 were obtained using
the scalable Matchgate shadows approach. The remain-
|0⟩ ing three data points were obtained using an exponen-
fSWAP(θ) UQ
tially scaling approach used in Ref. [1] that is ultimately
|0⟩
more efficient than the scalable Matchgate approach for
|0⟩ small system sizes. We verified that the two schemes
give the same results for overlap amplitudes. This ex-
ponentially scaling approach works by first computing
Figure 8: Quantum circuit for the performing and tabulating the local energies and overlap amplitudes
Matchgate shadows of hydrogen. The first Hadamard for all of the canonical computational basis states (of
and CNOT gate generates an equal superposition of which there are 4 for hydrogen). The overlap amplitudes
|0⟩ and |ΨI ⟩. They are followed by the effective and local energies of arbitrary walker states can then be
UCCSD ansatz, and the Matchgate circuit UQ for computed by decomposing the Slater determinant into
shadow tomography. a linear combination of the 4 basis states of hydrogen,
and then taking the corresponding linear combination
of the tabulated data. For small molecules like hydro-
gen, this yields a very efficient simulation. However, for
b. Hardware information larger molecules an arbitrary Slater determinant would
decompose into a number of canonical computational
The information of the physical qubits used on IBM basis states scaling superpolynomially with n, render-
Q Hanoi device is recorded in Table. II. ing this method unscalable.
24

Table II: IBM Q Hanoi hardware information, with data taken from IBM Quantum Platform.

Oct.1st Oct.2nd Oct.14th


physical qubits [1,2,3,5] [1,2,3,5] [6,7,10,12]
T1 [µs] [132, 139, 156, 159] [185, 114, 129, 130] [137, 101, 112, 227]
T2 [µs] [145, 266, 35, 199] [175, 164, 33, 198] [157, 252, 215, 262]
CNOT error rate (10−3 ) [3.25, 11.6, 4.71] [3.20, 8.26, 6.38] [7.58, 5.58, 6.30]
X error rate (10−4 ) [4.0, 1.3, 2.1, 1.8] [3.4, 1.8, 2.0, 2.2] [2.5, 2.2, 2.4, 1.8]
Readout error rate (10−2 ) [2.1, 1.7, 1.0, 0.07] [1.1, 1.2, 1.1, 0.08] [2.0, 1.2, 0.09, 1.6]

101
10 1

101
10 1
Mean Absolute Error (MAE)

101
10 1

101
10 1

101
10 1

101
10 1

102 103 104 102 103 104 102 103 104 102 103 104 102 103 104 102 103 104
Exp. RShadow (SP) Noiseless
# shadow circuits
Figure 9: The mean absolute error (MAE) of 36 overlap ratios randomly selected from the tested 120 overlap
ratios’ pool. For each overlap ratio, noisy results from IBM Hanoi, w/wo the robust shadow correction (orange
circle/green triangle) are all in good agreement with the noiseless reference value (blue cross). This verifies the
noise resilience discussed in the main text.

2. IonQ experiments for NV center a. Quantum trial state

The NV center in diamond is simulated using 4 qubits Since the ground state of NV center is an equal super-
on the IonQ Aria trapped ion quantum computer. position of two Slater determinants [51], we can gener-
25

Table III: Data of the noisy eigenvalues of the 4-qubit with all-to-all qubit connectivity. The average readout
Matchgate channel, with experiments performed on fidelity is 99.55%. Detailed information about the de-
the IBM Q Hanoi device on Oct 1st, 2nd and 14th. vice can be found on the IonQ website.
These noisy eigenvalues are used for the robust shadow
protocol considering the state preparation error (SP).
Specifically, shadows of hydrogen bond distance 0.75 Å
are collected on Oct 14th; shadows for 2.25 Å are
obtained on Oct 1st while the shadows for the rest
three are obtained on Oct 2nd. 3. Noisy simulations of the water molecule

IBM Q Hanoi Oct.1st Oct.2nd Oct.14th


physical qubits [1,2,3,5] [1,2,3,5] [6,7,10,12] The water molecule is a more strongly correlated
fe0 1.0 1.0 1.0
problem than hydrogen, with more than one correlated
pair of electrons. We simulated it at equilibrium geom-
fe2 0.1083 0.1146 0.1030
etry with a (4e, 4o) active space based on the Hartree
fe4 0.0629 0.0649 0.0565
Fock canonical orbitals, following Ref. [52], using 8
fe6 0.0961 0.1042 0.0940
qubits on the Pennylane quantum simulator [78] with
fe8 0.6461 0.7121 0.6417
various noise models. The 8 qubits are associated with
each orbital according to ascending order in energy with
spin-up and down alternations.
alize the quantum trial state we used for the hydrogen
molecule and apply it to the NV case. The circuit is
shown in Fig. 10.

|0⟩ H
a. Quantum trial state
fSWAP(θ)
|0⟩
ÛQ
Since the water molecule has a perfect pairing of elec-
|0⟩
trons in the ground state, we consider a parameterized
|0⟩ quantum circuit employing a 4-qubit double-excitation
gate UDE (θ):
Figure 10: Quantum circuit for the performing
Matchgate shadows of NV center. The first Hadamard  
θ
 
θ
and CNOT gate generates an equal superposition of UDE (θ)|1100⟩ = cos |1100⟩ − sin |0011⟩.
2 2
|0⟩ and |ΨI ⟩. They are followed by the effective
(H1)
UCCSD ansatz, and the Matchgate circuit UQ for
This gate is implemented between qubit indexed
shadow tomography.
[0, 1, 4, 5], [2, 3, 6, 7], [1, 2, 7, 4], [0, 3, 6, 5]. These in-
dices are chosen because they construct those Slater de-
terminants with the largest coefficients from a CASCI
calculation. This ansatz is then fed to a (noiseless) VQE
b. Hardware information calculation to produce a wavefunction with an energy
error of approximately 10 mHa at the equilibrium ge-
The IonQ Aria device has an average of 99.97% single- ometry. This state is then used as the trial state in the
qubit gate fidelity and 98.6% two-qubit gate fidelity, subsequent (noisy) QC-AFQMC simulations.

[1] W. J. Huggins, B. A. O’Gorman, N. C. Rubin, D. R. [3] X. Lin, X. Li, and X. Lin, A review on applications of
Reichman, R. Babbush, and J. Lee, Unbiasing fermionic computational methods in drug screening and design,
quantum monte carlo with a quantum computer, Nature Molecules 25, 1375 (2020).
603, 416 (2022). [4] N. P. King, W. Sheffler, M. R. Sawaya, B. S. Vollmar,
[2] K. Wan, W. J. Huggins, J. Lee, and R. Babbush, Match- J. P. Sumida, I. André, T. Gonen, T. O. Yeates, and
gate shadows for fermionic quantum simulation, Com- D. Baker, Computational design of self-assembling pro-
munications in Mathematical Physics , 1 (2023). tein nanomaterials with atomic level accuracy, Science
336, 1171 (2012).
26

[5] S. Hammes-Schiffer and G. Galli, Integration of theory [22] A. Montanaro and S. Stanisic, Accelerating varia-
and experiment in the modelling of heterogeneous elec- tional quantum monte carlo using the variational
trocatalysis, Nature Energy 6, 700 (2021). quantum eigensolver, arXiv preprint arXiv:2307.07719
[6] W. Kohn, A. D. Becke, and R. G. Parr, Density func- 10.48550/arXiv.2307.07719 (2023).
tional theory of electronic structure, Journal of Physical [23] G. Mazzola, Quantum computing for chemistry and
Chemistry 100, 12974 (1996). physics applications from a monte carlo perspective,
[7] T. Helgaker, P. Jorgensen, and J. Olsen, Molecular The Journal of Chemical Physics 160 (2024).
electronic-structure theory (John Wiley & Sons, 2013). [24] S. Kanno, H. Nakamura, T. Kobayashi, S. Gocho,
[8] W. Foulkes, L. Mitas, R. Needs, and G. Rajagopal, M. Hatanaka, N. Yamamoto, and Q. Gao, Quan-
Quantum monte carlo simulations of solids, Reviews of tum computing quantum monte carlo with hybrid ten-
Modern Physics 73, 33 (2001). sor network toward electronic structure calculations of
[9] B. M. Austin, D. Y. Zubarev, and W. A. Lester Jr, large-scale molecular and solid systems, arXiv preprint
Quantum monte carlo and related approaches, Chemical arXiv:2303.18095 10.48550/arXiv.2303.18095 (2023).
Reviews 112, 263 (2012). [25] M. Amsler, P. Deglmann, M. Degroote, M. P. Kaicher,
[10] M. Troyer and U.-J. Wiese, Computational complex- M. Kiser, M. Kühn, C. Kumar, A. Maier, G. Sam-
ity and fundamental limitations to fermionic quantum sonidze, A. Schroeder, et al., Classical and quan-
monte carlo simulations, Physical Review Letters 94, tum trial wave functions in auxiliary-field quantum
170201 (2005). monte carlo applied to oxygen allotropes and a cubr2
[11] A. Aspuru-Guzik, A. D. Dutoi, P. J. Love, and M. Head- model system, The Journal of Chemical Physics 159,
Gordon, Simulated quantum computation of molecular 10.1063/5.0146934 (2023).
energies, Science 309, 1704 (2005). [26] M. Kiser, A. Schroeder, G.-L. R. Anselmetti, C. Ku-
[12] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, mar, N. Moll, M. Streif, and D. Vodola, Classical and
X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. quantum cost of measurement strategies for quantum-
O’brien, A variational eigenvalue solver on a photonic enhanced auxiliary field quantum monte carlo, New
quantum processor, Nature Communications 5, 4213 Journal of Physics 26, 033022 (2024).
(2014). [27] A. Zhao, N. C. Rubin, and A. Miyake, Fermionic par-
[13] M. Motta, C. Sun, A. T. Tan, M. J. O’Rourke, E. Ye, tial tomography via classical shadows, Physical Review
A. J. Minnich, F. G. Brandao, and G. K.-L. Chan, De- Letters 127, 110504 (2021).
termining eigenstates and thermal states on a quantum [28] M. Scheurer, G.-L. R. Anselmetti, O. Oumarou,
computer using quantum imaginary time evolution, Na- C. Gogolin, and N. C. Rubin, Tailored and externally
ture Physics 16, 205 (2020). corrected coupled cluster with quantum inputs, arXiv
[14] J. P. Misiewicz and F. A. Evangelista, Implemen- preprint arXiv:2312.08110 10.48550/arXiv.2312.08110
tation of the projective quantum eigensolver on a (2023).
quantum computer, arXiv preprint arXiv:2310.04520 [29] S. Chen, W. Yu, P. Zeng, and S. T. Flammia, Robust
10.48550/arXiv.2310.04520 (2023). shadow estimation, PRX Quantum 2, 030348 (2021).
[15] U. Baek, D. Hait, J. Shee, O. Leimkuhler, W. J. Hug- [30] D. E. Koh and S. Grewal, Classical shadows with noise,
gins, T. F. Stetina, M. Head-Gordon, and K. B. Wha- Quantum 6, 776 (2022).
ley, Say no to optimization: A nonorthogonal quantum [31] A. Zhao and A. Miyake, Group-theoretic error mitiga-
eigensolver, PRX Quantum 4, 030307 (2023). tion enabled by classical shadows and symmetries, arXiv
[16] S. E. Smart and D. A. Mazziotti, Accelerated conver- preprint arXiv:2310.03071 10.48550/arXiv.2310.03071
gence of contracted quantum eigensolvers through a (2023).
quasi-second-order, locally parameterized optimization, [32] B. Wu and D. E. Koh, Error-mitigated fermionic clas-
Journal of Chemical Theory and Computation 18, 5286 sical shadows on noisy quantum devices, npj Quantum
(2022). Information 10, 39 (2024).
[17] H. R. Grimsley, G. S. Barron, E. Barnes, S. E. [33] M. Motta and S. Zhang, Ab initio computations of
Economou, and N. J. Mayhall, Adaptive, problem- molecular systems by the auxiliary-field quantum monte
tailored variational quantum eigensolver mitigates carlo method, Wiley Interdisciplinary Reviews: Compu-
rough parameter landscapes and barren plateaus, npj tational Molecular Science 8, e1364 (2018).
Quantum Information 9, 19 (2023). [34] S. Zhang, 15 auxiliary-field quantum monte carlo for
[18] S. Wang, E. Fontana, M. Cerezo, K. Sharma, A. Sone, correlated electron systems, Emergent Phenomena in
L. Cincio, and P. J. Coles, Noise-induced barren Correlated Matter (2013).
plateaus in variational quantum algorithms, Nature [35] A. Mahajan and S. Sharma, Taming the sign problem
Communications 12, 6961 (2021). in auxiliary-field quantum monte carlo using accurate
[19] H.-Y. Huang, R. Kueng, and J. Preskill, Predicting wave functions, Journal of Chemical Theory and Com-
many properties of a quantum system from very few putation 17, 4786 (2021).
measurements, Nature Physics 16, 1050 (2020). [36] J. R. McClean, J. Romero, R. Babbush, and A. Aspuru-
[20] X. Xu and Y. Li, Quantum-assisted monte carlo algo- Guzik, The theory of variational hybrid quantum-
rithms for fermions, Quantum 7, 1072 (2023). classical algorithms, New Journal of Physics 18, 023023
[21] Y. Zhang, Y. Huang, J. Sun, D. Lv, and X. Yuan, Quan- (2016).
tum computing quantum monte carlo, arXiv preprint [37] A. K. Ekert, C. M. Alves, D. K. Oi, M. Horodecki,
arXiv:2206.10431 10.48550/arXiv.2206.10431 (2022). P. Horodecki, and L. C. Kwek, Direct estimations of lin-
ear and nonlinear functionals of a quantum state, Phys-
27

ical Review Letters 88, 217901 (2002). [55] H. Q. Pham, R. Ouyang, and D. Lv, Scalable
[38] J. Helsen and M. Walter, Thrifty shadow estimation: quantum monte carlo with direct-product trial
Reusing quantum circuits and bounding tails, Physical wave functions, arXiv preprint arXiv:2306.15186
Review Letters 131, 240602 (2023). 10.48550/arXiv.2306.15186 (2023).
[39] S. Aaronson and D. Gottesman, Improved simulation of [56] Y. Chen, L. Zhang, W. E, and R. Car, Hybrid aux-
stabilizer circuits, Physical Review A 70, 052328 (2004). iliary field quantum monte carlo for molecular sys-
[40] E. Tang, A quantum-inspired classical algorithm for rec- tems, Journal of Chemical Theory and Computation
ommendation systems, in Proceedings of the 51st an- 10.1021/acs.jctc.3c00038 (2023).
nual ACM SIGACT symposium on theory of computing [57] J. L. Weber, H. Vuong, R. A. Friesner, and D. R.
(2019) pp. 217–228. Reichman, The design of new practical constraints in
[41] G. H. Low, Classical shadows of fermions with parti- auxiliary-field quantum monte carlo, arXiv preprint
cle number symmetry, arXiv preprint arXiv:2208.08964 arXiv:2306.09207 10.48550/arXiv.2306.09207 (2023).
10.48550/arXiv.2208.08964 (2022). [58] J. Shee, J. L. Weber, D. R. Reichman, R. A. Fries-
[42] B. O’Gorman, Fermionic tomography and learning, ner, and S. Zhang, On the potentially transformative
arXiv preprint arXiv:2207.14787 (2022). role of auxiliary-field quantum monte carlo in quantum
[43] E. Wigner and P. Jordan, Über das paulische äquivalen- chemistry: A highly accurate method for transition met-
zverbot, Z. Phys 47, 46 (1928). als and beyond, The Journal of Chemical Physics 158,
[44] J. Helsen, S. Nezami, M. Reagor, and M. Walter, Match- 10.1063/5.0134009 (2023).
gate benchmarking: Scalable benchmarking of a con- [59] A. Mahajan and S. Sharma, Efficient local energy eval-
tinuous family of many-qubit gates, Quantum 6, 657 uation for multi-slater wave functions in orbital space
(2022). quantum monte carlo, The Journal of Chemical Physics
[45] T. E. O’Brien, S. Polla, N. C. Rubin, W. J. Huggins, 153, https://doi.org/10.1063/5.0025055 (2020).
S. McArdle, S. Boixo, J. R. McClean, and R. Babbush, [60] B. Posey, C. Gropp, B. Wilson, B. McGeachie, S. Padhi,
Error mitigation via verified phase estimation, PRX A. Herzog, and A. Apon, Addressing the challenges of
Quantum 2, 020317 (2021). executing a massive computational cluster in the cloud,
[46] Y. Zhou and Q. Liu, Performance analysis of multi-shot in 2018 18th IEEE/ACM International Symposium on
shadow estimation, Quantum 7, 1044 (2023). Cluster, Cloud and Grid Computing (CCGRID) (2018)
[47] S. Hsieh, C. Zu, T. Mittiga, T. Smart, F. Machado, pp. 253–262.
B. Kobrin, T. Höhn, N. Rui, et al., Imaging stress and [61] J. F. Gonthier, M. D. Radin, C. Buda, E. J. Doskocil,
magnetism at high pressures using a nanoscale quantum C. M. Abuan, and J. Romero, Measurements as a road-
sensor, Science 366, 1349 (2019). block to near-term practical quantum advantage in
[48] P. Bhattacharyya, W. Chen, X. Huang, S. Chatterjee, chemistry: Resource analysis, Phys. Rev. Res. 4, 033154
B. Huang, B. Kobrin, Y. Lyu, T. Smart, M. Block, (2022).
E. Wang, et al., Imaging the meissner effect in hy- [62] S. McArdle, S. Endo, A. Aspuru-Guzik, S. C. Benjamin,
dride superconductors using quantum sensors, Nature and X. Yuan, Quantum computational chemistry, Re-
, 1 (2024). views of Modern Physics 92, 015003 (2020).
[49] N. Sheng, C. Vorwerk, M. Govoni, and G. Galli, Green’s [63] J. Goings, L. Zhao, J. Jakowski, T. Morris, and
function formulation of quantum defect embedding the- R. Pooser, Molecular symmetry in vqe: A dual approach
ory, Journal of Chemical Theory and Computation 18, for trapped-ion simulations of benzene, in 2023 IEEE
3512 (2022). International Conference on Quantum Computing and
[50] B. Huang, N. Sheng, M. Govoni, and G. Galli, Quantum Engineering (QCE), Vol. 2 (IEEE, 2023) pp. 76–82.
simulations of fermionic hamiltonians with efficient en- [64] R. J. Anderson, T. Shiozaki, and G. H. Booth, Effi-
coding and ansatz schemes, Journal of Chemical Theory cient and stochastic multireference perturbation theory
and Computation 19, 1487 (2023). for large active spaces within a full configuration inter-
[51] B. Huang, M. Govoni, and G. Galli, Simulating the elec- action quantum monte carlo framework, The Journal of
tronic structure of spin defects on quantum computers, Chemical Physics 152, 10.1063/1.5140086 (2020).
PRX Quantum 3, 010339 (2022). [65] M. Reiher, N. Wiebe, K. M. Svore, D. Wecker, and
[52] I. G. Ryabinkin, T.-C. Yen, S. N. Genin, and A. F. Iz- M. Troyer, Elucidating reaction mechanisms on quan-
maylov, Qubit coupled cluster method: a systematic ap- tum computers, Proceedings of the National Academy
proach to quantum chemistry on a quantum computer, of Sciences 114, 7555 (2017).
Journal of Chemical Theory and Computation 14, 6317 [66] G. Mazzola and G. Carleo, Exponential challenges
(2018). in unbiasing quantum monte carlo algorithms with
[53] C. Hempel, C. Maier, J. Romero, J. McClean, T. Monz, quantum computers, arXiv preprint arXiv:2205.09203
H. Shen, P. Jurcevic, B. P. Lanyon, P. Love, R. Bab- 10.48550/arXiv.2205.09203 (2022).
bush, et al., Quantum chemistry calculations on a [67] J. Hubbard, Calculation of partition functions, Physical
trapped-ion quantum simulator, Physical Review X 8, Review Letters 3, 77 (1959).
031022 (2018). [68] R. Stratonovich, On a method of calculating quantum
[54] S. Lee, J. Lee, H. Zhai, Y. Tong, A. M. Dalzell, A. Ku- distribution functions, in Soviet Physics Doklady, Vol. 2
mar, P. Helms, J. Gray, Z.-H. Cui, W. Liu, et al., Eval- (1957) p. 416.
uating the evidence for exponential quantum advantage [69] H. F. Trotter, On the product of semi-groups of opera-
in ground-state quantum chemistry, Nature Communi- tors, Proceedings of the American Mathematical Society
cations 14, 1952 (2023). 10, 545 (1959).
28

[70] M. Suzuki, Relationship between d-dimensional quan- scalable quantum computing on a noisy superconduct-
tal spin systems and (d+1)-dimensional ising systems: ing quantum processor, Phys. Rev. X 11, 041039 (2021).
Equivalence, critical exponents and systematic approx- [75] A. Zhao, Fermionic classical shad-
imants of the partition function and spin correlations, ows, https://github.com/zhao-andrew/
Progress of theoretical physics 56, 1454 (1976). symmetry-adjusted-classical-shadows (2023).
[71] D. J. Thouless, Stability conditions and nuclear rota- [76] Q. Sun and G. K.-L. Chan, Quantum embedding theo-
tions in the hartree-fock theory, Nuclear Physics 21, ries, Accounts of Chemical Research 49, 2705 (2016).
225 (1960). [77] H. Ma, N. Sheng, M. Govoni, and G. Galli, Quantum
[72] D. Thouless, Vibrational states of nuclei in the random embedding theory for strongly correlated states in ma-
phase approximation, Nuclear Physics 22, 78 (1961). terials, Journal of Chemical Theory and Computation
[73] H. Zhu, Multiqubit clifford groups are unitary 3-designs, 17, 2116 (2021).
Physical Review A 96, 062336 (2017). [78] V. Bergholm, J. Izaac, M. Schuld, C. Gogolin,
[74] A. Hashim, R. K. Naik, A. Morvan, J.-L. Ville, S. Ahmed, V. Ajith, M. S. Alam, G. Alonso-Linaje,
B. Mitchell, J. M. Kreikebaum, M. Davis, E. Smith, B. AkashNarayanan, A. Asadi, et al., Pennylane: Auto-
C. Iancu, K. P. O’Brien, I. Hincks, J. J. Wallman, matic differentiation of hybrid quantum-classical com-
J. Emerson, and I. Siddiqi, Randomized compiling for putations, arXiv preprint arXiv:1811.04968 (2018).

You might also like