Quantum-inspired algorithms in practice

Juan Miguel Arrazola1, Alain Delgado1, Bhaskar Roy Bardhan1, and Seth Lloyd1,2

1Xanadu, Toronto, Ontario, M5G 2C8, Canada
2Massachusetts Institute of Technology, Department of Mechanical Engineering, 77 Massachusetts Avenue, Cambridge, Massachusetts 02139, USA

Find this paper interesting or want to discuss? Scite or leave a comment on SciRate.


We study the practical performance of quantum-inspired algorithms for recommendation systems and linear systems of equations. These algorithms were shown to have an exponential asymptotic speedup compared to previously known classical methods for problems involving low-rank matrices, but with complexity bounds that exhibit a hefty polynomial overhead compared to quantum algorithms. This raised the question of whether these methods were actually useful in practice. We conduct a theoretical analysis aimed at identifying their computational bottlenecks, then implement and benchmark the algorithms on a variety of problems, including applications to portfolio optimization and movie recommendations. On the one hand, our analysis reveals that the performance of these algorithms is better than the theoretical complexity bounds would suggest. On the other hand, their performance as seen in our implementation degrades noticeably as the rank and condition number of the input matrix are increased. Overall, our results indicate that quantum-inspired algorithms can perform well in practice provided that stringent conditions are met: low rank, low condition number, and very large dimension of the input matrix. By contrast, practical datasets are often sparse and high-rank, precisely the type that can be handled by quantum algorithms.

Please see this blog post for a summary of the work.

► BibTeX data

► References

[1] Boaz Barak, Ankur Moitra, Ryan O'Donnell, Prasad Raghavendra, Oded Regev, David Steurer, Luca Trevisan, Aravindan Vijayaraghavan, David Witmer, and John Wright. Beating the random assignment on constraint satisfaction problems of bounded degree. arXiv:1505.03424, 2015. URL https:/​/​arxiv.org/​abs/​1505.03424.

[2] Jacob Biamonte, Peter Wittek, Nicola Pancotti, Patrick Rebentrost, Nathan Wiebe, and Seth Lloyd. Quantum machine learning. Nature, 549 (7671): 195, 2017. 10.1038/​nature23474.

[3] L Chakhmakhchyan, NJ Cerf, and R Garcia-Patron. Quantum-inspired algorithm for estimating the permanent of positive semidefinite matrices. Physical Review A, 96 (2): 022329, 2017. 10.1103/​PhysRevA.96.022329.

[4] Nai-Hui Chia, Han-Hsuan Lin, and Chunhao Wang. Quantum-inspired sublinear classical algorithms for solving low-rank linear systems. arXiv:1811.04852, 2018. URL https:/​/​arxiv.org/​abs/​1811.04852.

[5] Nai-Hui Chia, Tongyang Li, Han-Hsuan Lin, and Chunhao Wang. Quantum-inspired classical sublinear-time algorithm for solving low-rank semidefinite programming via sampling approaches. arXiv:1901.03254, 2019. URL https:/​/​arxiv.org/​abs/​1901.03254.

[6] AV Abs da Cruz, Marley Maria Bernardes Rebuzzi Vellasco, and Marco Aurélio Cavalcanti Pacheco. Quantum-inspired evolutionary algorithm for numerical optimization. In Hybrid evolutionary algorithms, pages 19–37. Springer, 2007. 10.1007/​978-3-540-73297-6_2.

[7] Yogesh Dahiya, Dimitris Konomis, and David P Woodruff. An empirical evaluation of sketching for numerical linear algebra. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1292–1300. ACM, 2018. 10.1145/​3219819.3220098.

[8] Petros Drineas, Ravi Kannan, and Michael W Mahoney. Fast monte carlo algorithms for matrices ii: Computing a low-rank approximation to a matrix. SIAM Journal on computing, 36 (1): 158–183, 2006. 10.1137/​S0097539704442696.

[9] Alan Frieze, Ravi Kannan, and Santosh Vempala. Fast monte-carlo algorithms for finding low-rank approximations. Journal of the ACM (JACM), 51 (6): 1025–1041, 2004. 10.1145/​1039488.1039494.

[10] András Gilyén, Seth Lloyd, and Ewin Tang. Quantum-inspired low-rank stochastic regression with logarithmic dependence on the dimension. arXiv:1811.04909, 2018. URL https:/​/​arxiv.org/​abs/​1811.04909.

[11] Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53 (2): 217–288, 2011. 10.1137/​090771806.

[12] Kuk-Hyun Han and Jong-Hwan Kim. Quantum-inspired evolutionary algorithm for a class of combinatorial optimization. IEEE transactions on evolutionary computation, 6 (6): 580–593, 2002. 10.1109/​TEVC.2002.804320.

