Ground-state energy estimation of the water molecule on a trapped ion quantum computer

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.

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[1], unsorted database search [2], and the simulation of quantum systems [3] 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 [4] 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 ≈ 4 kJ/mol = 1.6 × 10 −3 Hartree (Ha) [5]. Achieving chemical accuracy would allow computational methods to replace costly experimental proce- * Electronic address: nam@ionq.co † Electronic address: kim@ionq.co dures in chemical and materials engineering, augmenting these fields to accelerate the pace of discovery.
Early quantum computational techniques to simulate many-body Fermi systems [6] or calculate molecular energies [7] have dramatically improved over the past decade [8][9][10], but the resource requirements for useful chemical simulations still remain out of reach [11]. 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 [12][13][14][15], 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 arXiv:1902.10171v2 [quant-ph] 7 Mar 2019 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.

I. TRAPPED-ION QUANTUM COMPUTER
The trapped-ion system used in this study is a scalable, general-purpose programmable QC constructed at IonQ, Inc. [16] and illustrated schematically in Fig. 1a; see Methods for additional details. The computer consists of a linear chain of 171 Yb + 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 2 S 1/2 ground state of each ion, split by 12.6 GHz [17].
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 dipoleallowed cycling transition between |1 and the 2 P 1/2 excited state [18]. 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. 1b. 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 [19]. 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 [18][19][20].
Quantum gates are implemented via two-photon Raman transitions driven by two laser beams from a modelocked pulsed laser at 355 nm, where the two laser beams generate a beatnote close to the qubit frequency [21]. 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 acoustooptic 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 [22]. The AOM in our system has 32 independent channels, allowing us to scale the number of individually addressable and fullyconnected qubits to this number. Further scaling is possible with alternative optical setups or by sacrificing full connectivity and using ion-shuttling protocols [23].
We drive high-fidelity single-qubit operations with a resonant Raman transition between |0 and |1 using a composite pulse sequence [24,25]. Two-qubit operations are mediated by the shared motional modes of the entire chain via an effective XX-Ising interaction using the Mølmer-Sørensen protocol [26,27], and can be written in terms of Pauli X matrices on ions i and j as XX(θ) = exp −iθσ i x σ j x /2 . Since the motional modes involve every ion in the chain, we can apply the XX gate between arbitrary pairs of ions with comparable speed and fidelity [22,[28][29][30]. 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 XX(π/2) gate is 96%. We estimate the fidelity of "small-angle" XX gates by concatenating XX(π/2n) gates n times to approximate a full XX(π/2) gate. The state fidelity F is measured, and we estimate the per-gate error to be (1−F)/n. We show an example in Fig. 1c for n = 50, and calculate 4 × 10 −3 for the XX(π/100) gate. In general, small-angle XX gates have higher fidelities in a trapped-ion QC than maximally entangling XX gates, which can be used to improve the quality of a quantum computation.

II. 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 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 [31] using the Hartree-Fock (HF) method [32]. ...
... transformation [34], and we use the unitary coupledcluster (UCC) method to generate an ansatz state [35][36][37] 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 [14], 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 (1) 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. 2a). Each term can be included in the preparation of the UCC ansatz in the form of exp θ pqrs c † 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 2b shows the quantum resource requirements for each UCC ansatz circuit optimized for the trappedion 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. 7). 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 2a) 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 CNOT gates and 54 are small-angle XX(θ) gates that feature higher fidelity. These resource requirements are realistically within the near-term performance targets of a NISQ computer based The bosonic terms through HF+5 can be represented as pair excitations to reduce the qubit resource requirements, while the MO selection strategy prunes the two least significant molecular states (1a1 and 1b2) to reduce the qubit count slightly at the expense of ≈ mHa accuracy. Energies should be compared to the (FCI) ground state energy, which is the exact result from diagonalizing the complete Hamiltonian in the minimal STO-3G chemical basis. c, Bosonic excitation template circuit. d, Non-bosonic excitation template circuit. on trapped ions.

