Ground-state energy estimation of the water molecule on a trapped ion quantum computer
Yunseong Nam Jwo-Sy Chen Neal C. Pisenti Kenneth Wright Conor Delaney Dmitri Maslov Kenneth R. Brown Stewart Allen Jason M. Amini Joel Apisdorf Kristin M. Beck Aleksey Blinov Vandiver Chaplin Mika Chmielewski Coleman Collins Shantanu Debnath Andrew M. Ducore Kai M. Hudek Matthew Keesan Sarah M. Kreikemeier Jonathan Mizrahi Phil Solomon Mike Williams Jaime David Wong-Campos Christopher Monroe Jungsang Kim













nam@ionq.co
IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA
 
IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA
  
National Science Foundation, Alexandria, VA 22314, USA
 
IonQ, Inc., College Park, MD 20740, USA
Department of Electrical and Computer Engineering, Duke University, Durham, NC 27708, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA
 
IonQ, Inc., College Park, MD 20740, USA
 
IonQ, Inc., College Park, MD 20740, USA
  
IonQ, Inc., College Park, MD 20740, USA
Joint Quantum Institute and Department of Physics, University of Maryland, College Park, MD 20742, USA
 
IonQ, Inc., College Park, MD 20740, USA
 
IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA
 
IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA

IonQ, Inc., College Park, MD 20740, USA
Joint Quantum Institute and Department of Physics, University of Maryland, College Park, MD 20742, USA

kim@ionq.co
IonQ, Inc., College Park, MD 20740, USA
Department of Electrical and Computer Engineering, Duke University, Durham, NC 27708, USA










Quantum computing leverages the quantum resources of superposition and entanglement to efficiently solve computational problems considered intractable for classical computers.
Examples include calculating molecular and nuclear structure, simulating strongly-interacting electron systems, and modeling aspects of material function.
While substantial theoretical advances have been made in mapping these problems to quantum algorithms, there remains a large gap between the resource requirements for solving such problems and the capabilities of currently available quantum hardware. 
Bridging this gap will require a co-design approach, where the expression of algorithms is developed in conjunction with the hardware itself to optimize execution.
Here, we describe a scalable co-design framework for solving chemistry problems on a trapped ion quantum computer, and apply it to compute the ground-state energy of the water molecule.
The robust operation of the trapped ion quantum computer yields energy estimates with errors approaching the chemical accuracy, which is the target threshold necessary for predicting the rates of chemical reaction dynamics.




Ground-state energy estimation of the water molecule on a trapped ion quantum computer
    Jungsang Kim
    Received ... 2018/ Accepted ?
======================================================================================




Quantum computation has attracted much attention for its potential to solve certain computational problems that are difficult to tackle with classical computers.
For example, integer factorization<cit.>, unsorted database search<cit.>, and the simulation of quantum systems<cit.> admit quantum algorithms that outperform the best-known classical algorithms given a sufficiently large problem size.
However, these algorithms require substantial quantum resources to achieve a practical advantage over classical techniques, limiting their near-term utility on noisy intermediate-scale quantum (NISQ) devices<cit.> that are severely limited in the number of gates they can perform before errors dominate the output.
Any useful quantum computation on a NISQ device will require further advances in hardware performance, as well as advances in algorithmic design.

Quantum chemistry is a promising application where quantum computing might overcome the limitations of known classical algorithms, hampered by an exponential scaling of computational resource requirements. One of the most challenging tasks in quantum chemistry is to determine molecular energies to within  chemical accuracy, defined to be the target accuracy necessary to estimate chemical reaction rates at room temperature and generally taken to be ≈[per-mode=symbol]4 = 1.6e-3 Hartree (Ha)<cit.>.
Achieving chemical accuracy would allow computational methods to replace costly experimental procedures in chemical and materials engineering, augmenting these fields to accelerate the pace of discovery.

Early quantum computational techniques to simulate many-body Fermi systems<cit.> or calculate molecular energies<cit.> 
have dramatically improved over the past decade<cit.>, but the resource requirements for useful chemical simulations still remain out of reach<cit.>.
Hybrid approaches might relax these requirements, where a short quantum computation serves as a subroutine to calculate classically difficult quantities.  
The variational quantum eigensolver (VQE) method is one example, which estimates the ground state of a system by positing an ansatz state defined by a set of variational parameters and minimizing its energy.
The quantum subroutine determines the energy for a particular set of ansatz parameters, and a classical optimization algorithm iteratively updates the ansatz to reduce the energy until it converges.
Early demonstrations of the VQE method have been performed on different quantum architectures<cit.>, but they rely on dramatic simplifications that work for small molecules but do not readily generalize to larger systems.
Additionally, systematic errors in the experimental results far exceed chemical accuracy due to imperfections in the quantum computer (QC) hardware.

