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.

  • Article
  • Published:

A rigorous and robust quantum speed-up in supervised machine learning


Recently, several quantum machine learning algorithms have been proposed that may offer quantum speed-ups over their classical counterparts. Most of these algorithms are either heuristic or assume that data can be accessed quantum-mechanically, making it unclear whether a quantum advantage can be proven without resorting to strong assumptions. Here we construct a classification problem with which we can rigorously show that heuristic quantum kernel methods can provide an end-to-end quantum speed-up with only classical access to data. To prove the quantum speed-up, we construct a family of datasets and show that no classical learner can classify the data inverse-polynomially better than random guessing, assuming the widely believed hardness of the discrete logarithm problem. Furthermore, we construct a family of parameterized unitary circuits, which can be efficiently implemented on a fault-tolerant quantum computer, and use them to map the data samples to a quantum feature space and estimate the kernel entries. The resulting quantum classifier achieves high accuracy and is robust against additive errors in the kernel entries that arise from finite sampling statistics.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Quantum kernel estimation.
Fig. 2: Learning concept class \({\mathcal{C}}\) by a quantum feature map.

Similar content being viewed by others

Data availability

Data sharing is not applicable to this paper as no datasets were generated or analysed during the current study.


  1. Biamonte, J. et al. Quantum machine learning. Nature 549, 195–202 (2017).

    Article  ADS  Google Scholar 

  2. Arunachalam, S. & de Wolf, R. Guest column: a survey of quantum learning theory. SIGACT News 48, 41–67 (2017).

    Article  MathSciNet  Google Scholar 

  3. Dunjko, V. & Briegel, H. J. Machine learning & artificial intelligence in the quantum domain: a review of recent progress. Rep. Prog. Phys. 81, 074001 (2018).

    Article  ADS  MathSciNet  Google Scholar 

  4. Ciliberto, C. et al. Quantum machine learning: a classical perspective. Proc. R. Soc. A. 474, 20170551 (2018).

    Article  ADS  MathSciNet  Google Scholar 

  5. Carleo, G. et al. Machine learning and the physical sciences. Rev. Mod. Phys. 91, 045002 (2019).

    Article  ADS  Google Scholar 

  6. Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103, 150502 (2009).

    Article  ADS  MathSciNet  Google Scholar 

  7. Wiebe, N., Braun, D. & Lloyd, S. Quantum algorithm for data fitting. Phys. Rev. Lett. 109, 050505 (2012).

    Article  ADS  Google Scholar 

  8. Lloyd, S., Mohseni, M. & Rebentrost, P. Quantum algorithms for supervised and unsupervised machine learning. Preprint at (2013).

  9. Lloyd, S., Mohseni, M. & Rebentrost, P. Quantum principal component analysis. Nat. Phys. 10, 631–633 (2014).

    Article  Google Scholar 

  10. Rebentrost, P., Mohseni, M. & Lloyd, S. Quantum support vector machine for big data classification. Phys. Rev. Lett. 113, 130503 (2014).

    Article  ADS  Google Scholar 

  11. Lloyd, S., Garnerone, S. & Zanardi, P. Quantum algorithms for topological and geometric analysis of data. Nat. Commun. 7, 10138 (2016).

    Article  ADS  Google Scholar 

  12. Cong, I. & Duan, L. Quantum discriminant analysis for dimensionality reduction and classification. New J. Phys. 18, 073011 (2016).

    Article  ADS  Google Scholar 

  13. Kerenidis, I. & Prakash, A. Quantum recommendation systems. In Proc. 8th Innovations in Theoretical Computer Science Conference, Leibniz International Proc. Informatics Vol. 67 (ed. Papadimitriou, C. H.) 49:1–49:21 (Schloss Dagstuhl—Leibniz-Zentrum für Informatik, 2017).

  14. Brandão, F. G. S. L. et al. Quantum SDP solvers: large speed-ups, optimality and applications to quantum learning. In Proc. 46th International Colloquium on Automata, Languages and Programming, Leibniz International Proc. Informatics Vol. 132 (eds Baier, C. et al.) 27:1–27:14 (Schloss Dagstuhl—Leibniz-Zentrum für Informatik, 2019);

  15. Rebentrost, P., Steffens, A., Marvian, I. & Lloyd, S. Quantum singular-value decomposition of nonsparse low-rank matrices. Phys. Rev. A 97, 012327 (2018).

    Article  ADS  MathSciNet  Google Scholar 

  16. Zhao, Z., Fitzsimons, J. K. & Fitzsimons, J. F. Quantum-assisted Gaussian process regression. Phys. Rev. A 99, 052331 (2019).

    Article  ADS  Google Scholar 

  17. Aaronson, S. Read the fine print. Nat. Phys. 11, 291–293 (2015).

    Article  Google Scholar 

  18. Tang, E. A quantum-inspired classical algorithm for recommendation systems. In Proc. 51st Annual ACM SIGACT Symposium on Theory of Computing (eds Charikar, M. & Cohen, E.) 217–228 (ACM, 2019);

  19. Tang, E. Quantum-inspired classical algorithms for principal component analysis and supervised clustering. Preprint at (2018).

  20. Chia, N.-H. et al. Quantum-inspired algorithms for solving low-rank linear equation systems with logarithmic dependence on the dimension. In 31st International Symposium on Algorithms and Computation, Leibniz International Proc. Informatics Vol. 181 (eds Cao, Y. et al) 47:1–47:17 (Schloss Dagstuhl—Leibniz-Zentrum für Informatik, 2020);

  21. Ding, C., Bao, T.-Y. & Huang, H.-L. Quantum-inspired support vector machine. In IEEE Transactions on Neural Networks and Learning Systems 1–13 (IEEE, 2021);

  22. Chia, N.-H. et al. Sampling-based sublinear low-rank matrix arithmetic framework for dequantizing quantum machine learning. In Proc. 52nd Annual ACM SIGACT Symposium on Theory of Computing (eds Makarychev, K. et al.) 387–400 (ACM, 2020);

  23. Mitarai, K., Negoro, M., Kitagawa, M. & Fujii, K. Quantum circuit learning. Phys. Rev. A 98, 032309 (2018).

    Article  ADS  Google Scholar 

  24. Farhi, E. & Neven, H. Classification with quantum neural networks on near term processors. Preprint at (2018).

  25. Schuld, M., Bocharov, A., Svore, K. M. & Wiebe, N. Circuit-centric quantum classifiers. Phys. Rev. A 101, 032308 (2020).

    Article  ADS  MathSciNet  Google Scholar 

  26. Liu, J.-G. & Wang, L. Differentiable learning of quantum circuit born machines. Phys. Rev. A 98, 062324 (2018).

    Article  ADS  Google Scholar 

  27. Dallaire-Demers, P.-L. & Killoran, N. Quantum generative adversarial networks. Phys. Rev. A 98, 012324 (2018).

    Article  ADS  Google Scholar 

  28. Lloyd, S. & Weedbrook, C. Quantum generative adversarial learning. Phys. Rev. Lett. 121, 040502 (2018).

    Article  ADS  MathSciNet  Google Scholar 

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

    Article  ADS  Google Scholar 

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

    Article  ADS  Google Scholar 

  31. Vapnik, V. The Nature of Statistical Learning Theory (Springer Science & Business Media, 2013).

  32. Shawe-Taylor, J. & Cristianini, N. On the generalization of soft margin algorithms. IEEE Trans. Inf. Theory 48, 2721–2735 (2002).

    Article  MathSciNet  Google Scholar 

  33. Kearns, M. J. The Computational Complexity of Machine Learning (MIT Press, 1990).

  34. Servedio, R. A. & Gortler, S. J. Equivalences and separations between quantum and classical learnability. SIAM J. Comput. 33, 1067–1092 (2004).

    Article  MathSciNet  Google Scholar 

  35. Sweke, R., Seifert, J.-P., Hangleiter, D. & Eisert, J. On the quantum versus classical learnability of discrete distributions. Quantum 5, 417 (2021).

    Article  Google Scholar 

  36. Harrow, A. W. Small quantum computers and large classical data sets. Preprint at (2020).

  37. Gao, X., Zhang, Z.-Y. & Duan, L.-M. A quantum machine learning algorithm based on generative models. Sci. Adv. 4, eaat9004 (2018).

    Article  ADS  Google Scholar 

  38. Shawe-Taylor, J. & Cristianini, N. Kernel Methods for Pattern Analysis (Cambridge Univ. Press, 2004).

  39. Kearns, M. J. & Vazirani, U. V. An Introduction to Computational Learning Theory (MIT Press, 1994).

  40. Shor, P. W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 26, 1484–1509 (1997).

    Article  MathSciNet  Google Scholar 

  41. Blum, M. & Micali, S. How to generate cryptographically strong sequences of pseudo-random bits. SIAM J. Comput. 13, 850–864 (1984).

    Article  MathSciNet  Google Scholar 

  42. Aharonov, D. & Ta-Shma, A. Adiabatic quantum state generation. SIAM J. Comput. 37, 47–82 (2007).

    Article  MathSciNet  Google Scholar 

  43. Daniel, J. W. Stability of the solution of definite quadratic programs. Math. Program. 5, 41–53 (1973).

    Article  MathSciNet  Google Scholar 

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

    Article  ADS  MathSciNet  Google Scholar 

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

    Google Scholar 

  46. Kandala, A. et al. Error mitigation extends the computational reach of a noisy quantum processor. Nature 567, 491–495 (2019).

    Article  ADS  Google Scholar 

  47. Kusumoto, T., Mitarai, K., Fujii, K., Kitagawa, M. & Negoro, M. Experimental quantum kernel trick with nuclear spins in a solid. npj Quantum Inf. 7, 92 (2021).

    Article  ADS  Google Scholar 

  48. Bartkiewicz, K. et al. Experimental kernel-based quantum machine learning in finite feature space. Sci. Rep. 10, 12356 (2020).

    Article  ADS  Google Scholar 

  49. Peters, E. et al. Machine learning of high dimensional data on a noisy quantum processor. Preprint at (2021).

Download references


We thank S. Bravyi and R. Kothari for helpful comments and discussions. Y.L. was supported by DOE NQISRC QSA grant number FP00010905, Vannevar Bush faculty fellowship N00014-17-1-3025 and NSF award DMR-1747426. Part of this work was done when Y.L. was a research intern at IBM. S.A. and K.T. acknowledge support from the MIT-IBM Watson AI Lab under the project ‘Machine Learning in Hilbert Space’, the IBM Research Frontiers Institute and ARO grant W911NF-20-1-0014.

Author information

Authors and Affiliations



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

Corresponding author

Correspondence to Kristan Temme.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review informationNature Physics thanks Ewin Tang and Zhikuan Zhao 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

Additional proof details and derivations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, Y., Arunachalam, S. & Temme, K. A rigorous and robust quantum speed-up in supervised machine learning. Nat. Phys. 17, 1013–1017 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

This article is cited by


Quick links

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

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