Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Comparative Analysis of Classical and Quantum K-Means Clustering: SWAP Test and Fidelity-Based Approaches on Benchmark Datasets

Sricharan Suresh

Published Feb 27, 2026• 0 citations
Publisher

Abstract

Quantum machine learning promises computational advantages for certain tasks, yet rigorous empirical evaluation of quantum clustering algorithms against classical baselines remains limited. This paper presents a comprehensive implementation and comparative analysis of two quantum K-means clustering algorithms—SWAP Test-based and Quantum Fidelity-based—against classical K-means on benchmark datasets. Both quantum approaches employ amplitude encoding to map classical data into quantum state amplitudes and use quantum-native distance metrics derived from inner products in Hilbert space. All three methods are evaluated on the ENB2012 energy efficiency dataset (768 samples, 8 features) and a synthetically expanded high-dimensional dataset (4,998 samples, 16 features), measuring silhouette score, inertia, and wall-clock execution time across cluster counts k ∈ {2, . . . , 7}. The experiments, conducted on Qiskit’s AerSimulator and Statevector backends, show that classical K-means achieves substantially higher silhouette scores (0.391 vs. 0.031 on the original dataset) and orders-of-magnitude faster execution. A rigorous analysis attributes these results to three factors: (i) the information loss inherent in amplitude encoding normalization, (ii) the geometric mismatch between Euclidean and Hilbert-space distance metrics, and (iii) the absence of quantum parallelism in classical simulation. The implications for quantum advantage in unsupervised learning are discussed and concrete requirements for near-term quantum hardware to achieve competitive clustering performance are outlined.

DOI
10.5281/zenodo.18802705

Related papers

Testing of Hybrid Quantum-Classical K-Means for Nonlinear Noise Mitigation

Ark Modi, Alonso Viladomat Jasso, Roberto Ferrara +4 more

Nearest-neighbour clustering is a powerful set of heuristic algorithms that find natural application in the decoding of signals transmitted using the$M$-Quadrature Amplitude Modulation ($M$-QAM) protocol. Lloyd et al. proposed a quantum version of the algorithm that promised an exponential speedup. We analyse the performance of this algorithm by simulating the use of a hybrid quantum-classical implementation of it upon 16-QAM and experimental 64-QAM data. We then benchmark the implementation against the classical k-means clustering algorithm. The choice of quantum encoding of the classical data plays a significant role in the performance, as it would for the hybrid quantum-classical implementation of any quantum machine learning algorithm. In this work, we use the popular angle embedding method for data embedding and the swap test for overlap estimation. The algorithm is emulated in software using Qiskit and tested on simulated and real-world experimental data. The discrepancy in accuracy from the perspective of the induced metric of the angle embedding method is discussed, and a thorough analysis regarding the angle embedding method in the context of distance estimation is provided. We detail an experimental optic fibre setup as well, from which we collect 64-QAM data. This is the dataset upon which the algorithms are benchmarked. Finally, some promising current and future directions for further research are discussed.

arXiv:2308.03540•Globecom•Dec 4, 2023•3 citations

Hybrid Quantum--Classical k-Means Clustering via Quantum Feature Maps

Syed M. Abdullah, Alisha Baba, Muhammad Siddique +1 more

Clustering is one of the most fundamental tasks in machine learning, and the k-means clustering algorithm is perhaps one of the most widely used clustering algorithms. However, it suffers from several limitations, such as sensitivity to centroid initialization, difficulty capturing non-linear structure, and poor performance in high-dimensional spaces. Recent work has proposed improved initialization strategies and quantum-assisted distance computation, but the similarity metric itself has largely remained classical. In this study, we propose a quantum-enhanced variant of k-means that replaces the Euclidean distance with a quantum kernel derived from the inner product between feature-mapped quantum states. Using the Iris dataset, we use multiple quantum feature maps, including entangled SU2 and ZZ circuits, to embed classical data into a higher-dimensional Hilbert space where cluster structures become more separable. We will also be testing using another dataset, namely the breast cancer dataset. Similarity between data points is computed through the inner product between two states. Our results show that this approach achieves improved clustering stability and competitive accuracy compared to the classical algorithm, with the SU2 feature map yielding an accuracy of 88.6 % on the Iris dataset and 91.0 % on the breast cancer dataset, despite operating on NISQ-feasible shallow circuits. These findings suggest that quantum kernels provide a richer similarity landscape than traditional distance metrics, offering a promising path toward more robust unsupervised learning in the NISQ era.

quant-pharXiv:2604.07873•Apr 10, 2026•0 citations

Practical Quantum K-Means Clustering: Performance Analysis and Applications in Energy Grid Classification