[13] F Maxwell Harper and Joseph A Konstan. The movielens datasets: History and context. ACM Transactions on Interactive Intelligent Systems (TIIS), 5 (4): 19, 2016. 10.1145/​2827872.

[14] Aram W Harrow, Avinatan Hassidim, and Seth Lloyd. Quantum algorithm for linear systems of equations. Physical Review Letters, 103 (15): 150502, 2009. 10.1103/​PhysRevLett.103.150502.

[15] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-SAT. Journal of Computer and System Sciences, 62 (2): 367–375, 2001. 10.1006/​jcss.2000.1727.

[16] Iordanis Kerenidis and Anupam Prakash. Quantum recommendation systems. arXiv:1603.08675, 2016. URL https:/​/​arxiv.org/​abs/​1603.08675.

[17] Seth Lloyd, Masoud Mohseni, and Patrick Rebentrost. Quantum principal component analysis. Nature Physics, 10 (9): 631, 2014. 10.1038/​nphys3029.

[18] Harry Markowitz. Portfolio selection. The Journal of Finance, 7 (1): 77–91, 1952.

[19] Per-Gunnar Martinsson, Vladimir Rokhlin, and Mark Tygert. A randomized algorithm for the decomposition of matrices. Applied and Computational Harmonic Analysis, 30 (1): 47–68, 2011. 10.1016/​j.acha.2007.12.002.

[20] Ajit Narayanan and Mark Moore. Quantum-inspired genetic algorithms. In Evolutionary Computation, 1996., Proceedings of IEEE International Conference on, pages 61–66. IEEE, 1996. 10.1109/​ICEC.1996.542334.

[21] Cam Nugent. S and P 500 stock data. 2018. URL https:/​/​www.kaggle.com/​camnugent/​sandp500.

[22] Patrick Rebentrost and Seth Lloyd. Quantum computational finance: quantum algorithm for portfolio optimization. arXiv:1811.03975, 2018. URL https:/​/​arxiv.org/​abs/​1811.03975.

[23] Patrick Rebentrost, Masoud Mohseni, and Seth Lloyd. Quantum support vector machine for big data classification. Physical Review Letters, 113 (13): 130503, 2014. 10.1103/​PhysRevLett.113.130503.

[24] Vladimir Rokhlin and Mark Tygert. A fast randomized algorithm for overdetermined linear least-squares regression. Proceedings of the National Academy of Sciences, 105 (36): 13212–13217, 2008. 10.1073/​pnas.0804869105.

[25] Vladimir Rokhlin, Arthur Szlam, and Mark Tygert. A randomized algorithm for principal component analysis. SIAM Journal on Matrix Analysis and Applications, 31 (3): 1100–1124, 2009. 10.1137/​080736417.

[26] Troels F Rønnow, Zhihui Wang, Joshua Job, Sergio Boixo, Sergei V Isakov, David Wecker, John M Martinis, Daniel A Lidar, and Matthias Troyer. Defining and detecting quantum speedup. Science, 345 (6195): 420–424, 2014. 10.1126/​science.1252319.

[27] Tamas Sarlos. Improved approximation algorithms for large matrices via random projections. In Foundations of Computer Science, 2006. FOCS'06. 47th Annual IEEE Symposium on, pages 143–152. IEEE, 2006. 10.1109/​FOCS.2006.37.

[28] Jianhong Shen. On the singular values of Gaussian random matrices. Linear Algebra and its Applications, 326 (1): 1 – 14, 2001. ISSN 0024-3795. 10.1016/​S0024-3795(00)00322-0.

[29] Allan Sly and Nike Sun. The computational hardness of counting in two-spin models on d-regular graphs. In Foundations of Computer Science (FOCS), 2012 IEEE 53rd Annual Symposium on, pages 361–369. IEEE, 2012. 10.1109/​FOCS.2012.56.

[30] Ewin Tang. Quantum-inspired classical algorithms for principal component analysis and supervised clustering. arXiv:1811.00414, 2018. URL https:/​/​arxiv.org/​abs/​1811.00414.

[31] Ewin Tang. A quantum-inspired classical algorithm for recommendation systems. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, pages 217–228, 2019. 10.1145/​3313276.3316310.

[32] Leslie G Valiant. Holographic algorithms. SIAM Journal on Computing, 37 (5): 1565–1594, 2008. 10.1137/​070682575.

[33] David P Woodruff et al. Sketching as a tool for numerical linear algebra. Foundations and Trends® in Theoretical Computer Science, 10 (1–2): 1–157, 2014. 10.1561/​0400000060.

[34] Franco Woolfe, Edo Liberty, Vladimir Rokhlin, and Mark Tygert. A fast randomized algorithm for the approximation of matrices. Applied and Computational Harmonic Analysis, 25 (3): 335–366, 2008. 10.1016/​j.acha.2007.12.002.

Cited by

