This project is a part of the QCG Open Projects 2025. It demonstrates the implementation of a Variational Quantum Classifier (VQC) to solve binary classification problems. By leveraging quantum feature maps and entangling layers, the model learns to classify complex data by mapping it into a high-dimensional Hilbert space.
The repository includes implementations using standard healthcare data (Diabetes dataset) to showcase the practical utility of Hybrid Quantum-Classical Algorithms.
| File | Description |
|---|---|
qml.ipynb |
The core notebook containing the VQC architecture, circuit training, and initial results. |
qml_newdataset.ipynb |
Extension notebook testing the model robustness on a secondary dataset. |
diabetes.csv |
Primary dataset containing diagnostic features for classification. |
dataset.csv |
Supplemental dataset used for benchmarking and validation. |
Classical data from diabetes.csv is normalized using Min-Max Scaling to ensure feature values are compatible with quantum gate rotation ranges (
We utilize Angle Encoding or ZZFeatureMap to transform classical vectors into quantum states
The trainable part of the circuit consists of:
-
Rotation Layers: Parameterized
$R_y$ and$R_z$ gates. - Entanglement Layers: CNOT gates to create quantum correlations between features.
A classical optimizer (e.g., COBYLA or Adam) (COBYLA) in this case is used to iteratively update the circuit parameters by minimizing the Cross-Entropy loss calculated from quantum measurements.
- Python 3.9+
- Jupyter Notebook or VS Code
- Clone this repository:
git clone [https://github.com/Rasp05-ops/qcg_project.git](https://github.com/Rasp05-ops/qcg_project.git) cd qcg_project