arXiv · 2610.33739
A quantum k-nearest neighbors implementation using magnitude-aware comparisons
Abstract
Much attention has recently been devoted to the k-nearest neighbors (KNN) algorithm as a case study for quantum computing algorithms. Several algorithms have devised methods to compute a similarity metric to solve Quantum KNN (QKNN). This paper presents a practical quantum encoding technique that enables Euclidean distance calculation between vectors with different L2 norms by appending a single component to each vector, then uses it in the QKNN problem. It is arguably simpler to understand and implement than comparable methods and uses fewer qubits. Further, an implementation of this algorithm is provided and is used to benchmark it against a recent Euclidean-distance QKNN method on standard labeled datasets. In addition to demonstrating proper formulation, the results show marked improvement over similar implementations during simulation with realistic noise due to the use of fewer qubits and thus more coherent circuits.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Christopher Rector, Jiangwen Sun. 2026-10-24. A quantum k-nearest neighbors implementation using magnitude-aware comparisons. https://arxiv.org/abs/2610.33739
Cite the original work for its findings. Save a collection to share your selection of sources.