Cross-Entropy Benchmarking
Cross-entropy benchmarking (XEB) asks whether a circuit’s measured bit strings tend to have high probability in the corresponding ideal circuit. The device supplies samples; a classical calculation supplies the ideal probability of each sampled string.
The commonly used linear XEB score is a correlation statistic. With suitable scrambling and noise assumptions it can estimate a circuit-fidelity parameter. By itself, it does not determine the full output distribution, quantum state fidelity, or computational advantage.
Required background. Why benchmarking is hard distinguishes a score from a physical claim; quantum circuit simulation explains the classical reference calculation. Helpful background. Relative entropy explains the logarithmic quantity from which XEB takes its name.
A score attached to each observed bit string
Section titled “A score attached to each observed bit string”Let an -qubit ideal circuit prepare , and set . Its ideal probabilities are
The device samples a distribution . For each output , assign the weight
Averaging observed weights estimates
Linear XEB was used in the random-circuit experiment of Arute and colleagues (2019). It does not require estimating every probability of .
For uniform sampling , the expected score is exactly zero for every normalized ideal distribution, regardless of scrambling. Ideal sampling instead gives
This ideal score is a shifted collision probability, not generally one. When , define the circuit-normalized score
With an exact fixed denominator, its expectation is one for ideal sampling and zero for uniform sampling. If the denominator is itself estimated, the ratio can be biased and its uncertainty must be propagated. Calling it “normalized” does not imply a model-free fidelity interpretation.
If is uniform, every weight vanishes and . XEB then has no sensitivity to the sampler. Near-uniform circuits also have poor normalized sensitivity, as Exercise 7 quantifies.
A four-outcome calculation
Section titled “A four-outcome calculation”Consider the ideal probabilities
Mix ideal sampling with uniform sampling in proportions and :
| Outcome | Ideal | Device | Weight |
|---|---|---|---|
The raw score is . The ideal raw score is
Therefore the normalized score is , exactly the ideal-mixture weight. The total-variation distance between these distributions is instead . The two numbers answer different questions.
Now change the device distribution to
Moving probability between the last two outcomes does not change the score, because they have equal weights. This device has the same XEB as ideal sampling despite a total-variation distance of .
Different distributions, identical score. Probability moves between two outcomes with the same ideal probability, leaving and normalized XEB equal to one. The score cannot see this redistribution.
More generally,
XEB measures one direction in a probability simplex with dimensions. Many changes in the output distribution are orthogonal to that direction.
Nor is the score bounded by one. Always returning the most likely output gives . In the example this is one, above the ideal raw value , and its normalized score is . A sampler can improve this score while becoming less faithful to the target distribution. Whether finding such outputs is computationally easy for a particular large circuit is a separate question.
What a depolarizing-mixture interpretation assumes
Section titled “What a depolarizing-mixture interpretation assumes”For the classical mixture
linearity gives . Hence normalized XEB estimates exactly under this distributional model.
A stronger quantum model is
Its squared state fidelity with the pure target is
Even here the mixture weight differs from state fidelity at finite . Observing the classical mixture does not establish the stronger quantum model: it specifies only the diagonal entries in the measurement basis.
For example, fully dephasing the ideal state preserves and its ideal XEB score, while its state fidelity becomes . More strongly, the four-outcome distribution above can come from two orthogonal pure states, both with ideal XEB (Exercise 3). No measurement restricted to these probabilities can recover their relative phases.
For sufficiently scrambling circuits and specified weak-noise regimes, ensemble-averaged XEB can track a fidelity or no-error parameter. Errors near the output, spatially correlated errors, nonunital noise, and insufficient scrambling can invalidate the approximation. Gao and colleagues (2024) analyze these dependencies. An observed exponential in depth is not itself a proof of the noise model.
Why the ideal score is often close to one
Section titled “Why the ideal score is often close to one”For a Haar-random pure state in dimension , a fixed output probability has density on
Its second moment is , so
For large , the scaled probability approaches an exponential density . This is the Porter–Thomas approximation. It explains why an ideal raw XEB score is often described as one.
These are ensemble statements, not identities for a finite circuit. A shallow circuit, a structured circuit, or disconnected patches can have quite different collision probabilities. A random-looking histogram alone does not justify replacing by one.
There are also two ways to sample the probabilities. Choosing an output label uniformly gives the density ; choosing it with its ideal Born probability gives the size-biased density . Confusing them gives the wrong score moments.
For independent subsystems, the raw scores compose as
The ideal collision normalizations obey the same shifted product law. Ordinary state fidelities of independent systems multiply without this shift. This difference matters when comparing a fully connected scrambling circuit with disconnected patches.
Statistical uncertainty for a fixed circuit
Section titled “Statistical uncertainty for a fixed circuit”For independent shots on one fixed circuit,
An observed sample variance of the weights estimates the numerator. The normalized variance is divided by when is exact.
In the four-outcome mixture, takes values with probabilities . Thus
For independent shots, the raw standard error is approximately ; the normalized standard error is . More shots shrink this sampling error, but do not remove a wrong reference model.
Under the large- Porter–Thomas mixture approximation,
This is a planning approximation using the uniform and size-biased probability statistics, not a replacement for every fixed circuit’s variance. At small , resolving a score with signal-to-noise ratio requires roughly
For and a nominal ratio of five, that is about million independent shots. Relative precision becomes costly as the score approaches zero.
Averaging circuits without changing the question
Section titled “Averaging circuits without changing the question”To estimate an equal-circuit ensemble average, first calculate each circuit’s score and then average those scores. Repeated shots on one circuit do not replace independent circuit instances.
Normalization and averaging do not generally commute. If circuit follows a mixture with weight , then , and
This weights the mixture parameters by the circuits’ ideal contrast. It is not generally their equal-circuit mean. Pooling unequal numbers of shots adds another weighting by shot count. Exercise 6 gives a numerical example.
For independent circuits and shots per circuit, an equal-circuit raw-score mean has variance
The first term is circuit variation; the second is shot noise. Time-correlated drift needs its own model or independently repeated blocks. Resample whole independent circuit or time-block records for a corresponding cluster analysis, or use a justified hierarchical model. Blindly resampling every level independently can double-count noise; treating all shots as independent circuit replicates can omit it.
When tuning gates with XEB, evaluate the final settings on fresh circuits. Interleave depths and circuit instances in time so a changing calibration is not confused with depth-dependent error.
Logarithmic cross-entropy difference
Section titled “Logarithmic cross-entropy difference”The earlier proposal by Boixo and colleagues (2018) used the logarithmic cross-entropy
with natural logarithms. Its difference from the uniform baseline is
Under ,
Thus a nonzero exact ideal difference can normalize this statistic too. Under Porter–Thomas statistics, the ideal difference approaches one, but it is circuit dependent at finite size.
Linear XEB replaces the logarithmic weight with and is not itself an entropy. The logarithm is especially sensitive to tiny reference probabilities. If the ideal distribution has zeros, the uniform cross-entropy is infinite, so the baseline subtraction may be undefined; inserting a numerical floor changes the statistic.
The classical calculation and the stronger advantage claim
Section titled “The classical calculation and the stronger advantage claim”Every retained string needs an ideal reference probability. Computing selected probabilities can cost less memory than storing the full state, but can still take substantial time. Exact collision normalization may require more work than scoring observed strings. Circuit simulation and tensor networks explain the tradeoffs.
The reference must represent the implemented ideal circuit, including qubit ordering and measurement relabeling. If approximate probabilities are , the population raw-score bias is
It obeys . Normalization introduces additional sensitivity if is approximate. A simulator’s errors can average to zero under uniform output labels yet correlate with the device samples.
Acceptance rules also change the sampled distribution. Report acceptance alongside a conditional score. An unconditional score for rejected shots additionally requires a stated scoring rule or a model for their outcomes; multiplying a conditional score by acceptance is not a universal conversion.
XEB can diagnose hardware without establishing that a classical computer cannot attain the same score. Conditional hardness results depend on explicit circuit-family and computational assumptions (Aaronson and Gunn, 2020). Classical spoofing algorithms exist for particular families, including shallow circuits (Barak, Chou, and Gao, 2021). Gao and colleagues (2024) distinguish faithfully simulating dynamics from merely attaining a high score.
Use verification of quantum advantage for the separate comparison of classical algorithms, scores, and resources. Reduced or disconnected circuits can test a model for the target experiment, but their measured scores are not direct measurements of an unscored larger circuit.
Exercises
Section titled “Exercises”1. Endpoints and the mixture weight
Section titled “1. Endpoints and the mixture weight”Show that uniform sampling scores zero, ideal sampling scores , and the normalized score of is .
Solution
Normalization of gives . Substituting gives . By linearity, the mixture scores . Dividing by a nonzero exact gives . When , the statistic is identically zero and the division is undefined.
2. A high score from a poor sampler
Section titled “2. A high score from a poor sampler”Always return in the four-outcome example. Calculate raw XEB, normalized XEB, and total-variation distance from .
Solution
The raw score is , and the normalized score is . The total-variation distance is . The score exceeds the ideal value even though half the target probability mass is missing from the sampler.
3. Orthogonal states with identical XEB
Section titled “3. Orthogonal states with identical XEB”Let for the four-outcome example. Define by leaving its amplitude positive and reversing the signs of the other three amplitudes. Find their state fidelity and XEB.
Solution
Both states have probabilities . Their overlap is
The squared state fidelity is zero, but both give raw XEB and normalized XEB one. Computational-basis sampling cannot detect this phase change.
4. Derive the Porter–Thomas variance
Section titled “4. Derive the Porter–Thomas variance”For , use the densities and to derive the mixture variance.
Solution
The exponential moments give and , hence and . Size bias gives and , hence and .
Mixing the two populations gives
These moments use the large-dimension probability model. A fixed circuit with a different probability spectrum has different moments.
5. Finite-dimensional Haar normalization
Section titled “5. Finite-dimensional Haar normalization”Integrate against to derive the ideal ensemble mean. What is it at ?
Solution
Using the beta integral,
Summing over outputs and inserting the factor in XEB gives . At this is , not one. The worked circuit’s is a particular realization, not the ensemble mean.
6. Normalize before or after averaging?
Section titled “6. Normalize before or after averaging?”Two circuits have and . Compare their equal-circuit normalized mean with the ratio of mean raw score to mean contrast.
Solution
The normalized mean is . Their raw scores are and , so
The ratio places more weight on the high-contrast circuit. Neither averaging rule should silently substitute for the other.
7. Near-uniform targets
Section titled “7. Near-uniform targets”For a uniform device sampler and a nonuniform ideal distribution, show that . Deduce the normalized standard error.
Solution
The mean is zero, and
Thus and the normalized standard error is . As the target approaches uniformity, vanishes and the normalized estimator becomes less informative.
8. Accepted shots
Section titled “8. Accepted shots”A uniform sampler for the four-outcome example retains only output . Find acceptance and conditional XEB. Why does multiplying the conditional raw score by acceptance fail to recover the original score?
Solution
Acceptance is , and conditional raw XEB is one. The rejected outputs have weights , with conditional mean . The unconditional score is
Using acceptance times conditional score would give because it implicitly assigns zero weight to rejection. That defines a different scoring rule.
9. Simulator bias and product systems
Section titled “9. Simulator bias and product systems”For the worked mixture, suppose the reference error is . Find the raw-score bias. Separately, what is the combined raw score of independent systems with scores and ?
Solution
For sufficiently small , the reference remains a normalized distribution. Since and ,
Zero summed reference error does not imply zero score bias. For the independent systems, factorization gives , hence . This is not the product of the two scores.
References
Section titled “References”- Aaronson, S., and S. Gunn. “On the classical hardness of spoofing linear cross-entropy benchmarking.” Preprint, revised 2020. arXiv:1910.12085.
- Arute, F., and colleagues. “Quantum supremacy using a programmable superconducting processor.” Nature 574, 505–510 (2019). doi:10.1038/s41586-019-1666-5.
- Barak, B., C.-N. Chou, and X. Gao. “Spoofing linear cross-entropy benchmarking in shallow quantum circuits.” 12th Innovations in Theoretical Computer Science Conference, LIPIcs 185, 30:1–30:20 (2021). doi:10.4230/LIPIcs.ITCS.2021.30.
- Boixo, S., and colleagues. “Characterizing quantum supremacy in near-term devices.” Nature Physics 14, 595–600 (2018). arXiv:1608.00263.
- Gao, X., M. Kalinowski, C.-N. Chou, M. D. Lukin, B. Barak, and S. Choi. “Limitations of linear cross-entropy as a measure for quantum advantage.” PRX Quantum 5, 010334 (2024). arXiv:2112.01657.