A game of quantum advantage linking verification and simulation

We present a formalism that captures the process of proving quantum superiority to skeptics as an interactive game between two agents, supervised by a referee. The model captures most of the currently existing quantum advantage veriﬁcation techniques. In this formalism, Bob samples from a distribution on a quantum device that is supposed to demonstrate a quantum advantage. The other player, the skeptical Alice, is then allowed to propose mock distributions supposed to reproduce Bob’s device’s statistics. Bob then needs to provide witness functions to prove that Alice’s proposed mock distributions cannot properly approximate his device. Within this framework, we establish three results. First, for random quantum circuits, Bob being able to eﬃciently distinguish his distribution from Alice’s implies eﬃcient approximate simulation of the distribution. Secondly, ﬁnding a polynomial time function to distinguish the output of random circuits from the uniform distribution can also spoof the heavy output generation problem in polynomial time. This pinpoints that exponential resources may be unavoidable for even the most basic veriﬁcation tasks in the setting of random quantum circuits. Finally, by employing strong data processing inequalities, our framework allows us to analyse the eﬀect of noise on classical simulability and veriﬁcation of more general near-term quantum advantage proposals.


Introduction
The transition from the reign of classical computers to quantum superiority is expected not to be a singular event but rather a process of accumulation of evidence. It will most probably happen through an iterative process of claims of proofs and refutations until a consensus is reached among the scientific community. A few years back the series of claims of the advantage of quantum annealers followed by rebuttals and an intense debate inside the quantum computation community [51,52,12,56] can be seen as an example of that. Similarly, recent claims of quantum advantage [8,57,58,59] were followed by a growing interest in its potential simulation by a classical device [32,47,55].
Ideally, one would like to demonstrate the advantage of quantum computers solving a well-established hard computational problem, such as factoring large numbers or simulating large-sized molecules. Such demonstration will most likely need a fault-tolerant quantum computer, which will not be available in the near future. Thus, a lot of attention has been focused in the last years on quantum advantage proposals based on sampling from the outcomes of random quantum circuits, a task considered achievable. This effort culminated in landmark experiment of [8]. and its more recent followups [57,58,59].
The classical hardness of computing the outcome probability of random circuits has been reduced to standard complexity-theoretic assumptions in various settings [30,14,39,41,16,3,17,27]. For instance, in [14] the authors prove that it is P hard to compute the exact probability of the outputs of random quantum circuits for a fraction of 3 4 + poly(n) −1 of instances of random quantum circuits on n qubits. This result can be extended to devices with very low noise by assuming a couple of widely-accepted conjectures. Despite this significant progress in putting the classical hardness of sampling from a distribution close to the outputs of the random circuit on solid grounds, equivalent hardness statements are not known to hold for the levels of noise that affect current quantum computing architectures. Moreover, certifying closeness to the ideal distribution in total variation distance requires an exponential number of samples [29]. Thus, it is both not feasible to verify closeness in total variation, and the actual distance is unlikely to be in the regime of current quantum advantage experiments.
These shortcomings have shifted the interest to benchmarks of advantage that are thought to be more robust against noise and that are known to be verifiable with a feasible number of samples, albeit not computationally efficient. Prominent examples are the heavy output generation problem (XHOG) [3,5] and the related linear cross-entropy benchmarking (linear XEB) fidelity [45,13,8]. The recent quantum advantage experiments used linear XEB as a benchmark for the quantum state generated by 50 to 60 qubit devices. However, these approaches have two main drawbacks. First, they require the computation of the probability of sampled strings under the circuit's ideal distribution, which consumes a running time growing exponentially with the system's size. Secondly, the number of required samples grows exponentially with the size of the system for a constant gate error probability [8]. Thus, the linear XEB verification approach requires us to be in the "sweet spot" where both the number of samples needed given the noise level and the size of the circuit are not too large to render the verification impossible. This approach is not scalable to larger system sizes with current levels of noise. Besides, it is still unknown how to reduce the hardness of the heavy output generation problem (XHOG) [3,5,37] to standard complexity-theoretic assumptions.
This difficulty of finding efficient certification protocols and benchmarks for random circuit sampling extends to other proposals of near-term quantum advantage, such as boson sampling [1]. This has sparked interest in simpler sanity checks, such as efficiently distinguishing the output distribution from the uniform and other "easy" distributions [2,19,48,53]. As mentioned in [29], these verification forms are manifestly weaker than certifying the total variation distance and do not preclude the possibility of the device being classically simulable. However, in the setting of random circuit sampling, not even an efficient verification test that allows us to distinguish the outputs from the uniform distribution is known. Furthermore, although efficient verification protocols for quantum computation exist [40,20], they are likely to require fault-tolerance and are beyond what can be achieved with near-term implementations.
Independent of the recent quantum advantage experiment, the development of more efficient certification techniques of quantum advantage that can be scaled with the increasing size of the quantum computer is an area of relevance for nearterm quantum computation [15]. In parallel, it is important to develop a better understanding of how noise reduces the power of quantum computers and how noise affects quantum advantage proposals or near-term applications of quantum devices.
To these ends, in this work, we envision this certification process as an interactive game between two agents, Alice that uses classical computing resources, and Bob that holds a (noisy) quantum computer and wants to convince Alice of its computational advantage. They are both supervised by the referee Robert. To win, Bob has to find functions that allow him to efficiently distinguish the output of his device from every alternative distribution Alice proposes. In turn, Alice needs to propose alternative distributions that approximate the statistics obtained by Bob's quantum computer; otherwise, she loses the game.
Central to our result is the connection between the mirror descent algorithm [54,18] and the proposed framework of the certification game. This allows us to connect distinguishing probability distributions from a target quantum distribution and learning an approximate classical description of the latter. Furthermore, as we will see, mirror descent is particularly well-suited to learning distributions of high entropy, which is the case for NISQ devices and current quantum advantage proposals. Our framework is inspired by a recent result of the authors [23]. There, we show how to use mirror descent, strong data processing inequalities and related concepts to analyse the performance of noisy quantum devices performing optimization. In contrast, this article's main result also holds for noiseless circuits and our overarching goal is to formally link the hardness of verification of quantum advantage proposals and their approximate classical simulation.

Summary of results
We envision a quantum advantage demonstration as a game played between Bob, who is sampling from a (noisy) quantum circuit and claiming that it demonstrates a quantum advantage, and Alice, who is skeptical of Bob's claim and defends that her classical computer can mimic Bob's behaviour efficiently.
As Bob is the person looking to convince the others that his quantum computer has an advantage over Alice's classical device, we place the burden of the demonstration on him. In addition, Bob publicly discloses a description of the hardware and the quantum algorithm his device is implementing. The game consists of different rounds at which Alice can propose an alternative hypothesis to the claim that Bob has achieved a quantum advantage. At the beginning of the game, they both agree on a distinguishability parameter > 0, which captures how close Alice needs to match Bob's result, and confidence probability δ, which captures the probability of the outcome of the game being correct. In what follows, we denote the probability distribution Bob is sampling from by ν.

