Main

The complexity of finding an accurate solution of the Schrödinger equation seemingly grows exponentially with the number of electrons in the system. This fact has greatly hindered progress towards an efficient means of accurately calculating ground-state quantum mechanical properties of complex systems. Over the last century, substantial research effort has been devoted to the development of new algorithms for solution of this many-electron problem. At present, all available general-purpose methods can be grouped into two categories: (1) methods that scale exponentially with system size while yielding numerically exact answers, and (2) methods for which the cost scales polynomially with system size, but that are only approximate by construction. Approaches in this second category are the only methods that can feasibly be applied to large systems at present. The accuracy of the solutions obtained by these methods is often unsatisfactory and is almost always difficult to assess.

Quantum computing has arisen as an alternative model for the calculation of quantum properties that may complement, and potentially surpass, classical methods in terms of efficiency9,10. Although the ultimate ambition of this field is to construct a universal fault-tolerant quantum computer11, the experimental devices of today are limited to noisy intermediate-scale quantum (NISQ) computers12. NISQ algorithms for the computation of ground states have largely centred around the variational quantum eigensolver (VQE) framework7,8, which necessitates coping with optimization difficulties, measurement overhead and circuit noise. As an alternative, algorithms based on imaginary-time evolution have been put forward, which, in principle, avoid the optimization problem13,14. However, because of the non-unitary nature of imaginary-time evolution, one must resort to heuristics to achieve reasonable scaling with system size. New strategies that avoid these limitations may help to enable the first practical quantum advantage in fermionic simulations. In this work, we propose and experimentally demonstrate a class of quantum-classical hybrid algorithms that offer a different route to addressing these challenges. We do not attempt to represent the ground-state wavefunction using our quantum processor, choosing instead to use it to guide a quantum Monte Carlo (QMC) calculation performed on a classical coprocessor. Using this approach, our experimental demonstration surpasses the scale of previous experimental work on quantum simulation in chemistry15,16,17.

Theory and algorithms

QMC approaches5,6 target the exact ground-state wavefunction, \(|{\Psi }_{0}\rangle \), of a many-body Hamiltonian, \(\hat{H}\), via imaginary-time evolution of an initial state \(|{\Phi }_{0}\rangle \) with a non-zero overlap with \(|{\Psi }_{0}\rangle \):

$$|{\varPsi }_{0}\rangle \propto \mathop{\mathrm{lim}}\limits_{\tau \to \infty }|\varPsi (\tau )\rangle ,|\varPsi (\tau )\rangle \equiv {{\rm{e}}}^{-\tau \hat{H}}|{\varPhi }_{0}\rangle ,$$
(1)

where \(\tau \) is imaginary time and \(|\Psi (\tau )\rangle \) denotes the time-evolved wavefunction from \(|{\Phi }_{0}\rangle \) by τ (Fig. 1a). In QMC, the imaginary-time evolution in equation (1) is implemented stochastically, which can enable a polynomial scaling algorithm to sample an estimate for the exact ground-state energy by avoiding the explicit storage of high-dimensional objects, such as \(\hat{H}\) and \(|{\Psi }_{0}\rangle \). The ground-state energy, \({E}_{{\rm{ground}}}=E(\tau =\infty )\), is estimated from averaging a time series of \(\{{E}^{(i)}(\tau )\}\), given by a weighted average over M statistical samples,

$$\langle E(\tau )\rangle =\mathop{\sum }\limits_{i=1}^{M}{w}_{i}(\tau ){E}^{(i)}(\tau ),$$
(2)

where E(i)(τ) is the ith statistical sample for the energy and wi(τ) is the corresponding normalized weight for that sample at imaginary time τ. Although formally exact, such a stochastic imaginary-time evolution algorithm will generically run into the fermionic sign problem18, which manifests as a result of alternating signs in the weights of each statistical sample used in equation (2). In the worst case, the fermionic sign problem causes the estimator of the energy in equation (2) to have exponentially large variance (Fig. 1b, top), necessitating that one averages exponentially many samples so as to obtain a target precision. Accordingly, exact, unbiased QMC approaches are only applicable to small systems19,20,21 or those lacking a sign problem22.

Fig. 1: Imaginary-time evolution, sign problem and our quantum-classical hybrid algorithm.
figure 1

