Research projectIntermediateEarly research model

Quantum Multiclass Classification

Quantum Multiclass Classification

Extend the VQC to three classes by measuring three observables and applying softmax with a trainable scaling factor.

An educational research project on small data and quantum simulation: the results measure the model's behaviour in this setting only, and prove no quantum advantage.

The notebook and Google Colab

02-vqc-multiclass-classification.ipynb — The notebook ran in full without errors (2026-11-20 08:11 UTC, 19 s on CPU)

The notebook has not yet been published in a public GitHub repository, so we do not give a direct Colab link. Download the notebook, then open it from Colab via "File → Upload notebook".

The notebook's twelve sections
  1. Project title
  2. Problem statement
  3. Installing the libraries
  4. Importing the libraries
  5. data loading
  6. Preprocessing
  7. Building the quantum model
  8. Training
  9. Evaluation
  10. Charts
  11. Results
  12. References

The notebook runs on a CPU without a GPU, and pins the versions it was tested with in its first cell.

Research problem

How do we turn expectation values bounded in [−1, 1] into a probability distribution over several classes, and what is the effect of the scaling factor on convergence?

Objectives

  • Design a multi-class output from quantum measurements.
  • Train with categorical cross-entropy.
  • Analyse the confusion matrix and where errors occur.
DataIris (Fisher 1936) — scikit-learn / UCI Machine Learning Repository CC BY 4.0 Source
Architecture4 features → $R_Y$ → StronglyEntanglingLayers (3 layers) → $s\cdot(\langle Z_0\rangle,\langle Z_1\rangle,\langle Z_2\rangle)$ → softmax
ToolsPennyLane 0.45.1 · scikit-learn 1.9.1 · Matplotlib
Evaluation metricsAccuracy · Per-class Precision/Recall/F1 · Confusion Matrix · Training Time

Method

  1. Load the full Iris dataset.
  2. A stratified split and scaling on training data only.
  3. Build the circuit and the multi-class output.
  4. Train for 80 epochs.
  5. Evaluate accuracy and the classification report.
  6. Plot the loss and the confusion matrix.

Linked interactive experiment

References

  1. Maria Schuld; Alex Bocharov; Krysta M. Svore; Nathan Wiebe (2020). Circuit-centric quantum classifiers. Phys. Rev. A 101:032308 doi:10.1103/PhysRevA.101.032308
  2. Adrián Pérez-Salinas; Alba Cervera-Lierta; Elies Gil-Fuster; José I. Latorre (2020). Data re-uploading for a universal quantum classifier. Quantum 4, 226 doi:10.22331/q-2020-02-06-226
  3. R. A. Fisher (1936). The use of multiple measurements in taxonomic problems. Annals of Eugenics 7(2):179–188 doi:10.1111/j.1469-1809.1936.tb02137.x