Quantum and classical classifiers compared on identical data, with nothing overclaimed.

A web service that runs a quantum-kernel classifier against classical models on the same rows, features and tuning folds, for a cybersecurity and a medical dataset, and serves a calibrated network-intrusion triage model. Every comparison can be re-run from the public code.

Runs locally with one Docker command; a live demo is available on request.

Sector
Cybersecurity
Method
Quantum machine learning
When
Jul – Oct 2026
Context
Independent research
Role
Solo: research design, quantum kernels, benchmarks, web service and tests

Key figures

  • 478,055 validation flows reproduced exactly by the service
  • 0.991 PR-AUC of the triage model on those flows
  • 31 of 40 runs with the quantum kernel at or below classical
  • 0.50 balanced accuracy (chance) at 12 qubits without bandwidth tuning
QHybrid Lab after an 8-qubit run on network flows: the quantum-kernel SVM and the RBF SVM both reach 0.850 balanced accuracy, with the bandwidth tuning table and kernel diagnostics below.

How it works

One matched comparison
  1. Sample : 200 training and 200 test rows, stratified
  2. Reduce : Scale, then PCA to one feature per qubit
  3. Tune : The same five folds for every model
  4. Quantum kernel : ZZ feature map, exact statevectors, tuned bandwidth
  5. Score : Held-out metrics, kernel diagnostics, circuit counts
Triage, for each network flow
  1. Validate : 29 NetFlow features, finite and non-negative
  2. Score : Frozen LightGBM model
  3. Calibrate : Platt map fitted on a separate partition
  4. Decide : Alert at one of three frozen thresholds

The question

Quantum machine learning is often reported as beating classical models. For security classification, does a quantum kernel add anything once the classical models get the same data, the same features and the same tuning? And can anyone re-run the comparison and check it?

What was done

  • A matched sandbox. Each run draws 200 training and 200 test rows, reduces them to one feature per qubit, and tunes logistic regression, a linear SVM, an RBF SVM and a quantum-kernel SVM on the same five folds. The quantum kernel is computed from exact statevectors of a ZZ feature map. A LightGBM model on all features of the same rows is shown for context.
  • Two fields. Network flows from NF-UNSW-NB15-v2 for cybersecurity, and breast-cancer diagnosis for medicine.
  • A grid fixed before it was run. 80 runs: two datasets, 2 to 12 qubits, five seeds, with the kernel’s bandwidth either tuned or fixed at the conventional scale.
  • A correction made in the open. In the first run, the chosen regularisation sat on the edge of its range for the quantum model in 32 of 40 runs. The range was widened for every model before re-running, and both sets of results are reported.
  • A triage service. The frozen LightGBM network-intrusion model from the classical research, with its calibration and three decision thresholds, served behind a validated API. It refuses to start if any shipped file’s hash changes.

Results

  • Without bandwidth tuning, quantum kernel values collapse towards zero as qubits are added. On breast cancer, balanced accuracy falls to chance (0.50) at 12 qubits.
  • With the bandwidth tuned like an RBF kernel’s width, the quantum kernel tracks the RBF SVM. It scored at or below the best classical model in 31 of 40 runs; its largest lead was 0.020 balanced accuracy.
  • The served triage model reproduces the research confusion matrix exactly on 478,055 validation flows, with a PR-AUC of 0.991.

Limits

  • Simulation is exact and noiseless. One 8-qubit run of this size would need 159,400 fidelity circuits on real quantum hardware, each with shot noise.
  • Samples are small: differences of a few points are within seed-to-seed variation.
  • The triage model was validated on one corpus only, and IP time-to-live features alone separate that corpus well; it is not approved for operational use.
  • There is no always-on public server. It runs with one Docker command, and a demo is available on request.

Built with

  • Python
  • Qiskit
  • scikit-learn
  • LightGBM
  • FastAPI
  • Docker

Network flows: NF-UNSW-NB15-v2 (Sarhan, Layeghy and Portmann, 2022), academic use with citation. Breast Cancer Wisconsin (Diagnostic): CC BY 4.0.

Next project US accident impact risk