The k-nearest neighbors (k-NN) is a basic machine learning (ML) algorithm, and several quantum versions of it, employing different distance metrics, have been presented in the last few years. Although the Euclidean distance is one of the most widely used distance metrics in ML, it has not received much consideration in the development of these quantum variants. In this article, a novel quantum k-NN algorithm based on the Euclidean distance is introduced. Specifically, the algorithm is characterized by a quantum encoding requiring a low number of qubits and a simple quantum circuit not involving oracles, aspects that favor its realization. In addition to the mathematical formulation and some complexity observations, a detailed empirical evaluation with simulations is presented. In particular, the results have shown the correctness of the formulation, a drop in the performance of the algorithm when the number of measurements is limited, the competitiveness with respect to some classical baseline methods in the ideal case, and the possibility of improving the performance by increasing the number of measurements.

A quantum k-nearest neighbors algorithm based on the Euclidean distance estimation / Zardini, Enrico; Blanzieri, Enrico; Pastorello, Davide. - In: QUANTUM MACHINE INTELLIGENCE. - ISSN 2524-4906. - 6:1(2024), pp. 2301-2322. [10.1007/s42484-024-00155-2]

A quantum k-nearest neighbors algorithm based on the Euclidean distance estimation

Zardini, Enrico;Blanzieri, Enrico;Pastorello, Davide
2024-01-01

Abstract

The k-nearest neighbors (k-NN) is a basic machine learning (ML) algorithm, and several quantum versions of it, employing different distance metrics, have been presented in the last few years. Although the Euclidean distance is one of the most widely used distance metrics in ML, it has not received much consideration in the development of these quantum variants. In this article, a novel quantum k-NN algorithm based on the Euclidean distance is introduced. Specifically, the algorithm is characterized by a quantum encoding requiring a low number of qubits and a simple quantum circuit not involving oracles, aspects that favor its realization. In addition to the mathematical formulation and some complexity observations, a detailed empirical evaluation with simulations is presented. In particular, the results have shown the correctness of the formulation, a drop in the performance of the algorithm when the number of measurements is limited, the competitiveness with respect to some classical baseline methods in the ideal case, and the possibility of improving the performance by increasing the number of measurements.
2024
1
Zardini, Enrico; Blanzieri, Enrico; Pastorello, Davide
A quantum k-nearest neighbors algorithm based on the Euclidean distance estimation / Zardini, Enrico; Blanzieri, Enrico; Pastorello, Davide. - In: QUANTUM MACHINE INTELLIGENCE. - ISSN 2524-4906. - 6:1(2024), pp. 2301-2322. [10.1007/s42484-024-00155-2]
File in questo prodotto:
File Dimensione Formato  
s42484-024-00155-2.pdf

accesso aperto

Descrizione: Articolo
Tipologia: Versione editoriale (Publisher’s layout)
Licenza: Creative commons
Dimensione 2.11 MB
Formato Adobe PDF
2.11 MB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11572/408151
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 2
  • ???jsp.display-item.citation.isi??? 0
  • OpenAlex ND
social impact