Skip to content

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 nn-qubit ideal circuit prepare ∣ψU⟩=U∣0n⟩|\psi_U\rangle=U|0^n\rangle, and set D=2nD=2^n. Its ideal probabilities are

pU(x)=∣⟨x∣ψU⟩∣2.p_U(x)=|\langle x|\psi_U\rangle|^2.

The device samples a distribution qUq_U. For each output xx, assign the weight

YU(x)=DpU(x)−1.Y_U(x)=Dp_U(x)-1.

Averaging MM observed weights estimates

XU=D∑xqU(x)pU(x)−1,X^U=1M∑i=1MYU(xi).\begin{aligned} X_U&=D\sum_xq_U(x)p_U(x)-1,\\ \widehat X_U&=\frac1M\sum_{i=1}^M Y_U(x_i). \end{aligned}

Linear XEB was used in the random-circuit experiment of Arute and colleagues (2019). It does not require estimating every probability of qUq_U.

For uniform sampling u(x)=1/Du(x)=1/D, the expected score is exactly zero for every normalized ideal distribution, regardless of scrambling. Ideal sampling instead gives

CU=D∑xpU(x)2−1.C_U=D\sum_xp_U(x)^2-1.

This ideal score is a shifted collision probability, not generally one. When CU>0C_U>0, define the circuit-normalized score

x^U=X^UCU.\widehat x_U=\frac{\widehat X_U}{C_U}.

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 pUp_U is uniform, every weight vanishes and CU=0C_U=0. XEB then has no sensitivity to the sampler. Near-uniform circuits also have poor normalized sensitivity, as Exercise 7 quantifies.

Consider the ideal probabilities

p=(1/2, 1/4, 1/8, 1/8).p=(1/2,\ 1/4,\ 1/8,\ 1/8).

Mix ideal sampling with uniform sampling in proportions 0.60.6 and 0.40.4:

Outcome Ideal pp Device qq Weight 4p−14p-1
0000 0.5000.500 0.4000.400 11
0101 0.2500.250 0.2500.250 00
1010 0.1250.125 0.1750.175 −1/2-1/2
1111 0.1250.125 0.1750.175 −1/2-1/2

The raw score is 0.400−0.175=0.2250.400-0.175=0.225. The ideal raw score is

C=4(1132)−1=38.C=4\left(\frac{11}{32}\right)-1=\frac38.

Therefore the normalized score is 0.225/0.375=0.60.225/0.375=0.6, exactly the ideal-mixture weight. The total-variation distance between these distributions is instead 0.10.1. The two numbers answer different questions.

Now change the device distribution to

q′=(1/2, 1/4, 1/4, 0).q'=(1/2,\ 1/4,\ 1/4,\ 0).

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 1/81/8.

Grouped bars compare ideal probabilities one half, one quarter, one eighth, one eighth with a second distribution one half, one quarter, one quarter, zero. Both have the same linear XEB score.

Different distributions, identical score. Probability moves between two outcomes with the same ideal probability, leaving X=3/8X=3/8 and normalized XEB equal to one. The score cannot see this redistribution.

More generally,

XU=D⟨qU−u, pU−u⟩.X_U=D\langle q_U-u,\ p_U-u\rangle.

XEB measures one direction in a probability simplex with D−1D-1 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 XU=Dpmax⁡−1X_U=Dp_{\max}-1. In the example this is one, above the ideal raw value 3/83/8, and its normalized score is 8/38/3. 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

qU,f=fpU+(1−f)u,0≤f≤1,q_{U,f}=f p_U+(1-f)u, \qquad 0\leq f\leq1,

linearity gives XU=fCUX_U=fC_U. Hence normalized XEB estimates ff exactly under this distributional model.

A stronger quantum model is

ρU,f=f∣ψU⟩⟨ψU∣+(1−f)ID.\rho_{U,f} =f|\psi_U\rangle\langle\psi_U|+(1-f)\frac{I}{D}.

Its squared state fidelity with the pure target is

Fstate=f+1−fD.F_{\rm state}=f+\frac{1-f}{D}.

Even here the mixture weight differs from state fidelity at finite DD. 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 pUp_U and its ideal XEB score, while its state fidelity becomes ∑xpU(x)2\sum_xp_U(x)^2. 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.

For a Haar-random pure state in dimension D≥2D\geq2, a fixed output probability has density on 0≤p≤10\leq p\leq1

hD(p)=(D−1)(1−p)D−2.h_D(p)=(D-1)(1-p)^{D-2}.

Its second moment is 2/[D(D+1)]2/[D(D+1)], so

EU∑xpU(x)2=2D+1,EUCU=D−1D+1.\begin{aligned} \mathbb E_U\sum_xp_U(x)^2&=\frac2{D+1},\\ \mathbb E_U C_U&=\frac{D-1}{D+1}. \end{aligned}

