Quantum Algorithms Database
Quantum GAN (QGAN)
A quantum analog of classical generative adversarial networks, where both generator and discriminator may be quantum circuits, potentially learning quantum state distributions.
Year
2018
Inventor(s)
Seth Lloyd and Christian Weedbrook; Pierre-Luc Dallaire-Demers and Nathan Killoran; Christa Zoufal, Aurélien Lucchi, and Stefan Woerner
Speedup Type
Heuristic (No Proven Speedup)
Difficulty
★★★★☆
Overview
A generative adversarial network, or GAN, trains two models against each other. A generator learns to produce samples that look like real data, and a discriminator learns to tell real from generated samples. As they compete, the generator gets better. A quantum GAN replaces one or both of the models with quantum circuits, so that the generator can produce quantum states, or the discriminator can analyze quantum data.
Quantum GANs have two roles. For quantum data, such as the output of an experiment, they offer a way to learn and reproduce a state without full tomography. For classical data, they can load probability distributions into quantum states, which is useful for algorithms such as quantum Monte Carlo that need the distribution in a register. Evidence of advantage is limited.
The problem it solves
Learning and generating samples from complex quantum state distributions that would be exponentially expensive to represent classically.
History and background
Goodfellow and coauthors introduced classical GANs in 2014. Lloyd and Weedbrook proposed quantum generative adversarial learning in Physical Review Letters in 2018, arguing that for quantum data, the adversarial game can in some settings give an exponential speedup. Dallaire-Demers and Killoran described a quantum GAN with quantum circuits for both players in Physical Review A in 2018.
Zoufal, Lucchi, and Woerner proposed a hybrid quantum GAN in 2019 for learning and loading random distributions, with a demonstration on an IBM quantum computer using three qubits, and the application to option pricing. Hu and coauthors reported a superconducting-qubit demonstration in Science Advances in 2019, and Huang and coauthors reported generating small images on a superconducting processor in 2021. Chakrabarti and colleagues proposed quantum Wasserstein GANs at NeurIPS in 2019, which use a transport-based loss that trains more stably.
How it works
A quantum generator circuit produces quantum states. A quantum (or classical) discriminator attempts to distinguish generated states from real target states. The two networks train adversarially until the generator produces indistinguishable states.
In a classical GAN, the generator takes random noise and turns it into a sample, such as an image. The discriminator receives either a real sample or a generated one and outputs the probability that it is real. The generator is trained to fool the discriminator, and the discriminator to catch the generator. At equilibrium the generated samples are indistinguishable from real ones.
In a quantum GAN, the generator is a parameterized quantum circuit that prepares a state from a simple starting state, possibly with random inputs. The discriminator is another quantum circuit, or a classical network, that measures the state and outputs a score. The training alternates between updating the discriminator to improve its score on real versus generated data and updating the generator to reduce it.
For quantum data, the real data are quantum states produced by some process. The generator learns to prepare a state that the discriminator cannot distinguish from the target. If it succeeds, the generator circuit is a compact description of the state. For classical distributions, the generator learns to produce a quantum state whose measurement statistics match the target, which can be used to load the distribution into a register.
Step by step
- Choose the target: a distribution over classical data or an unknown quantum state, and define how real samples are obtained.
- Define a generator circuit with trainable parameters, which maps a simple input state, with optional random noise, to a candidate state.
- Define a discriminator, either a quantum circuit with a measurement or a classical network, that scores samples as real or generated.
- Train the discriminator for a few steps to separate real data from generated data, using gradient-based updates.
- Train the generator for a step to increase the discriminator's error, with gradients estimated by parameter-shift rules on quantum hardware.
- Alternate until the discriminator cannot do better than chance, then use the generator circuit to produce samples or to load the distribution.
A worked example
Consider learning a log-normal distribution of asset prices on three qubits, giving eight price levels. The generator is a short circuit with a handful of rotations and entangling gates. After training against a classical discriminator on samples from the target, the generator's measurement probabilities approximate the log-normal shape, and the resulting state can be used as the input to an amplitude estimation routine for option pricing.
For a quantum target, such as a two-qubit entangled mixed state, the generator learns circuit parameters such that the output state has high fidelity with the target. With a few hundred training steps on a simulator, fidelities above 0.95 are routinely reported, but these are small systems that other methods can handle easily.
Complexity and resources
| Item | Detail |
|---|---|
| Training cost | Many iterations, each needing circuit evaluations for gradients of both generator and discriminator |
| Gradient estimation | Two circuit evaluations per parameter with the parameter-shift rule |
| Loading distributions | Circuit size grows with the number of qubits; depth is a problem for rich distributions |
| Claimed advantage | Exponential speedup under assumptions for quantum data, not demonstrated in practice |
| Training difficulties | Barren plateaus, mode collapse, and noise |
What hardware it needs
- Near-term quantum devices for small demonstrations, with variational circuits of modest depth.
- Classical computing for the discriminator and optimization, in hybrid versions.
- Fault-tolerant hardware and quantum memory for the asymptotic speedups.
Applications
- Learning and loading probability distributions for quantum Monte Carlo and finance.
- Learning and compressing quantum states, and generating states for benchmarking.
- Generating small images or synthetic data in demonstrations.
- Quantum data augmentation and anomaly detection in exploratory studies.
Limitations and caveats
- Training is unstable, and quantum circuits suffer from barren plateaus.
- Demonstrations use a handful of qubits and small data.
- Circuit depth required to load realistic distributions can be large.
- No clear advantage over classical generative models has been shown for classical data.
Common misconceptions
- Quantum GANs do not generate data from nothing. They learn from training samples.
- A quantum GAN is not automatically better than a classical GAN.
- Generating a quantum state is not the same as storing a data set in memory.
How it compares
- Classical GANs and diffusion models are far more developed and operate at enormous scale.
- Quantum Boltzmann machines use thermal states to model distributions rather than an adversarial game.
- Quantum circuit Born machines are generative models that train a circuit with a divergence-based loss, without a discriminator.
Real-world impact
Early demonstrations on quantum hardware for simple distributions. Potential applications in quantum state preparation and quantum chemistry, though training stability remains a challenge.
Why it matters
Generative models for quantum data are a natural fit for quantum computers, and loading distributions efficiently is a bottleneck for many quantum algorithms. Quantum GANs address both, which makes them a useful research direction.
They also illustrate the broader challenge of quantum machine learning: moving from proof-of-concept demonstrations to models that scale and outperform classical ones.
Frequently asked questions
What is a quantum GAN?
A generative adversarial network in which the generator, the discriminator, or both are quantum circuits.
What can it be used for?
Learning quantum states, loading probability distributions into quantum registers, and generating small synthetic data sets.
Has it shown quantum advantage?
Not in practice. There are theoretical arguments for exponential speedups under assumptions, but demonstrations are small.
What is a quantum Wasserstein GAN?
A variant that uses a transport-based distance as the loss, which trains more stably than fidelity-based losses.
What are the main difficulties?
Barren plateaus, noise, mode collapse, and the depth needed to represent complex distributions.
Keep learning
- Related algorithm: Quantum Algorithms and Quantum Optimal Transport
- Related algorithm: Quantum Boltzmann Machine (QBM)
- Related algorithm: Quantum Monte Carlo Integration
- Related algorithm: Quantum Kernel Estimation
This page is written for educational purposes. Complexity statements describe the best known results at the time of review (September 30, 2026), and research in this area moves quickly, so check recent papers before relying on a specific bound.