Abstract
Similarity measurement is a fundamental problem that arise both on its own and as a key subroutine in more complex tasks, such as machine learning. However, in classical algorithms, the time used to similarity measurement usually increases exponentially as the amount of data and the number of data dimensions increase. In this paper, we presented three quantum algorithms based on Euclidean distance to measure the similarity between data sets. In the proposed algorithms, some special unitary operations are utilized to construct imperative quantum states from quantum random access memory. Then, a badly needed result for estimating the similarity between data sets, can be got by performing projective measurements. Furthermore, it is shown that these algorithms can achieve the exponential acceleration of the classical algorithm in the quantity or the dimension of data.
Similar content being viewed by others
References
Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring[C]. In: Proceedings 35th Annual Symposium on Foundations of Computer Science, pp 124–134. IEEE Press, New York (1994)
Grover, L.K.: Quantum mechanics helps in searching for a needle in a haystack[J]. Phys. Rev. Lett. 79, 325 (1997)
Harrow, A.W., Hassidim, A., Lloyd, S.: Quantum algorithm for linear systems of equations[J]. Phys. Rev. Lett. 103, 150502 (2009)
Berry, D.W., Ahokas, G., Cleve, R., et al.: Efficient quantum algorithms for simulating sparse Hamiltonians[J]. Commun. Math. Phys. 270, 359–371 (2007)
Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum principal component analysis[J]. Nat. Phys. 10, 631–633 (2014)
Anguita, D., Ridella, S., Rivieccio, F., et al.: Quantum optimization for training support vector machines[J]. Neural Netw. 16, 763–770 (2003)
Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum algorithms for supervised and unsupervised machine learning[J]. arXiv:1307.0411 (2013)
Rebentrost, P., Mohseni, M., Lloyd, S.: Quantum support vector machine for big data classification[J]. Phys. Rev. Lett. 113, 130503 (2014)
Cong, I., Duan, L.: Quantum discriminant analysis for dimensionality reduction and classification[J]. New J. Phys. 18, 073011 (2016)
Ruan, Y., Xue, X., Liu, H., et al.: Quantum algorithm for k-nearest neighbors classification based on the metric of hamming distance[J]. Int. J. Theor. Phys. 56, 3496–3507 (2017)
Aïmeur, E., Brassard, G., Gambs, S.: Quantum speed-up for unsupervised learning[J]. Mach. Learn. 90, 261–287 (2013)
Wiebe, N., Braun, D., Lloyd, S.: Quantum algorithm for data fitting[J]. Phys. Rev. Lett. 109, 050505 (2012)
Schuld, M., Sinayskiy, I., Petruccione, F.: Prediction by linear regression on a quantum computer[J]. Phys. Rev. A 94, 022342 (2016)
Yu, C.H., Gao, F., Wen, Q.Y.: Quantum algorithm for ridge regression[J]. arXiv:1707.09524 (2017)
Garnerone, S., Zanardi, P., Lidar, D.A.: Adiabatic quantum algorithm for search engine ranking[J]. Phys. Rev. Lett. 108, 230506 (2012)
Paparo, G.D., Martin-Delgado, M.A.: Google in a quantum network[J]. Sci. Rep. 2, 444 (2012)
Sánchez-Burillo, E., Duch, J., Gómez-Gardenes, J., et al.: Quantum navigation and ranking in complex networks[J]. Sci. Rep. 2, 605 (2012)
Paparo, G.D., Müller, M., Comellas, F., et al.: Quantum google in a complex network[J]. Sci. Rep. 3, 2773 (2013)
Schuld, M., Sinayskiy, I., Petruccione, F.: The quest for a quantum neural network[J]. Quantum Inf. Process 13, 2567–2586 (2014)
Jiang, D.H., Wang, J., Liang, X.Q., et al.: Quantum voting scheme based on locally indistinguishable orthogonal product states[J]. Int. J. Theor. Phys. 59, 436–444 (2020)
Cohen-Addad, V., Klein, P.N., Mathieu, C.: Local search yields approximation schemes for k-means and k-median in euclidean and minor-free metrics[J]. SIAM J. Comput. 48, 644–667 (2019)
Ahmadian, S., Norouzi-Fard, A., Svensson, O., et al.: Better guarantees for k-means and euclidean k-median by primal-dual algorithms[J]. SIAM Journal on Computing, 2019, FOCS17-97 (2019)
Soucy, P., Mineau, G.W.: A simple KNN algorithm for text categorization[C]. In: Proceedings 2001 IEEE International Conference on Data Mining, pp 647–648. IEEE, California (2001)
Xing, W., Bei, Y.: Medical health big data classification based on KNN classification algorithm[J] IEEE access (2019)
Aaronson, S.: BQP And the polynomial hierarchy[C]. In: Proceedings of the Forty-second ACM Symposium on Theory Of Computing, 141-150, California (2010)
Seifoddini, H.K.: Single linkage versus average linkage clustering in machine cells formation applications[J]. Comput. Ind. Eng. 16, 419–426 (1989)
Giovannetti, V., Lloyd, S., Maccone, L.: Quantum random access memory[J]. Phys. Rev. Lett. 100, 160501 (2008)
Brassard, G., Hoyer, P., Mosca, M., et al.: Quantum amplitude amplification and estimation[J]. Contemp. Math. 305, 53–74 (2002)
Gionis, A., Mannila, H., Tsaparas, P.: Clustering aggregation[J]. ACM Trans. Knowl. Discov. Data 1, 4–es (2007)
Kerenidis, I., Prakash, A.: Quantum recommendation systems[J]. arXiv:1603.08675 (2016)
Wossnig, L., Zhao, Z., Prakash, A.: Quantum linear system algorithm for dense matrices[J]. Phys. Rev. Lett. 120, 050502 (2018)
Araújo, M., Feix, A., Costa, F., et al.: Quantum circuits cannot control unknown operations[J]. New J. Phys. 16, 093026 (2014)
Sardar, T.H., Ansari, Z.: An analysis of MapReduce efficiency in document clustering using parallel K-means algorithm[J]. Future Comput. Inform. J. 3, 200–209 (2018)
Yang, R., Qu, D., Qian, Y., et al.: An online log template extraction method based on hierarchical clustering[J]. EURASIP J. Wirel. Commun. Netw. 2019, 1–12 (2019)
Lange, J.K., DiSegna, S.T., Yang, W, et al.: Using cluster analysis to identify patient factors linked to differential functional gains after total knee Arthroplasty[J]. J. Arthroplasty 35, 121–126 (2020)
Zhang, Y., Liu, Y., Li, Y., et al.: Hierarchical and complex system entropy clustering analysis based validation for traditional Chinese medicine syndrome patterns of chronic atrophic gastritis[J]. J. Altern. Complement. Med. 25, 1130–1139 (2019)
Acknowledgements
This work was supported by National Natural Science Foundation of China (Grants No. 61976053 and No. 61772134), Fujian Province Natural Science Foundation (Grant No. 2018J01776), and Program for New Century Excellent Talents in Fujian Province University.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Yu, K., Guo, GD., Li, J. et al. Quantum Algorithms for Similarity Measurement Based on Euclidean Distance. Int J Theor Phys 59, 3134–3144 (2020). https://doi.org/10.1007/s10773-020-04567-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10773-020-04567-1