For large DD, the scaled probability z=Dpz=Dp approaches an exponential density e−ze^{-z}. 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 CUC_U by one.

There are also two ways to sample the probabilities. Choosing an output label uniformly gives the density e−ze^{-z}; choosing it with its ideal Born probability gives the size-biased density ze−zze^{-z}. Confusing them gives the wrong score moments.

For independent subsystems, the raw scores compose as

X12+1=(X1+1)(X2+1).X_{12}+1=(X_1+1)(X_2+1).

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,

Var⁡(X^U)=Var⁡qU(YU)M.\operatorname{Var}(\widehat X_U) =\frac{\operatorname{Var}_{q_U}(Y_U)}{M}.

An observed sample variance of the weights estimates the numerator. The normalized variance is divided by CU2C_U^2 when CUC_U is exact.

In the four-outcome mixture, YY takes values 1,0,−1/21,0,-1/2 with probabilities 0.4,0.25,0.350.4,0.25,0.35. Thus

EY=0.225,EY2=0.4875,Var⁡(Y)=0.436875.\begin{aligned} \mathbb E Y&=0.225,\\ \mathbb E Y^2&=0.4875,\\ \operatorname{Var}(Y)&=0.436875. \end{aligned}

For 10,00010{,}000 independent shots, the raw standard error is approximately 0.006610.00661; the normalized standard error is 0.017630.01763. More shots shrink this sampling error, but do not remove a wrong reference model.

Under the large-DD Porter–Thomas mixture approximation,

Var⁡(Y)≃1+2f−f2.\operatorname{Var}(Y)\simeq1+2f-f^2.

This is a planning approximation using the uniform and size-biased probability statistics, not a replacement for every fixed circuit’s variance. At small ff, resolving a score with signal-to-noise ratio z⋆z_\star requires roughly

M≳z⋆2/f2.M\gtrsim z_\star^2/f^2.

For f=0.002f=0.002 and a nominal ratio of five, that is about 6.256.25 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 kk follows a mixture with weight fkf_k, then Xk=fkCkX_k=f_kC_k, and

∑kXk∑kCk=∑kCkfk∑kCk.\frac{\sum_k X_k}{\sum_k C_k} =\frac{\sum_k C_k f_k}{\sum_k C_k}.

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 KK independent circuits and MM shots per circuit, an equal-circuit raw-score mean has variance

Var⁡U(XU)K+EU[Var⁡(YU∣U)]KM.\frac{\operatorname{Var}_U(X_U)}{K} +\frac{\mathbb E_U[\operatorname{Var}(Y_U\mid U)]}{KM}.

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.

The earlier proposal by Boixo and colleagues (2018) used the logarithmic cross-entropy

H(q,p)=−∑xq(x)log⁡p(x),H(q,p)=-\sum_xq(x)\log p(x),

with natural logarithms. Its difference from the uniform baseline is

ΔH=H(u,p)−H(q,p).\Delta H=H(u,p)-H(q,p).

Under q=fp+(1−f)uq=fp+(1-f)u,

ΔH=f[H(u,p)−H(p,p)].\Delta H=f[H(u,p)-H(p,p)].

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 Dp−1Dp-1 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 p~=p+δp\widetilde p=p+\delta p, the population raw-score bias is

ΔX=D∑xq(x)δp(x).\Delta X=D\sum_xq(x)\delta p(x).

It obeys ∣ΔX∣≤D∥δp∥∞|\Delta X|\leq D\|\delta p\|_\infty. Normalization introduces additional sensitivity if CC 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.

Show that uniform sampling scores zero, ideal sampling scores CC, and the normalized score of q=fp+(1−f)uq=fp+(1-f)u is ff.

Solution

Normalization of pp gives D∑xu(x)p(x)−1=0D\sum_xu(x)p(x)-1=0. Substituting q=pq=p gives C=D∑xp(x)2−1C=D\sum_xp(x)^2-1. By linearity, the mixture scores fCfC. Dividing by a nonzero exact CC gives ff. When p=up=u, the statistic is identically zero and the division is undefined.

Always return 0000 in the four-outcome example. Calculate raw XEB, normalized XEB, and total-variation distance from pp.

Solution

The raw score is 4(1/2)−1=14(1/2)-1=1, and the normalized score is 1/(3/8)=8/31/(3/8)=8/3. The total-variation distance is 1−p(00)=1/21-p(00)=1/2. The score exceeds the ideal value even though half the target probability mass is missing from the sampler.

Let ∣ψ⟩=∑xpx∣x⟩|\psi\rangle=\sum_x\sqrt{p_x}|x\rangle for the four-outcome example. Define ∣ϕ⟩|\phi\rangle by leaving its 0000 amplitude positive and reversing the signs of the other three amplitudes. Find their state fidelity and XEB.

