Randomized Benchmarking
Randomized benchmarking (RB) measures how reliably a processor returns to its starting state after random gates followed by their ideal inverse. Longer circuits magnify small errors. Averaging many circuits can produce a simple decay whose rate is less sensitive to fixed preparation and readout errors than a single-gate experiment.
For standard Clifford RB, the baseline model gives
where counts random Clifford gates, excluding the final inverse. The interpretation of depends on the noise model and the compiled gates. It is an error per sampled Clifford, not automatically an error per pulse or a prediction for an application.
Required background. Quantum channels describe noisy operations; stabilizer formalism explains Clifford gates and their inverses. Helpful background. Hardware metrics distinguishes average fidelity from worst-case error.
Random circuits that ideally do nothing
Section titled “Random circuits that ideally do nothing”Draw independently and uniformly from the Clifford group. Define
The rightmost gate acts first. The complete ideal product is the identity. Prepare a state , run the circuit, and measure a survival effect , such as the projector onto the initial state. Repeat both the shots for a circuit and the random circuit draws.
The experimental target is the mean over circuits,
A one-qubit Clifford group has 24 elements, up to global phase. A Clifford on several qubits generally requires many native operations. Its duration, decomposition, idles, and simultaneous activity determine what the experiment tests. An optimizer that cancels the entire ideal identity circuit would remove the intended test.
Why averaging produces an exponential
Section titled “Why averaging produces an exponential”Assume the computational space has dimension , the noise is stationary and Markovian, and every Clifford, including the recovery, is implemented as
with the same completely positive, trace-preserving channel . Composition acts from right to left.
Moving into the cumulative Clifford frames gives the exact circuit channel
where . The leading is the error after the final recovery.
Although adjacent cumulative products share gates, are independent uniform group elements. The change of variables is bijective: , with . Thus each interior factor averages independently to the group twirl
The Clifford group is a unitary 2-design. Its twirl removes preferred directions, including the displacement of a nonunital channel, and acts on density operators as
The identity component is fixed and every traceless component is multiplied by . Consequently,
Here the adjoint moves the final recovery error into the measurement. Decomposing into its identity and traceless parts gives , with
This is the standard gate-independent derivation (Magesan, Gambetta, and Emerson, 2012). Fixed preparation and measurement errors change ; they do not change this interior . Poor contrast still makes difficult to estimate, and leaves it unidentifiable.
The allowed completely positive depolarizing range is . Experiments with small errors usually have close to one; a negative value would give alternating rather than monotonic traceless decay.
Converting the decay into an average error
Section titled “Converting the decay into an average error”Twirling preserves average gate fidelity relative to the identity. For the depolarizing channel, every pure input has the same fidelity, giving
For a qubit, . This conversion is exact for the common channel in the baseline model.
For example, let every random gate and the recovery have depolarizing parameter , with ideal preparation and measurement. There are noisy gates, so
Thus , , and . At , ; at , . An ideal recovery would instead give . Absorbing the recovery into keeps the fitted rate unchanged, but the distinction matters when calculating the curve.
Calculated curves with the same : and . Both have normalized contrast . The lower panel illustrates the model using known parameters; an experiment must estimate them with uncertainty.
A characteristic length is when is near one. Include short lengths, lengths across the decay, and sufficiently long lengths to constrain the offset. All points near the initial plateau cannot determine three parameters reliably.
Random sequences and repeated shots have different roles
Section titled “Random sequences and repeated shots have different roles”At a fixed length, circuit has survival probability . Execute independent shots on each of independently sampled circuits. Write
The equal-weight mean of the observed circuit survival fractions obeys
The first term measures which circuits happened to be sampled; the second is conditional shot noise (Wallman and Flammia, 2014). Many repetitions of one circuit cannot replace independent circuit draws.
At a fixed total number of shots ,
If new circuits have no extra cost, reducing cannot increase this variance. Large readout noise alone is not a reason to repeat fewer circuits. A practical reason is the overhead of generating, loading, or switching circuits. If that overhead is per circuit and a shot costs , an interior continuous optimum is
Use at least one shot and account for integer counts and hardware limits. This is a design calculation under independent sampling, not a universal optimum for every RB experiment (Exercise 4).
For unequal shot counts, the equal-weight average of circuit fractions still targets the uniform circuit ensemble. Pooling all counts instead weights circuits by their shot counts; outcome-dependent allocation can then change the target.
Fit the original probabilities with an appropriate likelihood or weighted nonlinear regression. Taking can fail when the noisy difference is nonpositive and changes the noise model. Do not fix unless the measurement model justifies it.
For uncertainty, resampling whole circuit records within a length captures the variation of their observed means, including shot noise. Blindly adding a second resampling of their shots can count shot noise twice. A hierarchical parametric bootstrap is another option when the latent circuit-probability model is specified. Preserve circuit identity, counts, and acquisition time; Harper and colleagues (2019) discuss RB experimental design and inference.
Interleaving a target gate
Section titled “Interleaving a target gate”Interleaved RB inserts a target Clifford after every random reference Clifford and computes the inverse of the entire ideal product. Let the fitted rates be and .
For independent depolarizing reference and target errors,
For general errors this ratio is an estimate with systematic bounds, not a model-free fidelity identity (Magesan and colleagues, 2012). Reference and interleaved runs should be interwoven so drift is not confused with target error.
An exact coherent counterexample is instructive. Suppose every implementation is , where , and interleave . Since ,
The errors cancel within every interleaved pair. The remaining recovery error is a fixed edge contribution, so the interleaved curve has no interior decay: . Reference RB instead has
The ratio would assign a negative target infidelity, although the target’s actual average infidelity is . Clipping that estimate to zero conceals the failure of the factorization assumption.
What one exponential cannot determine
Section titled “What one exponential cannot determine”The noise mechanism. A coherent rotation and a stochastic error can have the same RB decay. For the rotation,
where is half the diamond norm distance. Small coherent errors have but . Hardware metrics develops these distinctions. Unitarity measurements add information about coherence, rather than converting one RB number into a universal guarantee (Wallman and colleagues, 2015).
Individual native-gate errors. If every Clifford contains exactly identical depolarizing native operations, then . Variable decompositions, different gates, idles, and coherent cancellations break that inference. Even a simplified random-length model averages , not .
A unique gate-by-gate fidelity. Gate dependence invalidates the elementary common-channel derivation. More general theory can justify a dominant exponential plus corrections under appropriate conditions (Wallman, 2018). Its relation to individually assigned gate errors depends on the gate-set representation (Proctor and colleagues, 2017). For example, implementing every Clifford as still makes every ideal identity sequence return exactly, although gates can differ from their nominal matrices.
Closure of the computational space. Leakage and return from leaked levels add population dynamics. Measure total computational population as well as target survival; an unusual asymptote alone is not decisive because SPAM also changes . A two-population leakage model is derived in Exercise 8 (Wood and Gambetta, 2018).
Stationarity or absence of memory. A mixture of rates can look nearly exponential over a short range. Randomize acquisition order, repeat reference lengths throughout the run, and inspect residuals and circuit distributions by time block. Length-dependent reset or readout can change the apparent rate. Noise with memory explains broader tests.
| Question | Useful additional measurement |
|---|---|
| Does parallel activity change the error? | Compare isolated and simultaneous RB |
| Are errors coherent? | Unitarity or phase-sensitive sequences |
| Is population leaving the qubit space? | Leakage-resolving readout |
| How does a scheduled layer behave? | Cycle benchmarking |
| What channel acts on selected inputs? | Process tomography |
These measurements address different questions. A precise RB fit is most useful when accompanied by its sampled gate set, compiler, timing context, and tested noise assumptions.
Exercises
Section titled “Exercises”1. The noisy recovery
Section titled “1. The noisy recovery”For qubit depolarizing noise with parameter after every gate, including the inverse, derive the survival from . How do and change for an ideal inverse?
Solution
Depolarizing channels commute with unitary gates, and their parameters multiply. The ideal gates cancel, leaving . Thus , with and . An ideal inverse removes one noise factor, so . The exponent fitted against the number of random gates is still controlled by the same .
2. A two-qubit error and its uncertainty
Section titled “2. A two-qubit error and its uncertainty”A fit gives as a one-standard-deviation statistical result. Convert to infidelity.
Solution
Here , hence
The result is under the RB model. This statistical uncertainty does not include model failure.
3. More circuits or more repetitions?
Section titled “3. More circuits or more repetitions?”Take and . Compare and .
Solution
Both use 4,000 shots. Their variances are
More circuits reduce the first term. With no switching overhead, one shot on each of 4,000 circuits gives variance . This compares total shots, not necessarily elapsed laboratory time.
4. Include switching time
Section titled “4. Include switching time”For total time , derive . Use the preceding variances with , in common time units.
Solution
Eliminating gives
The terms depending on are . Setting the derivative to zero gives the stated square root, about shots here. Compare feasible neighboring integers. If , the optimum moves to the boundary when .
5. A depolarizing interleaved estimate
Section titled “5. A depolarizing interleaved estimate”Let and for one qubit. Calculate the ratio estimate. Is the same formula justified by a clean exponential alone?
Solution
No. The coherent cancellation example gives exact exponential behavior but violates scalar error factorization. Statistical fit precision and systematic validity are separate.
6. Equal RB decay, different errors
Section titled “6. Equal RB decay, different errors”Compare with the channel , taking . Show that their RB parameters agree and compare their half-diamond distances.
Solution
The coherent Bloch matrix has trace . The stochastic Bloch matrix is , with the same trace. Both twirl to
The distances are for the rotation and for the stochastic channel. At , the common infidelity is approximately , while the distances are approximately and .
7. A consistent change of frame
Section titled “7. A consistent change of frame”Every ideal Clifford is implemented perfectly as . What does an RB identity sequence do? For and , calculate its nominal average infidelity.
Solution
Adjacent factors cancel, so the whole circuit is . RB sees no decay. Relative to nominal , the error is a rotation through angle , up to sign, giving
A sequence-return experiment does not determine an absolute control frame. Relating its decay to nominal gate matrices needs a consistent choice of representation and complementary measurements.
8. Leakage and seepage
Section titled “8. Leakage and seepage”In a population model, a computational state leaks with probability per step, while a leaked state returns with probability . Starting inside the computational space, derive its population .
Solution
The recurrence is
For ,
For , the limiting population is and the decay parameter is . This is population exchange, not the qubit depolarizing parameter. Target-state survival also depends on how the remaining computational population is distributed.
9. Variable native-gate counts
Section titled “9. Variable native-gate counts”Assume ideal recovery and independent random compilations using either one or three identical depolarizing native operations, equally likely for every Clifford. Find the effective parameter per Clifford and compare it with squaring .
Solution
Each step averages independently, so
The mean count is two, but
Even this homogeneous model differs from using the mean exponent. The discrepancy is second order near ; real compilation-dependent errors need more information than a gate-count average.
References
Section titled “References”- Harper, R., I. Hincks, C. Ferrie, S. T. Flammia, and J. J. Wallman. “Statistical analysis of randomized benchmarking.” Physical Review A 99, 052350 (2019). arXiv:1901.00535.
- Magesan, E., J. M. Gambetta, and J. Emerson. “Characterizing quantum gates via randomized benchmarking.” Physical Review A 85, 042311 (2012). arXiv:1109.6887.
- Magesan, E., and colleagues. “Efficient measurement of quantum gate error by interleaved randomized benchmarking.” Physical Review Letters 109, 080505 (2012). arXiv:1203.4550.
- Proctor, T., K. Rudinger, K. Young, M. Sarovar, and R. Blume-Kohout. “What randomized benchmarking actually measures.” Physical Review Letters 119, 130502 (2017). arXiv:1702.01853.
- Wallman, J. J. “Randomized benchmarking with gate-dependent noise.” Quantum 2, 47 (2018). arXiv:1703.09835.
- Wallman, J. J., and S. T. Flammia. “Randomized benchmarking with confidence.” New Journal of Physics 16, 103032 (2014). arXiv:1404.6025.
- Wallman, J., C. Granade, R. Harper, and S. T. Flammia. “Estimating the coherence of noise.” New Journal of Physics 17, 113020 (2015). arXiv:1503.07865.
- Wood, C. J., and J. M. Gambetta. “Quantification and characterization of leakage errors.” Physical Review A 97, 032306 (2018). arXiv:1704.03081.