Running a classifier on a real quantum computer
An experiment that put a four-qubit variational circuit at the end of a classical machine-learning pipeline, ran it on real IBM hardware, and measured what that actually bought. The answer was not an accuracy win, and the repository says so in its own first paragraph.
Last verified
The question
Can a quantum circuit do the final classification step in a real machine-learning pipeline — and if it can, does it help?
What was done
- 01A classical autoencoder compresses NSL-KDD network traffic features down to four numbers, and a four-qubit variational circuit classifies each event as an attack or normal traffic.
- 02A fairness twin was built: a classical head trained on the identical four features and the identical reduced 10,000-row diet, so the quantum head's training handicap is shared rather than hidden.
- 03Six measurement sessions were run, including deliberate noise-scaling and error-mitigation passes.
- 04The trained circuit angles were then executed on IBM's ibm_marrakesh backend — a 156-qubit Heron r2 device — across 300 events and 183 seconds of billed QPU time, with job identifiers retained.
- 05A prediction was written down in advance, before the hardware run, and kept in the repository.
What was learned
- On the official KDDTest+ split the quantum head reached 74.2% accuracy against its fairness twin's 73.6%, while plain logistic regression on all 122 features reached 75.5%. The circuit matched its classical twin; it did not beat the simple baseline.
- Realistic simulated noise damaged the circuit's confidence values while leaving most of its actual verdicts intact — the decisions survived conditions that made the probabilities meaningless.
- Error mitigation repaired the confidences rather than the accuracy, which is a more precise and less exciting claim than error mitigation usually gets.
- The hardware run contradicted the prediction that had been written down in advance. Pre-registering the guess is what made that visible rather than forgettable.
Limitations
What this is not, stated as plainly as possible.
- This is not a demonstration of quantum advantage, and the repository is explicit that no such claim is made.
- The dataset is a standard research benchmark, not live network traffic.
- Quantum simulation is slow, so the quantum head was trained on a reduced diet. The fairness twin exists precisely because that handicap needs to be shared to make the comparison meaningful.
- One backend, one device family, one problem. Nothing here generalises to other hardware or other tasks.
Evidence
Sources for this page
A public repository documenting the experiment. Its own summary states the result is "not an accuracy win", that the quantum head matches its classical twin rather than beating it, and that the work makes no quantum-advantage claim.
Checked 26 August 2026
The repository records that 24 trained circuit angles were executed on IBM's ibm_marrakesh backend, a 156-qubit Heron r2 device, over 300 events and 183 seconds of billed QPU time, with job identifiers retained. It also records that the outcome contradicted the prediction written down in advance in results/pre_registration.md.
Checked 26 August 2026
On the official NSL-KDD KDDTest+ split: logistic regression on all 122 features reached 75.5%; a four-feature bottleneck with a classical head reached 73.8%; the fairness twin trained on the same reduced 10,000-row diet reached 73.6%; the four-qubit quantum head reached 74.2%. The twin exists so the training handicap is shared.
Checked 26 August 2026
The founder's public write-up of the experiment.
Checked 26 August 2026