The quantum advantage game
In what follows we present a framework that captures most of the existing quantum advantage verification protocols to date as an interactive game between players.
At the beginning of the first round, Alice discloses an alternative hypothesis to quantum advantage in the form of a randomized classical algorithm sampling from a given distribution µ 0 (x), for example the uniform distribution. It is then Bob's role to refute Alice's proposal and show that his distribution is at least away from Alice's in total variation distance. As we will discuss in more detail later in Section 3.1, certifying this distance constraint is equivalent to Bob providing a function Alice is then allowed to update her hypothesis to µ 1 (x) given the information gained from the first round of the game and sample from a distribution µ 1 that could potentially satisfy If so, Bob then needs to refute this mock distribution, providing a new witness f 2 . Alice's new distribution then needs to pass both tests for the functions f 1 and f 2 . The game continues with Bob proposing new distinguishing functions f t+1 and Alice mock distributions µ t that approximate all previous expectation values up to . The game ends if one of two players is declared defeated following a set of previously established rules. For example, Alice could concede defeat if she takes too much time to propose a new candidate or sample from it. Similarly, Bob could be forced to acknowledge his defeat if he takes too long to offer a new witness that challenges Alice. In some sense, the rules should be consistent with the process of building community consensus on the validity of a quantum advantage result.
It is important to remark that the condition in Eq. (1) must be checked by a referee Robert, to whom Alice and Bob provide samples at each round. That is, they give Robert enough samples of their distributions to estimate the expectation values by computing the empirical average for the functions f i on the samples. The required number of samples required to be confident that the condition is satisfied up to a small failure probability can be estimated by e.g. an application of Höffding's inequality, as we show later. Note that this guarantees that Alice cannot cheat by using Bob's samples to find better distributions. For instance, if Bob's quantum computer is solving an NP problem, then knowing the samples themselves would give Alice an efficient classical strategy. In order to suppress statistical anomalies, we also make the number of samples depend on the current round. More specifically, the number of samples for round t should be O(t −2 log(tδ −1 )). This choice ensures that the overall probability of an error occurring remains O(δ).
In order for the verification game to be scalable, we may further request that sampling from Alice's distributions, evaluating Bob's test functions f i and the size of the messages sent to Robert to be tasks that need to be achieved efficiently with the resources at hand. In what follows, we define efficient as a consumption of resources that scales polynomially with the size of the problem, i.e., the number of qubits of the quantum computer. But a more at hands definition, where we impose constraints on their size and time of computation justified by the state of the art of classical computing hardware, is also compatible with this framework and most probably be the definition used in any real experimental demonstration. Test functions that are not scalable, such as the XEB used in random quantum circuit experiments, are also contained in our game framework after some modifications. However, our no-go results do not directly apply to them as they focus on efficient functions. Indeed, the non-scalability of benchmarks like the XEB makes it impractical for future quantum computers of larger sizes than today's.
The framework presented above is quite general, capturing most of the existing quantum advantage verification proposals to date. It is natural to ask how to phrase some current quantum advantage tests and attempts to spoof them within our framework. In the examples below we illustrate how to use the formalism to describe the scenario in which we benchmark against supposedly better solutions to NP-complete optimization problems, sampling from random quantum circuits and briefly discuss the case of boson sampling machines.

Verification of NP problems
As an example, let us consider the optimization version of an NP-complete problem, such as MAXCUT on a ∆-regular graph with ∆ ≥ 3: Example 2.1 (MAXCUT). suppose that Bob claims his quantum computer can achieve a better value for an NP optimization problem, say MAXCUT, than Alice's classical computer. Recall that for a graph G = (V, E) with n vertices and maximum degree ∆, MAXCUT of the graph can be cast as finding the maximum over {0, 1} n of the function Here, the normalization n∆ ensures that 0 ≤ f (  (2) implies that an additive error on approximating the expectation value of f G implies a multiplicative error of order for the cut's value.
As exemplified above, for NP optimization problems, there is a clear choice for which function Bob should propose and it can be computed in polynomial time.
At first sight, the possibility of the game always requiring an exponential number of rounds seems a plausible outcome. However, there is an update rule for Alice's distribution that will lead to the game having at most O(n −2 ) rounds, where n is the number of qubits of Bob's device, as we explain below. Note that we do not claim that this update rule will always lead to Alice winning, only that it will define a finite series of probability distributions that converge to the one the quantum device. The key question is whether Alice can sample from those explicit distributions efficiently or not. Interestingly, below we will show that this leads to a successful strategy against random circuits under the condition Bob provides the efficient functions f t .
This update rule uses the connection between our certification game and mirror descent with the von Neumann entropy as potential [18], a method to learn probability distributions by approximating them by a sequence of Gibbs distributions. In a nutshell, Alice can exploit each test function f t that Bob provides to improve her guess of the distribution ν. The updates are of the form µ t+1 ∝ e log(µt)− 4 ft . She can use her method of choice to sample from the Gibbs distribution, such as rejection sampling. One can then show that at every round of the game, Alice's gets closer to the ideal distribution by at least a finite amount, converging to µ t being -close to the ideal quantum distribution ν in a finite number of rounds. In fact, regardless of the distribution Bob is sampling from, if Alice chooses to use mirror descent to update her distribution, then it follows from standard properties of mirror descent that the game will end after at most 8n −2 rounds. We explain this in more detail in Section 4 and refer to Appendix A for a discussion and proof of its basic properties. The caveat is that the knowledge from which Gibbs distribution Alice needs to sample does not guarantee that she can do it efficiently. Let us exemplify this again with MAXCUT: Example 2.2 (MAXCUT continued-mirror descent and simulated annealing). In the same setting as in Example 2.1, one can show that if Alice uses mirror descent to update her probability distributions, her sequence of probability distributions µ t is given by: That is, her strategy will be akin to performing simulated annealing to try to obtain a better value of MAXCUT. This is one of the most widely used methods for combinatorial optimization [35]. If one picks t large enough, µ t is guaranteed to be sharply concentrated around the maximum of f G , but the complexity of sampling from µ t increases accordingly and at some point Alice won't be able to sample from it anymore. We refer to e.g. [26,Chapter 28]

Random Quantum Circuits
Random quantum circuits use a more sophisticated benchmarking strategy based on the linear cross-entropy. Example 2.3 (linear cross-entropy, spoofing it and correlators). The current approach to benchmark quantum advantage experiments based on sampling from random quantum circuits is the linear cross-entropy [45,8]. Given the outcome distribution of the ideal circuit ν and another distribution µ, its value is given by: We discuss this metric thoroughly in Sec. 5, but roughly speaking the goal of this benchmark is to sample from a distribution µ that achieves F XEB (µ) > 0. Note that it corresponds to the expectation value of the function In principle, the function defined in Eq. (4) does not fit our framework, as it could in principle take values larger than 1. However, as we explain in Appendix. B, under some assumptions that are believed to hold for outputs of random quantum circuit it is possible to show that the suitably cut-off function for r = O(1) can be used to approximate the value Eq. (3). Furthermore, in Prop. B.2 we show that the function in Eq. (5) can also be used to distinguish the output of the circuit from the uniform distribution. Thus, we see that this commonly used benchmark also fits our framework and Bob could propose the variation of the linear cross-entropy in Eq. (5) during the first round, although it is not efficiently computable.
Recently, tensor network contraction techniques have been proposed to spoof this benchmark, which would correspond to Alice passing the first round of the game if Bob proposes the function in Eq. (5). Let us now show how our framework could be used to provide Bob with extra functions to win against the approach championed in [46]. Roughly speaking, in that paper the authors fix the outcome of k out of the n qubits to some fixed output, say |0 ⊗k , and then search for strings with higher than average probability under ν in the space of strings with those outcomes fixed. As fixing some outcomes significantly reduces the computational cost of computing outcome probabilities, the authors are then able to generate many samples which have an expectation value for the linear cross-entropy that is close to the value reported in [8]. If the authors of [46] were playing Alice with the strategy outlined in that paper, then Bob could resort to a simple strategy to distinguish his distribution from Alice's: using correlators. Let i be one of the k qubits always set to |0 . We then let the function for the second round be given by f 2 (x) = 1 if x i = 0 and 0 else. If Bob is sampling from the output distribution ν of a random quantum circuits, it will be the case that E ν (f 2 ) 1 2 up to exponentially small corrections with high probability, whereas for Alice's distribution µ 0 we have E µ 0 (f 2 ) = 1. Thus, this way Bob can easily distinguish his distribution from Alice's and protect himself from spoofs based on strategies like that of [46].