Stephen DiAdamo, Corey O’Meara, G. Cortiana +1 more

In this work, we aim to solve a practical use-case of unsupervised clustering which has applications in predictive maintenance in the energy operations sector using quantum computers. Using only cloud access to quantum computers, we complete a thorough performance analysis of what some current quantum computing systems are capable of for practical applications involving non-trivial mid-to-high dimensional datasets. We first benchmark how well distance estimation can be performed using two different metrics based on the swap-test, using angle and amplitude data embedding. Next, for the clustering performance analysis, we generate sets of synthetic data with varying cluster variance and compare simulation to physical hardware results using the two metrics. From the results of this performance analysis, we propose a general, competitive, and parallelized version of quantum$k$-means clustering to avoid some pitfalls discovered due to noisy hardware and apply the approach to a real energy grid clustering scenario. Using real-world German electricity grid data, we show that the new approach improves the balanced accuracy of the standard quantum$k$-means clustering by 67.8 % with respect to the labeling of the classical algorithm.

arXiv:2112.08506•IEEE Transactions on Quantum Engineering•Jan 1, 2022•41 citations

Quantum k-Means Clustering Using Hadamard-Test-Based Similarity Estimation

MohammadHadi Alaeiyan, Shahin Torabi, Mehdi Alaeiyan

Recently, the volume of the generated data has increased significantly, leading to the need for computational techniques capable of handling such data efficiently. As a result, many quantum algorithms have been developed, and the domain of quantum machine learning (QML) has become more extensive. Traditional k-means algorithms for quantum computers usually make use of deep or shallow quantum circuits, resulting in sub-optimal clustering results. In our work, we introduce two types of quantum-inspired k-means algorithm: (1) the quantum subtraction operation and (2) the rotational-difference dissimilarity measure. Our second framework measures the dissimilarity using a quantum rotation-based dissimilarity circuit, which encodes the relative difference of the states. We employ a Hadamard-test-based circuit design, as well as an alternative technique that is not used in other quantum dissimilarities like the swap test. The introduced algorithms are evaluated on six different datasets—Iris, Wine, Breast Cancer Wisconsin, Blobs, Moons, and the noisier Iris dataset. Evaluation involves clustering validity metrics, as well as the classic classification performance metrics. The findings show that the rotational-based dissimilarity metric allows us to obtain clustering results comparable with the results obtained by the classical counterpart, thus showing the feasibility of the introduced distance calculation technique.

Computers•May 31, 2026•0 citations

Quantum clustering with k-Means: A hybrid approach

Alessandro Poggiali, Alessandro Berti, Anna Bernasconi +2 more

Quantum computing, based on quantum theory, holds great promise as an advanced computational paradigm for achieving fast computations. Quantum algorithms are expected to surpass their classical counterparts in terms of computational complexity for certain tasks, including machine learning. In this paper, we design, implement, and evaluate three hybrid quantum k-Means algorithms, exploiting different degrees of parallelism. Indeed, each algorithm incrementally leverages quantum parallelism to reduce the complexity of the cluster assignment step up to a constant cost. In particular, we exploit quantum phenomena to speed up the computation of distances. The core idea is that the computation of distances between records and centroids can be executed simultaneously, thus saving time, especially for big datasets. We show that our hybrid quantum k-Means algorithms are theoretically faster than the classical algorithm, while experiments suggest that it is possible to obtain comparable clustering results.

arXiv:2212.06691•Theoretical Computer Science•Feb 21, 2024•50 citations

An adaptive quantum-classical approach for scalable clustering and analytical decision-making

Rahmat Hidayat, Fevi Novkaniza, Zuherman Rustam +1 more

Clustering remains a cornerstone of unsupervised learning, yet classical algorithms often struggle with the inherent complexities of modern datasets, such as high dimensionality, non-linear separability, and significant noise. This paper introduces the Hybrid Quantum-Classical Clustering Algorithm (HQCA), a novel framework that leverages the power of quantum computation and the robustness of classical machine learning to overcome these limitations. HQCA integrates a quantum kernel estimation phase, utilizing a parameterized quantum circuit to project data into a high-dimensional Hilbert space, thereby enhancing cluster separability where classical kernels fail. Furthermore, it employs a quantum-enhanced optimization routine, based on the Quantum Approximate Optimization Algorithm (QAOA), to determine optimal cluster centroids, thereby mitigating the common pitfall of local minima encountered by algorithms like K-Means. The algorithm also incorporates a quantum-inspired gap statistic to autonomously determine the optimal number of clusters. We rigorously evaluate HQCA against state-of-the-art classical clustering methods, including K-Means, DBSCAN, and Spectral Clustering, on multiple real-world benchmark datasets from the UCI repository, such as Iris, Wine, and a high-dimensional image dataset (Fashion-MNIST). Our results demonstrate that HQCA consistently achieves superior performance across multiple evaluation metrics, including Purity, Silhouette Score, and Adjusted Rand Index (ARI), particularly excelling in scenarios involving complex, non-linear data manifolds. The proposed hybrid paradigm not only signifies a substantial leap in clustering accuracy and robustness but also provides a scalable pathway for leveraging current Noisy Intermediate-Scale Quantum (NISQ) devices in practical data analytics workflows, marking a critical step toward potential quantum advantage in unsupervised learning. We emphasize that the demonstrated advantage is algorithmic and representational, not an asymptotic runtime advantage.