Here, we provide a generic VQE approach that scales to much larger molecular systems and use it to compute the ground-state energy of the water molecule (H_2 O).
We embrace co-design principles to fully optimize the quantum circuits for a trapped-ion QC, and experimentally compute the first three correction terms beyond the mean-field (Hatree-Fock) approximation.  We achieve computational errors approaching chemical accuracy for the first time, without using any error mitigation techniques.
These results establish a path for future computations on more complex systems as trapped-ion QCs continue to improve, eventually reaching beyond the capability of classical methods.




§ TRAPPED-ION QUANTUM COMPUTER





The trapped-ion system used in this study is a scalable, general-purpose programmable QC constructed at IonQ, Inc.<cit.> and illustrated schematically in Fig. <ref>a; see Methods for additional details.
The computer consists of a linear chain of ^171Yb^+ ions on a surface trap operating at room temperature, where the qubit is implemented between the |0⟩≡ |F=0, m_F=0⟩ and the |1⟩≡ |F=1, m_F=0⟩ hyperfine levels of the ^2S_1/2 ground state of each ion, split by 12.6<cit.>.

The qubit register is initialized to the |0⟩ state using optical pumping, and measured at the end of the computation by state-dependent fluorescence on the dipole-allowed cycling transition between | 1 ⟩ and the ^2P_1/2 excited state<cit.>. 
Scattered photons from the ions during detection are collected through a high numerical aperture lens (NA≈ 0.6) and passed through a dichroic mirror to an array of photon detectors for simultaneous readout of the entire qubit register. 
State preparation and measurement (SPAM) errors are routinely characterized during computation, with typical data for a three-ion chain shown in Fig. <ref>b. Our system exhibits a small asymmetry in the SPAM error for |0⟩ versus |1⟩ (0.6% and 1.3%, respectively), which is well understood from an atomic model of the detection process<cit.>. 
We observe no evidence of measurement crosstalk where the state of one qubit affects the readout of neighboring qubits, which allows SPAM correction to be performed with low overhead. 
SPAM errors can be readily improved by increasing the collection efficiency of the detection optics<cit.>.

Quantum gates are implemented via two-photon Raman transitions driven by two laser beams from a mode-locked pulsed laser at 355, where the two laser beams generate a beatnote close to the qubit  frequency<cit.>.
One of the beams is a “global” beam, with a wide profile that uniformly illuminates all qubits in the chain.
The other is an array of tightly focused beams, generated from a diffractive optical element and a multi-channel acousto-optic modulator (AOM), that address the ions individually.
By controlling the phase, frequency, and amplitude of these beams, we can manipulate individual qubits to implement arbitrary quantum logic gates<cit.>. 
The AOM in our system has 32 independent channels, allowing us to scale the number of individually addressable and fully-connected qubits to this number.  
Further scaling is possible with alternative optical setups or by sacrificing full connectivity and using ion-shuttling protocols<cit.>.

We drive high-fidelity single-qubit operations with a resonant Raman transition between |0⟩ and |1⟩ using a composite pulse sequence<cit.>. 
Two-qubit operations are mediated by the shared motional modes of the entire chain via an effective -Ising interaction using the Mølmer-Sørensen protocol<cit.>, and can be written in terms of Pauli X matrices on ions i and j as (θ) = exp[-iθσ_x^iσ_x^j/2].
Since the motional modes involve every ion in the chain, we can apply the  gate between arbitrary pairs of ions with comparable speed and fidelity<cit.>. 
This native all-to-all connectivity of  two-qubit gates in the trapped ion QC provides complete flexibility to choose qubit mappings and gate configurations that maximize  circuit performance on the hardware. 
Under typical operating conditions for this QC, the single-qubit gate fidelity can be maintained ≳ 99.9%, and the state fidelity of a maximally entangling (π/2) gate is ≳ 96%.
We estimate the fidelity of “small-angle”  gates by concatenating  (π/2n) gates n times to approximate a full (π/2) gate.
The state fidelity ℱ is measured, and we estimate the per-gate error to be ϵ≲ (1 - ℱ)/n.
We show an example in Fig. <ref>c for n=50, and calculate ϵ≲4e-3 for the (π/100) gate.
In general, small-angle  gates have higher fidelities in a trapped-ion QC than maximally entangling  gates, which can be used to improve the quality of a quantum computation.







§ MOLECULAR MODELING






We choose H_2  O as a testbed for  quantum co-design principles.
The structure of H_2  O is sufficiently complex to develop and test universal techniques for scalable quantum circuit synthesis, while simple enough to be accessible by currently available trapped-ion QCs.
Simulations using classical hardware provide fully verified solutions to assess the performance of the quantum hardware, and build intuition about successful co-design strategies.
What follows is a brief summary of the VQE co-design methodology, with further details supplied in the Methods.


We first write down a Hamiltonian under the Born-Oppenheimer approximation, where the atomic nuclei are fixed to their known equilibrium geometry.
The Hamiltonian is represented in the second-quantized form

    Ĥ = ∑_p,qh_pq c_p^† c_q + ∑_p,q,r,sh_pqrs c_p^† c_q^† c_r c_s ,