Solution

Both states have probabilities pp. Their overlap is

⟨ψ∣ϕ⟩=12−14−18−18=0.\langle\psi|\phi\rangle =\frac12-\frac14-\frac18-\frac18=0.

The squared state fidelity is zero, but both give raw XEB 3/83/8 and normalized XEB one. Computational-basis sampling cannot detect this phase change.

For Y=z−1Y=z-1, use the densities e−ze^{-z} and ze−zze^{-z} to derive the mixture variance.

Solution

The exponential moments give Euz=1\mathbb E_u z=1 and Euz2=2\mathbb E_u z^2=2, hence EuY=0\mathbb E_uY=0 and EuY2=1\mathbb E_uY^2=1. Size bias gives Epz=2\mathbb E_p z=2 and Epz2=6\mathbb E_p z^2=6, hence EpY=1\mathbb E_pY=1 and EpY2=3\mathbb E_pY^2=3.

Mixing the two populations gives

EY=f,EY2=1+2f,Var⁡(Y)=1+2f−f2.\begin{aligned} \mathbb E Y&=f,\\ \mathbb E Y^2&=1+2f,\\ \operatorname{Var}(Y)&=1+2f-f^2. \end{aligned}

These moments use the large-dimension probability model. A fixed circuit with a different probability spectrum has different moments.

Integrate p2p^2 against hD(p)h_D(p) to derive the ideal ensemble mean. What is it at D=4D=4?

Solution

Using the beta integral,

Ep2=(D−1)2!(D−2)!(D+1)!=2D(D+1).\begin{aligned} \mathbb E p^2 &=(D-1)\frac{2!(D-2)!}{(D+1)!}\\ &=\frac2{D(D+1)}. \end{aligned}

Summing over DD outputs and inserting the factor DD in XEB gives (D−1)/(D+1)(D-1)/(D+1). At D=4D=4 this is 3/53/5, not one. The worked circuit’s 3/83/8 is a particular realization, not the ensemble mean.

Two circuits have (C1,f1)=(0.2,0.9)(C_1,f_1)=(0.2,0.9) and (C2,f2)=(1,0.3)(C_2,f_2)=(1,0.3). Compare their equal-circuit normalized mean with the ratio of mean raw score to mean contrast.

Solution

The normalized mean is (0.9+0.3)/2=0.6(0.9+0.3)/2=0.6. Their raw scores are 0.180.18 and 0.300.30, so

X‾C‾=0.240.60=0.4.\frac{\overline X}{\overline C} =\frac{0.24}{0.60}=0.4.

The ratio places more weight on the high-contrast circuit. Neither averaging rule should silently substitute for the other.

For a uniform device sampler and a nonuniform ideal distribution, show that Var⁡u(Y)=C\operatorname{Var}_u(Y)=C. Deduce the normalized standard error.

Solution

The mean is zero, and

EuY2=1D∑x(Dpx−1)2=D∑xpx2−1=C.\begin{aligned} \mathbb E_uY^2 &=\frac1D\sum_x(Dp_x-1)^2\\ &=D\sum_xp_x^2-1=C. \end{aligned}

Thus Var⁡(x^)=1/(MC)\operatorname{Var}(\widehat x)=1/(MC) and the normalized standard error is 1/MC1/\sqrt{MC}. As the target approaches uniformity, CC vanishes and the normalized estimator becomes less informative.

A uniform sampler for the four-outcome example retains only output 0000. Find acceptance and conditional XEB. Why does multiplying the conditional raw score by acceptance fail to recover the original score?

Solution

Acceptance is 1/41/4, and conditional raw XEB is one. The rejected outputs have weights 0,−1/2,−1/20,-1/2,-1/2, with conditional mean −1/3-1/3. The unconditional score is

X=14(1)+34(−1/3)=0.X=\frac14(1)+\frac34(-1/3)=0.

Using acceptance times conditional score would give 1/41/4 because it implicitly assigns zero weight to rejection. That defines a different scoring rule.

For the worked mixture, suppose the reference error is δp=η(1,−1,0,0)\delta p=\eta(1,-1,0,0). Find the raw-score bias. Separately, what is the combined raw score of independent systems with scores 0.10.1 and 0.20.2?

Solution

For sufficiently small η\eta, the reference remains a normalized distribution. Since q00=0.4q_{00}=0.4 and q01=0.25q_{01}=0.25,

ΔX=4η(0.4−0.25)=0.6η.\Delta X=4\eta(0.4-0.25)=0.6\eta.

Zero summed reference error does not imply zero score bias. For the independent systems, factorization gives X12+1=(1.1)(1.2)X_{12}+1=(1.1)(1.2), hence X12=0.32X_{12}=0.32. This is not the product 0.020.02 of the two scores.

  • 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.