a, Depiction of the imaginary-time evolution, which shows an exponential convergence to the ground state as a function of imaginary time, τ. b, Illustration of the fermionic sign problem. Exact deterministic imaginary-time evolution and an unconstrained QMC calculation, which is exact on average but has a signal-to-noise ratio that diverges with increasing τ due to the sign problem (top). Constrained QMC calculations with classical and quantum constraints. The use of quantum constraint helps to reduce the bias that is non-negligible when using the classical constraint (bottom). c, Overview of the QC-QMC algorithm. Stochastic wavefunction samples, represented as \({\{|{\varphi }_{i}\rangle \}}_{\tau }\), are evolved in time along with associated weights {wi}τ. Throughout the time evolution, queries to the quantum processor about the overlap value between the quantum trial wavefunction \(|{\Psi }_{\text{T}}\rangle \) and a stochastic wavefunction sample \({\{|{\varphi }_{i}\rangle \}}_{\tau }\) are made while updating the gate parameters to describe \({\{|{\varphi }_{i}\rangle \}}_{\tau }\). Our quantum processor uses N qubits to efficiently estimate the overlap, which is then used to evolve wi and to discard stochastic wavefunction samples with wi < 0. Finally, observables, such as \(\langle E(\tau )\rangle \), are computed on the classical computer using overlap queries to the quantum processor (Supplementary Section C).

The sign problem can be controlled to give an estimator of the ground-state energy with polynomially bound variance by imposing constraints on the imaginary-time evolution of each statistical sample represented by a trial wavefunction, \(|{\varphi }_{i}(\tau )\rangle \). These constraints (which include prominent examples such as the fixed node6,23 and phaseless approximations24,25) are imposed by demanding that the overlaps of the trial wavefunction \((|{\Psi }_{\text{T}}\rangle \rangle )\) (where T denotes trial) with the stochastic samples \((|{\varphi }_{i}(\tau )\rangle )\) remain positive during the imaginary-time propagation. Although constrained QMC calculations are typically much more accurate than those using the bare trial wavefunction directly (Fig. 1b, bottom), the remaining bias of the constrained QMC results is wholly determined by the choice of the trial wavefunction. Imposing these constraints necessarily introduces a potentially significant bias in the final ground-state energy estimate, which can be removed in the limit that the trial wavefunction approaches the exact ground state. Alternatively, the bias can be removed by releasing the constraints during propagation, at the expense of suffering an uncontrolled sign problem26.

Classically, computationally tractable options for trial wavefunctions are limited to states such as a single mean-field determinant (for example, a Hartree–Fock state), a linear combination of mean-field states, a simple form of the electron–electron pair (two-body) correlator (usually called a Jastrow factor) applied to mean-field states or some other physically motivated transformations applied to mean-field states, such as backflow approaches27. On the other hand, any wavefunction that can be prepared with a quantum circuit is a candidate for a trial wavefunction on a quantum computer, including more general two-body correlators. These trial wavefunctions will be referred to as ‘quantum’ trial wavefunctions.

At present, there is no efficient classical algorithm to estimate (to additive error) the overlap between \(|{\varphi }_{i}(\tau )\rangle \) and various quantum trial wavefunctions \(|{\Psi }_{\text{T}}\rangle \), such as unitary coupled-cluster with singles and doubles28, qubit coupled-cluster methods29, wavefunctions constructed by adiabatic state preparation30 or the multiscale entanglement renormalization ansatz31. This is true even when \(|{\varphi }_{i}(\tau )\rangle \) is simply a computational basis state or a Slater determinant. As quantum computers can efficiently approximate \(\langle {\Psi }_{T}|{\varphi }_{i}(\tau )\rangle \), there is a potential quantum advantage in this task, as well as its particular use in QMC. This offers a different route towards quantum advantage in ground-state fermion simulations compared with VQE, which instead seeks an advantage in the variational energy evaluation. We expand on this discussion of quantum advantage in Supplementary Section F.

