ZKSF logo, a neon quantum brainZKSF

Applications / AI / Quantum for AI

QML and classification

Labelling data through a quantum feature map

Last updated

Two methods, one dataset. A variational quantum classifier trains rotation angles the way a network trains weights and reads a label off the measurement. A quantum kernel trains nothing in the circuit at all: it embeds each point with a fixed feature map, measures the overlap of every pair, and hands the resulting matrix to a classical support vector machine. The kernel is the method most of the early advantage claims were made with.

Both were run on the same two-moons data, the same split and the same three seeds as four classical baselines, so the comparison is like for like. Two moons is low-dimensional classical geometry, which is where a quantum feature map is least expected to help: the separations proved in the literature are on datasets constructed for the purpose.

The ZKSF console with the engine list open on the full roster, from exact.cpu through the hardware engines
A feature-map circuit is an ordinary submission, from the console or the phone, and the engine is one field on it. Open the console
Method
Quantum kernel and variational classifier against classical baselines
Who runs this
Applied ML teams evaluating quantum feature maps
Classical baseline
Logistic regression, k-NN, an MLP and an RBF kernel
Structural limit
A kernel needs one circuit per pair: 1,111 circuits for 62 points

Run on our engines

Two moons drawn by numpy's default_rng for seeds 1 to 3 (noise 0.12), 22 training and 40 test points, features scaled into [0, π] on the training range. Logistic regression, k-NN and an MLP, written out in numpy, and an RBF kernel ran on the identical split. Submitted to each kind of compute we offer, on 17, 24 and 25 September 2026. Every figure below is a real job on the service, priced as any customer would be priced.

DeviceEngineKindQubitsResultCost
CPUexact.cpuCPU2variational classifier 0.925 / 0.825 / 0.700 across three seeds, 4,000 circuits a seed$0.4000
CPUexact.cpuCPU2quantum kernel 0.675 / 0.750 / 0.750, 1,111 circuits a seed$0.1111
NVIDIAexact.gpuGPU2quantum kernel 0.675 on seed 1, the CPU's seed-1 figure, 1,111 circuits$0.1111
Google Cloud TPUexact.tpuTPU2quantum kernel 0.675 on seed 1, the same again, 1,111 circuits in 1,540 s$1.0336

The same problem is yours to run: every instance here is seeded, so it rebuilds exactly. Open the console and a cost estimate is free before anything executes.

The table below sets every method side by side. The variational classifier trained for 20 steps of plain gradient descent at 1,024 shots a circuit; the kernel measured each overlap at 2,048 shots and handed the matrix to a support vector machine. Both trail k-NN and the RBF kernel on every seed, and the classifier took about 270 seconds a seed on the service against under a tenth of a second for the MLP.

The kernel's measured accuracy equals the exact kernel's on all three seeds. The largest error in any single measured entry was 0.037, too small to move a prediction, and the overlap of a point with itself is 1 to fourteen decimal places, so the circuit computes the kernel it claims to.

The seed fixes the data, the split, the classifier's starting angles and the baselines' initial weights. The shots are sampled fresh on the service, so the 1,024-shot figures re-run to within shot noise, not to the digit. Run with exact expectations instead, the same training on exact.cpu returns 0.925 / 0.850 / 0.700 on every run, and so does the published script's free local mode. The kernel's exact figures are the ones in the table.

On 25 September the kernel ran again for seed 1 on exact.gpu, an NVIDIA GPU, and on exact.tpu, a Google TPU: the same 1,111 circuits, shots and scoring. Both returned 0.675, the CPU's seed-1 figure, so the answer does not depend on the hardware underneath.

Neither is faster here, and the costs say why. A 2-qubit circuit simulates in microseconds, so a job's time is fixed overhead: the GPU run billed $0.1111, the per-circuit minimum, exactly as the CPU did, and the GPU only draws level with the CPU at about 20 qubits. The TPU run took 1,540 seconds and $1.0336, because a batch holds 200 circuits and each batch is a machine paid for from start to finish, so 1,111 circuits needed six. A TPU buys width, up to 29 qubits, not speed at two.

Every quote matched its charge: $0.1111 a seed for the kernel and $0.4000 a seed for the classifier.

Test accuracy, every method on the same data

Two moons, 22 training and 40 test points per seed. Variational classifier at 1,024 shots, quantum kernel at 2,048 shots, both on exact.cpu. Classical baselines untuned.

SeedVariational classifierQuantum kernelLogistic regressionk-NNMLPRBF kernel
10.9250.6750.9000.9500.8750.950
20.8250.7500.7750.8750.9000.875
30.7000.7500.9000.9501.0000.950

The variational classifier has 4 trainable parameters and the MLP 25. k-NN trains nothing and labels a point by its five nearest neighbours.

The same test on a QPU

Priced with our estimate endpoint, from the providers' list prices, which match what past hardware runs on each device were actually charged. Every QPU circuit is its own task, so each one pays the $0.30 task fee plus the per-shot rate. One seed each.

QPUKernel (1,111 circuits, 2,048 shots)Classifier trained on the QPU (4,000 circuits, 1,024 shots)Trained on a simulator, 40 test circuits on the QPU
Rigetti Cepheus$1,300$2,941$29.41
IQM Garnet$3,633$7,139$71.39
IQM Emerald$3,974$7,754$77.54
AQT IBEX$52,550$97,456$974.56
IonQ Forte$182,360$328,880$3,288.80

AQT takes at most 2,000 shots a circuit, so its kernel figure is at 2,000. Price is per task and per shot, not per gate, so fewer shots is the lever: at 256 shots the kernel on Rigetti is about $454 a seed.

What the makers say it is for

Rigetti publishes quantum kernel methods described as optimised for its own processors and aimed at classification and regression problems. Quandela states that quantum models capture correlations classical algorithms often miss, and that they can reach a target accuracy with smaller models or fewer iterations. AQT combines its room-temperature, rack-mounted trapped-ion machines with quantum machine learning and optimization frameworks to advance quantum artificial intelligence.

Those are claims about a class of method. The table below is one dataset, at one size, with every classical baseline run alongside on the same split, including the ones that came out ahead.

Where this stops

  • The kernel result turns on how far the input is scaled before it is written into rotation angles, a constant carrying no information about the problem: on seed 1 the same map and data score from 0.675 to 0.925 across eight settings of scaling and depth, computed exactly
  • A kernel needs one circuit per pair of points, so circuit count grows with the square of the dataset
  • Tuning one side of a comparison and not the other overstates the result in either direction, so the classical baselines here are the untuned defaults
  • Shot sampling on the service takes no seed, so only a run with exact expectations reproduces to the digit

The structural limit above does not move when a benchmark is re-run. Everything else on this page is a measurement, and a measurement can be repeated.

Run it yourself

Every figure above is from a job billed on the production service. Load the same circuits into the console, change the instance to your own data, and export a certificate for your own run rather than citing ours.

The argument behind these numbers, at length: Quantum machine learning on simulators and real quantum hardware.