Quantum computers can be used to address electronic-structure problems and problems in materials science and condensed matter physics that can be formulated as interacting fermionic problems, problems which stretch the limits of existing high-performance computers1. Finding exact solutions to such problems numerically has a computational cost that scales exponentially with the size of the system, and Monte Carlo methods are unsuitable owing to the fermionic sign problem. These limitations of classical computational methods have made solving even few-atom electronic-structure problems interesting for implementation using medium-sized quantum computers. Yet experimental implementations have so far been restricted to molecules involving only hydrogen and helium2,3,4,5,6,7,8. Here we demonstrate the experimental optimization of Hamiltonian problems with up to six qubits and more than one hundred Pauli terms, determining the ground-state energy for molecules of increasing size, up to BeH2. We achieve this result by using a variational quantum eigenvalue solver (eigensolver) with efficiently prepared trial states that are tailored specifically to the interactions that are available in our quantum processor, combined with a compact encoding of fermionic Hamiltonians9 and a robust stochastic optimization routine10. We demonstrate the flexibility of our approach by applying it to a problem of quantum magnetism, an antiferromagnetic Heisenberg model in an external magnetic field. In all cases, we find agreement between our experiments and numerical simulations using a model of the device with noise. Our results help to elucidate the requirements for scaling the method to larger systems and for bridging the gap between key problems in high-performance computing and their implementation on quantum hardware.
The fundamental goal in electronic-structure problems is to solve for the ground-state energy of many-body interacting fermionic Hamiltonians. Solving this problem on a quantum computer relies on a mapping between fermionic and qubit operators11, which restates the problem as a specific instance of a local Hamiltonian problem on a set of qubits. Given a k-local Hamiltonian H, composed of terms that act on at most k qubits, the solution to the local Hamiltonian problem amounts to finding its ground-state eigenvalue EG and ground state |ΦG〉, which satisfySo far, no efficient algorithm is known that can solve this problem in its fully general form. For k ≥ 2, the problem is known to be quantum Merlin Arthur (QMA)-complete12; however, it is expected that physical systems have Hamiltonians that can be solved efficiently on a quantum computer, while remaining hard to solve on a classical computer.
Following Feynman’s idea for quantum simulation, a quantum algorithm for the ground-state problem of interacting fermions has been proposed13,14. The approach relies on a ‘good’ initial state—one that has a large overlap with the ground state—and solves the problem using the quantum phase estimation algorithm15. Although this algorithm can produce extremely accurate energy estimates for quantum chemistry2,3,5,8, it applies stringent requirements on the coherence of the quantum hardware.
An alternative approach is to use quantum optimizers, which have previously demonstrated utility, for example, for combinatorial optimization problems16,17 and in quantum chemistry as variational quantum eigensolvers (VQEs) where they were introduced to reduce the coherence requirements on quantum hardware4,18,19. The VQE uses Ritz’s variational principle to prepare approximations to the ground state and its energy. In this approach, the quantum computer is used to prepare variational trial states that depend on a set of parameters. The expectation value of the energy is then estimated and used in a classical optimizer to generate a new set of improved parameters. The advantage of a VQE over classical simulation methods is that it can prepare trial states that are not amenable to efficient classical numerics.
The VQE approach realized in experiments has so far been limited by different factors. Typically, a unitary coupled cluster ansatz for the trial state is considered6,7, which has a number of parameters that scales quartically with the number of spin orbitals that are considered in the single- and double-excitation approximation. Furthermore, when implementing the unitary coupled cluster ansatz on a quantum computer, Trotterization errors need to be accounted for19,20,21. Here we introduce and implement a hardware-efficient ansatz preparation for a VQE, whereby trial states are parameterized by quantum gates that are tailored to the physical device that is available. We show numerically the viability of such trial states for small electronic-structure problems and use a superconducting quantum processor to perform optimizations of the molecular energies of H2, LiH and BeH2, and extend its application to a Heisenberg antiferromagnetic model in an external magnetic field.
The device used in the experiments is a superconducting quantum processor with six fixed-frequency transmon qubits, together with a central weakly tunable asymmetric transmon qubit22. The device is cooled in a dilution refrigerator, where it is thermally anchored to its mixing chamber plate at 25 mK. The experiments discussed here make use of six of these qubits (labelled Q1–Q6; Fig. 1b). The qubits are coupled via two superconducting coplanar waveguide resonators, and can be controlled individually and read out using independent read-out resonators.
The hardware-efficient trial states that we consider use the naturally available entangling interactions of the superconducting hardware, which are described by a drift Hamiltonian H0. This Hamiltonian generates the entanglers, which are unitary operators of the form UENT = exp(−iH0τ), which entangle all the qubits in the circuit, where τ is the evolution time. These entanglers are interleaved with arbitrary single-qubit Euler rotations, which are implemented as a combination of Z and X gates, , where θ represents the Euler angles, q identifies the qubit and i = 0, 1, …, d refers to the depth position, as depicted in Fig. 1c. The N-qubit trial states are obtained from the state |00…0〉, applying d entanglers UENT that alternate with N Euler rotations, givingBecause the qubits are all initialized in their ground state |0〉, the first set of Z rotations of Uq,0(θ) is not implemented, resulting in a total of p = N(3d + 2) independent angles. In the experiment, the evolution time τ and the individual couplings in H0 can be controlled. However, numerical simulations indicate that accurate optimizations are obtained for fixed-phase entanglers UENT, leaving the p control angles as variational parameters. Our hardware-efficient approach does not rely on the accurate implementation of specific two-qubit gates and can be used with any UENT that generates sufficient entanglement. This is in contrast to unitary coupled-cluster trial states, which require high-fidelity quantum gates that approximate a unitary operator tailored on the basis of a theoretical ansatz. For the experiments considered here, the entanglers UENT are composed of a sequence of two-qubit cross-resonance gates23. Simulations as a function of entangler phase show plateaus of minimal energy error around gate phases that correspond to the maximal pairwise concurrence; see Supplementary Information. We therefore set the entangler evolution time τ at the beginning of such plateaus, to reduce decoherence effects.
In our experiments, the Z rotations are implemented as frame changes in the control software24, whereas the X rotations are implemented by appropriately scaling the amplitude of calibrated Xπ pulses, using a fixed total time of 100 ns for every single-qubit rotation. The cross-resonance gates that compose UENT are implemented by driving a control qubit Qc with a microwave pulse that is resonant with a target qubit Qt. We use Hamiltonian tomography of these gates to determine the strengths of the various interaction terms, and the gate time for maximal entanglement23. We set our two-qubit gate times at 150 ns, to try to minimize the effect of decoherence without compromising the accuracy of the optimization outcome; see Supplementary Information.
After each trial state is prepared, we estimate the associated energy by measuring the expectation values of the individual Pauli terms in the Hamiltonian. These estimates are affected by stochastic fluctuations due to finite sampling. Different post-rotations are applied after trial-state preparation for sampling different Pauli operators (Fig. 1c, d). We group the Pauli operators into tensor product basis sets that require the same post-rotations. We numerically show that such grouping reduces the energy fluctuations, while keeping the same total number of samples, thereby reducing the time overhead for energy estimation; see Supplementary Information. The energy estimates are then used in a gradient descent algorithm that relies on a simultaneous perturbation stochastic approximation (SPSA) to update the control parameters. The SPSA algorithm approximates the gradient using only two energy measurements, regardless of the dimensions of the parameter space p, achieving a level of accuracy comparable to that of standard gradient descent methods, in the presence of stochastic fluctuations10. This is crucial for optimizing over many qubits and long depths for trial-state preparation, enabling us to optimize over a number of parameters as large as p = 30.
To address molecular problems on our quantum processor, we rely on a compact encoding of the second-quantized fermionic Hamiltonians onto qubits. The Hamiltonian for molecular H2 has four spin orbitals, representing the spin-degenerate 1s orbitals of the two hydrogen atoms. We use a binary tree encoding11 to map the Hamiltonian to a four-qubit system, and remove the two qubits that are associated with the spin parities of the system9. The Hamiltonian for BeH2 is defined on the basis of the 1s, 2s and 2px orbitals that are associated with Be, and the 1s orbital that is associated with each H atom, for a total of ten spin orbitals. We then assume perfect filling of the innermost two 1s spin orbitals of Be, after shifting their energies by diagonalizing the non-interacting part of the fermionic Hamiltonian. We map the eight-spin-orbital Hamiltonian of BeH2 using parity mapping and, as in the case of H2, remove two qubits associated with the spin–parity symmetries, reducing the Hamiltonian to a six-qubit problem that encodes eight spin orbitals. A similar approach is used to map LiH onto four qubits. The Hamiltonians for H2, LiH and BeH2 at their lowest-energy interatomic distances (bond distance) are given explicitly in Supplementary Information.
The results from an optimization procedure are illustrated in Fig. 2, using the Hamiltonian for BeH2 at the interatomic distance of 1.7 Å. Although using a large number of entanglers UENT helps to achieve better energy estimates in the absence of noise, the combined effect of decoherence and finite sampling sets the optimal depth for optimizations on our quantum hardware to 0–2 entanglers. The results presented in Fig. 2 were obtained using a circuit of depth d = 1, with a total of 30 Euler control angles associated with six qubits. The inset of Fig. 2 shows the simultaneous perturbation of 30 Euler angles as the energy estimates are updated.
To obtain the potential-energy surfaces for H2, LiH and BeH2, we search for the ground-state energy of their molecular Hamiltonians, using two, four and six qubits, respectively, a depth d = 1 and a range of different interatomic distances. The experimental results are compared with the ground-state energies obtained from exact diagonalization and outcomes from numerical simulations in Fig. 3. The coloured density plots in each panel are obtained from 100 numerical optimizations for each interatomic distance, using cross-resonance entangling gates with the same topology as in the experiments. These numerics account for decoherence effects, which are simulated by adding amplitude damping and dephasing channels after each layer of quantum gates. The effect of finite sampling on the optimization algorithm is taken into account by numerically sampling the individual Pauli terms in the Hamiltonian, and adding their averages. The strengths of the noise channels are derived from the measured values of the coherence times T1 and . In addition to the effects of decoherence and noisy energy estimates, the deviations are also due to low circuit depth for trial-state preparation, which, for example, explains the kink in the range l = 2.5–3 Å in Fig. 3b. In the absence of noise, critical depths of d = 1, d = 8 and d = 28 are required to achieve chemical accuracy (an energy error of approximately 0.0016 hartree) on the current experimental connectivities for H2, LiH and BeH2, respectively; critical depths of d = 1, d = 6 and d = 16 are required to achieve chemical accuracy on the respective all-to-all connectivities; see Supplementary Information. By contrast, a generic unitary coupled-cluster ansatz truncated to second order for an eight-orbital molecule such as our model of BeH2 would require 4,160 fermionic variational terms, which, after accounting for fermionic mappings and Trotterization, would generate a number of quantum gates that is of the same order. The scaling of resources and the noise requirements necessary for achieving chemical accuracy using hardware-efficient trial states are detailed in Supplementary Information. We emphasize that our approach is unaffected by coherent gate errors, which shifts the focus to reducing incoherent errors, favouring our fixed-frequency, all-microwave-controlled qubit architecture. Furthermore, the effect of incoherent errors can be mitigated as recently proposed25,26,27, without requiring additional quantum resources.
We now demonstrate the applicability of our technique to a problem of quantum magnetism, and show that, with the same noisy quantum hardware, the advantage of using greater circuits depths is crucially dependent on the target Hamiltonian. Specifically, we consider a four-qubit Heisenberg model on a square lattice, in the presence of an external magnetic field. The model is described by the Hamiltonianwhere 〈ij〉 indicates the nearest-neighbour pairs, J is the strength of the spin–spin interaction and B the magnetic field along the Z direction. Similar spin models have previously been simulated using trapped ions28. We use our technique to solve for the ground-state energy of the system for a range of J/B values. When J = 0, the ground state is completely separable and the best estimates are obtained for a depth of d = 0. As J is increased, the ground state is increasingly entangled and the best estimates are instead obtained for d = 2, despite the increased decoherence that is caused by using two entanglers for trial-state preparation. This behaviour is shown in Fig. 4a for J/B = 1. The experimental results are compared with the exact ground-state energies for a range of J/B values in Fig. 4b, and our deviations are captured by the density plots of the numerical outcomes that account for noisy energy estimations and decoherence. Furthermore, in Fig. 4c, we show that our approach can be used to evaluate observables such as the magnetization of the system Mz.
The experiments presented here demonstrate that a hardware-efficient VQE implemented on a six-qubit superconducting quantum processor is capable of addressing molecular problems beyond period I elements, up to BeH2. A numerical investigation of the hardware involved suggests that substantial improvements in coherence and sampling are needed to improve the accuracy of a VQE for the molecules that we addressed; see Supplementary Information. For more complex problems, increased coherence and faster gates would enable larger circuit depths for state preparation, whereas increased on-chip qubit connectivity is crucial for reducing the critical depth requirements to achieve chemical accuracy. The use of fast reset schemes29 would enable increased sampling rates, improving the effectiveness of the classical optimizer and reducing time overheads. The performance of the quantum–classical optimization could be further improved by using variants30 of the SPSA protocol. Trial-state-preparation circuits, which combine ansatzes from classical approximation methods and hardware-efficient gates, could be investigated further to improve on the current state ansatz. Finally, even before the advent of fault-tolerant architechtures, the agreement of our experimental results with the noise models that we considered opens up a path to error-mitigation protocols for experimentally accessible circuit depths25,26,27.
The data that support the findings of this study are available from the corresponding author on reasonable request.
We thank J. Chavez-Garcia, A. D. Córcoles and J. Rozen for experimental contributions, J. Hertzberg and S. Rosenblatt for room temperature characterization, B. Abdo for design and characterization of the Josephson Parametric Converters, S. Brayvi, J. Smolin, E. Magesan, L. Bishop, S. Sheldon, N. Moll, P. Barkoutsos and I. Tavernelli for discussions, and W. Shanks for assistance with the experimental control software. We thank A. D. Córcoles for edits to the manuscript. We acknowledge support from the IBM Research Frontiers Institute. The research is based on work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via the Army Research Office contract W911NF-10-1-0324.
This file contains supplementary Text, Supplementary Figures 1-9 and additional references.
About this article
Nature Communications (2018)