Our quantum-classical hybrid QMC algorithm (QC-QMC) utilizes quantum trial wavefunctions while performing the majority of imaginary-time evolution on a classical computer, and is summarized in Fig. 1c. In essence, on a classical computer one performs imaginary-time evolution for each wavefunction statistical sample, \(|{\varphi }_{i}(\tau )\rangle \), and collects observables such as the ground-state energy estimate, \({E}^{(i)}(\tau )\). During this procedure, a constraint associated with the quantum trial wavefunction is imposed to control the sign problem. To perform the constrained time evolution, the only quantity that needs to be calculated on the quantum computer is the overlap between the trial wavefunction, \(|{\Psi }_{\text{T}}\rangle \), and the statistical sample of the wavefunction at imaginary time τ, \(|{\varphi }_{i}(\tau )\rangle \). Although our approach applies generally to any form of constrained QMC, here we discuss an experimental demonstration of the algorithm that uses an implementation of QMC known as auxiliary-field QMC (AFQMC), which will be referred to as QC-AFQMC (see Methods for more details). As a single determinant mean-field trial wavefunction is the most widely used classical form of the trial function for AFQMC owing to its efficiency, here we use ‘AFQMC’ to denote AFQMC with a mean-field trial wavefunction.

Discussion

As the first example, in Fig. 2 we illustrate the quantum primitive used to perform the experiment on an H4 molecule involving 8 qubits (see Methods for more details). Our eight spin-orbital quantum trial wavefunction consists of a valence bond wavefunction known as a perfect pairing state32,33 and a hardware-efficient quantum circuit15 with an offline single-particle rotation, which would be classically difficult to use as a trial wavefunction for AFQMC. The state preparation circuit in Fig. 2a shows how this trial wavefunction can be efficiently prepared on a quantum computer.

Fig. 2: 8-qubit experiment.
figure 2

a, Circuit used for the 8-qubit H4 experiment over a 2 × 4 qubit grid (from Q1,1 to Q2,1) on the Sycamore quantum processor43. In the circuit diagram, H denotes the Hadamard gate, G denotes a Givens rotation gate (generated by XX + YY), P denotes a single-qubit Clifford gate and \(|{\Psi }_{\text{T}}\rangle \) denotes the quantum trial wavefunction. Note that the ‘offline’ orbital rotation is not present in the actual quantum circuit because it is handled via classical post-processing, as discussed in Supplementary Section C. b, c, Convergence of the atomization energy of H4 as a function of the number of measurements. A minimal basis set (STO-3G) with four orbitals total from four independent experiments (exp.) (b) and a quadruple-zeta basis set (cc-pVQZ) with 120 orbitals total from two independent experiments (c). The different symbols in b and c show independent experimental results. Note that the ideal (that is, noiseless) atomization energy of the quantum trial (Q. trial) in b is precisely on top of the exact one and that the QC-AFQMC energy would likewise be exact in the absence of noise. For the system in c, QC-AFQMC with this quantum trial would yield an error of 0.2 kcal mol−1 despite a much larger error in the variational energy of the quantum trial. Further note that the quantum resource used in c is 8 qubit, but, as shown in Supplementary Section C, our algorithm enables the addition of ‘virtual’ electron correlation in a much larger Hilbert space. The top panels of b and c magnify the energy range near the exact answer. See Extended Data Tables 18 for the raw data for b, c, as well as other relevant data.

Source data

In this 8-qubit experiment, we consider H4 in a square geometry with side lengths of 1.23 Å and its dissociation into four hydrogen atoms. This system is often used as a test bed for electron correlation methods in quantum chemistry34,35. We perform our calculations using two Gaussian basis sets: the minimal (STO-3G) basis set36 and the correlation consistent quadruple-zeta (cc-pVQZ) basis set37. The latter basis set is of the size and accuracy required to make a direct comparison with laboratory experiments. When describing the ground state of this system, there are two equally important, degenerate mean-field states. This makes AFQMC with a single mean-field trial wavefunction highly unreliable. In addition, a method often referred to as a ‘gold standard’ classical approach (that is, coupled-cluster with singles, doubles and perturbative triples, CCSD(T)38) also performs poorly for this system.

