Randomized Benchmarking Simulation
Randomized-benchmarking simulation tests a protocol and its inference under a chosen gate-noise model. It should generate random sequences, construct the ideal recovery, apply physical noise to every implemented operation, and fit the resulting survival data. The decay parameter has an average-error interpretation only under stated assumptions.
Helpful background. Randomized benchmarking explains the protocol; noise models specify channel placement.
Sequence generation and recovery
Section titled “Sequence generation and recovery”For independently and uniformly sampled Clifford gates , the ideal product is . Append
Track multiplication order carefully. Apply the same compilation and noise assumptions to the recovery gate as to other implemented gates; treating it as noiseless changes the model.
Uniform sampling from the Clifford group is not generally equivalent to applying a short random string of generators. If generator walks are used, demonstrate mixing or describe the resulting nonuniform protocol.
A zero-noise run must return the initial state for every sequence, up to global phase. This checks group multiplication, inversion, and qubit order before any decay is fitted.
Depolarizing benchmark
Section titled “Depolarizing benchmark”For gate-independent Markovian noise, Clifford averaging gives a depolarizing decay model
Here absorb fixed preparation, measurement, and boundary-gate effects under the model. For a -dimensional depolarizing channel ,
This follows because the overlap with every pure input is the same. It relates the fitted to average infidelity in this model, not directly to a worst-case error probability.
For an ideal one-qubit preparation and measurement with a noisy recovery as well, survival is . Fitting as gives , . This checks the treatment of the extra recovery gate.
For a general single-qubit gate-independent channel written in Bloch coordinates as , uniform Clifford conjugation averages to , where , and averages the translation to zero. This supplies a deterministic check: enumerate all 24 Clifford rotations and compare their average with the depolarizing map before sampling sequences.
For amplitude damping of probability after each Clifford, and . With preparation and measurement, including the same damping after recovery gives
The twirled interior is unital, but the final physical noise is not. Consequently the asymptote is , not . Allowing to vary is essential even in this exactly gate-independent model.
Two layers of sampling
Section titled “Two layers of sampling”At each length draw random sequences. For each sequence either compute its exact survival probability or generate Bernoulli shots. Between-sequence variability and within-sequence shot noise are distinct.
Let a randomly chosen sequence have exact survival , and let be the mean of the measured sequence fractions. For independent identically distributed sequences, independent shots conditional on each sequence, equal , and stationary noise, the law of total variance gives
The first term remains as at fixed . Treating all shots as independent draws from their mean probability assigns variance and omits the covariance between shots sharing one sequence. It divides the between-sequence contribution by an extra factor . Conditional uncertainty for a fixed, deliberately reused sequence set is a different target from uncertainty over newly sampled sequences.
A nonparametric bootstrap over complete sequence records estimates the latter target, including their observed shot fluctuations. Do not automatically add a second naive shot bootstrap, which can double-count those fluctuations. A parametric or carefully calibrated hierarchical bootstrap can separately regenerate sequence probabilities and conditional counts when that extra model is specified. Correlated drift, shared sequence prefixes across lengths, and unequal shot allocation require their covariance structure to be retained in the fit and resampling procedure.
Choose lengths spanning visible decay rather than fitting only values near one or near the asymptote. Fit probabilities with a likelihood or suitable variance model and inspect parameter correlations. A visually plausible exponential can leave poorly identified.
Model stress tests
Section titled “Model stress tests”Add coherent overrotation, gate dependence, temporal drift, leakage, or correlated noise one at a time. Inspect residuals and compare inferred error with a directly computed channel metric on the small simulated system. Nonexponential decay can be a physical model failure, not an optimizer failure.
Interleaved benchmarking inserts a target gate between random Cliffords and compares decays. The ratio of fitted parameters is an estimator under additional assumptions; it is not an exact identity for arbitrary gate-dependent noise. Keep its uncertainty and systematic limitations explicit.
Report what is averaged: Clifford operations, compiled primitive gates, or a particular gate family. Converting Clifford error to primitive-gate error by dividing by a mean gate count requires a noise-composition model.
Exercise
Section titled “Exercise”A qubit depolarizing benchmark gives . What average infidelity does the ideal model assign, and what does it not establish?
Solution
. It does not establish a worst-case error of , the error of every primitive gate, or performance under correlated noise. Those conclusions require further assumptions or separate characterization.
References
Section titled “References”- Magesan, E., Gambetta, J. M., and Emerson, J., “Scalable and robust randomized benchmarking of quantum processes,” Physical Review Letters 106, 180504 (2011), doi:10.1103/PhysRevLett.106.180504.
- Magesan, E., Gambetta, J. M., and Emerson, J., “Characterizing quantum gates via randomized benchmarking,” Physical Review A 85, 042311 (2012), arXiv:1109.6887.
- Wallman, J. J., and Flammia, S. T., “Randomized benchmarking with confidence,” New Journal of Physics 16, 103032 (2014), arXiv:1404.6025.