Decision Analytics Journal•Jul 14, 2026•0 citations
Quantum machine learning promises computational advantages for certain tasks, yet rigorous empirical evaluation of quantum clustering algorithms against classical baselines remains limited. This paper presents a comprehensive implementation and comparative analysis of two quantum K-means clustering algorithms—SWAP Test-based and Quantum Fidelity-based—against classical K-means on benchmark datasets. Both quantum approaches employ amplitude encoding to map classical data into quantum state amplitudes and use quantum-native distance metrics derived from inner products in Hilbert space. All three methods are evaluated on the ENB2012 energy efficiency dataset (768 samples, 8 features) and a synthetically expanded high-dimensional dataset (4,998 samples, 16 features), measuring silhouette score, inertia, and wall-clock execution time across cluster counts k ∈ {2, . . . , 7}. The experiments, conducted on Qiskit’s AerSimulator and Statevector backends, show that classical K-means achieves substantially higher silhouette scores (0.391 vs. 0.031 on the original dataset) and orders-of-magnitude faster execution. A rigorous analysis attributes these results to three factors: (i) the information loss inherent in amplitude encoding normalization, (ii) the geometric mismatch between Euclidean and Hilbert-space distance metrics, and (iii) the absence of quantum parallelism in classical simulation. The implications for quantum advantage in unsupervised learning are discussed and concrete requirements for near-term quantum hardware to achieve competitive clustering performance are outlined.
Nearest-neighbour clustering is a powerful set of heuristic algorithms that find natural application in the decoding of signals transmitted using theMMM-Quadrature Amplitude Modulation (MMM-QAM) protocol. Lloyd et al. proposed a quantum version of the algorithm that promised an exponential speedup. We analyse the performance of this algorithm by simulating the use of a hybrid quantum-classical implementation of it upon 16-QAM and experimental 64-QAM data. We then benchmark the implementation against the classical k-means clustering algorithm. The choice of quantum encoding of the classical data plays a significant role in the performance, as it would for the hybrid quantum-classical implementation of any quantum machine learning algorithm. In this work, we use the popular angle embedding method for data embedding and the swap test for overlap estimation. The algorithm is emulated in software using Qiskit and tested on simulated and real-world experimental data. The discrepancy in accuracy from the perspective of the induced metric of the angle embedding method is discussed, and a thorough analysis regarding the angle embedding method in the context of distance estimation is provided. We detail an experimental optic fibre setup as well, from which we collect 64-QAM data. This is the dataset upon which the algorithms are benchmarked. Finally, some promising current and future directions for further research are discussed.
Clustering is one of the most fundamental tasks in machine learning, and the k-means clustering algorithm is perhaps one of the most widely used clustering algorithms. However, it suffers from several limitations, such as sensitivity to centroid initialization, difficulty capturing non-linear structure, and poor performance in high-dimensional spaces. Recent work has proposed improved initialization strategies and quantum-assisted distance computation, but the similarity metric itself has largely remained classical. In this study, we propose a quantum-enhanced variant of k-means that replaces the Euclidean distance with a quantum kernel derived from the inner product between feature-mapped quantum states. Using the Iris dataset, we use multiple quantum feature maps, including entangled SU2 and ZZ circuits, to embed classical data into a higher-dimensional Hilbert space where cluster structures become more separable. We will also be testing using another dataset, namely the breast cancer dataset. Similarity between data points is computed through the inner product between two states. Our results show that this approach achieves improved clustering stability and competitive accuracy compared to the classical algorithm, with the SU2 feature map yielding an accuracy of 88.6 % on the Iris dataset and 91.0 % on the breast cancer dataset, despite operating on NISQ-feasible shallow circuits. These findings suggest that quantum kernels provide a richer similarity landscape than traditional distance metrics, offering a promising path toward more robust unsupervised learning in the NISQ era.
In this work, we aim to solve a practical use-case of unsupervised clustering which has applications in predictive maintenance in the energy operations sector using quantum computers. Using only cloud access to quantum computers, we complete a thorough performance analysis of what some current quantum computing systems are capable of for practical applications involving non-trivial mid-to-high dimensional datasets. We first benchmark how well distance estimation can be performed using two different metrics based on the swap-test, using angle and amplitude data embedding. Next, for the clustering performance analysis, we generate sets of synthetic data with varying cluster variance and compare simulation to physical hardware results using the two metrics. From the results of this performance analysis, we propose a general, competitive, and parallelized version of quantumkkk-means clustering to avoid some pitfalls discovered due to noisy hardware and apply the approach to a real energy grid clustering scenario. Using real-world German electricity grid data, we show that the new approach improves the balanced accuracy of the standard quantumkkk-means clustering by 67.8 % with respect to the labeling of the classical algorithm.
Recently, the volume of the generated data has increased significantly, leading to the need for computational techniques capable of handling such data efficiently. As a result, many quantum algorithms have been developed, and the domain of quantum machine learning (QML) has become more extensive. Traditional k-means algorithms for quantum computers usually make use of deep or shallow quantum circuits, resulting in sub-optimal clustering results. In our work, we introduce two types of quantum-inspired k-means algorithm: (1) the quantum subtraction operation and (2) the rotational-difference dissimilarity measure. Our second framework measures the dissimilarity using a quantum rotation-based dissimilarity circuit, which encodes the relative difference of the states. We employ a Hadamard-test-based circuit design, as well as an alternative technique that is not used in other quantum dissimilarities like the swap test. The introduced algorithms are evaluated on six different datasets—Iris, Wine, Breast Cancer Wisconsin, Blobs, Moons, and the noisier Iris dataset. Evaluation involves clustering validity metrics, as well as the classic classification performance metrics. The findings show that the rotational-based dissimilarity metric allows us to obtain clustering results comparable with the results obtained by the classical counterpart, thus showing the feasibility of the introduced distance calculation technique.
Quantum computing, based on quantum theory, holds great promise as an advanced computational paradigm for achieving fast computations. Quantum algorithms are expected to surpass their classical counterparts in terms of computational complexity for certain tasks, including machine learning. In this paper, we design, implement, and evaluate three hybrid quantum k-Means algorithms, exploiting different degrees of parallelism. Indeed, each algorithm incrementally leverages quantum parallelism to reduce the complexity of the cluster assignment step up to a constant cost. In particular, we exploit quantum phenomena to speed up the computation of distances. The core idea is that the computation of distances between records and centroids can be executed simultaneously, thus saving time, especially for big datasets. We show that our hybrid quantum k-Means algorithms are theoretically faster than the classical algorithm, while experiments suggest that it is possible to obtain comparable clustering results.
Clustering remains a cornerstone of unsupervised learning, yet classical algorithms often struggle with the inherent complexities of modern datasets, such as high dimensionality, non-linear separability, and significant noise. This paper introduces the Hybrid Quantum-Classical Clustering Algorithm (HQCA), a novel framework that leverages the power of quantum computation and the robustness of classical machine learning to overcome these limitations. HQCA integrates a quantum kernel estimation phase, utilizing a parameterized quantum circuit to project data into a high-dimensional Hilbert space, thereby enhancing cluster separability where classical kernels fail. Furthermore, it employs a quantum-enhanced optimization routine, based on the Quantum Approximate Optimization Algorithm (QAOA), to determine optimal cluster centroids, thereby mitigating the common pitfall of local minima encountered by algorithms like K-Means. The algorithm also incorporates a quantum-inspired gap statistic to autonomously determine the optimal number of clusters. We rigorously evaluate HQCA against state-of-the-art classical clustering methods, including K-Means, DBSCAN, and Spectral Clustering, on multiple real-world benchmark datasets from the UCI repository, such as Iris, Wine, and a high-dimensional image dataset (Fashion-MNIST). Our results demonstrate that HQCA consistently achieves superior performance across multiple evaluation metrics, including Purity, Silhouette Score, and Adjusted Rand Index (ARI), particularly excelling in scenarios involving complex, non-linear data manifolds. The proposed hybrid paradigm not only signifies a substantial leap in clustering accuracy and robustness but also provides a scalable pathway for leveraging current Noisy Intermediate-Scale Quantum (NISQ) devices in practical data analytics workflows, marking a critical step toward potential quantum advantage in unsupervised learning. We emphasize that the demonstrated advantage is algorithmic and representational, not an asymptotic runtime advantage.