III. 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 [38] 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 θ pqrs c † 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 SWAP gates to reorder qubits before an entangling operation can be applied between nearest-neighbor qubits. Given that the infidelity of these SWAP operations can dominate the quality of complicated computations, eliminating them from the opti-mized 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 , and a pair of arbitraryangle XX(θ) gates is sufficient to implement this interaction (see Fig. 2c). Thus ansatz states containing only bosonic excitations can be implemented very efficiently on our QC.
For all remaining terms, we must implement the twoelectron interaction via the JW transformation. Each of these terms looks likeV = exp[θ pqrs σ p , 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 CNOT gates on either side of the subcircuit that would otherwise implementV . Properly ordering these terms in the entire circuit can eliminate most of the CNOT gates so they represent a relatively low overhead as a function of terms in the UCC ansatz [8]. 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 CNOT gates (see Fig. 2d). When we concatenate several of these terms, some CNOT 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 CNOT gate. Each entangled pair can now represent the two SOs corresponding to the MO (Extended Data Fig. 4e).
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 asso-ciated 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. 2b. 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.

IV. 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. 4). In order to estimate the minimum energy for each circuit within chemical accuracy (fractional uncertainty of ∼10 −5 ), all systematic errors in our QC must be carefully characterized and controlled. The intrinsic decoherence of a 171 Yb + trapped-ion qubit is negligible over the timescale of our computation [17], so the dominant errors arise in calibrating the angle of the XX(θ) 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. 2c, where the parity varies as sin(2θ). Fitting the parity to this functional form (Fig. 3a) 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 [39].
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 [40] that accounts for SPAM error to estimate uncertainties from the resulting histograms (Fig. 3b). Figure 3c-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 5. The experimentally determined groundstate 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 [18,41]. A direct comparison to the in-silico VQE simulation can be found in Fig. 3e. The match to theory is very goodboth 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. 2b 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.

V. 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 [42] and various quantum machine learning applications [43,44]. Increased attention to co-design principles like those demonstrated here will be necessary to push the boundary of possibility in near-term quantum computation.

A. 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. 1b, which are independently verified via single-qubit randomized benchmarking [45]. The measured state vectors are then corrected for SPAM error via matrix inversion before computing expectation values of the circuit Hamiltonian [46,47]. Note that for the QC performing computations here, the SPAM error is dominated by detection fidelity [19], which can be improved significantly by upgrading the photon collection efficiency of the hardware.

