Cross-Entropy Benchmarking and Verification of Sampling
Sampling from the output distribution of a deep random quantum circuit is believed to be classically intractable, and it is the task at the heart of every leading "quantum advantage" experiment. But this raises an awkward question of verification: how do you check that a noisy, imperfect device actually performed the intended sampling, when the ideal distribution it was supposed to reproduce is itself exponentially hard to write down? You cannot collect enough samples to estimate a distribution over strings, and you cannot compare against a target you cannot compute. Cross-entropy benchmarking is the pragmatic escape: it abandons distribution-level verification and replaces it with a single scalar — the linear cross-entropy fidelity — computed from the bitstrings the machine returned and a classically evaluated list of their ideal Born probabilities. The trick that makes one number carry so much is the spikiness of random-circuit output. A deep random circuit scrambles amplitudes into effectively complex Gaussians, so the ideal probabilities obey the Porter–Thomas law: most strings are improbable, but a lucky few are anomalously heavy. A faithful sampler preferentially returns those heavy strings, so the average of the ideal probability over its samples beats the flat baseline; noise smears the spikes toward uniform and the average collapses. XEB reads off how much spikiness survived. Under a global-depolarizing model, that surviving fraction is exactly the circuit fidelity — turning XEB into a tomography-free measurement of accumulated gate error. This dual identity, one statistic that is at once a hardness witness and a fidelity meter, is what made XEB the backbone of Google's Sycamore experiment, and also what makes its soundness so subtle and contested.
- Linear cross-entropy benchmarking (linear XEB) estimates the fidelity of a noisy random-circuit sampler by averaging the ideal output probabilities over the bitstrings the hardware actually returned: with .
- For a circuit that behaves as an approximate unitary 2-design, the ideal probabilities follow the Porter–Thomas law , fixing the two calibration constants and .
- The score reads for a perfect sampler and for the uniform (fully depolarized) distribution; under a global-depolarizing model it equals the circuit fidelity exactly.
- XEB underpinned Google's 2019 quantum-supremacy claim: a -qubit, depth- circuit reached with roughly a million samples — small, but many standard deviations above the statistical floor.
- XEB is not a proof of quantum advantage: classical spoofing algorithms achieve nonzero without correct sampling, and tensor-network contractions have matched experimental scores, so its security rests on unproven average-case hardness conjectures.
- Key idea: linear XEB estimates fidelity via , exploiting Porter–Thomas statistics so that an ideal sampler scores , the uniform distribution scores , and under global depolarizing noise the score equals the circuit fidelity.
Linear XEB estimates fidelity via , leveraging Porter–Thomas statistics: an ideal sampler scores , the uniform distribution scores , and under global depolarizing noise the score equals the circuit fidelity.
Where this lives today
XEB is now the standard yardstick of the noisy-intermediate-scale era, and its story is still being written on both sides of the advantage line. On the experimental side, every superconducting supremacy claim since Sycamore — Google's later -qubit runs, and the Chinese Zuchongzhi processors — quotes a linear XEB fidelity as its headline result, and photonic Gaussian-boson-sampling machines use closely related cross-entropy tests. Beyond advantage claims, XEB has become a workhorse of device characterization: because it equals the global circuit fidelity under depolarizing noise, experimentalists fit against circuit depth to extract an effective per-cycle error that captures crosstalk and context-dependent errors invisible to isolated-gate randomized benchmarking. On the theory side it drives an active research program in average-case complexity — anticoncentration of random circuits, the average-case #P-hardness of estimating a single , and the precise relationship between hardness of sampling and hardness of scoring. And it is a moving target: ever-better tensor-network contractions, with slicing and clever contraction ordering, have repeatedly closed the classical-quantum gap, turning the original "-year" estimate into days or hours and forcing each new experiment to push to larger volume. The open problem XEB crystallizes — a verification that is efficient, sound, and scalable all at once — remains unsolved, and is one of the sharpest questions in quantum computing.
The physical picture
A deep random circuit acts, on its low moments, like a Haar-random unitary. The output amplitudes therefore look like independent complex Gaussians, and the probabilities inherit the Porter–Thomas distribution: their rescaled values are exponentially distributed. The consequence is a distribution that is spiky rather than flat — the typical string is unlikely, but a small population of strings carries far more than their fair share of the probability. A perfect sampler returns strings in proportion to , so it lands on the spikes disproportionately often, and averaging over its samples sits above the flat baseline. A noisy device that has forgotten the circuit returns strings uniformly at random, hitting spikes no more often than valleys, and the same average collapses to its minimum. XEB is nothing more than a calibrated reading of that difference.
There are two ways to read the same estimator, and both matter. As a correlation, measures how strongly the experimental distribution overlaps the ideal — it is large exactly when the device concentrates where the ideal is heavy, and the subtraction of recenters the worthless uniform output to score zero. As a fidelity, it is even sharper: a deep noisy circuit is well modeled by the global-depolarizing state , a fraction of the ideal pure state plus a fraction of structureless noise. Feed that into the estimator and the identity component contributes precisely the uniform baseline that the removes, leaving on the nose. One measured number simultaneously certifies closeness to the ideal distribution and reports the accumulated entanglement fidelity of the whole circuit — no tomography required.
The deep tension in the picture is that XEB silently answers two very different questions with one number: "did the device sample from something close to the ideal distribution?" and "is achieving this score classically hard?". The Porter–Thomas mathematics and the depolarizing model make the first question rigorous. The second rests on a conjecture — that no efficient classical algorithm can reach a comparable score — and that is the leg spoofing attacks kick at, engineering a cheap distribution that shares the ideal's heavy strings without ever simulating the circuit.
The core equations
Everything begins with the quantity XEB needs but cannot easily get: the ideal probability of a measured string. For a circuit on qubits initialized in , the Born rule fixes it, and evaluating it for a generic string is the computational bottleneck of the whole scheme.
where: — the (random) quantum circuit on qubits, regarded as a unitary; — an -bit measurement outcome; — dimension of the Hilbert space; — ideal probability of , generically #P-hard to evaluate. Reading: XEB does not need the whole distribution, only evaluated on the few strings the device returned — but even one such evaluation is the hard part. When is drawn from an approximate unitary 2-design, its amplitudes behave as complex Gaussians and the rescaled probability follows a universal law. This is the statistical engine of the benchmark: it is what makes an average over a few samples informative about a distribution over exponentially many strings.
where: — the ideal probability rescaled by the Hilbert-space dimension; — the Porter–Thomas density, the limiting law of as . Reading: the distribution of probabilities is exponential, not flat — a signature of anticoncentration and the origin of the "spikes". Two averages of over that law calibrate the estimator. One is taken over strings drawn uniformly (the unweighted average), the other over strings drawn from the ideal distribution itself (weighted by ); they differ, and their difference is the entire signal.
where: — unweighted (uniform) average over the strings; — average weighted by the ideal , under which is distributed as . Reading: a uniform device sees ; an ideal device sees . The factor of two is the second moment of the exponential law. The linear XEB estimator packages those constants into a fidelity-like score. It averages the ideal probability over the experimental distribution , rescales by , and subtracts the uniform baseline so the score has a clean zero.
where: — the experimental (hardware) output distribution; — bitstrings drawn from the device; — the linear cross-entropy fidelity. Reading: is a rescaled overlap between and , large when the device concentrates where the ideal is heavy. In practice is never known; only sampled strings are. The empirical estimator replaces the exact average by the Monte-Carlo mean over shots, which is unbiased for .
where: — the measured bitstrings; — the number of shots; — the unbiased sample estimate. Reading: you evaluate the ideal on each returned string, average, rescale, and subtract one — no distribution ever assembled. To turn the correlation into a fidelity you need a noise model. Deep random circuits are well described by global depolarization: a surviving coherent fraction on top of a fully scrambled background.
where: — the actual output state; — the ideal pure output; — the global (entanglement) fidelity; — the maximally mixed state. Reading: the more error accumulates, the more weight flows from the ideal state into the featureless background. That fidelity, in turn, is a product over the circuit's gates. Because independent errors multiply, shrinks exponentially with the number of gates — the reason deep-circuit fidelities are so small.
where: — the infidelity of gate (from one- and two-qubit benchmarking, plus idle and readout errors); — the product over all operations in the circuit. Reading: with gates of mean error , — a full-stack error budget compressed into one exponential. A logarithmic variant is also common; it weights the heavy strings less aggressively and is defined so that uniform sampling scores and ideal Porter–Thomas sampling scores .
where: — the cross entropy of the device distribution against the ideal; — the uniform-distribution cross entropy, with the Euler–Mascheroni constant; — the value achieved by ideal sampling. Reading: the "" separating from is the Porter–Thomas entropy deficit .
The goal is to establish the statistical law that makes XEB work at all: that for a circuit behaving as an approximate 2-design, the rescaled ideal probability is exponentially distributed, with unweighted mean and ideal-weighted mean . Everything downstream — the estimator's calibration, the fidelity identity, the sample-complexity scaling — is a corollary of these two moments, so we derive them from the Gaussian statistics of Haar-random amplitudes and check them against the normalization that any probability distribution must obey.
Step 1. Model the output state as Haar-random. Each amplitude then has real and imaginary parts that are independent Gaussians with variance , so that the expected probability matches the requirement that the probabilities sum to on average. Why: a deep random circuit reproduces Haar statistics on its low moments, and it is precisely the first two moments that XEB touches, so the Gaussian model is exact enough for the benchmark.
Step 2. Write with . Then is a chi-squared variable with two degrees of freedom, i.e. exponential with mean ; equivalently has density with unweighted mean . Why: the sum of two squared Gaussians is the simplest exponential, and this is the mathematical root of the "spiky" distribution — a few strings with large , exponentially many with small .
Step 3. Compute the ideal-weighted mean. When strings are drawn from itself, a string of rescaled value appears with probability proportional to times the number of such strings , so under ideal sampling is distributed as . Its mean is . Equivalently , i.e. times the collision probability. Why: the same collection of probabilities looks different depending on how you sample it, and this reweighting from to — mean to mean — is the entire signal XEB detects.
Step 4. Fix the trivial constant. The unweighted average of is exactly, for any distribution, because probabilities sum to one. Hence a uniform device gives regardless of the circuit. Why: this pins the zero of the estimator — the "" in is calibrated against this model-independent baseline, so a scrambled device scores exactly zero.
Go deeper · Derivation B · 1 minXEB equals fidelity under global depolarizing noise
The goal is to show that when the device state is the global-depolarizing mixture, feeding it through the linear XEB estimator returns exactly the depolarizing fidelity — the result that promotes XEB from a mere correlation test into a tomography-free measurement of accumulated gate error. We take the device distribution to be the diagonal of , insert it into the estimator, split the sum into an ideal piece and a uniform piece, and apply the two Porter–Thomas moments derived above to collapse everything to a single number.
Step 1. The device distribution is the Born diagonal , since the maximally mixed component contributes the uniform value to every string. Why: depolarizing noise cleanly separates into a coherent copy of the ideal distribution and a structureless flat background, which is exactly the convex form the estimator can dissect.
Step 2. Insert into the estimator: . Why: substituting the model directly is legitimate because is linear in , so the mixture passes straight through.
Step 3. Split the sum: . The second sum is exactly by normalization. Why: linearity lets the ideal and uniform contributions be evaluated independently, and one of them is a constant we already know.
Step 4. Apply the Porter–Thomas moment from the previous derivation. Why: this is the only place the circuit's random structure enters — the collision probability of a spiky distribution is twice that of a flat one.
Step 5. Combine: . The ideal term contributes , the uniform term , and the recentering leaves exactly . Why: the algebra is engineered so the constants cancel — the "" from spikiness and the "" recentering conspire to strip everything but the fidelity.
Go deeper · Derivation C · 1 minHow many shots resolve a small XEB score
The goal is to estimate the number of samples needed to distinguish a small from statistical noise, which explains why supremacy-scale experiments collect on the order of a million bitstrings per circuit. The estimator averages the random variable over shots, so its uncertainty is set by the per-shot variance of divided by the shot count; we evaluate that variance with the Porter–Thomas moments and impose a signal-to-noise condition.
Step 1. The per-shot variance is with , . For a low-fidelity device is close to uniform, so both moments are governed by the Porter–Thomas statistics of . Why: near the noise floor — exactly where resolution is hard — the device samples almost uniformly, so the relevant statistics are those of under uniform sampling.
Step 2. Evaluate the moments: and , giving . Why: the variance is per shot, independent of — the crucial fact that lets a fixed number of samples work at any system size.
Step 3. The estimator variance is , so the standard error is . Why: independent shots average down as , the familiar Monte-Carlo rate, with no hidden dimension factor.
Step 4. Impose resolution at standard deviations: . For and , this is shots — the order of magnitude actually used. Why: the scaling is unforgiving, and it is why halving the fidelity quadruples the required samples, driving supremacy experiments into the millions of shots.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Noiseless ideal sampler | samples drawn from itself give by Porter–Thomas, so the score saturates at | |
| Uniform / fully depolarized | averaging over random strings returns the mean , so the centered score vanishes | |
| Global depolarizing, fidelity | a convex mix of ideal and uniform yields XEB equal to the depolarizing fidelity — the basis of XEB-as-metrology | |
| Finite samples | per-shot variance means shots resolve a small score; needs | |
| Shallow / non-anticoncentrated circuit | Porter–Thomas fails; | too little depth leaves the distribution un-spiky, breaking the calibration constant and the fidelity identity |
Worked examples
1 · The Sycamore fidelity budget (fully worked)
Google's Sycamore circuit uses roughly single-qubit gates, two-qubit gates, and readouts, with mean errors , , and . Predict the linear XEB fidelity from the digital error model, and compare to the reported .
Step 1. Sum the error budget, , contribution by contribution. Single-qubit gates give ; two-qubit gates give ; readout gives . The total is .
Step 2. Convert to fidelity with equation (7): . Because the errors are independent and each factor is close to one, the product and its exponential approximation agree to better than a percent.
Step 3. Interpret. Under the global-depolarizing model , so the digital error model predicts a score near , the same order of magnitude as the measured — the residual gap is absorbed by details of the error model and circuit compilation. The dominant single contributor is the two-qubit gate budget, which is why supremacy engineering fights hardest to lower . Predicted F_XEB ≈ 1.6×10⁻³, consistent with the measured ≈ 2×10⁻³, and two-qubit gates dominate the loss.
2 · How many bitstrings to call it (fully worked)
A device posts . How many samples are needed to resolve this at five standard deviations, and what does that imply about the classical verification cost?
Step 1. Use the sample-complexity result with . Then shots — a few million bitstrings, matching the – million per circuit actually collected.
Step 2. Account for the standard error. With per-shot variance , the uncertainty on at is , so the score sits standard deviations above zero — statistically resolvable but not comfortable.
Step 3. Fold in the hidden cost. Every one of those samples requires a classical evaluation of , and each such amplitude is generically #P-hard. For qubits this took world-class supercomputing; the cost does not scale, so XEB cannot verify arbitrarily large experiments. Need m ≈ 6×10⁶ shots for 5σ, each demanding a #P-hard amplitude — the verification, not the sampling, is what breaks first.
Physics of the portrait
Cross-entropy benchmarking is a young idea built on an old one. Its statistical backbone was forged in nuclear physics decades before anyone imagined a quantum computer, and its rise as a verification tool tracks the sudden, contested arrival of quantum advantage.
Origins · 1 mincross-entropy benchmarking and how this was discovered
The mathematical heart of XEB predates it by more than sixty years. In 1956 Charles Porter and Robert Thomas, studying the widths of nuclear resonances, proposed that the relevant amplitudes were Gaussian random variables, so that intensities followed an exponential law — the Porter–Thomas distribution, which random-matrix theory later placed at the center of quantum chaos. When Sergio Boixo, John Martinis, Hartmut Neven and collaborators at Google set out to demonstrate quantum supremacy, they recognized that a deep random circuit produces exactly this statistics, and that its spikiness could be turned into a verification tool: average the ideal probability over the measured strings, and the Porter–Thomas moments calibrate the answer into a fidelity. Their 2018 analysis of characterizing supremacy, and the 2019 Sycamore experiment, made the reported figure of merit for the first claimed advantage. Almost immediately the complexity theorists pushed back on its meaning: Scott Aaronson and Lijie Chen had already laid out the complexity-theoretic foundations of such experiments, Adam Bouland, Bill Fefferman, Chinmay Nirkhe and Umesh Vazirani proved worst-to-average-case reductions aiming to ground the hardness, and Aaronson with Sam Gunn showed that spoofing linear XEB is itself a delicate question — efficiently spoofable in some regimes, conjecturally hard in others. XEB thus sits exactly on the fault line between what quantum devices can do and what we can prove they do: a fidelity meter that works beautifully, wrapped around a hardness claim that remains open.
Going further
References. Arute et al., "Quantum supremacy using a programmable superconducting processor", Nature 574, 505 (2019) · Boixo et al., "Characterizing quantum supremacy in near-term devices", Nature Physics 14, 595 (2018) · Aaronson & Chen, "Complexity-Theoretic Foundations of Quantum Supremacy Experiments", CCC 2017 · Bouland, Fefferman, Nirkhe & Vazirani, "On the complexity and verification of quantum random circuit sampling", Nature Physics 15, 159 (2019) · Aaronson & Gunn, "On the Classical Hardness of Spoofing Linear Cross-Entropy Benchmarking", Theory of Computing 16 (2020) · Preskill, "Quantum computing and the entanglement frontier", arXiv:1203.5813 · Nielsen & Chuang, Quantum Computation and Quantum Information, 10th anniv. ed., Ch. 8. The Porter–Thomas moments (, , exponential law ) follow from Gaussian-amplitude statistics; the ideal-weighted mean evaluates as , and the log-XEB deficit is . The XEB-equals-fidelity identity follows from and the same moments. Sycamore figures: qubits, depth , , samples, error budget .
Builds on: The Complexity Class BQP · BQP is Contained in PP and PSPACE · BQP versus P, NP, and PSPACE. Leads to: Quantum Query Complexity · The Polynomial Method for Quantum Lower Bounds · BQP is Contained in PP and PSPACE.
Ask the tutor: Ask me to walk through why the number 2 turns into a fidelity, or to show how a tensor-network spoofer could post a Sycamore-level XEB score without ever running the circuit.
Why not just compare the full output distributions instead of using one number?
Because you cannot even write down the ideal distribution, let alone estimate the experimental one. The ideal distribution lives over strings — for qubits that is about probabilities — so no realistic number of samples could estimate the device's distribution well enough to compare. Worse, each ideal probability is #P-hard to compute. XEB sidesteps both problems by never assembling a distribution: it evaluates the ideal probability only on the few million strings the machine returned, and compresses the comparison into a single expectation value. That is a genuine trade — you lose the ability to detect many kinds of error, but you gain a statistic that is actually computable from feasible data.
What is anticoncentration and why does XEB need it?
Anticoncentration is the property that a random circuit's output probability is not too concentrated on a few strings — formally, that a constant fraction of the total probability sits on strings whose is at least of order . Porter–Thomas statistics are a strong form of it. XEB needs anticoncentration because its calibration constant is exactly the (rescaled) collision probability of the ideal distribution, and that equals only when the distribution is spiky in the Porter–Thomas sense. A circuit too shallow to anticoncentrate has a different constant, so the fidelity identity silently breaks. This is why supremacy circuits are run at enough depth to reach the 2-design regime.
How can XEB measure fidelity without any tomography?
The magic is the global-depolarizing model plus the Porter–Thomas moment. Full tomography would require reconstructing the density matrix, which needs exponentially many measurements. XEB instead assumes the noisy state is a coherent fraction of the ideal plus a fully mixed background. When you feed that mixture into the estimator, the ideal part contributes (via the collision-probability moment), the mixed part contributes , and the recentering leaves exactly . So a single expectation value returns the fidelity — but only to the extent the depolarizing model holds. Coherent errors, leakage, or strong correlations violate the model, and then XEB and the true fidelity part ways.
What exactly is a spoofing attack on XEB?
A spoofer is a classical algorithm that posts a nonzero without honestly sampling the circuit. The estimator rewards any distribution that overweights the heavy strings of , so a spoofer only needs to find and preferentially output some high-probability strings — not reproduce the full distribution. Aaronson and Gunn showed this is a genuine tension: in some regimes (few queries to the circuit, or particular noise assumptions) spoofing is provably easy, while in others it is conjectured hard. Tensor-network methods are a related threat: they compute enough amplitudes cheaply to match the experimental score. Both erode the claim that a given XEB score certifies quantum advantage, which is why the field treats XEB as a moving benchmark rather than a proof.
Is the linear XEB score ever allowed to exceed 1 or go negative?
Yes, though only within statistical fluctuations for a well-behaved device. The population value is bounded: a perfect sampler gives and the uniform distribution gives , with the depolarizing model interpolating linearly. But the empirical estimate is a finite average of a heavy-tailed variable, so a single fortunate string with a large can push a small-sample estimate above , and an unlucky batch of low-probability strings can push it slightly below . As grows the estimate concentrates on the true value with standard error . Scores far outside signal either a calibration bug or a device whose noise is not depolarizing.
Why does the log-XEB variant exist if linear XEB already works?
The two weight the heavy strings differently, which changes their statistical behavior. Linear XEB averages , so a single very heavy string can dominate the sum — the estimator is unbiased but has fatter tails. Logarithmic XEB averages , taming those tails and often giving a lower-variance estimate, at the cost of a slightly more involved calibration (the constants and that make uniform score and ideal score ). In practice both are reported; linear XEB has the cleaner fidelity interpretation under depolarizing noise, while log-XEB is sometimes preferred for its estimator stability. The Euler constant appearing in its calibration is just for the exponential law.