Quantum

Randomized benchmarking

By CourseTron Team ·  7 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    ? Print / Save as PDF

    In short: Randomized benchmarking estimates the average error per quantum gate by running random sequences of Clifford gates of growing length and fitting the decay of the survival probability — a trick that cancels state-preparation and measurement (SPAM) errors so the number you report reflects the gates alone.

    Ask a hardware team "how good is your gate?" and the honest answer is harder to produce than you might think. You cannot just prepare a state, apply one gate, and measure, because your preparation and your readout are themselves noisy. A single bad measurement can make a near-perfect gate look terrible, or a sloppy gate look fine. Randomized benchmarking (RB) was invented to sidestep exactly this: it gives a single, SPAM-robust figure of merit — the average gate fidelity — that reviewers, vendors, and roadmap slides can all agree on.

    Why a single-gate measurement lies to you

    Every real experiment is a sandwich: state prep → the operation you care about → measurement. Prep infidelity on a superconducting transmon might be 0.5%, and readout error 1–3%. If your gate error is 0.1%, those SPAM errors dominate by an order of magnitude. Subtract them wrong and your "gate fidelity" is really a measure of your calibration mistakes. This is the same reason you would not judge an op-amp's slew rate by eyeballing a scope trace that includes probe loading — you need a method that isolates the device under test.

    SPAM errors on today's platforms (0.5–3%) are frequently 10× larger than the gate errors (0.01–0.3%) being measured. Any protocol that does not cancel SPAM is measuring the wrong thing.

    The core idea: average over random Clifford sequences

    RB applies a sequence of m gates drawn uniformly at random from the Clifford group, then appends one final gate that is the exact mathematical inverse of everything before it. If every gate were perfect, the qubit would return to its starting state and you would measure the initial state with probability 1. Errors spoil this return, and crucially, because the gates are random, the complicated error channel of each gate gets "twirled" into a simple depolarizing channel. The survival probability then decays exponentially in sequence length.

    RB sequence of length m Prep |0⟩ C1 C2 ⋯ Cm C_inv(undo all) Measure m random Cliffords (twirl errors to depolarizing) SPAMSPAM Ideal result: qubit returns to |0⟩. Gate errors make the return decay with m. CourseTron · coursetron.com
    An RB sequence: random Cliffords followed by a single recovery gate that inverts them all. Only gate errors prevent a clean return to |0⟩.

    The decay curve and the fidelity formula

    For each sequence length m you run many random sequences and average the survival probability. The averaged data fit a simple exponential:

    F(m) = A · pm + B

    Here p is the depolarizing parameter, and A and B are fit constants that absorb all SPAM — they shift the curve up and down but leave the decay rate untouched. That is the magic: the SPAM lives in A and B, the gate quality lives in p. The average error per Clifford is then

    r = (1 − p)(d − 1)/d, with d = 2n

    For a single qubit (d = 2), a decay of p = 0.999 gives an error per Clifford r ≈ 0.0005, i.e. 99.95% average gate fidelity. Because each Clifford on a superconducting device decomposes into roughly 1.5 physical gates on average, you divide to get the per-physical-gate number cited in papers.

    Survival probability vs sequence length sequence length m → F(m) B = SPAM floor start ≈ A + B F(m) = A · p^m + B CourseTron · coursetron.com
    The orange probe traces the exponential decay F(m) = A·p^m + B. Steeper decay = worse gates; the dashed line B is set by SPAM and is deliberately ignored in the fidelity.

    A worked example you can reason about

    Suppose you take data at m = 1, 2, 4, 8, 16, 32, 64, 128 Cliffords, running 50 random sequences at each length and 1000 shots each. You fit and get A = 0.48, B = 0.50, p = 0.9988. Then r = (1 − 0.9988)·(1/2) = 0.0006, so the average Clifford fidelity is 99.94%. Notice B ≈ 0.5: that is the fully-mixed floor for one qubit, exactly what you expect once sequences are long enough that the qubit has "forgotten" its start. If a colleague instead reported 97% from a single-gate ping-pong test, the gap is their uncancelled readout error — not a real gate problem.

    Worked example: from fit to fidelity Fit resultA = 0.48B = 0.50p = 0.9988 r = (1 − p)(d − 1)/d(1 − 0.9988)× (2 − 1)/2 Error / Cliffordr = 0.0006 Averagefidelity99.94% Single qubit: d = 2. B ≈ 0.5 is the fully mixed floor, as expected for long sequences. Data: m = 1, 2, 4 … 128; 50 random sequences per length; 1000 shots each. CourseTron · coursetron.com
    Worked example: fit values A = 0.48, B = 0.50, p = 0.9988 give r = 0.0006, an average Clifford fidelity of 99.94%.
    RB variants and what each buys you
    VariantWhat it measuresWhen to use
    Standard (Clifford) RBAverage error per Clifford, SPAM-freeHeadline single-/two-qubit number
    Interleaved RBError of one specific gate (e.g. CNOT)Qualifying a target gate for a flow
    Simultaneous RBCrosstalk when neighbours run togetherScaling to many coupled qubits
    Purity / unitarity RBCoherent vs incoherent error splitDeciding if more calibration helps

    Interleaved RB runs two curves — a reference and one with your target gate inserted every step — and takes the ratio of decay rates. It is how vendors quote "99.9% two-qubit gate fidelity."

    Limits and honest caveats

    RB reports an average over the Clifford group; it does not tell you the worst-case (diamond-norm) error, which can be much larger when errors are coherent rather than stochastic. It also assumes gate-independent, time-independent, Markovian noise — assumptions that leak when you have strong drift, leakage out of the computational subspace, or non-Clifford-twirlable crosstalk. This is why teams pair RB with gate set tomography (GST) for a full error model, or with purity benchmarking to flag coherent errors. Classical control-stack tooling matters too: the same software discipline that EDA houses bring to timing sign-off with Avecas design services applies here — reproducible calibration scripts beat heroic one-off tuning.

    Where RB fits in the bigger picture

    RB is the day-to-day thermometer of a quantum processor. A rising RB error on a qubit is often the first sign that decoherence has crept up — a T1 or T2 drift that calibration has not caught. Teams log RB numbers nightly the way a fab logs yield, and feed them into quantum error correction threshold estimates: surface-code thresholds live around 1% physical error, so an RB number of 0.1% tells you how much margin you actually have before logical qubits become worthwhile.

    Want to run your own RB experiment on real hardware and fit the decay curve yourself? Our CourseTron Quantum Computing track walks you from Clifford groups to interleaved RB with hands-on notebooks. For the classical-design side of chip and control engineering, our partner training at ChipXpert complements it well.

    Frequently asked questions

    Why use Clifford gates specifically?

    The Clifford group can be sampled uniformly and efficiently, and its "twirl" turns any error channel into a simple depolarizing channel — which is what makes the decay a clean single exponential. Non-Clifford gates lack this averaging property, so the math would not close.

    How is RB different from gate set tomography?

    RB gives one robust scalar (average fidelity) cheaply and is insensitive to SPAM. GST reconstructs the full process matrices of your gates — far more information, including coherent errors and SPAM themselves — but costs vastly more experiments and modelling. RB for monitoring, GST for diagnosis.

    Does RB work for two-qubit gates?

    Yes. You benchmark the two-qubit Clifford group (d = 4) and typically use interleaved RB to isolate a specific entangling gate like CZ or CNOT. Two-qubit Cliffords are longer to compile, so sequences run slower, but the method is identical.

    What if my decay is not a clean exponential?

    A non-exponential or oscillating curve signals that RB's assumptions are broken — usually leakage, non-Markovian noise, or large gate-to-gate variation. That is a cue to switch to leakage-RB or GST rather than force a single-exponential fit.

    Advertisement