Randomized Benchmarking
Robust average gate fidelities from random sequences.
Randomized benchmarking is the most widely reported number in experimental quantum computing, and one of the most misunderstood. Under clean assumptions it provably measures an average gate fidelity, immune to state-preparation and measurement errors. This lesson proves that theorem, then examines what happens when its assumptions fail.
What you’ll learn
- State and prove the Magesan–Gambetta–Emerson decay theorem for gate-independent noise.
- Prove the twirling lemma for unitary 2-designs and derive .
- Explain gate-dependent noise, the gauge problem and leakage, and quantify the gap between average and worst-case error for coherent errors.
- Compare interleaved, simultaneous, character, direct, mirror and cycle benchmarking, and layer fidelity.
The protocol and the decay theorem
Fix a gate set that forms a group, here the -qubit Clifford group (modulo phases), and write for the ideal channel of . Each implemented gate is noisy, . A length- sequence draws independently and uniformly, and appends .
The implemented sequence of noisy gates.
Introduce cumulative products, with . Because the map is a bijection of , the are also independent and uniformly distributed.
Substitute and regroup: every noise map is now sandwiched by its own independent, uniformly random Clifford.
Average over the independent . By the twirling lemma (next step) each factor becomes depolarizing.
Since . SPAM enters only through , and the final , that is, only through and .
Twirling and the error rate
Conjugating by unitaries leaves , hence , unchanged, so twirling preserves the process fidelity.
Apply the Horodecki–Nielsen formula.
The RB error per Clifford: for one qubit and for two.
Two-qubit Clifford RB gives . What is the average error per two-qubit Clifford, in percent?
Show the answer
1.5 %
. A random two-qubit Clifford needs 1.5 CNOT-type gates on average, plus single-qubit gates, so if the entangling gates dominate, each one errs at most about of the time.
Standard RB gets expensive fast. The Clifford group modulo phases has elements: 24 for one qubit, 11 520 for two, about for three. The 11 520 two-qubit Cliffords fall into classes needing 0, 1, 2 and 3 CNOTs, of sizes 576, 5184, 5184 and 576, an average of exactly 1.5. A random -qubit Clifford needs two-qubit gates (Aaronson & Gottesman 2004), so standard RB is rarely used beyond two or three qubits.
When the assumptions fail
Real noise depends on which gate is applied: with varying. Magesan, Gambetta and Emerson (2012) expanded around the average noise and found first-order corrections to the single exponential. A deeper issue was pointed out later:
Other violations change the shape of the decay. Leakage out of the computational subspace adds a second decay constant (Wood & Gambetta 2018). Time-correlated (non-Markovian) noise and drift inflate the sequence-to-sequence fluctuations and can bend the curve. A decay that is not a clean single exponential is a diagnostic in its own right.
A coherent over-rotation by on one qubit.
Its average error.
Its worst-case (diamond-norm) error. For a unitary, with the distance from the origin to the numerical range of , here the chord between , so .
By contrast, for stochastic Pauli noise with total error probability the worst case is linear in .
RB reports on a qubit whose only error is a small systematic over-rotation. Roughly what is the worst-case error ?
- about
Show the answer
D. about
: two orders of magnitude worse than the average. Coherent errors can add up in amplitude rather than in probability, which is why fault-tolerance analyses care, and why randomized compiling (Wallman & Emerson 2016) inserts random Pauli frames to turn them into stochastic Pauli noise.
The unitarity of the noise, measurable with a purity-benchmarking variant of RB (Wallman, Granade, Harper & Flammia 2015), separates coherent from incoherent contributions to and tightens the bounds on .
Variants, scalability and the frontier
| Variant | Idea | Reports |
|---|---|---|
| Interleaved RB (Magesan et al. 2012) | insert a fixed gate after every random Clifford and fit its decay | , with rigorous systematic-error bounds that are often loose |
| Simultaneous RB (Gambetta et al. 2012) | run RB on several qubits or pairs at once and compare with isolated RB | crosstalk and addressability errors |
| Character RB (Helsen et al. 2019) | representation theory extends RB to gate groups that are not 2-designs | decay rates for non-Clifford gate sets |
| Direct and mirror RB (Proctor et al. 2019, 2022) | random layers of native gates, or a circuit followed by its mirror image | errors per layer on many qubits without compiling global Cliffords |
| Cycle benchmarking (Erhard et al. 2019) | Pauli-twirled repetitions of a fixed cycle of gates on many qubits | process fidelity of a whole cycle |
| Layer fidelity (McKay et al. 2023) | product of simultaneous direct-RB fidelities that cover a layer of two-qubit gates | fidelity of full layers on 100 or more qubits |
import numpy as np
from qiskit.circuit.library import CZGate
from qiskit_experiments.library import StandardRB, InterleavedRB
lengths = np.arange(1, 200, 20)
# Two-qubit standard RB on physical qubits 0 and 1
rb = StandardRB(physical_qubits=(0, 1), lengths=lengths, num_samples=20, seed=7)
# Interleaved RB for the CZ gate on the same pair
irb = InterleavedRB(CZGate(), physical_qubits=(0, 1), lengths=lengths, num_samples=20, seed=7)
# data = rb.run(backend).block_for_results()
# print(data.analysis_results("EPC"))A sketch using the Qiskit Experiments library (details vary between versions). The analysis fits and reports the error per Clifford, "EPC".
Key takeaways
- For gate-independent Markovian noise, Clifford RB gives with SPAM confined to and ; is the average error of the noise.
- The proof is a telescoping substitution plus the twirling lemma: over a unitary 2-design every channel averages to a depolarizing one, by Schur's lemma.
- Gate-dependent noise raises a gauge problem: the RB decay is observable, individual gate fidelities are not. Leakage and non-Markovian noise distort the decay's shape.
- Average error can hide worst-case error: a coherent over-rotation has , while Pauli noise has .
- Interleaved, simultaneous, character, direct, mirror and cycle benchmarking, and layer fidelity, extend RB to specific gates, crosstalk, other gate sets and many qubits.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
In the decay of standard RB with gate-independent noise, which statement is correct?
- and absorb state-preparation and measurement errors, while depends only on the gate noise
- absorbs the SPAM errors, while is the gate fidelity
- equals the average gate fidelity
- All three depend only on the gate noise
Show the answer
A. and absorb state-preparation and measurement errors, while depends only on the gate noise
From the proof, and depend on and , while is the depolarizing parameter of the twirled noise.
Two-qubit RB gives . The average error per Clifford is
Show the answer
C.
, with .
Why can the RB error rate differ from the average infidelity of the individual gates reported by tomography, even with perfect statistics?
- Because RB uses Cliffords while tomography uses Paulis
- Because tomography is biased by shot noise
- Because RB averages over sequences while tomography averages over states
- Because the infidelity of an individual gate is gauge-dependent, while the RB decay is a gauge-invariant property of the whole gate set
Show the answer
D. Because the infidelity of an individual gate is gauge-dependent, while the RB decay is a gauge-invariant property of the whole gate set
A similarity transformation of the gate set leaves every observable probability unchanged but changes individual gate fidelities. The RB decay rate is invariant; "the" fidelity of one gate depends on the representation (Proctor et al. 2017).
You suspect that driving one qubit disturbs its neighbor. Which RB variant is designed to detect this?
- Interleaved RB
- Simultaneous RB
- Purity (unitarity) RB
- Standard single-qubit RB on each qubit separately
Show the answer
B. Simultaneous RB
Simultaneous RB compares error rates measured with neighbors idle and with neighbors driven at the same time; the difference quantifies crosstalk and addressability errors (Gambetta et al. 2012).
Further reading
- J. Emerson, R. Alicki & K. Życzkowski, "Scalable noise estimation with random unitary operators", Journal of Optics B 7, S347 (2005); E. Knill et al., "Randomized benchmarking of quantum gates", Physical Review A 77, 012307 (2008).
- E. Magesan, J. M. Gambetta & J. Emerson, "Scalable and robust randomized benchmarking of quantum processes", Physical Review Letters 106, 180504 (2011).
- E. Magesan et al., "Efficient measurement of quantum gate error by interleaved randomized benchmarking", Physical Review Letters 109, 080505 (2012).
- T. Proctor, K. Rudinger, K. Young, M. Sarovar & R. Blume-Kohout, "What randomized benchmarking actually measures", Physical Review Letters 119, 130502 (2017); J. J. Wallman, "Randomized benchmarking with gate-dependent noise", Quantum 2, 47 (2018).
- J. Helsen, I. Roth, E. Onorati, A. H. Werner & J. Eisert, "General framework for randomized benchmarking", PRX Quantum 3, 020357 (2022).