<<

arXiv:1010.3060v2 [quant-] 20 Jul 2011 c na2 atc fqbt,o na1 hi.T this To class ver- the chain. counting of 1D natural sion the a constitutes class on which counting BQP), or quantum (sharp to the , introduce restricted of will is we lattice end, Hamiltonian 2D a the on if cases, act even both holds in result Hamiltonian; state the gapped ground local lo- the a a counting of of degeneracy second, states and of Hamiltonian, density cal the First, problems: fermionic as [3]. well as systems [2], chains and (1D) [1] one-dimensional lattices vari-even (2D) two-dimensional in computing as systems such of settings, quantum ous difficulty of quan- the properties of explain state ground to power the- managed complexity the has quantum to ory particular, In limits computers. fundamental tum as the systems as quantum simulating well of both difficulty concerning classical problems, the - mechanical tasks quantum of difficulty to clas- the lated of assess to field theory well-established complexity powerful the sical generalizing the complex- at Quantum using aims theory. ity by complexity quantum states of of tools density the computing out. ruled problem priori given a a of not structure are the of advantage which take approaches efficient might exponentially more an other though on space, involves states large acting principle Hamiltonian in of it a density as however, diagonalizing the task daunting Computing electronic a be most can metals. energy) Fermi of the properties (near many and deriving band structure, conductivity, when thermal capacity, in- ingredient heat models, specific key cluding microscopic this from a in properties is role thermodynamic It per crucial eigenstates particularly energy endeavor. a of of plays density number interval, The the energy as physics. defined matter im- states, central condensed of in problem a portance is systems many-body quantum in”t unu rbe htcnb eie sn a using verified be can that problem speaking, quantum Vaguely a to tions” 5]. [4, Hamiltonian #BQP local state ground a the of computing energy of difficulty the captures self ewl eemn h opttoa iclyo two of difficulty computational the determine will We of difficulty the quantify precisely we Letter, this In correlated of properties physical the Understanding 3 aionaIsiueo ehooy nttt o Quantum for Institute Technology, of Institute California 1 onstenme fpsil qatmsolu- “quantum possible of number the counts nvriyo igna eatet fPyisadCompute and Physics of Departments Virginia, of University uta ada ti o unu Hamiltonians. of quantum density for is the it or as degeneracy hard state as ground just the computing that eso that show We fsae o oa aitnas eso httedffiut o difficulty the that show We Hamiltonians. local for states of ls hc ecall we which class a esuytecmuainldffiut fcmuigteground the computing of difficulty computational the study We QMA opttoa iclyo optn h est fStates of Density the Computing of Difficulty Computational 2 eiee nttt o hoeia hsc,Wtro,On Waterloo, Physics, Theoretical for Institute Perimeter QatmMri rhr hc it- which Arthur) Merlin (Quantum #BQP rei Brown, Brielin snthre hniscasclcutn counterpart counting classical its than harder not is #BQP hc stecutn eso fteqatmcmlxt cla complexity quantum the of version counting the is which , ,2 1, tvnT Flammia, T. Steven #BQP nomto,M 0-6 aaea aiona915 USA 91125, California Pasadena, 305-16, MC Information, T the rbe.Mr omly eie hcigan state quantum checking a is, verifier (that a proof quantum formally, More problem. with U oa gates local chosen some for e qatmsltos as called (also solutions” “quantum fies Hamiltonian. quantum a hard for as problem just same is the system solving spin as classical ground a the of counting that degeneracy and is entries.state states show of com- we binary density what the with or Hamiltonians, computing matrix of graph, terms a a in of Phrased of permanent colorings the of puting number include class) the that in counting problems hardest the (i.e., problems ae.Hr,teacpac rbblt fastate a of probability acceptance the Here, case”. ntefloigi ae ythe by taken role is central following The the classes. in complexity relevant the ducing h om Dcd hte hr xssa re- exists (“proof there 0 whether p “Decide or form: accepted”) class the the (“proof Then, 1 jected”). return to hte h ucinhsa es n aifiginput, satisfying deciding one as least class hard complexity at as the has least i.e., at function is the it whether particular, exponen- take in to believed time; is tial which can problem This hard very function. a be boolean computable efficiently any to eeeay opeepolm o h class the for problems state ground the are counting com- degeneracy, and problems, states of both density the that puting show We computer. quantum e ekyprioiu eutos.Hr,tecomplex- class the ity Here, reductions). parsimonious weakly der iyo ttsadcutn h ubro rudstates, ground relate of number to the proceed counting we and states class. of this sity in problems hardest the among are they i.e., opeiycass n hwthat show and classes, complexity hc eilsrt nFg 1. Fig. in illustrate we which acc acc n nlymaue h rtqbti the in first the measures finally and , poly( = unu opeiyclasses.— complexity Quantum aigqatfidtedffiut fcmuigteden- the computing of difficulty the quantified Having ( ( ( = Ω n V V cec,Caltevle igna294 USA 22904, Virginia Charlottesville, Science, r m qbtqatmstate quantum -qubit 2 ( ( ψ ψ n obr Schuch Norbert and − ohpolm seatycpue by captured exactly is problems both f #P ):= )) )) ½ n n U I eghqatmcircuit quantum length ) ttsfrcasclHmloin is Hamiltonians classical for states a > ntaie ancillas, initialized t onstenme fstsyn assignments satisfying of number the counts h ⊗ cigon acting ) tt eeeayadtedensity the and degeneracy state h ai 2 Y,Canada 2Y5, N2L tario ψ rwhether or , 0 a | | Ω A − | ) ψ #P U > b #BQP i † with , ( hc ntr implies turn in which , | m 1 1 NP ih / QMA poly( poly( = 1 xmlsfor Examples . | 3 okoncasclcounting classical known to | 1 p ψ acc ⊗ i | I n otisalpolm of problems contains 0 ½ ( verifier ,gvnta n sthe is one that given ), i e ssatb intro- by start us Let V #BQP ) sa nu,together input, an as A n U ( ss uis hc takes which qubits, ) U ψ | ≡ ( ½ )) proofs QMA = I 0 | | ⊗ ψ b < U equals · · · V i | T . ossso a of consists ) #P hc veri- which , ψ 0 oagiven a to ) 0 · · · i i o all for i {| A A -complete uhthat such ) 0 U applies , #P , i n #BQP 1 1 -qubit , | (with | ψ 1 (un- | i ψ i (1) 1 is i } , , 2

tance probability above a, to a “grace interval” [b,a] in which mistakes are tolerated (i.e., if the largest eigen- value of Ω is in [b,a], the oracle can return either out- come). Correspondingly, #BQP captures the difficulty of counting the number of eigenvalues above a, where eivenvalues in the grace interval [b,a] can be miscounted. The reason why we choose to define #BQP with a gap promise rather than with a grace interval is the same as FIG. 1: A QMA verifier consists of a sequence of T local uni- for QMA, namely to have a unique outcome associated tary gates acting on the “quantum proof” |ψi and an ancillary with any input. register initialized to |0i. The final measurement on the first Similarly, the idea of the Hamiltonian formulation of qubit returns |1i or |0i to accept or reject the proof, respec- the problem which we will discuss below is to ask for the tively. Transition probabilities can be computed by doing a number of eigenstates in a certain energy interval, where “path integral” over all intermediate configurations (ik)k. states which are in some small 1/poly(n) neighborhood of this interval may be miscounted; again, for reasons of rigor we choose to consider only Hamiltonians with no The idea behind this definition is that QMA quanti- eigenstates in that interval. It should be noted, however, fies the difficulty of computing the energy that all of the equivalence proofs we give equally apply E0(H) of a local Hamiltonian H up to 1/poly(n) accu- if we choose to allow for miscounting of states in those racy. Let the verifier be a circuit estimating ψ H ψ ; h | | i grace intervals instead of requiring them to be empty, as then a black box solving QMA problems can be used the proofs do not make use of the gap promise itself, but to compute E0(H) up to 1/poly(n) accuracy by binary rather show that all states outside those grace intervals search using a single QMA query. Note also that QMA is are mapped (and thus counted) correctly. Thus, while the quantum version of the class NP, where one is given the actual number returned by the grace interval formu- an efficiently computable boolean function f(x) 0, 1 ∈{ } lation of the counting problems might change under those and one must figure out if there is an x such that mappings due to different treatment of states in the grace f(x) = 1. interval, it will still be in the correct range. The class NP has a natural counting version, known The class #BQP inherits the important property from as #P. Here, the task is to determine the number rather QMA of being stable under amplification, that is, the def- than the existence of satisfying inputs, i.e., to compute inition of #BQP is not sensitive to the choice of a and x : f(x)=1 . We will now analogously define #BQP, |{ }| b. In particular, any a b > 1/poly(n) can be ampli- the counting version of QMA. Consider the verifying map fied (by building a new− poly-size Ω′ from Ω) such that Ω of Eq. (1) for a QMA problem, with the additional a′ = 1 exp( poly(n)), b′ = exp( poly(n)), and keep- promise that Ω does not have eigenvalues between a and ing the− eigenvalue− gap between a−′ and b′, by using a b, a b > 1/poly(n). Then the class #BQP consists of − construction called strong amplification, cf. Ref. [8]; as all problems of the form “compute the dimension of the shown there, strong amplification acts on all eigenval- space spanned by all eigenvectors with eigenvalues a”. ≥ ues independently and thus also applies to #BQP. The An equivalent definition for #BQP (cf. also [6, 7]) is crucial point is that strong amplification works without the following: Consider a verifier Ω with the additional changing the proof itself, compared to weak amplifica- n promise that there exist subspaces = C2 such that tion which takes multiple copies of the proof as an input. A⊕R ψ Ω ψ a for all ψ , and ψ Ω ψ b for all ψ While this is fine for QMA, it does change the dimension h | | i≥ | i ∈ A h | | i≤ | i ∈ , where again a b> 1/poly(n) – we can think of and of the accepting subspace in an unpredictable way and is R − A as containing the good and bad witnesses, respectively. thus not an option for the amplification of #BQP. R (Note that there will always be “mediocre” witnesses— Complexity of computing the density of states.—Let the question is whether there exists a decomposition into us now show why the class #BQP is relevant for physical a good and a bad witness space.) Then, #BQP consists of applications. In particular, we are going to show that all problems of the form “compute dim ”. This number computing the density of states of a local n-spin Hamil- A is well-defined, i.e., independent of the choice of and tonian H = H with few-body terms H , H 1, A i i i i , and moreover, one can easily show that it is equivalent up to accuracy 1/poly(n), is a problem which isk completek ≤ R to the definition above, cf. the Supplementary Material. for #BQP, i.e.,P it is as hard as any problem in #BQP can The gap promise we impose on the spectrum of Ω is be. The same holds true for the (a priori weaker) prob- not present in the definition of QMA (though similarly lem of counting the ground state degeneracy of a local restricted versions of QMA were defined in [6, 7]). Nev- Hamiltonian, given a 1/poly(n) spectral gap above (note ertheless, this promise emerges naturally when consider- that Bravyi et al. [9] suggested this as a definition for ing the counting version: QMA captures the difficulty of a quantum counting class). We can impose additional determining the existence of an input state with accep- restrictions on the interaction structure of our Hamilto- 3 nian, and as we will see, the hardness is preserved even With this choice of Hfinal, H acts independently on the for 2D lattices of qubits, or 1D systems. subspaces spanned by Ut U ψ I x A t T t ,...,T for { ··· 1| i | i | i } =0 The problem dos (density of states) is defined as fol- any ψ or ψ , and x A the computational | i ∈ A | i ∈ R | i lows: Given a local Hamiltonian H = i Hi, compute basis, and the restriction of H to any of these subspaces the number of orthogonal eigenstates with eigenvalues in describes a random walk which is characterized by the P an interval [E , E ] with E E > 1/poly(n), where we choice of ψ I and the number of 1’s in x A. These cases 1 2 2 1 | i | i do not allow for eigenvalues− within a small grace interval can be analyzed independently (see Supplementary Ma- of width ∆ = (E E )/poly(n) centerd around E and terial), and it follows that H has a dim -fold degenerate 2 − 1 1 A E2; alternatively, we can allow for errorneous counts of ground state space with a 1/poly(n) gap above, proving eigenstates in that interval. Second, the problem # #BQP-hardness of #lh. (sharp local Hamiltonian) corresponds to counting the This shows that #lh is #BQP-hard for a Hamiltonian number of ground states of a local Hamiltonian which which is a sum of log T -local terms (i.e., each term acts has a spectral gap ∆ = 1/poly(n) above the ground state on log T sites), as the clock register is of size log T . In subspace, given we are told the ground state energy, and order to obtain a k-body Hamiltonian, Kitaev suggested where we allow for a small splitting in the ground state to use a unary encoding of the clock (i.e., t T is encoded energies; again, we can alternatively allow to miscount as 1 10 0 , with t 1’s), so that each| i Hamiltonian states in the grace interval. term| ··· only··· actsi on three qubits of the clock. However, Clearly, #lh is a special instance of dos, i.e., solving this makes the of the clock too big, and #lh can be reduced to solving dos. In order to show terms need to be added to the Hamiltonian to penal- that dos is contained in #BQP, we can use a phase es- ize illegal clock configurations. These terms divide the timation circuit [10] to estimate the energy of any given Hilbert space into two parts, legal illegal. Here, legal input ψ and only accept if its energy ψ H ψ is in the contains only legal clock states,H whereas⊕H containsH | i h | | i Hillegal interval [E1, E2]; as the desired accuracy ∆ = 1/poly(n), only configurations with illegal clock states [4, 5]. Since this can be done efficiently. A detailed proof (using a no Hamiltonian term couples these two subspaces, the more circuit) is given in the Supplementary Hamiltonian can be analyzed independently on the two Material. subspaces. It turns out that its restriction to has Hillegal Let us now conversely show that #lh is a hard prob- an at least 1/poly(n) higher energy, while on legal, the lem for #BQP, that is, any problem in #BQP can be Hamiltonian is exactly the same as before.H Thus, one reduced to counting the ground states of some gapped finds that the new Hamiltonian still has the right num- local Hamiltonian [22]. As in turn #lh can be reduced ber of ground states, and a 1/poly(n) spectral gap. The to dos, which is contained in #BQP, this proves that very same argument applies in the case of 1D Hamiltoni- both #lh and dos are complete problems for #BQP, ans, using the QMA-construction of Ref. [2]: Again, the i.e., they capture the full difficulty of this class. To this Hamiltonian acts independently on a “legal” and an “ille- end, we need to start from an arbitrary verifier circuit gal” subspace, where the latter has a polynomially larger U = UT U1 and construct a Hamiltonian which has as energy, and the former reproduces the (-energy) spec- many ground··· states as the circuit has accepting inputs trum of the original Hamiltonian [11]. (corresponding to the outcome 1 1 on the first qubit). An alternative way to prove QMA-hardness on re- | i Let and be the eigenspaces of Ω [Eq. (1)] with eigen- stricted interaction graphs is to use so-called perturbation A R values a = 1 2−poly(n) and b = 2−poly(n), respec- gadgets, which yield the Hamiltonian of the Kitaev con- ≥ − ≤ tively, and define U[ ] := U ψ I 0 A : ψ I . struction above from a perturbative expansion; in partic- R { | i | i | i ∈ R} We will follow Kitaev’s original construction for a ular, this way one can show QMA-hardness of Pauli-type Hamiltonian encoding a QMA verifier circuit [4, 5], which nearest-neighbor Hamiltonians on a 2D square lattice of for any proof ψ I has the “proof history” Φ = qubits [1]. As shown in Ref. [12], such gadgets do in fact T | i 0∈ A | i t=0 Ut U1 ψ I A t T as its ground state, where approximately preserve the whole low-energy part of the the third··· register| i | isi used| i as a clock. The Hamiltonian spectrum, and thus, our #BQP–hardness proof for #lh P T

H = Hinit + t=1 Hevol(t) + Hfinal has three types of still applies to these classes of Hamiltonians. It should ½ terms: Hinit = ½ ( 0 0 A) 0 0 T makes sure the be noted, however, that since the eigenvalues are only P ⊗ − | ih | ⊗ | ih | ancilla is initialized, Hevol(t) = Ut t t 1 T + h.c. preserved up to an error 1/poly(n), the splitting of the ensures proper evolution from t− 1⊗ to | tih, and− |H = ground state space will now be of order 1/poly(n); how- − final Π T T T gives an energy penalty to states Φ ever, it can still be chosen to be polynomially smaller U[R] ⊗ | ih | | i built from proofs ψ I . Note that our H differs than the spectral gap. | i ∈ R final from the usual choice 0 0 1 ½ T T T and is in fact Quantum vs. classical counting complexity.—As we non-local; as we show| inih | the⊗ Supplementary⊗ | ih | Material, have seen, the quantum counting class #BQP exactly this does not significantly change the relevant spectral captures the difficulty of counting the degeneracy of properties (in particular, we keep the 1/poly(n) gap, and ground states and computing the density of states of local the ground state subspace is split at most exponentially). quantum Hamiltonians. In the following, we will relate 4

#BQP to classical counting classes and prove that #BQP can still be estimated efficiently by a [14]. is equal to #P, counting the number of satisfying inputs On the other hand, hardness of the problem for #BQP to a boolean function [23]. In physical terms, this shows can be shown e.g. by using the #BQP-hardness of #lh, that counting the number of ground states or determining and encoding each spin using one fermion in two modes, the density of states for a quantum Hamiltonian is not similar to [14]. Thus, computing the density of states for harder than either problem is for a classical Hamiltonian. fermionic systems is a #BQP-complete problem as well. Clearly, #P is contained in #BQP, as the latter in- Acknowledgments.—We thank S. Aaronson, D. Gottes- cludes classical verifiers. It remains to be shown that man, D. Gross, Y. Shi, M. van den Nest, J. Watrous any #BQP problem can be solved by computing a #P and S. Zhang for helpful discussions and comments. Re- function. We start from a verifier operator Ω, Eq. (1), search at PI is supported by the Government of Canada and wish to show that the dimension of its accepting through Industry Canada and by the Province of Ontario subspace, i.e., the subspace with eigenvalues a, can through the Ministry of Research and Innovation. NS is A ≥ be computed by counting satisfying inputs to some ef- supported by the Gordon and Betty Moore Foundation ficiently computable boolean function. Using amplifica- through Caltech’s Center for the Physics of Information 1 tion, we can ensure that dim tr Ω 4 , i.e., we need and NSF Grant No. PHY-0803371. | A−1 |≤ to compute tr Ω to accuracy 4 . This can be done using Note added.—After completion of this work, we a “path integral” method, which has been used previ- learned that Shi and Zhang [15] have independently de- ously to show containments of quantum classes in the fined #BQP and shown its relation to #P using the same classical classes PP and #P (see e.g. [13]). We rewrite technique. trΩ = ζ f(ζ) as a sum over products of transition prob- abilities along a path ζ (i0,...,iN , j1,...,jN ), where P ≡ 0 † † † f(ζ)= i0 I AU1 j1 j1 U1 UT jT (2) h | h | | ih | ··· | i× [1] R. Oliveira and B. M. Terhal, Quant. Inf. Comput. 8,

iT 0 0 ½ iT iT UT U i I 0 A h | | ih |1 ⊗ | ih | ··· 1| 0i | i 900 (2009), quant-ph/0504050.   [2] D. Aharonov, D. Gottesman, S. Irani, and J. Kempe, (cf. Fig. 1). Since any such sum over an efficiently com- Commun. Math. Phys. 287, 41 (2009), arXiv:0705.4077. putable f(ζ) can be determined by counting the satis- [3] N. Schuch and F. Verstraete, Physics 5, 732 fying inputs to some boolean formula (see the Supple- (2009), arXiv:0712.0483. mentary Material for details), it follows that Ω can be [4] A. Y. Kitaev, A. H. Shen, and M. N. Vyalyi, Classical and computed using a single query to a black box solving #P quantum computation (American Mathematical Society, problems. Providence, Rhode Island, 2002). [5] D. Aharonov and T. Naveh, (2002), quant-ph/0210077. Summary and discussion.—In this work, we consid- [6] D. Aharonov, M. Ben-Or, F. G. Brandao, and O. Sattath, ered two problems: Computing the density of states and (2008), arXiv:0810.4840. computing the ground state degeneracy of a local Hamil- [7] R. Jain, I. Kerenidis, M. Santha, and S. Zhang, (2009), tonian of a spin system. In order to capture the com- arXiv:0906.4425. putational difficulty of these problems we introduced the [8] C. Marriott and J. Watrous, Comput. Complex. 14, 122 quantum #BQP, the counting version (2005), cs/0506068. of the class QMA. We proved that this complexity class [9] S. Bravyi, C. Moore, and A. Russell, (2009), arXiv:0907.1297. exactly captures the difficulty of our two problems, even [10] R. Cleve, A. Ekert, C. Macchiavello, and M. Mosca, Proc. when restricting to local Hamiltonians on 2D lattices of R. Soc. Lond. 454, 339 (1998), quant-ph/9708016. qubits or to 1D chains, since all these problems are com- [11] N. Schuch, I. Cirac, and F. Verstraete, Phys. Rev. Lett. plete problems for the class #BQP [24]. 100, 250501 (2008), arXiv:0802.3351. We have further shown that #BQP is no harder than [12] J. Kempe, A. Kitaev, and O. Regev, SIAM Journal of its classical counterpart #P. In particular this implies Computing 35, 1070 (2006), quant-ph/0406180. that computing the density of states is no harder for [13] . Adleman, J. DeMarrais, and M.-D. Huang, SIAM J. Comput. 26, 1524 (1997). quantum Hamiltonians than it is for classical ones. While [14] Y.-K. Liu, M. Christandl, and F. Verstraete, Phys. Rev. this quantum-classical equivalence might seem surpris- Lett. 98, 110503 (2007), quant-ph/0609125. ing at the Hamiltonian level, it should be noted that [15] Y. Shi and S. Zhang, private communication; the classes #P and PP quite often form natural “upper notes available at http://www.cse.cuhk.edu.hk/ bounds” for many quantum and classical problems. ~syzhang/papers/SharpBQP.pdf. What about the problem of computing the density of [16] R. Bhatia, Matrix Analysis (Springer, 1997). states for fermionic systems, such as many- sys- [17] C. Jordan, Bulletin de la Soci´et´e Math´ematique de France 3, 103 (1875). tems? On the one hand, this problem will be still in [18] P. Halmos, Trans. Amer. Math. Soc. 144, 381 (1969). #BQP and thus #P, since any local fermionic Hamilto- [19] E. Bernstein and U. Vazirani, Siam J. of Comp. 26, 1411 nian can be mapped via the Jordan-Wigner transform to (1997), quant-ph/9701001. a (non-local) Hamiltonian on a spin system, whose energy [20] F.G.S.L. Brandao, PhD thesis (2008), arXiv:0810.0026. 5

[21] T. J. Osborne, (2006), cond-mat/0605194. β, and a function g ∈ #P, such that f = α ◦ g ◦ β. This [22] Note that the connection between QMA with a unique differs from Karp reductions where no postprocessing is “good witness”, such as in our #BQP definition, and allowed, α = Id, but it still only requires a single call to local Hamiltonians with unique ground state and a a #P oracle. 1/poly(n) gap has been shown in [6]. [24] Note that computing the density of states to multiplica- [23] Formally speaking, the from #BQP to #P is tive accuracy is less difficult, see Refs. [20, 21]. weakly parsimonious, i.e., for any function f ∈ #BQP there exist polynomial-time computable functions α and

SUPPLEMENTARY MATERIAL

Quantum Complexity Classes of generality, if we assume dim > dim ′, it follows dim + dim ′ >N, and thus thereA existsA a non-trivial µ A ′,R which contradicts the definition. We start with the relevant definitions. Let x be a bi- | i∈A∩R nary string. Then, we denote by the verifier V Vx a Theorem 4. ≡ Definition 2 and Definition 3 are equiva- quantum circuit of length T = poly( x ), U = UT U | | ··· 1 lent. (with local gates Ut) acting on m = poly( x ) qubits, which is generated uniformly from x. The verifier| | takes Proof. To show that Definition 2 implies Definition 3, let an n = poly( x ) qubit ψ as an in- be spanned by the eigenvectors with eigenvalues a. I A ≥ put (we will express| | everything in terms| ofi n instead To show the converse, we use the minimax principle for of x in the following), together with m n initialized eigenvalues [16], which states that the kth largest eigen- | | − ancillas, 0 A 0 0 A, applies U, and finally mea- value λk of a Hermitian operator Ω in an N-dimensional | i ≡ | ··· i sures the first qubit in the 0 1, 1 1 basis to return Hilbert space can be obtained from either of the equiva- 1 (“proof accepted”) or 0 (“proof{| i | rejected”).i } The - lent optimizations ceptance probability for a proof ψ is then given by p (V (ψ)) := ψ Ω ψ , with | i λk(Ω) = max min x Ω x (4) acc h | | i Mk |xi∈Mkh | | i

† = min max x Ω x , (5)

½ ½ Ω = (½I 0 A)U ( 1 1 )U( I 0 A) . (3) ⊗ h | | ih |1 ⊗ ⊗ | i MN−k+1 |xi∈MN−k+1h | | i 1 Definition 1 (QMA). Let 0 a,b 1 s.th. a b> where k is a subspace of dimension k, and x is a unit ≤ ≤ − p(n) M | i for some polynomial p(n). A language L is in QMA(a,b) vector. Now notice that Def. 3 implies that if there exists a verifier s.th. min x Ω x a and max x Ω x b . (6) |xi∈Ah | | i≥ |xi∈Rh | | i≤ x L λmax(Ω) >a ∈ ⇒ Next, consider the minimax theorem for k = dim . x / L λmax(Ω) < b . ∈ ⇒ From Eq. (4) we have A Definition 2 (#BQP). Let 0 a,b 1 s.th. a b > ≤ ≤ − λdim A = max min x Ω x 1/poly(n), and let Ω be a verifier map with no eigenvalues Mdim A |xi∈Mdim Ah | | i #BQP between a and b. Then, the class (a,b) consists of min x Ω x all problems of the form “compute the dimension of the ≥ |xi∈Ah | | i space spanned by all eigenvectors of Ω with eigenvalues a . a” . ≥ ≥ Now consider the case that k = dim +1. From Eq. (5), An alternative definition for #BQP is the following: using the fact that N (dim +1)+1A = dim , we have − A R Definition 3 (#BQP, alternate definition). Consider a λdim A+1 = min max x Ω x verifier Ω with the property that there exist subspaces Mdim R |xi∈Mdim Rh | | i A⊕ = CN (N =2n) such that ψ Ω ψ a for all ψ , max x Ω x Rand ψ Ω ψ b for all ψ h | |, wherei≥ again |a i ∈b A > ≤ |xi∈Rh | | i 1/poly(h |n)|.i Then ≤ #BQP(|a,bi) ∈consists R of all problems− of b . ≤ the form “compute dim ”. A Thus we have Note that dim is well-defined: Consider two decom- positions CN = A and CN = ′ ′. Without loss λdim A a>b λdim A+1 , (7) A ⊕ R A ⊕ R ≥ ≥ 6 since a b 1/poly(n). It follows that λdim A is the E2. Then, the problem #lh #lh(E1 E0) (sharp smallest− eigenvalue≥ of Ω which is still larger than a, and local Hamiltonian) is to compute≡ the dimension− of the therefore the span of the first dim eigenvectors of Ω eigenspace with eigenvalues E1. is equal to the span of all eigenvectorsA with eigenvalue ≤ #lh a. The equivalence follows.  Note that depends on the “energy splitting” ≥ E1 E0 of the low-energy subspace. In particular, for E − E = 0, #lh(0) corresponds to computing the de- The class #BQP(a,b) inherits the useful property of 1 − 0 strong error reduction from QMA: the thresholds (a,b) generacy of the ground state subspace. As we will see #lh can be amplified to (1 2−r, 2−r), r = poly(n) while in what follows, the class (σ) is the same for any keeping the size of the proof:− splitting exp( poly(n)) σ 1/poly(n). We now show− that #lh≤ ≤and dos are both #BQP- Theorem 5. Let #BQPn(a,b) denote #BQP with an complete. We do so by giving reductions from n qubit witness. Then #BQPn(a,b) #BQPn(1 #lh(1/poly(n)) to dos, from dos to #BQP, and from 2−r, 2−r) for every r poly(n). ⊂ − #BQP to #lh exp( poly(n)) ; this will at the same ∈ time prove the claimed− independence of #lh(σ) of the  This follows directly from the strong amplification pro- splitting σ. cedure presented in [8], which describes a procedure to amplify any verifier map Ω such that any eigenvalue Theorem 9. #lh(1/poly(n)) reduces to dos. above a (below b) is shifted above 1 2−r (below 2−r) at Proof. If we denote the parameters of the #lh problem an overhead polynomial in r. − by E˜ , E˜ , E˜ , then we can simply relate them to the Using Thm. 5, we will write #BQP instead of 0 1 2 parameters E , E , ∆ofa dos problem by ∆ = E˜ E˜ , #BQP(a,b) from now on, where a b > poly(n), and 1 2 2 1 E = E˜ 1 ∆ and E = E˜ + 1 ∆, and the result follows− a, b can be exponentially close to 1 and− 0, respectively. 1 0 2 2 1 2 directly. −

The Complexity of the Density of States Theorem 10. dos is contained in #BQP. Proof. We now use the class #BQP to characterize the com- We start with a k-local Hamiltonian H as in plexity of the density of states problem and the problem Def. 7. Now define a new Hamiltonian of counting the number of ground states of a local Hamil- H′ := ν(H2 (E + E )H + E E ) . tonian. We start by defining these problems, as well as − 1 2 1 2 the notion of local Hamiltonian, and then show that both H′ is a 2k-local Hamiltonian; here, ν = 1/poly(n) is problems are #BQP-complete. chosen such that each term in H′ is subnormalized. Any eigenvalue of H in the interval [E + ∆ ; E ∆ ] translates Definition 6 (k-local Hamiltonian). Given a set of 1 2 2 2 into an eigenvalue of H′ which is below − poly(n) quantum spins each with dimension bounded by a constant, a Hamiltonian H for the system is said to ∆ ∆ A := ν 2 (E2 E1 2 ) 1/poly(n) , be k-local if H = i Hi is a sum of at most poly(n) − − − ≤− Hermitian operators Hi, Hi 1, each of which acts whereas any eigenvalue outside [E ∆ ; E + ∆ ] trans- P k k ≤ 1 2 2 2 nontrivially on at most k spins. lates into an eigenvalues of H′ above−

Note that k-local does not imply any geometric local- ∆ ∆ B := ν (E2 E1 + ) 1/poly(n) . ity, only that each spin interacts with at most k 1 other 2 − 2 ≥ − spins for any given interaction term. However, we re- The original dos problem now translates into counting ′ strict ourselves to k = O log(n) so that each Hi can be the number of eigenstates of H with negative energy, specified by an efficient classical description. given a spectral gap in a 1/poly(n) sized interval [A; B]  around zero. We now use the circuit which was used in [5] Definition 7 (dos). Let E E > 1/poly(n), ∆ = 2 − 1 to prove that log-local Hamiltonian is in QMA; it accepts (E2 E1)/poly(n), and let H = i Hi be a k-local Hamil- any input state ψ with probability tonian− such that H has no eigenvalues in the intervals | i ∆ ∆ ∆ P ∆ ′ [E1 , E1 + ] and [E2 , E2 + ]. Then, the prob- 1 ψ H ψ − 2 2 − 2 2 p( ψ )= h | | i , lem dos (density of states) is to compute the number | i 2 − 2m of orthogonal eigenstates with eigenvalues in the interval ′ [E , E ]. where m = poly(n) is the number of terms in H . [The 1 2 ′ idea is to randomly pick one term Hi in the Hamiltonian Definition 8 (#lh). Let E E < E , with E E > and toss a coin with probability (1 ψ H′ ψ )/2.] 0 ≤ 1 2 2 − 1 − h | i| i 1/poly(n), and let H = i Hi be a k-local Hamiltonian Computing the answer to the original dos problem s.th. H E0, and H has no eigenvalues between E1 and then translates to counting the number of states with ≥ P 7 acceptance probability a = 1 + A , given that there As we show in Lemma 12, the total Hamiltonian H has ≥ 2 2m are no eigenstates between a and b = 1 + B , and since a spectral gap 1/poly(n) above the dim –dimensional 2 2m A a b = (A B)/2m 1/poly(n), this shows that this ground state subspace. However, Hfinal is not a local number− can− be computed≥ in #BQP.  Hamiltonian, but as we argue in the following, it can be std replaced by the usual term Hfinal = 0 0 1 ½ T T T while keeping the ground space dimension| ih | ⊗ (up⊗ to | ih small| Theorem 11. #lh exp( poly(n)) is #BQP-hard. − splitting in energies) and the 1/poly(n) spectral gap. As Proof. To show #BQP -hardness of #lh, we need we prove in Lemma 13, QMA std to start with an arbitrary verifier circuit U = ½ Hfinal Hfinal √ǫ . (12) UT ...U1 and construct a Hamiltonian with as many ≥ − std ground states as the circuit has accepting inputs. By Thus, replacing Hfinal by Hfinal will decrease the energy of any excited state by at most √ǫ = O(exp( p(n)/2)). amplification, we can assume that the acceptance and re- − jection thresholds for the verifier are a =1 ǫ and b = ǫ, (The energy of the ground states is already minimal and where we can choose ǫ = O(exp( p(n))) for− any polyno- cannot decrease.) On the other hand, the energy of any mial p(n). As before, let and − be the eigenspaces of proper proof history for H cannot increase by more than A R Ω with eigenvalues a and b, respectively. Define std χ H χ = χ 0 0 ½ χ ǫ = O(exp( p(n)) , ≥ ≤ h | final| i h || ih |1 ⊗ | i≤ − U[ ] := U ψ I 0 A : ψ I (8) due to our choice of acceptance threshold, i.e., the low R { | i | i | i ∈ R} energy subspace has dimension dim . We thus obtain A and denote the projector onto this space by ΠU[R]. No- a Hamiltonian with a dim dimensional ground state tice that for any state χ U[ ], due to our rejection A | i ∈ R subspace with energy splitting ǫ = exp( p(n)) and a threshold b = ǫ, we have 1/poly(n) spectral gap above. ≤ −

χ 1 1 ½ χ ǫ . (9) h | | ih |1 ⊗ | i≤ The following two lemmas are used in the preceding We now follow Kitaev’s original construction to encode proof of Theorem 11. a QMA verifier circuit into a Hamiltonian which has a Lemma 12. H has a spectral gap of size 1/poly(n). “proof history” as its ground state for any proof φ I Proof. Our proof follows closely the discussion in [4, 5]. That is, the ground states of the Hamiltonian| i ∈ Ref. [4], cf. also [11]. We can block diagonalize H by areA given by the (conjugate) action of the following unitary operator, T T Φ = Ut ...U1 φ I 0 A t T (10) | i | i | i | i W = Uj U1 j j T , (13) t=0 ··· ⊗ | ih | j=0 X X where the third register is used as a “clock”. The Hamil- which maps H H′ = W †HW . As this has no effect tonian has the form on the spectrum,→ we can work with the simpler H′ from now on. T Let us explicitly write the effect of conjugation by W ′ H = Hinit + Hevol(t)+ Hfinal (11) on the terms of H. The first term is unaffected, Hinit = ′ t=1 H . The final term becomes H = Π 0 0 A X init final R ⊗ | ih | ⊗ T T T , where Π is simply the projector onto the space where R | ,ih and| the ancillas are in the correct initial state.

R We can now conjugate each of the terms in H (t) ½ Hinit = ½I ( 0 0 A) 0 0 T checks that evol • the ancilla is⊗ property− | ih initialized,| ⊗ | ih penalizing| states separately. For example, the first term gives without properly initialized ancillas; † W (Ut t t 1 )W = ½ t t 1 . (14) ⊗ | ih − | ⊗ | ih − | 1 1 † H (t)= Ut t t 1 T U t 1 t T • evol − 2 ⊗ | ih − | − 2 t ⊗ | − ih | The other terms are exactly analogous, and we find that

1 1 ½ + ½ t t T + t 1 t 1 T ′ 1 2 2 H (t)= ½ t 1 t 1 + t t ⊗ | ih | ⊗ | − ih − | evol ⊗ 2 | − ih − | | ih | checks that the propagation from time t 1 to t is t t 1 t 1 t . correct, penalizing states with erroneous− propaga- − | ih − | − | − ih | tion; The total evolution Hamiltonian is then block-diagonal a matrix which looks like a hopping Hamiltonian in the H = Π T T T causes each state φ built • final U[R] ⊗| ih | | i clock register, from an input ψ I (but which nonetheless has | i ∈ R ′ a correctly initialized ancilla) to receive an energy H (t)= ½ E, (15) evol ⊗ penalty. t X 8 where the (T + 1)-by-(T + 1)–dimensional tri-diagonal Proof. We begin by recalling the result due to Jor- matrix E is given by dan [17] (see Ref. [18] for a more modern treatment) 1 1 for the simultaneous canonical form of two projectors. 2 − 2 In the subspace where P and Q commute, both opera- 1 1  2 1 2  tors are diagonal in a common basis and the spectrum − − is either (0, 0), (0, 1), (1, 0), or (1, 1), and direct sums of  .  E =  1 ..  . (16) those terms. In the subspace where they don’t commute,  − 2    the problem decomposes into a direct sum of two-by-two  1 1   − 2  blocks given by    1 1   − 2 2  1 0 c2 cs  ′  P = ,Q = , (18) To discuss the spectrum of H , let j 0 0 j cs s2     T +1 1 = 0 0 A C , 2 2 S A ⊗ | ih | ⊗ where s = sin(θj ) for some angle θj , c + s = 1, and the T +1 2 = 0 0 A C , subscript j just labels a generic block. S R ⊗ | ih | ⊗ In fact, this two-by-two block form is completely gen- and the orthogonal complement of ; i.e., 3 1 2 1 eral if we allow embedding our projectors into a larger correspondsS to evolutions starting fromS good⊕ S proofs, S 2 space while preserving their rank. The rank-preserving to those starting from wrong proofs, and to evolutionsS 3 condition guarantees that our bound is unchanged, since with wrongly initialized ancillas. Note thatS H′ = H S1 we are only appending blocks of zeros, and so we will H H , thus, we can analyze the spectrum for H| ⊕ |S2 ⊕ |S3 |Sp consider this two-by-two form without loss of generality. separately. Note that the restriction to p does not affect ′ S The constraint that Q(½ P )Q ∞ ǫ implies con- Hevol(t). Since we expect the ground state subspace to k − k ≤ straints on the values that sin(θj ) can take. In particular, occur on 1, we need to compute ground state energy S ′ we can directly compute this operator norm in each block and gap of H S1 , as well as lower bound the ground | ′ ′ separately, and we find that for all j state energies of H S2 and HS3 . ′ |′ ′ First, H S = H S = 0, i.e., the spectrum of H S 2 init final Qj(½ Pj )Qj ∞ = sin (θj ) ǫ . (19) equals the spectrum| of E|, which can be straightforwardly| k − k ≤ determined to be 1 cos ωn, with ωn = nπ/(T + 1), and We can also directly compute in each block that −1 3 eigenfunctions (cos 2 ωn, cos 2 ωn,... ); the ground state degeneracy is indeed dim as desired. 1 c2 1 cs ′ A ′ Pj Qj = − − 2 . (20) On the other hand, Hfinal S2 = 1, and Hinit S3 1, i.e., − cs s | ′| ≥  − −  in both cases the ground state energy of H Sp is lower bounded by the ground state energy of | The spectrum of this operator is easily computed to be sin(θj ) . Thus, the least eigenvalue of P Q is 1 1 ±| | − 2 2 bounded from below by √ǫ.  − −  1 1 1  − 2 − 2 ′  .  E =  1 ..  ,  − 2  Quantum vs. Classical Counting Complexity    1 1   − 2    #BQP  1 3  We finally want to relate to the classical count-  − 2 2  ing class #P. It is clear that any #P problem can be   1 #BQP which has eigenvalues 1 cos ϑn, with ϑn = (n+ 2 )π/(T + solved in by using a classical circuit. We will 3 − 1 3 #BQP #P 2 ), and eigenfunctions (cos 2 ϑn, cos 2 ϑn,... ). now show that conversely, can be reduced to It follows that H′ (and thus H) has a ground under weakly parsimonious reductions: That is, for any state energy of 1 cos ω0 = 0, and a gap function f #BQP there exist polynomial-time com- π − 2 ∈ 1 cos 2T +3 = O(1/T ) = O(1/poly(n)) above. putable functions α and β, and a function g #P, such  − that f = α g β. This differs from Karp∈ reductions where no postprocessing◦ ◦ is allowed, α = Id, but still only It remains to prove Eq. (12), which follows from the requires a single call to a #P oracle, in contrast to Turing following Lemma by choosing P = 0 0 1 ½, Q = ΠU[R], reductions. and using Eq. (9). | ih | ⊗ Theorem 14. There exists a weakly parsimonious re-

Lemma 13. Let P and Q be projectors such that Q(½ #BQP #P k − duction from to . P )Q ∞ ǫ. Then k ≤ Proof. We start from a verifier operator Ω for a #BQP

P Q √ǫ½ . (17) − ≥− problem. First, we use strong error reduction to let a = 9

1 2−(n−2) and b =2−(n+2). It follows that and note that g(ζ) is a positive and integer-valued func- − tion satisfying 1 dim tr Ω 2n2−(n+2) = (21) | A− |≤ 4 2−|ζ|−2 g(ζ) 1 f(ζ) 1 . (25) and thus we need to compute tr Ω to accuracy 1/4. This − − ≤ 4 ζ ζ can be done using the “path integral” method previously  X  X used to show containments of quantum classes inside PP Finally, by defining a boolean indicator function, and #P [13]. We rewrite tr Ω = ζ f(ζ), where the sum is over products of transition probabilities along a path, which we label P 1 if 0 ξ

iT 0 0 ½ iT iT UT U1 i0 I 0 A . 1 ζ ξ,ζ h | | ih | ⊗ | ih | ··· | i | i X X (cf. Fig. 1 in the main manuscript for an illustration). Since any quantum circuit can be recast in terms of real This shows that trΩ can be approximated to accuracy 1 gates at the cost of doubling the number of qubits [19], , and thus dim can be determined by counting the 4 A we can simplify the proof by assuming f(ζ) to be real. number of satisfying assignments of a single boolean To achieve the desired accuracy it is sufficient to approx- function h(ζ, ξ) that can be efficiently constructed from imate f up to ζ + 2 digits, where ζ = poly(n) is the Ω, i.e., by a single query to a black box solving #P number of | in| ζ. Now define | | problems, together with the efficient postprocessing described by Eq. (25).  g(ζ) := round 2|ζ|+2(f(ζ)+1) (24)