<<

Quantum for classical lattice models

G. De las Cuevas and W. D¨ur Institut f¨urTheoretische Physik, Universit¨atInnsbruck, Technikerstraße 25, A-6020 Innsbruck, Austria Institut f¨urQuantenoptik und Quanteninformation der Osterreichischen¨ Akademie der Wissenschaften, Innsbruck, Austria

M. Van den Nest Max-Planck-Institut f¨urQuantenoptik, Hans-Kopfermann-Str. 1, D-85748 Garching, Germany

M. A. Martin–Delgado Departamento de F´ısica Te´orica I, Universidad Complutense, 28040 Madrid, Spain (Dated: October 23, 2018) We give efficient quantum algorithms to estimate the partition function of (i) the six vertex model on a two–dimensional (2D) square lattice, (ii) the Ising model with magnetic fields on a planar graph, (iii) the Potts model on a quasi 2D square lattice, and (iv) the Z2 lattice gauge theory on a three– dimensional square lattice. Moreover, we prove that these problems are BQP–, that is, that estimating these partition functions is as hard as simulating arbitrary quantum computation. The results are proven for a complex parameter regime of the models. The proofs are based on a mapping relating partition functions to quantum circuits introduced in [Van den Nest et al. Phys. Rev. A 80, 052334 (2009)] and extended here.

pacs: 03.67.-a, 03.67.Lx, 75.10.Hk, 75.10.Pq, 02.70.-c example, for the Ising model, Barahona [4] showed that computing its partition function in three dimensions (3D) is computationally very hard—to be precise, it is #P– I. INTRODUCTION complete, which is, colloquially speaking, the counting version of NP [8]. This was an important contribution Ising models are paradigmatic in analytical and nu- that settled the issue for those trying to tackle the prob- merical studies of phase transitions [1,2]. Their virtue lem after Onsager’s success in solving the Ising model in is being simple enough to handle but nonetheless com- two dimensions (2D) [9]. plex enough to capture the relevant physics. The same is Further, one can raise the question of how hard it is true for other emblematic classical models, like the to compute the partition function of these models on a Potts model [3], or the six vertex model [4], which serve quantum computer. Quantum computers are known to as toy models for certain physical systems. As a matter offer a speedup over their classical counterparts in certain of fact, their applicability extends beyond physics, since algorithms. Notably, the factoring problem is known to spin models are used in the study of neural networks be feasible by a quantum computer [10], while it remains [5], biology [5] and, more generally, statistical mechani- intractable in known classical algorithms. Roughly cal tools are also applied in economics [6]. The reason lies speaking, ‘feasible’ means that the resources (in time and in the fact that these models study classical degrees of space) required to solve it scale polynomially with the freedom (“spins”) which interact with each other (possi- size of the input of the problem, and intractable means bly in many–body interactions), and this general scheme that they may scale exponentially. The quantum com- can serve as an abstract model for a wide class of systems. putational complexity of classical spin models has been The central problem in the study of these models in addressed, for example, in [11], where a quantum algo- equilibrium is the computation of their partition func- rithm for the Ising partition function was presented (see βH(s) tion := s e− , where H(s) is the Hamiltonian also [12–16] for related work). Further, in [17] it was arXiv:1104.2517v1 [quant-] 13 Apr 2011 Z (or: “energy function”), β is defined as β := 1/(kBT ) proven that computing the partition function of the Potts P where kB is Boltzmann’s constant and T is the tempera- model is BQP–complete (see also [18, 19]). BQP stands ture, and s is the spin configuration. As is well known in for bounded–error quantum polynomial time, and, collo- statistical mechanics, this function captures all relevant quially speaking, is the class of decision problems that physical properties, since any thermodynamical quantity can be efficiently approximated by a quantum computer, (such as the magnetization or the mean energy) can be and the hardest problems in this class are called BQP– derived as a function of [7]. In other words, knowl- complete. This situation contrasts with that of a different edge of as a function ofZ the parameters of the system class of classical spin models, namely lattice gauge the- Z amounts to complete knowledge of the thermal proper- ories with gauge group Z2 [20], for which, to the best ties of the system. Thus, it is natural to investigate the of our knowledge, no results are known concerning their computational complexity (colloquially speaking: the ef- quantum computational complexity. These are models fort in terms of resources) required to compute or ap- with “Ising variables” (i.e. classical degrees of freedom proximate . The emblematic models mentioned above with two states) but which nonetheless exhibit local sym- have receivedZ most of the attention in this direction. For metries [21, 22]. 2

In this paper we tackle the question of the quantum approximate the partition function of these models with computational complexity both of several paradigmatic polynomial accuracy. Moreover, weZ show that estimating classical spin models as well as of a Z2 lattice gauge the- these partition functions is BQP–complete, that is, it is ory. Our approach builds upon a mapping between par- as hard as simulating arbitrary quantum computation. tition functions and quantum circuits introduced in [23]. Finally, as an extension of our results, we show that, if In that work, this mapping is exploited to show, among the Ising model considered above is defined on a lattice others, that estimating the partition function of the six with periodic boundary conditions, then estimating its vertex model and of Ising–type models is BQP–complete. partition function with polynomial accuracy is DQC1– Here we revisit this approach and extend the mapping to hard. This is the representative class of a scheme for standard Ising models, Potts models and to Z2 lattice quantum computation called the ‘one clean model’, gauge theories. Based on that, we provide efficient quan- where all but the first one are initialized in a to- tum algorithms to estimate (with polynomial accuracy) tally mixed state [25]. the partition function of the six vertex model on a 2D This paper is structured as follows. In Sec.II we give a square lattice, the Ising model with magnetic fields on background on classical spin models, as well as on some a planar graph, the Potts model on a quasi 2D square notions of complexity of classical spin models. Then we lattice, and a 3D lattice gauge theory with gauge group review how to define BQP–complete problems as an esti- Z2. Moreover, we show that computing the partition mation of a unitary matrix element (Sec.III). In Sec.IV functions of these models is BQP–complete, that is, it we show how to relate partition functions of classical spin is as hard as simulating arbitrary quantum computation. models with spin circuits, based on [23] and extended Therefore, in this work we put paradigmatic classical spin here. The main results of this work are presented in models and Z2 lattice gauge theories on an equal foot- Sec.V, where we show the BQP–completeness of the six ing as far as their quantum computational complexity is vertex model, the Ising model, the Potts model, and of concerned. the 3D lattice gauge theory with gauge group Z2 with However, a word of caution is needed here: our - certain conditions. In Sec.VI we present an extension of sults are valid mostly for a complex parameter regime of the results related to the one–clean–qubit model. Finally, the models. This means that we can prove the complex- we present our conclusions in Sec.VII. ity results only if the coupling strengths of these models have certain imaginary values (this problem is also en- countered in [17, 23]). Note that although such complex II. CLASSICAL SPIN MODELS parameters do not correspond to physical models, the partition function with complex arguments is commonly In this section we will present some general consider- studied, e.g., in the context of evaluating the Tutte poly- ations about classical spin models as well as some facts nomial or finding (complex) zeros of to identify phase concerning their computational complexity. transition points [24]. We also wantZ to stress that our results rely crucially on the fact that an additive approx- imation of the partition function is obtained (in contrast A. General background with a multiplicative approximation or an exact calcula- tion), which, roughly speaking, means that the desired Classical spin models have proven successful to model quantity is approximated with polynomial accuracy. magnetism, where they capture interesting physics such To summarize, the main results of this work are the as critical phenomena despite their simplicity. More gen- following. erally, classical spin models can serve as toy models for Statement of results. Consider the partition func- complex systems. For example, Ising models have been tion of the following classical spin models Z used to model neural networks (see Hopfield networks), or spin glasses (see, e.g., [5]). (i) the six vertex model defined on a rectangular grid Let us now define what is understood by a classical (ii) the Ising model with magnetic fields defined on a spin model. Common to all of them are the following planar graph, ingredients: (iii) the three–level Potts model on a quasi 2D square (i) A degree of freedom represented by a classical spin lattice with certain boundary conditions, and which may take on a set of values: s 0, 1, ..., q 1 . This is a q–level system. ∈ { − } (iv) the Z2 lattice gauge theory on a 3D square lattice, (ii) A lattice, or more generally an arbitrary graph G, defined on a certain complex parameter regime, that is, to which the classical spins are associated. They the value of coupling strength J is, for example, eβJ = i. can sit at the vertices, edges or faces of the graph; Furthermore, consider that there are certain values of the the idea is that the graph encodes the interaction coupling strengths which appear together (i.e. certain sets pattern of the model. The complexity of the model of neighboring spins whose interaction takes a specific is affected by the lattice or graph on which it is value). Then we provide efficient quantum algorithms to defined, as we will see below. 3

(iii) An energy function H(s) depending on a given spin In contrast to vertex models, in edge models the clas- configuration and the coupling strengths represent- sical spins sit at the vertices of the graph, also taking q ing the types of interactions of the model: nearest– possible states, si 0, . . . , q 1 , and interactions take neighbor, many–body interactions, magnetic fields, place along the edges.∈ { Consider,− } thus, a q–state edge etc. model on an n m square lattice with an edge–dependent × e energy function h (si, sj). Let (iv) A partition function which is obtained by sum- e Z e βh (si,sj ) ming over the Boltzmann weights of all spin config- w (si, sj) := e− (4) βH(s) urations, = s e− . Z denote the corresponding Boltzmann weight. Then the From this commonP structure, several different families partition function is given by = we(s , s ). Z s e=ij i j of models can be distinguished. One of the most relevant Concerning Lattice Gauge Theories (LGTs), the most criteria is whether the model exhibits global or local sym- relevant criterion to classify themP is whetherQ the inter- metries (if any). We shall refer to the former as standard nal gauge group is Abelian (discrete like = Zq, or statistical models and to the latter as lattice gauge the- continuous = GU(1)), or non–Abelian (discreteG such ories. This distinction of symmetry has profound conse- G as a permutation group = S3, or continuous such as quences in the physics of the models. It is also related to = SU(N)). We referG the reader to [20] for an in- their range of applicability: standard statistical models Gtroduction to these models. In this work we will fo- appear naturally in descriptions of classes of condensed cus on Z2 LGTs, and we will be in the following fea- matter systems and lattice gauge theories originated in tures: they are models whose classical spins can take the study of the fundamental interactions in nature and two values se 0, 1 , they sit at the edges of a d– particles. dimensional square∈ { lattice,} and they interact along the Dimensionality is another key distinction which deter- faces of this lattice. More precisely, the interaction of mines the complexity of the models. However, note that spins si, sj, sk, at the boundary of face f, ∂f, has the in order to have a well–defined notion of dimension for a form graph G, this must be embedded in a smooth manifold of dimension D. hf (si, sj, sk, sl) = Jf δ(si + sj + sk + sl) , (5) Standard statistical models can be divided into two − big families depending on where the interactions on the where the sums are performed modulo 2 throughout this graph G take place: vertex models and edge models. Ver- section, and δ(0) = 1 and it is 0 otherwise. The Hamilto- tex models were introduced to describe ice–type models, nian is then obtained as a sum over interactions on every crystals with hydrogen bonding or ferroelectrics [4]. Edge face: models were introduced to explain phase transitions in materials with elementary magnetic moments [26, 27]. H(s) = hf ( se : e ∂f ) , (6) − { ∈ } A vertex model consists of classical spins, namely q– Xf level particles se 0, 1, . . . , q 1 , which are placed on the edges of the∈ lattice, { and (typically− } many–body) in- where ∂f denotes the boundary of face f. teractions take place on the vertices. In the case of a These models exhibit Z2 gauge symmetry; more pre- (tilted) 2D lattice, one deals with four–body interactions cisely, its Hamiltonian is invariant under Z2 operations between neighboring particles, and each of the spins par- around any vertex, gv = e inc v Xe, where e inc v ∈ ∈ denotes all edges incident to vertex v, and Xe is a flip ticipates in only two interactions. The Hamiltonian of Q such a system is given by operator, Xe : s s + 1. One can use this symmetry to eliminate some degrees→ of freedom, a process usually re- ferred to as ‘gauge fixing’. A specific choice of this fixing H = ha(s , s , s , s ) , (1) i j k is the ‘temporal gauge’, where all degrees of freedom in a V X∈ one particular direction (the one associated with time) a are fixed. A restriction about gauge fixing that concerns where h (si, sj, sk, sl) is a (local) four–body interaction us is the fact the edges whose variable has been fixed by term between the spins si, sj, sk, sl sitting at the edges incident to vertex a. We denote the Boltzmann weight the gauge cannot form a closed loop [28]. This fact will associated with this local energy as be important in our proof of the BQP–completeness of this model in Sec.VD. a a βh (si,sj ,sk,sl) w (si, sj, sk, sl) := e− . (2)

The partition function is obtained by multiplying all lo- B. Classical computational complexity of spin cal Boltzmann weights, and summing these over all spin systems configurations s, In this section we will be interested in the classical = wa(s , s , s , s ) . (3) computational complexity of the classical spin models Zvm i j k l s a presented in Sec.IIA. Generally speaking, understanding X Y 4 the properties of, say, the Ising model on some graph is a (i) Given a graph G and an integer K, deter- difficult task. This is reflected by the fact that the Ising mine whether the ground state energy of H(s) = and other models are associated with hard problems in e=ab sasb is smaller than K. computational complexity theory [4]. For concreteness (ii) Given a planar [40] graph G and an integer K, de- we will focus in the following on the Ising model, but the P termine whether the ground state energy of H(s) = considerations in this section have general relevance. s s + s is smaller than K. Most prominently, the Ising model is known to be e=ab a b a a associated with computational problems which are NP– WeP remark that,P in the second of these problems, the complete; here NP stands for ‘non-deterministic polyno- presence of the external fields (ha 1) is crucial to mial time’. The NP consists of all deci- obtain NP–completeness. Indeed, it≡ is − known that the sion problems f (i.e. YES/NO questions) which have the ground state energy, as well as the partition function, property that, for every input x for which it is claimed of the Ising model on an arbitrary planar graph with- that f(x) = YES, there exists a ‘short proof’ that this out external fields can be efficiently computed. We also is indeed the case, i.e. a proof which may be efficiently note that the quantum computational complexity of the verified as a function of the size of the input. More pre- Ising model, as will be discussed in Sec.VB, will involve cisely, for each problem f NP it is required that there Ising models on planar graphs in the presence of magnetic ∈ exists an efficiently V (the verifier fields. of the proof) such that: The NP–completeness of the above ground state prob- lems has strong implications for the evaluation of the For every input x, one has f(x) = ‘YES’ if and only corresponding partition functions. First, once the parti- if there exists a poly–size bit string ξ (the witness) tion function of a model can be evaluated efficiently, also satisfying V (x, ξ) = ‘YES’. the ground state energy of the model can be efficiently determined: the evaluation of the partition function is Colloquially speaking, NP problems have the property ‘at least as hard’ as the evaluation of the ground state that, whenever a solution to the problem is proposed energy. Consequently, for the NP–complete Ising mod- (e.g. by an untrusted third party), it is possible to ef- els, the evaluation of their partition function is NP–hard, ficiently verify whether this proposed solution is indeed i.e. at least as hard as any problem in NP. Note, how- correct. Note that in the definition of NP no mention- ever, that the evaluation of the partition function does ing is made of the difficulty of finding a solution; even not belong to the class NP, as it is not a though a problem has an efficient verifier, it is a priori but rather a counting problem. The relevant complexity not excluded that the time required to find a solution class in this case is #P (‘sharp-P’). Given an efficiently scales exponentially with the input size. computable decision problem g (i.e. g P), the problem An archetypical NP problem related to the Ising model of determining how many inputs yields∈ the answer ‘YES’, is the problem of deciding whether the ground state en- represented by the number #g = x : g(x) = ‘YES’ , ergy of H (s) on a graph G (which constitutes the input G defines the complexity class #P. |{ }| of the problem) is below a certain value K. This prob- Since the ground state problems of the Ising models lem is indeed in NP: if the ground state energy of H(s) in Theorem1 are NP–complete, it can be shown that is smaller than K, then the ground state provides a wit- computing the corresponding partition functions are #P– ness which allows to efficiently verify this fact; the verifier complete problems: every problem in #P can be reduced, function is nothing but the energy function H (s). G with polynomial computational effort, to the evaluation Not only is the problem of determining the Ising of the partition function of such an Ising model on some ground state in NP, it is among the hardest problems in graph. This is formulated in the following result: this complexity class. This is reflected by the fact that this problem is known to be NP–complete. This means Theorem 2 [4] The following problems are #P– that every problem in the class NP can be reduced, with complete: only polynomial computational effort in the input size (i) Given a graph G and λ = e β, determine the par- of the problem, to an instance of the Ising ground state − tition function (λ) of the Ising model on G with problem. This implies, in particular, that the existence energy H(s) = Z s s . of an efficient for the Ising ground state prob- e=ab a b β lem would yield an efficient algorithm for all problems in (ii) Given a planarP graph G and λ = e− , determine NP. The NP–completeness of the Ising model thus points the partition function (λ) of the Ising model on Z to an intrinsic computational difficulty of this simple sys- G with H(s) = e=ab sasb + a sa. tem. There are several variants of the Ising ground state P P problem which are known to be NP–complete. We men- III. UNITARY MATRIX ELEMENTS AND tion two of them. BQP–COMPLETENESS

