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.
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.
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.
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.
This paper presents a novel quantum K-nearest neighbors (QKNN) algorithm, which offers improved performance over the classical k-NN technique by incorporating quantum computing (QC) techniques to enhance classification accuracy, scalability, and robustness. The proposed modifications focus on optimizing quantum data encoding using Hadamard and rotation gates, ensuring more effective rendering of classical data in quantum states. In addition, the quantum feature extraction process is significantly enhanced by the use of entangled gates such as IsingXY and CNOT, which enables better feature interactions and class separability. A novel quantum distance metric, based on the swap test, is introduced to calculate similarity measures between various quantum states, offering superior accuracy and computational efficiency compared to traditional Euclidean distance metrics. We assess the achievement of the proposed QKNN algorithm on three benchmark datasets: Wisconsin Breast Cancer, Iris, and Bank Note Authentication, and have noted its superior performance relative to both classical k-NN (CKNN) and Quantum Neural Network (QNN). The proposed QKNN algorithm is found to achieve prediction accuracies of 98.25%, 100%, and 99.27% ,respectively, for the three datasets, while the customized QNN shows prediction accuracies of only 97.17%, 83.33%, and 86.18%, respectively. Furthermore, we address the challenges of quantum noise by incorporating a repetition encoding-based error mitigation strategy, which ensures the stability and resilience of the algorithm in noisy quantum environments. The results highlight the potential of the proposed QKNN as a scalable, efficient and robust quantum-enhanced machine learning algorithm, especially in high-dimensional and complex datasets, when traditional approaches frequently fail.
More powerful and better performing, quantum algorithms offer a noticeable speedup in comparison with classical algorithms. This is due to the superposition property of quantum information. It helps to obtain algorithms that are better in terms of speed and performance. Machine learning benefits from quantum computing advantages to help time consuming algorithms run faster in the best conditions (without having to lose information). In the clustering algorithms case, the distance calculation between data points is the most resource consuming step. Thus, the use of a quantum distance is very helpful. In this paper, we test a number of quantum clustering algorithms with different data preparation methods. Experiments were done for different datasets (Iris, Wine, Breast cancer) and the comparison is based on the Clustering quality and the accuracy score.
This study investigates hybrid quantum-classical K-Means algorithms for clustering heart disease patient data. Using quantum swap-test circuits for distance calculation, 2 approaches were tested on both noisy and ideal quantum simulators. A real-world dataset of over 1,000 records was preprocessed using standard techniques, including normalization, outlier removal, and dimensionality reduction. The results show that both quantum methods achieve accuracy up to 0.83 and F1-scores comparable to the classical K-Means baseline (0.82 - 0.83), even when executed on quantum simulators with real-device noise models. These findings highlight the practical potential of quantum-enhanced clustering methods. The study supports the feasibility of applying quantum-enhanced clustering in medical analytics, particularly for early-stage heart disease detection and patient risk stratification. HIGHLIGHTS This paper introduces a hybrid quantum–classical K-Means clustering framework for analyzing heart disease data. Two quantum circuits for distance calculation are designed and evaluated on a real-world dataset using both ideal quantum simulators and noisy quantum hardware (e.g., IBM’s ibm_brisbane). The quantum clustering algorithms demonstrate performance comparable to classical K-Means and traditional models such as XGBoost. Future work will focus on circuit optimization, scalable encoding strategies, and validation on larger datasets using real quantum devices. GRAPHICAL ABSTRACT
This study introduces a Hybrid Quantum K-Means Clustering Algorithm with automatic cluster detection for classifying cancerous and non-cancerous gene expression data. The method employs Quantum Multi-Feature Mapping for state encoding, Swap Test-based quantum distance estimation, and Quantum Gradient-Based Optimization to dynamically identify the optimal number of clusters by minimizing intra-cluster variance. Initial centroids are selected through a probability-proportional distance strategy, improving stability and accuracy. Applied to breast cancer datasets, the approach surpasses the existing quantum K-Means algorithm, achieving a Silhouette Score of 0.641 (compared to 0.601), a Calinski-Harabasz Index of 766.57 (compared to 617.65), and a Davies-Bouldin Index of 0.659 (compared to 0.704). These results indicate superior cluster compactness and separation. Although the proposed algorithm exhibits slightly higher time complexity O (N×Kmax×Mobs) due to iterative optimization, it significantly outperforms predefined-K quantum K-Means in clustering accuracy, error reduction, and practical feasibility. Its efficiency in handling high-dimensional data and resilience to quantum noise highlights its potential for real-world bioinformatics applications, particularly in cancer classification using gene expression profiles.