n = 6 qubits

Barren Plateaus: Real Circuit Gradient Statistics

Training a variational quantum circuit means gradient-descending a cost landscape defined over its rotation angles — but for a broad class of quantum-machine-learning ansätze that landscape provably flattens exponentially as qubit count grows, a phenomenon called a "barren plateau" (McClean et al., 2018). Rather than illustrating that idea with a synthetic surface, this simulator runs an actual real-amplitude state-vector simulation of a random hardware-efficient circuit, computes its exact parameter-shift-rule gradient the same way a real quantum device would, and repeats that thousands of times to measure — not assume — how the gradient's variance collapses as the qubit count grows. Tune qubit count, circuit depth and sample size, watch the gradient histogram narrow toward zero, and run a full variance sweep to see the measured exponential decay fitted directly against the theoretical O(2⁻ⁿ) prediction.