Adiabatic Quantum Simulation of Quantum Chemistry

We show how to apply the quantum adiabatic algorithm directly to the quantum computation of molecular properties. We describe a procedure to map electronic structure Hamiltonians to 2-body qubit Hamiltonians with a small set of physically realizable couplings. By combining the Bravyi-Kitaev construction to map fermions to qubits with perturbative gadgets to reduce the Hamiltonian to 2-body, we obtain precision requirements on the coupling strengths and a number of ancilla qubits that scale polynomially in the problem size. Hence our mapping is efficient. The required set of controllable interactions includes only two types of interaction beyond the Ising interactions required to apply the quantum adiabatic algorithm to combinatorial optimization problems. Our mapping may also be of interest to chemists directly as it defines a dictionary from electronic structure to spin Hamiltonians with physical interactions.

We show how to apply the quantum adiabatic algorithm directly to the quantum computation of molecular properties. We describe a procedure to map electronic structure Hamiltonians to 2-body qubit Hamiltonians with a small set of physically realizable couplings. By combining the Bravyi-Kitaev construction to map fermions to qubits with perturbative gadgets to reduce the Hamiltonian to 2-body, we obtain precision requirements on the coupling strengths and a number of ancilla qubits that scale polynomially in the problem size. Hence our mapping is efficient. The required set of controllable interactions includes only two types of interaction beyond the Ising interactions required to apply the quantum adiabatic algorithm to combinatorial optimization problems. Our mapping may also be of interest to chemists directly as it defines a dictionary from electronic structure to spin Hamiltonians with physical interactions.
T he ability to make exact quantum chemical calculations on nontrivial systems would revolutionize chemistry. While seemingly intractable for classical algorithms, quantum computers can efficiently perform such computations. There has been substantial interest in quantum algorithms for quantum chemistry involving a combination of Trotterization and phase estimation [1][2][3][4][5][6] . However, we are still technologically far from when such gate-model approaches are experimentally feasible for practical chemistry problems. Here, we propose a radically different approach based on the quantum adiabatic algorithm. In this rapidly advancing paradigm of quantum computation, there is no need for Trotterization, phase estimation or logic gates. More generally, we show the first scalable quantum simulation scheme for fermionic systems using adiabatic quantum computing.
Adiabatic quantum computing works by changing the Hamiltonian of a controllable quantum system from an initial Hamiltonian whose ground state is easy to prepare into a Hamiltonian whose ground state encodes the solution of a computationally interesting problem 7,8 . The speed of this algorithm is determined by the adiabatic theorem of quantum mechanics which states that an eigenstate remains at the same position in the eigenspectrum if a perturbation acts on the system sufficiently slowly 7,9,10 . Simply embedding a computational problem in a Hamiltonian suitable for AQC does not ensure an efficient solution. The required runtime for the adiabatic evolution depends on the energy gap between the ground state and first excited state at the smallest avoided crossing 7 .
AQC has been applied to classical optimization problems that lie in the complexity class NP. For example, studies have been performed on satisfiability [11][12][13] , Exact Cover 7,8 , 3-regular 3-XORSAT and 3-regular Max-Cut 14 , random instances of classical Ising spin glasses 15 , protein folding 16,17 and machine learning 18,19 . AQC has also been applied to structured and unstructured search 20,21 , search engine ranking 22 and artificial intelligence problems arising in space exploration 23 . Many of these applications follow naturally from the NP-Completeness of determining the ground state energy of classical Ising spin glasses 24 . This creates an equivalence between a large set of computational problems (the class NP) and a set of models in classical physics (classical Ising models with random coupling strengths). The advent of AQC provides a powerful motivation to study the detailed implications of this mapping. In general, we do not expect that quantum computing, including AQC, can provide efficient solutions to NP-Complete problems in the worst case 25 . However, there may exist sets of instances of some NP-Complete problems for which AQC can find the ground state efficiently, but which defy efficient classical solution by any means. If this is the case then AQC is certainly of considerable scientific interest, and likely of great industrial importance.
The potential value of a positive answer to this conjecture has motivated a commercial effort to construct an adiabatic quantum computer [26][27][28][29][30][31] . Currently, these experimental implementations of AQC are not strictly confined to the ground state at zero temperature but have considerable thermal mixing of higher lying states. Such intermediate implementations are referred to as quantum annealing devices. Quantum annealing machines with up to 509 qubits have been commercially manufactured by D-Wave Systems [32][33][34] . They are currently the subject of serious scientific investigation to determine whether their operation depends significantly on their quantum properties, and if so, whether it provides a speedup for any class of instances 15,33,[35][36][37][38] .
Quantum computers have been rigorously proved to provide an algorithmic advantage over the best known classical approaches for a small set of problems [39][40][41] . Adiabatic quantum computation applied to classical Ising Hamiltonians (equivalently, all problems in NP) also gives an approach to a very large class of problems where the advantage (if any) is currently unknown. The construction of medium scale (500 qubit) quantum annealing machines provides a hardware platform where the properties of AQC can be investigated experimentally. Such investigations have already been performed for many problems. At present, optimized codes on classical hardware can find the ground state of many instances in comparable time to the D-Wave device 15 . However, even if no interesting set of instances is found on which quantum annealing on the classical Ising model outperforms classical approaches, the hardware constructed to date represents an important step towards the construction of large scale quantum information technology. If quantum annealing of the classical Ising model is the first step, what is the natural next step?
Quantum simulation has provided a rich set of questions and methods in quantum computation since Feynman's suggestion that quantum devices would be best suited to computation of quantum properties 42 . This observation has been fleshed out through early work on specific systems [43][44][45][46][47][48] and through quantum algorithms for computation of eigenvalues, dynamics and other properties [49][50][51][52][53][54][55] . Recently, there have been many proposals for the simulation of quantum lattice models using trapped ions, trapped atoms and photonic systems [56][57][58][59][60] . There has been rapid experimental progress in the quantum simulation of a number of systems [61][62][63][64][65][66] . A natural target for these simulations is the phase diagram of the Fermi-Hubbard model -believed to inform our understanding of high-T c superconductivity. For this reason many of these approaches are aimed at simulating systems of interacting fermions.
Lattice systems are a natural target for trapped ion and atom quantum simulators, with the trapping mechanism taking the place of the crystal lattice and interactions restricted to neighbors on the lattice. However, quantum chemistry applied to molecular systems is perhaps the broadest class of problems on which quantum simulation of interacting fermions could have an impact. Finding the energy of electrons interacting in the Coulomb potential of a set of fixed nuclei of an atom or molecule defines the electronic structure problem. This problem appears to be hard for classical computers because the cost of directly solving for the eigenvalues of the exact electronic Hamiltonian grows exponentially with the problem size. In spite of much progress over the last 60 years developing approximate classical algorithms for this problem, exact calculations remain out of reach for many systems of interest. Figure 1 shows several of the proposals for the efficient quantum simulation of chemical Hamiltonians.
One may divide quantum simulation algorithms into two classes: those that address statics and compute ground state properties, and those that address dynamics, and simulate time evolution of the wavefunction. It is clear that the simulation of time evolution is exponentially more efficient on quantum computers, with significant implications for the simulation of chemically reactive scattering, in particular 67 . The computation of ground state properties naturally requires preparation of the ground state. This can be done adiabatically 1,88 , or by preparation of an ansatz for the ground state 71 . Adiabatic preparation of the ground state within a gate model simulation requires time evolution of the wavefunction, which is efficient. However, the length of time for which one must evolve is determined, as for all adiabatic algorithms, by the minimum energy gap between ground and first excited states along the adiabatic path. This is unknown in general. Similarly, a successful ansatz state must have significant overlap with the true ground state, and guarantees of this are unavailable in general.
The worst case complexity of generic model chemistries (e.g. local fermionic problems studied with density functional theory) has been shown to be in the quantum mechanical equivalent of NP-Complete, QMA-Complete 89,90 . However, the subset of these generic models which correspond to stable molecules, or to unstable configurations of chemical interest such as transition states, is small and structured. Just as with adiabatic optimization, it does not matter if molecular electronic structure is QMA-Complete so long as the average instance can be solved (or even approximated) efficiently. In this case we also have considerable heuristic evidence that molecules are able to find their ground state configurations rapidly: these are the configurations in which they naturally occur. Similarly, unstable transition states of interest occur in natural processes. Given that simulation of time evolution on a quantum computer is efficient, we conjecture that simulation of the natural processes that give rise to these states will also be practical.
The proofs that Local Hamiltonian (a decision problem capturing the complexity of finding the ground state energy) is QMA-Complete relies on the construction of various specific Hamiltonians that can represent any possible instance of any problem in QMA. In general, these Hamiltonians possess couplings between more than two qubits. Hamiltonians which contain many-body interactions of order k and lower are referred to as klocal Hamiltonians; experimentally programmable couplings are 2local. The original formulation by Kitaev was (log n)-local, he then reduced this to 5-local and that result was subsequently reduced to 3local. To reduce 3-local Hamiltonians to 2-local Hamiltonians ''per-  turbative gadgets'' were introduced by Kempe et al. 77 , which can embed a k-local Hamiltonian in a subspace of a 2-local Hamiltonian using ancilla qubits. In the past decade, a growing body of work has pushed the development of different gadgets which embed various target Hamiltonians with various tradeoffs in the resources required [78][79][80][91][92][93][94] .
Embedding problems in realizable Hamiltonians requires careful consideration of the availability of experimental resources. One consideration is that many-body qubit interactions cannot be directly realized experimentally. Another factor is the ''control precision'' of the Hamiltonian which is the dynamic range of field values which a device must be able to resolve in order to embed the intended eigenspectrum to a desired accuracy. This resource is especially important for molecular electronic structure Hamiltonians as chemists are typically interested in acquiring chemical accuracy (0.04 eV). Control precision is often the limiting factor when a Hamiltonian contains terms with coefficients which vary by several orders of magnitude. Other considerations include the number of qubits available as well as the connectivity and type of qubit couplings.
In this paper, we describe a scalable method which allows for the application of the quantum adiabatic algorithm to a programmable physical system encoding the molecular electronic Hamiltonian. Our method begins with the second quantized representation of molecular electronic structure in which the Hamiltonian is represented with fermionic creation and annihilation operators. The first step in our protocol is to convert the fermionic Hamiltonian to a qubit Hamiltonian using the Bravyi-Kitaev transformation 73,74 . We show that using the Bravyi-Kitaev transformation instead of the Jordan-Wigner transformation is necessary for avoiding exponential control precision requirements in an experimental setting. Next, we show a new formulation of perturbative gadgets motivated by 77,80 that allows us to remove all terms involving YY couplings in a single gadget application (note that throughout this paper we use X, Y and Z to denote the Pauli matrices and these operators are defined to act as identity on unlabeled registers so that the dot product Y i Y j is understood to represent the tensor product Y i fl Y j ). Finally, we apply the gadgets described in 78 to produce a 2-local Hamiltonian with only ZZ, XX and ZX couplings.
The paper is organized as follows. In the first section we review the second quantized formulation of the electronic structure problem. Next we give the mapping of this problem to qubits. In the third section we introduce the gadgets that we will use for locality reduction. Finally, we apply our procedure to a simple example: molecular hydrogen in a minimal basis. We close the paper with some discussion and directions for future work.