Gaussian Boson Sampling
In the context of Boson sampling, correlators have been championed as a benchmark of the quantum advantage certification of the devices [48]. That is, one computes some k-point correlation function of the ideal outcome distribution and compares it to the output of the device. Such tests easily fit into our framework. To see this, suppose we wish to consider a 2-point correlation function on the first two bits. In that case, we could just pick the function f (x) = δ x 1 ,x 2 , which satisfies the conditions discussed before. Applying mirror descent to the case of the correlators then gives rise to a classical Gibbs state that reproduces the local correlators of the ideal distribution. Interestingly, this strategy was recently used in [55], where the authors observed that already fitting to some few-body correlators seems sufficient to obtain a better approximation in total variation to the true distribution than the noisy quantum device of [58].

Summary and discussion
Thus, we see that our framework is able to recover many of the strategies currently used in the literature to benchmark quantum advantage proposals, besides also giving advice as to how to refute spoofing strategies. Moreover, the mirror descent approach can also give rise to competitive spoofing techniques, as observed in [55].
However, it is important to notice that our framework does not cover the most general efficient procedure to distinguish probability distributions. Indeed, our framework only includes procedures that use the empirical averages of single samples to distinguish distributions. Such a setting is very close in spirit to that of statistical queries [34,50]. However, a more general efficient procedure could apply an efficient function that depends on a polynomial number of samples to try to distinguish the distributions. In Appendix E we discuss possible extensions and limitations of our results in this direction.

Main results
As we anticipated, this framework of quantum advantage certification allows us to prove three main results on the impossibility of Bob winning using efficiently computable test functions, a connection between the HOG conjecture and the indistingushability from uniform distribution and an analysis of the effects of hardware errors on a quantum advantage verification protocol.

Bob can not win with efficient distinguishing functions
Our first result is that for random circuits, we are only required to play a number of rounds that scales like O( −2 ). Moreover, Bob never wins if Alice plays mirror descent, = Ω(log(n) −1 ) and the distinguishing functions can be computed efficiently.
From a high-level perspective, Theorem 2.1 below states that if Bob can always efficiently find distinguishing functions and they can be computed efficiently, then Alice can also find and sample from a high-temperature Gibbs state that is close to the ideal distribution. Note that in this work we do not come up with such a strategy for Bob, but rather explore the consequences of the existence of such a strategy to understand the limitations and connections of verification and simulation of random quantum circuit experiments. Theorem 2.1 (Alice approximately learns ν after −2 rounds for random circuits, informal version of Thm. 4.1). Let ν be the probability distribution of the outcome of a random quantum circuit on n qubits stemming from a 2 −2n−1 -approximate two design and > 0 be given. Suppose that Bob succeeds in providing functions f 1 , . . . , f T that can be computed in polynomial time and distinguish ν from a sequence µ 1 , . . . , µ T of distributions that Alice discloses, with T the maximal number of rounds at most O( −2 ). Then there is an algorithm that allows Alice to learn a distribution µ T +1 exploiting the revealed information on f t that can be sampled from in time e O( −1 ) . Moreover, µ T is close in total variation distance to ν.
Note that we can efficiently sample from the output distribution as long as = Ω(log(n) −1 ). We will prove this result in Thm. 4.1, but it is intimately connected to the fact that the output distributions of random quantum circuits are very "flat", as the probability of the outcomes is mostly of the order 2 −n . For such distributions mirror descent converges very fast and we will see that they are well-approximated by high temperature Gibbs states. On the other hand, for the optimization problems like MAXCUT we expect good solvers to have outcome distributions that are highly concentrated on low energy strings. In contrast with very flat distributions, mirror descent converges slower for such concentrated distributions.
An important corollary of our theorem is that either the hardness conjectures of random quantum circuits are not valid for distances = Ω(log(n) −1 ) or a complete certification strategy for Bob, providing a discrimination function for every guess of Alice, is impossible with polynomial resources. Given the wide range of results that establish the hardness of sampling from random quantum circuits requiring slightly stronger assumptions than our result, we believe that our results indicate that efficient and scalable certification of random circuits in terms of empirical averages of functions is not possible.

Distinguishing from uniform would invalidate HOG conjecture
Our second result concerns a connection between the hardness of fooling the XHOG problem and distinguishing the output of a random circuit from the uniform distribution. We refer to Sec. 5 for a precise definition of the XHOG problem.
There we also show that if the conjectures related to the hardness of fooling the XHOG problem are true, not even distinguishing from the uniform distribution in polynomial time should be possible. Thus, although it might be possible that Bob can only efficiently distinguish during the first rounds, before mirror descent converges as in Thm 2.1, this suggests that even the first round might be difficult to win if we restrict to efficient strategies. Thus, Bob will have to resort to verification strategies that take super-polynomial time to demonstrate a quantum advantage within our game. More precisely, in Section 5 we prove the following result.
where ν is the outcome distribution of a random quantum circuit stemming from a 2 −2n−1 -approximate two design in n qubits. Then there is an algorithm that samples from a distribution that fools XHOG up to using O( −2 ) evaluations of f in expectation.
One possible criticism of the above framework is that it might be in general hard to distinguish the outcome of any circuit stemming from a random ensemble of circuits from the uniform distribution. However, this is not true, as we show in Appendix F that in case Bob is sampling from a randomly generated stabilizer circuit, Alice can easily fool XHOG.

Effects of hardware errors
All the results above concern the outcome distribution of the ideal circuit. In Sec. 6 we extend our results to the approximate simulability of the outcome distribution of noisy devices. We show that, under doubly-stochastic noise, the number of rounds of the verification game when Alice uses mirror descent decreases exponentially with the depth of the circuit Bob is implementing. As we believe these results are interesting beyond quantum advantage proposals and apply to the broader topic of classical simulability of noisy circuits, we state them in more general terms. Below we state a specialized version of our main result regarding the complexity of approximating the statistics of outcomes of noisy circuits, Theorem 6.1: Theorem 2.3 (Informal version of Thm. 6.1). Let ν be the outcome distribution of a noisy quantum circuit on n qubits of depth D affected by local depolarizing noise with rate p after each gate, measured in the computational basis. Given and > 0, mirror descent will converge to a distribution µ T satisfying: As shown in the recent [23], which we discuss in more detail shortly, this restrains the power of noisy quantum computers to demonstrate a significant advantage versus classical methods for more structured problems. Let us exemplify this with the noisy MAXCUT example: Example 2.4 (MAXCUT continued-noisy circuits). Let us exemplify the consequences of Theorem 2.3 to approximating MAXCUT on a noisy quantum device. Suppose that Bob's device suffers from local depolarizing noise with rate p and consists of a circuit of depth D. In this scenario, Alice will be able to obtain an expected value of MAXCUT that is close to Bob's by sampling from the distribution µ t given by: That is, the noise decreases the inverse temperature β we have to go when performing classical simulated annealing to obtain comparable results.
As is discussed in more detail in [23], results like the one above can be used to rigorously establish maximal depths before noisy quantum devices are not outperformed by polynomial time classical algorithms. But the main message of the example above in our context of verification is that if there are clear candidate functions to distinguish the output of the noisy quantum circuit, then the noise will make it easier for Alice to simulate the output of the device, as one would expect. We refer to Section 6 for a derivation of this bound and a more detailed discussion of its consequences.

