Significance
Variational quantum algorithms combine quantum resources with classical optimization methods, providing a promising approach to solve both quantum many-body and classical optimization problems. A crucial question is how variational algorithms perform as a function of qubit number. Here, we address this question by applying a variational quantum algorithm (QAOA) to approximate the ground-state energy of a long-range Ising model, both quantum and classical, and investigating the algorithm performance on a trapped-ion quantum simulator with up to 40 qubits. A negligible performance degradation and almost constant runtime scaling is observed as a function of the number of qubits. By modeling the error sources, we explain the experimental performance, marking a stepping stone toward more general realizations of hybrid quantum–classical algorithms.
Keywords: quantum information science, quantum simulation, quantum computing, quantum algorithms, trapped ions
Abstract
Quantum computers and simulators may offer significant advantages over their classical counterparts, providing insights into quantum many-body systems and possibly improving performance for solving exponentially hard problems, such as optimization and satisfiability. Here, we report the implementation of a low-depth Quantum Approximate Optimization Algorithm (QAOA) using an analog quantum simulator. We estimate the ground-state energy of the Transverse Field Ising Model with long-range interactions with tunable range, and we optimize the corresponding combinatorial classical problem by sampling the QAOA output with high-fidelity, single-shot, individual qubit measurements. We execute the algorithm with both an exhaustive search and closed-loop optimization of the variational parameters, approximating the ground-state energy with up to 40 trapped-ion qubits. We benchmark the experiment with bootstrapping heuristic methods scaling polynomially with the system size. We observe, in agreement with numerics, that the QAOA performance does not degrade significantly as we scale up the system size and that the runtime is approximately independent from the number of qubits. We finally give a comprehensive analysis of the errors occurring in our system, a crucial step in the path forward toward the application of the QAOA to more general problem instances.
A promising near-term application of quantum devices is the production of highly entangled states with metrological advantage or with properties of interest for many-body physics and quantum information processing. One possible approach to produce useful quantum states is to use quantum devices to perform adiabatic quantum computing (1, 2), which, in some cases, may provide an advantage over classical approaches (3). However, adiabatic quantum computing has stringent adiabaticity requirements that hinder its applicability on existing quantum platforms that have finite coherence times (4).
Alternatively, hybrid quantum–classical variational algorithms may approximately solve hard problems in realms such as quantum magnetism, quantum chemistry (5), and high-energy physics (6). This is because the key resource of quantum computers and simulators is quantum entanglement, which is exactly what makes these many-body quantum problems hard. In a hybrid variational algorithm, entangled states are functions of variational parameters that are iteratively optimized by a classical algorithm. One example is the Quantum Approximate Optimization Algorithm (QAOA) (7), which consists of a “bang-bang” protocol that can provide approximate answers in a time-efficient way, using devices with finite coherence times and without the use of error correction (8–12).
Similarly to adiabatic quantum computing, the QAOA protocol encodes the objective function of the optimization problem in a target spin Hamiltonian. The optimization steps of the QAOA are based on unitary evolution under the target Hamiltonian and a noncommuting “mixing” operator. In general, the QAOA relies on a classical outer loop to optimize the quantum circuit, aided by physical intuition (13–16) or observed structure of the variational parameters (11, 17, 18), producing fast, low-depth circuits for approximate solutions. The QAOA has also been proposed as an efficient way to produce entangled quantum states, such as the ground states of critical Hamiltonians, which gives access to their corresponding energies (19, 20).
In this work, we employ a collection of interacting trapped-ion qubits to experimentally implement a specific instance of the QAOA, which is native to our quantum hardware. We focus on both the energy minimization of the quantum Hamiltonian and the combinatorial optimization of the corresponding classical problem. Both problems are encoded in the transverse-field antiferromagnetic Ising Hamiltonian with long-range interactions:
[1] |
Here, we set the reduced Planck’s constant ; () is the Pauli matrix acting on the spin along the direction of the Bloch sphere; is the Ising coupling between spins and , which, in our case, falls off as a power law in the distance between the spins; and denotes the transverse magnetic field. It is well known (21) that the Hamiltonian (Eq. 1) exhibits a quantum-phase transition for antiferromagnetic interactions with power-law decay. One of the goals of this work is to find an approximation of the ground-state energy both at the critical point , where is the average nearest-neighbor coupling, and in the case of , optimizing the QAOA output for the classical Hamiltonian . The realization of the QAOA entails a series of unitary quantum evolutions (Fig. 1) under the noncommuting Hamiltonians and (defined under Eq. 1) that are applied to a known initial state . The state obtained after layers of the QAOA is:
[2] |
where the evolution times (or, henceforth, “angles”) and are variational parameters used in the -th QAOA layer to minimize the final energy .
In order to implement the quantum-optimization algorithm, each spin in the chain is encoded in the and hyperfine “clock” states of a 171Yb+ ion (SI Appendix). In this work, depending on the number of qubits and measurements required, we employ two different quantum-simulation apparatus to run the QAOA, which will herein be referred to as system 1 (22) and system 2 (23) (SI Appendix). Both systems are based on a linear radiofrequency Paul trap, where we store chains of up to ions and initialize the qubits in the ground state of , namely, the product state , where , and is assumed to be negative. The unitary evolution under is realized by generating spin–spin interactions through spin-dependent optical dipole forces implemented by an applied laser field. This gives rise to effective long-range Ising couplings that fall off approximately as (24). The power-law exponent and the interaction strengths vary in the range (0.3–0.57) kHz, depending on the system size and the experimental realization (see SI Appendix for details). The unitary evolution under is generated by applying a global rotation around the axis of the Bloch sphere.
After each run of the algorithm, we performed a projective measurement of each spin in the basis to measure () (Fig. 1). Measurements in the and bases were carried out by performing a rotation about the () axis of the Bloch sphere, illuminating the ions with resonant laser light, and collecting the -dependent fluorescence on a camera with site-resolved imaging. The energy was calculated by combining the measurements of the two-body correlators and the total magnetization along the axis , where the indices ranged from one to . We benchmarked the experimental outcome with the ground-state of the target Hamiltonian (Eq. 1), calculated numerically with exact diagonalization or Density Matrix Renormalization Group (DMRG) (25). In order to quantify the performance of the QAOA, we used the dimensionless quantity
[3] |
where is the energy of the highest excited state. This choice maps the entire many-body spectrum to the interval. In the following, we show that the best experimental performance is close to the theoretical performance , which itself is less than unity for a finite number of QAOA layers.
Quantum Hamiltonian Optimization
We first focused on the optimization of the full quantum problem, where two variational parameters ( and ) are used to minimize the energy of the Hamiltonian (Eq. 1). In this case, the time-evolved one- and two-point correlation functions can be efficiently computed (26, 27). This leads to a general formula for the energy expectation under a state produced by the QAOA that is used to compute the theoretical performance of the algorithm (SI Appendix). In Fig. 2A, we show an experimental exhaustive search over the parameter space and compare it to the theoretical performance of the algorithm, showing good agreement for qubits. We also compare the performance of our algorithm as a function of with the expected QAOA performance (Fig. 2B).
As shown in ref. 21, for transverse field greater than the critical value, the ground state is a low-entanglement paramagnet, whereas below the critical point, the ground state is an entangled superposition of antiferromagnetic states. We located this critical point at for 20 qubits by computing the half-chain entanglement entropy of the ground state numerically, where is the half-chain reduced density matrix. As shown in Fig. 2B, while the experimental performance was when is above the critical point, the gain relative to the initial state was modest. On the other hand, below the critical point, the target state is more entangled, which allows for a larger experimental performance gain, at the expense of a reduced absolute performance. In order to quantitatively assess the gain over the finite initial-state performance, we introduced a performance natural scale based on the quantity —namely, the SD around the mean performance achieved implementing a QAOA algorithm with random angles (see SI Appendix for details). For and , . Our experimental performance at the critical point is more than 20 away from the initial state. On the other hand, the discrepancy between the ideal and experimental performance can be explained by taking into account our noise sources in the numerics (Fig. 2C and Combinatorial Optimization).
We investigated the performance of the QAOA algorithm as a function of the number of qubits. For each system size, we ensured that the spin–spin couplings had the same dependence on the qubit distance by varying the trap parameters (SI Appendix). As shown in Fig. 2 D, Inset, the half-chain entanglement entropy as a function of system size exhibited a peak located at , displaying the onset of the phase transition as tended to infinity. For all system sizes, we optimized the algorithm by performing a scan of the interaction angle and applying discrete variations of the mixing angle around the optimal value predicted by the theory. In Fig. 2D, we compare the optimal experimental and theoretical performances for different system sizes from 20 up to 40 qubits for fixed . We observed experimentally that the QAOA yielded a similar performance as a function of number of qubits, even if the algorithm runtime stayed approximately constant as the number of qubits increased. Numerically, we found that the performance scaled polynomially with and with the number of layers (28) (SI Appendix). Assuming that extrapolation to higher numbers of qubits holds, this scaling, combined with a polynomial-time search heuristic, suggests that for any desired energy threshold , our approach allows us to approximate the energy to a degree in time and number of layers that scale as .
We experimentally performed a search for the optimal QAOA performance using 20 qubits. Unlike the case, there is no known analytic formula to efficiently compute the energy. However, exploiting relationships between optimal angles as a function of increasing , we used a bootstrapping heuristic (see SI Appendix for details) that allows the experiment to identify a set of optimal angles faster than a global parameter search. The bootstrapping heuristic computes a guess for optimal angles at given optimal angles at lower . A local optimizer, such as the greedy gradient descent described below, is then needed to take this guess to the true optimum. Our heuristic method allows us to find variational parameters in time that scale polynomially with the number of layers and sublinearly in the number of qubits (when used in conjunction with the quantum device).
We started from the optimal guess and performed a fine scan of , while varying and in larger steps. The result is shown in Fig. 2D, where we plot the performances as a function of for every set of parameters used in the experiment. Fig. 2D also shows a color plot of all of the optimal energies found as a function of the other three parameters , and . The QAOA performance with 20 qubits is in agreement with the performance in system 2, taken with the same parameters (Fig. 2C). This indicates that decoherence and bit-flip errors (SI Appendix) accumulated during longer evolution times were already balancing out the expected performance gain of one additional optimization layer.
As a brute-force approach is inefficient, we implemented a closed-loop QAOA by interfacing the analog trapped-ion quantum simulator with a greedy gradient-descent algorithm to optimize the measured energy. In the QAOA, we can visualize the optimization trajectory on the theoretical performance surface, as shown in Fig. 3. Starting from a guess , we measured the approximate local gradient by performing the energy measurements in two orthogonal directions and to compute the new guess , where we measured the new energy on the quantum simulator. As shown in Fig. 3, the algorithm converged after about 10 iterations. Compared to an exhaustive search, the gradient descent used fewer queries to the quantum simulator and was therefore more robust to slow drifts in the experimental system. For this reason, we were able to achieve a better performance compared to the exhaustive search method.
Combinatorial Optimization
We further explored the performance of the trapped-ion system by investigating the combinatorial optimization of the classical Hamiltonian (Eq. 1 with ) approximately sampling the output of the QAOA, using high-fidelity, single-shot measurement of all of the qubits. It has been proven, under reasonable complexity-theoretic assumptions, that no classical algorithm can efficiently sample exactly from a sufficiently general class of QAOA circuits (8). Recent results (29, 30) suggest that this could also hold in the case of approximate sampling (SI Appendix). In this case, by measuring in the basis, it is possible to sample the probability distribution of all of the eigenstates of the Hamiltonian . We performed the experiment with 12 qubits so that we could both compute the expected QAOA theoretical output and also experimentally oversample the Hilbert space of all of the possible 212 = 4,096 possible outcomes. In Fig. 4A, we show on a log scale the QAOA eigenstates probability distribution using the optimal variational parameters and compare the experimental eigenstate histogram with the exact diagonalization prediction of the QAOA output state, sorting the eigenstates according to their energies.
However, sampling from the full QAOA output distribution is a daunting task, since the experimental outcome is extremely sensitive to fluctuations in the Hamiltonian parameters and to experimental errors caused by detection and phonon-assisted bit-flip events and unwanted effective magnetic fields along the direction of the Bloch sphere caused by uncompensated light shift (see also SI Appendix). Given our measured experimental parameters, we can calculate the effect of these errors on the quantum evolution, resulting in a good agreement with the experimental outcome, as shown in Fig. 4A.
Another useful way to compare numerics and experimental data is to implement the coarse-graining procedure of the Hilbert space proposed in ref. 31. After sorting in decreasing order the observed states according to their experimental probability, we iteratively grouped the states into “bubbles” of Hamming distance around the most probable state, producing a coarse-grained dataset. We then applied the same coarse-graining to the theoretical probability distribution and plotted the comparison in Fig. 4B. In this procedure, the Hamming-distance radius was varied to ensure that each bubble contained a comparable number of experimental shots, leading to bubbles of average Hamming distance . In order to quantitatively compare the coarse-grained experiment and the theory, we used two different metrics, namely, the total variation distance (TVD) and the Kullback–Leibler divergence (), defined as:
[4] |
[5] |
where is the experimental (theoretical) probability of observing the -th outcome. As shown in Fig. 4C, when the system is in the initial state, it is closer to a uniform probability distribution since is an equal superposition of all of the eigenstates of . Indeed, at , the TVD between the data and the uniform distribution is smaller than the one comparing the data and the ideal QAOA distribution . On the other hand, as the parameter was scanned, we observed a net decrease of both TVD and between the experiment and the QAOA ideal distribution , in agreement with the decrease in energy, computed by measuring one- and two-body correlators.
The variational quantum algorithm reported here, with up to 40 trapped-ion qubits, is the largest ever realized on a quantum device. We approximated the ground-state energy of a nontrivial quantum Hamiltonian, showing almost constant time scaling with the system size. Single-shot, high-efficiency qubit measurements in different bases gave access to the full distribution of bit-strings that is difficult or potentially impossible to model classically. With the addition of individual control over the interactions between qubits, as well as improvements to fidelity and system size, the variational quantum-classical hybrid approach can be employed in this experimental platform to give insight into quantum chemistry (32–34) and hard optimization problems (35), such as maximum-satisfiability or exact cover (36), or be used for the production of highly entangled states of metrological interest (37).
Data and Code Availability.
All study data are included in the article and SI Appendix.
Supplementary Material
Acknowledgments
We thank L.-M. Duan, Y. Wu, B. Fefferman, and S. Wang for illuminating discussions. The DMRG simulations were performed by using Open Source Matrix Product States. This work is supported by the Army Research Office (ARO) and Air Force Office of Scientific Research (AFOSR) Quantum Information Sciences (QIS) and Atomic and Molecular Physics programs; the AFOSR Multidisciplinary University Research Initiative (MURIs) on Quantum Measurement/Verification and Quantum Interactive Protocols; the ARO MURI on Modular Quantum Systems; the Intelligence Advanced Research Programs Activity (IARPA) Logical Qubits program; the National Science Foundation Practical Fully-Connected Quantum Computer STAQ program PHY-1818914; the Department of Energy (DOE) Basic Energy Sciences: Materials and Chemical Sciences for Quantum Information Science program DE-SC0019449 (optical design and instrumentation and theoretical analysis of sampling complexity); and the DOE High Energy Physics: Quantum Information Science Enabled Discovery Programs DE-0001893 (cryogenic vacuum chamber maintenance) and DE-SC0019139 (theoretical variational optimization analysis).
Footnotes
Competing interest statement: C.M. is co-founder and chief scientist of IonQ, a company that manufactures quantum computers. No IonQ employees, equipment, or other assets were involved with any aspect of the planning, design, execution, analysis, or reporting of this research.
This article contains supporting information online at https://www.pnas.org/lookup/suppl/doi:10.1073/pnas.2006373117/-/DCSupplemental.
Change History
August 16, 2021: The SI Appendix has been updated to coincide with a formal Correction.
References
- 1.Kadowaki T., Nishimori H., Quantum annealing in the transverse Ising model. Phys. Rev. E 58, 5355–5363 (1998). [Google Scholar]
- 2.Farhi E., Goldstone J., Gutmann S., Sipser M., Quantum computation by adiabatic evolution. arXiv:quant–ph/0001106 (28 January 2000).
- 3.Hastings M. B., Freedman M. H., Obstructions to classically simulating the quantum adiabatic algorithm. arXiv:1302.5733 (22 February 2013).
- 4.Richerme P., et al. , Experimental performance of a quantum simulator: Optimizing adiabatic evolution and identifying many-body ground states. Phys. Rev. A 88, 012334 (2013). [Google Scholar]
- 5.McClean J. R., Romero J., Babbush R., Aspuru-Guzik A., The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18, 023023 (2016). [Google Scholar]
- 6.Kokail C., et al. , Self-verifying variational quantum simulation of lattice models. Nature 569, 355–360 (2019). [DOI] [PubMed] [Google Scholar]
- 7.Farhi E., Goldstone J., Gutmann S., A quantum approximate optimization algorithm. arXiv:1411.4028 (14 November 2014).
- 8.Farhi E., Harrow A. W., Quantum supremacy through the quantum approximate optimization algorithm. arXiv:1602.07674 (24 February 2016).
- 9.Lloyd S., Quantum approximate optimization is computationally universal. arXiv:1812.11075 (28 December 2018).
- 10.Preskill J., Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018). [Google Scholar]
- 11.Zhou L., Wang S. T., Choi S., Pichler H., Lukin M. D., Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices. arXiv:1812.01041 (3 December 2018).
- 12.Hastings M. B., Classical and quantum bounded depth approximation algorithms. arXiv:1905.07047 (16 May 2019).
- 13.Bapat A., Jordan S., Bang-bang control as a design principle for classical and quantum optimization algorithms. arXiv:1812.02746 (6 December 2018).
- 14.Verdon G., Pye J., Broughton M., A universal training algorithm for quantum deep learning. arXiv:1806.09729 (25 June 2018).
- 15.Jiang Z., Rieffel E. G., Wang Z., Near-optimal quantum circuit for Grover’s unstructured search using a transverse field. Phys. Rev. A 95, 062317 (2017). [Google Scholar]
- 16.Wang Z., Hadfield S., Jiang Z., Rieffel E. G., Quantum approximate optimization algorithm for Maxcut: A fermionic view. Phys. Rev. A 97, 022304 (2018). [Google Scholar]
- 17.Crooks G. E., Performance of the quantum approximate optimization algorithm on the maximum cut problem. arXiv:1811.08419 (20 November 2018).
- 18.Mbeng G. B., Fazio R., Santoro G., Quantum annealing: A journey through digitalization, control, and hybrid quantum variational schemes. arXiv:1906.08948 (21 June 2019).
- 19.Ho W. W., Hsieh T. H., Efficient variational simulation of non-trivial quantum states. SciPost Phys. 6, 29 (2019). [Google Scholar]
- 20.Ho W. W., Jonay C., Hsieh T. H., Ultrafast state preparation via the quantum approximate optimization algorithm with long range interactions. arXiv:1810.04817 (11 October 2018).
- 21.Koffel T., Lewenstein M., Tagliacozzo L., Entanglement entropy for the long-range Ising chain in a transverse field. Phys. Rev. Lett. 109, 267203 (2012). [DOI] [PubMed] [Google Scholar]
- 22.Kim K., et al. , Entanglement and tunable spin-spin couplings between trapped ions using multiple transverse modes. Phys. Rev. Lett. 103, 120502 (2009). [DOI] [PubMed] [Google Scholar]
- 23.Pagano G., et al. , Cryogenic trapped-ion system for large scale quantum simulation. Quantum Sci. Technol. 4, 014004 (2019). [Google Scholar]
- 24.Porras D., Cirac J. I., Effective quantum spin systems with trapped ions. Phys. Rev. Lett. 92, 207901 (2004). [DOI] [PubMed] [Google Scholar]
- 25.Jaschke D., Wall M. L., Carr L. D., Open source matrix product states: Opening ways to simulate entangled many-body quantum systems in one dimension. Comput. Phys. Commun. 225, 59–91 (2018). [Google Scholar]
- 26.Dylewsky D., Freericks J., Wall M., Rey A., Foss-Feig M., Nonperturbative calculation of phonon effects on spin squeezing. Phys. Rev. A 93, 013415 (2016). [Google Scholar]
- 27.Hadfield S., Quantum algorithms for scientific computing and approximate optimization. arXiv:1805.03265 (8 May 2018).
- 28.Wauters M. M., Mbeng G. B., Santoro G. E., Polynomial scaling of QAOA for ground-state preparation: Taming first-order phase transitions. arXiv 2003.07419 (16 March 2020).
- 29.Bremner M. J., Montanaro A., Shepherd D. J., Average-case complexity versus approximate simulation of commuting quantum computations. Phys. Rev. Lett. 117, 080501 (2016). [DOI] [PubMed] [Google Scholar]
- 30.Bouland A., Fefferman B., Nirkhe C., Vazirani U., On the complexity and verification of quantum random circuit sampling. Nat. Phys. 15, 159–163 (2019). [Google Scholar]
- 31.Wang S. T., Duan L. M., Certification of boson sampling devices with coarse-grained measurements. arXiv 1601.02627 (11 January 2016).
- 32.Kandala A., et al. , Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature 549, 242–246 (2017). [DOI] [PubMed] [Google Scholar]
- 33.Hempel C., et al. , Quantum chemistry calculations on a trapped-ion quantum simulator. Phys. Rev. X 8, 031022 (2018). [Google Scholar]
- 34.Nam Y., et al. , Ground-state energy estimation of the water molecule on a trapped ion quantum computer. arXiv:1902.10171 (26 February 2019).
- 35.Otterbach J. S., et al. , Unsupervised machine learning on a hybrid quantum computer. arXiv:1712.05771 (15 December 2017).
- 36.Farhi E., et al. , A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem. Science 292, 472–475 (2001). [DOI] [PubMed] [Google Scholar]
- 37.Giovannetti V., Lloyd S., Maccone L., Advances in quantum metrology. Nat. Photon. 5, 222–229 (2011). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
All study data are included in the article and SI Appendix.