B. Single-qubit operation.
Single-qubit gates are implemented via Rabi oscillations between |0 and |1 , using an SK1 composite pulse sequence [24]. The transition is driven by a two-photon Raman process from two separate beams generated by a pulsed 355 nm 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 [45] and gate set tomography [48] 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. 6. During the computation, we interleave experiments to calibrate the laser power based on measured Rabi rates. Singlequbit gates are also used to measure SPAM error in the |1 state. Although we do not characterize the singlequbit gate fidelity during the computation, we are able to bound it 99% by monitoring the SPAM error.
Two-qubit entangling gates are implemented via the Mølmer-Sørenson interaction, where an amplitudemodulated laser pulse, composed of non-copropagating beams, achieves full spin-motion decoupling at the end of the gate [22,[27][28][29][30]. 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 σ i x on the i-th ion as where θ = π/2 corresponds to a maximally entangling gate. We calibrate the small-angle XX gate (θ π/2) with the circuit presented in Extended Data Fig. 4a, projecting to the σ x basis before measurement. An overall amplitude scale factor g, applied to the acoustooptic 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 (3) is fit to Π ij = sin(2kΘ), and the factor k is applied to the AOM amplitude scale factor g to properly calibrate arbitrary-angle XX(θ) gates. An example calibration curve is shown in Fig. 3a. Small-angle two qubit gates have high fidelity, which we estimate to be 99.6% for the θ = π/100 case (Fig. 1d), which is likely explained by the smaller absolute geometric phase errors and weaker light shifts. A method for rigorous characterization of an arbitrary-angle XX gate fidelity remains an open question for future study.  We start with the second-quantized Hamiltonian of the formĤ = p,q t pq a † p a q + p,q,r,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 d r (1) d r (2) and t pqrs = χ * (1) p (1) s d r (1) d r (2) using the minimal, STO-3G basis [31], 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 [32] 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. (1) of the main text.
We then apply Jordan-Wigner (JW) transform [34] (5) to transform our reduced, physical, SO-basis Hamiltonian to a qubit Hamiltonian. Additionally, we choose the unitary coupled-cluster (UCC) as our ansatz [36,37] 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 where H c.c. = j θ j H j , λ := 1/r, and with p k := 1/(4 − 4 1/(2k−1) ) for k > 1 [49]. 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[50]. 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.

F. 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. (1).
Specifically, a set of basis-transformation operations, depicted in Extended Data Fig. 4d, 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.

G. 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 XX gates between the two qubits (k and j ) with an angle of θ kj , denoted as XX kj (θ kj ), as shown in Fig. 2c.

H. 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 frequentlyinteracting 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 [8]. 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 (8)a below, instead of a nearest-neighborinspired, "staircase" construction (up to SWAP gates) such as in (8)b. Here, we assumed that all σ ν i = σ z as a concrete example. The circuit implementation of the term exp[−iθ where m is the number of elements σ i that are not identity, and the common target qubit for the CNOT gates can be chosen arbitrarily among the m qubits.
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 CNOT 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 H or S † H for i = x or y, respectively. Then, the resulting term always looks like a product of four σ z gates, and the circuit shown in (8)a 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 CNOT gates between them, leaving only two CNOT gates between each term. This cancellation is not applicable for the staircase implementation shown in (8)b.
4. The two CNOT gates between the two terms discussed above can be further simplified, and reduced to a single CNOT gate using the following circuit identity: Noting that any z-rotations, including S and S † , commute with the control of a CNOT gate, and HSH = S † HS † and HS † H = SHS up to a global phase, we can further simplify the single-qubit gates in the circuit by commuting the S, S † , and H gates to either end of the circuit through the CNOT gates. The resulting circuit to simulate any two-electron term reduces to Fig. 2d, and consists of 13 CNOT gates, eight small-angle rotations about z-axis, and a few H, S, and S † gates to account for the relevant basis rotations.
I. Circuit efficiency.
For a two-electron interaction term over four qubits, we start with eight instances of the circuit shown in (8) containing 48 CNOT gates. Our final template circuit in Fig. 2d, 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 CNOT as the only available multi-qubit gate, it takes at least three CNOT 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 CNOT gates in Fig. 2d 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 (7)).
J. 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 XX gate performs better in our trapped-ion QC than a CNOT gate, which requires the maximally entangling XX(π/2) gate. Therefore, it is advantageous to convert CNOT gates to small-angle XX gates wherever possible.
Shown below is a circuit replacement rule that may be used to convert CNOT gates to XX(θ) gates. The rule can be applied to the target circuit in Fig. 2d to replace four CNOT gates with four XX gates. Assuming the infidelity associated with a small-angle XX gate is much lower than that of a CNOT gate, applying this procedure replaces four out of 13 CNOT gates with small-angle XX gates, bringing about a ∼30% reduction in the twoelectron interaction infidelity.

K. 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 CNOT 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 4e.
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.
L. Selection of spin-orbitals.
In the simulation for small molecules such as H 2 O 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.

M. Bootstrap error analysis.
In deriving error estimates for the computed energies, we employ the empirical Bootstrap technique [40]. 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. , the electron-pair excitation from the 1b 1 MO to the 2b 1 MO is achieved by applying two XX(✓) gates between qubits denoting the occupation of electrons in these MOs. The second bosonic excitation added in HF+2 (corresponding to electron pairs from the 3a 1 MO being excited to the 4a 1 MO) involves a completely independent set of MOs, so it amounts to parallel execution of the circuit in a with different values of the ansatz parameters ✓ 0 and ✓ 1 . For HF+3, the circuit involves six XX(✓) gates with three independent parameters. All interaction terms are listed in Extended Data Figure 7. The NOT gates can be commuted through the entire circuit and applied classically after the measurement which, due to asymmetric SPAM error in the |1i state, improves the fidelity of the computation. e, A sample circuit mixing bosonic and non-bosonic excitation terms. The bosonic excitations are simulated first on a subset of the qubits representing the electron pairs in each MO, then CNOT gates between each MO qubit and an ancilla serve to re-encode the MOs as SOs and the circuit proceeds to execute the remaining non-bosonic interactions. For all XX gates, the two-qubit interaction is applied between the top and bottom qubit lines enclosed by the box.

9
Extended Data Figure 4: VQE ansatz circuits for a, HF+1, b, HF+2, and c, HF+3. Each circuit ends in a measurement Mi, which is one of three measurement circuits shown in d, to generate expectation values of each Pauli operator. For HF+1, shown here in the bosonic representation (see text), the electron-pair excitation from the 1b1 MO to the 2b1 MO is achieved by applying two XX(θ) gates between qubits denoting the occupation of electrons in these MOs. The second bosonic excitation added in HF+2 (corresponding to electron pairs from the 3a1 MO being excited to the 4a1 MO) involves a completely independent set of MOs, so it amounts to parallel execution of the circuit in a with different values of the ansatz parameters θ0 and θ1. For HF+3, the circuit involves six XX(θ) gates with three independent parameters. All interaction terms are listed in Extended Data Figure 7. The NOT gates can be commuted through the entire circuit and applied classically after the measurement which, due to asymmetric SPAM error in the |1 state, improves the fidelity of the computation. e, A sample circuit mixing bosonic and non-bosonic excitation terms. The bosonic excitations are simulated first on a subset of the qubits representing the electron pairs in each MO, then CNOT gates between each MO qubit and an ancilla serve to re-encode the MOs as SOs and the circuit proceeds to execute the remaining non-bosonic interactions. For all XX gates, the two-qubit interaction is applied between the top and bottom qubit lines enclosed by the box.