Quantum Volume (QV) is IBM's single-number standard for benchmarking a quantum processor. A "square" random circuit of n qubits and depth n is run: each layer applies a random permutation pairing the qubits, then a Haar-random SU(4) unitary to each pair.
|ψ⟩ = U_n · U_(n-1) · … · U_1 |0…0⟩
p_i = |⟨i|ψ⟩|² (Born rule, N = 2ⁿ outcomes)
Sort the N output probabilities and call the upper half — those above the median probability — the heavy outputs. Their combined probability is the Heavy Output Probability (HOP). For a genuinely random (Haar) circuit, sampled probabilities follow the Porter–Thomas distribution, and the ideal expected HOP converges to
⟨HOP⟩ → (1 + ln 2) / 2 ≈ 0.8465 as n → ∞
A device certifies QV = 2ⁿ only if it can reproduce HOP ≥ 2/3 on this circuit family — comfortably above the 1/2 an untrained coin-flip guess would give. Gate errors decohere the state toward the maximally mixed state; this sim models that with a simple fidelity-decay proxy over the two-qubit gate count G:
F ≈ (1 − ε)^G
HOP_eff = F · HOP_ideal + (1 − F) · 0.5
Each simulated shot either samples the true output distribution (probability F) or returns a uniformly random bitstring (probability 1 − F, modeling decoherence); the running fraction landing in the heavy set is the empirical HOP, and it converges to HOP_eff as shots accumulate — exactly how real hardware QV runs are certified statistically rather than from a single measurement. This build verified the linear algebra numerically (unitarity of every gate to ~1e-15, state normalization preserved, and empirical HOP trending to 0.8465 as n grows) — the 3D original's theory text and code were internally consistent, nothing needed correcting.
- Qubits n — sets both circuit width and depth (n×n, the "square" QV definition) and the histogram size N = 2ⁿ.
- Gate error ε — per two-qubit-gate error probability driving the fidelity decay above.
- New Random Circuit — draws a fresh random permutation + SU(4) sequence and re-simulates the exact statevector.
- Top panel — the circuit lattice (drag to pan, scroll to zoom); middle — the sorted heavy-output histogram; bottom — a live trace of empirical HOP converging toward its theoretical value.