Gate Fidelity and Randomized Benchmarking
A physical quantum gate is never the ideal unitary it is meant to implement. It is a completely positive trace-preserving (CPTP) map contaminated by coherent control error, decoherence, and leakage, and the first question any experiment must answer is: how close is to the target ? The trouble is that "close" is not one number. The average gate fidelity averages the input–output overlap over all pure states; the entanglement fidelity probes with a single maximally entangled state; the diamond distance measures the worst case that fault-tolerance theorems constrain. These are linearly or polynomially related, and quietly swapping one for another is a standard way to misreport a device. Measuring directly by process tomography is expensive and self-defeating: on good hardware the state-preparation-and-measurement (SPAM) errors are as large as the gate error you are trying to see. Randomized benchmarking (RB), proposed by Emerson, Alicki and Życzkowski and made rigorous by Magesan, Gambetta and Emerson, sidesteps both. Run random Clifford sequences that compose to the identity, invert at the end, and the average error is twirled into a depolarizing channel whose single parameter drives an exponential decay of the survival probability with length . SPAM sits entirely in the fit's prefactors; the decay rate — the average error per gate — falls out clean. RB and its descendants are now the language groups use to report progress, the contact point between abstract thresholds and laboratory reality.
- Gate fidelity measures how close a noisy channel is to an ideal unitary ; the workhorse scalar is the average gate fidelity , tied linearly to the entanglement fidelity by .
- Randomized benchmarking runs random Clifford sequences that ideally return the identity and fits the survival probability to , extracting the decay base independently of SPAM, which lives only in and .
- The decay converts to an average error per Clifford with — RB's central output.
- The twirl works because the Clifford group is a unitary 2-design: averaging any channel over it collapses the error to a one-parameter depolarizing channel .
- Variants dissect the error: interleaved RB gives per-gate error, simultaneous RB exposes crosstalk, purity RB separates coherent from incoherent, and the diamond norm bounds the worst case can hide.
- Key idea: twirling a noise channel over the Clifford group turns it into a depolarizing channel set by one number , so a random length- Clifford sequence that ideally returns the identity gives a survival probability whose decay rate is the SPAM-immune average error per gate.
Twirling a noise channel over the Clifford group (a unitary 2-design) turns it into a depolarizing channel parameterized by one number , so a random Clifford sequence of length that ideally returns the identity produces a survival probability whose decay rate gives the SPAM-immune average error per gate.
Where this lives today
RB and its family are the reporting standard for every gate-based processor. Superconducting groups quote single-qubit Clifford errors well below and two-qubit errors at the level, extracted by interleaved RB on cross-resonance or CZ gates, with purity benchmarking separating calibration drift from decoherence. Trapped-ion platforms hold some of the lowest RB errors on record for Mølmer–Sørensen gates, and Quantinuum-style cycle benchmarking generalizes the twirl to whole gate layers. Google's cross-entropy benchmarking (XEB) — behind the 2019 "quantum supremacy" claim — twirls with random circuits rather than Cliffords, and where RB's average masks too much, gate-set tomography reconstructs the full process at greater cost. The through-line is the diamond-norm caveat: because fault-tolerance thresholds (surface-code, near ) are worst-case statements, an experiment reporting only must invoke the -to-diamond inequalities — or tailor the noise to be stochastic via randomized compiling so the average RB number is the relevant one.
The physical picture
Think of each random Clifford as grabbing whatever error the hardware makes and rotating it to a new orientation. One error over-rotates about ; the next Clifford re-expresses that same fault about a tilted axis; the next about another. Averaged over the whole group, the error is smeared uniformly over every direction — and a fault with no preferred direction is exactly a depolarizing channel, which shrinks the Bloch vector by a single factor toward the maximally mixed state. That is the whole trick: an anisotropic error is laundered into an isotropic one described by a lone number, and raising that contraction to the length gives the geometric loss you observe.
The headline property is SPAM robustness. Imperfect preparation lowers where the curve starts () and imperfect readout shifts where it flattens (), but neither bends the rate at which the exponential falls. Because RB reads the rate, not the height, its answer is immune to the errors that wreck single-point estimates and tomography. The price is the subject's deepest caveat: is an average over input states. A coherent over-rotation by a small angle gives — reassuringly tiny — while the worst-case diamond error grows only as and accumulates linearly with depth. RB can thus certify a gate as excellent while a hidden calibration error builds toward a threshold violation — which is why purity benchmarking and the diamond norm exist.
The core equations
The starting point is the metric RB reports: the average gate fidelity averages, over the Haar (Fubini–Study) measure on pure states, how much of the input survives the round trip through the noisy channel and the ideal inverse.
where: — physical CPTP map implementing the gate; — ideal target unitary; — Haar measure over pure states; — the input averaged over. Reading it: only if on every input, and any deficit is the state-averaged loss of overlap. The Haar average has a closed form tying linearly to the entanglement fidelity — the survival of one maximally entangled probe — so a single entangled-state number replaces the full state average.
where: — entanglement (process) fidelity; — Hilbert-space dimension; — maximally entangled state on system plus ancilla. Reading it: the two fidelities agree at unity but their infidelities differ by a fixed factor. Subtracting from one gives the average error rate experiments quote. Note the coefficient: inverting (2) gives , not — the latter belongs to the depolarizing form (6), and conflating them is a common slip.
where: — average gate error per operation; — average gate fidelity; — entanglement fidelity of the error channel. Reading it: for large , ; for one qubit the two infidelities differ by . The engine of RB is the twirl: averaging over the Clifford group projects it onto the depolarizing channel — the unique group-invariant form — leaving one parameter.
where: — the -qubit Clifford group, a unitary 2-design; — error channel being twirled; — twirled (depolarizing) channel; — depolarizing (RB decay) parameter. Reading it: whatever anisotropy had, only the contraction survives. Composing twirled steps and reading out imperfectly gives the master fit function — a single exponential in on a SPAM-determined floor.
where: — random Cliffords before the inversion gate; — RB decay base; — prefactor absorbing SPAM and measurement contrast; — SPAM offset, ideally; — SPAM-bearing POVM element and state. Reading it: all preparation and readout error is locked in ; only carries gate quality. The fitted converts to the headline number, with coefficient genuinely from the depolarizing channel's average fidelity .
where: — average error per Clifford; — fitted decay base; . Reading it: single-qubit gives , a routinely quoted floor. To isolate one gate rather than the Clifford average, interleaved RB runs a second experiment with the target gate inserted after every random Clifford; the ratio of decay bases strips the Clifford-frame error.
where: — reference decay (Cliffords only); — decay with the target gate interleaved; — estimated gate error. Reading it: is the gate's own depolarizing factor, up to a window. Because is an average, it does not bound the worst case. The diamond distance — the worst-case channel distinguishability that fault-tolerance theorems constrain — is sandwiched between and .
where: — diamond norm; — RB average error rate; — dimension. Reading it: for coherent errors the upper bound is nearly saturated, so worst-case error can exceed by order . Finally, purity (unitarity) benchmarking measures the decay of the output purity rather than the survival probability, where the unitarity is built from the traceless part of the sequence channel. A purely incoherent error gives , so flags coherent (calibration) error hiding under a small .
The goal is to turn the state-averaged expression (1) into a closed form depending on the channel only through its Kraus operators, exposing why a unitary 2-design — not the full Haar measure — is all the twirl needs. We average using its second moment, sum over Kraus terms, and apply trace preservation to reach the boxed formula and its linear link to .
Step 1. Fold the ideal inverse into the noise: define with Kraus operators , so . Why: fidelity to becomes fidelity to the identity for .
Step 2. Use the second-moment (2-design) integral . Why: the symmetric two-copy average needs only first and second moments, which the Clifford group reproduces, so it may replace the Haar integral.
Step 3. Sum over Kraus terms and apply trace preservation , giving . Why: the diagonal piece of every CPTP map contributes the same constant , so all the physics is in .
Step 4. Collect to and identify , giving . Why: the surviving sum is exactly , so state average and entangled-probe measurement carry the same information. *As a check: the formula reduces to when , as required, and inverting gives .*
Go deeper · Derivation B · 1 minThe single-exponential decay from the twirl
The goal is to show that gate-independent noise, threaded through a random Clifford sequence with a final inversion, produces the fit function of (5) with a SPAM-immune decay base, making explicit that the sequence realizes one Clifford twirl per step. We build the sequence channel, reorganize its gates into per-step twirls, average each to a depolarizing channel, compose the factors, and take the SPAM-laden expectation.
Step 1. Apply random Cliffords and the inversion , so the ideal net is the identity and the noisy channel is with a common error after each Clifford. Why: forcing the ideal product to identity makes any surviving deviation pure error and the readout a simple survival test.
Step 2. Regroup with , so the sequence becomes a product of brackets ; because the are uniformly random, each is a uniformly twirled copy of . Why: the protocol conjugates each error by an independent random Clifford — the twirl is built in.
Step 3. Average each bracket using (4): with . Why: the 2-design property forces the average onto the one-parameter depolarizing form, replacing an unknown channel by one number .
Step 4. Compose the identical steps, , since depolarizing channels multiply in their non-identity eigenvalue. Why: identical factors compose geometrically — the origin of the single exponential, not a sum of rates.
Step 5. Take the SPAM-bearing expectation with and . Why: every dependence on the imperfect is quarantined in ; the rate is untouched — the SPAM robustness that defines RB. *Note: gate-dependent noise adds a second-order correction to this zeroth-order model. The conversion follows directly from for the depolarizing channel .*
Go deeper · Derivation C · 1 minIsolating one gate with interleaved benchmarking
The goal is to derive equation (7): how two RB experiments — one with Cliffords alone, one with a target gate interleaved after every Clifford — yield the error of that single gate, cancelling the Clifford-frame error that dominates a raw fidelity. We compare the two decay bases, form their ratio, argue it is the gate's own depolarizing factor, and flag the honest uncertainty this estimate carries.
Step 1. The reference run gives , where encodes the average Clifford error alone. Why: this is the baseline the interleaved run is measured against, already containing all Clifford-implementation error.
Step 2. The interleaved run applies after each Clifford, so each step carries both errors; its base is with the gate's depolarizing factor. Why: to leading order the two factors multiply, steepening the decay by the gate's contribution.
Step 3. Divide the bases, , then convert with . Why: the division removes the Clifford-frame error common to both runs, leaving the target gate in isolation.
Step 4. Attach the uncertainty: gate-dependence and non-commuting error channels put the true error within a window of half-width . Why: interleaved RB gives a point estimate plus provable bounds; quoting it without the window overstates what was measured. *Numerical check: , , give and , consistent with the worked example in the section below.*
Limiting cases
How the central RB relations behave in the regimes that matter:
| Case | Result | Meaning |
|---|---|---|
| Single qubit | Error per Clifford ; a decay gives . | |
| Depolarizing noise | RB is exact: the fitted base equals the channel's own , , no correction. | |
| Pure coherent error | Over-rotation gives quadratic RB error but linear diamond distance — worst case underreported by . | |
| Many qubits | For large registers , but sampling random -qubit Cliffords is costly, motivating direct and simultaneous RB. |
Worked examples
1 · Single-qubit RB, from decay to per-gate error (confidence builder)
A single-qubit RB fit returns a decay base , and the compiler uses on average native pulses per Clifford. Report the error per Clifford, the average Clifford fidelity, and the per-native-gate error.
Step 1. Convert with equation (6). For , , so .
Step 2. Deconvolve the compiler overhead. Each Clifford is pulses on average and to leading order the errors add, so — the number to compare against a coherence-limited .
Step 3. Sanity-check SPAM. If readout gives instead of , the curve starts at not , yet refitting still returns : the SPAM error moved only the prefactor. Result: , , , SPAM-immune.
2 · Two-qubit interleaved RB for an entangling gate
A two-qubit device () gives a reference decay and, with a CZ interleaved after every random Clifford, a decay . Find the reference Clifford error, the isolated CZ error, and comment on whether the estimate is trustworthy.
Step 1. Reference Clifford error from (6): . Two-qubit Cliffords compile into several entangling gates each, so this average is dominated by the entangling-gate error — exactly why we interleave.
Step 2. Isolate the CZ with (7). The depolarizing factor is , so .
Step 3. Attach the honest window. The gate-dependence half-width is enormous, because the reference decay is far from . Result: as a point estimate, but the rigorous bound is loose; a trustworthy interleaved number needs a high-fidelity reference ( near ), so this device should be improved and re-benchmarked before the CZ error is quoted.
Physics of the portrait
Randomized benchmarking is where representation theory, quantum channels, and a decade of hardware met. The story is not one person but a lineage: a fidelity formula, a scalable idea, and the theorem that made it rigorous.
Origins · 1 minrandomized benchmarking and how this was discovered
Randomized benchmarking is one of the few characterization tools born theoretical that became indispensable in the lab within a decade. Its prehistory is Michael Nielsen's 2002 one-line formula , which reduced the state-averaged fidelity — an integral over the whole Bloch sphere — to a single channel invariant, making "average error" computable rather than a slogan. The idea of measuring that average by random circuits came from Joseph Emerson, Robert Alicki and Karol Życzkowski in 2005, and Emanuel Knill and collaborators at NIST turned it into a working single-qubit protocol in 2008. The decisive step was Easwar Magesan, Jay Gambetta and Emerson in 2011–2012, who proved that a Clifford twirl projects arbitrary gate-independent noise onto a depolarizing channel — so the survival probability is rigorously a single exponential with a SPAM-immune rate — and extended it to interleaved RB. What began as a way to dodge the SPAM problem is now the common currency of superconducting and trapped-ion reporting, the number every fault-tolerance threshold is measured against.
Going further
Texts. Nielsen and Chuang, Quantum Computation and Quantum Information, Ch. 9 (fidelity, distance measures) · Watrous, The Theory of Quantum Information, Ch. 3 (diamond norm) · Wilde, Quantum Information Theory · Preskill, Lecture Notes on Quantum Computation, Ch. 3 · Kitaev, Shen and Vyalyi, Classical and Quantum Computation.
Papers. Nielsen, A simple formula for the average gate fidelity, Phys. Lett. A 303, 249 (2002) · Emerson, Alicki, Życzkowski, Scalable noise estimation with random unitary operators, J. Opt. B 7, S347 (2005) · Knill et al., Randomized benchmarking of quantum gates, Phys. Rev. A 77, 012307 (2008) · Magesan, Gambetta, Emerson, Scalable and robust randomized benchmarking, PRL 106, 180504 (2011) and PRA 85, 042311 (2012) · Magesan et al., Interleaved RB, PRL 109, 080505 (2012) · Wallman and Flammia, Randomized benchmarking with confidence, NJP 16, 103032 (2014). Note that inverts to ; the common mis-statement conflates with the depolarizing parameter and fails at . The single-qubit anchor and the interleaved anchor are worked out in the examples above. Stated platform magnitudes are order-of-magnitude regimes, not specific cited measurements.
Prerequisites. The DiVincenzo Criteria · Density operators and CPTP maps · The Clifford group and stabilizer formalism · Haar measure and unitary designs. Leads to. Superconducting Qubits · The Transmon Qubit · Trapped-Ion Qubits · The Mølmer–Sørensen Gate.
Ask the tutor: Ask me why a RB fidelity can still fail a fault-tolerance threshold, and how purity benchmarking catches the coherent error hiding underneath.
What is the difference between average gate fidelity, entanglement fidelity, and the diamond norm?
They answer three questions about one channel. Average gate fidelity asks how well the gate does on average over all pure inputs; entanglement fidelity asks how well it preserves one maximally entangled probe, tied to by ; the diamond distance asks the worst case over all inputs, possibly entangled with an ancilla. Thresholds are worst-case statements, so the diamond norm is binding while is the cheap one. They agree for stochastic error but diverge — by up to — for coherent error.
Why must the gates come from the Clifford group specifically?
Because the twirl needs a unitary 2-design, and the Clifford group is one — its uniform average reproduces the first and second Haar moments, all the fidelity integral depends on, forcing any error onto the depolarizing form. It has two further virtues: it is finite, so you can sample it exactly and compute the inversion gate efficiently via the stabilizer formalism (Gottesman–Knill), and it is built from gates every platform calibrates. Non-Clifford and approximate designs exist, but the Clifford group is the sweet spot of 2-design and efficiently implementable.
If RB only gives an average, why is it trusted for reporting gate quality?
Because for the dominant failure modes the average is what matters, and RB is one of the few numbers provably free of the SPAM error that corrupts the alternatives. When noise is stochastic — decoherence, dephasing, control jitter — the average error and the worst-case diamond error sit within a small constant factor, so faithfully summarizes the gate. The exception is coherent error, where hides a diamond error ; that is why purity benchmarking exists, to flag when . Practice pairs RB with purity RB and randomized compiling, which makes the average honest.
What exactly are the fit constants A and B, and why do they not affect the answer?
is the floor the survival probability decays to — the fully depolarized state read out by the measurement's average outcome. is the initial contrast above it, set by how well you prepared and read out . Both are built entirely from the imperfect preparation and measurement — the SPAM — and neither depends on : SPAM scales the curve and shifts its floor but cannot change how fast it falls, so RB, which fits the rate , is blind to and .
How is interleaved RB's per-gate number related to the raw Clifford error?
The reference experiment gives the average error over the Clifford group, dominated for two qubits by the entangling gates each Clifford compiles into. Interleaved RB inserts your target gate after every random Clifford, steepening the decay from to . Dividing the bases, , cancels the common Clifford-frame error and leaves the gate's own factor . The catch is an uncertainty window that grows as moves from , so the method is sharp only when the baseline gates are good.
Is RB the same as cross-entropy benchmarking (XEB), the quantum-supremacy metric?
They share DNA but differ in what they twirl and read. RB uses random Clifford sequences that compose to the identity and reads a survival probability. XEB uses random circuits (not Cliffords, not inverted) and reads a fidelity from how spiky the output distribution is relative to ideal — the cross-entropy with the Porter–Thomas distribution. XEB scales to the deep, wide random circuits used to show computational advantage, where a Clifford inversion is impractical, but it is more model-sensitive and less cleanly SPAM-robust. RB is the gold standard for isolated gates, XEB for whole-processor random-circuit performance.