Barren plateaus: why quantum neural networks stop training
A barren plateau is a parametrised quantum circuit whose cost landscape is almost flat everywhere: the gradients shrink exponentially with the number of qubits, so an optimiser cannot tell which way to move without exponentially many measurements. Deep random circuits, global cost functions and hardware noise all cause it. The known ways out (local costs, shallow or structured circuits, careful initialisation) work, but the circuits they leave are often ones a classical computer can simulate. The code below measures the effect on a circuit of your own before you spend time training it.
Updated
At a glance
- What it is
- A cost landscape whose gradients are exponentially small in the number of qubits almost everywhere
- Why it stops training
- Resolving a gradient of size from measurements takes on the order of shots, so an exponentially small gradient needs exponentially many
- Main causes
- Deep random circuits, global cost functions, too much expressivity, entangled or random input states, and hardware noise[5]
- Known remedies
- Local cost functions, shallow or structured circuits, initialisation near the identity, fewer qubits per circuit
- The catch
- Many circuits that provably avoid barren plateaus can be simulated classically once some data is collected from the device[8]
- Same as vanishing gradients in deep learning?
- No. There the gradient shrinks with network depth; here it shrinks with the number of qubits, and with a global cost it does so even in a shallow circuit
What a barren plateau is
A variational circuit, the quantum part of a quantum neural network or of VQE and QAOA, has trainable rotation angles . The model's output is an expectation value , the cost is a function of it, and training follows the gradient of the cost with respect to . McClean and colleagues showed that for circuits whose parameters are random and which are deep enough to behave like random unitaries (in technical terms, to form a 2-design), the average gradient is zero and its variance falls exponentially with the number of qubits [1].
A variance that small means almost every starting point sits on a flat plain. The gradient is not exactly zero, but it is smaller than the noise of any realistic estimate. On hardware each expectation value comes from a finite number of shots, with a statistical error of about for shots. To see a gradient of size against that error you need on the order of , and when shrinks like the shot count grows like . A better optimiser does not help: gradient-free methods also compare cost values that differ by exponentially little.
The word plateau is apt in one more way. A plateau is a property of the whole landscape, not of a bad starting point. Restarting from another random point lands on the same plain, and the cost values themselves concentrate around their mean, so even looking for a better region costs exponentially many measurements[5].
What causes barren plateaus
The review by Larocca and colleagues traces every known cause to one picture: the circuit spreads the state over a space that grows exponentially with n, and the cost only looks at a tiny part of it.
| Cause | What happens | Source |
|---|---|---|
| Deep random circuits | Once a circuit is deep enough to look like a random unitary, gradient variance falls exponentially in n. | [1] |
| Global cost functions | A cost that compares the whole n-qubit state with a target (a fidelity, or a product of Z on every qubit) has a barren plateau even for shallow circuits. | [2] |
| Too much expressivity | The closer a circuit's set of reachable unitaries is to all unitaries, the flatter its landscape. Expressivity and trainability pull against each other. | [3] |
| Hardware noise | Local Pauli noise makes gradients vanish exponentially in n once the depth grows linearly with n, whatever the initialisation. | [4] |
| Input states and data encoding | A highly entangled input state, or an encoding of classical data that produces states ill-aligned with the circuit and the observable, concentrates the cost in the same way. | [5] |
Watch the gradient shrink
import numpy as np
from eigenkit import Circuit, CircuitBuilder, Z
rng = np.random.default_rng(0)
def random_circuit(n_qubits, layers):
"""RY(pi/4) on every qubit, then layers of random Pauli rotations and a CNOT ladder."""
qc = CircuitBuilder(n_qubits=n_qubits)
w = qc.add_weights(n_qubits * layers)
for q in range(n_qubits):
qc.ry(np.pi / 4, qubit=q)
for layer in range(layers):
for q in range(n_qubits):
gate = (qc.rx, qc.ry, qc.rz)[rng.integers(3)]
gate(w[layer * n_qubits + q], qubit=q)
for q in range(n_qubits - 1):
qc.cnot(q, q + 1)
return Circuit(qc, observables=Z(0) * Z(1))
def gradient_variance(n_qubits, layers, samples=200):
grads = []
for _ in range(samples):
circuit = random_circuit(n_qubits, layers)
weights = rng.uniform(0, 2 * np.pi, circuit.spec.n_weights)
grads.append(circuit.jacobian(weights, [])[0]) # d<Z0 Z1> / d(first weight)
return np.var(grads)
for n in (2, 4, 6, 8, 10, 12):
print(f"{n:2d} qubits deep (50 layers): {gradient_variance(n, 50):.2e}"
f" shallow (2 layers): {gradient_variance(n, 2):.2e}")The construction of McClean et al., with a CNOT ladder where they used controlled-Z gates: a fixed RY() layer, then layers of randomly chosen RX, RY or RZ rotations with random angles and the entangling ladder, and the local observable Z on qubits 0 and 1. The gradient is exact (eigenkit's adjoint method), so the spread is the landscape's, not shot noise. It runs in under a minute on a laptop with pip install eigenkit.
What the sample run shows
These numbers are from one run of the code above with seed 0, and they are an illustration of the effect, not a measurement to cite; another seed moves each of them by tens of percent.
In that run, the variance of the gradient for the 50-layer circuit fell from about at 2 qubits to about at 12 qubits, close to a factor of four for every two qubits added. That is the law: at 12 qubits the typical gradient was about a hundredth of a unit, and resolving it would take on the order of ten thousand shots for each entry of the gradient. The 2-layer circuit with the same observable stayed between about and at every size.
Both halves match the theory. The deep circuit behaves like a random unitary and has a barren plateau. The shallow circuit with a local cost does not: Cerezo and colleagues proved that a local cost on a circuit of logarithmic depth has gradients that vanish at worst polynomially[2]. Run the same experiment with a global observable, Z on every qubit, and the shallow circuit's variance falls with n too.
How to avoid barren plateaus
None of these is a guarantee for every model, and each one narrows what the circuit can do. The last section explains why that matters.
Use a local cost
Measure few-qubit observables and sum them, instead of one observable on every qubit or a fidelity with a target state. With logarithmic depth this keeps gradients at worst polynomially small[2].
Keep the circuit shallow, and add depth only when the score needs it
Each layer of a hardware-efficient ansatz adds expressivity and moves the circuit towards a random unitary. Start with one or two layers and stop adding them when the validation score stops improving.
Start near the identity
Initialise so that the circuit is a product of shallow blocks that each cancel to the identity[6], or draw the angles from a narrow range around zero, or warm-start from a solution of a smaller problem[5]. Training then starts away from the plateau, though the start may sit in a region that is poorly connected to the best solution.
Choose a structured ansatz
Circuits with a hierarchical shape like the quantum convolutional neural network have gradients that provably vanish at most polynomially[7], and circuits built from the problem's symmetries are a related route[5]. They also explore a smaller space, which is why they train.
Keep each circuit small
The plateau grows with the number of qubits in one circuit. Several small circuits, each on a few qubits, keep the gradient of each at the scale of a few-qubit circuit. Each is also easy to simulate classically.
Count the noise
On hardware, noise adds its own plateau once depth grows with n, and no initialisation removes it[4]. Keep the circuit shallow enough to finish well within the device's coherence time.
The catch: no plateau may mean no quantum advantage
Every remedy above works by keeping the computation in a small part of the exponentially large state space: a few qubits at a time, a short light cone, a symmetric subspace. Cerezo and colleagues argued that this is not a coincidence. For the models they reviewed, the structure that provably prevents a barren plateau also lets a classical computer estimate the loss, once some data has been collected from the quantum device[8]. Quantum convolutional neural networks, the standard example of a plateau-free model, were then shown to be effectively classically simulable on the kind of benchmark they are usually tested on, with a classical simulation of phase-of-matter classification at up to 1,024 qubits[9].
The argument has limits that its authors state: it is about average cases and provable guarantees, it leaves room for models that train well from a good starting point without a proof, and it does not rule out a quantum advantage for every trainable model. Its practical reading is this. If you can prove your model trains, check whether a classical simulation of it is cheap before you claim the quantum computer did something classical hardware could not. The decision guide covers that test for machine learning as a whole.
Questions
What is a barren plateau in quantum computing?
It is a training landscape of a parametrised quantum circuit in which the gradients are exponentially small in the number of qubits almost everywhere. The optimiser sees a flat surface and cannot find a direction to move in without an exponential number of measurements.
What causes barren plateaus in quantum neural networks?
Deep circuits with random parameters, cost functions that look at all qubits at once, circuits that are too expressive, highly entangled input states and encodings, and hardware noise. All of them spread the state over an exponentially large space while the cost only measures a small part of it.
How do you avoid barren plateaus?
Use local cost functions, keep circuits shallow, initialise the circuit close to the identity, choose a structured ansatz that respects the problem's symmetries, keep each circuit to a few qubits, and keep hardware runs short enough that noise does not dominate. Each of these narrows what the circuit can represent.
Are barren plateaus the same as vanishing gradients in deep learning?
They are related but not the same. Vanishing gradients in classical networks come from multiplying many small derivatives across layers and are fixed with better activations, normalisation and skip connections. A barren plateau comes from the size of the quantum state space and gets worse with the number of qubits, even at a fixed depth.
Does a better optimiser fix a barren plateau?
No. Gradient-free optimisers compare cost values, and on a barren plateau the cost values themselves differ by exponentially little, so they need exponentially many shots too. The fix has to change the circuit, the cost or the starting point.
If a model has no barren plateau, is it quantum advantage?
Not necessarily. The structure that keeps gradients large often confines the computation to a small subspace, and several plateau-free models have turned out to be classically simulable. Check the cost of a classical simulation before claiming an advantage.
Sources
- J. R. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, H. Neven. Barren plateaus in quantum neural network training landscapes. Nature Communications 9, 4812, 2018. arXiv:1803.11173.
- M. Cerezo, A. Sone, T. Volkoff, L. Cincio, P. J. Coles. Cost function dependent barren plateaus in shallow parametrized quantum circuits. Nature Communications 12, 1791, 2021. arXiv:2001.00550.
- Z. Holmes, K. Sharma, M. Cerezo, P. J. Coles. Connecting ansatz expressibility to gradient magnitudes and barren plateaus. PRX Quantum 3, 010313, 2022. arXiv:2101.02138.
- S. Wang, E. Fontana, M. Cerezo, K. Sharma, A. Sone, L. Cincio, P. J. Coles. Noise-induced barren plateaus in variational quantum algorithms. Nature Communications 12, 6961, 2021. arXiv:2007.14384.
- M. Larocca, S. Thanasilp, S. Wang, K. Sharma, J. Biamonte, P. J. Coles, L. Cincio, J. R. McClean, Z. Holmes, M. Cerezo. Barren plateaus in variational quantum computing. Nature Reviews Physics 7, 174–189, 2025. arXiv:2405.00781.
- E. Grant, L. Wossnig, M. Ostaszewski, M. Benedetti. An initialization strategy for addressing barren plateaus in parametrized quantum circuits. Quantum 3, 214, 2019. arXiv:1903.05076.
- A. Pesah, M. Cerezo, S. Wang, T. Volkoff, A. T. Sornborger, P. J. Coles. Absence of barren plateaus in quantum convolutional neural networks. Physical Review X 11, 041011, 2021. arXiv:2011.02966.
- M. Cerezo, M. Larocca, D. García-Martín, N. L. Diaz, P. Braccia, E. Fontana, M. S. Rudolph, P. Bermejo, A. Ijaz, S. Thanasilp, E. R. Anschuetz, Z. Holmes. Does provable absence of barren plateaus imply classical simulability? Nature Communications 16, 7907, 2025. arXiv:2312.09121.
- P. Bermejo, P. Braccia, M. S. Rudolph, Z. Holmes, L. Cincio, M. Cerezo. Quantum convolutional neural networks are effectively classically simulable. PRX Quantum 7, 020304, 2026. arXiv:2408.12739.
Run it yourself with eigenkit
eigenkit is EigenOrbit's open-source Python library: write a circuit once, run it on any simulator or QPU, and test it against a classical baseline on your own data before you invest in it or rule it out.
$ pip install eigenkit