Preliminaries
We will now introduce some basic definitions and notation together with the concepts of mirror descent and rejection sampling, which are relevant to our work.

Notation
Probability distributions on binary strings: Given two probability distributions µ, ν on {0, 1} n , we define their total variation distance ν − µ T V as: Moreover, given a function f :

Distinguishability measures for quantum states and unitary designs:
we are also going to need other distinguishability measures for distributions and quantum states. We will introduce them only for quantum states and note that the corresponding classical definition is obtained by considering the classical probability distribution as a diagonal quantum state. For two quantum states ρ, σ ∈ M 2 n we define their relative entropy to be: if kern ρ ⊂ kern σ and +∞ otherwise. Moreover, we define the α−Rényi entropies S α for α > 1 to be given by: and the von Neumann entropy to be S 1 (ρ) = S(ρ) = −tr (ρ log(ρ)). Note that we have: Let us also set our notation and terminology for random quantum circuits.
Given a distribution τ on the unitary group on n qubits, U (2 n ), and t ∈ N, we define G (t) τ : M 2 tn → M 2 tn to be the quantum channel: τ is then said to be an -approximate t-design [7] if where · is the diamond norm and µ G is the Haar measure on the unitary group. Moreover, given C distributed according to τ , we will always denote by ν the probability measure we obtain by measuring C |0 in the computational basis, i.e.

Distinguishing distributions
The total variation is widely accepted as one of the most natural and operationally relevant measures of distinguishability for two probability distributions. One of the reasons for that is its dual formulation. One can show that: Thus, it quantifies by how much the expectation values of two functions can differ on the two distributions. Moreover, defining S = {x ∈ {0, 1} n : µ(x) ≥ ν(x)} and letting χ S be the indicator function of S, it is easy to see that: That is, we can restrict to differences of indicator functions in Eq. (6).
The total variation distance also has an operational interpretation in terms of distinguishability of two distributions. Indeed, consider the scenario in which with probability 1 2 we are given a sample from µ and with probability 1 2 we are given a sample from ν. Then once can show that the optimal probability of guessing correctly from which distribution the sample came from is given by Furthermore, the optimal strategy consists of responding µ if the sample was in S and ν otherwise. Thus, we see that the total variation distance naturally allows us to quantify the distinguishability of two distributions in the one-shot setting. However, if we have access to m samples of the distribution instead of one and have to distinguish them, then the success probability is then µ ⊗m − ν ⊗m T V . The characterization given in Eq. (6) can also be used in yet another way to distinguish probability distributions given access to multiple samples. Suppose we have a witness function f that the total variation distance between µ and ν is at least , i.e.
We can then use the empirical average w.r.t. to f to distinguish the distributions. To see why, given samples X 1 , . . . , X s from µ and Y 1 , . . . , Y s from ν, it follows from Hoeffding's inequality that: with probability of at least 1 − δ as long as Thus, we can check if the empirical average of the samples is closer to E µ (f ) or E ν (f ) and use this as criterium to chose from which distribution we think the samples came from. A simple application of the triangle inequality demonstrates that this strategy will succeed with probability at least 1 − δ. Thus, we conclude from Eq. (9) and the discussion above that as long as −2 log(δ −1 ) = O(poly(n)), polynomially many samples and evaluations of the function f are sufficient to certify that two distributions are at least at a certain distance in total variation and distinguish them. Of course, this in no sense discards the possibility that finding the distinguishing function f itself or evaluating it may not be possible in polynomial time.
The discussion above allows us to estimate the number of samples we need to provide at each round of the game to ensure that the probability of a deviation greater than from the target is upper bounded by 1 − O(δ) for some δ. As at each round t we have to estimate t expectation values up to , obtaining O( −2 log(tδ −t )) samples for each round ensures that the probability one of them deviates by more than is at most δ t . By a union bound, the probability that there was a deviation after T rounds is at most for δ ≤ 1 3 . Thus, letting the number of samples per round grow like t log(tδ −1 ) is enough to ensure that the probability of an error occurring at some point remains of order δ.

Discussion on generality of the model
This set of strategies to distinguish probability distributions is closely related to the statistical queries model [34,50]. In this model to learn or distinguish distributions, one is not given access to samples from a distribution ν. Rather, one is given access to an oracle that is also specified by a precision parameter > 0. When queried with a function f ∈ F , the oracle returns an estimate e f satisfying |e f − E ν (f )| ≤ . Thus, in some sense we can say that in our game it is Bob's task to distinguish his distribution from Alice's in the statistical query model. However, as discussed in more detail in Appendix E, some of our results generalize to the case where the distinguishing functions f do not act on one sample, but rather a block of samples.
Note, however, that this is not the most general model to distinguish two probability distributions efficiently given samples. Indeed, one could consider more generally the scenario where we are given polynomially many samples of the distribution and can act on all of them simultaneously with a function that can be computed in polynomial time. Proving the impossibility of distinguishing two distributions in such a scenario is a daunting task, as discussed in more detail in Appendix E, and is out of reach of the results of this manuscript. Nevertheless, we stress that our results do apply to the strategies encountered in the literature.

Mirror descent
Mirror descent with the von Neumann entropy as potential [18,54] is an optimization and learning algorithm to approximate probability distributions efficiently and in a structured way through a series of Gibbs probability measures. It allows us to formally connect the problem of distinguishing probability distributions and learning them. That is, given some target distribution ν on {0, 1} n we wish to learn, say the output distribution of a given random quantum circuit, mirror descent is an iterative procedure that proposes a sequence of µ 0 , . . . , µ T of guesses if Given f t then 6: Update the guess.

