Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Classical algorithms for quantum mean values


Quantum algorithms hold the promise of solving certain computational problems dramatically faster than their classical counterparts. The latest generation of quantum processors with ~50 qubits are expected to be at the brink of outperforming classical computers. However, due to the lack of fault tolerance, the qubits can be operated for only a few time steps, making the quantum circuits shallow in depth. Variational quantum algorithms are leading candidates in the effort to find shallow-depth quantum algorithms that outperform classical computers. Here we consider the task of computing the mean values of multi-qubit observables, which is a cornerstone of variational quantum algorithms for optimization, machine learning and the simulation of quantum many-body systems. We develop sub-exponential time classical algorithms for solving the quantum mean value problem for general classes of quantum observables and constant-depth quantum circuits. In the special case of geometrically local two-dimensional quantum circuits, the runtime of our algorithm scales linearly with the number of qubits. Our results demonstrate that appropriate choices of circuit parameters such as geometric locality and depth are essential to obtain quantum speed-ups based on variational quantum algorithms.

This is a preview of subscription content

Access options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Causality for 2D constant-depth circuits.

Data availability

No datasets were generated or analysed during the current study.


  1. 1.

    Feynman, R. P. Simulating physics with computers. Int. J. Theor. Phys. 21, 467–488 (1982).

    MathSciNet  Article  Google Scholar 

  2. 2.

    Shor, P. W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 41, 303–332 (1999).

    ADS  MathSciNet  Article  Google Scholar 

  3. 3.

    Rivest, R. L., Shamir, A. & Adleman, L. A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 21, 120–126 (1978).

    MathSciNet  Article  Google Scholar 

  4. 4.

    Preskill, J. Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018).

    Article  Google Scholar 

  5. 5.

    Castelvecchi, D. IBM’s quantum cloud computer goes commercial. Nature 543, 159 (2017).

    ADS  Article  Google Scholar 

  6. 6.

    Arute, F. et al. Quantum supremacy using a programmable superconducting processor. Nature 574, 505–510 (2019).

    ADS  Article  Google Scholar 

  7. 7.

    Peruzzo, A. et al. A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5, 4213 (2014).

    ADS  Article  Google Scholar 

  8. 8.

    Kandala, A. et al.Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature 549, 242–246 (2017).

    ADS  Article  Google Scholar 

  9. 9.

    McClean, J. R., Romero, J., Babbush, R. & Aspuru-Guzik, A. The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18, 023023 (2016).

    ADS  Article  Google Scholar 

  10. 10.

    Nam, Y. et al. Ground-state energy estimation of the water molecule on a trapped-ion quantum computer. npj Quantum Inf. 6, 1–6 (2020).

    Article  Google Scholar 

  11. 11.

    Schuld, M. & Killoran, N. Quantum machine learning in feature Hilbert spaces. Phys. Rev. Lett. 122, 040504 (2019).

    ADS  Article  Google Scholar 

  12. 12.

    Havlíček, V. et al. Supervised learning with quantum-enhanced feature spaces. Nature 567, 209–212 (2019).

    ADS  Article  Google Scholar 

  13. 13.

    Temme, K., Bravyi, S. & Gambetta, J. M. Error mitigation for short-depth quantum circuits. Phys. Rev. Lett. 119, 180509 (2017).

    ADS  MathSciNet  Article  Google Scholar 

  14. 14.

    Li, Y. & Benjamin, S. C. Efficient variational quantum simulator incorporating active error minimization. Phys. Rev. X 7, 021050 (2017).

    Google Scholar 

  15. 15.

    Endo, S., Benjamin, S. & Li, Y. Practical quantum error mitigation for near-future applications. Phys. Rev. X 8, 031027 (2018).

    Google Scholar 

  16. 16.

    Otten, M. & Gray, S. K. Recovering noise-free quantum observables. Phys. Rev. A 99, 012338 (2019).

    ADS  Article  Google Scholar 

  17. 17.

    Bonet-Monroig, X., Sagastizabal, R., Singh, M. & O’Brien, T. E. Low-cost error mitigation by symmetry verification. Phys. Rev. A 98, 062339 (2018).

    ADS  Article  Google Scholar 

  18. 18.

    Kandala, A. et al. Extending the computational reach of a noisy superconducting quantum processor. Nature 567, 491 (2019).

    ADS  Article  Google Scholar 

  19. 19.

    Terhal, B. M. & DiVincenzo, D. P. Adptive quantum computation, constant depth quantum circuits and Arthur–Merlin games. Quantum Inf. Comput. 4, 134–145 (2004).

    MathSciNet  MATH  Google Scholar 

  20. 20.

    Goldberg, L. A. & Guo, H. The complexity of approximating complex-valued Ising and Tutte partition functions. Comput. Complex. 26, 765–833 (2017).

    MathSciNet  Article  Google Scholar 

  21. 21.

    Markov, I. L. & Shi, Y. Simulating quantum computation by contracting tensor networks. SIAM J. Comput. 38, 963–981 (2008).

    MathSciNet  Article  Google Scholar 

  22. 22.

    Pednault, E. et al. Breaking the 49-qubit barrier in the simulation of quantum circuits. Preprint at (2017).

  23. 23.

    Boixo, S., Isakov, S. V., Smelyanskiy, V. N. & Neven, H. Simulation of low-depth quantum circuits as complex undirected graphical models. Preprint at (2017).

  24. 24.

    Villalonga, B. et al. Establishing the quantum supremacy frontier with a 281 pflop/s simulation. Quantum Sci. Technol. 5, 034003 (2020).

    ADS  Article  Google Scholar 

  25. 25.

    Aaronson, S. & Chen, L. Complexity-theoretic foundations of quantum supremacy experiments. Preprint at (2016).

  26. 26.

    Van den Nest, M. Simulating quantum computers with probabilistic methods. Preprint at (2009).

  27. 27.

    Eldar, L. & Harrow, A. W. Local Hamiltonians whose ground states are hard to approximate. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS) 427–438 (IEEE, 2017).

  28. 28.

    Buhrman, H., Cleve, R., De Wolf, R. & Zalka, C. Bounds for small-error and zero-error quantum algorithms. In 40th Annual Symposium on Foundations of Computer Science 358–368 (IEEE, 1999).

  29. 29.

    de Wolf, R. A note on quantum algorithms and the minimal degree of epsilon-error polynomials for symmetric functions. Preprint at (2008).

  30. 30.

    Barvinok, A. Combinatorics and Complexity of Partition Functions Vol. 276 (Springer, 2016).

  31. 31.

    Erdős, P. & Lovász, L. Problems and results on 3-chromatic hypergraphs and some related questions. In Colloqua Mathematica Societatis Janos Bolyai 10. Infinite and Finite Sets, Keszthely (Hungary) (Citeseer, 1973).

  32. 32.

    Mann, R. L. & Bremner, M. J. Approximation algorithms for complex-valued ising models on bounded degree graphs. Quantum 3, 162 (2019).

    Article  Google Scholar 

  33. 33.

    Kim, I. H. Holographic quantum simulation. Preprint at (2017).

  34. 34.

    Kim, I. H. Noise-resilient preparation of quantum many-body ground states. Preprint at (2017).

  35. 35.

    Boixo, S. et al. Characterizing quantum supremacy in near-term devices. Nat. Phys. 14, 595–600 (2018).

    Article  Google Scholar 

  36. 36.

    Bouland, A., Fefferman, B., Nirkhe, C. & Vazirani, U. On the complexity and verification of quantum random circuit sampling. Nat. Phys. 15, 159–163 (2019).

    Article  Google Scholar 

  37. 37.

    Movassagh, R. Quantum supremacy and random circuits. Preprint at (2019).

  38. 38.

    Vidal, G. Efficient classical simulation of slightly entangled quantum computations. Phys. Rev. Lett. 91, 147902 (2003).

    ADS  Article  Google Scholar 

  39. 39.

    Yoran, N. & Short, A. J. Classical simulation of limited-width cluster-state quantum computation. Phys. Rev. Lett. 96, 170503 (2006).

    ADS  Article  Google Scholar 

  40. 40.

    Jozsa, R. On the simulation of quantum circuits. Preprint at (2006).

  41. 41.

    Schollwöck, U. The density-matrix renormalization group in the age of matrix product states. Ann. Phys. 326, 96–192 (2011).

    ADS  MathSciNet  Article  Google Scholar 

  42. 42.

    Beals, R., Buhrman, H., Cleve, R., Mosca, M. & De Wolf, R. Quantum lower bounds by polynomials. J. ACM 48, 778–797 (2001).

    MathSciNet  Article  Google Scholar 

  43. 43.

    Kahn, J., Linial, N. & Samorodnitsky, A. Inclusion–exclusion: exact and approximate. Combinatorica 16, 465–477 (1996).

    MathSciNet  Article  Google Scholar 

  44. 44.

    Linial, N. & Nisan, N. Approximate inclusion–exclusion. Combinatorica 10, 349–365 (1990).

    MathSciNet  Article  Google Scholar 

  45. 45.

    Aliferis, P., Gottesman, D. & Preskill, J. Accuracy threshold for postselected quantum computation. Quantum Inf. Comput. 8, 181–244 (2008).

    MathSciNet  MATH  Google Scholar 

Download references


We thank R. Koenig and K. Temme for helpful discussions. R.M. thanks A. Barvinok for discussions. D.G. acknowledges the support of the Natural Sciences and Engineering Research Council of Canada (NSERC) under Discovery grant no. RGPIN-2019-04198. D.G. is a CIFAR fellow in the Quantum Information Science programme and is also supported in part by IBM Research. S.B. and R.M. acknowledge the support of the IBM Research Frontiers Institute and funding from the MIT-IBM Watson AI Lab under the project Machine Learning in Hilbert Space.

Author information




All authors contributed important ideas during initial discussions and contributed equally to deriving the technical proofs and writing the manuscript.

Corresponding author

Correspondence to Ramis Movassagh.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Physics thanks Xiao Yuan and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary Information

Supplementary text and table.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Bravyi, S., Gosset, D. & Movassagh, R. Classical algorithms for quantum mean values. Nat. Phys. 17, 337–341 (2021).

Download citation


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing