|q⟩ Bad Qubits

intermediate · Programming · Variational Quantum Eigensolver (VQE)

Barren Plateaus (Preview)

The variational loop at the heart of VQE depends critically on classical optimizers being able to follow a gradient downhill toward the ground-state energy. If that gradient is exponentially small — essentially zero everywhere — the optimizer wanders blind and the algorithm stalls. This phenomenon is called a barren plateau, and it is one of the central obstacles in scaling variational quantum algorithms to large problems.

What is a barren plateau?

In VQE the cost function is the energy expectation value

E(θ)=ψ(θ)Hψ(θ),E(\boldsymbol{\theta}) = \langle \psi(\boldsymbol{\theta}) | H | \psi(\boldsymbol{\theta}) \rangle,

where θ\boldsymbol{\theta} is the vector of gate angles in the ansatz. The optimizer moves by estimating the gradient θE\nabla_{\boldsymbol{\theta}} E and stepping in the direction that decreases EE.

A barren plateau occurs when, for a randomly initialized θ\boldsymbol{\theta},

\quad \text{and} \quad \mathrm{Var}_{\boldsymbol{\theta}}\!\left[\frac{\partial E}{\partial \theta_k}\right] \leq \mathcal{O}\!\left(\frac{1}{4^n}\right),$$ where $n$ is the number of qubits. The mean gradient is zero (the landscape is flat on average), and the variance shrinks exponentially with system size, so a typical gradient is exponentially small rather than merely zero. McClean et al. (2018) proved this behavior arises generically in random, hardware-efficient ansatze: when the circuit forms a **2-design** — meaning its distribution over unitaries matches a Haar-random distribution up to the second moment — the gradient variance falls as $1/4^n$ for a global cost function. <Callout type="tip"> A barren plateau is not a local minimum. The cost function is flat *throughout* a large region of parameter space, so gradient-based optimizers make essentially no progress from any starting point within that region, not just from a single bad initialization. </Callout> ## Why does the gradient vanish? The intuition comes from concentration of measure. A parameterized circuit that covers the unitary group broadly maps almost every input state to a state that is nearly uniformly distributed over the Hilbert space. The partial derivative of $E$ with respect to one angle $\theta_k$ can be written via the **parameter-shift rule** as $$\frac{\partial E}{\partial \theta_k} = \frac{1}{2}\!\left[E\!\left(\theta_k + \frac{\pi}{2}\right) - E\!\left(\theta_k - \frac{\pi}{2}\right)\right].$$ Both shifted energies are expectations of the same observable evaluated at two nearby points. If the state space is explored broadly and the observable is not aligned with any special direction, both energies are drawn from a distribution tightly concentrated around the same mean — so their difference is almost always tiny. More precisely, for $n$ qubits a generic Pauli observable $O$ with $\|O\| = 1$ satisfies $$\mathrm{Var}\!\left[\frac{\partial E}{\partial \theta_k}\right] \leq \frac{2 \|O\|^2}{2^{2n}},$$ showing that the variance decreases exponentially with the number of qubits (the $2^{2n}$ in the denominator). Even at modest sizes — say $n = 20$ qubits — a gradient of order $2^{-40}$ is undetectable within any finite shot budget. ## When are barren plateaus a problem? Two conditions together cause the worst case: 1. **Deep or expressible ansatz.** A shallow, highly structured ansatz explores only a small region of unitary space and does not concentrate measure. More layers and more entangling gates push the circuit toward a 2-design, triggering the exponential decay. 2. **Global cost function.** An observable that involves all qubits simultaneously (a sum of global Pauli strings) is more susceptible than a cost built from local, few-body terms. Local cost functions can have polynomial (rather than exponential) gradient decay, which is a key finding in the mitigation literature. Hardware-efficient ansatze — attractive because they match device topology — are particularly prone to barren plateaus precisely because they are generic and cover the unitary group broadly with enough layers. ## Mitigation strategies Researchers have identified several approaches that reduce or circumvent barren plateaus: - **Problem-inspired ansatze.** The UCCSD (Unitary Coupled Cluster Singles and Doubles) ansatz for quantum chemistry encodes the structure of the fermionic wavefunction. Because it explores only a chemically relevant subspace, its gradients are not generically exponentially small. - **Layer-by-layer training.** Initialize and optimize one layer at a time before adding the next. Each small layer does not form a 2-design, so gradients remain trainable at each step. - **Local cost functions.** Replace a global Hamiltonian expectation with a sum of low-weight terms, each acting on $k \ll n$ qubits. This changes the variance scaling from $\mathcal{O}(1/4^n)$ to $\mathcal{O}(1/4^k)$, which is independent of total system size. - **Noise-adapted initialization.** Starting parameters near zero keeps the circuit close to the identity, where gradients can be larger. This is sometimes called **identity block initialization**. None of these strategies is universally effective, and understanding when barren plateaus are truly unavoidable versus an artifact of the training strategy is an open research question. <Callout type="tip"> When debugging a VQE that fails to converge, plot the gradient magnitude versus the number of iterations. If gradients start near machine precision from the very first iteration, a barren plateau is the likely culprit — not learning-rate tuning or optimizer choice. </Callout> ## Practical takeaway for VQE practitioners For the small circuits in this module (two to four qubits) barren plateaus are not a concern: the Hilbert space is small enough that gradients remain numerically significant throughout training. The plateau problem becomes critical at the scale where quantum advantage is expected — tens to hundreds of qubits with deep ansatze. Building hardware-efficient circuits with as few layers as possible, choosing local observables where feasible, and using structured initializations are the practical recommendations from the current literature when moving toward larger instances. The next lessons in this module focus on completing a working VQE: measuring multiple Pauli terms efficiently and wrapping the loop in a classical optimizer. Keeping barren plateaus in mind will help you choose ansatz depth and cost function design that stays in the trainable regime.

Sign in on the full site to ask questions and join the discussion.