7:
end if 8: if no such function exists then 9: Return µ t 10: break loop 11: end if 12: end for 13: Return µ T and exit function Current guess is indistinguishable from ν 14: end function for ν. Furthermore, the initial distribution µ 0 is the uniform distribution U. The algorithm requires us to find functions for some given distinguishability parameter > 0. Note that we may assume without loss of generality that the equation in (10) holds without the absolute value, as if the inequality holds in the reverse direction we can just pick −f t instead. One can now appreciate the direct connection between mirror descent and our verification game. Of course, it is a priori not clear how to find such functions in a traditional mirror descent application. In the certification game, this problem is overcome by having the responsibility to provide f on Bob's side. Also note that if no function f t exists that satisfies (10), then ν − µ t T V ≤ by the dual formulation of the total variation distance in eq. (6).
As outlined in Algorithm 1, mirror descent works by updating the probability measure as: where is the partition function. As we update the distributions, the candidate distributions µ t become closer and closer to the target distribution, as made precise by the following lemma: Lemma 3.1. The distributions µ t of the algorithm 1 satisfy: where U is the uniform distribution.
Eq. (12) is a standard property of mirror descent [18]. We give a simplified proof and discuss basic properties of this algorithm in Appendix A. Also note that in principle we can "recycle" distinguishing functions. That is, if Alice updates her guess a few times, it could be the case that her distribution µ t does not satisfy for some previously disclosed f i . In this case, she can update in terms of f i again until all previous expectation values also agree. This version of the algorithm is given in Algorithm 3 of Appendix A.
Exploiting the direct connection between the verification protocol and mirror descent, we can directly use lemma 3.1 to bound the number of rounds of the game in terms of S (ν U). We then immediately obtain: Theorem 3.1. The output of algorithm 1 satisfies: after at most T ≤ 8 −2 S (ν U) + 1 iterations.
Proof. If we break the algorithm at Line (9), then, by the variational formulation of the total variation distance we have that Eq. (14) holds. To see that this must happen after at most 8 −2 S (ν U) + 1 steps, note that by Eq. (12) we have the relation .
Thus, a total number of iterations T that is larger than 8 −2 S (ν U) + 1 would contradict the positivity of the relative entropy.
Note that Eq. (15) ensures that we make constant progress in relative entropy at each iteration of the algorithm. Theorem 3.1 implies that if Bob provides a sequence of functions f 1 , . . . , f T +1 that allow distinguishing ν from the sequence µ 0 , . . . , µ T of at most O( −2 S (ν U)) distributions up to an error , then we can also find a distribution that is close to it in total variation distance. Furthermore, as we will show later, it is possible to use this connection to the relative entropy to quantify the effect of noise on the complexity of learning the distribution.

Rejection sampling
Let us now show one way how to generate samples from µ t and the underlying complexity. We will use the standard technique of rejection sampling described in Algorithm 2.
We refer to [Appendix B.5] [38] for a brief review of its properties. In rejection sampling we sample indirectly from a target distribution µ t by first generating a sample x from an easy to sample distribution γ(x) and accepting the sample with probability µ t (x)/(M γ(x)), where M is a constant such that the ratio is bounded by 1. It is a standard fact that rejection sampling will output a sample from µ t after M runs in expectation, as the probability of rejection follows a geometric distribution with parameter M −1 . In the case of Gibbs distributions a common choice for γ is the uniform distribution and M t = 2 n Zt , where Z t is once again the partition function. Note that for this choice of M t , we have that: as we may assume without loss of generality that H t (x) ≥ 0 for all x ∈ {0, 1} n . In particular, note that with this choice, we never have to compute the partition function Z t to run rejection sampling, only H t (x). Thus, we conclude that the complexity of running one round of rejection sampling is the same as computing H t (x). Let us now estimate how many rounds are required in expectation before we accept a sample: This implies that We conclude from the last inequality that which yields the claim.
We see that as long as t = O(log(n)), then we can sample from µ t in a polynomial expected number of trials and evaluations of H t .
In practice, rejection sampling is not necessarily the most efficient way of simulating probability distributions and other techniques to sample from a Gibbs distribution such as Glauber dynamics or simulated annealing [38] perform better. However, rejection sampling allows for a simple analytical analysis, which is more challenging for more refined techniques.

Random quantum circuits
Let us now discuss the implications to the verification of quantum advantage proposals based on sampling the output distribution of random circuits. The key technical assumption behind various state-of-the-art classical hardness proofs for quantum advantage proposals is the property that the underlying ensemble is an approximate two design [28]. Thus, we will also depart from this assumption. We then have: Lemma 4.1. Let ν be the probability distribution of the outcome of a random quantum circuit on n qubits stemming from a 2 −2n−1 -approximate two design. Then, with probability at least 1 − δ, we have: Proof. We refer to Prop. C.1 in Appendix C for a proof.
Similar statements were shown in [29,2]. From this, we have:

Theorem 4.1 (Distinguishing output distributions and classical simulability).
Let ν be the probability distribution of the outcome of a random quantum circuit on n qubits stemming from a 2 −2n−1 -approximate two design and > 0 be given.
Suppose that we can distinguish ν from a sequence µ 1 , . . . , µ T of distributions that can be sampled from in polynomial time. Moreover, we can distinguish them by functions f 1 , . . . , f T that can be evaluated in polynomial time. That is: with f t computable in polynomial time. Then, with probability at least 1 − δ, we can find distributions µ t satisfying: and sample from it in time O(e c poly(n)) = O(poly(n)). In particular, if T = O( −2 ), then the output distribution µ T will also be close in total variation distance to the target.
Proof. As stated in Lemma 4.1, we have that with probability at least 1 − δ Conditioned on the event above, it follows from Thm. 3.1 that mirror descent outputs a distribution satisfying Eq. (17) after at most iterations, or equivalently after that many game rounds. Now, at each iteration t of mirror descent, we need a function satisfying Eq. (16). Moreover, we have that Thus, if all the f i can be computed in polynomial time, then it follows from Lemma 3.2 that we can also sample from µ t using rejection sampling in polynomial time. This is because Lemma 3.2 implies that we need at most exp 2(log(3) + log(1/δ)) + 4 rejection sampling rounds, in expectation. As each round of rejection sampling requires us to evaluate the functions f i once and we suppose that they can be evaluated in polynomial time, this gives the claim.
Therefore, if Bob provides for every proposed distribution µ t of Alice a polytime computable function f t that distinguishes it from ν, after at most a constant number of rounds Alice will be sampling efficiently from an approximate distribution. It is interesting to point out that the certification game and the sampling of Alice remains efficient, even if we relax the condition of Lemma 4.1 to S(ν) ≥ n − O(log(n)) or request to decrease with the size n of the quantum device with scaling = O(log(n) −1 ).
A direct consequence of our result is that if the hardness conjecture of random quantum circuits is true, then Bob must fail to provide a certification function that is efficiently computable at some stage of the certification game. A natural question would then be to ask at which stage Bob will fail to provide such a function. In the following section, we will prove that if the XHOG conjecture [5] is correct, Bob must fail at the first round of the game, i.e., even distinguishing the output distributions from the uniform distribution cannot be done in polynomial time.
We note that these results have important differences from the results in [2, Appendix 11]. There the authors show the existence of a high min-entropy distribution that can be sampled from classically and is indistinguishable from the random quantum circuit by classical circuits of polynomial size. This is because in our case we have the guarantee of a good approximation in total variation distance, i.e. the distributions are indistinguishable under any function after a couple of iterations. Another difference is that, given the distinguishing functions, our framework allows for finding the probability distribution that approximates the random circuit. Moreover, if the distinguishing functions are given and can be computed efficiently, then the outcome distribution can also be sampled from efficiently. However, to the best of our knowledge, the aforementioned result does not give an algorithm to find such an approximate distribution. Finally, our framework allows us to work with the Shannon entropy instead of the min-entropy. The min-entropy is notoriously more difficult to bound and always smaller than the Shannon entropy.

