A variational (parameterized) quantum circuit prepares a state |ψ(θ)⟩ from tunable rotation angles θ, and a classifier or eigensolver is trained by gradient-descending a cost C(θ) = ⟨ψ(θ)|Ô|ψ(θ)⟩ built from measuring an observable Ô. McClean et al. (2018) proved that for a sufficiently random/expressive circuit, the variance of any partial derivative shrinks exponentially with the number of qubits n:
Var[∂C/∂θᵢ] ≈ O(2⁻ⁿ)
⇒ the whole landscape flattens toward C ≈ const,
gradients vanish, and gradient descent stalls
— a "barren plateau".
This simulator renders a real 2-parameter slice C(θ₁,θ₂) of such a landscape as a 3D surface, with its amplitude explicitly scaled by 2⁻⁽ⁿ⁻²⁾ to reproduce that exponential concentration. Deeper random circuits (larger L) also reach this concentrated regime faster and add more oscillatory structure, so the depth slider makes the surface more rugged even before it goes flat.
- Qubits n — rescales the whole surface's height by 2⁻⁽ⁿ⁻²⁾; watch the mountains sink toward a plane.
- Depth L — sets the spatial frequency of the landscape (more ridges/valleys per radian), modelling a more scrambling ansatz.
- Learning rate η — fixed step size for gradient descent; kept constant so a flat plateau visibly stalls the marker rather than the optimizer compensating for it.
- New Random Circuit — redraws the Fourier coefficients that define this particular random ansatz's landscape (a real barren plateau is a statement about the ensemble of random circuits, not one fixed one).
- Run Descent — a marker performs steepest-descent steps θ ← θ − η∇C on the true analytic gradient of the surface shown; its trail is drawn as points.
Real-world relevance: barren plateaus are the central open obstacle in scaling quantum machine learning and VQE-style algorithms past a few dozen qubits, motivating research into local cost functions, layerwise training and problem-inspired ansätze that avoid this exponential flattening.