where c^†_p (c_p) are the creation (annihilation) operators for a molecular spin-orbital (SO) p. The SOs are spin-labeled molecular orbitals (MOs) obtained as a linear combination of atomic orbitals from the minimal STO-3G chemical basis<cit.> using the Hartree-Fock (HF) method<cit.>. The resulting 7 MOs (14 SOs) are shown schematically in Figure <ref>a,
and the terms h_pq and h_pqrs from equation (<ref>) are computed classically using a standard open-source tool based on ab initio methods<cit.>. 
The c_p  and c^†_p operators can be represented as Pauli operators acting on individual qubits using the Jordan-Wigner (JW) transformation<cit.>,
and we use the unitary coupled-cluster (UCC) method to generate an ansatz state<cit.> with the first-order Trotter formula and one Trotter step.
The expectation value of the Hamiltonian is computed by measuring projections of the prepared ansatz state in the combination of Pauli bases that correspond to each term in the JW-transformed Hamiltonian.
To achieve meaningful accuracy, the circuit must be sufficiently sampled in each basis to reduce statistical errors<cit.>, and systematic errors must be controlled.

For a small molecule like H_2  O in the minimal basis set, it is possible to diagonalize the Hamiltonian in equation (<ref>) to compute the full configuration-interaction (FCI) ground state energy (-75.0116 Ha).
This energy is lower than the mean-field HF result (-74.9624 Ha) by ∼ 49.2 mHa. 
From the FCI diagonalization, we generate a list of two-electron interaction terms (c_p^† c_q^† c_r c_s) that contribute to modifications in the energy during the diagonalization process, with the degree of contribution characterized by the determinant. 
Some of these terms correspond to a pair of spin-up and spin-down electrons from the same filled MO being simultaneously excited to an empty MO (called the “bosonic” excitation terms hereafter), and the rest correspond to excitations of two electrons that are not paired in this way (see examples in Fig. <ref>a).
Each term can be included in the preparation of the UCC ansatz in the form of exp[θ_pqrsc_p^† c_q^† c_r c_s-c.c.] in the Trotter product formula, where θ_pqrs becomes the optimization parameter and h.c. denotes the Hermitian conjugate operator.
We perform a numerical simulation of the VQE process as more terms are added to the UCC ansatz, and estimate the lowest energy for each ansatz state as the parameters are optimized. 
This in-silico result serves as a reference to benchmark the computational outcome from the QC.

Figure <ref>b shows the  quantum resource requirements for each UCC ansatz circuit optimized for the trapped-ion QC.
Relevant resource metrics include the number of qubits and the number of entangling gates.
We also tabulate the ground state energy from our in-silico VQE simulation, as up to 21 terms are added to the ansatz beyond the HF calculations (see Extended Data Fig. <ref>).
We see that the estimate of the ground state energy approaches the FCI value as more terms are added, reaching the FCI value within chemical accuracy once 17 or more terms are included in the ansatz.
Inspecting the 21 most significant determinants in the FCI energy calculation, we observe that (1) the inner-most MO 1a_1 (see Figure <ref>a) is always filled and therefore can be ignored, and (2) the 1b_2 MO participates only once as a bosonic excitation.
Ignoring 1a_1 and 1b_2 can reduce the qubit requirement without sacrificing much in absolute accuracy: the reduced Hamiltonian reaches within 2.1 mHa of the FCI ground state at HF+16 terms using 10 qubits and 140 entangling gates.
Chemical accuracy for the full Hamiltonian is achieved at HF+17 terms with 11 qubits and 143 entangling gates, of which 89 are  gates and 54 are small-angle (θ) gates that feature higher fidelity.
These resource requirements are realistically within the near-term performance targets of a NISQ computer based on trapped ions.








§ CIRCUIT OPTIMIZATION AND CO-DESIGN


We have implemented a number of circuit optimization techniques that take advantage of the unique features available in the IonQ trapped-ion QC, but are generic in the sense that they are applicable to any target molecule to be simulated.
The strategies described here are executed by a full-stack, modularized software toolchain, which automatically produces optimized circuits<cit.> for generating the ansatz state of a molecular system.


Given a general UCC ansatz state, interaction terms take the form of a two-electron interaction θ_pqrsc_p^† c_q^† c_r c_s.
Since the indices p,q,r,s vary over the complete set of molecular states (which are represented by different qubits), implementing this interaction requires entangling gates between arbitrary pairs of qubits in the system.
The all-to-all connectivity of trapped-ion QCs makes this a native operation, eliminating the overhead incurred by repeated  gates to reorder qubits before an entangling operation can be applied between nearest-neighbor qubits.
Given that the infidelity of these  operations can dominate the quality of complicated computations, eliminating them from the optimized circuit dramatically increases the accuracy of the VQE result.
This circuit optimization is a direct result of co-design for a particular hardware advantage. 