Theorem 1 [4] The following problems are NP– The goal of this paper is to relate the evaluation of par- complete: tition functions to problems which are complete for quan- 5 5 tumtum complexity classes. The main main complexity complexity class class which which canqubits, restrict since all the operations SWAP operation to act on nearest–neighboring can be used to move will be considered is ‘bounded-error quantum quantum polynomial polynomial qubits,distant since qubits the to SWAP nearest–neighbor operation can positions be used (with to move linear time’time’ (BQP), representing the the class class of of decision decision problems problems distantoverhead qubits in the to nearest–neighbor number of qubits). positions Thus, (with one has linear the which can be solved efficientlyefficiently on on a a quantum quantum computer. computer. overheadfollowing. in the number of qubits). Thus, one has the The route we will take to prove BQPBQP–competeness–competeness of of cer- cer- following. taintain partition function problems will will be be to to start start from from a a Theorem 3 The following problem is BQP–hard: standard complete problem for BQP and then to relate Theorem 3 The following problem is BQP–hard: standard complete problem for BQP and then to relate Consider an n–qubit U consisting these problems to the approximation of partition func- these problems to the approximation of partition func- Considerof a polynomial an n–qubit number quantum of two–qubit circuit gatesU consisting acting on tions. The standard BQP–complete problem in question tions. The standard BQP–complete problem in question ofnearest–neighbor a polynomial number qubits. of two–qubit Then provide gates a acting number on c involves estimating matrix elements of unitary quantum involves estimating matrix elements of unitary quantum nearest–neighborsuch that qubits. Then provide a number c circuits, which we briefly discuss here. here. such that Consider a quantum circuit UU actingacting on on nn qubits,qubits, n n 1 c 0 ⊗ U 0 ⊗ (8) which is composed of poly(n) gates acting each on, say, n n 1 which is composed of poly(n)gatesactingeachon,say, c| −"0 ⊗| U 0| ⊗! | ≤ poly(n) (8) at most two qubits. Let 0 , 1 denote the single–qubit | − h | | i | ≤ poly(n) at most two qubits. Let {|0i,|1i} denote the single–qubit computational basis. Then{| ! | there there!} exists exists a a well well known known holds with a probability which is exponentially (in n n holds with a probability which is exponentially (in techniquetechnique to estimate the matrix matrix element element 00⊗ nUU 00 ⊗ ninin n)closeto1. h | ⊗ | i ⊗ n) close to 1. poly–time on a quantum computer, using using the" the| ‘Hadamard ‘Hadamard| ! test’ (see Fig.1 and its caption for a brief a explanation— We provide a few remarks: test’ (see Fig. 1 and its caption for a brief a explanation— We provide a few remarks: we refer to the literature, e.g. [18, 19, 29, 30], for further we refer to the literature, e.g. [17, 18, 28, 29], for further (i) One may adapt the formulation of Theorem 3 in a explanations). More precisely, for any approximation explanations). More precisely, for any approximation (i) Onestraightforward may adapt the way formulation to arrive at of Theorema BQP–complete3 in a scale  which scales at most inverse polynomially with scale ! which scales at most inverse polynomially with straightforwarddecision problem way (i.e. to a arrive problem at thata BQP is–complete both BQP– n, the Hadamard test returns a complex number c which n,theHadamardtestreturnsacomplexnumberc which decisionhard and problem in BQP (i.e.). To a do problem so, one that considers is both circuitsBQP–U satisfiessatisfies hard and in BQP). To do so, one considersn circuitsn U for which it is promised that 0 ⊗n U 0 n⊗ is either for which it is promised that |0" ⊗| U 0| ⊗! is| either n n 1/3or 2/3, and the goal is to decide which of c 0 ⊗nU 0 ⊗ n , (7) 1/3 or 2/3, and the goal|h is| to decide| i | which of |c − h0|⊗ U|0i ⊗ | ≤ !, (7) these≤ two≥ cases holds. | −" | | ! | ≤ these≤ two≥ cases holds. with a success probability that that is is exponentially exponentially (in (in nn)) (ii) BQP–hardness of the matrix element problem in (ii) BQP–hardness of the matrix element problem in close to 1. Theorem 3 is maintained if one considers quantities Theorem3 is maintained if one considers quantities of the form ψ U ψ ,where ψ and ψ are fixed of the form ψ U ψ ", where ψ and ψ " are fixed 0, 1 complete product" | | 0 states,! instead| ! of |0 ! nU 0 n. 0 H H complete producth | | states,i instead| i of |0 i n⊗U 0 n⊗. | ! This is because instances of the former" ⊗| matrix| ⊗! ele- This is because instances of the formerh | matrix| i ele- 0 ment problem can easily be reduced to instances of | ! ment problem can easily be reduced to instances of the latter. This property will be used in Secs. VA, 0 U the latter. This property will be used in Secs.VA, | ! VB and VC...... VB andVC. 0 | ! (iii)(iii)BQPBQP–hardness–hardness is is maintained maintained when when the the circuit circuitUUisis restrictedrestricted to to be be composed composed of of gates gates from from a a strongly strongly FIG. 1: The Hadamard test. This is performed with a FIG. 1: The Hadamard test. This is performed with a universaluniversal elementary elementary gate gate set. set. An An elementary elementary gate gate quantum circuit where the first qubit qubit is is transformed transformed with with a a S consisting of gates acting on at most two qubits is Hadamard gate, then the unitary U is applied to rest of the S consisting of gates acting on at most two qubits is Hadamard gate, then the unitary U is applied to rest of the saidsaid to to be be strongly strongly universal universal if if every every two–qubit two–qubit uni- uni- qubits conditional on the state of of the the first first qubit, qubit, and and then then a a tary operation can be approximated with arbitrary Hadamard gate is applied to the first qubit again. Finally, tary operation can be approximated with arbitrary Hadamard gate is applied to the first qubit again. Finally, accuracy by products of elements from S.Further, this qubit is measured in the σ basis. From the probabil- accuracy by products of elements from S. Further, this qubit is measured in the σzz basis. From the probabil- BQP–hardness is also maintained if, instead of con- ityity to to obtain 0 and 1, p0 and pp1 respectively,respectively, one one can can esti- esti- BQP–hardness is also maintained if, instead of con- 0 1 sidering strongly universal unitary gate sets, gate mate the real part of c (denoted Re( Re()),)), as as they they are are related related sidering strongly universal unitary gate sets, gate by p0 =[1+Re(c)]/2andp1 =[1 Re(c)]/2. To estimate setssets are are considered considered that that are areencodedencodeduniversaluniversal for for by p0 = [1 + Re(c)]/2 and p1 = [1 −Re(c)]/2. To estimate thethe complex part, the circuit is is modified modified− to to include include a a phase phase quantumquantum computation, computation, for for a a suitable suitable notion notion of of en- en- gate P =diag(1= diag(1,,i i))afterthefirstHadamardgateandbe- after the first Hadamard gate and be- codedcoded universality. universality. This This will will be be important important for for our our forefore the the controlled–U gate. The The probabilities probabilities to to measure measure 0 0 proofsproofs in in Secs. Secs.VAVA,VC, VC andandVDVD. . and 1 are then related to the imaginary imaginary part part of of cc (denoted(denoted Im(Im(c)) asp ˜0 =[1= [1 Im(c)]/22and˜ andpp ˜11 == [1 [1 + + Im( Im(cc)])]//22(seealso (see also [17, 18, 28, 29]). − [18, 19, 29, 30]). IV.IV. MAPPINGS MAPPINGS BETWEEN BETWEEN CLASSICAL CLASSICAL LATTICELATTICE MODELS MODELS AND AND QUANTUM QUANTUM CIRCUITS CIRCUITS Moreover, estimating the above above matrix matrix element element prob- prob- lemlem is is BQP–hard, i.e. every decision decision problem problem that that can can InIn this this section section we we review review the the mappings mappings between between classi- classi- be solved eefficientlyfficiently with a a quantum quantum computer computer can can be be calcal lattice lattice models models and and quantum quantum circuits circuits (introduced (introduced and and reduced,reduced, with polynomial (classical) (classical) computational computational ef- ef- usedused in in [23 [22]),]), and and we we will will extend extend them them to to standard standard Ising Ising fort,fort, to the estimation of of such such a a matrix matrix element element with with the the models,models, to to Potts Potts models models and and to toZZ2 2LGTs.LGTs. The The map- map- aforementioned accuracy !..Withoutlossofgeneralitywe Without loss of generality we pingspings will will allow allow us us to to interpret interpret the the partition partition function function can restrict all operations to act on nearest–neighboring of the classical model as a quantum expectation value. 6

L L R 6 of the classical model as a quantum expectation value. L = (s1 , . . . , sn ) and R = (s1 , . . . , sn ), respectively. Us- More precisely, consider a circuit consisting of (uni- ing the spin states as computational basis states, we map tary)More quantum precisely, gates. consider Then a circuit we willC showconsisting that partition of (uni- thesethese to to two twonn–particle–particle quantum quantum states: states: C functionstary) quantumof vertex gates. models, Then we edge will models show that and partitionLGTs Z2 L = LsL ... LsL , functionsZ of vertex models, edge models and LGTs L = s1 1... sn n, are related to matrix elements of certain quantumZ2 cir- ! h| | ! hR |R | ! Rh |R| (12)(12) Z RR == s s1...... s sn. . cuitsare relatedas to matrix elements of certain quantum cir- | | " i | |1 " i | n| " i cuitsC as where we omit the tensor product symbol throughout C where we omit the tensor product symbol throughout = κ L R , (9) thisthis paper. paper. Note Note that, that, since since the the qubits qubits are are processed processed Z = κh L|C| Ri , (9) Z ! |C| " fromfrom right right to to left, left, the the state stateRRservesserves as as input input for for the the where L ( R ) are product states determined by the left circuit, while L constitutes| | the" i readout basis state. where L ( R )areproductstatesdeterminedbytheleft circuit, while L constitutes the readout basis state. (right)h boundary| | i conditions of the classical spin model It is now straightforward| | " i to see that the overlap of the (right)! boundary| | " conditions of the classical spin model It is now straightforward to see that the overlap of the (see below), and κ is a constant depending on the size of resultingresulting state state RRwithwith the the product product state stateL Lis exactlyis exactly (see below), and κ is a constant depending on the size of C|C| " i ! h| | thethe lattice, lattice, i.e. i.e. the the number number of of classical classical spins. spins. thethe partition partition function function of of the the classical classical vertex vertex model, model, L,R L,Rvm==LL RR. . (13)(13) ZZvm ! h|C||C|" i This concludes the mapping between matrix elements of A.A. Vertex Vertex models models This concludes the mapping between matrix elements of quantum circuits and partition functions of classical spin quantum circuits and partition functions of classical spin models. WeWe start start by by considering considering vertex vertex models models (see Sec. IIAII A).). models. Here we essentially follow the argument of [22]. For il- a a Here we essentially follow the argument of [23]. For il- w (si,sj ,sk,sl) W L R L R lustrationlustration purposes, purposes, we we will will concentrate concentrate on a tilted 2D 2D s1 s1 s1 s1 L R ! | | " square lattice. However, our mappings are not restricted s i k s2 L i k R square lattice. However, our mappings are not restricted 2 s2 s2 j l ! | | " toto such such lattices lattices and and are are easily easily generalized generalized to other (reg- (reg- j l ular) lattices. ... ular) lattices...... Our construction begins with the following observa- Our construction begins with the following observa- tion. The local Boltzmann weights (2)associatedtoeach L L R tion. The local Boltzmann weights (2) associated to each s sn s s interaction can be seen as rank–four tensors of dimension n ! n | | n " interaction can be seen as rank–four tensors of dimension q,or,equivalently,asq2 q2 matrices by grouping the q, or, equivalently, as q2 ×q2 matrices by grouping the time indices into left indices (i,× j)andrightindices(k, l). We indicestake the into latter left approach indices (i, to j) associate and right each indices of these (k, matri-l). We FIG.FIG. 2: 2: (Left) (Left) In In a a vertex vertex model, model, particles particles (black (black dots) dots) sit sit takeces the with latter a quantum approach gate to acting associate on two eachq–level of these quantum matri- atat the the edges edges and and interactions interactions (pale (pale red red dots) dots) take take place place in th ine the cesstates with (see a quantum Fig. 2), gate acting on two q–level quantum vertices. (Right) This model is mapped to a quantum circuit, vertices. (Right) This model is mapped to a quantum circuit, states (see Fig.2), where each particle becomes a qubit, and each interaction a where each particle becomes a qubit, and each interaction a a a two–qubit gate. W := w (si,sj,sk,sl) si,sj sk,sl . (10) two–qubit gate. a a | "! | W := s ,s ,s ,sw (s , s , s , s ) s , s s , s . (10) i !j k l i j k l | i jih k l| si,sj ,sk,sl Now we make some remarks concerning this mapping. Note that theX right indices (k, l)correspondtotheinput Now we make some remarks concerning this mapping. Noteof the that gate, the while right the indices left indices (k, l) correspond (i, j)representtheout- to the input (i)(i)ComplexComplex couplings. couplings.NoteNote that that the the quantum quantum gates gates ofput. the gate,The state while is the thus left processed indices from (i, j) right represent to left, the where out- areare specified specified by by the the parameters parameters of of the the classical classical model, namely by the Boltzmann weights of the put.gates The corresponding state is thus to processed outermost from right right vertices to left, are where per- model, namely by the Boltzmann weights of the local interactions. It follows that the gates W a gatesformed corresponding in the first place to outermost [40]. The right corresponding vertices are quan- per- local interactions. It follows that the gates W a (Eq. (10)) are unitary only in certain parameter formedtum circuit in the firstis given place by [41m].layers The corresponding of nearest–neighbor quan- (Eq. (10)) are unitary only in certain parameter C regimes of the interaction wa of the classical spin two–qubit gates (see Fig. 2), regimes of the interaction wa of the classical spin tum circuit is given by m layers of nearest–neighbor model. This will lead to the requirement of com- two–qubit gatesC (see Fig.2), model. This will lead to the requirement of com- = W a . (11) plex parameters in our proof of Sec. VA. C plex parameters in our proof of Sec.VA. a = "W a . (11) (ii) Open and periodic boundary conditions. This map- C (ii) Open and periodic boundary conditions. This map- This can be seen as the contractiona of a tensor network, ping can be easily extended to open boundary con- Y ditions,ping can i.e. be to easily systems extended where the to left open and boundary right spins con- i.e. as a summation over joined indices. For translational ditions, i.e. to systems where the left and right spins This can be seen as the contraction of a tensor network, are ‘free’ and thus fully summed out in the partition invariant models, each of the layers corresponds to the are ‘free’ and thus fully summed out in the partition i.e.transfer as a summation matrix [4]oftheclassicalmodel. over joined indices. For translational function. This is achieved by replacing the left and rightfunction. states ThisL and is achievedR by the by replacing state + then,where left and invariantThus, models, generally each speaking, of the we layers have corresponds mapped a product to the ⊗ n right states1/2| L"q and| R" by the state| "+ ⊗ , where transfer matrix [4] of the classical model. + = q− i=0 i is a superposition over all q of interactions of the classical spin model (which is es- | +" = q 1/2| iq | "i | isi a superposition| i over all q sentiallyThus, generally a partition speaking, function) we to have a contraction mapped a of product quan- single spin− states.i=0 This gives rise to the identity single| i spin states.# This| i gives rise to the identity oftum interactions gates (which of the is essentially classical spin a quantum model circuit). (which is Now es- OBCP n n n vmOBC= q n+ ⊗ n+ ⊗ .n (14) sentiallywe only a need partition to show function) how to to map a contraction the boundary ofspins. quan- Z vm = q! +| ⊗C| "+ ⊗ . (14) We consider an n m lattice with fixed boundary con- Z h | C| i tum gates (which is essentially a quantum circuit). Now Furthermore,Furthermore, periodic periodic boundary boundary conditions conditions can can also also ditions, namely a× lattice whose spins at the left and we only need to show how to map the boundary spins. bebe taken taken into into account account by by summing summing over over the the diagonal diagonal Weright consider boundary an n are fixedm lattice in some with arbitrary fixed boundary configuration con- matrix elements, which results in L L × R R matrix elements, which results in ditions,L =(s1 namely,...,sn )and a latticeR =( whoses1 ,...,s spinsn ), respectively. at the left Us-and PBCPBC ing the spin states as computational basis states, we map vm =Tr(= Tr() .) . (15)(15) right boundary are fixed in some arbitrary configuration ZZvm C C 7 7

(iii) Other geometries. One can also consider other ge- L R L R s1 s s s (iii)ometriesOther geometries. such as vertexOne models can also on consider a 2D tilted other trian- ge- 1 ! 1 | | 1 " h h L ijwij R L i Wij j R gularometries lattice such [31 as], vertex where models six–body on a interactions 2D tilted trian- take s2 s2 s2 s2 v ! | v | " placegular at lattice the vertices [30], where and the six–body Boltzmann interactions weights take can wjk Wjk ...... beplace arranged at the intoverticesq3 andq3 thematrices, Boltzmann corresponding weights can to k ... k 3 × 3 abe quantum arranged circuit into q withq three–bodymatrices, corresponding quantum gates. to L R L R × s3 s3 sn sn Oneaquantumcircuitwiththree–bodyquantumgates. such model is the 32 vertex model [31]. Also ! | | " 3DOne models, such model such is as the models 32 vertex on a model tilted [3D30]. square Also time lattice,3D models, are of such this as type models and on can atilted thus be 3D mapped square lattice, are of this type and can thus be mapped FIG. 3: (Left) In an edge model, particles (black dots) sit at to quantum circuits. In this case, one deals with FIG. 3: (Left) In an edge model, particles (black dots) sit at the vertices and interactions (pale red and blue ellipses) take three–bodyto quantum gates circuits. acting In on this a 2D case, array one of deals quantum with the vertices and interactions (pale red and blue ellipses) take place along the edges. (Right) This model is mapped to a particles.three–body gates acting on a 2D array of quantum place along the edges. (Right) This model is mapped to a particles. quantum circuit, where particles are mapped to qubits, inter- actionsquantum along circuit, the time where direction particles become are mapped single–qubit to qubits, gates inter-, andactions interactions along the perpendicular time direction to time become become single–qubit diagonal two gates,– B. Edge models qubitand interactions gates. perpendicular to time become diagonal two– B. Edge models qubit gates. In the following we will present a mapping for edge In the following we will present a mapping for edge models, also following [23]. Unlike vertex models, in we give some further modifications of the mapping for models, also following [22]. Unlike vertex models, in we give some further modifications of the mapping for edges models interactions take place at the edges, as ex- edge models that will be useful for the following sections. edges models interactions take place at the edges, as ex- edge models that will be useful for the following sections. plained in Sec.IIA. For the mapping we will distinguish plained in Sec. II A.Forthemappingwewilldistinguish (i) Consider that at site i in the lattice a local magnetic between interactions at horizontal or vertical edges. More between interactions at horizontal or vertical edges. More (i)field Consider is present. that atThis site isi representedin the lattice by a an local additional magnetic precisely,precisely, we we associate associate a a qq q matrix to each each horizontal horizontal termfieldh is( present.s )intheenergyfunctionandcorrespond- This is represented by an additional edge e: × i i edge e: ingterm Boltzmannhi(si) in weight the energy function and correspond- ing Boltzmann weight h e W h:= w e(si, sj) sj si , (16) βhi(si) Wee := w (si,sj) sj si , (16) wi(si)=e− , (19) | "#ih || βhi(si) ssi,s,sj wi(si) = e− , (19) X!i j with si =0,...,q 1. We associate to it the follow- 22 22 − andand a aqq qq diagonaldiagonal matrixmatrix to each vertical edge edgeee,, ingwith diagonalsi = 0,q . . . ,q qmatrix1. We associate to it the follow- × × ing diagonal q× q−matrix vv ee × WWe :=:= ww ((ssii,,s sj) si,,s sj sii,s, sjj .. (17)(17) W := w (s ) s s . (20) e | "#ih || i i i | i"# i| ssii,s,sjj W :=si w (s ) s s . (20) X! i ! i i | iih i| si TheThe matrices matrices WWhh andand WWvv will be regarded as as (possi- (possi- Now a mapping toX a quantum circuit can be estab- ee ee C blybly non–unitary) non–unitary) quantum quantum gates acting on on a a single, single, re- re- lishedNow ain mapping a similar to fashion a quantum as above, circuit with thecan distinc- be estab- spectivelyspectively a a pair, pair, of of qq–level–level quantum systems. We We now now tionlished that in each a similar layer fashion associated as above, with a with sliceC the of verti- distinc- considerconsider a a 1D 1D quantum quantum system system composed of of nqn q–level–level caltion edges that now each consists layer associated of a product with of the a slice associated of verti- v systemssystems and and the the quantum quantum circuit circuit acting on on this this system system two–qubitcal edges gatesnow consistsWe and of the a productassociated of single–qubit the associated C asas depicted depicted in in Fig. Fig.3.3.Thecircuit The circuit C consists of of alternat- alternat- gatestwo–qubitWi.Notethat,asallsuchgatesarediagonal gates W v and the associated single–qubit C e inging layers layers of of operations operations associated associated with the the horizontal horizontal operations,gates Wi. thereNote that,is no problemas all such regarding gates are operator diagonal and vertical edges of the 2D lattice. Each round of ordering.operations, With there this is choice no problem of ,itcanreadilybe regarding operator and vertical edges of the 2D lattice. Each round of C C associatedassociated with with a a layer layer of of horizontal edges consists consists of of aC a verifiedordering. that With the associated this choice partition of , it function can readily can be product of one–local operators W h,whereaseveryround be written as (18). C product of one–local operators We , whereas every round verified that the associated partition function can associatedassociated with with a a layer layer of of vertical edges is is a a product product of of be written as (18). v (ii) These mappings may be easily generalized to graphs (commuting)(commuting) two–local two–local operations operations Wev.Wedefinecom-. We define com- putational basis states L and R associatede to the left (ii)other These than mappings the 2Dlattice, may be also easily similarly generalized as for to vertex graphs putational basis states |L" and |R" associated to the left models (see Sec. IV A remark (iii)). In particular, andand right right boundary boundary conditions, conditions,| i | respectively,i analogously analogously other than the 2D lattice, also similarly as for vertex to Eq. (12). With these definitions, one has the following belowmodels we (see will Sec. considerIVA remark the following (iii)). class In particular, of sub- to Eq. (12). With these definitions, one has the following graphs of the 2D square lattice: a graph G is said to correspondence: below we will consider the following class of sub- correspondence: be a planar circuit graph if it can be obtained from graphs of the 2D square lattice: a graph G is said to L,R = L R . (18) an n m rectangular grid (for some n and m)by L,Rem be a×planar circuit graph if it can be obtained from Zem = #L|C|R" . (18) deleting asubsetofvertical edges and contracting Z h |C| i an n m rectangular grid (for some n and m) by This equation is readily verified by employing the defini- asubsetof× horizontal edges. We call n the vertical This equation is readilyh verifiedv by employing the defini- deleting a subset of vertical edges and contracting tions of gates Whe and Wev . dimension of G;notethatthisquantityisuniquely tionsWe of emphasize gates We thatand theWe comments. concerning the map- defineda subset for of everyhorizontal planar circuitedges. graph. We call Similarn the as vertical for pingWe emphasize for vertex that models the comments apply to concerning this mapping the map-with thedimension 2D square of lattice,G; note one that can this associate quantity a quantum is uniquely pingstraightforward for vertex modifications: models apply unitary to this gates mapping lead to com- with circuitdefined forwith every every planar planar circuit circuit graph. graph; Similar more pre- as for straightforwardplex coupling strengths modifications: (see Sec. unitaryIV A gatesremark lead (i)), to com- and cisely,the 2D suchC square circuit lattice, acts nq one–level can associate systems, a and quantum one plex coupling strengths (see Sec.IVA remark (i)), and circuit with every planar circuit graph; more pre- the mapping can be extended to open and periodic associatesC each horizontal and vertical edge e with the mapping can be extended to open and periodic cisely, suchh circuit actsv n q–level systems, and one boundary conditions (see Sec. IV A remark (ii)). Now the gates We and We ,respectively.Furthermore, boundary conditions (see Sec.IVA remark (ii)). Now associates each horizontal and vertical edge e with 8

h v 8 the gates We and We , respectively. Furthermore, where δ(0) = 1 and it is 0 otherwise. We shall later local magnetic fields acting on the particles can also consider a more general form of this interaction: local magnetic fields acting on the particles can also where δ(0) = 1 and it is 0 otherwise. We shall later be easily incorporated by associating a gate Wi with be easily incorporated by associating a gate W with considere a more general form of this interaction: each vertex i; see Fig.4 for an example. Thisi map- h (u, v) = Ju=vδ(u v) Ju=v(1 δ(u v)) . (25) − − − 6 − − each vertex i;seeFig.4 for an example. This map- e ping will be relevant in Sec.VB. h (u, v)= Ju=vδ(u v) Ju=v(1 δ(u v)) . (25) ping will be relevant in Sec. VB. This amounts− to a shift− of− the! interaction− − energy which Thisdoes amounts not change to a the shift physics. of the interaction Let s denote energy the spin which state L R L R of all particles: s = (u, v, . . .). Then the Hamiltonian of s1 s s s does not change the physics. Let s denote the spin state 1 ! 1 | h | 1 " wi wij Wi We ofthe all particles: Potts models =( isu, a v, sum . . .). of Then these the two–local Hamiltonian terms of over L R L R s2 s2 s2 s2 theall Potts edges model is a sum of these two–local terms over w ! | v | " jk We all edges ...... H(s) = he(u, v) . (26) L L e s sR s sR H(s)= e hE(u, v) . (26) 3 3 n n ∈ ! | | " e EX #∈ time C. Lattice gauge theories FIG.FIG. 4: 4: (Left) (Left) Edge Edge model model with with magnetic magnetic fields fields defined defined on on a a C. Lattice gauge theories planarplanar circuit circuit graph. graph. The The latter latter is is obtained obtained from from a rectangua rectangu-- lar grid by deleting some vertical edges and contracting some Now we focus on another family of models, namely Z2 lar grid by deleting some vertical edges and contracting some Now we focus on another family of models, namely Z2 horizontal ones. (Right) This model is mapped to a quantum LGTs (see Sec.IIA), and we will introduce mappings for horizontal ones. (Right) This model is mapped to a quantum LGTstheir (see partition Sec. II functions.A), and we will introduce mappings for circuit:circuit: particles particles are are mapped mapped to to qubits, qubits, and and horizontal horizontal and and theirWe partition shall restrict functions. the following discussion to a 3D verticalvertical edge edge interactions interactions are are mapped mapped to to single–qubit single–qubit (non (non–– Z2 diagonal) and two–qubit diagonal gates, respectively, and lo- We shall restrict the following discussion to a 3D Z2 diagonal) and two–qubit diagonal gates, respectively, and lo- LGT with the temporal gauge. As explained in Sec.IIA, cal interactions (e.g. magnetic fields) are mapped to single– LGTfixing with this the gauge temporal is achieved gauge. As by explained fixing all in spins Sec. lyingII A, on cal interactions (e.g. magnetic fields) are mapped to single– fixing this gauge is achieved by fixing all spins lying on qubit diagonal gates. edges with a specific direction of the lattice (the ‘time’ qubit diagonal gates. edges with a specific direction of the lattice (the ‘time’ direction). However, the mapping can be generalized in direction). However, the mapping can be generalized in In this paper we will be interested in two particular a straightforward manner to 3D LGTs with another In this paper we will be interested in two particular astraightforwardmannerto3D ZLGTs2 with another edge models: the Ising model and the Potts model. We gauge fixing of the spins—weZ will2 return to this com- edge models: the Ising model and the Potts model. We gauge fixing of the spins—we will return to this com- now specialize the above discussion to the case of the 2D ment below and in Sec.VD. Because of the temporal now specialize the above discussion to the case of the 2D ment below and in Sec. VD.Becauseofthetemporal Ising model. We consider the Ising with magnetic fields Ising model. We consider the Ising with magnetic fields gaugegauge fixing, fixing, interactions interactions in inthe the time time direction direction are aretwo–two– defined on (sublattices of) a 2D square lattice. The inter- defined on (sublattices of) a 2D square lattice. The inter- bodybodyinteractions,interactions, whereas whereas those those in the in the spatial spatial direction direction action between spins s and s located at the endpoints action between spins is and js located at the endpoints (i.e.(i.e. in in faces faces without without an an edge edge in thein the time time direction) direction) re- re- of edge e =(i, j)isgivenbyi j of edge e = (i, j) is given by mainmain four–body four–body interactions interactions as asoriginally. originally. To To construct construct thethe mapping, mapping, we we proceed proceed similarly similarly as asabove. above. We We asso- asso- hhe(s(si,s,j s)=) = JeJδ(δs(is++sjs) ,) , (21)(21) ciate the Boltzmann weight of the two–body interaction e i j −− e i j ciate the Boltzmann weight of the two–body interaction atat the the temporal temporal face face andand the the contribution contribution of of the the magnetic magnetic field field at at site sitei isi is t t βhfβh(sif,s(sji),sj ) wfw(sfi(,ssij,):= sj) :=e− e− , , (27)(27) hhi(s(is)=) = hhiδ(δs(is) .) . (22)(22) i i − i i − with a single–qubit (non–diagonal) gate W t, t with a single–qubit (non–diagonal) gatefWf , HereHere the the spin spin states statessisimaymay take take values values 0 0and and 1, 1, the the sums sums areare performed performed modulo modulo 2 2 and and as as before beforeδ(0)δ(0) = = 1 1 and and it it t t Wf :=t wf (sti,sj) sj si . (28) is 0 otherwise. Further, J and h are constants which Wf := wf (si, s| j)#$sj | si . (28) is 0 otherwise. Further, Je eand hi iare constants which si,sj | ih | s ,s representrepresent the the strengths strengths of of the the pairwise pairwise interaction interaction and and #Xi j Further, the Boltzmann weight of the four–body interac- magneticmagnetic field, field, respectively. respectively. With With the the definitions definitions (16 (16), ), Further, the Boltzmann weight of the four–body interac- (17)and(20), we have tion at the spatial face (17) and (20), we have tion at the spatial face s βhf (si,sj ,sk ,sl) βJ w (si,sj,sk,sl):=e− (29) eβJe e 1 f hh e 1 v v βJβJe βJβJe s βhf (si,sj ,sk,sl) WWe == βJ ,W,We=diag(= diag(e e e , 1,,11,,e1, e e ) ,) , wf (si, sj, sk, sl) := e− (29) e 1 eβJe e e s 1 e is mapped to a four–qubit diagonal gate Wf ! βh " (23)(23) eeβhi i 00 is mapped to a four–qubit diagonal gate W s WWi == . . f i 010 1 W s := ws (s ,s ,s ,s ) ! " f f i j k l × s si,sj ,sk,sl s Wf := # wf (si, sj, sk, sl) NowNow we we concentrate concentrate on on the the mapping mapping for for the the Potts Potts × si,ss ,sj,s,sk,s,s l si,sj,sk,sl . (30) model.model. Given Given a a graph graphGGwithwith vertex vertex set setV Vandand edge edge | i Xj k l #$ | set E, the Potts model [3] consists of q–level particles si, sj, sk, sl si, sj, sk, sl . (30) set E,thePottsmodel[3]consistsofq–level particles This mapping is illustrated| in Fig.ih5.Asbefore,itfollows| sitting at the vertices of G and interacting along the s t sitting at the vertices of G and interacting along the that the partition function = s f wf wf is mapped edges of G. Let u, v denote two such q–level particles Thus, this maps the 3DZZ2 LGTs t to a quantum circuit edges of G.Letu, v denote two such q–level particles to a quantum a circuit = f Wf Wf .LetL, R denote u,u, v v 00,,11,...,q, . . . , q 11,whichinteractalongedge, which interact along edgee.Thene. Then where a 2D array of qubitsC is processed$ % in the time direc- ∈ { − } the left and right boundaries, respectively, as in Eq. (12). thethe Potts–type∈ Potts–type{ interaction interaction− } is is of of the the form form tion with single–qubit gates,% and in the spatial direction Thenwith our (diagonal) mapping four–qubit reads gates (see Fig.5). As before, ee L,R s t hh(u,(u, v v)=) = JJδe(δu(u v)v.) . (24)(24) it follows that the partition= L functionR . = s (31)f wf wf −−e −− ZLGT $ |C| # Z P Q 9

s t is mapped to a quantum a circuit = f Wf Wf . Let and fix the temporal gauge. Since interactions also L, R denote the left and right boundaries,C respectively, take place on the faces, time and space interactions as in Eq. (12). Then our mapping readsQ are also mapped to one– and four–qubit gates, re- spectively. This results in a quantum circuit that L,R LGT = L R . (31) processes a (d 1) dimensional array of spins with Z h |C| i single–qubit gates− in the time direction, and with Similarly as for vertex and edge models, we note that four–qubit gates in the space dimensions. Similar unitary gates will be translated to complex coupling considerations apply to Zq LGTs, with one– and strengths (as in Sec.IVA remark (i)), and one can ob- four–qudit gates. tain similar mappings for LGTs with open and periodic boundary conditions (see Sec.IVA remark (ii)). Next we make some further comments about this construction. V. BQP–COMPLETENESS RESULTS (i) The mapping can easily be extended to LGTs Z2 This section contains the central results of this paper: with other gauge fixings. As a matter of fact, we here we will provide efficient quantum algorithms to es- will use one of these mappings in Sec.VD. Since timate the partition function of the six vertex model, the one deals with square lattices, one can always as- Ising model, the Potts model and the 3D LGT in a sociate one dimension of the lattice to time. Then, Z2 certain (complex) parameter regime, with polynomial - generally, one fixes some spins in the time direction curacy. Moreover, we will show that approximating these and some others in the space direction, the only partition functions is BQP–complete. restriction being the avoidance of closed loops (see the comment in Sec.IIA and [28]). This introduces new type of interactions. For example, there can be A. Six vertex model a face in the space direction where three spins have been fixed by the gauge, and thus only one variable is left: Our goal is to prove that approximating the partition function of some vertex models in a certain (complex) Z βhf (si) parameter regimes is BQP–complete (see also [23]). To wf (si) = e− . (32) show that, we will make use of the mappings between ver- Such interactions are mapped to single–qubit diag- tex models and quantum circuits described in Sec.IVA. s We consider the q = 2 six vertex model (or: ‘ice–type onal gate Wf : model’) and the eight vertex model [4] on a (tilted) 2D W s = w (s ) s s . (33) square lattice. In the six vertex model, only 6 of the f s i | iih i| 16 possible spin configurations give rise to a non–zero s Xi Boltzmann weight. More precisely, W a is a 4 4 matrix × Examples of these gates will be given in Sec.VD. of the form Note, however, that the mapping does not need to w 0 0 0 be defined on all faces: for the BQP–completeness 00,00 0 w w 0 proof it suffices to specify the coupling strength on W a = 01,01 01,10 , (34)  0 w w 0  every face. In particular, we will set J = 0 on faces 10,01 10,10 0 0 0 w in the time direction where the temporal gauge is  11,11    not fixed, and the interactions are not mapped to a where we use ws ,s ,s ,s as a shorthand notation for gate in this case. i j k l w(si, sj, sk, sl) (see Eq. (10)). The eight vertex model (ii) Notice that, due to the form of the interaction of [4] is obtained by additionally allowing the entries w00,11, w11,00 to be non–zero. We consider a parame- this system (given by (5)), each gate is specified by a only one parameter: eβJ . We will make repeated ter regime of the classical model where all matrices W use of this fact in Sec.VD. are unitary. This gives rise to a unitary circuit formed of two–qubit quantum gates. Notice that thisC generally (iii) This mapping can be extended to Zq LGTs (see [20] corresponds to (non–physical) complex parameters for ei- for an introduction of these models). In this case, ther coupling strengths J or the inverse temperature β each interaction can take q values, and they would as we pointed out in Sec.IVA remark (i). Finally, we translate to one– and four–qudit gates, where each assume that we have staggered left an right boundary qudit is a q–level quantum system. conditions of the form L = R = (0101 ... ). Our result is the following. (iv) More generally, the mapping can also be extended to Z2 LGTs defined on square lattices in d dimen- Result 1( BQP–completeness of the six vertex sions. The constructions is a generalization of the model) Consider the six vertex model defined on a 3D case, where one has to select a translational n poly(n) rectangular grid with fixed boundary condi- invariant time direction out of the d dimensions, tions.× Further, consider that this is defined at inverse 10 9

t ws(si,sj ,sk,sl) t s wf (si,sj ) Wf t Wf L L s1 s1 R ! | R s1 s | 1 " L L s2 R s2 s2 ! | sR | 2 "

time

FIG. 5: (Left) In a 3D LGT, particles (black and gray dots) sit at the edges and interactions (pale red and blue ellipses) take FIG.place 5: on (Left) the faces. In a Gray 3D LGT, dots indicateparticles particles (black and whose gray state dots)has sit been at the fixed edges by the and gauge. interactions (Right) (pale This red model and is blue mapped ellipses) to a take placequantum on the circuit, faces. where Gray interactions dots indicate along particles the time whose directi stateon become has been single–qubit fixed by gates the gauge. (blue squares), (Right) This and those model perp is mappedendicular to a quantumto it become circuit, four–qubit where interactions gates (pale red along squares). the time direction become single–qubit gates (blue squares), and those perpendicular to it become four–qubit gates (pale red squares). Thus, a 2D array of qubits is processed by a circuit consisting of a sequence of single–qubit gates and diagonal four–qubit gates. Similarly as for vertex and edge models, we note that each interaction can take q values, and they would unitary gates will be translated to complex coupling translate to one– and four–qudit gates, where each temperaturestrengths (asβ inand Sec. withIV Acouplingsremark strengths (i)), and one can ob- quditThe is Heisenberg a q–level quantum interaction system. is (encoded) universal for quantum computation [32, 33]. In other words, tain similar mappings for LGTs withi2t open and periodic boundary conditionsw00,00 = (seew11 Sec.,11 IV= e A remark (ii)). Next we by using gates of the form (39), one can prepare w01,01 = w10,10 = cos(2t) (35) (iv) Moreany generally, quantum the state mappingψ = can0 in also an be encoded extended form. make some further comments about this construction. | i C| i w01,10 = w10,01 = i sin(2t) , toGatesZ2 LGTs of the defined form on (39 square) can lattices be generated in d dimen- with six (i) The mapping can easily be extended to Z2 LGTs sions.vertex–type The constructions gates, i.e. isof a the generalization form (34), by of setting the wherewitht is aother continuous gauge fixings. parameter, As a and matter of fact, we 3Dthe case, non–zero where one entries has specifiedto select a in translational (35). in- will use one of these mappings in Sec. VD.Since variant time direction out of the d dimensions, and N wone deals= withw square= 1 lattices, one can always as- 2.fix Now the temporal we show gauge. that the Since encoded interactions initialalso state take0 ⊗ 00,00 11,11 | i wsociate= onew dimension= w of the= latticew to= time.1 . Then,(36) placecan on be the prepared faces, time from and the space state interactions corresponding are to 01,01 10,10 01,10 10,01 √2 generally, one fixes some spins− in the time direction alsostaggered mapped boundary to one– and conditions four–qubit0101 gates,... respec-. To this | i Let anddenote some the others partition in the function space ofdirection, this model. the only Then tively.aim, we Similar consider considerations an operation applyV of to theZq formLGTs, (34) we provideZrestriction efficient being quantum the avoidance algorithms of closed to estimate loops (see withwith one– the and non–zero four–qudit entries gates. of Eq. (36). It is straight- with polynomialthe comment accuracy. in Sec. II We A and also [27 show]). This that theintroduces problemZ forward to check that V 01 = ( 01 10 )/√2, and | i | i−| i of approximatingnew type of interactions.is BQP–complete. For example, there can be hence a face in theZ space direction where three spins have 2 been fixed by the gauge, and thus only one variable V. BQP–COMPLETENESS0 = V ⊗ 0101 . RESULTS (40) Before starting the proof, we remark boldface symbols | i | i will denoteis left: encoded states and operators throughout this paper. To prove Result1, weβh willf (si) show that any quan- 3. Finally, we observe that matrix elements of the wf (si)=e− . (32) This section containsN theN central results of this paper: tum computation can be reduced to the evaluation of here weform will provide0 n effi0cientn quantumcan be algorithms efficiently to approxi- es- h | C| i the partitionSuch interactions function areof a mapped six vertex to single–qubit model on adiag- tilted timate themated partition by a quantum function computerof the six vertex with polynomial model, the ac- 2D squareonal gate latticeW s: with staggered boundary conditions. Ising model,curacy, the as Potts long as modelcan and be the implemented 3D LGT efficiently. in a f C Z2 We prove this statement in the following steps: certain (complex)Since we are parameter dealing regime, with a poly–size with polynomial quantum ac- cir- s W = ws(si) si si . (33) curacy.cuit Moreover, consisting we will of show two–qubit that approximating gates (as indicated these in f | !" | 1. We show that quantumsi gates of the form (34) are partition functions is BQP–complete. ! Eq. (34)), can be implemented efficiently. The computational universal for encoded quantum com- estimationC of the matrix element is achieved by the Examplesputation. ofTo these do so, gates we use will the be four–qubit given in Sec. encodingVD. Note, however, that the mapping does not need to Hadamard test, as pointed out in Sec.III. These for 0 given by Refs. [32, 33], which is of the form: overlaps are related to partition functions of the be defined| i on all faces: for the BQP–completeness proof it suffices to specify the coupling strength on six vertexA. model Six in vertex a certain model (complex) parameter 1 2 every face.0 In= particular,( 01 we10 will)⊗ set. J =0onfaces(37) regime via (13), since all gates U, V involved are of | i 2 | i − | i in the time direction where the temporal gauge is Our goalthe formis to prove (34), andthat thus approximating correspond the to partition Boltzmann weights of the six vertex model. notNotefixed, that and1 thecan interactions be prepared are by not means mapped of the to en- a function of some vertex models in a certain (complex) gate in this| case.i Z coded universal circuit that we will show next. parameterThis concludes regimes the is proofBQP–complete of Result1 (see. also [22]). To show that, we will make use of the mappings between ver- We make a few remarks concerning this construction. (ii) NoticeNow we that, consider due to the the exchange form of (or the Heisenberg) interaction of in- tex models and quantum circuits described in Sec. IV A. thisteraction, system (given by (5)), each gate is specified by only one parameter: eβJ . We will make repeated We(i) considerNote that the q the=2sixvertexmodel(or:‘ice–type complex parameter regime of model’)Eqs. and ( the35) eight and vertex(36) is model due to [4]ona(tilted)2D the fact that these useH of this= σ fact inσ Sec.+ σ VDσ. + σ σ , (38) ex x ⊗ x y ⊗ y z ⊗ z squareentries lattice. correspond In the six vertexto unitary model, gates, only as 6 of noted the in (iii) This mapping can be extended to LGTs (see [19] 16 possible spin configurations give rise to a non–zero with corresponding two–qubit gatesZq Sec.IVA remark (i). for an introduction of these models). In this case, Boltzmann weight. More precisely, W a is a 4 4matrix It is worth mentioning that in [34] it× is shown that U = eitHex . (39) universal quantum computation can be achieved 11

with real gates alone (i.e. gates with real entries). where + = ( 0 + 1 )/√2. Note that, for the values Thus, at first sight, it may seem that applying this of the magnetic| i | i fields| i and the couplings adopted in the method to our circuits would allow us to prove re- statement of the result, the matrices Wv and V are uni- sults for a real parameter regime of the classical tary. Moreover, the matrix W¯ h := Wh/√2 is unitary as spin models. However, we remark that the entries well. Letting ¯ denote the unitary quantum circuit ob- C of our entries correspond to the Boltzmann weights tained by replacing every gate Wh by W¯ h, we simply have τ of the interactions, which are not only real but also ¯ = /2 2 . It follows that positive. The latter condition is not satisfied in [34]. C C n ¯ n τZ+n = + ⊗ + ⊗ , (44) (ii) We observe that universality is already obtained 2 2 h | C| i for a suitable discrete set of unitary gates eitHex [32, 33], which leads to a discrete set of Boltzmann where the right hand side now represents a matrix ele- weights in the corresponding six vertex model. ment of a poly–size, unitary quantum circuit. From the Hadamard test it follows that estimating (41) with poly- nomial accuracy is achievable in poly–time on a quantum B. Ising model computer. Next we show that approximating (41) with polyno- mial accuracy is BQP–hard. This proceeds in the follow- Here we show that approximating the Ising partition ing steps: function in the presence of an external magnetic field is 1 1 1 iπ a BQP–complete problem. More precisely, we find the 1. Denote T := V 2 W¯ hV 2 , where V 2 := diag(e 8 , 1). following. We will need the following result: Result 2( BQP–completeness of the Ising model) Lemma 1 (Universality of Ising–type gate set) Consider any planar circuit graph G. Let τ denote the Any poly–size n–qubit quantum circuit composed of two– number of horizontal edges in G and let n be its vertical qubit unitary gates can be approximated to accuracy  dimension. Consider a classical Ising model at inverse (with respect to the operator norm) by a circuit composed temperature β defined on G, where on each site a con- 1 of poly(n,  ) single–qubit gates T and two–qubit gates stant (complex) magnetic field ha is present satisfying 2 2 iπ T ⊗ W T ⊗ , where every such two–qubit gate is restricted βha v e = e 4 , and on each edge a constant (complex) cou- to act on nearest–neighboring qubits only. Moreover the βJe pling Je is present satisfying e = i. Let denote the latter circuit can be found in time poly(n, 1 ). partition function of the model with open boundaryZ con-  ditions. Then we provide efficient quantum algorithms to This Lemma is proved in AppendixA; here we con- estimate tinue the argument to prove Result2.

τ +n Z , κ := 2 2 , (41) 2. Consider an arbitrary poly–size n–qubit circuit κ U composed of two–qubit unitary gates. It fol- with polynomial accuracy. We also show that the problem lows from the discussion in Sec.III that the of estimating (41) with this accuracy is BQP–complete. problem of approximating general matrix elements n n + ⊗ U + ⊗ with polynomial accuracy is BQP– The proof will consist of several steps. Gates corre- hard.h | We| nowi write U as sponding to this model are of the form (23); in particular, 1 n 1 n we consider the gates U = [V 2 ]⊗ U 0[V 2 ]⊗ (45)

i 1 for some suitable U 0. Note that U 0 is again a poly– W := ,W := diag(i, 1, 1, i) h 1 i v size circuit, and can be found efficiently. We denote 1 n   (42) 2 eiπ/4 0 A := [V ]⊗ , i.e. U = AU 0A. V := . 0 1   3. Due to Lemma1, every poly–size circuit U 0 can be approximated with accuracy  by a circuit U 00 of To show that (41) can be approximated with polyno- size poly(n, 1/) composed of T gates and nearest– mial accuracy in poly–time with a quantum computer, 2 2 neighbor T ⊗ WvT ⊗ gates, and U 00 can be found we use the mapping of an edge model in the presence of efficiently. This implies that each matrix ele- a local magnetic field (with open boundary conditions) n n ment + ⊗ U + ⊗ , where U is any poly–size cir- to a quantum circuit described in Sec.IVB. Letting n h | | i C cuit as before, can be approximated with accuracy be the vertical dimension of G as in the statement of the 1/poly(n) by a matrix element of the form result, the associated quantum circuit is an n–qubit cir- C n n cuit composed of the gates Wh,Wv and V . In particular, + ⊗ AU 00A + ⊗ , (46) we have h | | i where U 00 is a poly–size circuit composed of T gates n n n 2 2 = 2 + ⊗ + ⊗ , (43) and nearest–neighbor T ⊗ W T ⊗ gates. Hence, Z h | C| i v 12

also the problem of approximating the matrix ele- boundary conditions. Let β denote the inverse tempera- ments (46) with 1/poly accuracy is BQP–hard. Our ture and Ju=v (Ju=v) the coupling strength when the two goal is to show that any such matrix element coin- interacting particles6 spins u and v are (not) in the same cides with a quantity /κ as considered in Result2. state (see (25)). Consider this model defined in the fol- Z 2 2 lowing parameter regime 4. By definition, the gates T and T ⊗ WvT ⊗ contain square roots of the operation V . However, the op- (eβJu=v , eβJu6=v ) (1, 0), (eiπ/8, 1), ( i, 1), eration AU A only contains integral powers of the ∈ { − 00 (1, 1), (0, 1), (, 1), gate V . To see this, first note that any circuit U 00 2 2 1 1 of T and T W T gates only contains V 2 gates ((√2)− , 1), ( 1, 1) (48) ⊗ v ⊗ − } at the left and right ‘boundary’ of the circuit. In 1 the circuit AU 00A, each V 2 gate at the boundary is where  is a polynomially small number, i.e.  = 1 multiplied with another V 2 gate due to the pres- (1/poly(n)). Moreover, consider that certain ‘blocks’ O ence of the left and right boundary operator A. As of these coupling strengths appear together (that is, there a result, the operation AU A is a genuine circuit are certain local distributions of couplings). Let denote 0 Z composed of Wv, W¯ h and V gates. the partition function of this model. Then we provide effi- cient quantum algorithms to estimate with polynomial Z 5. With any such circuit AU 00A we now associate a accuracy. We also show that estimating with this ac- graph G in the following way. With each single– curacy is BQP–complete. Z qubit gate W¯ h we associate a single horizontal edge, and with each two–qubit gate Wv we associate a To prove this result, we will make use of the idea of vertical edge. The entire graph G associated with encoded universal quantum computation as in Sec.VA. the quantum circuit is then obtained by simply ‘glu- We will first present the encoding of physical qubits into ing’ together these edges in the natural way. An logical ones, and then we will construct a universal gate example is given in Fig.4. Note that the graph is set at the logical level with Potts–type gates. indeed a planar circuit graph, and that the vertical First of all we define an encoding. According to our dimension of G is n. Moreover, consider an Ising mapping of Sec.IVB, a three–level quantum particle (a model defined on G with parameters β, Je and he ) is associated to each three–level classical particle. as in Result2, with open boundary conditions, and Let 0 , 1 , 2 denote the basis states of each qutrit. let denote the partition function of the model. We use{| i two| i of| thesei} (which we refer to as physical Z Then can be expressed as a matrix element of qutrits) to encode one logical qubit, whose states 0 and Z | i the form (14), for some circuit composed of Wh, 1 are defined as C Wv and V gates. It is now straightforward to ver- | i ify that, to a normalization stemming from the 0 = 0 1 , | i | i| i (49) presence of 1/√2 in the gates W¯ h, the circuit 1 = 1 2 . C | i | i| i coincides with the circuit AU 00A. More precisely, letting τ denote the number of horizontal edges in We will refer to the first and the second physical qutrits τ G, one has = 2 2 AU 00A. This shows that as the ‘upper’ and the ‘lower qutrits’, respectively. Note C that, with this encoding, the input state 0 0 ... 0 re- n n quires no preparation, since it can be fixed| i| asi an| initiali + ⊗ AU 00A + ⊗ = τZ+n . (47) h | | i 2 2 boundary condition, viz. R = 0 1 ... 0 1 . | i | i| i | i| i It follows that every matrix element of the form Now we proceed with the construction of the encoded (46) coincides with an Ising partition function with universal gate set. We first observe that, due to the Potts interaction (25), the gates (16) and (17) contain only parameters β, Je and ha as in Result2, defined on the associated planar circuit graph G. This proves two different coefficients; for further reference, we denote τ +n that the problem of estimating /2 2 with poly- them nomial accuracy is BQP–hard. Z (µ, ν) := (eβJu=v , eβJu6=v ) . (50)

C. Potts model We construct the encoded universal gate set as follows: The single–qubit identity In this section we show that approximating partition • function of the three–level Potts model with complex pa- 1 rameters on a quasi 2D square lattice is BQP–complete. I1 = δ(u, v) u v , (51) | ih | To be precise, we find the following. iX,j=0 Result 3( BQP–completeness of the Potts model) is achieved by applying a two–qutrit gate (between Consider the Potts model with three–level particles de- the two physical qutrits that compose the logical fined on a poly–size quasi 2D square lattice with fixed qubit) with (µ, ν) = (1, 1) (see Fig.6). 13

The two–qubit identity gate physical qubit is in contact with four auxiliary qubits, • as indicated in Fig. 8.Moreover,eachphysicalqubitis 1 propagated in time via a single–qubit gate at the physical I = uv uv , (54) 2 | !" | level (that is, a gate of the form (16)) which is achieved u,v=0 ! with (µ, ν)=(1, 0). In this way, the physical qubits are is trivially obtained by applying a two qutrit–gate distributed on a 2D square lattice, which is surrounded between the two physical qutrits of the first logical (in front and on the back) by auxiliary qubits—we refer qubit with (µ, ν)=(1, 1), and doing the same for to this as a quasi 2D square lattice. the other logical qubit (see Fig. 7). aux. phys. aux. Finally, the phase gate between logical qubits • 1 t 0 ψ1 2 CZ = ( 1)uv uv uv (55) | ! | ! | ! − | !" | u,v=0 ! is achieved by applying a two qutrit–gate between 1 0 | ! | ! the lower qutrit of the first logical qubit and the up- per qutrit of the second logical qudit with (µ, ν)= = t (1, 1) ( 1, 1). We also need to apply the same gate be- 2 ψ2 1 tween− the lower qudit of the second logical qubit | ! | ! | ! and an auxiliary particle in the state 2 (see Fig. 7). = (1, 0) | ! (a)

phys. aux. Pπ/8 ψ ψ aux. I1 ψ ψ | ! | ! | ! | ! phys. aux. 2 2 aux. t ! (1, 1) | ! ψ1 | (eiπ/8, 1) 0 | ! | ! 2 time time t+1 ! ψ1 | (a) (b) 0 0 | ! | ! | ! 1 FIG. 6: Auxiliary qubits (i.e. fixed qubits) are depicted in | ! 0 gray, physical qubits in black, and logical qubits are high- | ! t 1 1 lighted in yellow. (a) Logical single–qubit identity I1.(b) ψ2 | ! | ! | ! Logical phase gate Pπ/8.Eachgateisdeterminedbythepair 2 | ! t+1 1 of numbers (µ, ν)(Eq.(50)) which are indicated next to it, ψ2 | ! and its color is just a guide to the eye to identify equal gates. 2 | ! Note that time runs in both figures from right to left. time | ! 13 (b) The phase gate (1, 1) • FIG. 8: Setup for a Potts model with the physical qutrits iπ/8 ψ1 ( 1, 1)ψ1 Pπ/8 = 0 0 + e 1 1 (52) | ! − | ! surrounded by auxiliary qutrits (i.e. qutrits whose value is | ih | | ih | I2 ψ1 ψ2 CZ ψ1 ψ2 | !| ! | !| ! fixed). Single–qutrit gates are applied in the time direction, is achieved by applying a two–qutrit gate between and two–qutrit gates are applied in a fixed time slice. Solid ψ2 ψ2 an auxiliary qutrit in the state 2 and the lower | ! | ! and dashed lines stand for the two–qubit and single–qubit | i iπ/8 identities (at the physical level), respectively, as specified in qutrit of the logical qubit with (µ, ν) = (e , 1) (1, 1) 2 the legend. (a) A time slice of the lattice at time t,whereone (see Fig.6). | ! ( 1, 1) can see the structure with two auxiliary qutrits connected to − The Hadamard gate time time each physical qutrit. Each logical qutrit is composed of two • (a) (b) physical qutrits. (b) Two time slices of the lattice, at times t 1 and t +1.Thefigureshowsanexampleofacircuit,wherea 1 uv t phase gate Pπ/8 is applied to ψ1 and the gate CZ is applied H = ( 1) v u (53) FIG. 7: (a) Logical two–qubit identity I2.(b)Logicalcon- √ − | ih | FIG. 7: (a) Logical two–qubit identity I2. (b) Logical con- t+1 t+1 | ! 2 u,v=0 to ψ1 ψ2 . X trolledtrolled phase phase gate gateCZCZ.SeethecaptionofFig.. See the caption of Fig.66for for the the | !| ! meaning of the pair of numbers and the color associated to is more involved and we refer the reader to Ap- meaning of the pair of numbers and the color associated to eacheach gate. gate. This proves that we can perform encoded univer- pendixB for the details. sal quantum computation using qutrits interacting with In the construction presented above we need a constant13 Potts–type nearest–neighbor gates. From the discussion The two–qubit identity gate n n • supply of auxiliary qutrits, for which we envisage the of Sec. III it follows that estimating 0 ⊗ 0 ⊗ = physical qubit is in contact with four auxiliary qubits, " | C| ! Z The two–qubit identity1 gate physicalfollowing qubit setup. is in We contact arrange with the four particles auxiliary so thatqubits, each with polynomial accuracy is BQP–complete, where is • as indicated in Fig.8. Moreover, each physical qubit is Z I = uv uv , (54) as indicated in Fig. 8.Moreover,eachphysicalqubitis 2 1 | ih | propagatedpropagated in time in time via viaa single–qubit a single–qubit gate gate at the at physical the physical I = u,v=0uv uv , (54) 2 X| !" | levellevel (that (that is, a is, gate a gate of the of the form form (16)) (16 which)) which is achieved is achieved u,v=0 is trivially obtained! by applying a two qutrit–gate withwith (µ, (νµ,)=(1 ν) =, 0). (1, 0). In this In this way, way, the physicalthe physical qubits qubits are are isbetween trivially the obtained two physical by applying qutrits a of two the qutrit–gate first logical distributeddistributed on ona 2D a 2D square square lattice, lattice, which which is surrounded is surrounded betweenqubit with the ( twoµ, ν physical) = (1, 1), qutrits and ofdoing the first the samelogical for (in(in front front and and on theon the back) back) by auxiliary by auxiliary qubits—we qubits—we refer refer qubitthe other with logical (µ, ν)=(1 qubit, 1), (see and Fig. doing7). the same for toto this this as a as quasi a quasi 2D 2Dsquare square lattice. lattice. the other logical qubit (see Fig. 7). This proves that we can perform encoded univer- Finally, the phase gate between logical qubits sal quantumaux. phys. computationaux. using qutrits interacting with • Finally, the phase gate between logical qubits Potts–type nearest–neighbor gates. From the discussion • 1 n n 1 uv of Sec.IIIt it follows that estimating 0 ⊗ 0 ⊗ = CZ = ( 1) uv uv (55) 0 ψ1 2 h | C| i Z CZ = ( −1)uv uv| ihuv | (55) with| ! polynomial| ! accuracy| ! is BQP–complete, where is u,v=0− | !" | Z u,vX=0 the partition function specified in the statement of Result ! is achieved by applying a two qutrit–gate between 3. This thus concludes the proof of Result3. is achieved by applying a two qutrit–gate between 1 0 the lower qutrit of the first logical qubit and the up- | !We point out that our| !BQP–completeness result for the the lower qutrit of the first logical qubit and the up- per qutrit of the second logical qudit with (µ, ν) = Potts model imposes constraints in the parameter regime per qutrit of the second logical qudit with (µ, ν)= ( 1, 1). We also need to apply the same gate be- as noted in Sec.IVB. We now give= some further remarks ( 1, 1). We also need to apply the same gate be- t (1, 1) − regarding2 ψ2 this proof. 1 tweentween− the the lower lower qudit qudit of of the the second second logical logical qubit qubit | ! | ! | ! andand an an auxiliary auxiliary particle particle in in the the state state2 2(see(see Fig. Fig.7).7). = (1, 0) | !| i (i) Note that to realize a gate in more than one step (like the(a) Hadamard gate, see AppendixB) implies thatphys. one mustaux. fix the value of all those coupling Pπ/8 ψ ψ aux. I1 ψ ψ | ! | ! strengths together in order to realize that gate in the | ! | ! quantum circuit. That is, the gatephys. is onlyaux. realized 2 2 aux. (andt thus the complexity! result is only achieved) if (1, 1) | ! ψ1 | (eiπ/8, 1) 0 the| ! classical model contains that ‘block’ of coupling | ! 2 time time strengths. These are thus constraintst+1 in the! distri- ψ1 | (a) (b) bution of couplings0 imposed0 by the| realization! of | ! | ! 1 gates. FIG. 6: Auxiliary qubits (i.e. fixed qubits) are depicted in | ! 0 FIG. 6: Auxiliary qubits (i.e. fixed qubits) are depicted in | ! gray, physical qubits in black, and logical qubits are high- 1 gray, physical qubits in black, and logical qubits are high- (ii) Wet observe that the single–qubit1 identity at the lighted in yellow. (a) Logical single–qubit identity I1.(b) ψ2 | ! | ! lighted in yellow. (a) Logical single–qubit identity I1. (b) physical| ! level I1 requires to set ν = 0, which for- Logical phase gate Pπ/8.Eachgateisdeterminedbythepair 2 | ! mally corresponds to setting J =t+1 1. This Logicalof numbers phase (µ, gateν)(Eq.(Pπ/850. Each)) which gate are is determined indicated next by the to it, pair u=v ψ ! 6 2 −∞| βJu6=v andof numbers its color ( isµ, just ν) (Eq. a guide (50 to)) the which eye areto identify indicated equal next gates to. it, unphysical regime can be2 avoided by| letting! e Noteand its that color time is runs just ain guide both figuresto the eye from to right identify to left. equal gates. be a polynomiallytime small| number,! that is eβJu6=v = Note that time runs in both figures from right to left. (1/poly(n)) By the same argument as for the OHadamard gate(b) (see AppendixB), the resulting In the construction(1, 1) presented above we need a constant state will be polynomially close to the ideal one, FIG. 8: Setup for a Potts model with the physical qutrits supply of auxiliary qutrits,ψ1 for which we envisage( 1, 1)ψ the and thus the error within the accuracy of the com- | ! − 1 surrounded by auxiliary qutrits (i.e. qutrits whose value is followingI2 ψ1 ψ setup.2 We arrangeCZ theψ particles1 ψ2 so that| each! putation. | !| ! | !| ! fixed). Single–qutrit gates are applied in the time direction, and two–qutrit gates are applied in a fixed time slice. Solid ψ2 ψ2 | ! | ! and dashed lines stand for the two–qubit and single–qubit identities (at the physical level), respectively, as specified in (1, 1) 2 the legend. (a) A time slice of the lattice at time t,whereone | ! ( 1, 1) can see the structure with two auxiliary qutrits connected to − time time each physical qutrit. Each logical qutrit is composed of two (a) (b) physical qutrits. (b) Two time slices of the lattice, at times t and t +1.Thefigureshowsanexampleofacircuit,wherea t phase gate Pπ/8 is applied to ψ1 and the gate CZ is applied FIG. 7: (a) Logical two–qubit identity I2.(b)Logicalcon- | ! to ψt+1 ψt+1 . trolled phase gate CZ.SeethecaptionofFig.6 for the | 1 !| 2 ! meaning of the pair of numbers and the color associated to each gate. This proves that we can perform encoded univer- sal quantum computation using qutrits interacting with In the construction presented above we need a constant Potts–type nearest–neighbor gates. From the discussion n n supply of auxiliary qutrits, for which we envisage the of Sec. III it follows that estimating 0 ⊗ 0 ⊗ = following setup. We arrange the particles so that each with polynomial accuracy is BQP–complete," | C| where! Zis Z 13

The two–qubit identity gate physical qubit is in contact with four auxiliary qubits, • as indicated in Fig. 8.Moreover,eachphysicalqubitis 1 propagated in time via a single–qubit gate at the physical I = uv uv , (54) 2 | !" | level (that is, a gate of the form (16)) which is achieved u,v=0 ! with (µ, ν)=(1, 0). In this way, the physical qubits are is trivially obtained by applying a two qutrit–gate distributed on a 2D square lattice, which is surrounded (in front and on the back) by auxiliary qubits—we refer between the two physical qutrits of the first logical 14 qubit with (µ, ν)=(1, 1), and doing the same for to this as a quasi 2D square lattice. the other logical qubit (see Fig. 7). aux. phys. aux. qudit right after the filters for the 2 and the 0 Finally, the phase gate between logical qubits component of Fig. 10. That is, the number| i of filters| i • scales linearly with q (since one requires q 2 filters 1 t − 0 ψ1 2 for each qudit). Moreover, each physical qudit has CZ = ( 1)uv uv uv (55) | ! | ! | ! − | !" | to be connected to 2 q/2 auxiliary particles, each u,v=0 ! fixed in a different state,d e namely 0 ,..., q 1 . | i | − i is achieved by applying a two qutrit–gate between 1 0 This amounts to a similar construction to that of | ! | ! the lower qutrit of the first logical qubit and the up- Fig.8 but where each physical qudit is connected to per qutrit of the second logical qudit with (µ, ν)= q/2 auxiliary qudits to the left and to the right. = t (1, 1) d e ( 1, 1). We also need to apply the same gate be- 2 ψ2 1 tween− the lower qudit of the second logical qubit | ! | ! | ! and an auxiliary particle in the state 2 (see Fig. 7). = (1, 0) D. Z2 Lattice gauge theory | ! (a) Now we turn to a different class of models, namely phys. aux. Pπ/8 ψ ψ aux. LGTs. Using the tools presented in Sec.IVC we will I1 ψ ψ | ! | ! | ! | ! prove the following result. phys. aux. 2 2 aux. (1, 1) | ! t | ! Result 4( BQP–completeness of the 3D LGT) iπ/8 ψ1 Z2 (e , 1) 0 | ! Consider a lattice gauge theory defined on a 3D rect- | ! 2 Z2 time time t+1 ! ψ1 | angular lattice of size (4x, 12y, 7z), where x, y and z are (a) (b) 0 0 | ! | ! | ! natural numbers, and with fixed boundary conditions. Let 1 β denote the inverse temperature and Jf the coupling FIG. 6: Auxiliary qubits (i.e. fixed qubits) are depicted in | ! 0 | ! strength on its faces. Consider this model in the following gray, physical qubits in black, and logical qubits are high- 1 t 1 complex parameter regime, lighted in yellow. (a) Logical single–qubit identity I1.(b) ψ2 | ! | ! Logical phase gate P .Eachgateisdeterminedbythepair 2 | ! π/8 | ! t+1 1 βJf iξ 1 of numbers (µ, ν)(Eq.(50)) which are indicated next to it, ψ2 | ! e 0, e , , ζ , (56) and its color is just a guide to the eye to identify equal gates. 2 | ! ∈ 2 Note that time runs in both figures from right to left. time | !   where ξ is a continuous parameter ξ [0, 2π), and ζ is (b) a polynomially small number, ζ = (1∈/poly(n)). More- (1, 1) over, consider that certain ‘blocks’O of couplings appear FIG. 8: Setup for a Potts model with the physical qutrits together, and that there is a certain gauge fixing. Let ψ1 ( 1, 1)ψ1 FIG.surrounded 8: Setup by auxiliary for a Potts qutrits model (i.e. with qutrits the whose physical value qutrits is I ψ ψ | ! − | ! denote the partition function of this model. Then we 2 1 2 CZ ψ1 ψ2 surroundedfixed). Single–qutrit by auxiliary gates qutrits are applied (i.e.in qutrits the time whose directio valuen, is | !| ! | !| ! provideZ efficient quantum algorithms to estimate fixed).and two–qutrit Single–qutrit gates aregates applied are applied in a fixed in the time time slice. direction, Solid ψ2 ψ2 and two–qutritdashed lines gates stand are for applied the two–qubit in a fixed and time single–qubit slice. Solid | ! | ! xyz andidentities dashed (at lines the physical stand for level), the respectively, two–qubit and as speci single–qubitfied in , κ := 2 2 (57) (1, 1) Z 2 identitiesthe legend. (at (a) the A time physical slice level),of the lattice respectively, at time ast,whereone specified in κ | ! ( 1, 1) thecan legend. see the structure (a) A time with slice two of auxiliarythe lattice qutrits at time connectedt, where t oneo with polynomial accuracy. We also show that the problem − can see the structure with two auxiliary qutrits connected to time time each physical qutrit. Each logical qutrit is composed of two of approximating (57) is BQP–complete. (a) (b) eachphysical physical qutrits. qutrit. (b) Two Each time logical slices qutrit of the is lattice, composed at time ofs twot physicaland t +1.Thefigureshowsanexampleofacircuit,wherea qutrits. (b) Two time slices of the lattice, at times t t The proof of this result will proceed similarly as in the andphaset + gate 1.P Theπ/8 figureis applied shows to anψ1 exampleand the gateof a circuit,CZ is applied where a FIG. 7: (a) Logical two–qubit identity I2.(b)Logicalcon- t+1 t+1 | !t previous sections: we will construct an encoded universal trolled phase gate CZ.SeethecaptionofFig.6 for the phaseto ψ1 gateψP2 π/8. is applied to ψ1 and the gate CZ is applied | t+1!| t+1! | i gate set. We first define the following encoding of four meaning of the pair of numbers and the color associated to to ψ1 ψ2 . | i| i physical qubits into one logical qubit: each gate. This proves that we can perform encoded univer- sal quantum computation using qutrits interacting with 0 = 0 0 0 0 (iii) We see with our construction that the Potts model (58) In the construction presented above we need a constant Potts–type nearest–neighbor gates. From the discussion |1i = |1i|1i|1i|1i . n n supply of auxiliary qutrits, for which we envisage the of Sec.inIII a 1Dit follows array isthat not estimating likely to be0 ⊗BQP0–complete,⊗ = | i | i| i| i| i " | C| ! Z following setup. We arrange the particles so that each withwhereas polynomial this accuracy model on is BQP a 2D–complete, setup (and where with com-is Note that preparing the input state 0 is trivially Z plex parameters) is BQP–complete. This is in agree- achieved by fixing the physical qubits (which| i correspond ment with the fact that the Potts model in 1D array to physical spins) in 0 0 0 0 . In the following we show or a tree–like structure is efficiently simulable clas- how to construct a general| i| i| i| single–qubiti unitary gate (at sically [35]. the logical level), and a specific two–qubit gate (also at (iv) Finally, this result can be generalized to Potts the logical level), namely (the non–local part of) a con- model with any q. In this case, the encoded states trolled phase gate. are still given by Eq. (49), and all gates are per- First we express an arbitrary single–qubit rotation formed with the same procedure except for the • in its Euler decomposition, Hadamard. For this gate, one adds filters for the 3 ... q 1 components on the upper and the lower U(γ, β, α) = R (γ)HR (β)HR (α) . (59) | i | − i z z z 15

Thus, our goal is to generate arbitrary z–rotations Our construction of a circuit at the logical level dif- and the Hadamard gate. The gate Rz(ξ) can be fers from the general mapping presented in Sec.IVC in implemented by letting the logical qubit interact the following sense. The quantum circuit processes a 1D with a neighboring, auxiliary face which has all re- array of logical qubits which are distributed along the x maining qubits fixed to 0 , and setting eβJ = eiξ direction. These are transformed by four–qubit physical in this face (see Fig.9). | i gates in the x direction (leading to logical single– and The logical Hadamard gate H is implemented as two–qubit gates), and by single–qubit physical gates in a teleportation–based gate. We refer the reader to the z direction (which corresponds to time). The addi- AppendixC for the details. We shall in fact apply a tional dimension (y direction) is required for the realiza- non–normalized version of this, namely H˜ := √2H tion of the teleportation–based Hadamard gates, which (see below for a discussion of this normalization transport the 1D array that stores the quantum informa- factor). tion in the y direction. Thus, we have constructed an encoded universal quan- ˜ ˜ To generate the logical controlled phase gate CZ tum circuit with Z2–LGT–type gates, where contains • C C we decompose it into single–qubit Rz rotations and the non–normalized version of the Hadamard gates H˜ . a two–qubit gate: Let denote the unitary circuit containing the normal- izedC Hadamard gates H = H˜ /√2. Then we have that π π CZ = R(1)( )R(2)( ) diag(1, i, i, 1) . (60) z − 2 z − 2 15 n n Z = 0 ⊗ 0 ⊗ , (61) The two–qubit gate diag(1, i, i, 1) is implemented 2xyz/2 h | C| i The two–qubit gate diag(1,i,i,1) is implemented LGT can be mapped via a duality transformation by letting the last two logical qubits interact via an ˜ byauxiliary letting plaquette the last two with logicaleβJ qubits= i (see interact Fig.9). via an whereto thexyz 3Dis theIsing number model [ of19]. times Thus, that they the share gate theH is auxiliary plaquette with eβJ = i (see Fig. 9). applied.same complexityFrom (61) and in the the parameter discussion regime of Sec. givenIII it by fol- lowsthis that transformation. the estimating the We partition also observe function that ( it57 was) with polynomialrecently accuracyshown that is computingBQP–complete. the partition This concludes func- thetion proof of of the Result 4D Z42. LGT in a real parameter regime ψ1 | ! Weis # emphasizeP–complete that, [35, as36 in]. theConcerning previous the results, quantum we re- 0 computational complexity of the 4D LGT (and, | ! quire complex parameters due to the unitaryZ2 gates. Also themore remark generally, (i) of Sec. of anyVCd appliesZ2 LGT here: with performingd>3), one a βJ 0 eβJ =eiξ 0 0 e =i 0 logicalcan gate make in the several following steps trivial (like the observation: Hadamard any gate, of see | ! | ! | ! | ! Appendixthese modelsC) implies can that be “reduced” a certain (i.e. distribution become e offfec- cou- plingstively must equivalent) appear together to the 3D inZ the2 LGT classical if the modelcouplings in or- ψ in every face except those in a 3D volume are set | ! ψ2 der to prove our complexity result. Next we give some | ! moreto comments 0. Thus, our concerning results imply thisresult. that their complexity in this (trivial) parameter regime is BQP–complete. (a) (b) (i)However, Note that to the the best single– of our knowledge, and two–qubit no quantum identity computationalgates I1 and resultsI2 arecan known be generated outside this using trivial the FIG. 9: The physical qubits composing the logical qubit are parameteruniversal regime. gate presented above. For example, FIG.marked 9: with The thick, physical black qubits lines, composing and wavy lines the logical indicate qubit qubits are (1) (2) Rz(0)HRz(0)HRz(0) = I1 and I I = I2. markedfixed by with the thick,gauge black symmetry. lines, and Each wavy gate lines is determined indicate qubits by 1 1 fixedeβJ .(a)Thelogicalrotationaroundthe by the gauge symmetry. Each gatez is–axis, determinedR (ξ)is by βJ z VI.(ii) FURTHERResult4 is in RESULTS: contrast with ONE the CLEAN 2D LGT, QUBIT whose e . (a) The logical rotation around the z–axis, Rz(ξ) is Z2 obtained by letting the logical qubit interact with an auxiliary complexity is ‘trivial’,MODEL i.e. it is in P when the tem- obtainedplaquette by whose letting spins the are logical all fixed qubit to interact0 ,andsetting with aneβ auxiliaryJ = eiξ βJ iξ plaquette whose spins are all fixed to| 0! , and setting e = e poral gauge is fixed. On the other hand, the 3D Z2 in this auxiliary plaquette. (b) The| non–locali part of CZ, indiag(1 this,i,i, auxiliary1), is implemented plaquette. (b)by letting The non–local the two logical partqubits of CZ, HereLGT we point can be out mapped a connection via a duality between transformation the results diag(1interact, i, via i, 1), an is auxiliary implemented plaquette by letting with e theβJ = twoi. logical qubits obtainedto on the the 3D Ising Ising model model in [20 Sec.]. Thus,VB and they a scheme share the interact via an auxiliary plaquette with eβJ = i. for quantumsame complexity computation in the called parameter the ‘one regime clean given qubit by Finally, we set J =0onthefaceswhoseinteractionis model’this [24]. transformation. In the latter, We one also considers observe a quantum that it was notFinally, mapped we to apply a quantum single–qubit gate. identities at the physical computationrecently where shown all that qubits computing but the first the partition one are ini- func- levelThus,I1 := we0 have0 + constructed1 1 on all an physical encoded qubits universal which quan- be- tializedtion in the of the totally 4D Z mixed2 LGT state in a (and real parameter the first qubit regime |˜ih | | ih | ˜ longtum circuit to a logicalwith qubit,Z2–LGT–type unless otherwise gates, where specified.contains This is, say,is in # theP–complete state 0 ). [36 To, 37 this]. Concerning initial state, the an quantum arbi- C C βJf | # gatethe non–normalized is achieved by version rescaling of the the interaction Hadamard gates from He˜ . trary poly–sizecomputational quantum complexity circuit may of be the applied, 4D Z2 LGT followed (and, β(Jf 1) β(Jf 1) toLete denote− , and the then unitary letting circuite containing− tend the to 0 normal- polyno- by a single–qubitmore generally, measurement of any d inZ2 theLGT final with staged > of3), the one miallyizedC Hadamard fast (see gates AppendixH =CH˜)./ We√2. also Then set weJ have= 0 that on the computation.can make This the one–clean–qubit following trivial model observation: comprises any a of faces whose interaction is not mapped to a quantum gate, schemethese that is models believed can to be be “reduced” weaker than (i.e. the become full power effec- n n of quantum computers but stronger than classical com- which sets their correspondingZ = 0 ⊗ Boltzmann0 ⊗ , weights(61) to 1, tively equivalent) to the 3D Z2 LGT if the couplings thus not ‘contributing’2xyz/2 to" the| C partition| # function. This is putationin (although every face these except are those unproved in a assertions). 3D volume areThe set corresponding complexity class of decision problems that in accordance with the fact that these particles do˜ not to 0. Thus, our results imply that their complexity where xyz is the number of times that the gate H is can be solved efficiently with the one–clean–qubit scheme takeapplied. part From in the (61 computation)andthediscussionofSec. described by theIII quantumit fol- in this (trivial) parameter regime is BQP–complete. circuit. is calledHowever,DQC1. to the best of our knowledge, no quantum lows that the estimating the partition function (57)with Astandardproblemthatcanbesolvedusingtheone polynomial accuracy is BQP–complete. This concludes clean qubit model is the problem of estimating normal- the proof of Result 4. ized traces of unitary quantum circuits. Let U denote We emphasize that, as in the previous results, we re- apoly–sizen–qubit quantum circuit composed of, say, quire complex parameters due to the unitary gates. Also two–qubit gates. Then there exists an efficient quantum the remark (i)ofSec.VC applies here: performing a algorithm within the one clean qubit scheme which re- logical gate in several steps (like the Hadamard gate, see turns a number c that provides (with exponentially small Appendix C)impliesthatacertaindistributionofcou- probability of failure) an !–approximation of the normal- plings must appear together in the classical model in or- n ized trace 2− Tr(U)inpoly(n)time,forevery! that der to prove our complexity result. Next we give some scales at most inverse polynomially with n.Thetech- more comments concerning this result. nique is a simple variant of the Hadamard test and we (i) Note that the single– and two–qubit identity refer to the literature [24]. Moreover, the problem of es- timating normalized traces of unitary quantum circuits gates I1 and I2 can be generated using the universal gate presented above. For example, is known to be DQC1–hard. In other words, this problem R (0)HR (0)HR (0) = I and I(1)I(2) = I . captures all problems that can be solved efficiently within z z z 1 1 1 2 the one clean qubit paradigm. It thus plays a similar role (ii) Result 4 is in contrast with the 2D Z2 LGT, whose as the unitary matrix element problem for BQP. complexity is ‘trivial’, i.e. it is in P when the tem- Our results obtained in Sec. VB immediately lead to poral gauge is fixed. On the other hand, the 3D Z2 acompleteproblemforDQC1 involving Ising partition 16

computational results are known outside this trivial is equivalent to considering a graph G0 where each left parameter regime. boundary spin at the kth ‘row’ in the graph is identified with its corresponding right boundary spin, and the re- sulting spin is fixed in the state sk, for all k. One thus VI. FURTHER RESULTS: ONE CLEAN QUBIT arrives at an Ising model on a new graph G0 which is MODEL obtained from G by enforcing periodic boundary condi- tions, and where one vertical slice of spins is fixed in the configuration s. Finally, consider the normalized trace Here we point out a connection between the results of the matrix element U, given by 2 n s U s . Due obtained on the Ising model in Sec.VB and a scheme − s to the above discussion, this normalized traceh | | mayi be for quantum computation called the ‘one clean qubit approximated with 1/poly accuracy by P model’ [25]. In the latter, one considers a quantum computation where all qubits but the first one are ini- 1 s tialized in the totally mixed state (and the first qubit . (62) 2nκ Z s is, say, in the state 0 ). To this initial state, an arbi- X trary poly–size quantum| i circuit may be applied, followed But as s is the partition function on G with one ver- by a single–qubit measurement in the final stage of the 0 tical sliceZ of spins fixed in the configuration x, the sum computation. This one–clean–qubit model comprises a s simply represents the partition function on scheme that is believed to be weaker than the full power s 0 G whereZ ≡ Z these spins are now fully summed out. The of quantum computers but stronger than classical com- 0 Pquantity is hence the full–fledged partition function putation (although these are unproved assertions). The 0 on G ofZ the Ising model with couplings and tempera- corresponding complexity class of decision problems that 0 ture as before, and without any fixed spins or boundary can be solved efficiently with the one–clean–qubit scheme conditions. is called DQC1. We thus arrive at the following result: consider any A standard problem that can be solved using the one planar circuit graph G. Let τ denote the number of clean qubit model is the problem of estimating normal- horizontal edges in G and let n be its vertical dimen- ized traces of unitary quantum circuits. Let U denote sion. Let G0 be the graph obtained by enforcing periodic a poly–size n–qubit quantum circuit composed of, say, boundary conditions on G (as above). Consider a classi- two–qubit gates. Then there exists an efficient quantum cal Ising model at inverse temperature β defined on G, algorithm within the one clean qubit scheme which re- where on each site a constant (complex) magnetic field ha turns a number c that provides (with exponentially small βh iπ is present satisfying e a = e 4 , and on each edge a con- probability of failure) an –approximation of the normal- stant (complex) coupling J is present satisfying eβJe = i. ized trace 2 nTr(U) in poly(n) time, for every  that e − Let denote the partition function of the model. Then scales at most inverse polynomially with n. The tech- 0 the problemZ of approximating nique is a simple variant of the Hadamard test and we refer to the literature [25]. Moreover, the problem of es- 0 τ +n timating normalized traces of unitary quantum circuits Z , κ := 2 2 , (63) 2nκ is known to be DQC1–hard. In other words, this problem captures all problems that can be solved efficiently within with polynomial accuracy, is DQC1–hard. the one clean qubit paradigm. It thus plays a similar role as the unitary matrix element problem for BQP. Our results obtained in Sec.VB immediately lead to VII. CONCLUSIONS a complete problem for DQC1 involving Ising partition functions defined on graphs with periodic boundary con- In this work we have shown that estimating the par- ditions. We limit ourselves to a sketch of the argument. tition function of the six vertex model on a 2D square It follows from the discussion in Sec.VB that, for every lattice, the 2D Ising model with magnetic fields on a pla- poly–size quantum circuit U there exists an Ising model nar graph, the Potts model on a quasi 2D square lattice, defined on a planar circuit graph G (which can be found and the 3D Z2 LGT is BQP–complete. All these mod- efficiently), with couplings and temperature as in Re- els must be defined in a (partially) complex parameter sult2 and with open boundary conditions, such that /κ regime in order to prove the result. In all but the Ising provides a 1/poly approximation of the matrix elementZ model, we further require that certain blocks of coupling n n n + ⊗ U + ⊗ . Now, instead of + ⊗ we consider the strengths appear together. Roughly speaking, that these h | | i | i matrix element s U s where s = s1 . . . sn represents problems are BQP–complete means that they are as hard an arbitrary computationalh | | i basis| i state.| Thisi matrix el- as simulating arbitrary quantum computation. Because ement now coincides with s/κ, where s denotes the our proof is constructive, we have also provided the ef- partition function of the sameZ model (i.e.Z same graph, ficient quantum algorithms that estimate the partition couplings and temperature), however considering bound- functions of the above models. The proofs are based on a ary conditions where the left and right boundary spins mapping from partition functions to quantum circuits in- are fixed in the same configuration s. Such a situation troduced in [23] and extended here to the standard Ising 17 model, Potts model and to Z2 LGTs. In this sense, our (iii) As the gate K does not have finite order, there does m work puts these different kinds of classical spin model on not exist any integer m such that K = K†. How- an equal footing as far as their quantum computational ever, it is well known that for every δ > 0 there complexity is concerned. exists an integer m = poly(1/δ) such that the dis- m It would be interesting to obtain quantum algorithms tance (in operator norm) between K and K† is at for computing such partition functions in a real param- most δ. eter regime. At present we do not know whether our This shows that the gates H, V as well as the CZ gate approach can be extended to prove such results. As we can be approximated with accuracy  by a product of pointed in Sec.VA remark (i), the Boltzmann weights poly(1/) gates K and W . Moreover, it is known that give rise not only to real but also to positive entries in the v the CZ, H and V gates generate a dense subgroup of quantum gates. The latter seems to be a rather severe U(4) (up to global phases). This hence proves Lemma2. restriction in the pursuit of this goal.  The proof of Lemma1 is now obtained as follows. We Acknowledgements simultaneously conjugate the gates K and Wv with the 1 operation V 2 acting on each qubit, yielding We thank H. J. Briegel and J. I. Cirac for helpful dis- 1 1 [V 2 ]K[V 2 ]† = T cussions. This work was supported by the FWF and 1 1 1 1 (A3) the European Union (QICS, SCALA, NAMEQUAM). V 2 V 2 Wv[V 2 V 2 ]† = Wv . ⊗ ⊗ MVDN acknowledges support by the excellence clus- h i ter MAP. MAMD thanks the Spanish MICINN grant As K and Wv generate a dense subgroup of U(4) up to FIS2009-10061, CAM research consortium QUITEMAD global phases due to Lemma2, the same holds for T and S2009-ESP-1594, European FET-7 grant PICC, UCM- Wv since the latter gates are obtained by conjugating BS grant GICC-910758. the former with the same fixed local unitary operation. 2 2 Finally, it follows that also the gates T and T ⊗ WvT ⊗ generate a dense subgroup of U(4) up to global phases: Appendix A: Universality of the Ising–type gate set indeed, T † can be approximated with arbitrary accuracy 2 2 by powers of T , such that Wv = T †[T ⊗ WvT ⊗ ]T † can The proof of Lemma1 will use the following lemma. be approximated with arbitrary accuracy by products of T and T 2W T 2. ¯ ⊗ v ⊗ Lemma 2 Let  > 0 and define K := WhV . Up to a We have thus showed that every two–qubit operation global phase, any two–qubit unitary operation can be ap- can be approximated with arbitrary accuracy by prod- 2 2 proximated with accuracy  (with respect to the operator ucts of T and T ⊗ WvT ⊗ . The Solovay–Kitaev Theo- norm) by a product of gates K and Wv i.e. these gates rem then guarantees fast convergence, i.e. every poly–size form a strongly universal gate set. n–qubit circuit composed of two–qubit gates can be ap- Proof: Let P := diag(1, i) denote the phase gate, H the proximated with accuracy  by a circuit of poly(1/, n) 2 2 usual Hadamard gate, H = ( 1)ij i j , and Z gates T and T ⊗ WvT ⊗ ; moreover, the latter circuit can i,j=0,1 − | ih | denote the standard Pauli σz gate. We will also denote be found efficiently, i.e. in poly(1/, n) time. Hence this the controlled phase gate CZP := diag(1, 1, 1, 1). Then proves the claim. the following identities can easily be verified:− 2 ZKZKZ(K†) Z H Appendix B: Hadamard rotation with Potts–type ∝ (A1) KZK†ZK†ZK P. gates ∝ Now note that W 2 Z Z. Thus Eqs. (A1) imply that v ∝ ⊗ In the following we show how to obtain a Hadamard 2 2 2 2 2 W K W K W [K†] W H I gate with Potts–type gates. Consider a general state (de- v 1 v 1 v 1 v (A2) 2 2 2 2 ∝ ⊗ fined at the logical level), ψ = α 0 +β 1 , where α and Wv K1†Wv K1Wv K1Wv K1† P I. ∝ ⊗ β are arbitrary, normalized| i coefficients,| i | αi 2 + β 2 = 1. So far we have showed that the operations H I and | | | | ⊗ Our goal is to apply a Hadamard gate to this state, that P I can be written as a product of gates K, K† and ⊗ is, to transform it to ψ := α + + β , where Wv; the same is easily seen to hold for I H and I P . | i | i |−i ⊗ ⊗ 1 Consequently: := ( 0 1 ) , (B1) |±i √2 | i ± | i (i) As CZ [P P ]Wv, the CZ gate can also be written as a product∝ ⊗ of K, K and W gates; by analogy with the conventional definitions := ( 0 † v |±i | i± 3 1 )/√2. (ii) As W † HP H, the gate V = W¯ †K (regarded as | i h ∝ h To apply this gate, we first observe that a Hadamard a two–qubit operation acting nontrivially on either rotation can be decomposed as the first or second qubit) can be written as a product of K, K† and Wv gates as well; H = Rz(3π/2)Rx(π/4)Rz(3π/2) . (B2) 18

7. Finally, a two–qutrit gate between an auxiliary two logical qubits next to it in the state 0+ + 1 qutrit in 2 and the lower qutrit with ( i, 1), after (see (B1)). Then we apply a projection onto| a Bell! | state−! which the| state! of the system is [α( 0 1−+ 1 2 )+ 00 + 11 between the qubit we want to teleport and the | !| ! | !| ! | ! | ! β( 0 1 1 2 )]/√2=α( 0 + 1 )/√2+β( 0 first of these two logical qubits. The third logical qubit | !| !−| !| ! | ! | ! | !− 1 )/√2=H ψ ,aswewantedtoshow. is then left in the desired state, namely H˜ ψ . | ! | ! More precisely, consider a general initial| logical! state Note that, due to step 5,thedesiredgateisachievedup ψ = a 0 + b 1 ,wherea and b are unknown, normal- to an error of (#2), where we use e.g. the Jamio!lkowski ized| ! coe|ffi!cients| !a 2 + b 2 =1.Thenwetransformthis O | | | | Fidelity F [37]asameasureforthegatefidelity.Mak- state into Rz(π/2)HR˜ z(α) ψ by applying the following ing use of the distance measure between the imper- sequence of steps (see Fig. 11| ):! fect operation and the ideal Hadamard gate, D( , )= √1 F ,togetherwiththechaininginequality[E37,U38], 1. Single–qubit gates with eβJ =1toallphysical − D( 1 2, 1 2) D( 1, 1)+D( 2, 2), we conclude qubits of the two logical qubits on the right. Each thatE the◦ E totalU ◦ distanceU ≤ afterE UM applicationsE U of an imper- of these gates transforms the state of the physical fect operation of this kind in a quantum circuit is at most18 qubits from 0 to 0 + 1 =: √2 + .Thus,this | ! | ! | ! | !2 M times the distance of a single imperfect operation. results in the state ψ 16 ++++ ⊗ . | ! | ! Then these three gates can be achieved with the following JamioThatlkowski is, √1 fidelityFtot ofM the√1 overallF ,where circuitFtot containingdenotes theM − ≤ − 2. The four–qubit gate with eβJ = ei(α+π/2) on the sequence of Potts–type gates (see Fig. 10): imperfectJamio!lkowski operations, fidelity eachof the with overall Jamio circuitlkowski containing fidelity MF . imperfect operations, each with Jamio!lkowski fidelity F . top physical qubit of the first logical qubit. Also the Hence, for any circuit consisting of a polynomial number four–qubit gate with eβJ =0insidetheplaquette 1. A two qutrit–gate between an auxiliary qutrit in ofHence, gates, forM any= circuit(N), a consisting polynomial ofa accuracy polynomial in , number that is the state 2 and the lower qutrit of the logical of gates, M =O (N), a polynomial accuracy in #,thatis where the last two logical qubits are defined, and  = (1/poly(NO)), suffices to achieve a polynomial ac- βJ qubit with| (iµ, ν) = ( i, 1), which results in the # =O (1/poly(N)), suffices to achieve a polynomial ac- the four–qubit gates with e =0onthephysical − curacyO of the total circuit. Notice that this is sufficient qubits on top and on the right of the last two logical state α 0 1 iβ 1 2 . tocuracy obtain of a the final total approximation circuit. Notice of the that partition this is su functionfficient | i| i − | i| i to obtain a final approximation of the partition function qubits (as indicated in the second step of Fig. 11). with polynomial accuracy [42]. i(α+π) 2. A single–qutrit gate on the upper qutrit with with polynomial accuracy [41]. This results in the state (a 0 +e b 1 )[ 0000 + |2 ! | ! | ! 0011 + 1100 + 1111 ]⊗ . (µ, ν) = ( i, 1), and then a single–qutrit gate on | ! | ! | ! the second− qutrit with (µ, ν) = (1, 1), which results (i, 1) (i, 1) ( 1 , 1) (!, 1) (0, 1) !√2 3. The four–qubit gates with eβJ =0betweenthe in the state α( i 0 + 1 + 2 )( 0 + 1 + 2 ) 1 0 1 0 2 ( i, 1) | ! | ! | ! | ! | ! − physical qubits on the right and on the bottom iβ( 0 i 1 + −2 )(| i0 +| i1 +| i2 ).| i | i | i − | i − | i | i | i | i | i H ψ ψ of the last two logical qubits (as indicated in the | ! | ! 3. A two–qutrit gate between an auxiliary qutrit in third step of Fig. 11). The resulting state is 2 1 2 0 (1, 1) 2 i(α+π) 2 2 and the upper qutrit with (µ, ν) = (0, 1), and | ! | ! | ! | ! | ! (a 0 + e b 1 )[ 0 + 1 ]⊗ | i ( i, 1) ( 1 , 1) (!, 1) (0, 1) (0, 1) ( i, 1) | ! | ! | ! | ! the same gate between an auxiliary qutrit in 1 and !√2 − − 4. The four–qubit gate with eβJ = i applied on the the lower qubit, which results in the state α(| ii 0 + Rz (3π/2) top physical qubit on the second logical qubit. A 1 )( 1 + 2 ) iβ( 0 i 1 )( 1 + 2 ). − | i Rx(π/4) Rz (3π/2) four–qubit gate with eβJ =0betweenthephysical | i | i | i − | i − | i | i | i time 4. A two qutrit gate between the upper and lower qubit on the right of the second logical qubit and qutrit with (µ, ν) = (0, 1), which yields the state FIG. 10: The Hadamard rotation at the logical level, H, the physical on the right of it, which we refer to FIG. 10: The Hadamard rotation at the logical level, H, as the “middle qubit” (see fourth step of Fig. 11), is achieved by first performing a z–rotation Rz ,thenanx– α( i 0 1 i 0 2 + 1 2 ) iβ( 0 1 + 0 2 is achieved by first performing a z–rotation Rz, then an x– − | i| i − | i| i | i| i − | i| i | i| i − rotation Rx (which is itself composed of various gates) and which propagates the state of the first qubit to the i 1 2 ). rotation Rx (which is itself composed of various gates) and βJ | i| i finally another z–rotation Rz .Mostofthegatesinvolveaux- middle one. Then the four–qubit gate with e = finally another z–rotation Rz. Most of the gates involve aux- 5. A two qutrit gate between an auxiliary qutrit in iliaryiliary qubits, qubits, whose whose input input state state is is indicated indicated on the right right (s (sinceince i between the middle qubit and the left physical 0 and the upper qutrit with (µ, ν) = (, 1), and timetime runs runs from from right right to to left). left). See See the caption of Fig.66 forfor the the qubit of the third logical qubit. The resulting state | i meaning of the pair of numbers and the color associated to i(α+π) the same gate between an auxiliary qutrit in 2 meaning of the pair of numbers and the color associated to is (a 0 +e b 1 )[ 0 ( 0 +i 1 ) 1 ( 0 i 1 ]. | i each gate. See the text for the transformation of the state ψ | ! | ! | ! | ! | ! −| ! | !− | ! and the lower qutrit. Then a two–qutrit gate be- each gate. See the text for the transformation of the state | ψ! at each stage of the circuit. | i tween an auxiliary qutrit in 1 and the upper qutrit at each stage of the circuit. 5. Finally, two concatenated four–qubit gates with | i eβJ =0betweenthefirstandthesecondlogical with (µ, ν) = (1/(√2), 1), and the same gate be- qubit, which corresponds to the projection onto tween an auxiliary qutrit in 1 and the lower qutrit. the Bell state 0 0 + 1 1 .Weareinterested Up to terms of order (2),| i the resulting state is & |& | & |& | O Appendix C: Hadamard rotation with 2 Lattice in the state of the third logical qubit, since this [α( i 0 1 + 1 2 ) iβ( 0 1 i 1 2 )]/√2. See Z − | i| i | i| i − | i| i − | i| i Appendix C:Gauge Hadamard Theory–type rotation gates with Z2 Lattice contains the result of the teleportation. This state below for a discussion of the accuracy of the gate Gauge Theory–type gates is a( 0 + i 1 )+eiαb( 0 i 1 ), which equals due to neglecting these higher order terms. | !| | ! | !− | ! Here we show how to general single–qubit rotation of ˜ Here we show how to general single–qubit rotation of Rz(π/2)HRz(α) ψ . (C1) 6. A two–qutrit gate between an auxiliary qutrit in 0 (59)withZ2 LGT–type gates. This operation includes | ! | i and the upper qutrit with (i, 1), and another two– (R59z)rotations, with Z2 LGT–type which we gates.have shown This how operation to perform includes in qutrit gate between an auxiliary qutrit in 1 and RSec.z rotations,VD,andthenon–normalizedversionofthelogical which we have shown how to perform in Thus, this sequence of gates applies essentially the the upper qutrit. The resulting state is [α( |0 i1 + Sec.HadamardVD, and gate theH˜ non–normalized. We will implement version the of the latter logical as a first two logical gates of a general single qubit ro- | i| i ˜ i 1 2 ) + β( 0 1 i 1 2 )]/√2. Hadamardteleportation–based gate H. gate. We will Intuitively, implement the the idea latter is the as fol a- tation of (59). The rotation Rz(π/2) appearing in | i| i | i| i − | i| i teleportation–basedlowing. To apply H˜ gate.to the Intuitively, logical qubit theψ idea,weprepare is the fol- (C1)canbecompensatedinthenextrotation(marked | ! 7. Finally, a two–qutrit gate between an auxiliary lowing. To apply H˜ to the logical qubit ψ , we prepare | i qutrit in 2 and the lower qutrit with ( i, 1), after two logical qubits next to it in the state 0+ + 1 | i | −i which the| statei of the system is [α( 0 1−+ 1 2 )+ (see (B1)). Then we apply a projection onto a Bell state | i| i | i| i β( 0 1 1 2 )]/√2 = α( 0 + 1 )/√2 + β( 0 00 + 11 between the qubit we want to teleport and the | i| i − | i| i | i | i | i − | i | i 1 )/√2 = H ψ , as we wanted to show. first of these two logical qubits. The third logical qubit | i | i is then left in the desired state, namely H˜ ψ . | i Note that, due to step5, the desired gate is achieved up More precisely, consider a general initial logical state to an error of (2), where we use e.g. the Jamiolkowski ψ = a 0 + b 1 , where a and b are unknown, normal- Fidelity F [38O] as a measure for the gate fidelity. Mak- |izedi coefficients| i | ia 2 + b 2 = 1. Then we transform this | | | | ing use of the distance measure between the imper- state into Rz(π/2)HR˜ z(α) ψ by applying the following fect operation and the ideal Hadamard gate, D( , ) = sequence of steps (see Fig. 11| ):i √1 F , together with the chaining inequality [E38,U 39], − βJ D( 1 2, 1 2) D( 1, 1) + D( 2, 2), we conclude 1. Single–qubit gates with e = 1 to all physical thatE the◦ E totalU ◦ distance U ≤ afterE UM applicationsE U of an imper- qubits of the two logical qubits on the right. Each fect operation of this kind in a quantum circuit is at most of these gates transforms the state of the physical M times the distance of a single imperfect operation. qubits from 0 to 0 + 1 =: √2 + . Thus, this | i | i | i | i2 That is, √1 F M√1 F , where F denotes the results in the state ψ 16 + + + + ⊗ . − tot ≤ − tot | i | i 19

2. The four–qubit gate with eβJ = ei(α+π/2) on the would be the analogous case to the rotation of step top physical qubit of the first logical qubit. Also the 3, where ei(α+π) was applied). This results in the four–qubit gate with eβJ = 0 inside the plaquette state R (β)HR˜ (α) ψ . Then a teleportation–based z z | i where the last two logical qubits are defined, and Hadamard gate H˜ is applied with the same procedure as βJ the four–qubit gates with e = 0 on the physical the one described above, and this gives rise to the state qubits on top and on the right of the last two logical Rz(π/2)HR˜ z(β)HR˜ z(α). The final rotation must cor- qubits (as indicated in the second step of Fig. 11). rect for this phase, and the four–qubit gate at step 11 of i(α+π) i(γ π/2) iγ This results in the state (a 0 +e b 1 )[ 0000 + Fig. 12 must have e − (instead of e ). The over- |2 i | i | i 0011 + 1100 + 1111 ]⊗ . | i | i | i all sequence implements the desired general single qubit gate, R (γ)HR˜ (β)HR˜ (α) ψ . 3. The four–qubit gates with eβJ = 0 between the z z z | i physical qubits on the right and on the bottom Moreover, we apply single–qubit identities at the phys- of the last two logical qubits (as indicated in the ical level I := 0 0 + 1 1 on all physical qubits third step of Fig. 11). The resulting state is 1 | ih | | ih | i(α+π) 2 which belong to a logical qubit unless otherwise speci- (a 0 + e b 1 )[ 0 + 1 ]⊗ | i | i | i | i fied, as mentioned in Sec.VD (yellow faces in the tem- 4. The four–qubit gate with eβJ = i applied on the poral direction in Fig. 11). This gate is achieved by top physical qubit of the second logical qubit. A first rescaling the face interaction energy (Eq. (5)) to four–qubit gate with eβJ = 0 between the physical (Jf 1)δ(si + sj + sk + sl). According to (28) this − − qubit on the right of the second logical qubit and gives rise to single qubit gate whose diagonal elements β(J 1) the physical on the right of it, which we refer to are 1 and the off–diagonal elements are e f − . Then β(J 1) as the “middle qubit” (see fourth step of Fig. 11), the gate is achieved by setting e f − = ζ, where ζ is which propagates the state of the first qubit to the a polynomially small number. By the same argument as middle one. Then the four–qubit gate with eβJ = for the Potts single–qubit identity (see Sec.VC remark i between the middle qubit and the left physical (ii)), this will result in polynomial error at the end of the qubit of the third logical qubit. The resulting state computation, which is within the accuracy of the result. is (a 0 +ei(α+π)b 1 )[ 0 ( 0 +i 1 ) 1 ( 0 i 1 ]. | i | i | i | i | i −| i | i− | i Note that the unnormalized gate H˜ is applied once in 5. Finally, two concatenated four–qubit gates with every volume of 4 units in the x direction, 12 units in the eβJ = 0 between the first and the second logical y direction, and 7 units in the z direction. As mentioned qubit, which corresponds to the projection onto in Sec.VD, the number of these blocks is what gives rise the Bell state 0 0 + 1 1 . We are interested to the factor appearing in (57). in the state ofh the|h | thirdh |h logical| qubit, since this contains the result of the teleportation. This state Since the general single qubit unitary gate involves a is a( 0 + i 1 ) + eiαb( 0 i 1 ), which equals | i | i | i − | i number of spins fixed by the gauge, it is important to verify that no closed loops of fixed spins are formed [28]. R (π/2)HR˜ (α) ψ . (C1) z z | i This is because the gauge fixing only yields an equivalent theory if no loops are formed, since, e.g., order param- Thus, this sequence of gates applies essentially the eters of the theory are defined as products of variables first two logical gates of a general single qubit ro- on such closed loops. To verify that no such loops are tation of (59). The rotation Rz(π/2) appearing in formed we project our 3D lattice into a 2D lattice along (C1) can be compensated in the next rotation (marked the time direction (see Fig. 12), where one can easily rec- as time step 8 in Fig. 12) by applying a four– ognize that there is no closed path of edges fixed by the qubit gate with ei(β+π/2) (instead of ei(β+π), which gauge.

[1] H. E. Stanley, Introduction to Phase Transitions and edition, 1996). Critical Phenomena (Oxford University Press, 1971). [8] C. M. Papadimitriou, Computational complexity (Read- [2] D. P. DiVincenzo, Science 270, 255 (1995). ing, Massachusetts: Addison-Wesley, 1995). [3] F. Y. Wu, Rev. Mod. Phys. 54, 235 (1984). [9] L. Onsager, Phys. Rev. 65, 117 (1944). [4] R. J. Baxter, Exactly solvable models in statistical me- [10] P. W. Shor, in Proceedings 35th Annual Symposium on chanics (Academic Press Limited, San Diego, CA, 1982). the Foundation of Computer Science (IEEE Computer [5] M. M´ezard,G. Parisi, and M. A. Virasoro, Spin glass Society Press, Los Alamitos, CA, 1994), p. 124. theory and beyond (World scientific, Teaneck, NJ, USA, [11] D. A. Lidar and O. Biham, Phys. Rev. E (1997). 1987). [12] D. A. Lidar, New J. Phys. 6, 167 (2004). [6] M. Schulz, Statistical Physics and Economics: Concepts, [13] J. Geraci, Quantum Inf Process 7, 227 (2008). Tools and Applications (Springer, 2003). [14] J. Geraci and D. A. Lidar, Commun. Math. Phys 279, [7] R. K. Pathria, Statistical Mechanics (Elsevier, Second 735 (2008). 20

Rz (π/2)HR˜ z (α) ψ | !

3 5 6 3 0 | ! 4 0 3 | ! 4 ψ | !

eβJ =0 eβJ =1 eβJ =ei(α+π) eβJ =i x z y

FIG. 11: Part of a circuit with Z2–LGT–type gates that shows the processing of a logical qubit ψ .First,alogicalrotation FIG. 11: Part of a circuit with Z2–LGT–type gates that shows the processing of a logical qubit |ψ!. First, a logical rotation Rz (α)isappliedtoit.Then,alogicalteleportation–basedHadamard gate (up to a phase) is applied,| i which results in the state Rz(α) is applied to it. Then, a logical teleportation–based Hadamard gate (up to a phase) is applied, which results in the state ˜ Rz (π/2)HR˜ z (α) ψ (see text). Note that the qubit is processed in the z direction (corresponding to time) as well as the y Rz(π/2)HRz(α)| ψ! (see text). Note that the qubit is processed in the z direction (corresponding to time) as well as the y direction.direction. Colored Colored| faces facesi indicate indicate faces faces where where the the coupling couplingstrength strength has has a a specific specific value, value, as indicated in the legend. WavWavyylines lines indicateindicate edges edges whose whose spins spins have have been been fixed fixed by by the the gauge, gauge, and and th theireir color color has has no no meaning meaning nor nor a a correlation with the color of ththee faces.faces. They They are are a a guide guide to to the the eye eye to to verify verify that that no no loops loops are are fo formed,rmed, as as shown shown in in Fig. Fig. 1212..

[15] drawn,J. Geraci where and the D. first A. processing Lidar, New takes J. Phys. place from12, 075026 left to [32] putation.D. P. DiVincenzo, This implies D. Bacon, that # can J. Kempe, be a small G. Burkard, constant and not right.(2010). dependingK. B. Whaley, on the Nature size of408 the, 339 circuit, (2000). however additional [41][16] OneS. Bravyi may also and R.use Raussendorf, results from Phys. fault–tolerant Rev. A 76 quantum, 022304 [33] overheadM. Hsieh, for J. encoding Kempe, and S. Myrgren, fault-tolerant and gate K. B. implemen- Whaley, computation,(2007). which state that also noisy gates with a tationQuant. would Inf. Proc. be required2, 289 (2004). in this case. [17] smallD. Aharonov, but constant I. error Arad, suffi E.ce to Eban, perform and quantum Z. Landau, com- [34] Y. Shi, Quant. Inf. Comp. 3, 84 (2003). arXiv:quant-ph/0702008 (2007). [35] R. H¨ubener, V. Nebendahl, and W. D¨ur,New J. Phys. [18] D. Aharonov and I. Arad, arXiv:quant-ph/0605181 12, 025004 (2010). (2006). [36] G. De las Cuevas, W. D¨ur,H. J. Briegel, and M. A. [19] P. Wocjan and J. Yard, Quant. Inf. Comp. 8, 147 (2008). Martin-Delgado, Phys. Rev. Lett. 102, 230502 (2009). [20] J. B. Kogut, Rev. Mod. Phys. 51, 659 (1979). [37] G. De las Cuevas, W. D¨ur,H. J. Briegel, and M. A. [21] F. J. Wegner, J. Math. Phys. 12, 2259 (1971). Martin-Delgado, New J. Phys. 12, 043014 (2010). [22] K. G. Wilson, Rev. Mod. Phys. 47, 773 (1975). [38] A. Gilchrist, N. K. Langford, and M. A. Nielsen, Phys. [23] M. Van den Nest, W. D¨ur,R. Raussendorf, and H. J. Rev. A 71, 062310 (2005). Briegel, Phys. Rev. A 80, 052334 (2009). [39] W. D¨ur,M. J. Bremner, and H. J. Briegel, Phys. Rev. A [24] A. Sokal, Surveys in combinatorics 327, 173 (2005). 78, 052325 (2008). [25] E. Knill and R. Laflamme, Phys. Rev. Lett. 81, 5672 [40] A planar graph is a graph which can be drawn in the (1998). plane without crossings of the edges. [26] J.-M. Maillard, Journal of Nonlinear Mathematical [41] This is opposite to the way quantum circuits are usually Physics 10, 119 (2003). drawn, where the first processing takes place from left to [27] H. Nishimori and G. Ortiz, Elements of Phase Transi- right. tions and Critical Phenomena (Oxford University Press, [42] One may also use results from fault–tolerant quantum USA, 2011). computation, which state that also noisy gates with a [28] M. Creutz, Phys. Rev. D 15 (1977). small but constant error suffice to perform quantum com- [29] D. Aharonov, V. Jones, and Z. Landau, Proc. of 38th putation. This implies that  can be a small constant not ACM symposium on Theory of computing 427 (2006). depending on the size of the circuit, however additional [30] J. Smith and M. Mosca, arXiv:1001.0767 (2010). overhead for encoding and fault-tolerant gate implemen- [31] J. E. Sacco and F. Y. Wu, J. Phys. A: Math. Gen. 8, tation would be required in this case. 1780 (1975). 21 21

Two–qubit gate General single–qubit gate Rz (γ)HR˜ z (β)HR˜ z (α) Two–qubit gate

iϕσ σ iϕσz σz e z ⊗ z e ⊗ i(α+π) i(β+π/2) i(γ π/2) e e e − 1 3 3 3 8 3 3 11 13 2 6 5 7 9 5 10 12 4 4 4 4 1 3 33 8 33 11 13 2 6 5 7 9 5 10 12 4 4 4 4 1 13

1 6 11 2 7 12 x 3 8 13 4 9 5 10 all time steps z y

FIG. 12: A projection of the circuit of the 3D Z2 LGT into its spatial dimension. Part of the circuit in its normal form (that FIG.is, in 12: the A structure projection two–qubit of the circuit gate, single–qubit of the 3D Z gate,2 LGT two into–qubit its gate) spatial is dimension.illustrated. LogicalPart of qubits the circuit are indicated in its normal with thick,form (that is,black in the lines. structure All edges two–qubit in the time gate, direction single–qubit (going out gate, of the two–qubitpaper) which gate) are is illustrated.boundary to Logicala logical qubits qubit are are fixed indicated by the withgauge thick, black(pink lines. dots). All Edges edges in in the the spatial time direction direction (going are either out notof the fixed paper) by the which gauge are (black, boundary thin to lines), a logical or are qubit fixed are by fixed the gauge by the at gauge (pinkdifferent dots).time Edges steps in 1 ... the13 spatial indicated direction with a arewavy, either colored not edges. fixed Hence,by the a gauge loop of (black, edgesfixedbythegaugewouldcorrespond thin lines), or are fixed by the gauge at differentin this figuretime tosteps a closed 1 ... 13 loop indicated of wavy, with colored a wavy, edges. colored It can be edges.verified Hence, by inspection a loop of that edges no fixed such byloops the are gauge present. would correspond in this figure to a closed loop of wavy, colored edges. It can be verified by inspection that no such loops are present.