Distinguishing from the uniform distribution
To the best of our knowledge, the state-of-the-art approach for the verification of quantum advantage proposals based on random circuit sampling is the linear cross-entropy heavy output generation problem (XHOG) [5], which is closely related to the linear cross-entropy benchmarking (linear XEB) fidelity F XEB [45,13,8]. The XHOG refers to the problem of, given some circuit C, generating distinct samples z 1 , . . . , z k such that: for some b > 1 with probability at least s = 1 2 + 1 2b and k satisfying: . (19) Note that, given the samples z 1 , . . . , z k , verifying that they indeed satisfy eq. (18) requires us to compute the probability of the outcomes under the ideal circuit. In turn, the linear cross-entropy fidelity for a distribution µ, F XEB (µ), as defined in [45,13,8], is given by: where we interpreted the probability distribution ν as a function on {0, 1} n that outputs the corresponding probability ν(x). The linear cross-entropy can also be formulated as where f ν is given by f ν (x) = 2 n ν(x). Although such a function does not immediately fit our framework, as it may take values higher than 1, in Appendix B we show how to approximate it by a bounded function. The underlying intuition is that as ν is very flat for random quantum circuits, for very few inputs the function f will take values that are not of constant order. Thus, as long as the measure µ is not too concentrated on strings of high value, it is possible to cut-off the function f without significantly changing the expectation value. A simple manipulation then shows that samples z i from µ satisfy In [5], the authors relate the complexity of computing outcome probabilities of random quantum circuits to the XHOG problem. More precisely, the authors start by assuming that there is no polynomial-time classical algorithm that takes as input a (random) quantum circuit C and produces an estimate p of p 0 = P[C outputs 0] such that where the expectations are taken over circuits C as well as the algorithm's internal randomness. They then show that this conjecture implies that there is no polynomial time algorithm that solves the XHOG problem. As the verification of XHOG requires us to estimate the outcome probabilities, this path to proving and verifying the hardness of the sampling task also implies that XHOG is not verifiable in polynomial time. But the hardness of XHOG imposes barriers to even more basic verification tasks. As we will see now, the hardness of XHOG would imply that it is impossible to efficiently distinguish the output from the circuit from the uniform distributions. In turn, efficient distinguishability implies a polynomial time algorithm to spoof XHOG. Therefore, Bob will have to resort to verification strategies that take superpolynomial time to demonstrate a quantum advantage in our game. It should not be surprising that fooling XHOG is related to distinguishing from the uniform distribution, as both tasks require us to identify higher-than-average probability strings. What is particular to the case of random circuits is the fact that distinguishing implies we can also sample from a distribution that fools XHOG. The proof of the statement will once again rely on the fact that the output distribution is essentially flat. We will start by showing that any distribution with large 2−Rényi entropy cannot have small sets of large mass in the following sense: Proof. Note that the condition S 2 (ν) ≥ n − log(c) is equivalent to Moreover, we have To see the last inequality, note that, by the concavity of the function x → x 2 , Combining (22) with (21) we conclude that: which yields the claim after rearranging the terms.
It then immediately follows that: 1} be a function that for some > 0 satisfies: where ν is the outcome distribution of a random quantum circuit stemming from a 2 −2n−1 -approximate two design on n qubits. Let Then, with probability at least 1 − δ, and Proof. First note that Eq. (23) for some constant c > 0, which yields Eq. (24).
We restricted the result above to functions with binary outputs to simplify the arguments, but we show in Appendix D that this can be done without loss of generality. That is, given a function f that distinguished the distributions for and range [−1, 1], there always exists some f that is binary and has the same properties and distinguishes the distribution up to Proof. Let us start with the statement that samples from U(L) violate XHOG up to at least . To see this, note that: by Eq. (25), where with some abuse of notation we see U(L) as a function that outputs the probability of x under U(L) given x. To sample from U(L), we can once again resort to a variation of rejection sampling. We sample a point x 1 ∈ {0, 1} n from the uniform distribution and compute f (x 1 ). If f (x 1 ) = 1, we output x 1 . If not, we rerun this procedure with a new sample x 2 . It is easy to see that when we accept, x i is uniformly distributed on L. Moreover, the probability of accepting is L 2 n . By Eq. (27), it then follows that the probability of accepting is at least Ω( 2 ), from which we obtain that the expected number of rounds is O( −2 ). As for each round we have to evaluate f once, the claim follows.
It follows that if we can efficiently distinguish the output from the uniform distribution, then we can fool XHOG. In particular, it would follow from the conjectures of [5] that it is not possible to distinguish the output of random circuits from the uniform distribution for at least inverse polynomial in n in polynomial time if XHOG cannot be solved in polynomial time.
Note that the results of this section only required the property that the underlying random circuit ensemble is a two design. However, it is well-known that random Clifford unitaries also are two designs and can still be simulated efficiently classically. It is then natural to ask if finding a function distinguishing the output of a random Clifford from the uniform distribution can be found in polynomial time. As we show in Appendix F, for random Cliffords, the function can be found and be computed in polynomial time.

Noisy devices
Most of the current implementations of quantum circuits have high levels of noise. In principle, highly correlated noise can make simulating the quantum device classically even more complex [36]. However, in other contexts, as demonstrated for boson sampling [49], noise can render the simulation significantly less complex.
Here, we show that in the scenario of doubly stochastic Markovian noise, i.e., quantum channels that map the maximally mixed state to itself, the noise diminishes the complexity of approximating the underlying distribution being sampled from. To see what we mean, let us go back the game described in Section 2. There we considered Bob to have a quantum advantage and win the game if he could find functions f 1 , . . . , f t whose expectation values under his distribution Alice cannot reproduce classically. However, suppose now that Bob's device is affected by noise, say a global depolarizing channel with parameter 0 ≤ p ≤ 1.
One would then expect that as p → 1, it should be easier for Alice to reproduce the statistics of Bob's device and win the game. As we show below, if Alice once again uses mirror descent to find her candidate distributions, then the algorithm will converge faster to a distribution that reproduces the statistics of Bob's distribution as the level of noise increases. For example, for MAXCUT, this will also make it easier for her to sample from the distribution mirror descent proposes, as a smaller number of iterations implies not having to go down to lower temperatures.