Another general optimization strategy is to represent the bosonic excitations, where two electrons remain paired, as a single creation or annihilation operator. It is convenient to expand the SO label for the operator c_p to c_kα, where k and α denote the MO and spin label, respectively. Then the bosonic operators are d^†_k = c_kα^† c_kβ^† and d_j = c_jα c_jβ (α≠β), which can be directly translated to the Pauli raising/lowering operators σ^j_± on qubit j. 
The UCC operator corresponding to the bosonic excitation simplifies to exp[θ_jkσ^j_+σ^k_- - h.c.],
and a pair of arbitrary-angle (θ) gates is sufficient to implement this interaction (see Fig. <ref>c). 
Thus ansatz states containing only bosonic excitations can be implemented very efficiently on our QC.


For all remaining terms, we must implement the two-electron interaction via the JW transformation.
Each of these terms looks like V̂ = exp[θ_pqrsσ^p_+σ^q_+σ^r_-σ^s_-⊗_k σ^k_z - h.c.], where the product ⊗_kσ^k_z denotes the adequate JW string to reflect fermionic symmetries. A JW string with m σ_z gates converts to m  gates on either side of the subcircuit that would otherwise implement V̂. Properly ordering these terms in the entire circuit can eliminate most of the  gates so they represent a relatively low overhead as a function of terms in the UCC ansatz<cit.>. The main portion of the quantum circuit is an implementation of a linear combination of eight terms, each containing a product of four σ_x and σ_y operators (with odd number of σ_x in each term). By optimizing the order of these eight operators and taking advantage of the all-to-all connectivity, we can implement this circuit with 13  gates (see Fig. <ref>d). 
When we concatenate several of these terms, some  gates at the ends, including those that arise from a JW string, may cancel out.

Most ansatz states have both bosonic and non-bosonic excitation terms. For these situations, we start with the reduced representation where each qubit describes one MO, and run the quantum circuit that corresponds to all bosonic excitation terms first. Then, additional qubits (all prepared in the |0⟩ state) are introduced, and each are entangled with a qubit representing a MO using a  gate. Each entangled pair can now represent the two SOs corresponding to the MO (Extended Data Fig. <ref>e).



One last optimization takes advantage of the asymmetric SPAM error observed in our system. Normally, we encode a filled orbital (MO or SO) with |1⟩ and an empty orbital with |0⟩, but in a molecule with mostly closed molecular shells like H_2  O, the filled orbitals in the HF-ground state remain mostly filled in the FCI ground state as well. Since our SPAM error is more than a factor of two smaller for |0⟩ compared to |1⟩, we  encode the filled orbitals as |0⟩ to reduce the systematic shift associated with readout from the |1⟩ state.
This encoding has the ancillary benefit of requiring fewer single-qubit gates to initialize the circuit, but the advantage diminishes as measurement errors are suppressed or become more symmetric.

Combining these strategies, we achieve the quantum circuits for preparing the ansatz state with total entangling gate counts shown in Fig. <ref>b. These methods represent a fully general, scalable, and near-optimal framework that can be applied to simulating any physical systems using VQE with a UCC ansatz.



§ RESULTS


Using our trapped-ion QC, we compute the first three bosonic excitation terms of the VQE ansatz for the H_2  O molecule (Extended Data Fig. <ref>).
In order to estimate the minimum energy for each circuit within chemical accuracy (fractional uncertainty of ∼e-5), all systematic errors in our QC must be carefully characterized and controlled.
The intrinsic decoherence of a ^171Yb^+ trapped-ion qubit is negligible over the timescale of our computation<cit.>, so the dominant errors arise in calibrating the angle of the (θ) gate and correcting for the systematic SPAM error of our ion chain.
We accurately calibrate the angle θ using a circuit similar to that shown in Fig. <ref>c, where the parity varies as sin(2θ).
Fitting the parity to this functional form (Fig. <ref>a) compensates for non-linearities in the AOM and enables easy interpolation for arbitrary gate angles.
Uncertainty in the SPAM correction can be made arbitrarily small given sufficient measurement statistics.
Gate fidelity will begin to dominate as the computation length increases, but for the circuits experimentally demonstrated here we are not limited by this error and found no benefit to error mitigation techniques like Richardson extrapolation<cit.>.

To compute the energy corresponding to a prepared ansatz state, we make a set of projective measurements in bases corresponding to the terms in the Hamiltonian, as previously described.
Once a sufficient number of measurements are made, we use a statistical bootstrapping technique<cit.> that accounts for SPAM error to estimate uncertainties from the resulting histograms (Fig. <ref>b).
Figure <ref>c-d shows the experimentally determined energy surface for HF+1 and HF+2 as the ansatz parameters {θ_i} are scanned about their optimum values, and the data for HF+3 is shown in the Extended Data Figure <ref>. 
The experimentally determined ground-state energies for each of these three ansatz states is -74.977(1) Ha, -74.979(2) Ha, and -74.985(5) Ha, respectively, with parenthetical errors indicating 1σ uncertainty derived from the bootstrapped distribution.
The dominant experimental uncertainty arises in the SPAM correction, which can be improved with upgrades to the hardware and new tomographic methods<cit.>.
A direct comparison to the in-silico VQE simulation can be found in  Fig. <ref>e.
The match to theory is very good—both the absolute accuracy and precision are comparable to the chemical accuracy.
This is critical to achieve quantum computational results that provide predictability for VQE-type optimization algorithms.
Given the circuit requirements outlined in Fig. <ref>b and the gate fidelity achieved, we believe that executing a full simulation towards the FCI energy is within reach using current trapped-ion quantum computer technology.