[1] Vedran Dunjko and Peter Wittek, "A non-review of Quantum Machine Learning: trends and explorations", Quantum Views 4, 32 (2020).

[2] Srikar Kasi and Kyle Jamieson, Proceedings of the 26th Annual International Conference on Mobile Computing and Networking 1 (2020) ISBN:9781450370851.

[3] Hsin-Yuan Huang, Richard Kueng, and John Preskill, "Information-Theoretic Bounds on Quantum Advantage in Machine Learning", Physical Review Letters 126 19, 190505 (2021).

[4] Jonathan Allcock and Chang-Yu Hsieh, "A quantum extension of SVM-perf for training nonlinear SVMs in almost linear time", Quantum 4, 342 (2020).

[5] Alokananda Dey, Sandip Dey, Siddhartha Bhattacharyya, Jan Platos, and Vaclav Snasel, "Quantum inspired meta‐heuristic approaches for automatic clustering of colour images", International Journal of Intelligent Systems 36 9, 4852 (2021).

[6] Ahmed A. Abd El-Latif, Bassem Abd-El-Atty, Mohamed Amin, and Abdullah M. Iliyasu, "Quantum-inspired cascaded discrete-time quantum walks with induced chaotic dynamics and cryptographic applications", Scientific Reports 10 1, 1930 (2020).

[7] Lin Lin and Yu Tong, "Optimal polynomial based quantum eigenstate filtering with application to solving quantum linear systems", arXiv:1910.14596, Quantum 4, 361 (2020).

[8] S. Mangini, F. Tacchino, D. Gerace, D. Bajoni, and C. Macchiavello, "Quantum computing models for artificial neural networks", EPL (Europhysics Letters) 134 1, 10002 (2021).

[9] Xiaoqiang Wang, Lejia Gu, Heung-wing Lee, and Guofeng Zhang, "Quantum context-aware recommendation systems based on tensor singular value decomposition", Quantum Information Processing 20 5, 190 (2021).

[10] A. S. Boev, A. S. Rakitko, S. R. Usmanov, A. N. Kobzeva, I. V. Popov, V. V. Ilinsky, E. O. Kiktenko, and A. K. Fedorov, "Genome assembly using quantum and quantum-inspired annealing", Scientific Reports 11 1, 13183 (2021).

[11] Louis-Paul Henry, Slimane Thabet, Constantin Dalyac, and Loïc Henriet, "Quantum evolution kernel: Machine learning on graphs with programmable arrays of qubits", Physical Review A 104 3, 032416 (2021).

[12] Ewin Tang, "Quantum Principal Component Analysis Only Achieves an Exponential Speedup Because of Its State Preparation Assumptions", arXiv:1811.00414, Physical Review Letters 127 6, 060503 (2021).

[13] Viraj Kulkarni, Milind Kulkarni, and Aniruddha Pant, "Quantum computing methods for supervised learning", arXiv:2006.12025, Quantum Machine Intelligence 3 2, 23 (2021).

[14] Kishor Bharti, Alba Cervera-Lierta, Thi Ha Kyaw, Tobias Haug, Sumner Alperin-Lea, Abhinav Anand, Matthias Degroote, Hermanni Heimonen, Jakob S. Kottmann, Tim Menke, Wai-Keong Mok, Sukin Sim, Leong-Chuan Kwek, and Alán Aspuru-Guzik, "Noisy intermediate-scale quantum (NISQ) algorithms", arXiv:2101.08448.

[15] M. Cerezo, Kunal Sharma, Andrew Arrasmith, and Patrick J. Coles, "Variational Quantum State Eigensolver", arXiv:2004.01372.

[16] Nai-Hui Chia, András Gilyén, Tongyang Li, Han-Hsuan Lin, Ewin Tang, and Chunhao Wang, "Sampling-based sublinear low-rank matrix arithmetic framework for dequantizing quantum machine learning", arXiv:1910.06151.

[17] Iordanis Kerenidis and Alessandro Luongo, "Classification of the MNIST data set with quantum slow feature analysis", Physical Review A 101 6, 062327 (2020).

[18] Hayata Yamasaki, Kosuke Fukui, Yuki Takeuchi, Seiichiro Tani, and Masato Koashi, "Polylog-overhead highly fault-tolerant measurement-based quantum computation: all-Gaussian implementation with Gottesman-Kitaev-Preskill code", arXiv:2006.05416.

[19] Yu Tong, Dong An, Nathan Wiebe, and Lin Lin, "Fast inversion, preconditioned quantum linear system solvers, and fast evaluation of matrix functions", arXiv:2008.13295.

[20] Nai-Hui Chia, Tongyang Li, Han-Hsuan Lin, and Chunhao Wang, "Quantum-inspired sublinear algorithm for solving low-rank semidefinite programming", arXiv:1901.03254.