Strong data processing inequalities and mirror descent
Let us first recall the following definition: Strong data processing inequalities for doubly stochastic can be derived using the framework of hypercontractivity and logarithmic Sobolev inequalities [33,43,44,31,9] and are known explicitly in some cases. See also [11] for another approach. As shown by other works [6,10,42,23], strong data processing can be used to quantify how useful a noisy quantum device is and for how long it can sustain interesting computations.
Let us illustrate the strong data processing inequality with an example. Let Φ p : M 2 → M 2 be the depolarizing channel on one qubit with depolarizing parameter p, i.e.
The authors of [43] show that: and similar results are available for other relevant noise models. In particular, optimal inequalities have been derived in [33,44] for tensor products of single qubit, doubly stochastic channels. Suppose now that the noisy circuit of interest consists of n qubits initialized to |0 ⊗n , D layers of unitaries U 1 , U 2 , . . . , U D and measurement in the computational basis. However, due to imperfections in the implementation, the state initialization, the measurements and the unitaries are noisy. We will model this by assuming that every layer of unitaries is proceeded by a layer of doubly stochastic quantum channel Φ that satisfies a strong data processing inequality α. Moreover, we will assume that the measurement is also affected by an extra noisy channel Φ. We only make these assumptions to simplify the notation and argument, but it is easy to adapt the argument to different channels at different times and different noise rates. Under the assumptions above, the probability distribution ν describing the outcomes of the noisy device is given by: where U i is the channel given by conjugations with U i and M is the q.c. channel We then have that if we want to approximate the values of k functions, then the number of iterations of mirror descent T required to achieve that decreases exponentially with the noise level. More precisely: Theorem 6.1. Let ν be the distribution defined in Eq. (28), > 0 and assume Φ satisfies a strong data processing inequality with parameter α. Given functions 1], mirror descent will converge to a distribution µ t satisfying: Moreover, we can sample from µ t by evaluating f 1 , . . . , f k at most Proof. Mirror descent will converge to a distribution with the desired properties after 8 −2 S (ν U) iterations, see Prop. A.1 for a proof. Moreover, by Lemma 3.2, the complexity of sampling from µ is bounded by evaluations of the functions f i . Thus, the statement follows if we can bound the relative entropy of the outcome. Note that: as the maximally mixed state gives rise to the uniform distribution when measured in the computational basis. By the data processing inequality: and by our assumption on Φ: The relative entropy is unitarily invariant, thus: Applying the chain of arguments above another D times we conclude that: which yields the claim.
Thus, we see that the complexity of approximate sampling from the output of noisy circuits decreases exponentially with the noise level and depth. For instance, for circuits with local depolarizing noise with parameter p and depth D, the theorem above gives a complexity of: evaluations of the distinguishing functions. Thus, we see that our framework has the desirable feature that it becomes easier for Alice to mock Bob's device as the noise increases. Unfortunately, the scaling with n in the bound above is undesirable for high-entropy distributions. Thus, we plan to derive more specialized bounds in upcoming work. A Basic properties of mirror descent with the Shannon entropy as potential In this section we review some basic properties of the mirror descent algorithm with the Shannon entropy as potential. We start with a simple proof of the update rule behind mirror descent in Lemma A.1. It shows how to obtain a Gibbs state τ 1 that is closer in relative entropy to a target distribution ν departing from a Gibbs state τ 0 and a function that distinguishes the latter from the target distribution.
Proof. We have: By construction, H 1 −H 0 = 4 f and the first term equals 4 E ν (f ). The logarithmic ratio can be bounded using Jensen's inequality: as the function − log(x) is convex. It then follows that We will now show that the expectation values of f on the distributions τ 1 and τ 0 are O( ) close. We can then replace the expectation value over τ 1 by only paying a small price and then use our hypothesis in Eq. (30).
To that end, a direct computation shows that As in Eq. (32), we then can estimate the second term by: By Pinsker's inequality: .
We then see that: Proof. If we exit the algorithm at line 12, then the output satisfies Eq. (35) by definition. Thus, it only remains to prove that this is indeed the case after 8 S (ν U) −2 iterations. But note that Lemma A.1 and the update rules of Algorithm 3 ensure that we have: for all t. Applying a telescopic sum and our initial choice µ 0 = U we see that Proof. The proof is quite standard and simple. It is easy to check that: which is the negative of the variance of the function f under τ λ . Thus, we clearly have that d dλ g(λ) ≤ 0 and the claim follows.

B Distinguishing function from the linear cross-entropy
At first sight, the current verification procedures for random circuits, the linear cross-entropy benchmark or the heavy output generation problem, do not readily fit into our framework. As we will see now, this is not defined as the expectation value of a bounded function. Indeed, define the function where ν(x) is the probability of string x under ν, the output of the ideal circuit.
We have that the linear cross-entropy is given by In principle, the function f could take values between [−1, 2 n −1], whereas our framework required the distinguishing functions to take values in [−1, 1]. However, we will now show that by suitably discarding high values of f and restricting µ to a suitable set of distributions, we can massage the linear cross-entropy into our framework. That is, we will find a bounded function f r that approximates F XEB . Once again, the main property required to show this is the fact that random quantum circuits have very flat outcome distributions.
To prove our claims, we will first assume that the distribution of probabilities of the outcomes is well-approximated by a Porter-Thomas distribution, as explained in detail below. We refer to [13] for a justification of this assumption and numerical evidence of its validity. It is possible to obtain similar but weaker results departing from the assumption that the output is an approximate 3-design. However, for the sake of conciseness, we will restrict to the Porter-Thomas distribution.
The Porter-Thomas assumption is an approximation of the probability that a given outcome string x will have for a family of quantum circuits. More specifically, it assumes that for all strings x, the random variable corresponding to the value of ν(x) under this family of random quantum circuits follows the density κ given by It is not difficult to see that this distribution is highly concentrated around its mean, 2 −n , and that its variance is 2 −2n , as it corresponds to an exponential distribution with parameter 2 −n . We then have: Then for another distribution µ satisfying for some constant C > 0 almost surely for all x such that ν(x) ≥ r2 −n we have: where the expectation is taken over the circuits.
Proof. By the definition of f r (x) we have that By our assumption on the distribution in Eq. (40) we have that Furthermore, by the assumption that the probability of the output strings follows a Porter-Thomas distribution, we conclude that: which yields the claim.
Thus, we see that for distributions that do not differ too much from the distribution of the outcome of the random circuit in the sense of Eq. (40), F XEB can be approximated in our framework. By picking a cut off at log( −2 ) we ensure that the difference between the truncated f r and F XEB only differ by O( ).
Let us now discuss the condition in Eq. (40) in more detail. The condition in Eq. (40) has a natural interpretation for the problem at hand. The goal of Prop. B.1 is to identify conditions under which F XEB is well-approximated by a bounded function. However, if a probability measure µ only satisfies Eq. (40) for large values of C, it means it assigns high probability outcomes of ν even more weight than ν. This in turn will yield higher values for F XEB (µ). However, for outcome distributions that are not strongly concentrated on heavy outcomes, we expect Eq. (40) to hold for moderate values of C. For instance, for the uniform distribution the condition holds with C = 1.
However, it is possible to construct distributions that converge to the true distribution in total variation and for which F XEB (µ) diverges. At the same time, it is possible to construct distributions that are a constant distance away from the ideal distribution in total variation, do not satisfy Eq. (40) and nevertheless satisfy F XEB (µ) = F XEB (ν). We will give the explicit constructions of these distributions shortly. But they showcase that in principle there is no connection between F XEB (µ) and the total variation distance between µ and ν.
Both constructions will exploit the fact that the F XEB is unbounded, as expected. Indeed, if the benchmark we were using were bounded, then at least we can always conclude from a convergence in total variation distance that the expectation values also have to converge.
Thus, we believe that these examples showcase why we cannot expect that F XEB can always be captured in our framework. Whereas our framework is intimately connected to the two distributions being close in total variation distance, this is not the case for similar linear cross entropy. This was also observed in [24], where the authors give additional arguments why the linear cross entropy is not connected with the total variation distance or fidelity in general.
Example B.1 (Distributions close in total variation distance but diverging F XEB ). To construct our examples, observe that it follows from the Porter-Thomas assumption in Eq. (39) that for some given c 1 < 1, we expect 2 (1−c 1 )n strings to have Proof. The proof is similar to the last proposition. We have that: Taking the expectation, the first sum above translates to the integral whereas the second translates to Summing the two expressions yields the claim.
It is not immediately obvious how to maximize the expression in Eq. (44) analytically, but numerically solving it we see that it is around r 3.21, for which we obtain a violation of 0.22. As the expected total variation distance is 1/e 0.36 [13] under the Porter-Thomas assumption, we see that this function is not far from the optimal distinguishing function. Thus, Bob could propose the function f 3.21 to distinguish the distribution of his device and the uniform distribution in the ideal case. Of course, as evaluating f 3.21 requires us to compute outcome probabilities, this is not an efficient distinguishing function. But the results of this section showcase that the linear cross-entropy fits into our framework by introducing a suitable cut-off as long as the underlying distribution does not put too much additional weight on heavy outputs.