§ SUMMARY AND OUTLOOK

Dramatic improvements must be made to both QC hardware and techniques to efficiently use the available quantum resources in order to perform meaningful quantum computations on a NISQ device.
The work presented here is a framework for end-to-end optimization that maps useful problems in quantum chemistry to a trapped-ion QC, fully leveraging the hardware-specific advantages.
This framework yields near-optimal quantum circuits that can be run on existing NISQ hardware.
To verify the performance of both the hardware and the optimization procedure, we compute the post-Hartree-Fock ground state energy of H_2 O on a trapped-ion QC.
Without any error mitigation, the experimental results for the first three correction terms are in excellent agreement with the theory at the level of chemical accuracy, both in the predicted values and their precision.

While these results are specific to a particular quantum chemistry problem and the trapped-ion QC hardware, the computational methodology we develop is completely general to simulating quantum systems. We anticipate that similar advances can be applied to other optimization problems that work on variational methods, such as the quantum approximate optimization algorithm<cit.> and various quantum machine learning applications<cit.>.
Increased attention to co-design principles like those demonstrated here will be necessary to push the boundary of possibility in near-term quantum computation.





§ ACKNOWLEDGEMENTS

The authors would like to thank David Moehring for his guidance in the construction of this apparatus, and the EURIQA team at the University of Maryland and Duke University for sharing their designs and for useful conversations.



§ AUTHOR CONTRIBUTIONS

Experimental data collected and analyzed by N.C.P. and JS.C.; Y.N., C.D., D.M. K.B. and J.K. performed the circuit design and Y.N. performed in-silico VQE simulation; the apparatus was designed and built by  K.W., J.M.A., K.M.B., JS.C., M.C., S.D., K.M.H., J.M., N.C.P., J.D.WC., S.M.K, S.A, J.A., P.S., M.W., A.M.D., A.B., V.C., M.K., C.C., C.M. and J.K.; Y.N., N.C.P, JS.C. and J.K. prepared the manuscript, with input from all authors.



§ COMPETING INTERESTS

The authors declare no competing interests.


§ CORRESPONDENCE
 
Correspondence and requests for materials should be addressed to Yunseong Nam (email: nam@ionq.co) or Jungsang Kim (kim@ionq.co).

























§ METHODS






 §.§ SPAM characterization and correction.



We monitor the SPAM error during the computation by interleaving experiments that prepare the all-bright |11 ⋯ 11⟩ and all-dark |00 ⋯ 00⟩ states of the ion chain.
During detection, we relax the axial confinement such that the crosstalk error  between adjacent ions is below the intrinsic dark count error of our photon detectors.
This enables a fast measurement of the entire SPAM matrix, because it decomposes into a Kronecker product of SPAM matrices on the individual ions.
The average single-ion SPAM errors, along with an example SPAM matrix of a three-ion chain, are summarized in Fig. <ref>b, which are independently verified via single-qubit randomized benchmarking<cit.>.
The measured state vectors are then corrected for SPAM error via matrix inversion before computing expectation values of the circuit Hamiltonian <cit.>.
Note that for the QC performing computations here, the SPAM error is dominated by detection fidelity<cit.>, which can be improved significantly by upgrading the photon collection efficiency of the hardware.




 §.§ Single-qubit operation.



Single-qubit gates are implemented via Rabi oscillations between |0⟩ and |1⟩, using an SK1 composite pulse sequence<cit.>.
The transition is driven by a two-photon Raman process from two separate beams generated by a pulsed 355 laser, where one beam is tightly focused onto the ion so it can be manipulated independently from the rest of the chain.
We prepare arbitrary single-qubit states on the Bloch sphere by controlling the phase and pulse area delivered by the individual addressing beam. 
Conventional randomized benchmarking<cit.> and gate set tomography<cit.> techniques are used to characterize our single-qubit gates, and we observe fidelities ≳ 99.9% with good repeatability. A typical randomized benchmarking result is depicted in the Extended Data Fig. <ref>. 
During the computation, we interleave  experiments to calibrate the laser power based on measured Rabi rates.
Single-qubit gates are also used to measure SPAM error in the |1⟩ state.
Although we do not characterize the single-qubit gate fidelity during the computation, we are able to bound it ≳99% by monitoring the SPAM error. 





 §.§ Two-qubit operation.