In Table 1, the difficulties of AFQMC and CCSD(T) are well illustrated by comparing their atomization energies with exact values in two different basis sets. Both approaches show errors that are significantly larger than ‘chemical accuracy’ (1 kcal mol−1). The variational energy of the quantum trial reconstructed from experiment has a bias that can be as large as 33 kcal mol−1. The noise on our quantum device makes the quality of our quantum trial far from that of the ideal (that is, noiseless) ansatz, as shown in Fig. 2b, c, resulting in an error as large as 10 kcal mol−1 in the atomization energy. Nonetheless, QC-AFQMC reduces this error significantly, and achieves chemical accuracy in both bases. Notably, we achieve this accuracy even in the larger basis, where the variational energy of the quantum trial in the absence of noise is far from exact.

Table 1 Atomization energy (kcal mol−1) of H4

As shown in Supplementary Section C, for the larger basis set we obtain a residual ‘virtual’ correlation energy by using the quantum resources on a smaller number of orbitals to unbias an AFQMC calculation on a larger number of orbitals, with no additional overhead to the quantum computer. This capability makes our implementation competitive with state-of-the-art classical approaches. Similar virtual correlation energy strategies have been previously discussed within the framework of VQE39, but, unlike our approach, those strategies come with a significant measurement overhead. To unravel the QC-AFQMC results on H4 further, in Fig. 2b, c we illustrate the evolution of trial and QC-AFQMC energies as a function of the number of measurements made on the device. Despite the presence of significant noise in approximately 105 measurements, QC-AFQMC achieves chemical accuracy while coping with a sizeable residual bias in the underlying quantum trial.

Next, we move to a larger example, N2, which requires a total of 12 qubits in our quantum experiment. Here a simpler quantum trial is usedfor QC-AFQMC by taking just the valence bond part of the wavefunction depicted in Fig. 2a. We examine the potential energy surface of N2 from compressed to elongated geometries, which is another common benchmark problem for classical quantum chemistry methods35,40. In Fig. 3a, the QC-AFQMC result is shown for the calculations performed in a triple-zeta basis (cc-pVTZ) set37, which corresponds to a 60-orbital or 120-qubit Hilbert space. All examined methods, CCSD(T), AFQMC and QC-AFQMC, perform well near the equilibrium geometry, but CCSD(T) and AFQMC deviate from the exact results significantly as the bond distance is stretched. As a result, the error for ‘gold standard’ CCSD(T) can be as large as 14 kcal mol−1, and the error for AFQMC with a classical trial wavefunction can be as large as −8 kcal mol−1. The error in the QC-AFQMC computation ranges from −2 kcal mol−1 to 1 kcal mol−1 depending on the bond distance. Thus, although we do not achieve chemical accuracy with QC-AFQMC, we note that, even with a simple quantum trial wavefunction, we produce energies that are competitive with state-of-the-art classical approaches. Idealized (that is, noiseless) VQE experiments for the same trial wavefunction would yield similar results to our quantum trial results Fig. 3a (within 4.5 kcal mol−1), which are much worse than our QC-AFQMC results with an error as large as 50 kcal mol−1.

Fig. 3: 12-qubit and 16-qubit experiments.
figure 3

a, Circuit layout showing spin-up and spin-down qubits for the 12-qubit experiment (top). Potential energy surface of N2 in a triple-zeta basis set (cc-pVTZ37; 60 orbital) (bottom). The relative energies are shifted to zero at 2.25 Å. Inset shows the error in total energy relative to the exact results in kcal mol−1. The shaded region in the inset shows the bounds for chemical accuracy (1 kcal mol−1). Neither the variational energy of the quantum trial nor the statistical error bars of the AFQMC methods are visible on this scale. b, Circuit layout showing spin-up and spin-down qubits for the 16-qubit experiment (top). Error in total energy as a function of lattice constant of diamond in a double-zeta basis (DZVP-GTH; 26 orbitals) (bottom). The shaded region shows the bounds for chemical accuracy. Our quantum trial results are not visible on this scale. Inset shows a supercell structure of diamond in which two highlighted atoms form the minimal unit cell. See Extended Data Tables 910 for the raw data for ab, respectively.

Source data