[21] Iordanis Kerenidis, Jonas Landman, and Anupam Prakash, "Quantum Algorithms for Deep Convolutional Neural Networks", arXiv:1911.01117.

[22] Jonathan Allcock, Chang-Yu Hsieh, Iordanis Kerenidis, and Shengyu Zhang, "Quantum algorithms for feedforward neural networks", arXiv:1812.03089.

[23] Wen Guan, Gabriel Perdue, Arthur Pesah, Maria Schuld, Koji Terashi, Sofia Vallecorsa, and Jean-Roch Vlimant, "Quantum Machine Learning in High Energy Physics", arXiv:2005.08582.

[24] Dhawal Jethwani, François Le Gall, and Sanjay K. Singh, "Quantum-Inspired Classical Algorithms for Singular Value Transformation", arXiv:1910.05699.

[25] Philip Easom-McCaldin, Ahmed Bouridane, Ammar Belatreche, and Richard Jiang, "Towards Building A Facial Identification System Using Quantum Machine Learning Techniques", arXiv:2008.12616.

[26] X. -L. Ouyang, X. -Z. Huang, Y. -K. Wu, W. -G. Zhang, X. Wang, H. -L. Zhang, L. He, X. -Y. Chang, and L. -M. Duan, "Experimental demonstration of quantum-enhanced machine learning in a nitrogen-vacancy-center system", Physical Review A 101 1, 012307 (2020).

[27] Almudena Carrera Vazquez, Ralf Hiptmair, and Stefan Woerner, "Enhancing the Quantum Linear Systems Algorithm using Richardson Extrapolation", arXiv:2009.04484.

[28] Quntao Zhuang and Zheshen Zhang, "Physical-Layer Supervised Learning Assisted by an Entangled Sensor Network", Physical Review X 9 4, 041023 (2019).

[29] Yuxuan Du, Min-Hsiu Hsieh, Tongliang Liu, and Dacheng Tao, "Quantum-inspired algorithm for general minimum conical hull problems", Physical Review Research 2 3, 033199 (2020).

[30] Iordanis Kerenidis, Alessandro Luongo, and Anupam Prakash, "Quantum Expectation-Maximization for Gaussian Mixture Models", arXiv:1908.06657.

[31] Bojia Duan, Jiabin Yuan, Chao-Hua Yu, Jianbang Huang, and Chang-Yu Hsieh, "A survey on HHL algorithm: From theory to application in quantum machine learning", Physics Letters A 384, 126595 (2020).

[32] Changpeng Shao and Ashley Montanaro, "Faster quantum-inspired algorithms for solving linear systems", arXiv:2103.10309.

[33] John Realpe-Gómez and Nathan Killoran, "Quantum-inspired memory-enhanced stochastic algorithms", arXiv:1906.00263.

[34] P. A. M. Casares and M. A. Martin-Delgado, "A quantum interior-point predictor-corrector algorithm for linear programming", Journal of Physics A Mathematical General 53 44, 445305 (2020).

[35] Srikar Kasi and Kyle Jamieson, "Towards Quantum Belief Propagation for LDPC Decoding in Wireless Networks", arXiv:2007.11069.

[36] Daniel Chen, Yekun Xu, Betis Baheri, Chuan Bi, Ying Mao, Qiang Quan, and Shuai Xu, "Quantum-Inspired Classical Algorithm for Principal Component Regression", arXiv:2010.08626.

[37] Lucas Lamata, "Quantum machine learning and quantum biomimetics: A perspective", arXiv:2004.12076.

[38] Elias Starchl and Helmut Ritsch, "Unraveling the origin of higher success probabilities in quantum versus semi-classical annealing", arXiv:2010.14256.

[39] Leonard Wossnig, "Quantum Machine Learning For Classical Data", arXiv:2105.03684.

[40] Daniel Chen, Yekun Xu, Betis Baheri, Samuel A. Stein, Chuan Bi, Ying Mao, Qiang Quan, and Shuai Xu, "Quantum-Inspired Classical Algorithm for Slow Feature Analysis", arXiv:2012.00824.

[41] Naoko Koide-Majima and Kei Majima, "Quantum-inspired canonical correlation analysis for exponentially large dimensional data", arXiv:1907.03236.

[42] Dmitry A. Chermoshentsev, Aleksei O. Malyshev, Egor S. Tiunov, Douglas Mendoza, Alán Aspuru-Guzik, Aleksey K. Fedorov, and Alexander I. Lvovsky, "Polynomial unconstrained binary optimisation inspired by optical simulation", arXiv:2106.13167.

The above citations are from Crossref's cited-by service (last updated successfully 2021-09-23 06:56:26) and SAO/NASA ADS (last updated successfully 2021-09-23 06:56:27). The list may be incomplete as not all publishers provide suitable and complete citation data.