ZKSF logo, a neon quantum brainZKSF

Applications / AI / Quantum for AI

QGAN and synthetic data

Adversarial generation against a learning discriminator

A QGAN is a generative adversarial network whose generator is a quantum circuit rather than a neural network. A classical discriminator learns to separate the circuit's samples from the target while the circuit learns to fool it, and the two alternate. The discriminator half is ordinary PyTorch and runs where your other models run; only the generator is submitted as circuits.

Two quantities are tracked because either alone can mislead. The discriminator gap says whether the discriminator can still tell the two apart, and it shrinks both when the generator improves and when the discriminator collapses. The total variation distance to the target says whether the generated distribution actually moved. Both are reported.

A finished photonic job on Quandela Belenos in the ZKSF console, with the measured counts and the error_info block naming the device
Every run behind this page finishes like this one, with a certificate anyone can check. Open the console
Method
QGAN with a classical discriminator
Who runs this
Teams whose training data is scarce, regulated or expensive to collect
Classical baseline
The discriminator gap, which starts at 0.0069
Structural limit
Mode collapse onto a subset of outcomes, the same failure mode as a classical GAN

Run on our engines

A two-qubit generator of four rotations against a two-layer classical discriminator, 40 alternating steps, targeting 0.4 / 0.1 / 0.1 / 0.4. Submitted to each kind of compute we offer, on 18 September 2026. Every figure below is a real job on the service, priced as any customer would be priced.

DeviceEngineKindQubitsResultCost
CPUexact.cpuCPU2TVD 0.269 to 0.146, discriminator gap 0.0069 to -0.0006$0.0722
NVIDIAexact.gpuGPU2TVD 0.278, the same converged generator at 1,000 shots certificate$0.0001
Rigettiqpu.rigettiQPU2TVD 0.286, the converged generator re-run at 1,000 shots$0.7250
IQMqpu.iqm.garnetQPU2TVD 0.240, the same generator and shot count on a second superconducting device certificate$1.7500
CPUphotonic.slos.cpuCPU3generator half, P(target) 1.000, 0.989, 0.932, 0.875 and 0.766 across five seeded starts$0.1096
Quandelaqpu.quandela.belenosQPU32,686 coincidences in 100,000 attempts, P(target) 0.974 with the two bunched outcomes returning 4 to 1 certificate$0.4584

A note on the hardware certificates: they state Hellinger fidelity against the exact distribution. For an optimisation circuit that distribution is spread across many outcomes rather than concentrated on one, so the figure is low by construction and is not a measure of whether the device found a good answer. The result column above is.

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.

722 circuits over 40 alternating steps. The generated distribution ended at 0.408 on 00, 0.238 on 01, 0.000 on 10 and 0.354 on 11, against a target of 0.4 / 0.1 / 0.1 / 0.4: the two large modes were found, and of the two symmetric minority outcomes one took 0.238 and the other took nothing.

The photonic rows are a separate experiment on the same shape: three modes, two photons entering modes 0 and 2, three trainable beamsplitters, and the same 0.4 / 0.1 / 0.1 / 0.4 target carried onto Fock states. The optimum is exactly reachable, so the ceiling is 1.0, and five seeded starts reached 1.000, 0.989, 0.932, 0.875 and 0.766. Each start draws its initial angles from its seed; shots are sampled fresh on every run, so a rerun lands close to these, not exactly on them.

On the device, 2,686 of 100,000 attempts produced a surviving photon pair. That is the measurement photonics makes you pay attention to: detection is heralded, so the raw counts describe transmission and only the coincidences describe the generator. Of those, 97.4% landed on the four intended outcomes, so the trained support survived the move to hardware intact. What moved is the balance: the two bunched outcomes should come back level and returned 0.538 against 0.130. The single-photon counts lean the same way, 48,425 on one mode against 31,449 on the other, which points at the transmission of the two paths rather than at the training. A second run at the same settings gave 0.516 and 0.140, so it is a property of the device and not of one afternoon.

The hardware rows ran a second training of the same model; its converged circuit was run on each device to compare outputs. IQM Garnet returned 0.240 and Rigetti 0.286, either side of the 0.270 the noiseless simulator gives for that circuit at the same shot count, so at this width the spread between devices is about the size of the spread between a device and its own reference.

The GPU row costs $0.0001, which is the platform floor and not the GPU rate: GPU bills at $3.00 an hour against CPU at $0.69, and a two-qubit run ends before either reaches the floor. The CPU row's cost is the whole training run, 722 circuits at that same floor. The GPU's 0.278 agrees with the noiseless 0.270 inside sampling noise, which is the point of running it.

What the makers say it is for

Rigetti describes a technique developed to address challenges in training generative adversarial networks, with financial applications named as the target. Quandela, whose Belenos processor appears in the table, lists generative AI among the areas its MerLin framework is built for, and describes MerLin as a GPU-accelerated way to embed quantum models into existing machine learning workflows.

Both descriptions put the quantum part inside an otherwise classical training loop, which is exactly the shape of the run below. A quantum generator, a classical discriminator, and forty alternating steps between them.

Where this stops

  • Mode collapse onto one of several equivalent outcomes is an ordinary GAN failure and is visible in the measured distribution above
  • One start in five stuck on the photonic leg, so a single run is not evidence of convergence and several seeds are needed
  • Dual-rail encoding spends two modes per qubit, so a 24-mode photonic register is 12 qubits and the feature space a photonic generator can reach is correspondingly small

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.