Two-qubit entangling gates are implemented via the Mølmer-Sørenson interaction, where an amplitude-modulated laser pulse, composed of non-copropagating beams, achieves full spin-motion decoupling at the end of the gate<cit.>.
One of the laser beams uniformly illuminates the ions, while the other individually addresses the two particular ions involved in the gate. By varying the pulse area through the laser intensities, we control the geometric phase θ of the interaction, defined in terms of the Pauli-X matrices σ_x^i on the i-th ion as

    _ij(θ) ≡ e^-iθσ_x^iσ_x^j/2 ,

where θ = π /2 corresponds to a maximally  entangling gate.
We calibrate the small-angle  gate (θ≪π /2) with the circuit presented in Extended Data Fig. <ref>a, projecting to the σ_x basis before measurement.
An overall amplitude scale factor g, applied to the acousto-optic modulator (AOM) controlling the individual addressing beams, is scanned to vary the geometric phase θ∝ g^2 ≡Θ, with g^2 < 0 realized by shifting the rf phase of the AOM thereby inverting Θ→ -Θ.
The parity Π_ij of the output state, defined in terms of the observed two-qubit state probability P_ij as

    Π_ij = P_ij(|00⟩) + P_ij(|11⟩) - P_ij(|10⟩) - P_ij(|01⟩),

is fit to Π_ij = sin(2kΘ), and the factor k is applied to the AOM amplitude scale factor g to  properly calibrate arbitrary-angle (θ) gates.
An example calibration curve is shown in Fig. <ref>a.
Small-angle two qubit gates have high fidelity, which we estimate to be ≳ 99.6% for the θ = π /100 case (Fig. <ref>d), which is likely explained by the smaller absolute geometric phase errors and weaker light shifts.
A method for rigorous characterization of an arbitrary-angle  gate fidelity remains an open question for future study.




 §.§ Water molecule.

We use the nuclear configuration of H_2 O where the O- H bond length is fixed to ∼ 1.8a_0 and the angle between the two O- H bonds to be ∼ 105, where a_0 is the Bohr radius.  





 §.§ Molecular modeling with qubits.



We start with the second-quantized Hamiltonian of the form

    Ĥ = ∑_p,qt_pq a_p^† a_q + ∑_p,q,r,st_pqrs a_p^† a_q^† a_r a_s,

where a_p^† (a_p) is the creation (annihilation) operator for an atomic orbital (AO) with a given spin. We evaluate t_pq = ∫∫χ^*(1)_p Ĥ_1 χ^(2)_q dr⃗^(1)dr⃗^(2) and t_pqrs = ∫∫χ^*(1)_p χ^*(2)_q Ĥ_2 χ^(2)_r χ^(1)_s dr⃗^(1)dr⃗^(2) using the minimal, STO-3G basis <cit.>, where χ^(i)_p is the p-th AO for i-th electron and Ĥ_j is the j-body electronic Hamiltonian. We then employ the HF method and solve the Roothan equation using the self-consistent approach<cit.> to obtain molecular orbitals (MOs) as a linear combination of AOs. Each MO consists of two spin orbitals (SOs) corresponding to each spin state of the electron (up and down). The resulting Hamiltonian in SOs is given in Eq. (<ref>) of the main text.

We then apply Jordan-Wigner (JW) transform<cit.>

    c_j^†  = 1^⊗ j-1⊗σ^j_+ ⊗σ_z^⊗ N - j,    c_j  = 1^⊗ j-1⊗σ^j_- ⊗σ_z^⊗ N - j

to transform our reduced, physical, SO-basis Hamiltonian to a qubit Hamiltonian. Additionally, we choose the unitary coupled-cluster (UCC) as our ansatz<cit.> and apply the same transformation. Specifically, for the circuit-level implementation of the JW-transformed ansatz circuit exp(-iH_c.c.), the effective Hamiltonian, coupled-cluster (CC) operator H_c.c. is given by H_c.c. = i(T-T^†), where T is the excitation operator. We use n-th order product-formula (PF) algorithms to further decompose the CC operator, according to

    exp(-i∑_j=1^Lθ_jH_j) ≈ [S_n(λ)]^r,

where H_c.c. =  ∑_j θ_j H_j, λ := 1/r, and

    S_1(λ)   :=∏_j=1^Lexp(-iθ_jH_jλ), 
    
    S_2(λ)   :=∏_j=1^Lexp(-iθ_jH_jλ/2)∏_j=L^1exp(-iθ_jH_jλ/2), 
    
    S_2k(λ)   :=[S_2k-2(p_kλ)]^2S_2k-2((1-4p_k)λ)[S_2k-2(p_kλ)]^2,

with p_k:=1/(4-4^1/(2k-1)) for k>1 <cit.>. We choose the PF algorithm among many available methods, as the PF resulted in the smallest algorithmic error for certain Hamiltonian simulations while requiring the least quantum resources<cit.>.
We find it sufficient to use the first order Trotter formula (n=1) with a single PF stage (r=1), as the resulting ansatz leads to the FCI ground state energy within chemical accuracy. 



 §.§ Expectation values of the Hamiltonian.