Second Quantization
We begin by writing down the full configuration interaction (FCI) Hamiltonian in the occupation number basis. We define spin orbitals as the product of a spin function (representing either spin up or spin down) and a single-electron spatial function (usually molecular orbitals produced from a Hartree-Fock calculation). For example, in the case of molecular hydrogen there are two electrons and thus, two single-electron molecular orbitals, jy 1 ae and jy 2 ae. Electrons have two possible spin states, jaae (spin up) and jbae (spin down). The four spin orbitals for molecular hydrogen are therefore, jx 0 ae 5 jy 1 aejaae, jx 1 ae 5 jy 1 aejbae, jx 2 ae 5 jy 2 aejaae, and jx 3 ae 5 jy 2 aejbae.
The occupation number basis is formed from all possible configurations of n spin orbitals which are each either empty or occupied. We represent these vectors as a tensor product of individual spin orbitals written as jf n21 …f 0 ae where f j [ B indicates the occupation of spin orbital jx j ae. Any interaction between electrons can be represented as some combination of creation and annihilation operators a { j and a j for j [ Z 0ƒjvn j f g . Because fermionic wavefunctions must be antisymmetric with respect to particle label exchange, these operators must obey the fermionic anti-commutation relations, With these definitions we write the second-quantized molecular electronic Hamiltonian, The coefficients h ij and h ijkl are single and double electron overlap integrals which are precomputed classically. The number of distinct integrals scale as O (n 4 ) in the number of molecular orbitals n.

Qubit Representation
The next step in our reduction will be to represent our fermionic wavefunction in terms of qubits. We use the direct mapping introduced in 1 that maps an occupancy state to a qubit basis state. Using Pauli operators we can represent qubit raising and lowering operators as, However, these operators do not obey the fermionic commutation relations given in Eq. 1. To write qubit operators that obey the commutation relations in Eq. 1, we could use the Jordan-Wigner transformation 1,75,76 . Unfortunately, the Jordan-Wigner transformation is not a scalable way to reduce electronic structure to an experimentally realizable Hamiltonian for AQC. This is because the Jordan-Wigner transformation introduces k-local interaction terms into the Hamiltonian and k grows linearly in the system size. Prima facie, this is not a major problem because there exist theoretical tools known as perturbative gadgets which allow for reductions in interaction order. However, in all known formulations of perturbative gadgets, control precision increases exponentially in k. Thus, the linear locality overhead introduced by the Jordan-Wigner transformation translates into an exponential control precision requirement in the reduction.
An alternative mapping between the occupation number basis and qubit representation, known as the Bravyi-Kitaev transformation, introduces logarithmic locality overhead 73,74 . Two pieces of information are required in order to correctly construct creation and annihilation operators that act on qubits and obey the fermionic commutation relations. First, the occupancy of each orbital must be stored. Second, parity information must be stored so that for a pair of orbitals, it is possible to determine the parity of the occupancy of the orbitals that lie between them. This parity determines the phase which results from exchanging the occupancy of the two orbitals.
The occupation number basis stores the occupation directly in the qubit state (hence the name). This implies that occupancy is a fully local variable in this basis; one may determine the occupancy of an orbital by measuring a single qubit. However, this also implies that the parity information is completely non-local. It is this fact that determines the structure of the qubit creation and annihilation operators in the Jordan-Wigner transformation. Each such operator changes the state of a single qubit j (updating the occupancy information) but also acts on all qubits with indices less than j to determine the parity of their occupancy. This results in qubit operators, expressed as tensor products of Pauli matrices, that contain strings of Z operators whose length grows with the number of qubits. One could consider storing the parity information locally, so that the qubit basis states store sums of orbital occupancies. Then determination of parity requires a single qubit operation. However, updating www.nature.com/scientificreports SCIENTIFIC REPORTS | 4 : 6603 | DOI: 10.1038/srep06603 occupancy information requires updating the state of a number of qubits that again grows with the number of qubits. Hence this ''parity basis'' construction offers no advantage over the Jordan Wigner transformation 74 .
The Bravyi-Kitaev transformation offers a middle ground in which both parity and occupancy information are stored non-locally, so neither can be determined by measurement of a single qubit 73,74 . Both parity and occupancy information can be accessed by acting on a number of qubits that scales as the logarithm of the number of qubits. This logarithmic scaling makes the proposed mapping of electronic structure to a 2-local qubit Hamiltonian efficient.
The consequences of this mapping, originally defined in 74 , were computed for electronic structure in 73 . That work defines several subsets of qubits in which the parity and occupancy information is stored. The occupancy information is stored in the update set, whereas the parity information is stored in the parity set. These sets are distinct and their size is strictly bounded above by the logarithm base two of the number of qubits. The total number of qubits on which a qubit creation and annihilation operator may act can be a multiple of the logarithm base two of the number of qubits. However, this multiple is irrelevant from the point of view of the scalability of the construction. Using the Bravyi-Kitaev transformation, the spin Hamiltonian for molecular hydrogen in the minimal (STO-3G) basis, as reported in 73 , is given by In general, the Bravyi-Kitaev transformation applied to electronic structure produces an n-qubit Hamiltonian which is (log n)-local, and has n 4 real terms. This implies that each term has an even number of Y terms, or none.

Hamiltonian Gadgets
In order to embed electronic structure in an experimentally realizable Hamiltonian, we define a scalable methodology for transforming our (log n)-local qubit Hamiltonian into a 2-local Hamiltonian with only ZZ, XX and XZ interaction terms. In this section we will describe tools known as ''gadgets'' which allow us to simulate the target Hamiltonian with these interactions.
Hamiltonian gadgets provide a method for embedding the eigenspectra (and sometimes eigenvectors) of an n-qubit ''target'' Hamiltonian, denoted by H target , in a restricted (typically lowenergy) subspace of a more constrained (N . n)-qubit ''gadget'' Hamiltonian, denoted byH. To illustrate the general idea of gadgets, we describe how a 2-local Hamiltonian can embed a k-local Hamiltonian. Suppose that we have a gadget Hamiltonian,H, which contains only 2-local terms which act on N 5 n 1 a qubits. Then, where {f i } are scalar coefficients,l j and jỹ i i are the eigenvectors and eigenvalues ofH, and {O i } are the 2-local interaction terms of the physical Hamiltonian. We choose our interaction terms to be Hilbert-Schmidt orthogonal so that Tr [O i O j ] 5 2 n d i,j . We now define an effective Hamiltonian which has support on the lowest 2 n states of the gadget, Here P is a projector onto a particular state (usually the lowest energy state) of the a ancilla qubits and the {O i } are a Hilbert-Schmidt orthogonal operator basis for operators on the space of the n logical qubits. In other words, the most general representation of H eff is an expansion of all possible tensor products acting on the logical qubits. In general, there is no reason why f i 5 0 on all non-2local terms. Therefore a 2-local gadget on N 5 n 1 a qubits can embed a (k . 2)-local, n-qubit Hamiltonian using a ancilla bits. The use of perturbation theory to derive Hamiltonian gadgets was introduced by Kempe et al. in their canonical proof showing that 2-Local Hamiltonian is QMA-Complete 77 . Their construction, which we refer to as the ''bit-flip construction'' for reasons that will become obvious later on, was analyzed by Jordan and Farhi using a formulation of perturbation theory due to Bloch 78 . Other perturbative gadget constructions were introduced by Oliveira and Terhal to prove the QMA-Completeness of Hamiltonian on a square lattice 79 . Following this work, Biamonte and Love used gadgets to show that XX and ZZ, or XZ couplings alone, suffice for the QMA-Completeness of 2-local Hamiltonian 92 . Several other papers improve these gadgets from an experimental perspective and introduce novel constructions which are compatible with the protocol developed here 80,91,93,94 . We note that different types of gadgets may have specific advantages when designing Hamiltonians for specific hardware. Results from 80 suggest that there is a rough tradeoff between the number of ancillae required and the amount of control precision required. For instance, Figure 2 indicates that bit-flip gadgets require less control precision than other gadget constructions (but generally more ancillae). In this paper we focus on the bit-flip family of gadgets.
Although we employ the perturbation theory approach here, it does require a high degree of control precision and should be avoided when possible. We point out that when the Hamiltonian is entirely diagonal there are exact gadgets 94 which can embed the ground state with far less control precision and often far fewer ancillae but in a way that does not necessarily conserve the gap scaling. Moreover, ''frustration-free'' gadgets have been used extensively in proofs of the QMA-Completeness of various forms of quantum satisfiability, and in restricting the necessary Hamiltonian terms for universal adiabatic quantum computing [95][96][97][98] .
While several types of perturbation theory have been used to derive these gadgets, we closely follow the approach and notation of Kempe et al. 77 . We wish to analyze the spectrum of the gadget Hamiltonian,H~HzV for the case that the norm of the perturbation Hamiltonian, V, is small compared to the spectral gap between the ground state and first excited state of the unperturbed Hamiltonian, H. To accomplish this we use the Green's function of We also define G(z) using the same expression except with H instead ofH. Further, let H~L z +L { be the Hilbert space ofH where L z is the ''high-energy'' subspace spanned by eigenvectors ofH with eigenvaluesl §l Ã and L { is the complementary ''low-energy'' subspace, spanned by eigenvectors ofH corresponding to eigenvalues of lvl Ã . Let P 6 correspond to projectors onto the support of L z . In a representation of H~L z +L { , all the aforementioned operators V, H,H, G(z),G z ð Þ are block-diagonal so we employ the notation that A 66 Finally, we define the operator function known as the self-energy, We use this notation to restate the ''gadget theorem''. Theorem 1 Theorem 6.2 in 77 . Assume that H has a spectral gap D around the cutoff l * ; i.e. all of its eigenvalues are in (2', l 2 ] < [l 1 , 1') where l 1 5 l * 1 D/2 and l 2 5 l * 2 D/2. Assume that jjVjj # D/2. Let w0 be arbitrary. Assume there exists an operator H eff such that l (H eff ) , [c, d] for some c * v dvl Ã { and, moreover, the inequality S { z ð Þ{H eff ƒ holds for all z [ c{ ,dz ½ . Then each eigenvaluel j ofH { is -close to the j th eigenvalue of H eff .
Theorem 1 assures us that the eigenspectrum of the self-energy provides an arbitrarily good approximation to the eigenspectrum of the low-energy subspace of the gadget Hamiltonian. This is useful because the self-energy admits a series expansion, Using G 1 5 (z 2 D) 21 1 1 and H 2 5 0, we focus on the range z~O 1 ð Þ=D and find that, We use this effective Hamiltonian to approximate our k-local target Hamiltonian, which we now specify. The terms in our target Hamiltonian will have a locality that scales logarithmically with the number of orbitals. We may write such a term: One can always apply gadgets term by term to reduce locality; however, this may not be the optimal procedure. In addition, we are interested in replacing even tensor powers of the Y operator. For both these reasons we consider a slightly more general form of term as a target for gadgetization. We use the fact that it is only the commuting nature of the {O i } that is important for the gadget to function. We therefore write our target term as a product of k commuting operators, which includes the special case in which it is a product of k operators acting on distinct tensor factors, Hence, we can represent the target Hamiltonian as a sum of r terms which are the product of k commuting operators, where all {O s,i } commute for a given s and H else can be realized directly by the physical Hamiltonian. While previous formulations of bit-flip gadgets 77,78,80 have gadgetized operators acting on distinct tensor factors, it is only necessary that the operators commute. Their action on distinct tensor factors is sufficient but not necessary for the gadget construction. We take advantage of this property in order to realize YY terms without access to such couplings by making the substitution, Y i Y j R 2X i X j Z i Z j . Since X i X j commutes with Z i Z j , we can create this effective interaction with a bit-flip gadget. For instance, suppose we have the term, Z 0 Y 1 Y 2 . We gadgetize the term A ? B ? C where A 5 Z 0 , B 5 2X 1 X 2 , and C 5 Z 1 Z 2 and all operators A, B, C commute. We note that another approach to removing YY terms is explained in 80 . We now introduce the form of the penalty Hamiltonian that acts only on the ancilla qubits. Bit-flip gadgets introduce an ancilla system which has two degenerate ground-states, usually taken to be j111…ae u and j000…ae u where u indicates that these kets refer to an ancilla space. For each of the r terms we use a separate ancilla system of the form, Again, we use u to indicate that operators act on an ancilla; e.g. the label u 3,2 indicates the ancilla corresponding to O 3,2 (the second operator in the third term). For each term we follow Farhi and Jordan in introducing an ancilla system connected by a complete graph with equal and negative edge weights. Thus, the ground state of the ancilla system is spanned by j111…ae u and j000…ae u . Next, we introduce the perturbation Hamiltonian, where m~ffi ffiffiffiffiffiffiffiffiffi ffi D k{1 k! k s and L is a 2-local operator on logical bits which will be discussed later. The effect of this Hamiltonian on the low energy subspace is to introduce virtual excitations into the high energy space that modify the low energy effective Hamiltonian. Only terms which start and end in the ground state contribute to the perturbation series for the self-energy (see, for example, Figure 3). Thus, the gadget will produce the target term at order k in which a transition between the two degenerate ground states of the ancillae requires that each of the X u terms in the perturbation act exactly once to flip all r ? k bits from one ground state to the other. Crucially, the order in which the ancillae are flipped does not matter since the operators O s,i commute for a given s. The complete gadget is and is related to the target Hamiltonian and effective Hamiltonian by,H for the appropriate choice of L and D? V k k where P 2 projects onto the ancillae ground space, To illustrate the application of such a gadget and demonstrate how L is chosen, we scalably reduce the locality of molecular hydrogen and remove all Y terms in the next section.
For the example H target 5 A ? B ? C 1 H else , the perturbation is Its components in the low energy subspace, as in the block diagonal representation of Eq. 9 is: The projection into the high energy subspace is: The projections coupling the low and high energy subspaces are: and V 21 5 (V 12 ) { . Substituting these values into Eq. 12 we see that at order k 5 3 a term appears with the following form, These terms arise because all ancilla qubits must be flipped and there are six ways of doing so, representing 3! (in general this will be k! for a gadget with k ancillae) combinations of the operators. These six terms are represented diagrammatically in Figure 3. Note that it is the occurrence of all orderings of the operators A, B and C that imposes the requirement that these operators commute. Hence, in order to realize our desired term we see that m~ffi competing processes occur which contribute unwanted terms but these terms either vanish with increasing spectral gap D, or they can be removed exactly by introducing terms into the compensation term L. A simple way to compute L is to evaluate the perturbation series to order k and choose L so that problematic terms disappear. At higher orders we encounter ''cross-gadget contamination'' which means that processes occur involving multiple ancilla systems, causing operators from different terms to interact. For a 3-operator gadget, such terms will always only contribute at order O (D 23 ). In reductions which require going to higher orders, these terms do not necessarily depend on D, and so may introduce unwanted terms into the effective Hamiltonian. For instance, Figure 4 shows an example of the four processes which occur at fourth order for a multiple term, 4-operator reduction. The diagrams involving multiple ancilla registers are examples of cross-gadget contamination.
However, if terms are factored into tensor products of operators that square to the identity (as is the case for products of Pauli operators, which is always possible), cross-gadget contamination can only contribute a constant shift to the energy which can be compensated for in L. This is because any process contributing to the perturbation series which does not transition between the two different ground states must contain an even multiple of each operator and if we choose to act on the non-ancilla qubits with operators that square to identity we obtain only a constant shift. Consider the two crossgadget terms represented in these diagrams: A 1 C 2 2 A 1~A1 1A 1~1 and D 2 B 1 D 2 B 1 5 (D 2 B 1 ) 2 5 1. At even higher orders, individual cross-gadget terms might not equal a constant shift (i.e. the sixth order term A 1 A 2 A 3 A 2 A 1 A 3 ) but the occurrence of all combinations of operators and the fact that all Pauli terms either commute or anticommute will guarantee that such terms disappear. In the sixth order example, if [A 1 , Example Problem: Molecular Hydrogen We begin by factoring and rewriting the k-local molecular hydrogen Hamiltonian from Eq. 4 into a 4-local part and a 2-local part so that H H2~H4L zH 2L where, In order to reduce H H2 to a 2-local ZZ/XX/XZ-Hamiltonian we further factor H 4L to remove YY terms, Within each term, the operators all commute so that ing operators is always possible and necessary in order for bit-flip gadgets to work correctly.
Each of the operators defined in Eq. 28 will have a corresponding ancilla qubit labelled to indicate the operator with which it is associated, e.g. the ancilla for operator B 2 has label b 2 . Our unperturbed Hamiltonian is a sum of fully connected ancilla systems in which each ancilla system corresponds to a term, The spectral gap and Hamiltonian have the subscript ''1'' to associate them with the first of two applications of perturbation theory. We perturb the ancilla system with the Hamiltonian, where m 1~ffi ffiffiffiffi ffi D 2 1 6 s and L 1 is a 2-local compensation Hamiltonian acting on the logical qubits only. Later on, L 1 will be chosen to cancel extraneous terms from the perturbative expansion. The inter-action terms involving A, B, and C will arise at third order (V 21 V 1 V 12 ) from processes which involve a transition between the two degenerate ground states of the ancilla systems. This occurs at third order because to make the transition 000 j i' 111 j i, we must flip all three ancilla bits in each term by applying the operators X a , X b , and X c . Since these operators are coupled to A, B, and C, sequential action of bit flip operators yields our desired term. Because the operators commute, the order of the bit flipping does not matter. We now calculate the effective Hamiltonian using the perturbative expansion of the self-energy from Eq. 12.
Second Order. The only processes which start in the ground state and return to the ground state at second order are those which flip a single bit and then flip the same bit back. Thus, effective interactions are created between each operator and itself, These processes are shown in Figure 5.   The second order effective Hamiltonian at large D 1 is, Third Order. The target Hamiltonian terms appears at third order from processes that transition between degenerate ground states. However, there is also an additional, unwanted process which occurs at this order. This competing process involves one interaction with H 2L and L 1 in the high-energy subspace, These processes are illustrated diagrammatically in Figure 6. The process we want occurs with the ancilla transition 000 j i' 111 j iwhich flips all three bits (for each term separately since they have different ancillae). There are 3! 5 6 possible ways to flip the bits for each term, (these processes are illustrated in Figure 3), Because H 2L has no D 1 dependence and m 1 is order O D 2=3 1 , terms such as m 2 1 D 2 1 À Á A 1 H 2L A 1 will vanish in the limit of large D 1 ; therefore, the third order effective Hamiltonian is, unwanted contribution at third order will go to zero in the limit of large D 1 and the second order term will cancel exactly with L 1 . Thus, The third order gadget we need to reduce H 3L takes exactly the same form as before except with the term labels 1, 2, 3 exchanged for the term labels 4, 5, 6. The components of the final gadget are and V 2~m2 A 4 X a 4 zB 4 X b 4 zC 4 X c 4 zA 5 X a 5 ð zB 5 X b5 zC 5 X c5 zA 6 X a6 zB 6 X b6 zC 6 X c6 ÞzH 2L zL 2 ð42Þ where m 2~ffi ffiffiffiffi ffi D 2 2 6 3 s and Figure 5 | The three bit-flip processes at second order. These occur for each term. Note that each of these diagrams occurs in reverse for the part of the ground state in | 111ae. Figure 6 | Diagrams for the competing process encountered at third order. Note that each of these diagrams can also occur backwards if the system starts in |111ae.
www.nature.com/scientificreports r X c2 X c3 : This time the spectral gap and Hamiltonian have the subscript ''2'' to associate them with our second application of perturbation theory. We have thus shown the embedding H H2 ?H 2 zV 2 . We present an interaction graph for the embedded Hamiltonian in Figure 7.

Conclusion
We have presented a fully general method for mapping any molecular electronic structure instance to a 2-local Hamiltonian containing only ZZ, XX and XZ terms. Our method is scalable in the sense that all experimental resources (qubits, control precision, graph degree) scale polynomially in the number of orbitals. We used perturbative gadgets which embed the entire target Hamiltonian (as opposed to just the ground state), thus guaranteeing that the eigenvalue gap is conserved under our reduction. Furthermore, we showed that bit-flip gadgets can be applied to remove experimentally challenging YY terms. The resulting Hamiltonian is suitable for implementation in superconducting systems, quantum dots and other systems of artificial spins with the correct engineered interactions. Further reduction of the types of interactions present is possible, to either ZZ and XX terms or ZZ and XZ terms, using the techniques of 92 . This makes the required interactions for simulating electronic structure Hamiltonians equivalent to the requirements of universal adiabatic quantum computation 92 . However, repeated reduction of the Hamiltonian results in more stringent precision requirements. The chosen target set of interactions strikes a balance between control precision and a reasonable set of distinct types of controllable interaction. The techniques developed here could also be applied to interacting fermion problems on the lattice. However, in that case it is possible to improve beyond the Bravyi-Kitaev mapping and exploit the locality of the interactions to directly obtain Hamiltonians whose locality is independent of the number of orbitals 99 .
We propose to read out energy eigenvalues using the tunneling spectroscopy of a probe qubit. This technique has already been demonstrated experimentally with rf SQUID flux qubits in 32 . In this scheme, a probe qubit is coupled to a single qubit of the simulation. Tunneling transitions allow the probe qubit to flip when the energy bias of the probe is close to an eigenvalue of the original system. Hence detection of these transitions reveals the eigenspectrum of the original system. In this way, we would be able to directly measure the eigenspectra of the molecular systems embedded into the spin Hamiltonian using the techniques developed in the present paper. Alternatively, one could evaluate the energy by determining the expectation value of each term in the Hamiltonian via projective measurements.
There has been rapid recent progress in new classical algorithms, such as DMRG (density matrix renormalization group) and related tensor network methods, and proving complexity and approximability results pertaining to minimal resource model Hamiltonians. By using and understanding the techniques we have introduced in this paper, problems in chemistry can be reduced to such models and these discoveries can be leveraged to make advances in electronic structure theory. However, we note that the spin Hamiltonians that result from the mapping developed here will be non-stoquastic, and classical simulation techniques will therefore suffer from the fermionic sign problem 100 . This further motivates the construction of quantum hardware to address the electronic structure problem by quantum simulation of these spin Hamiltonians.