Finally, we present a 16-qubit experiment result for the ground-state simulation of a minimal unit cell (two-atom) model of periodic solid diamond in a double-zeta basis set (DZVP-GTH41; 26 orbitals). Although at this level of theory the model exhibits significant finite-size effects and does not predict the correct experimental lattice constant, we aim to illustrate the utility of our algorithm in materials science applications. We emphasize that this is the largest quantum simulation of chemistry on a quantum processor so far (detailed resource counts and comparison with prior works are available in Extended Data Tables 11, 12). We again use the simple perfect pairing state as our quantum trial wavefunction and demonstrate the improvement over a range of lattice parameters compared with classical AFQMC and CCSD(T) in Fig. 3b. There is a substantial improvement in the error going from AFQMC to QC-AFQMC, showing the increased accuracy due to better trial wavefunctions. At the same time, QC-AFQMC performed using the idealized quantum trial produces results comparable to our experimental energies, suggesting that the error in our QC-AFQMC energies is mainly due to the use of an insufficiently accurate trial wavefunction rather than experimental error. Our accuracy is limited by the simple form of our quantum trial and yet we achieve accuracy nearly on a par with the classical gold standard method, CCSD(T).

Conclusion and outlook

In summary, we propose a scalable, noise-resilient quantum-classical hybrid algorithm that seamlessly embeds a special-purpose quantum primitive into an accurate quantum computational many-body method, namely QMC. Our work offers a computational strategy that effectively unbiases fermionic QMC approaches by leveraging state-of-the-art quantum information tools. We have realized this algorithm for a specific QMC algorithm known as AFQMC, and demonstrated its performance in experiments as large as 16 qubit on a NISQ processor, producing electronic energies that are competitive with state-of-the-art classical quantum chemistry methods. Our algorithm also enables the incorporation of the electron correlation energy outside the space that is handled by the quantum computer without increasing quantum resources or measurement overheads. In Supplementary Section F, we discuss issues related to asymptotic scaling and the potential for quantum advantage in our algorithm. Although we have yet to achieve practical quantum advantage over available classical algorithms, the flexibility and scalability of our proposed approach in the construction of quantum trial functions, and its inherent noise resilience, promise a path forward for the simulation of chemistry in the NISQ era and beyond.

Note added in proof: After this work was nearly complete, a theory paper by Yang et al. appeared on arXiv42, describing a quantum algorithm for assisting real-time dynamics with unconstrained QMC.

Methods

Wavefunction overlap estimation

In this work, we estimate the overlap between the trial wavefunction and the statistical samples using a technique known as shadow tomography43,44. Experimentally, this entails performing randomly chosen measurements of a reference state related to \(|{\Psi }_{\text{T}}\rangle \) before beginning the QMC calculation, yielding the representation of \(|{\Psi }_{\text{T}}\rangle \) in the computational basis for subsequent overlap evaluations. In this formulation of QC-QMC, there is no need for the QMC calculation to iteratively query the quantum processor, despite the fact that the details of the statistical samples are not determined in advance. By disentangling the interaction between the quantum and classical computer we avoid feedback latency, an appealing feature on early NISQ platforms that comes at the cost of requiring potentially expensive classical post-processing (see Supplementary Section D for more details). Furthermore, our algorithm naturally achieves some degree of noise robustness, as explained in Supplementary Section D, because the quantity directly used in QC-QMC is the ratio between overlap values, which is inherently resilient to the estimates of the overlaps being rescaled. We highlight the challenges posed by the need to measure wavefunction overlaps precisely and the trade-offs involved in the use of shadow tomography (see also Supplementary Section D), while giving our perspective on the most promising paths forward.

Phaseless constraints in AFQMC

In AFQMC, the \(|{\varphi }_{i}(\tau )\rangle \) take the form of Slater determinants in arbitrary single-particle bases, enabling us to express the energy estimator (presented in Supplementary equation (3)) in terms of a modest number of wavefunction overlaps that we can evaluate efficiently on the quantum processor (Supplementary Section C). The phaseless constraint is imposed to control the sign problem and, likewise, only requires calculating the overlaps between \(|{\Psi }_{\text{T}}\rangle \) and \(|{\varphi }_{i}(\tau )\rangle \), as detailed in Supplementary equation (6). AFQMC has been shown to be accurate in a number of cases even with classically available trial wavefunctions45,46; however, the bias incurred from the phaseless constraint cannot be overlooked.

Quantum processor

The experiments in this work were carried out on the Google 54-qubit quantum processor known as Sycamore47. The circuits were compiled using hardware-native conditional Z gates with typical error rates of ≈0.5% (ref. 48).