Logical Benchmarking
A logical benchmark measures how well encoded information survives a specified memory interval, gate or circuit. It includes the syndrome-processing and recovery rule used to interpret the output. A detection event, a physical gate fidelity and a logical failure probability describe different things; none can replace the others without a model.
The first task is to define what the experiment observes. A final logical measurement usually reveals an endpoint error, not every logical fault that occurred along the way. Discarding flagged trials changes the sampled ensemble. Comparing code distances tests suppression, while comparing against an unencoded reference tests break-even. Keeping these distinctions explicit makes the measured number useful.
Required background. Quantum error correction explains correctability; stabilizers define logical operators and syndromes; decoders explain how a syndrome record becomes a logical decision.
Measure an encoded operation on a logical space
Section titled “Measure an encoded operation on a logical space”For an unconditional experiment, a schematic decoded channel is
Here encodes the input, implements the noisy protected operation, includes recovery or frame interpretation, and returns a logical output. An actual protocol may interleave these steps and use a classical syndrome register. The expression defines the input and output spaces; it is not a prescription to physically decode the qubit before every measurement.
If the endpoint is destructive readout, its measured object can be a quantum-to-classical channel rather than a complete surviving quantum state. If leakage or rejection remains possible, include those outputs explicitly. Projecting onto the code space and renormalizing is not an unconditional decoding channel.
A memory experiment prepares known encoded states, runs several correction rounds, and measures logical observables. Testing only cannot reveal a logical error. Preparing the six Pauli eigenstates and measuring their corresponding survival probabilities probes all three axes, but those survival measurements alone are not full process tomography: they do not determine every off-diagonal transfer-matrix element.
For a Pauli logical channel,
the axis-dependent error probabilities are
Here means a wrong outcome when a eigenstate is prepared and read in the basis. It is different from the probability of a logical operator. This notation prevents a common ambiguity in a reported “ error rate.” The total nonidentity Pauli probability is
For example, gives:
| Prepared and measured axis | Wrong-outcome probability |
|---|---|
The total Pauli probability is , while average state infidelity is . These are compatible summaries of the same channel, not competing estimates of one number. Coherent logical rotations need more information; hardware metrics explains their relation to worst-case error.
Endpoint error and error per round are different
Section titled “Endpoint error and error per round are different”Suppose a chosen logical binary observable flips independently with probability each round. Let count flips in rounds. The final outcome is wrong only when is odd. Since each round multiplies its sign by with probability ,
Thus
This is not the probability that at least one flip occurred,
The latter approaches one, while the endpoint error approaches one half. For and , they are approximately 0.642 and 0.439 respectively. Two flips can restore the final bit, so counting endpoint failures and dividing by the total number of rounds is generally not an estimator of the per-round flip probability.
At small , both probabilities are approximately . That approximation is useful only before saturation and within the independent-flip model. In a simulation, access to the sampled error history may reveal a latent logical fault that the laboratory endpoint measurement cannot identify.
Top: independent flips with probability per round. The final bit can be correct even when flips occurred. Bottom: the accepted filter changes a diagonal input’s zero-state probability from to . The dashed diagonal would preserve that probability. Conditioning must be included when interpreting accepted outputs.
Fit a decay only when its model fits
Section titled “Fit a decay only when its model fits”Stable preparation and readout errors can motivate a survival fit
For the independent binary-flip interpretation, . The fitted and describe boundary effects; they do not automatically remove arbitrary state-preparation or measurement errors. Several decay modes, leakage, coherent oscillations and drift can invalidate the form.
Use several round counts, including short controls and longer durations with measurable decay. Inspect residuals and stability when the fitting interval changes. Very short data may be dominated by boundaries; very long data may be nearly random and insensitive to the desired rate.
For and cycle time , an equivalent continuous-time Poisson flip rate is
It reproduces at the sampled times. This is a model-dependent conversion, not an assertion that the physical process is literally Poisson. For small , . Report the cycle duration when comparing rates.
Postselection produces an instrument
Section titled “Postselection produces an instrument”Let and be the accepted and rejected completely positive branches of an experiment. Their sum is trace preserving when every outcome is included. The acceptance probability is
and the accepted state is
when . If acceptance depends on , this normalized transformation is generally nonlinear. Calling it a single trace-preserving logical channel would lose that dependence. The unnormalized branch and the full flagged output remain linear physical descriptions.
An exact example uses
The complementary rejected Kraus operator is . Both basis states are unchanged after acceptance, but their acceptance probabilities are 1 and . The input is accepted with probability and becomes . It is not the equal mixture of the separately normalized basis outputs.
For a specified benchmark ensemble, let be its average acceptance and its accepted wrong-outcome probability. Then
Report all three categories, or equivalently and . A low conditional error may be valuable for a heralded primitive. It does not describe delivery on every attempt. If acceptance differs between input states, also report that variation instead of averaging it away.
Being outside a stabilizer code space is not automatically physical leakage: an ordinary correctable Pauli error produces a nontrivial syndrome. Distinguish computational-subspace leakage, a flagged erasure, a correctable syndrome and a residual logical error. They have different meanings for recovery and selection.
Logical gates and randomized sequences
Section titled “Logical gates and randomized sequences”A gate benchmark must include the preparation, correction rounds, ancillas, decoded measurement results and conditional operations that its intended use requires. A comparison with an equal-duration logical identity helps separate storage error from the gate’s added error. Controlled fault injection tests error containment, but testing a few injected faults does not prove that every allowed fault set is harmless.
Logical randomized benchmarking samples logical Clifford sequences, appends the ideal inverse, and measures survival. Combes and collaborators propose a protocol operating directly at the encoded level. In the usual gate-independent, stationary Markovian logical-noise model, Clifford averaging yields
For a logical space of dimension , the associated average infidelity is
This is per sampled, implemented logical Clifford. It is not automatically per physical gate, per correction round or the worst logical gate. Its conversion follows the assumptions of standard randomized benchmarking; the canonical explanation derives the twirl and fitting model.
Physical noise being stationary does not guarantee a memoryless logical process. Syndrome degrees of freedom, incomplete resets and decoder state can retain information between logical operations. Ceasura and collaborators construct nonexponential logical-RB behavior with gate- and time-independent physical noise. More general representation-based treatments can have several decay modes; see Helsen and collaborators.
An oscillation or multiexponential curve therefore deserves diagnosis, not a forced one-rate summary. Leakage-sensitive measurements, syndrome-reset variations and sequence-level residuals can distinguish hypotheses. A nonexponential curve alone does not identify a unique cause: a mixture of two stationary populations already gives two exponentials.
Interleaving a target gadget inherits the assumptions and uncertainty of the reference protocol. Cycle benchmarking addresses parallel layers. Non-Clifford injection additionally couples the delivered gate to resource-state quality, acceptance and classical reaction time. A memory benchmark cannot establish those operations’ performance.
Uncertainty depends on independent repetitions
Section titled “Uncertainty depends on independent repetitions”If independent identical trials yield wrong outcomes, the binomial likelihood is proportional to and the estimate is . Here one trial might be a complete fixed-length memory experiment. Calling all its internal rounds independent trials changes the likelihood without justification.
For zero observed failures, the probability of that observation at error rate is . Equating this probability to gives the one-sided upper confidence limit
At 95% confidence and large , this is approximately . Zero failures in 500,000 independent trials give about , not a demonstrated zero rate.
If shots share drift or a common burst, use the sampling clusters that are independent under the model. Five thousand independent blocks of 100 perfectly correlated shots contain 5,000 independent Bernoulli outcomes, not 500,000. The corresponding zero-failure limit is about . Actual partial correlations require a suitable joint or clustered model; an arbitrary “effective sample size” is not a substitute for one.
For nonzero counts, use intervals appropriate to the likelihood and probability boundary rather than symmetric normal errors near zero. Randomized sequences create an additional sampling level: repeating one sequence many times reduces its shot noise but does not sample other sequences. Preserve the hierarchy of sequences, shots and chronological blocks when fitting or resampling.
Choose stopping and selection rules before examining the final evaluation data. Tuning decoder weights or acceptance cuts on those data can bias the reported improvement. Time-ordered holdout blocks are particularly useful when calibration drifts. Rare-event simulations and extrapolations can extend a tested model’s predictions, but their uncertainty and model dependence must remain distinct from directly observed frequencies.
Suppression and break-even answer different questions
Section titled “Suppression and break-even answer different questions”For matched tasks at distances and , define
Values above one mean the larger tested code performs better for this metric. Match the state ensemble, elapsed-time or round convention, physical operating conditions, decoder information and acceptance rule. A better-selected hardware subset or more informative decoder can improve performance without the improvement being due solely to distance.
For independent estimates with small relative uncertainty, the delta method gives
Paired estimates require a covariance term, . Near zero failures, this approximation is unsuitable; use a joint likelihood or a justified interval respecting the boundary.
Break-even instead compares a logical implementation with a specified reference:
The reference might be the best physical carrier, an uncorrected encoded memory, or a physical implementation of the same gate. Align task, time and acceptance. A larger code can suppress errors relative to a smaller code while still being worse than that reference. Conversely, a fixed code may beat a physical reference without establishing asymptotic scaling. The threshold theorem explains why finite comparisons do not prove an infinite-family result.
The decoder is part of the operation being compared. Offline access to later syndrome rounds is useful for retrospective inference, but an adaptive gate may need its decision before those rounds exist. Evaluate accuracy under the observations and deadlines that the intended computation supplies. Keep decoder throughput, latency tails, trial duration, acceptance and physical occupancy alongside reliability. These quantities become inputs to resource estimation.
Exercises
Section titled “Exercises”1. Reconstruct a Pauli error distribution
Section titled “1. Reconstruct a Pauli error distribution”Measured axis errors are , , . Under the Pauli-channel assumption, recover the four probabilities and the average infidelity.
Solution
Solving the three linear equations gives
Similarly , and . Each nonidentity Pauli has average state infidelity , so the channel’s average infidelity is . Negative reconstructed probabilities are incompatible with a physical Pauli channel at the point-estimate level. Examine sampling uncertainty, preparation/readout errors and inconsistent conditions; coherence alone need not produce negative values.
2. Count odd flips rather than any flip
Section titled “2. Count odd flips rather than any flip”Independent logical flips have probability per round. Compute the endpoint error and probability of at least one flip after 20 rounds. Does dividing endpoint error by 20 recover ?
Solution
The endpoint error is . The probability of at least one flip is . Endpoint error divided by 20 is about 0.0220, well below 0.05. Even flip counts restore the measured bit. Recovering requires the model-dependent decay relation, not that division.
3. Compare per-round and per-time performance
Section titled “3. Compare per-round and per-time performance”Memory A has binary flip probability per cycle; B has per cycle. Compare their independent-flip models at equal cycle count and equal elapsed time.
Solution
A is better per cycle. At equal time, use
B then has less parity decay at the same elapsed time. The exact logarithmic rates are about and . This comparison concerns storage, not the speed of a logical gate that uses those cycles.
4. Test linearity after acceptance
Section titled “4. Test linearity after acceptance”Use . Compare filtering and normalizing with filtering and separately, normalizing each, and mixing them equally. Explain the difference.
Solution
The first procedure gives
whose trace is . Normalizing gives . Each separately accepted basis state is unchanged, so their equal mixture is . The accepted ensemble reweights the inputs by their unequal success probabilities. The unnormalized branch remains linear; normalization causes the discrepancy.
5. Count independent blocks
Section titled “5. Count independent blocks”No failures occur in 500,000 shots arranged in 5,000 independent blocks. Within each block the 100 outcomes are identical. Find the one-sided 95% upper limit on the marginal failure probability.
Solution
The probability of zero failures is , so
Using 500,000 independent shots instead would give , understating the limit by about a factor of 100. This exact example illustrates why a correlated sample cannot simply be treated as binomial at the shot level.
6. Quantify suppression without break-even
Section titled “6. Quantify suppression without break-even”Two independent million-trial memory experiments give 900 and 300 errors. A matched physical reference has known error probability . Estimate suppression, an approximate 95% interval for its ratio, and break-even gain for the better code.
Solution
The point estimate is . Its approximate log standard error is
The interval is approximately . It supports suppression in this finite comparison. The break-even gain is , so the better code still underperforms the stated reference. An estimated reference rate would need its own uncertainty.
7. A mixture does not have one decay rate
Section titled “7. A mixture does not have one decay rate”Half the trials have independent flip rate 0.001 per round; half have rate 0.01, with that rate fixed throughout each trial. Find the averaged correlation. Compare effective per-round errors inferred separately from rounds 0–100 and 100–200.
Solution
The correlation is
It gives and . Fitting each interval by one exponential gives the factors
Using gives inferred errors approximately 0.00370 and 0.00162 respectively. The faster-decaying population contributes progressively less to the remaining correlation. The changing fitted rate does not require either population’s physical rate to vary within a trial.
8. Keep acceptance beside correctness
Section titled “8. Keep acceptance beside correctness”A known-output benchmark accepts 20% of trials and has wrong-output probability among accepted trials. Each attempt takes 5 ms. Compute its correct accepted output rate and mean attempts per accepted output under independent stationary trials.
Solution
The ensemble rate is
The mean attempts per accepted output is . The rate counts correct outcomes relative to the benchmark’s known answer; it does not supply a general procedure to recognize errors in an unknown quantum output. Acceptance is visible, correctness need not be.
References
Section titled “References”- A. Ceasura, P. Iyer, J. J. Wallman and H. Pashayan, “Non-exponential behaviour in logical randomized benchmarking,” arXiv:2212.05488 (2022), arXiv.
- J. Combes, C. Granade, C. Ferrie and S. T. Flammia, “Logical randomized benchmarking,” arXiv:1702.03688 (2017), arXiv.
- J. Helsen, I. Roth, E. Onorati, A. H. Werner and J. Eisert, “General framework for randomized benchmarking,” PRX Quantum 3, 020357 (2022), doi:10.1103/PRXQuantum.3.020357.
- E. Magesan, J. M. Gambetta and J. Emerson, “Scalable and robust randomized benchmarking of quantum processes,” Physical Review Letters 106, 180504 (2011), doi:10.1103/PhysRevLett.106.180504, arXiv:1009.3639.