Randomized Benchmarking
Randomized Benchmarking (RB) measures average gate fidelity by running ever-longer random gate sequences that should return the qubit to |0⟩ and fitting the exponential decay of the survival probability.
What it means
Randomized Benchmarking (RB) is the standard procedure for grading how well a quantum processor executes gates.The recipe: ① generate a random sequence of gates; ② a classical computer computes the net effect of the sequence and appends the inverse gate that undoes everything, so a perfect device would always return to |0⟩; ③ compile the sequence with the current calibration and run it on the QPU; ④ measure the 'survival probability' — how often the device really returns to |0⟩ — over hundreds of repetitions; ⑤ repeat for progressively longer sequences.Longer sequences accumulate more error, so the survival probability decays exponentially with sequence length, following P(m) = A·p^m + B.The decay rate yields the average gate fidelity (e.g., 99.92%), while A and B absorb state-preparation-and-measurement (SPAM) errors — a key strength, because it separates gate quality from readout quality.RB averages over random sequences; to grade one specific gate such as CNOT, Interleaved RB inserts that gate between the random ones and compares decay rates.Everyday analogy
Common misconceptions
- RB is the heaviest job in the stack — a single RB run stress-tests the transpiler (ever-longer circuits), the compiler, the pulse scheduler, client-server transport, the job scheduler, the control electronics AND the QPU all at once, which is why it takes so long.
- The RB number is an average over random sequences — it does NOT give the fidelity of one specific gate. For that you need Interleaved RB, which inserts the target gate between the random gates and compares decay rates.
Key takeaways
- Procedure: ① random gate sequence → ② classical computer appends the inverse ('undo') gate → ③ run on the QPU with the current calibration → ④ measure survival probability over hundreds of repeats → ⑤ repeat for growing sequence lengths.
- Survival probability decays exponentially with sequence length; the decay rate yields the average gate fidelity (e.g., 99.92%).
- The fit P(m) = A·p^m + B absorbs state-preparation-and-measurement (SPAM) errors into A and B, isolating gate error from readout error.
- Standard RB gives an average over the gate set; Interleaved RB measures the fidelity of a specific gate.
Check your understanding
In Randomized Benchmarking, what does the classical computer append to each random gate sequence before it runs on the QPU?
- A.A measurement in the X basis
- B.The inverse gate that undoes the entire sequence
- C.An extra random gate
- D.A calibration pulse
Show the answer
Answer: B. The inverse gate that undoes the entire sequence
Why: The appended inverse gate means perfect hardware would always return the qubit to |0⟩ — so any failure to return measures the accumulated gate error, independent of which random gates were chosen.
In the RB fit P(m) = A·p^m + B, what is the role of the constants A and B?
- A.They set the average gate fidelity
- B.They absorb state-preparation-and-measurement (SPAM) errors
- C.They count the number of qubits
- D.They fix the sequence length
Show the answer
Answer: B. They absorb state-preparation-and-measurement (SPAM) errors
Why: SPAM errors shift and scale the curve but do not change the decay parameter p — that is why RB isolates gate error from preparation and readout error.
Builds on
Primary source: Magesan, Gambetta & Emerson, Phys. Rev. Lett. 106, 180504 (2011), doi:10.1103/PhysRevLett.106.180504
RB protocol and exponential decay model per Magesan 2011; P(m)=A p^m + B with SPAM absorption is the standard form.
Learn it hands-on
This concept is part of a 46-level curriculum with an interactive simulator and Lumen, a tutor whose answers are verified before you see them. Levels 1–5 are free.