Once the ansatz state is prepared, the expected energy of the state is evaluated by projecting the state onto a set of different multi-qubit Pauli bases, obtained from the JW transformation of the SO Hamiltonian in Eq. (<ref>). Specifically, a set of basis-transformation operations, depicted in Extended Data Fig. <ref>d, are applied prior to measurement in the computational basis.
The expectation of each Pauli string can be computed at the desired level of accuracy by sufficient statistical sampling.
Due to the coefficients in the Hamiltonian, some terms contribute more than others to the final computed energy.
We minimized the number of basis transformations required to evaluate the entire Hamiltonian by carefully partitioning the Pauli strings, grouping those that can be measured with a single, representative measurement circuit.



 §.§ Circuit for bosonic excitation terms.



For the cases where the pair of electrons from one MO are excited together to another MO, we can represent this process as a “bosonic” excitation. It is convenient to expand the SO index to reflect both MO (j, k, etc.) and spin (α or β) indices, e.g.,  c_p ≡ c_kα. Then the bosonic creation and annihilation operators are d^†_k = c_kα^† c_kβ^† or d_j = c_jα c_jβ (α≠β).
 In these bosonic excitations, we can use one creation (annihilation) operator to represent the occupation of both electrons in that orbital. Since these creation and annihilation operators now correspond to a pair of electrons, the anti-commutation relations that apply to fermionic particles no longer hold—thus the term “bosonic excitation”—and the σ^i_z strings in the JW transformation are not necessary. For these bosonic excitation terms, the operator d^†_k (d_k) can be replaced by the qubit operator σ^k_+ (σ^k_-), and the corresponding UCC operator reduces to exp[θ_kjσ^k_+ σ^j_- - h.c.]. The implementation of this term in a quantum circuit requires two  gates between the two qubits (k and j) with an angle of θ_kj, denoted as _kj(θ_kj), as shown in Fig. <ref>c.




 §.§ Circuit for non-bosonic excitation terms.





Several steps are taken to minimize the number of entangling gates in implementing the quantum circuit for generic two-electron interaction terms.

1. First, we need to allocate a qubit to represent each SO considered in the molecule. By putting frequently-interacting SOs closer to each other, we can reduce the product of σ_z operators introduced in the JW transformation (called JW strings). A simple greedy approach is used to identify the most frequent interaction between different SOs, and the identified SO pairs are mapped to nearest-possible qubits until no further mapping may be made. 

2. An adequate ordering of the individual terms in the JW-transformed H_c.c in the Trotterized ansatz circuit can lead to dramatic reduction in the JW strings between the terms <cit.>. We order the terms in the ansatz states such that the adjacent terms have maximal overlap in non-identity elements in the Pauli product, while making sure that at least one overlap is non-σ_z. This maximizes the cancellation of the JW strings between the adjacent terms, simplifying the resulting circuit.

3. A two-electron excitation term that consists of  Im(c^†_p c^†_q c_r c_s) translates to the product operator Im(σ_+^pσ_+^qσ_-^rσ_-^s ⊗_νσ_z^ν) by the JW transformation, where σ_± = (σ_x ∓ i σ_y)/2 and the σ_z product is the JW string.
The corresponding unitary operator takes the form exp[-iθ(⊗_νσ_i^ν)/2], 
where σ_i^ν∈{1,σ_x,σ_y,σ_z} is the Pauli operator for ν-th qubit. We implement the circuit as shown in ZZZZa below, instead of a nearest-neighbor-inspired, “staircase” construction (up to  gates) such as in ZZZZb. Here, we assumed that all σ_i^ν = σ_z as a concrete example. The circuit implementation of the term exp[-iθ⊗_ν=0^N-1σ_i^ν/2] results in 2(m-1)  gates, where m is the number of elements σ_i that are not identity, and the common target qubit for the   gates can be chosen arbitrarily among the m qubits.



    a.  0.7       b.  0.7


 To optimize the resulting quantum circuit, we start by choosing the common target to be one of the four qubits to which either σ_x or σ_y is applied. Here, as a concrete example, we choose the last such qubit as the common target. Once the JW strings are expressed by the  gates, the rest of the circuit consists of eight terms that can be ordered as σ_xσ_xσ_xσ_y, σ_xσ_xσ_yσ_x, σ_yσ_xσ_yσ_y, σ_yσ_xσ_xσ_x, σ_yσ_yσ_xσ_y, σ_yσ_yσ_yσ_x, σ_xσ_yσ_yσ_y, and σ_xσ_yσ_xσ_x.  This ordering, while not a unique example, allows us to better optimize the quantum circuit. First, we perform basis transformation σ_i ↦σ_z by applying  or ^† for i = x or y, respectively. Then, the resulting term always looks like a product of four σ_z gates, and the circuit shown in ZZZZa can be used to implement each term. The particular order has exactly two basis changes (σ_x ↔σ_y) between adjacent terms resulting in the cancellation of two pairs of  gates between them, leaving only two  gates between each term.
