Skip to main content
All visualizations
Advanced

VQE and the Barren Plateau

A quantum computer that only prepares states, and a classical optimiser that has to find them in the dark.

VQE and the Barren Plateau visualization

Every cell of the map is a full statevector simulation of the ansatz at that (θ, φ) and an exact expectation value of H — teal is low energy, amber high. Click anywhere on the map to move the starting point, or use the θ₀ and φ₀ sliders. The white trail is gradient descent; it turns red when it stops.

Gradient variance against qubit count

Press “Sample gradients” in the controls to start measuring. Nothing here is precomputed.

Variance of the per-site energy gradient at random parameters, against the number of qubits, with the circuit depth used for each.
QubitsAnsatz depthVar[∂E/∂θ] per siteTypical |gradient|vs 2 qubits
24 layers
48 layers
612 layers
816 layers
1020 layers

What VQE actually is

Almost nothing a near-term quantum computer can do is useful on its own. VQE is the honest workaround: use the quantum machine for the one thing it is good at — preparing a state that would be exponentially expensive to write down — and let a classical optimiser do the searching.

The loop is: pick parameters, ask the quantum computer to prepare |ψ(θ, φ)⟩ and measure ⟨H⟩, hand that one number to a classical optimiser, get new parameters, repeat. The variational principle guarantees ⟨H⟩ ≥ E₀ for every possible parameter setting, so lower is always better and you never have to wonder whether you have overshot.

The map is that guarantee made visible. Every cell is a real state preparation and a real expectation value of H = −Σ ZiZi+1 − h Σ Xi. Nowhere on it does the energy dip below the exact ground state energy of -7.2962, and the best cell on the grid is .

The landscape is not a bowl

Start the optimiser from a few different points. It will not always reach the same place. Gradient descent goes downhill, and downhill is a purely local instruction — a shallow basin next to a deep one traps it just as effectively as a deep one does.

Turn the layer count down to 1 and watch the whole map flatten out: a single-layer ansatz simply cannot express the ground state of a coupled chain, so even a perfect optimiser lands well short. Turn it up and the minimum deepens, but the landscape gets more corrugated. That trade — expressive enough to contain the answer, simple enough to be searchable — is the design problem at the centre of the whole field.

A real VQE gives every gate its own parameter, which for this circuit would be 36 of them. The two shared angles here exist so the landscape can be drawn at all. The corrugation you see in two dimensions is the shadow of a much worse problem in 36.

The barren plateau

Now the part that makes VQE hard in a way no better optimiser can fix. Press “Sample gradients”. For a random parameter setting of a deep hardware-efficient circuit, the gradient is not just small — its variance falls roughly exponentially with the number of qubits, by a factor near two for every qubit added. By 10 qubits the per-site variance is about two and a half orders of magnitude below the 2-qubit value.

The consequence is brutal. If a gradient component is of order 10⁻⁴, you need about 10⁸ measurement shots to tell it apart from zero, because shot noise on an expectation value falls only as 1/√shots. The landscape is not merely hard to search; at scale it is flat to within your ability to measure it, in almost every direction, from almost every random starting point. There is nothing for the optimiser to follow.

This is measured here, not asserted: the gradients are taken with the parameter-shift rule, which is exact rather than a finite difference, on random parameter vectors of an independent-parameter ansatz whose depth scales with its width. The number reported is per site, because H is extensive and a raw ∂E/∂θ carries a factor of n that has nothing to do with the plateau — but the effect does not depend on that choice. Measured both ways from 2 to 10 qubits, the raw extensive variance falls about 25× (≈ ×0.65 per qubit) and the per-site variance about 600× (≈ ×0.44 per qubit). Both are exponential; the normalisation moves the number, it does not create the decay.

One detail that turns out to decide whether any of this is visible: the sampled ansatz has to be able to produce complex amplitudes. A circuit of RY rotations and CZ gates started from |0…0⟩ is real at every step, so the ensemble it draws from lives in SO(2ⁿ) rather than SU(2ⁿ) and never approaches the 2-design that the barren-plateau result assumes. Sampled that way the raw variance here fell as n⁻¹ — a power law, not a plateau — and only the per-site division made the bars look like they collapsed. The RX sublayer is what fixes it, and the module’s tests now fail if it is removed.

Ways out are an active research area: shallow and problem-informed ansätze, clever initialisation that starts you somewhere non-random, local rather than global cost functions, and layerwise training. None of them is a general solution, and no amount of classical optimiser cleverness helps — the information is not there to be found.

What this simulation does and does not include

Every energy on this page is an exact expectation value computed from a full statevector. A real device estimates that number from a finite number of shots, so it gets it wrong by roughly 1/√shots — and then the optimiser has to differentiate through that noise. Add realistic gate errors on top and the effective landscape is rougher than the one drawn here, not smoother.

The Ising chain is also a model with a known answer: it is exactly solvable, and the exact energy in the controls comes from a Lanczos diagonalisation running in your browser. VQE is aimed at Hamiltonians where that is not possible — molecular electronic structure, mainly. The reason to demonstrate it on a solvable model is precisely that you can see how far off the variational answer is, which for a real target you could not.