C Bound on the Shannon entropy from design property
We will now show that the Shannon entropy of the output distributions of approximate two designs when measured in the computational basis is essentially maximal. This result is similar in spirit to those of [2,29].
Recall that the 2-Renyi entropy S 2 is defined as: and that S(ν) ≥ S 2 (ν). Moreover, the function − log is convex. Thus, it follows from Jensen's inequality that: From the computations above, we have that: from which we readily obtain that: It follows from Markov's inequality that from which the claim follows.

D Auxiliary results for Section 5
In Section 5 we showed that being able to efficiently distinguish the probability distributions arising from sampling from random circuits from the uniform distribution implies the ability to fool the XHOG problem associated to the same class of circuits to a certain level. But we assumed that the function that distinguished the distributions has binary outputs, although our framework for distinguishability allows for functions with outputs in [−1, 1]. We now show that it is always possible to obtain an efficiently computable function with binary outputs from an efficiently function with image [−1, 1] that distinguishes the two probability distributions, at the expense of a smaller distinguishability power.

E Generalizations and limitations of our results
Let us discuss more precisely to what class of verification and distinguishability algorithms our results apply to, how it can be generalized and how it relates to the statistical query model well-known in statistical learning theory [34,50].

E.1 The one-shot model
Most current verification and distinguishability proposals we are aware of in the random circuit literature have a simple structure. They consist of defining a (not necessarily bounded) function like the cross-entropy benchmark and evaluating its empirical average. We call this scenario one-shot as, despite involving an estimation over many samples, its theoretical analysis involve the distribution of a single realization.
As explained in Sec. 3.2, the optimal probability of success for correctly distinguishing two distributions from one sample is bounded for any algorithm by the total variation distance. Thus, if we have that the trace distance between two distributions µ, ν is small, then we can conclude that no algorithm will be able to perform significantly better than random guessing in the one-shot setting.

E.1.1 Comparison to statistical query model
This approach can be naturally cast in the statistical query model [34,50]. In that model, one is not given access to samples of a distribution µ, but one is allowed to query E µ (f ) up to some additive error tolerance > 0 for arbitrary f : {0, 1} n → [−1, 1]. We can see that it is possible to formalize our game in this model, as it is Bob's job to distinguish his distribution from Alice's through he expectaion values of such functions. And, as discussed before, this has a natural interpretation in terms of the succes probability of one-shot distinguishing algorithms.
E.2 A more general framework: multiple copies discrimination However, there is no a-priori reason why we should limit ourselves to the one-shot scenario. We could define more generally efficient distinguishing algorithms that take as input a polynomial number of samples m from a distribution, perform a polynomial-time postprocessing of the data and then outputs a guess.
In this general framework one considers the success probability of arbitrary distinguishing algorithms that take as an input a polynomial number of samples, i.e., µ ⊗m instead of µ for m = poly(n). Unfortunately, our techniques cannot discard the existence of such an efficient distinguishing procedure. Indeed, if there is a polynomial time function f such that for some m ≥ 1 we have that: then we can take O(n 2m log(δ −1 )) samples from the distribution, compute the empirical average of f on them and distinguish the two with probability of success at least 1−δ. As f can be computed in polynomial time, the empirical average can also be computed efficiently and this yields and efficient distinguishing procedure. And our techniques do not discard the existence of an efficient f as in Eq. (52). Although in the main text we only considered the case of m = 1 for our results, it should be noted that our results naturally extend to the settig in which m −1 = O(log(n)). That is, if we are in regime = Ω(1), we can also consider the case in which the distinguishing functions act on a logarithmic number of samples. To see why, note that the proof of Thm. 4.1 relied solely on the fact that with probability at least 1 − δ we have S(ν U) = O(1 + log(δ −1 )) (53) for the output distributions of approximate 2-designs.
If we consider instead m copies i.i.d. samples of the distribution ν, the joint output distribution satisfies S(ν ⊗m U ⊗m ) = mS(ν U) = O(m(1 + log(δ −1 ))) by the additivity of the relative entropy. Thus, as in Thm. 4.1, if we set our error tolerance to be , mirror descent will converge after O(m 2 −2 ) iterations to a distribution µ that approximates ν ⊗m up trace distance . Moreover, sampling from µ using rejection sampling takes O(e m −1 ) evluations of f on average. And from this we obtain that as long as the distinguishing functions are efficient and m −1 = O(log(n)), the whole procedure is efficient and our results still apply.

F Distinguishing the output distribution of stabilizer states
Note that we only assumed in the proofs of Sec. 5 that the underlying circuit ensemble is an approximate two design. It is well-known that circuits being approximate two designs does not imply that one cannot sample from their output distribution efficiently, as is prominently exemplified by Clifford circuits. Random Cliffords are two designs [21,22] and it is possible to simulate measurements in the computational basis efficiently for them [25,4]. We now show that in this case, it is also possible to easily distinguish the outcome distribution from the uniform one, if this is possible at all.
It is not difficult to see that for a Pauli string P = ⊗ n i=1 σ i we have for a Clifford C that tr P C|0 0| ⊗n C † ∈ {−1, 0, 1}. This is because, as Cliffords stabilize the Pauli group, we have thatP = C † P C is again, up to a global sign, a Pauli string. And for a Pauli string tr P |0 0| ⊗n ∈ {0, 1}. Now assume that there exists a Pauli string P consisting only of I and Z Pauli matrices that differs from the identity and such that tr P C|0 0| ⊗n C † = 0.
Then, interpreting diagonal operators as functions, we have that the function f = P +I 2 is a binary function that satisfies: Thus, in this case, we have found a function that efficiently distinguishes the outcome from uniform. But note that in some cases such a Pauli string does not exist, such as if the Clifford is H ⊗n , as then the outcome distribution is uniform.
Let us now discuss how to efficiently find the appropriate distinguishing Pauli string. We refer to [4] for a review of the basics of the stabilizer formalism. First, we recall that a stabilizer state |ψ on n qubits can always be described by n generators g 1 , . . . , g n of its stabilizer group SG(|ψ ). Moreover, note that for a Pauli string tr P C|0 0| ⊗n C † ∈ {−1, 1}.
is equivalent to P ∈ SG(|ψ ) or −P ∈ SG(|ψ ). Thus, by our previous discussion, the problem of finding a function to distinguish the output of the Clifford circuit from the uniform distribution is equivalent to finding a stabilizer of the state consisting solely of Z and I Pauli operators.
Let us now discuss how to achieve this. First, decompose each generator g i as the product of a string of Pauli X and Pauli Z matrices plus a global ±1 phase and represent each one of these as vectors (x i , z i , s i ) in F 2n+1 2 . In order to simplify the presentation, we are not going to keep track of the global phase of the elements of the stabilizer group for now. Thus, we restrict to the vectors (x i , z i ) corresponding to the first 2n entries. It is easy to see that if we do not keep track of the global phase, then multiplying two generators is equivalent to adding the corresponding vectors in F 2n 2 . Now define the n × (2n + 1) binary matrix A with the vectors x i in its rows. We then have: Proof. Note that span{(x 1 , z 1 ), . . . , (x n , z n )} corresponds to the elements of the stabilizer group of the state, up to a global phase. This is because, as discussed before, multiplication in the Pauli group just corresponds to a sum of the vectors, up to the global phase. Thus, if we find a string of Z in the stabilizer group, then it is also in the intersection in eq. (54).
Thus, we can find the distinguishing Pauli operator by a nonzero element of the subspace span{(x 1 , z 1 ), . . . , (x n , z n )} ∩ ({0} × F n 2 ) , which can be done by Gaussian elimination.