Quantum complexity of the Kronecker coeﬃcients

Whether or not the Kronecker coeﬃcients of the symmetric group count some set of combinatorial objects is a longstanding open question. In this work we show that a given Kronecker coeﬃcient is proportional to the rank of a projector that can be measured eﬃciently using a quantum computer. In other words a Kronecker coeﬃcient counts the dimension of the vector space spanned by the accepting witnesses of a QMA veriﬁer, where QMA is the quantum analogue of NP . This implies that approximating the Kronecker coeﬃcients to within a given relative error is not harder than a certain natural class of quantum approximate counting problems that captures the complexity of estimating thermal properties of quantum many-body systems. A second consequence is that deciding positivity of Kronecker coeﬃcients is contained in QMA , complementing a recent NP -hardness result of Ikenmeyer, Mulmuley and Walter. We obtain similar results for the related problem of approximating row sums of the character table of the symmetric group. Finally, we discuss an eﬃ-cient quantum algorithm that approximates normalized Kronecker coeﬃcients to inverse-polynomial additive error.

In this work we revisit a well-known mystery in combinatorics-what do the Kronecker coefficients count?-from the perspective of quantum complexity theory.
The Kronecker coefficients are the analogues of the Clebsch-Gordan coefficients for the symmetric group.In particular, let n ≥ 2 and let ρ µ and ρ ν be irreducible representations of the symmetric group labelled by partitions µ, ν ⊢ n respectively [26].The Kronecker coefficient g µνλ is the multiplicity of the irreducible representation ρ λ in the tensor product representation ρ µ ⊗ ρ ν : where the ≃ stands for isomorphism.Although we will not need it here, we note that a related notion of stretched Kronecker coefficients [27] plays an important role in the study of the quantum marginal problem [9,10,22].The definition Eq. ( 1) of the Kronecker coefficients as multiplicities ensures that they are nonnegative integers.But it is a longstanding open problem in algebraic combinatorics-Problem 10 on Stanley's list [40]-to find a combinatorial formula for them.That is, do the Kronecker coefficients count some natural set of combinatorial objects?Let us interpret "natural" as any set of objects where the description size is polynomial in n and such that membership in the set can be verified efficiently using a classical computer.In this way we are led to the complexity-theoretic question [7,15,16,[35][36][37]: does g µνλ admit a #P formula, i.e., does it count the number of accepting witnesses of an NP verifier?
It will be convenient to define the problem of computing the Kronecker coefficients as follows.Here, and in other computational problems defined below, the input partitions µ, ν, λ ∈ S n are given in unary so that the input size is O(n) [28].
There is little doubt that ExactKron is an extremely hard computational problem.It is known that any problem in #P can be reduced in polynomial time to ExactKron [15][29], and that Exac-tKron is contained in the class GapP [7] of functions that can be expressed as the difference f − g of two functions f and g in #P [11].In this sense, the Kronecker coefficients are as hard as #P, but also not much harder.Pinning down their complexity is therefore entirely concerned with the sliver of daylight between #P and GapP.Why should we care?
Firstly, as discussed above, if ExactKron is contained in #P then this would resolve a significant open problem in combinatorics by showing that Kronecker coefficients count the elements of an efficiently verifiable set.A second important (though less direct) consequence has to do with the complexity of approximating Kronecker coefficients to within a given relative error.
Problem 2 (ApproxKron).Given µ, ν, λ ⊢ n and ǫ = Ω(1/poly(n)), compute an estimate g, such that: This problem is at least as hard as deciding if g µνλ > 0, which has been recently shown to be NP-hard [15].It is also no harder than ExactKron.In order to discuss its complexity in more detail, we now review some facts about the relationship between exact and approximate counting problems more generally.
Some problems in GapP are just as hard to approximate as they are to compute exactly (with respect to polynomial-time reductions).This is the case, for example, for the problems of computing output probabilities of polynomial-size quantum circuits [13], or computing the squared permanent of a real matrix [1], or computing the square of a given irreducible character of the symmetric group [17].Approximating these quantities to within a given relative error is #P-hard.On the other hand, Stockmeyer has shown that the hardest functions in #P are vastly easier to approximate assuming a standard conjecture in complexity theory [41].In particular, if a function is contained in #P, then it can be approximated to a given relative error using a polynomialtime randomized algorithm that has access to an NP oracle, i.e., in the class FBPP NP .Problems in this class cannot be #P-hard unless the polynomial hierarchy collapses, which is believed to be very unlikely.
So far we have considered two classes of counting problems-GapP and #P (which are polynomialtime reducible to one another) as well as the approximation tasks associated with them (which are unlikely to be polynomial-time equivalent).A central message of this work and Ref. [5] is that in between these two extremes there is a rich class of approximation tasks associated with a third type of quantum counting problem.
By analogy with the definition of #P, Refs.[6,39] defined the class #BQP of functions that can be thought of informally as counting the number of accepting witnesses of a QMA verifier.Here QMA is a quantum analogue of NP-a class of problems for which yes instances can be verified with high probability using a polynomial-sized quantum computation.A quantum verification circuit C takes as input a quantum state |ψ as well as some number a of ancilla qubits in the |0 state.At the end of the circuit the first qubit is measured and the circuit accepts the input state |ψ if and only if the outcome 1 is observed.This occurs with probability For any quantum verification circuit we define the POVM element corresponding to the accept outcome and for q ∈ [0, 1] we define N q to be the number of eigenvalues of A that are at least q (informally, the number of witnesses accepted with probability at least q).#BQP is the class of problems that can be expressed as: given a quantum verification circuit with an n-qubit input register and total size poly(n), along with two thresholds 0 < b < a ≤ 1 satisfying a − b = Ω(1/poly(n)), compute an estimate N such that N a ≤ N ≤ N b .If we are assured that there are no "mediocre witnesses" [6], i.e., eigenvalues of A in the interval [b, a), then N = N a is the number of witnesses accepted with probability at least the given threshold acceptance probability a.We note that this definition of #BQP, allowing for a "grace interval" of miscounted witnesses [6], was suggested in Ref. [6] but passed over in favor of a slightly different definition.Though our results do not rest on this technical choice, we find the above to be the most natural definition for our purposes (see the Supplementary Material for more details).
The corresponding class QXC of quantum approximate counting problems [5] is then the approximation version of #BQP.Here the goal is to approximate the number of accepting witnesses of a QMA verifier within a small relative error.That is, given an n-qubit quantum verification circuit of size poly(n), an error parameter δ = poly(1/n) and two thresholds 0 Quantum approximate counting was studied in Ref. [5] where it was shown that a wide class of problems that arise naturally in quantum many-body physics are equivalent to QXC under polynomialtime reductions [30].These include the problem of approximating the partition function of a quantum many-body system described by a local Hamiltonian (to within a given relative error), as well as the problem of computing expected values of local observables in the thermal (Gibbs) state at a given temperature (to within a prescribed additive error).Despite the centrality of these problems in physics, the complexity of quantum approximate counting is largely an open question.The main challenge is that there does not appear to be a natural quantum generalization of Stockmeyer's approximate counting method (a similar obstacle was encountered in attempting to generalize the Valiant-Vazirani theorem [2,18]).All we can say is that quantum approximate counting is at least QMA-hard [31] and at most #P-hard (because quantum exact counting is as hard as classical exact counting [6]).Nevertheless we conjecture that quantum approximate counting is not #P-hard-i.e., that it defines an intermediate class that lies somewhere between classical approximate counting and #P.Tab.I summarizes the TABLE I: Three classes of counting problems that are polynomial-time reducible to one another.The associated approximation problems are very unlikely to be polynomial-time equivalent.Classical counting problems in #P can be approximated within the third level of the polynomial hierarchy via Stockmeyer's approximate counting algorithm.In contrast, some problems in GapP can be #P-hard to approximate.Quantum approximate counting problems lie somewhere between these two extremes.
three types of counting problems discussed above, and their approximation versions.
In this work we describe an efficient quantum circuit that measures a projector with rank d µ d ν d λ g µνλ .Since the dimension d ω of any irreducible representation ω of S n can be computed efficiently via the hook-length formula, this shows that g µνλ is equal to an efficiently computable dimensional factor (d µ d ν d λ ) −1 times a #BQP function.Therefore the problem of approximating Kronecker coefficients to within a given relative error (Approx-Kron) is not harder than QXC.This furnishes one of the first natural computational problems that is polynomial-time reducible to quantum approximate counting (and not known to be easier) but whose definition does not involve quantum many-body systems.The only other problem of this kind that we are aware of involves approximating Betti numbers of a cochain complex [8][32].Our results make use of Beals' efficient quantum Fourier transform over the symmetric group [4] and, in particular, its use in the generalized phase estimation algorithm [14] which we now review.
Let ρ be a representation of the symmetric group S n such that for every permutation σ ∈ S n , ρ(σ) is a unitary operator acting on a Hilbert space H.For any irreducible representation of the symmetric group labeled by a partition λ ⊢ n, we define an operator acting on H as Here χ λ : S n → C is the character of S n corresponding to the irreducible representation labeled by λ (it is a nontrivial fact that χ λ is in fact integer-valued [19]), and d λ is its dimension.Also note that the operator Eq. ( 3) depends on the representation ρ, although this is suppressed in our notation.
The operators M ρ ≡ {Π λ : λ ⊢ n} define a projective measurement.That is, as shown in the Supplementary Material, the Π λ are mutually orthogonal Hermitian projectors that sum to the identity.
In fact, this measurement can almost always (i.e., for most representations ρ) be implemented efficiently on a quantum computer.First consider the simple case when H = CS n and ρ is the left-regular representation acting as ρ(α)|π = |απ for any permutations α, π ∈ S n .Let us denote the corresponding projectors Eq. ( 3) as Π L λ and the measurement as M L = {Π L λ }.This measurement-also known as weak Fourier sampling over the symmetric groupcan be implemented using a simple circuit depicted in Fig. 1.Here QFT n is the unitary corresponding to Beals' quantum Fourier transform over the symmetric group [4].It is defined in terms of Young's orthogonal representation of S n which describes an irreducible matrix representation of S n , denoted ρ ω , for each ω ⊢ n, with certain desirable properties.For any function f : (Note that basis vectors of H can be labeled by triples from the set For other unitary representations ρ of S n , it is possible to implement the measurement M ρ using the generalized phase estimation [14] circuit shown in Fig. 1, which uses weak Fourier sampling as a subroutine.It further requires that we can perform the C − ρ gate and its inverse, where (C−ρ)|α |ψ = |α ρ(α)|ψ for any permutation α ∈ S n and ψ ∈ H.
We are now ready to describe our main results.Again let us consider the left-regular representation of S n .For any three partitions µ, ν, λ of n, we may define the projectors Π L µ , Π L ν , Π L λ using Eq. ( 3) where ρ is the left regular representation of S n .These operators act on the Hilbert space H = CS n .
FIG. 1: (a) Weak Fourier sampling circuit that performs the projective measurement Next consider H ⊗3 and let Then it is easy to verify that Q is a hermitian projector, i.e., Let us then define Proof.Taking the trace in Eq. ( 1) we see that χ µ (σ)χ ν (σ) = λ g µνλ χ λ (σ) for all σ ∈ S n .Using orthogonality of the irreducible characters, we then obtain the well-known formula We can evaluate Tr(P µνλ ) using Eqs.(3,6) and the fact that in the left-regular representation Tr(π) is zero unless π is the identity permutation: which coincides with Eq. ( 7).
Theorem 1.For any partitions µ, ν, λ ⊢ n there exists a quantum circuit of size poly(n) that implements a projective measurement {P µνλ , I − P µνλ }.
Proof.The circuit will have an input register CS n ⊗ CS n ⊗ CS n .First we use weak Fourier sampling to perform the measurement M L on each of the three registers and reject unless the outcomes are µ, ν, λ respectively.Then we use generalized phase estimation with the threefold tensor product representation ρ(σ) = σ ⊗ σ ⊗ σ and reject unless the outcome is the trivial representation τ .If the circuit does not reject in either step, then it accepts.The corresonding POVM element is the product of the POVM elements for acceptance in each step individually, that is The efficient quantum circuit that measures the projector P µνλ (Theorem 1) directly gives a QMA protocol for the problem of deciding positivity of Kronecker coefficients.Indeed, the projector P µνλ has nonzero rank if and only if g µνλ > 0. If g µνλ > 0 there exists a quantum state that results in the measurement outcome +1 while if g µνλ = 0 then all states give measurement outcome 0. Note that this QMA protocol is deterministic in the sense that it has perfect completeness and soundness .
Corollary 2. The problem of deciding positivity of Kronecker coefficients-given µ, ν, λ ⊢ n, decide if This upper bound complements the recent result of Ikenmeyer, Mulmuley and Walter who established that deciding positivity of Kronecker coefficients is NP-hard [15].
Corollaries 1, 2 describe complexity-theoretic consequences of the fact that a Kronecker coefficient is proportional to the dimension of a subspace for which membership can be efficiently verified on a quantum computer.Similar arguments shed light on another positivity problem on Stanley's list [40], which concerns the row sums of the character table of the symmetric group: Here χ λ (µ) is the value of the irreducible character χ λ evaluated at any permutation with cycle structure described by µ.
Just like the Kronecker coefficients, the row sums R λ are nonnegative integers.This follows from the fact that R λ is equal to the multiplicity of an irreducible representation ρ λ in the decomposition of the so-called conjugation representation ρ c which acts on the Hilbert space H = CS n as ρ c (π)|σ = |πσπ −1 .In particular, we have the decomposition ρ c ≃ λ R λ ρ λ , see the Supplementary Material for details.The generalized phase estimation circuit Fig. 1(b) can be used to efficiently measure the projector Π c λ given by Eq. ( 3) with ρ → ρ c .In this way we obtain: Theorem 2. For any λ ⊢ n there exists a quantum circuit of size poly(n) that implements a projective measurement {Π c λ , I − Π c λ }, where d λ R λ = Tr(Π c λ ).As a consequence, the problem of computing d λ R λ is in #BQP, the problem of approximating R λ to within a given relative error is efficiently reducible to QXC, and the problem of deciding positivity of R λ is contained in QMA.
Our discussion thus far has centred around problems that are thought to be intractable for quantum or classical computers.It is natural to ask whether there are easier versions of these problems that may admit efficient quantum or classical algorithms.For example-although it is very unlikely that there exists an efficient algorithm to approximate the irreducible characters of the symmetric group to with a given relative error [17]-Jordan has shown that the normalized irreducible characters χ λ (π)/d λ can be efficiently approximated to within a given additive error using a classical randomized algorithm [20].Similarly, a quantum algorithm for approximating normalized Kronecker coefficients can be inferred from Ref. [25].

Lemma 2. [25]
There is a quantum circuit of size poly(n) that samples from the probability distribution p(λ) = We describe the algorithm in the Supplementary Material.(To see that p(λ) is a normalized probability distribution, apply Eq. ( 1) to the identity permutation and take the trace.)Given a partition λ, one can approximate the probability p(λ) with an additive error ǫ by generating O(1/ǫ 2 ) samples from p and computing the fraction of samples equal to λ.This gives an approximation of g µνλ with an additive error δ = ǫd µ d ν /d λ .This approximation can be efficiently obtained on a quantum computer, as long as ǫ ≥ poly(1/n).Note that this approximation is good enough to solve ExactKron if min (d µ , d ν , d λ ) ≤ poly(n).Indeed, assuming wlog that d µ ≤ d ν ≤ d λ , one gets δ ≤ ǫd µ ≤ ǫ • poly(n) < 1/2 for ǫ = poly(1/n).We do not know if such an approximation can be efficiently obtained classically.Polynomial-time classical algorithms for ExactKron are only known in the special case when all partitions µ, ν, λ have constant (or nearly constant) number of parts [36].
In summary, we have upper bounded the computational hardness of counting problems related to the representation theory of the symmetric group.We have shown that two mysterious quantities in this arena-the Kronecker coefficients and the row sums of the symmetric group-are proportional to #BQP functions and can be approximated via quantum approximate counting.We have also described an efficient quantum algorithm for estimating the normalized Kronecker coefficient g µνλ d λ /(d µ d ν ) to within a given additive error.We note that Kronecker coefficient squared g 2 µνλ can be expressed as an eigenvalue degeneracy for a certain Hamiltonian describing dynamics of bipartite ribbon graphs [12].This provides an alternative quantum mechanical interpretation of the Kronecker coefficients.It remains a challenging open question to understand the computational hardness of quantum approximate counting relative to other known complexity classes.

Properties of the operators {Πµ}
Here we show that the operators in Eq. ( 3) are mutually orthogonal projectors that add up to identity.To this end we use the grand orthogonality theorem (a consequence of Schur's lemma) of representation theory.
It follows that {Π µ } are mutually orthogonal projectors.
Using the fact that d µ = χ µ (e), where e ∈ S n is the identity, we obtain The column-orthogonality of characters (stated below) implies that and substituting this into Eq.( 11) gives µ Π µ = I.
Lemma 3 (Column-orthogonality of characters).(See [3,Thm 16.4])For any h, g ∈ S n we have where Z(g) is the centralizer of g in S n (the set of all group elements that commute with g).

Beals' quantum Fourier transform over the symmetric group
For completeness, here we review Beals' efficient algorithm for the quantum Fourier transform over the symmetric group [4] (see also [24] for generalizations to other nonabelian groups).
Let n ≥ 2 be an integer and consider the symmetric group S n of permutations on n objects.Also let T = {τ 1 , τ 2 , . . ., τ n } be a transversal of the left cosets of S n−1 in S n .Here S n−1 is regarded as the subgroup of S n that does not permute the n-th object and transversality means that S n is a union of cosets τ 1 S n−1 , . . ., τ n S n−1 .
It will be convenient to fix some notation and conventions concerning the function whose Fourier transform we are interested in.We shall fix a unitary matrix representation of each irreducible representation of S n .In particular, we choose the so-called Young Orthogonal representation (more on this below) and write ρ λ (π) for the matrix corresponding to the irreducible representation labeled by λ ⊢ n evaluated at π ∈ S n , and d λ for its dimension.
For a function f : S n → C we have where For ease of notation in this section we include the normalization factor dω n! in Eq. ( 15) rather than in Eq. ( 14) which differs from our convention in the main text (Cf.Eqs.(4,5)).However the quantum fourier transform QFT n is defined in exactly the same way.
Note that the basis vectors in the Fourier basis can be labeled by triples from the set Ω = {(ω, i, j) Since the left cosets of S n−1 partition S n , we may write Also define f j : Young's orthogonal representation has a certain adapted property that allows us to express Eq. ( 15) in terms of Fourier transforms of the functions f j for 1 ≤ j ≤ n in a simple way.In particular, where is the set of partitions of n − 1 whose diagram differs from λ in exactly one box.Note that the Fourier transforms fk appearing on the right hand side of Eq. ( 18) are over the group S n−1 .
To describe Beals' QFT algorithm it will be convenient to first define some unitary transformations that are used in the construction.In the following we shall assume that we have enough qubits to encode certain classical strings as computational basis states.
Let W denote the unitary which implements a classical reversible circuit that, given a permutation π ∈ S n , computes its factorization: where j ∈ [n] and h ∈ S n−1 satisfy π = τ j h.Note that this factorization is unique.
For π ∈ S n let M (π) be a unitary such that Here (A λ ) p,q are complex coefficients.Note that this can be implemented via a controlled-ρ λ (π) operation on the p register (where the control is λ).The unitary M (π) acts trivially outside the subspace spanned by basis vectors {|λ, p, q : λ ⊢ n, p, q ∈ [d λ ]} For each irreducible representation σ of S n−1 there is a set of irreps λ of S n such that the restriction of ρ λ to S n−1 contains σ.These correspond to the partitions λ that differ from σ by adding one box.Moreover, each matrix element p, q of ρ σ (where p, q ≤ d σ ) is identified with a unique matrix element p ′ , q ′ of ρ λ (Here p ′ , q ′ depend on p, q as well as λ, though our notation suppresses these dependencies).
Let U be a unitary such that for any σ ⊢ (n − 1) and p, q ≤ d σ we have and such that It is possible to construct such a unitary because the states appearing on the RHS of Eq. ( 19) for different values of σ, p, q are orthonormal.However the action of U in the rest of the Hilbert space is constrained by unitarity.The following lemma describes a property of U that follows from this constraint.
Lemma 4. Let P project onto the subspace spanned by basis states than encode partitions of n − 1, that is, Suppose g : S n → C is any function such that g(π) = 0 for all π ∈ S n−1 (regarded as the subgroup of S n that fixes n).Then P U † |0 |ĝ = 0.
Proof.Below we write P = n k=0 P k where P 0 = span{|0 |σ, p, q : σ ⊢ (n − 1), 1 ≤ p, q ≤ d σ } and First suppose that r is the Fourier transform of some (arbitrary) function r : S n−1 → C. Define R : S n → C such that R(π) = r(π) for all π ∈ S n−1 , and R(π) = 0 otherwise.Then from Eq. ( 19) we have Now consider a function g : S n → C as in the statement of the Lemma.Since g(π) = 0 for all π ∈ S n−1 we have g|R = 0 and therefore ĝ| R = 0 and therefore U † |0 |ĝ is orthogonal to any state of the form on the LHS of Eq. ( 21).Noting that the LHS of Eq. ( 21) is an arbitrary state in the image of P 0 , we see that Then where in the first step we used Eq. ( 22) and in the following step we used Eq. ( 20).
Our definitions of U, f k , F k and M (τ k ) are chosen so that the following holds.
Finally, for k ∈ [n] let V k be the unitary that acts as for all σ ⊢ n − 1 and 1 ≤ p, q ≤ d σ , and which acts as the identity on all other computational basis states.The quantum Fourier transform over the symmetric group is described in Algorithm 1.

Algorithm 1 Implements a unitary QFT n
Input: A state |f = g∈Sn f (g)|g .
Output: The state | f = QFT n |f corresponding to the Fourier transform of f over Sn.The following lemma shows that the algorithm performs the quantum Fourier transform, as claimed.
Lemma 5.For 0 ≤ k ≤ n, the state after the kth iteration of the for loop in Algorithm 1 is When k = 0 this describes the state before the first iteration (in this case the first term is not present).For k = n we have By induction on k.The base case k = 0 corresponds to the initial state n j=1 |τ j | fj .Now suppose the state after the (k − 1)-th iteration is given by |φ k−1 as described by Eq. ( 25).Then after line 4 of Algorithm 1 the state is For each j ≤ k − 1, the state M (τ −1 k )| F j is the Fourier transform of a function g(π) = F j (τ k π) which is zero on S n−1 .So for j ≤ k − 1, by Lemma 4 we have P U † |0 M (τ −1 k )| F j = 0 where P projects onto basis states that encode partitions of n − 1. Therefore V k acts trivially on and, applying M (τ k )U to the above gives where we used Claim 1.This completes the induction, and the proof.

Generalized phase estimation
In this section we will show that the circuits from Figure 1 implement weak Fourier sampling and generalized phase estimation respectively.The following Lemma shows that the circuit in Figure 1(a) implements weak Fourier sampling.We will make use of the inverse Fourier transform QFT † n which acts as: Lemma 6.The POVM M L can be implemented by applying QFT n , then performing a projective measurement of the representation label ω, then appplying QFT † n .Proof.Let a partition λ ⊢ n be given.Let P λ denote the projector such that P λ |ω, i, j = δ ω,λ |ω, i, j .It suffices to show that for any state |ψ ∈ H we have Π L λ |ψ = QFT † n P λ QFT n |ψ .To this end let |ψ = σ∈Sn f (σ)|σ .Using Eq. (3) we get where in the last line we used the fact that χ λ (g) = χ λ (g −1 ) for all g ∈ S n (this can be seen for example using the fact that group characters are class functions and g and g −1 are always in the same conjugacy class since their cycle structure coincides).Now using Eq. ( 33) and the fact that Below we show this is equal to QFT † n P λ QFT n |ψ .We have: where we used Eq.(31) in the last line.This coincides with Eq. ( 34) and completes the proof.
Next we show that the circuit in Fig. 1 (b) implements generalized phase estimation measurement M ρ : Using the fact that ρ(σα) = ρ(σ)ρ(α) and that ρ † (α) = ρ(α) −1 we see that the output state Eq. ( 41) is equal to On the right hand side the state of the second register is Π ω |ψ , as desired.
QMA, #BQP, and QXC Recall the definition of a verification circuit from the main text.In the following we write p(ψ) for the acceptance probability of a verification circuit with input state ψ.
A (promise) problem is in QMA with completeness c and soundness s, also denoted QMA(c, s), if there exists a uniform polynomial-sized family of verification circuits C x labeled by instances x of the problem, such that (A) If x is a yes instance then there exists a witness ψ such that p(ψ) ≥ c, and (B) If x is a no instance then p(ψ) ≤ s for all ψ.
We choose to define #BQP as a class of relation problems rather than a class of functions, languages (decision problems), or promise problems.Recall from the main text that Eq. ( 2) describes the POVM element corresponding to the accept outcome of a quantum verification circuit and N q denotes the number of eigenvalues of A that are at least q.We define #BQP as the class of problems that can be expressed as: given a quantum verification circuit with an n-qubit input register, total size poly(n), and two thresholds 0 < b < a ≤ 1 and a − b = Ω(1/poly(n)), compute an estimate N such that N a ≤ N ≤ N b .This defines a relation problem because there may be more than one solution for a given instance (this happens whenever N a = N b ).
Ref. [6] puts forward a slightly different definition of #BQP, as the class of promise problems obtained by augmenting and specializing the above definition with the promise that N a = N b .This has the pleasing feature that it results in a class of functions rather than relations, though at the expense of adding a promise.
One of the main results established in Ref. [6] is that any problem in #BQP (as they define it) can be efficiently reduced to computing a #P function.We now describe how their proof can be straightforwardly adapted to our setting, establishing the same result for the definition of #BQP that we use in this paper.Using the in-place error reduction for QMA [23] we may assume without loss of generality that a = 1 − 2 −n−2 and b = 2 −n−2 (see, e.g. the proof of Lemma 8 in the supplementary material of Ref. [5]).Then and Eqs. (43,44) show that the nearest integer N to Tr(A) solves the given #BQP problem as it satisfies N a ≤ N ≤ N b .It then suffices to show that we can compute Tr(A) to within an additive error of 1/4 using efficient classical computation along with a single call to a #P oracle.This is established in Theorem 14 of Ref. [6] via a proof that is based on expressing Tr(A) as a sum over paths, see Ref. [6] for details.

Efficient sampling algorithm
Now let us describe the algorithm stated in Lemma 2, which appears implicitly in Ref. [25].
The completely mixed state over the image of the projector Π L µ can be prepared as follows.
There is a basis in which ρ λ are orthogonal matrices (Young's orthogonal form).It follows in this basis that ρ † µ (σ) ji = ρ µ (σ) ij , so that we can write: We will need the projector formula: Π λ = d λ n! g χ λ (g)R(g) ⊗ R(g), where R is the regular representation.We already proved above how to implement this measurement using Generalized Phase Estimation.For completeness, we can verify the projection property of this operator as follows:
and ApproxKron is polynomial-time reducible to QXC.Proof.From Theorem 1 there is a polynomial size verification circuit that measures the projector P µνλ .