This repository contains a code for implementing the algorithms developed in the paper:
S. Patil, S. Banerjee, P. K. Panigrahi Measurement-based quantum clustering algorithms, arXiv preprint arXiv:2302.00566 (2023).
The code is written in Python 3.8.10 The code is tested on Ubuntu 18.04.5 LTS.
Clone the repo:
git clone https://github.com/Next-di-mension/measurement-based-quantum-clustering.git
pip install -r requirements.txt
.
├── data
│ ├── ch130.tsp.gz
├── Images
├── Implementation
│ ├── breast_cancer_unsharp.ipynb
│ ├── concentric_circle_classical.ipynb
│ ├── QHCA_churritz_data.ipynb
│ ├── QHCA_con_circle.ipynb
├── LICENSE
├── QHCA.py
├── Unsharp.py
├── requirements.txt
├── README.md
We propose two novel measurement-based clustering algorithms are proposed based on quantum parallelism and entanglement. The Euclidean distance metric is used as a measure of `similarity' between the data points. The first algorithm follows a divisive approach. The second algorithm is based on unsharp measurements where we construct the set of effect operators with a Gaussian probability distribution to cluster similar data points. One major advantage of both the proposed algorithms is that they are simplistic in nature and easy to implement. We have successfully applied both algorithms on a concentric circle data set where the classical clustering approach fails. It is found that the presented clustering algorithms perform better than the classical divisive one; both in terms of clustering and time complexity which is found to be
The data set consists of 1000 data points with 2 features. The data points are generated using the following code:
from sklearn.datasets import make_circles
X, y = make_circles(n_samples=1000, noise=0.05, factor=0.5)
Dataset of 400 points generated using sklearn with noise ratio of 0.1. (Middle) Classification of the dataset using the traditional classical divisive clustering algorithm. (Right) Classification of the dataset using the QHCA. Different colors represent different clusters.