This cancellation is not applicable for the staircase implementation shown in ZZZZb. 

4. The two  gates between the two terms discussed above can be further simplified, and reduced to a single  gate using  
the following circuit identity:

    -3.3mm= -3.3mm.

Noting that any z-rotations, including  and ^†, commute with the control of a  gate, and = ^†^† and ^† = up to a global phase, we can further simplify the single-qubit gates in the circuit by commuting the , ^†, and  gates to either end of the circuit through the  gates. The resulting circuit to simulate any two-electron term reduces to Fig. <ref>d, and consists of 13  gates, eight small-angle rotations about z-axis, and a few , , and ^† gates to account for the relevant basis rotations.



 §.§ Circuit efficiency.


For a two-electron interaction term over four qubits, we start with eight instances of the circuit shown in ZZZZ containing 48  gates. 
Our final template circuit in Fig. <ref>d, which contains 13 entangling gates, is likely optimal. 
At least one multi-qubit gate needs to be expended to transform from one Pauli basis to another, and our design requires exactly one two-qubit gate for such transformation. 
If a quantum circuit is written with    as the only available multi-qubit gate, it takes at least three  gates to compute or uncompute a Pauli product of length four, such as σ_xσ_xσ_xσ_y.
Given each two-electron excitation operator in the PF-based implementation includes eight such Pauli products, the 13  gates in Fig. <ref>d is likely a minimum.  This circuit optimization is completely general for a two-electron interaction term applied to any molecule using any basis set and any order of PF (see recursive_def).
 


 §.§ Higher fidelity two-qubit gates.



The number of entangling gates is not the sole factor that determines the quality of a quantum computation: it also depends on the type of entangling gate used. Specifically, a small-angle  gate performs better in our trapped-ion QC than a  gate, which requires the maximally entangling (π/2) gate. Therefore, it is advantageous to convert  gates to small-angle  gates wherever possible.

Shown below is a circuit replacement rule that may be used to convert  gates to (θ) gates.  The rule can be applied to the target circuit in Fig. <ref>d to replace four  gates with four  gates. 
Assuming the infidelity associated with a small-angle  gate is much lower than that of a  gate, applying this procedure replaces four out of 13  gates with small-angle  gates, bringing about a ∼30% reduction in the two-electron interaction infidelity.

    0.8-5.5mm=




 §.§ Combining bosonic and non-bosonic terms.



A typical UCC ansatz state contains both bosonic and non-bosonic excitation terms. In this general case, we first assign N qubits to represent the occupation of N MOs with a pair of spin-up and spin-down electrons, and execute the circuit corresponding to all bosonic excitation terms first. Then, we introduce an additional N ancilla qubits all prepared in |0⟩ state. We apply N  gates, each employing a qubit used in simulating the bosonic excitation terms as the control qubit and a fresh ancilla qubit as the target. Each pair can now be used to represent the two SOs corresponding to the MO in executing the remaining non-bosonic excitation terms in the circuit. An example circuit for N=4 is shown in Extended Data Figure <ref>e.

The savings obtained from employing this hybrid approach in executing the bosonic and non-bosonic excitation terms diminish as the problem size increases, as there are more non-pair excitations than pair excitations in general. Nevertheless, for NISQ devices where every saving matters, we find the reduction to be non-negligible.



 §.§ Selection of spin-orbitals.



In the simulation for small molecules such as H_2O where the solution can be simulated classically, we have full knowledge over which SOs, each mapping to a qubit, participate in our simulations. 
In such cases where the information regarding which SOs are significant in finding the ground state of the molecule, we may drop those SOs that are least significant from our simulation. Such information is likely accessible even in the superclassical regime since, for instance, we may reasonably expect that core orbitals are less likely to participate in the excitation than valence orbitals. 

Restricting the simulation to the most significant SOs results in qubit count savings, at the small cost of leaving out those less significant interactions that should in principle be accounted for in obtaining the ground state energy. In terms of implementation, one may allocate the freed-up quantum resources to simulating interactions between the more significant SOs. This is thus useful whenever the number of qubits is a limiting factor.



 §.§ Bootstrap error analysis.


In deriving error estimates for the computed energies, we employ the empirical Bootstrap technique<cit.>.
All single-shot samples for a particular implementation of the circuit are binned, and a random bootstrap sample S^* of the same size as the original dataset is drawn with replacement from the data.
Similarly, we bin all SPAM characterization data acquired during a particular run, and draw a bootstrap sample from that data as well.
This is repeated five hundred times, and with each bootstrap sample we compute the circuit energy expectation ⟨ H_0⟩ to build a histogram of possible measurements consistent with the empirical data.
The mean of this distribution is reported as the measured value, and the standard deviation provides a 1σ error estimate.



































































































