Skip to main content
Log in

Quantum Algorithms for Similarity Measurement Based on Euclidean Distance

  • Published:
International Journal of Theoretical Physics Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. 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)

  2. Grover, L.K.: Quantum mechanics helps in searching for a needle in a haystack[J]. Phys. Rev. Lett. 79, 325 (1997)

    Article  ADS  Google Scholar 

  3. Harrow, A.W., Hassidim, A., Lloyd, S.: Quantum algorithm for linear systems of equations[J]. Phys. Rev. Lett. 103, 150502 (2009)

    Article  ADS  MathSciNet  Google Scholar 

  4. Berry, D.W., Ahokas, G., Cleve, R., et al.: Efficient quantum algorithms for simulating sparse Hamiltonians[J]. Commun. Math. Phys. 270, 359–371 (2007)

    Article  ADS  MathSciNet  Google Scholar 

  5. Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum principal component analysis[J]. Nat. Phys. 10, 631–633 (2014)

    Article  Google Scholar 

  6. Anguita, D., Ridella, S., Rivieccio, F., et al.: Quantum optimization for training support vector machines[J]. Neural Netw. 16, 763–770 (2003)

    Article  Google Scholar 

  7. Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum algorithms for supervised and unsupervised machine learning[J]. arXiv:1307.0411 (2013)

  8. Rebentrost, P., Mohseni, M., Lloyd, S.: Quantum support vector machine for big data classification[J]. Phys. Rev. Lett. 113, 130503 (2014)

    Article  ADS  Google Scholar 

  9. Cong, I., Duan, L.: Quantum discriminant analysis for dimensionality reduction and classification[J]. New J. Phys. 18, 073011 (2016)

    Article  ADS  Google Scholar 

  10. 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)

    Article  MathSciNet  Google Scholar 

  11. Aïmeur, E., Brassard, G., Gambs, S.: Quantum speed-up for unsupervised learning[J]. Mach. Learn. 90, 261–287 (2013)

    Article  MathSciNet  Google Scholar 

  12. Wiebe, N., Braun, D., Lloyd, S.: Quantum algorithm for data fitting[J]. Phys. Rev. Lett. 109, 050505 (2012)

    Article  ADS  Google Scholar 

  13. Schuld, M., Sinayskiy, I., Petruccione, F.: Prediction by linear regression on a quantum computer[J]. Phys. Rev. A 94, 022342 (2016)

    Article  ADS  Google Scholar 

  14. Yu, C.H., Gao, F., Wen, Q.Y.: Quantum algorithm for ridge regression[J]. arXiv:1707.09524 (2017)

  15. Garnerone, S., Zanardi, P., Lidar, D.A.: Adiabatic quantum algorithm for search engine ranking[J]. Phys. Rev. Lett. 108, 230506 (2012)

    Article  ADS  Google Scholar 

  16. Paparo, G.D., Martin-Delgado, M.A.: Google in a quantum network[J]. Sci. Rep. 2, 444 (2012)

    Article  ADS  Google Scholar 

  17. 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)

    Article  ADS  Google Scholar 

  18. Paparo, G.D., Müller, M., Comellas, F., et al.: Quantum google in a complex network[J]. Sci. Rep. 3, 2773 (2013)

    Article  Google Scholar 

  19. Schuld, M., Sinayskiy, I., Petruccione, F.: The quest for a quantum neural network[J]. Quantum Inf. Process 13, 2567–2586 (2014)

    Article  ADS  MathSciNet  Google Scholar 

  20. 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)

    Article  MathSciNet  Google Scholar 

  21. 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)

    Article  MathSciNet  Google Scholar 

  22. 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)

  23. 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)

  24. Xing, W., Bei, Y.: Medical health big data classification based on KNN classification algorithm[J] IEEE access (2019)

  25. Aaronson, S.: BQP And the polynomial hierarchy[C]. In: Proceedings of the Forty-second ACM Symposium on Theory Of Computing, 141-150, California (2010)

  26. Seifoddini, H.K.: Single linkage versus average linkage clustering in machine cells formation applications[J]. Comput. Ind. Eng. 16, 419–426 (1989)

    Article  Google Scholar 

  27. Giovannetti, V., Lloyd, S., Maccone, L.: Quantum random access memory[J]. Phys. Rev. Lett. 100, 160501 (2008)

    Article  ADS  MathSciNet  Google Scholar 

  28. Brassard, G., Hoyer, P., Mosca, M., et al.: Quantum amplitude amplification and estimation[J]. Contemp. Math. 305, 53–74 (2002)

    Article  MathSciNet  Google Scholar 

  29. Gionis, A., Mannila, H., Tsaparas, P.: Clustering aggregation[J]. ACM Trans. Knowl. Discov. Data 1, 4–es (2007)

    Article  Google Scholar 

  30. Kerenidis, I., Prakash, A.: Quantum recommendation systems[J]. arXiv:1603.08675 (2016)

  31. Wossnig, L., Zhao, Z., Prakash, A.: Quantum linear system algorithm for dense matrices[J]. Phys. Rev. Lett. 120, 050502 (2018)

    Article  ADS  MathSciNet  Google Scholar 

  32. Araújo, M., Feix, A., Costa, F., et al.: Quantum circuits cannot control unknown operations[J]. New J. Phys. 16, 093026 (2014)

    Article  ADS  Google Scholar 

  33. 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)

    Article  Google Scholar 

  34. 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)

    Article  Google Scholar 

  35. 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)

    Article  ADS  Google Scholar 

  36. 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)

    Article  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Song Lin.

Additional information

Publisher’s Note

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

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10773-020-04567-1

Keywords

Navigation