Tensor Networks for Lattice Gauge Theories with continuous groups

We discuss how to formulate lattice gauge theories in the Tensor Network language. In this way we obtain both a consistent truncation scheme of the Kogut-Susskind lattice gauge theories and a Tensor Network variational ansatz for gauge invariant states that can be used in actual numerical computation. Our construction is also applied to the simplest realization of the quantum link models/gauge magnets and provides a clear way to understand their microscopic relation with Kogut-Susskind lattice gauge theories. We also introduce a new set of gauge invariant operators that modify continuously Rokshar-Kivelson wave functions and can be used to extend the phase diagram of known models. As an example we characterize the transition between the deconfined phase of the $Z_2$ lattice gauge theory and the Rokshar-Kivelson point of the U(1) gauge magnet in 2D in terms of entanglement entropy. The topological entropy serves as an order parameter for the transition but not the Schmidt gap.

Tensor Network (TN) techniques are starting to play an important role in our understanding of many-body quantum systems, both on the lattice and in the continuum.They can be used as a framework to classify the phases of quantum matter [1][2][3], or as powerful numerical ansatz in actual computations of 1D [4,5] and 2D strongly correlated quantum magnets [6][7][8], fermionic systems [9,10], or anyonic systems [11,12].They have also recently made their way into quantum chemistry as computational tool to study the structure of molecules from the first principles [13,14].
While numerical simulations based on Monte Carlo (MC) are still the most successful techniques in some of these fields, TNs start to provide viable alternatives to them, particularly in those contexts where MC has troubles, such as the physics of frustrated anti-ferromagnets [15][16][17], and the real time evolution of out of equilibrium systems [18][19][20].
At present, the main limitation of numerical TN techniques is that the cost of the simulations increases rapidly with the amount of correlations in the system (which is encoded in the bond dimension D of the elementary tensors), and thus TNs tend to be biased towards weakly correlated phases.
However, the steady improvement of the TN algorithms [21,22] makes us confident that these limitations will soon be overcome, and as a consequence TN will become more and more useful in the physics of quantum many-body systems.Among interesting quantum manybody systems, we focus here on gauge theories, a context in which TN have recently made a spectacular debut [23][24][25][26][27].
The phase diagrams of GT, similarly to those of most strongly correlated many-body quantum systems, are still debated.Still, there are exactly solvable GT that display topological phases.Recently, topological states have been proposed as possible hardware for quantum computers, and thus there is an urgent need for clarification of generic GT phase diagrams where these states could appear [23,[34][35][36][37]].
Wilson's formulation of lattice gauge theories (LGT) [38] was obtained by substituting the continuous spacetime with a discrete set of points (the lattice).It provided the breakthrough that has allowed to develop numerical tools based on MC, able to address the strong coupling regime of GT.These tools are, as today, the main resource to compare various aspects of QCD at strongcoupling with experiments [39].Those aspects of QCD that are hard or impossible to address with MC are indeed in most of the cases still unclear.For example, the mechanism of charge confinement [40], invented to explain the absence of isolated quarks [41], still stands as a conjecture in full QCD, four decades since it was first understood in Abelian models.Furthermore, MC simulations struggle to address hot and dense nuclear matter [42,43], probed by heavy nuclei collisions at CERN and RHIC [44,45].In their current formulation MC simulations of LGT cannot be used to characterize the real time out of equilibrium dynamics of GT.The aim of this paper is two-fold.On one side we develop the theory of TNs for LGT with arbitrary groups.On the other, we provide a constructive approach to LGT using the TN formalism (reviewed in Sec.II).In this framework, TN are used as a model-building tool that, given a group G, allows to design the most general gauge invariant theory out of the simple knowledge of the group representation matrices.The approach is based on reformulating very simple results about the theory of group representations (reviewed in Sec.III) in the TN formalism.
In particular, we use the approach in which LGT differ from standard many-body quantum systems due to the presence of a large amount of local symmetry constraints (Sec.IV), which arise as a consequence of generalizations of the Gauss law.One of the guiding principles in designing LGT will thus be the possibility of defining such local symmetry constraints (Sec.IV A and Sec.IV B).In particular, we identify the "physical Hilbert space", H P , as the space of states that fulfill those constraints (Sec.IV C).We show how these constraints can be naturally embedded in a TN.We thus construct an exact projector onto H P as a TN (Sec.V).We re-derive, with our formalism, the elementary gauge invariant operators (Sec.IV D) necessary to describe the dynamics inside H P .
In the course of our discussion we explain that continuous groups are associated to infinite dimensional local Hilbert spaces, and thus the TN network construction for them has infinite bond dimension D, and thus is computationally intractable.
In order to cure this, we introduce a scheme that allows to truncate, in a gauge invariant way, the infinite dimensional local Hilbert spaces.In this way we obtain a version of the KS LGT for (compact) continuous groups defined on finite dimensional Hilbert spaces (Sec.VI).The projector onto H P for these models can be expressed as a TN with finite bond dimension, and can thus be used in practical computations.
We review the alternative constructions of LGT with continuous gauge symmetry and discrete local Hilbert spaces, called gauge magnets (or link models) [46][47][48][49][50] (Sec.VII).We generalize it to arbitrary groups and we show that in the non-Abelian case, the gauge magnets are not equivalent to a local gauge invariant truncation of the KS LGT.At this stage we are able to introduce a general TN variational ansatz for LGT, with both discrete and continuous groups, that again automatically embeds all local constraints dictated by the gauge symmetry.The states described by this ansatz are indeed gauge symmetric by construction.Gauge-symmetry constraints, indeed, allow to restrict the attention to H P , which is still, however, exponentially large as shown in Fig. 1.Low-energy states of local gauge invariant Hamiltonians are expected to live only on a small region of H P , in the same way as low-energy states of generic local Hamiltonians live in a small region of the unconstrained Hilbert space, since they fulfill the "area-law" for the entanglement [51][52][53][54].
We explicitly construct a TN ansatz that allows to explore this small corner of H P (Sec.VIII).In its simplest form, the TN ansatz requires the same bond dimension as the projector onto H P .In this case D √ d, with d the dimension of the local Hilbert space, and it allows to characterize the physics of generalized Rokshar-Kivelson states (RK) [55].By increasing the bond dimension, one can gradually explore all the space of gauge invariant states H P , as represented in Fig. 1, by increasingly large Figure 1.The Hilbert space H of a quantum many-body system (represented here by a 3D box) is exponentially large, since it is the tensor product of the Hilbert spaces of the constituents.Gauge symmetry allows to identify a smaller space that we call the physical Hilbert space HP .This is the subspace spanned by those states that fulfill all the local constraints imposed by the gauge symmetry and is represented by a membrane inside H. HP is smaller than the full H but it is still exponentially large.Low-energy states of local gauge invariant Hamiltonians, however, are expected to live in a small corner of HP , in the same way as low-energy states of generic local Hamiltonians live in a small corner of H [51][52][53][54].For this reason we design a variational ansatz based on TN that allows to explore this small corner of HP (orange oval).By increasing the bond dimension of the elementary tensors in the TN (D ↑) we can explore increasingly large regions of HP , and eventually for D → ∞ we can cover the whole HP .The projector on HP , and a family of interesting Rokshar-Kivelson (RK) states, are obtained exactly with TN with minimal bond dimension that scales as D √ d where d is the dimension of the local Hilbert space.
The TN ansatz depends on several elementary tensors, each made by two distinguished parts.One part is completely determined by the gauge-symmetry constraints, while the other contains the free parameters to be used in variational calculations.As in the case of globally invariant TN [56][57][58], our formalism allows to unveil interesting connections between gauge symmetric quantum states and spin networks [59].
As a further application we define gauge invariant vertex operators [60] for arbitrary gauge theories (Sec.IX).In this way we open new possibilities to use them as extensions of the standard Hamiltonians in order to explore extended phase diagrams of the known models.
We benchmark these new tools in the context of RK states.In particular we focus on the recent proposals about the characterization of quantum phases based on the analysis of the entanglement scaling of the ground state wave function [61][62][63].We analyze the well known transition between the eight-vertex and the six-vertex models.In the gauge theory language this transition is induced by applying the vertex operators [60] onto the RK Z 2 wavefunctions.In this way we provide an example of phase transition between a Z 2 gapped spin liquid and a U (1) algebraic spin liquid that is detected by the topological entropy, but elusive for the lowest part of the entanglement spectrum (Sec.X).
All the discussion about connections of our results with other works in the literature is postponed to Sec.XI, and we conclude with a summary of our results and an outlook on future developments in Sec.XII.

I. SUMMARY OF THE RESULTS
Here we briefly summarize the most important results of our paper so that the reader interested in applying our formalism to specific models will easily find the relevant material.
-We derive the TN representation of the standard KS LGT Hamiltonian for arbitrary compact groups in Eq. 18,19,23.-We present an extra gauge invariant operator that can be added to the KS Hamiltonian to explore generalized KS LGT for arbitrary compact groups in Eq. 45.
-We provide the exact TN representation for the projector onto H P of the KS LGT (represented as an hyperplane in Fig. 1) in Fig. 10.It is the contraction of several copies of elementary tensors C and G defined in Fig. 11 and Eq. 26.
-We describe a truncation of the Hilbert space of the KS LGT that is consistent with gauge symmetry in Sect.VI.This allows to study LGT with continuous groups (i.e.U (1) and SU (N )) with constituents leaving in finite dimensional Hilbert spaces.
-In this way we introduce an exact TN representation with finite bond dimension of the projector onto the H P of an arbitrary LGT.It is encoded in the TN of Fig. 10 with the C and G tensors defined in Fig. 15.
-We discuss the relation of this truncation scheme with gauge magnets or quantum link models.We build the exact TN representation of the projector onto H P also for gauge magnets.It is the TN of Fig. 10 with the C and G tensors defined in Fig. 19.
-We provide a variational ansatz for generic states of H P of all the LGT discussed as the TN of Fig. 20.The ansatz is the contraction of several copies of sparse tensors that unveils a connection between the LGT gauge invariant Hilbert space and spin networks.
-We confirm that the topological entropy detects phase transitions elusive to standard local order parameters.
In particular, we characterize the transition between two different topological phases the 2D 8-vertex and the 6vertex topological phases.These results are presented in Fig. 24.In Fig. 25 we show that the same phase transition does not affect the behavior of the lowest part of the entanglement spectrum.

Tensors are multi-linear maps Xa
bc acting among different Hilbert spaces.In particular the coefficients of a state of a quantum many-body systems are encoded in the element of a very large tensor T i1...i In general, the tensor T is too large to be stored on a computer and thus it is useful to express it as the contraction of smaller elementary tensors.These contracted tensors are called TN.When dealing with large TN, the formulas become easily large and complex and it is simpler to resort to a graphical notation.The graphical notation is explained already in the literature [6,[64][65][66], but we also shortly review it here in order to fix the notation we use in the paper.
In the graphical notation, geometric shapes are associated to tensors and lines or "legs" attached to them represent their indexes.As an example, the upper panel of Fig. 2 represents a tensor with three indexes X a bc .A small dot on the shape allows to keep track of the index ordering that is assumed clockwise starting from the dot.Incoming legs in-legs (upper indexes) are drawn with entering arrows while outgoing legs out-legs are drawn as outgoing arrows.The Hermitian conjugate of a tensor, X † , involves taking the complex conjugate of the elements and exchanging the in-, with the out-legs, X † = Xcb a .This is represented graphically by mirroring the tensor and inverting the arrows on the lines (left of the upper panel of Fig. 2).
A leg connecting two tensors represents their multiplication through the contraction of the corresponding indexes (summation over all the values of that indexes).An example is represented on the left of the lower panel of Fig. 2, where the tensor W † is contracted with the tensor W .
In our formulas we sometime omit explicit summation and use the Einstein notation, where the summation is intended over repeated indexes.
A tensor can always be interpreted as a matrix by dividing its legs into two groups, one group identifies a vectors spaces U and the other V .In this way the tensor becomes a map from U to V .A natural choice is to interpret U as the collection of in-legs and V as the collection of out legs, but this is not the only possibility.
An important class of tensors are isometric tensors.For a specific choice of U and V , they fulfill In our drawings triangular shapes always represent isometric tensors [68].
The lower panel of Fig. 2 illustrates a specific case of a three-leg isometric tensors W , where U is spanned by the leg a and V is spanned by the two legs b, c.This implies that W † is defined as W † ≡ W cb a and equation (2) reads W kl a W a bc = δ k b δ l c (remember that there is a sum over a).Graphically the contraction is represented by the line connecting the two tensors.The result of the contraction is a four-leg tensor, explicitly written as the tensor product of two identity tensors represented by straight lines.The dagger operation X † involves both the complex conjugation of the elements of the tensor, and the inversion of the arrows attached to its legs.As a consequence the order of the legs also changes, X † = Xcb a [67].Panel b) An isometric tensor (or simply isometry) is always represented by a triangular vertex.A tensor W is isometric if there is a specific choice of legs, which identifies two vector spaces U and V , such that, when W is contracted with W † through the legs in U , the result is the identity tensor in V .In the figure, U is spanned by the leg a, while V is spanned by the two legs b, c.
When TNs represent quantum states of many-body systems, the legs related to the constituents (i 1 → i N in Eq. ( 1)) are called physical legs and are typically represented by Latin letters, while all the others legs (those that are contracted) are legs called auxiliary legs, and represented by Greek letters.

III. GROUP THEORY IN THE TENSOR NETWORK LANGUAGE
Here we assume that the reader is familiar with basic concepts of the representation theory of both finite and continuous groups, and we list the relevant results for our paper in order to express them in the TN language.In particular, while this paper deals with gauge theories with continuous groups, we develop the formalism by using discrete groups G.The underlining ideas, are indeed completely independent from the fact whether the group is discrete or continuous, and we feel that discrete groups allow to present these ideas in a simpler way.
Concretely, all the results we present, which involve the summation over group elements, can be rewritten for continuous compact groups by substituting the sums with integrals over the group, defined through the appropriate invariant measure (see i.e. chapter 4 of [69]).
Here, we remind that a collection of elements { g } closed under multiplication forms a group G.We are mostly interested in matrix representations of the group G that are obtained by associating to each group element g a unitary matrix, Γ(g), acting on a given vector space.In this way the group multiplication table is rephrased into specific relations between the representing matrices.In general, given a matrix representation of a group, there is a well defined procedure to reduce it to a block diagonal form, where each of the blocks constitute a "smaller", independent representation of the same group G.If those blocks are not further reducible into smaller blocks they define an irreducible representation of the group G that in this paper will be labeled by r.The dimension and number of the irreducible representations depend on the group G, and their study is the subject of the theory of group representations.In the following we denote by Γ r (g) the matrix representation of g in the irreducible representation r.
One of the most important results of the theory of group representations is, what is typically called, the "great orthogonality theorem" [70].It states that given a group G with elements g, and given any pair of irreducible representations r, r the following relation holds where Γ r (g) l k are the l, k matrix elements of the irreducible representation (irrep) r of g, |G| is the number of elements of G, and n r and n r are the dimensions of the irrep's r and r .We now want to reinterpret this relation in terms of TN diagrams.In order to do this we need to identify two vector spaces U and V .U is spanned by the group elements g.This vector space is called group algebra C(g), and has dimension equal to |G|.V is the vector space spanned by the direct sum V = ⊕ r (V r ⊗ V r ).Each of V r is the defining space of the irrep r.V r is the defining space of its conjugate representation, obtained by taking the Hermitian conjugation of the matrices, Γ † r (g) ≡ Γ r (g −1 ), where we have used the property that we are dealing with unitary representations.The fact that the vector space V has a direct sum structure is encoded in the δ(r, r ) factor in the right hand side of Eq. (3).
We start by focusing on the above formula in the case r = r .In this case Eq. (3) tells that the tensor W r , is an isometry.The tensor W r is represented in the panel a) of Fig. 3.The fact that it is an isometry means that as represented in the panel b) of Fig. 3.
Each of the W r thus allows to project a vector |g in the group algebra C(G) onto a vector |(e r ) m l of the tensor product V r ⊗ V r .This can be used in two ways.Reading Eq. ( 4) from left to right, it tells us that if we know all the Γ r (g) for all the elements g ∈ G, we can collect them in a three-leg tensor and obtain an isometry that projects C(G) onto V r ⊗ V r .From right to left, we can obtain the irrep's matrices.If we are given the isometry W r , by acting onto the vector |g as we represent graphically in the panel c) of Fig. 3.
A peculiarity of our notation, that we inherit from spin networks, is that each leg of the tensor also carries a representation index r that is typically superimposed to the line.In order to avoid confusion, after Fig. 4 we will drop all the letters labeling the indexes of the tensors (unless really needed), and keep only the letters related to the irrep r.
A second result of the theory of group representations is that r n 2 r = |G|, that is the direct sum of all the W r is a unitary transformation as encoded in following relations, A graphical representation of the direct sum of W r leading to W G is presented in Fig. 4.

A. Symmetric tensors
In the context of many-body quantum systems, symmetries play a fundamental role in the classification of phases.Recently, in the context of TN states, symmetries have been used to classify gapped phases of 1D systems [1][2][3].For this reason a strong effort has been devoted to incorporate the appropriate exact symmetries even when studying many-body systems with approximate variational ansatz.In the context of TN, a sufficient condition in order to have symmetric states is that A simplified picture is shown on the lower part, where the direct sum is implicit in the absence of the label r attached to the legs of the tensor.This is the notation we will use in the following.When we want to represent Wr we will attach r to the leg, while we represent WG by exactly the same drawing but without the r.From now on, for simplicity, we will also omit to label the legs with letters.b) The unitarity of WG is encoded in the fact that the contraction over the two legs acting on ⊕(Vr ⊗ Vr) gives a delta function in C(G).
the constituent tensors are symmetric [57,58,[71][72][73].As an example a symmetric tensor with respect to the group G with one in-leg and two out-legs obeys the following equation, with Γ r (g) the matrix of the appropriate unitary representation of the group G.This relation is sketched graphically in Fig. 5. Equation ( 8) can be satisfied by non-vanishing tensors only when the tensor product R = r ⊗ r ⊗ r contains the trivial representation, that is the representation where all group elements are mapped to the identity.It is thus important to be able to explicitly construct the Figure 5.A symmetric tensor is left invariant by the simultaneous rotation of all incoming legs by Γ † (g), and its out-going legs by Γ(g) in the appropriate representation.Here we exemplify the case of a three-leg tensor with an incoming leg that transforms in the irrep r, and two out-legs that transform under irrep's r and r .
trivial representation contained in a given tensor product of different representations.For continuous groups this can be done by diagonalizing the corresponding Casimir operators.Their zero eigenvalues, if present, identify the trivial factors.The way this is done in practice is explained in detail in Refs.[58,74].
An alternative way, which works both for discrete and continuous groups, is to explicitly build the projector onto the trivial representation as a group sum (or integral in the case of continuous groups).The projector is given by as can be found i.e. in Ref [69].This is the method that we will mostly use.
A third possibility entails disentangling the symmetry constraints following the ideas of Refs.[23,75,76].We postpone the discussion about this until Sec.V, where we will provide an explicit example of this procedure.

IV. HAMILTONIAN LATTICE GAUGE THEORIES FROM THE TENSOR NETWORK PERSPECTIVE
Gauge theories originated, at a classical level, in the description of the electromagnetic interactions between charged particles and light.The physical processes, described by the Maxwell equations, depend only on the electric and the magnetic fields while Maxwell equations can be written in terms of a vector potential and in this form they show some redundancy.The vector potential can be modified by adding to it the gradient of an arbitrary scalar potential, without affecting the corresponding electric and magnetic field, so giving the same physical results.
At a quantum level the vector potential becomes a full quantum field, and the redundancy appears as a local symmetry in the action that drives its dynamics.The generalizations of these ideas to vector potentials describing non-Abelian "electric and magnetic" fields, and their success in describing the hadron spectrum, gave rise to the modern gauge theories, and to our understanding of particle physics.
Actual calculations away from the perturbative regime are most of the times carried out numerically in the framework of LGT by discretizing the space-time on a lattice.In this formalism the vector potential is associated to the links of the lattice, while the charged matter fields live on the sites.
A Hamiltonian version of the system has been obtained by identifying one of the lattice direction as "time", fixing the temporal gauge, and constructing the Hamiltonian operator whose matrix elements coincide, in the time continuum limit, with those of transfer matrix in the time direction [77,78].
In the Hamiltonian formulation LGT become manybody quantum systems, whose constituents are divided in two groups, gauge bosons attached to the links of an oriented lattice Λ and matter constituents attached to the sites s of Λ.Here, we will work on an oriented 2D square lattice but, what follows, can be generalized easily to more complex orientable lattices.
The original local symmetry of the classical action is then mapped to a residual local symmetry of the quantum Hamiltonian.Symmetric Hamiltonians typically have symmetric eigenstates, and thus one can decide to characterize the space of locally symmetric states.The residual local symmetry is defined in terms of a set of constraints, that the quantum sates and operators should fulfill.As we show in this section, both the operators used to define the symmetry constraints and the local constraints have a natural expression in terms of TN diagrams.In particular in this section we describe the Kogut-Susskind version of the Hamiltonian LGT (KS).

A. Hilbert space of constituents
The Hilbert space for gauge bosons is the group algebra C(G).In this case, one can associate a state |g to any group element g ∈ G. States representing different group elements are orthogonal g|h = δ h g .As a consequence, the dimension of the local Hilbert space is equal to |G|.In particular, continuous groups require dealing with infinite dimensional Hilbert spaces.
The lattice Λ is oriented, and it is made by L links so that the total Hilbert space is C(G) L .Changing the orientation of one link sends |g → |g −1 .If we act with the operator O on the state |g , this also implies that we need to act with the operator O † on the state |g −1 , obtained by reversing the link orientation.
A prerequisite for defining the action of the symmetry operators is to be able to define the action of left and right rotations of a state by arbitrary group elements h and k ∈ G.This is achieved by defining the operators L(h −1 ) and R(k), which act on |g and produce This is done first by using W G of Eq. ( 7), to change basis from C(G) to ⊕ r (V r ⊗ Vr ).At this stage the rotation is performed through the direct sums of the rotation matrices in each representation, and then one rotates back to C(G) with W † G .This is expressed graphically in the panel b) of Fig. 6, and reads

B. Gauge transformations
Having the operators that perform the left and right rotations, we are now in the position to define the operators A s (h), the building blocks of local gauge transformations.In particular, the local transformation rotates all the states of the links touching a site s by an element h ∈ G. Since the lattice is oriented, the transformation induced by A s (h) is different for entering s (in-links) and links leaving s (out-links).All in-links are rotated through R(h) while all the out-links are rotated on the left by L(h −1 ).Concretely, A s (h) at site s, acting on links s 1 to s 4 ordered counter-clockwise starting from the left, is defined as with L and R defined respectively in Eq. ( 11) and (12).Notice that [A s (g), A s (h)] = 0 if s = s , as a consequence of the commutation between L and R operators defined on the same links.They are represented graphically in Fig. 7.A generic gauge transformation is then a product of local gauge transformations, where for each site s one chooses a different element g s to perform the desired rotation.Given a lattice of L s sites and a choice of L s elements h i , i = 1 . . .L s ∈ G, we obtain the transformation T ,

C. The gauge invariant Hilbert space
The set of states in the Hilbert space that are invariant under all A s (g), the building blocks of the gauge transformations, defined by Eq. ( 13), constitutes the physical Hilbert space (or gauge invariant Hilbert space) H p ,  7) and represented in Fig. 4 (the first horizontal triangle).One then applies to each of the legs the corresponding rotation matrix given by ⊕r Γr(h −1 ) ⊗ Γr(k) , with the individual Γr defined in panel c) of Fig. 3 and represented here by the two vertical triangles.
At last W † G , represented by the inverted triangle, allows to go back to to C(G) .Figure 7. Graphical representation of the operator As(h), the building block of gauge transformations in the Kogut-Susskind LGT.On every link entering a site s, it either rotates the state of the link through R(h) or L(h −1 ), depending on whether the link enters or leaves the site.The form of L and R are given in panel b) of Fig. 6.
where s are the sites of the lattice Λ, L is the number of links, and g is an arbitrary group element.
An example of state in H p is given by H p is a subspace of the original tensor product Hilbert space C(G) L , as sketched in Fig. 1.By construction all states in H p are also invariant under any global transformation T , defined in Eq. ( 14).

D. Gauge invariant operators
We are now interested in introducing the dynamics of a LGT, and this is first done by characterizing gauge invariant operators.
Gauge invariant operators are operators O that commute with all the A s (g), that is We would like to find the "minimal" gauge invariant operators, that is those that constitute the building blocks for gauge invariant Hamiltonians, and with as small support as possible.In order to find them we take inspiration from the QED Hamiltonian, whose gauge part can be written as , with E and B being the electric and magnetic fields.On the lattice the E 2 term is mapped to a link operator (remember that E = −∇V , with V being a scalar field, so that in a mathematical sense E is naturally a one form, and thus geometrically attached to links).The term B 2 is mapped to a plaquette operator, where plaquettes, the smallest possible closed loops made by links, are the elementary pieces of the lattice surface (again remember that B = ∇∧A, with A being a vector field, and thus B is naturally identified with a two form, discretized on plaquettes).
For this reason we look for a generalization to an arbitrary group G of the E operator of electromagnetism, as a single-link operator, and of the B operator, as an operator acting on plaquettes of the lattice.We start by the single link operator.In an Abelian LGT any matrix representing the rotation by a group element commutes with all the others, and thus fulfills Eq. (17).For this reason we can choose any Γ reg (g) + H.c. [79] as a link operator [80].When dealing with non-Abelian LGT, the only link operator that commutes with an arbitrary rotation, as requested by Eq. ( 17), is an operator proportional to the identity in each of the irrep's, as a consequence of the Schur lemma [81].A gauge invariant link operator acting on a link s n in the KS LGT thus can be expressed as with c r arbitrary numbers and W G defined in Eq. ( 7).
Plaquette operators can be defined as matrix product operators whose elementary tensors U act on the Hilbert space of a single link and an auxiliary Hilbert space.Specifically U acts on the tensor product of the C(G) ⊗ V rm .V rm is the defining space of the irrep r m of G that defines how the matter transforms under gauge transformation [77,78,82].U is defined as It acts diagonally on the Hilbert space of the link s n , and perform a controlled rotation in the auxiliary space, in other words it "reads" the state of the link and rotates accordingly the state on the auxiliary space r m .The operator U sn is represented graphically in Fig. 8.
From the definition we can derive its covariance properties under left and right rotations.Indeed after the gauge transformation that sends |g to |h −1 gk , a U sn becomes as illustrated in the lower panel of Fig. 8.By re-defining g = h −1 gk we obtain  6)).b) The above definition implies that the Us n transmits the rotation onto the physical index, as induced by conjugation by L and R, to the auxiliary indexes.This property allows to use Us n as building block of the gauge invariant plaquette operator in Eq. (22), where, thanks to the trace, the rotations attached to the auxiliary indexes cancel.
Eq. (20) together with (21) show that the U sn allows to transfer the rotation on the physical Hilbert space of the link to corresponding rotations on the auxiliary space.
This relation is often considered as the defining relation of a LGT [82], since U can be thought of the equivalent of the position operator in the group manifold, while L, R are equivalent to translation operators on the group manifold.
By appropriately building a close path out of U we can get rid of the rotations on the auxiliary legs, and thus obtain a gauge invariant operator.In particular we can now construct the simplest closed path that leads to the plaquette operator we are after.
where we denote by p a plaquette of Λ, and by p 1 • • • p 4 the links around it, ordered counter-clockwise.The dagger is related to the fact that the orientation of the plaquette is in some cases opposite to the natural orientation of the lattice, and the trace is intended over the auxiliary indexes only.The equivalence between Eq. ( 20) and  22) constructed as a matrix product operator from four Up n 's, acting on the links around a plaquette in the KS LGT.As a consequence of the covariance of the Up n under conjugation by L and R (see panel b) of Fig. 8).It transfers the rotation onto the physical legs to rotations onto the auxiliary legs.The operator commutes with the gauge transformations, and, thus, it be used as building block of a gauge invariant Hamiltonian (see Eq. ( 23)).(21) guarantees that the plaquette operator, represented in Fig. 9, commutes with the gauge transformations that have non-trivial overlap with it.
Having both gauge invariant link-operators and plaquette operators, we can now write the generalization of the E 2 + B 2 Hamiltonian of QED for a LGT with gauge group G.This reads where α is the coupling constant, and the first sum runs over links l ∈ Λ, while the second over plaquettes p ∈ Λ.

V. PROJECTOR ONTO Hp AS A TENSOR NETWORK
The gauge invariant Hilbert space H p defined in Eq. (15), is made of those states that fulfill all constraints A s (g) |φ = |φ .This can be obtained through a projector P P : C(G) L → H p , P 2 = P. ( Here we show that P has an exact TN representation.The idea is very general and requires the contraction of several copies of two types of elementary tensors, C tensors and G tensors.The two have different roles as shown in Fig. 10.The C tensors copy the states from the physical legs to the auxiliary legs so that gauge constraints are decoupled and are imposed individually by G tensors.There is a C α,j i,β , for every link.They have all elements zero but those corresponding to α = i = β = j [83][84][85].For every site, there is a G α1α2 α3α4 that only possesses auxiliary indexes (all of its indexes are contracted) [86].It selects, among all states of the tensor product of the four auxiliary constituents around a site, only those that fulfill the gauge-symmetry requirements in Eq. (15).
Concretely, consider an horizontal link (s 1 using the notation of Fig. 7) connecting sites s − 1 and s.Its state is copied, through the corresponding C, to two auxiliary states, one located close to s − 1, α and the other close to s, β (see panel b) of Fig. 10).In this way we can treat the gauge constraint defined at the site s − 1 as acting on α rather than on the link s 1 , analogously the gauge constraint at the site s can be imposed on β rather than on s 1 .In this way we have been able to completely decouple the gauge-symmetry constraints acting on site s − 1 and s.Before the copy tensors they were acting on the same link s 1 , while after it they act on two different auxiliary sites α and β.This allows to address each gauge constraint individually.
By contracting as many copies of C as there are links on the lattice with as many copies of G tensors as there are sites on the lattice, following the pattern in Fig. 10, we obtain the desired projector P.
Let us write explicitly the tensors C and G.The only non zero elements of the copy tensor are C g,g g,g = 1, ∀g.Regarding G , there are several ways to obtain them (all providing equivalent tensors).Here we follow the one inspired by the known TN expressions for the ground states of quantum doubles [23,75,76,87].The idea is to disentangle the gauge-symmetry constraint.It originally acts on four auxiliary sites, and we want to design an appropriate unitary transformation that transforms it to a single auxiliary site operator.In practice, we obtain this by constructing G itself as the result of an elementary TN contraction, whose building blocks are unitary tensors that act on two constituents, and perform controlled rotations.In particular we define the tensors, C R (α, β) and where α and β specify the location of the constituents in the virtual lattice.The generic properties of these tensors are independent on the position of the constituents.|g, gh .The two operators have the following properties: These properties can be used in order to simplify the gauge-symmetry building blocks.Concretely, we now specify one possible arrangement of C operators that allows to simplify the gauge condition.
If we define the following unitary operator ) by using the properties (26) we obtain where A s (h) are the building blocks of local gauge transformation defined in Eq. ( 13).The physical interpretation of this transformation is that we have concentrated a four-body constraint onto a single-body constraint acting on α 1 that it is now easy to fulfill.On α 1 , gauge invariance (15) requires indeed to pick the only state that is invariant under the rotation for an arbitrary group element.This is the state Every state of the other three auxiliary sites, forming C(G) 3 is by construction gauge invariant, since after the unitary transformation the gauge constraint does not act on those sites.The projector operator is obtained by the equal superposition of all the gauge invariant states.This can be done by projecting each of the three C(G) onto |+ = g |g .This construction is sketched in Fig. 11.
Before proceeding, let us summarize what we have obtained so far.By re-expressing the KS LGT in the language of TNs we have been able to provide a TN prescription for the projector onto the gauge invariant Hilbert space H p .This TN has bond dimension D equal to the number of elements in the group, D = |G|.This means that for discrete groups this TN can be used in actual computations since it has finite bond dimension.Furthermore, the construction can be improved, as discussed in section VI A, where we explain an alternative choice of C and G that allows to express P with a TN with bond dimension D = r n r where n r is the dimension of the irrep r.This is of the order of the square root of |G| since |G| = r n 2 r .In any case, when we study LGT with continuous groups, the bond dimension of the TN is infinite and thus is not useful for numerical simulations.It provides, nevertheless, an interesting analytical results since it encodes, in a TN, the exact projector onto the gauge invariant Hilbert space.
We now generalize the KS LGT to models that are described by finite dimensional local Hilbert spaces while invariant under continuous groups.This will allow to generalize our TN construction and obtain a TN expression for P with finite bond dimension that can be used in actual numerical calculations.

VI. TRUNCATED LGT
The constructive approach that we have followed so far allows to generalize the original KS LGT.Here we are departing from the Hamiltonian LGT whose Lagrangian formulation provides the standard Yang-Mills action in the continuum limit.However, we would still like to construct models that are related to the original KS LGT through a truncation of the local Hilbert space that commutes with local gauge transformations.In this way, what we have discussed so far applies as a whole to the truncated models [46].
Within our formalism the truncation of the Hilbert space we are looking for is very natural.We use W G of Eq. ( 7) to pass from C(G) to ⊕ r W r and to truncate the direct sum to an arbitrary finite set of irrep's.The minimal choice requires keeping at least two irrep's.r⊕r (the reason why we need at least two irrep's will become clearer in the following), so that the projector can be written as where the W r are defined in Eq. ( 4).
After the projection, if the group G is compact, the Hilbert space on a link becomes finite dimensional.It still preserves the property of the group algebra that we have used extensively; namely in each block it is the tensor product of V r ⊗ V r .This immediately allows to write left and right rotations L and R as as represented graphically in panel b) of Fig. 12.
As already mentioned, there is a lot of freedom on the choice of r and r .A legitimate choice is the one that minimizes the dimension of the local Hilbert space, since this dimension takes part in the computational cost of TN algorithms.In this case one should choose r as the trivial representation and r as the smallest faithful irrep of the group.For example, for SU (N ) groups, the dimension of the local Hilbert space with such choice is N 2 + 1, where N is indeed the dimension of the fundamental representation.
The building blocks of gauge transformations A s (h) are still defined by Eq. ( 13) with L and R given by Eq. ( 29) and (30) as represented graphically in Fig. 13.
They allow to define the gauge invariant Hilbert space H p by using Eq.(15).
Gauge invariant operators have to commute with all the A s (g) defined above.Both single-link operators (electric-like) and plaquette operators (magnetic-like) are LGT is obtained by truncating C(G) with the isometry WT defined in Eq. (28).It is isomorphic to (Vr ⊗ Vr) ⊕ (V r ⊗ Vr ).Each term of the direct sum is a tensor product of two constituents so that we represent it by two solid circles on each link.b) The operators implementing the left and right rotations defined in Eq. ( 29) and ( 30) are obtained from those of Fig. 6 after conjugation with WT .
Figure 13.The operator As(h) that generates the gauge transformations in the truncated KS LGT.It is the result of the truncation of the operator As(h) of Fig. 7 with WT defined in Eq. ( 28).On each link, the operator acts on the constituent closer to s through a rotation, Γr(h) or Γ r (h), which is controlled by the irrep of the neighboring constituent on the same link.It thus performs controlled operations in between the two constituents of a link, as suggested by a dot on the controller leg and by an arrow that joins it with the controlled leg.
just the truncation with W T of the corresponding operators in the KS LGT.The single-link operator is the truncation of Eq. ( 18), and depends only on the two free parameters c r and c r .
Here is where it becomes clear that we need to keep in W T at least two irrep's.The truncation of Eq. ( 18) to a single irrep is indeed proportional to the identity.
The truncated plaquette operator is built from U sn in Eq. ( 19), and is represented graphically in Fig. 14.
Depending on the choice of r and r inside W T , U T sn could vanish.In order to see this we have to remind that in the KS LGT V rm , is chosen as the smallest faithful irrep (for SU (N ) this is the fundamental irrep of dimension N ).From the above definition of U T in Eq. (32), and the definition of U sn in Eq. ( 19), we see that U T entails terms of the kind g Γ r (g)Γ r (g −1 )Γ rm (g).These terms are proportional to the projector onto the trivial representation defined in Eq. (9), where now the R in Eq. ( 9) is given by R = V r ⊗ V r ⊗ V rm .This implies that the above terms will be non-vanishing only if the decomposition of R in direct sum of irrep's contains the trivial representation.
This consideration implies that in order to have a nontrivial model, a certain care should be taken when choosing r, r and that their choice depends on the choice of r m .In particular, the minimal prescription provides a valid truncation scheme with non-trivial dynamics since in that case r m = r and r is by itself the trivial representation.
Once the U T is non trivial, it automatically fulfills the desired commutation relations with the L and R operators defined in Eq. ( 20) and ( 21), as illustrated once more in the panel b) of Fig. 14.In this way it can be used to construct the desired plaquette operators, using the same formula of Eq. (22) where the U are substituted with the U T just defined.
The Hamiltonian of the truncated LGT has thus the same form as the one of the KS LGT defined in Eq. ( 23), with the appropriate substitution of E 2 by E 2 T and U inside the plaquettes by the corresponding U T operators.

A. P in the truncated LGT
In the truncated LGT we can also consider the projector on to the Hilbert space of gauge invariant states, Figure 14.a) The UT sn operator in the truncated KS LGT as defined in Eq. 32.b) It has by construction the desired covariance properties, meaning that rotations on the physical legs (upper part of the panel) are transmitted to rotations on the auxiliary legs (lower part of the panel), as described by Eq. ( 20) and (21).
with H p defined as in Eq. ( 15) with the A s (g) of ( 13) containing the operators L and R of Eq. ( 29) and (30).
Even in this case this projector can be written as an exact TN.
The construction is very similar to the one used for the KS LGT in Sect.V. There, however, the specific form of G has been derived by exploiting that, in C(G), we are able to disentangle the symmetry requirements.In general we are unable to do this explicitly, so that here we introduce a generic approach (which can also be used for the full KS LGT and provides, indeed a TN with lower bond dimension).The TN structure of P T is the same as the one of P in the KS.It consists of the contraction of various copies of C tensors (one per link) and G tensors (one per site) following the pattern in Fig. 10.
In particular, the four-leg tensor C copies the physical states to the auxiliary states, while the gauge fixing tensor G selects among the auxiliary states only those that fulfill the gauge invariance condition, A s (g) |ϕ = |ϕ .
Chosen a basis |i r , j r , |k r l r , with , the C tensor copies the left constituent to the left and the right constituent to the right: G acts then non trivially only on On this space, the requirement of gauge invariance is equivalent to asking that G is a symmetric tensor with respect to rotations of elements in the group G, that is it fulfills the requirements in Eq. ( 8) as explicitly shown in panel a) of Fig. 15.
Furthermore, since we are interested in building the projector P T , we need to build G out of the equal superposition of all symmetric tensors acting on the above space.
As explained in Sec.III A, there are two possible ways of building a symmetric tensor.The first one consists of applying the projector onto the trivial irrep defined in (9) to the space V G .The projector acts separately in each block of irrep's and involves terms of the type It is important to notice that not all of the blocks contain a trivial irrep, and the projector will then give zero when acting on those blocks without it.After the action of the projector, we take the equal superposition of all symmetric tensors with equal weight.It is important at this point to find the rank of the previous projector, and take an equal superposition of all possible normalized states on its support.This is obtained by using the tensor , where d 0 is the number of copies of the trivial irrep (the rank of the projector) as is represented in panel b) of Fig. 15.
Alternatively, one can use the technology developed in Ref. [58] for constructing invariant tensors.The idea is to decompose the tensor G into a Q part (the part that is fully dictated by the symmetry constraints) and a P part, the part that contains the variational parameters.The Q part, in our case, is built out from the Clebsch-Gordan coefficients that decompose the tensor product of the two irrep's r 1 , r 2 into the direct sum of irrep's r 5 .Then every r 5 is again decomposed into the tensor product of two irrep's r 3 , r 4 .In general, this implies that the tensor P has an extra index corresponding to r 5 .The projector is obtained by taking the equal superposition of all the Q tensors with different r 5 , that is P = |+ .This is represented in panel c) of Fig. 15.
For concreteness we discuss how to construct G for the KS LGT with G = SU (2) truncated to the sum of the trivial irrep, plus the product of two J = 1/2 irrep's.C copies the trivial irrep on both sides, while it copies one of the two J = 1/2 to the left and the other to the right.G is then used to project onto the invariant states.Each auxiliary site then lives on V J=0 ⊕ V J=1/2 that has dimension d = 3.The possible blocks of the four fold tensor product ⊗4 that contain the trivial irrep are those with an even number of J = 1/2 factors.This implies that there is one block V ⊗4 J=0 six blocks with V ⊗2 J=0 ⊗ V ⊗2 J=1/2 and one block V ⊗4 J=1/2 .This last block furthermore leads to two values of r 5 , r 5 = 0 and r 5 = 1 that need to be equally taken into account.The equal superposition of all these blocks gives the G necessary to build the projector P T .The explicit form of G is given in the appendix A. The tensor G that is used to build the projector onto the physical Hilbert space is an invariant tensor under the action of G as defined in Eq. ( 8).The legs of G carry an index of the irrep, since the Hilbert space on which they act has a direct sum structure labeled by the irrep r. b) G can be obtained by using the explicit form of the projector onto the trivial irrep (9).The red circle is the copy tensor in the group algebra.After acting with the projector, we have to take an equal superposition of all vectors in the trivial-irrep space, so to obtain PT .This implies finding the image of the projector, taking an equal superposition of vectors spanning such image, state that we represent by the cyan |+ , and contracting on it all open legs.c) Alternatively one can use the construction introduced in Ref. [58] for building symmetric tensors.The tensor is then divided into a piece Q that takes care of correctly matching the various irrep's (made by the Clebsch-Gordan coefficients), and a degeneracy tensor P , made of free parameters, that assigns a four-leg tensor to each of the irrep's which enter in composition of representations.In the example we draw, P depends on the irrep's r5 that are contained into the tensor product of r1 and r2.Once more, the projector PT is obtained by taking a uniform superposition of the possible values of r5, that is setting P = |+ .
We conclude this section by discussing the bond dimension of the TN P T .It clearly depends on the choice of irrep's that one decides to consider in W T of Eq. ( 28).In the minimal case for a SU (N ) LGT, it is D = N + 1.

VII. GAUGE MAGNETS AND QUANTUM
LINK MODELS.
The truncated LGT we have just presented is not the only LGT with continuous groups, defined on a finite dimensional Hilbert space.In particular a set of models have been proposed in the literature that have the same features and are known as gauge magnets (GM) [47,48].
Here we briefly recall their construction using the tools that we have described in the previous sections.
In gauge magnets the local Hilbert space is the direct sum V r ⊕ V r .By rewriting the direct sum into a tensor product of C 2 ⊗ V r we obtain a natural basis spanned by { | 0 , | 1 } ⊗ { | v } in terms of a position qubit times a spin vector in V r (more details are given in Sect.VII A).In this case the constituents live in a space of dimension d GM = 2n r , where n r the dimension of the irrep r.This is, in general, smaller than d tKS = n 2 r + 1 the Hilbert space of the KS LGT truncated to the same irrep r.For this reason GM, in their simplest version, can be considered the "minimal LGTs", that is the LGT with the smallest local Hilbert space.
However, the two terms in the direct sum still allow to define left and right rotations of the state of a link for an arbitrary element of the group that, as we have seen, is the prerequisite for being able to define gauge transformations.The left and right rotation for elements h, k in G are defined through The above equation is represented graphically in panels c)-d) of Fig. 16 and can be rewritten in the tensor product basis as In this notation it is clear that |0 represents the left end of the link while |1 represents the right end of the link.The above equation allows to identify the gauge boson with a boson that can occupy one of the two extremes of the link (for a physical implementation of this ideas with cold-atoms please see [88,89]).
The definition of local gauge transformations at a site slightly differs from the one in KS LGT of Eq. (13), since it rotates all the links by the element h, independently if they are entering or leaving the site s.In terms of left and right constituents A s (h) only acts non trivially on those constituents of the links that are located close to s as illustrated in Fig. 17.
Once the building blocks of gauge transformations are defined, the discussion parallels the one for the others LGT, and in particular we can use the A s 's in order to define the physical Hilbert space of gauge invariant states H p .Furthermore we use the new A s (h) in order to define gauge invariant operators as from Eq. ( 17).As a result all gauge invariant link operators are defined as E 2 Gs n = (c 0 I l ⊕ c 1 I r ) sn with c 0 and c 1 arbitrary numbers.The equivalent of the U sn operator is used to build gauge invariant plaquette operators.In the literature it is possible to find the specific form for the U sn operators for SU (N ), SP (N ) and G 2 groups [50,90,91].Here we provide a recipe to generalize it to an arbitrary group G, either discrete or continuous.We use a similar construction than the one used for the KS LGT and define an operator that acts on ( we immediately see that and that under a right rotation Once more, U G sn allows to transmit the rotations on the link to rotations onto the auxiliary space.This allows to use it as the building block for a plaquette operator analogous to the one of the KS LGT in Eq. (22).
The Hamiltonian of a gauge magnet has thus the same structure as the Hamiltonian for the KS LGT defined in Eq. (23), where this time E 2 is substituted by E 2 G and plaquette operators are built from the U G sn operators just described.
As a final comment, it is important to notice that in general for non-Abelian groups the gauge magnets and the truncated LGT are different models.Indeed, there is no consistent truncation at the level of a single link that allows to map the KS LGT onto the GM.This would require to decompose C(g) into a direct sum of irrep's and keep only two of them.Unfortunately such decomposition cannot be performed in an invariant way.This is a consequence of the fact that C(G) can be decomposed in an invariant way only as a direct sum of tensor products of irrep's (as we have done through W G of ( 7 LGT defined in Eq. (37).It can be defined, once more, as the contraction of three Γr(g)'s, and a copy tensor in C(G) (red circle).b)-c) From the definition, one can check that it allows to pass the L and R rotations on the physical legs, induced by the gauge transformation of Fig. 17, to analogous rotations onto the auxiliary legs.This is exactly the covariance property that allows to define a gauge invariant plaquette operator, defined as in Eq. (22), where the rotation on the auxiliary legs cancel by taking the trace onto the auxiliary legs.
the terms V r ⊗ V r into a direct sum of irrep's requires a choice of basis in one of the two factors, and thus cannot be invariant under rotations by elements of G [69].
There is an exception to this rule in the case of Abelian LGT where n r = 1, and consequently d GM = d tKS .In Ref. [80] we have shown how to construct Abelian GM as a specific truncation of the Abelian KS LGT.
Gauge magnets have been independently re-formulated in Ref. [49] as quantum link models.The same authors generalized them to arbitrary groups and representations [50,90,91] introducing the concept of rishons.Both the truncated LGT and the gauge magnets, can be understood as specific quantum link models constructions, where the GM corresponds to a quantum link model with a single rishon per link while the truncated LGT corresponds to a quantum link model with two rishons per link [92].It is however interesting to point out that some of the link models can be obtained as a consistent trun-cation of the KS LGT and others not.

A. PGM for gauge magnets
We now discuss how to obtain the projector P GM onto the physical Hilbert space H P for gauge magnets as a TN.The construction is similar to the one used for the other LGT.In particular P GM is obtained by contracting as many copies of tensors C as there are links on the lattice and as many copies of tensors G as there are sites, following the patterns of Fig. 10.
The tensor C is a four-leg tensor that copies the state of physical Hilbert space half into the left auxiliary space and half into the right auxiliary space.Notice that both auxiliary spaces need to be extended so that V r is embedded in a larger vector space that has at least one extra orthogonal direction that we call |φ .Concretely chosen a basis |l |v with |l = {|0 , |1 } and |v ∈ V r , C has elements where |v ∈ V r (remember that φ|v = 0 for all |v ∈ V r ).This means that the bond dimension of the C tensor is n r + 1 with n r the dimension of V r .We can now define the operator G that acts on such Hilbert space.Once more G needs to be an invariant tensor, that is it needs to fulfill Eq. ( 8).Interestingly the auxiliary Hilbert space is isomorphic to auxiliary Hilbert space of the truncated LGT TN.Nevertheless since A s (h) is defined differently in the two models, G is different.The symmetry requirements induced by the gauge transformation on A s h are shown in panel a) of Fig. 19.
The explicit form of G can be obtained once more using different techniques, either by using the projector onto the trivial irrep of Eq. ( 9) as done in the panel b) of Fig. 19, or by using the standard recipes for constructing symmetric tensors of Ref. [58], as shown in panel c) of Fig. 19.In the latter case, one first fuses the irrep's r 1 and r 2 to r 5 , then r 3 and r 4 to r 6 and then fuse r 5 and r 6 to the trivial irrep.In this way the Q part of the tensor is well defined, while the P part depends explicitly on all r 6 and r 5 compatible with the incoming irrep.Furthermore it should be chosen such to provide a uniform superposition of all symmetric tensors.
In the appendix A we provide the explicit tensors for both a U (1) and SU (2) gauge magnets.

VIII. TENSOR NETWORK VARIATIONAL ANSATZ FOR GAUGE INVARIANT STATES
So far we have discussed how to construct the projector onto the gauge invariant Hilbert space H P defined in Eq. ( 15) as a TN.This means that any state of the gauge invariant Hilbert space can be constructed by acting with P on a generic state |φ ∈ H .The challenging problem LGT, the tensor G is an invariant G-tensor, i.e., it is left invariant under multiplying all its legs by Γr(g).b) G is obtained, for a finite group, by summing all the representation matrices through the projector on the trivial representation.After projecting, the uniform superposition of all the states of the trivial representation is obtained by closing the free legs with the product of |+ .c) For continuous gauge groups, the projector can either be written as an integral over the group elements with the appropriate invariant measure, or it can be obtained by using the Clebsch-Gordan coefficients, which transform the product of the four representations into a direct sum of irrep's, and, then, by projecting onto to the trivial irrep.
is still how to express |φ , since in general it is a state of an exponentially large Hilbert space.One possibility would be to express |φ itself as a TN, and then project it with P.However, even in the best scenario, in which the two states share the same structure as a TN, this rapidly becomes computationally intractable since the bond dimension of the combined TN would be the sum of the bond dimensions for |φ and |P .
The alternative is to construct all states in H P directly from a symmetric variational TN ansatz.This has the big advantage of being a sparse TN so that computations are much cheaper than in full TNs having the same bond dimension.
The idea is represented schematically in Fig. 1, where we show that H P is embedded in H by drawing it as a membrane inside a 3D box.States described by the variational ansatz belong to H P and are represented as orange ovals on it.Their size increases by increasing the bond dimension of the elementary tensors, as represented by the label D ↑.
The simplest gauge invariant states are the ground states of the Hamiltonian (23) in the strong coupling limit, which typically are product states.As we increase slightly the complexity of the ground-state wave function we find another simple class of gauge invariant states.They consist of uniform superpositions of all gauge invariant states and are obtained by acting with P onto a product state |ϕ = |+ ⊗L , where Z is a normalization constant such that φ|φ = 1 and . These states are an example of generalized Rokshar-Kivelson (RK) states for arbitrary gauge groups [55,93], and are described by TNs with the same bond dimension as P.
Slight generalizations allow to describe a larger family or RK states by still a TN with the same bond-dimension.This can be done for example by projecting different sates than |+ with P with the net-effect of moving away from the equal superposition of all gauge invariant states by changing the matrix elements inside C. Alternatively, one could change the weights in the linear superposition of gauge invariant states by changing the tensors G (We will discuss the operators that allow to deform RK state by acting onto the physical Hilbert space in Sec.IX).At this point we have exhausted all possible of gauge invariant states that can be obtained without extending the TN.
For this reason, in order to describe all other states in H P we have to introduce a more complex variational ansatz.This is done through a TN ansatz that consists in a superposition of spin networks [59].It is again formed by two types of tensors, C and G, and as before, every bond of the TN is decorated by an irrep index.There is one C tensor for each link s n of the lattice, and one G tensor for each site of the lattice .The elementary tensors are contracted following the usual pattern of Fig. 10.The structure imposed by gauge invariance is exactly the same as the one discussed for the projector P; we will refer to it as the "symmetry part" of the TN.Now, however, we add to each tensor a "degeneracy part".We promote every element of the elementary tensors in P to a full tensor acting on the appropriate degeneracy space.This implies that to every irrep r, we attach a degeneracy space, unconstrained by the symmetry, with dimension D r (that can be chosen independently for every irrep r) that contains the variational parameters of the tensor.The various blocks r are patched correctly thanks to the symmetry part of the TN.
We illustrate the construction for the KS LGT, but this is applicable to all the other cases we have discussed so far.On each link, the Hilbert space is isomorphic to r V r ⊗ V r .The tensor C is a three-leg tensor composed by a symmetry part and a degeneracy part.This is illustrated in panel a) of Fig. 20, where the symmetry part is just made of lines representing identity matrices, while the degeneracy part is made by a tensor of free parameters.Its symmetry part is indeed the same as the C tensor of an RK state discussed above.Inside each block defined by the irrep r, it copies the states in V r to the left and those in V r to the right.Its degeneracy part is novel with respect to the previous examples of RK states.It is made of matrices of size D r × D r .These matrices (one per block) are shown in cyan in panel a) of Fig. 20 and contain the variational parameters.Turning to the tensor G in panel b) of Fig. 20, it is also made of two pieces, a symmetry part and a degeneracy part.The symmetry part (once more the lower piece in the graphical representation of the tensor in panel b) of Fig. 20) does not contain any free variational parameter but simply takes cares of correctly matching the irrep's in such a way that the obtained tensor is symmetric, that is it fulfills Eq. ( 8).In the graphical representation, this is done by the Clebsch-Gordan tensors represented by the small black circles.To every irrep label, one associates now a degeneracy tensor (shown in orange) in panel b) of Fig. 20, which is populated by the variational parameters.Importantly, the degeneracy tensor is obtained as a sum over the irrep's corresponding to the internal lines of the symmetric part (r 5 in the figure).The variational state is thus expressed by the contraction of the various C and G given by panel c) of Fig. 20, where it is represented for the specific case of a lattice made by 4 × 4 sites and periodic boundary conditions are assumed in both directions.
As a second example, we can consider the U (1) GM, whose P is defined in appendix A. We start with the C tensor for a generic gauge invariant state.In this case the physical Hilbert space of a link is two dimensional and involves only two blocks labeled by the irreducible representations 0, 1.On the other hand the auxiliary Hilbert space has two blocks with arbitrary dimension D 0 and D 1 so that the auxiliary space is The non-zero elements of C are C α0,β0,0 , a full matrix that acts on the sub-block H 0 ⊗ H 0 of the Hilbert space Similarly C α1β1,1 is an independent matrix that acts on a different block of The same idea applies to G that now can be thought as a collection of six tensors each of them acting on one of the only six blocks of the four fold tensor product Figure 20.a) C tensor used to build a variational ansatz for a gauge invariant state.The tensor acts on a link sn and embeds its state onto the auxiliary space.It is composed by two parts, a "symmetry part" that does not contain any variational parameter (the two lower lines), and a degeneracy part that contains the variational parameters (the cyan tensors).
The tensor has several blocks labeled by the irrep r. b) The G tensor only acts on the auxiliary space, and it has again a block structure.It is divided in two pieces.The first is responsible of the correct symmetry properties of G (see panel a) of Fig. 15).This part does not contain any free parameters and is given in terms of the Clebsch-Gordan coefficients of the group (small black dots).The second part is a degeneracy part that is formed by a sum of several tensors (one for each allowed value of r5) acting on Dr 1 ⊗ Dr 2 ⊗ Dr 3 ⊗ Dr 4 .These tensors store the variational parameters of the G tensor in the appropriate symmetry blocks.c) Variational ansatz for gauge invariant states on a lattice of 4 × 4 sites and periodic boundary conditions.The network contains one C per link of the lattice, and one G per site.The double lines connecting the tensors are used to remind that each of the elementary tensors has a double structure, one part dictated by the symmetry and the other one containing the actual variational parameters.In the figure we are assuming the sum over all the irrep's r on every bond of the TN, so that the specific irrep label is omitted.

⊗4
i=1 (H 0 ⊕ H 1 ) i (this has 16 blocks) allowed by the symmetry constraints.Just to give an example, one of the allowed blocks is H 0 ⊗ H 0 ⊗ H 1 ⊗ H 1 , where G has entries G α0,β0,γ1,δ1 .
Before continuing we summarize the results of this section.We have proposed a variational ansatz for states of the physical Hilbert space H P .The ansatz involves the contraction of several copies of two families of tensors, C tensors (one per link) and G tensors (one per site).Each of those tensors has two components, one completely determined by the requirements of gauge symmetry and a second one that contains the free variational parameters.The resulting TN has bond dimension where n r is the dimension of the irrep r, D r is the dimension of the degeneracy space associated to the irrep r (which is a free parameter), and the sum over r extends to all the irrep's one needs to consider.
There are several advantages in dealing with such symmetric ansatz.On one side, the ansatz can be manipulated with a cost smaller than the cost involved in manipulating a non-symmetric ansatz with the same D, since one can work in each block separately [58].Also, the ansatz can be used to obtain approximations of interesting gauge invariant states (such as eigenstates of gauge invariant Hamiltonians), while exactly preserving the gauge symmetry.Furthermore, the ansatz allows to target not only the invariant states, but also co-variant states belonging to separate symmetry sectors.A typical application of this scenario is the characterization of the effects of background charges on the physics of the gauge bosons.

IX. GAUGE INVARIANT VERTEX OPERATORS
We have just discussed how one can change, given the projector P on H P as a TN, the parameters defining C and G and thus one can define a family of RK states.
Here we want to address the question about what are the operators that allow to modify the RK wave function by acting on the physical Hilbert space.Those operators, in principle can be added to the standard LGT Hamiltonian of Eq. ( 23) so to extend it and allow to explore extended phase diagrams.The operators that allow to change the entries of C are just the E 2 operators already discussed.On the other hand, the operators that allow to modify the entries of G act on crosses, and thus are are co-diagonal with G.
In particular, G consists in an isometric tensor followed by a uniform projection onto the state ⊗ |+ , that is G ≡ G ⊗ |+ as explicit in Fig. 11.We can now use G † to get to the correct basis of the gauge invariant configurations and weight each of them differently through a Figure 21.Left) The isometry G can be used to go to the gauge invariant states.Now a diagonal operator in this space commutes with the gauge transformations, and is thus gauge invariant.Right) The vertex operator described in Eq. ( 45) is built by concatenating the tensor G, a diagonal tensor Σ (a red circle) (acting on C(G) 3 ), and then G † .It acts as a potential for different gauge invariant configurations and allows to favor one with respect to another.
diagonal tensor Σ, In the KS construction of G given in Sect.V, Σ has |G| 3 elements that can be chosen arbitrarily.Both the isometry G and the vertex operator V are represented graphically in Fig. 21.
In particular we will use these operators, in oder to characterize the transition from the eight-vertex to the six-vertex model in the next section.

X. BENCHMARK NUMERICAL RESULTS
In this section we benchmark our proposal against known analytic results.We start by describing the RK wave function of the Z 2 LGT.This is the exact ground state of the Hamiltonian (23) for α = 0.In this case the U operator is just the standard σ z Pauli matrix, while E 2 is the σ x Pauli matrix.The Hamiltonian reads where p are the plaquettes and l the links of lattice Λ.In the limit α → ∞ the ground state becomes the RK state compatible with the symmetry constraints where as usual s 1 , . . ., s 4 are the links around a site s.
As written explicitly in the appendix A 1, the P on H P for the U (1) gauge magnet has a very similar tensor structure.In that case however, the tensor G misses the last two entries since G 0,0,1,1 = G 1,1,0,0 = 0.The U (1) RK state is the ground state of the following Hamiltonian with a = |0 1|, that is it is the ground state of the gauge magnet Hamiltonian at its RK point [94][95][96].
By applying the vertex operators defined in Eq. ( 45) to the Z 2 RK state, we can switch off the two extra elements in G, thus effectively interpolating between the Z 2 RK state and the U (1) RK state.In particular, in order to study the transition between the two models we parameterize the elements G 0,0,1,1 = G 1,1,0,0 = cos(θ), with 0 ≤ θ ≤ π 2 .At θ = 0 we have the Z 2 RK state while at θ = π 2 we have the U (1) RK state.We characterize the corresponding RK wave functions for 2D infinite cylinders with circumference L as sketched in the panel a) of Fig. 22.
For each value of θ the norm of the state obtained from the above tensors gives the partition function of the eight-vertex model, whose phase diagram was uncovered by Baxter [97].In particular in the language of the eightvertex model we follow the line at a = b = c = 1 and vary d in the range 0 ≤ d ≤ 1.Such line has also been studied in Fig. 5 of Ref. [60].
The interest in this specific line stands in the fact that along it, the model approaches a transition between two topological phases.At d = 1 the eight-vertex is in a Z 2 deconfined phase.This is the paradigm of a Z 2 gapped spin liquid.At d = 0, there is the transition between the eight-and six-vertex model so that the system enters in an algebraic spin-liquid phase.Here we analyze how to characterize the two phases and the transition between them by using our numerical ansatz.

A. Decay of correlations
The correlations across the cylinder are mediated by the transverse transfer matrix (TM), made by the contraction of all Cs and Gs along a transverse slice of the cylinder as sketched in panel b) of Fig. 22.In particular at the Z 2 LGT point θ = 0 the TM has only two degenerate non-vanishing eigenvalues t 1 and t 2 .The first gap ∆ 1 = − log(t 2 /t 1 ) = 0, while all others are infinite.The model thus has zero correlation length.As we start departing from θ = 0, the two degenerate eigenvalues start to split so that ∆ 1 starts to diverge as ∆ 1 ∝ exp(L).A family of new eigenvalues starts to appear and the model acquire a non-zero correlation length.The decay of correlation functions is thus exponential in all this region.The new eigenvalues tend to approach t 1 .The bigger of them t 3 is separated from t 1 by a gap ∆ 2 = − log(t 3 /t 1 ).This is the gap that closes to zero when approaching d = 0 (that is at θ = π/2) as ∆ 2 ∝ 1/L.The model thus develops algebraic correlations at θ = π/2.Our benchmark numerical results agree with this exact picture.All the eigenvalues are computed by exact sparse diagonalization of the TM with a cost that increases exponentially with L. These results give a first check that our numerical technique works and we can now apply it to characterize the phase transition in terms of two of the proposed order parameters based on the scaling of the entanglement entropy: the topological entropy and the Schmidt gap.Both quantities could be relevant in understanding the phase diagram of gauge theories.Gauge theories indeed present phases that cannot be distinguished by using a local order parameter.A legitimate question is whether the scaling of entanglement allows to discern those eluding phases.

B. Order parameters based on entanglement
We compute the entanglement entropy of the reduced density matrix of half of the infinite cylinder ρ 1/2 , Thus, what we are studying is a transition from a gapped phase with exponential decay of correlations to a gapless phase governed by algebraic decay of correlation.Lower panel) On the other hand, the first gap of the TM ∆1, representing the gap between the two different topological sectors appearing on the cylinder, opens exponentially with L as θ tends to π/2.This is again confirmed by the collapse of our numerical data for log(∆1)/L, with L in the range L = 10, . . ., 16. sketched in panel b) of Fig. 22.The spectrum { λ n }, n = 1 • • • D L of ρ 1/2 is computed using sparse exact diagonalization of the eigenvectors of the TM as explained in detail in Ref. [98].The cost of the computation increases exponentially with L. We are interested in characterizing the scaling of the entanglement entropy as a function of L since we want to extract the topological entropy γ T .
In a gapped spin liquid the entanglement entropy S A of a region A with boundaries of length L scales as where the dots stand for the omission of higher order corrections starting with (1/L) 2 .The constant γ T , in the topological phases, is negative and universal, and encodes the topological entropy [61,62].In the specific case of a Z 2 spin liquid it is known to be Equation ( 49) holds also for the gapless spin-liquid phase described by the six-vertex model.In a series of seminal works Stéphan and collaborators [99,100] have shown that it is indeed possible to get an exact expression for γ T for the whole phase diagram of the six-vertex model.
In particular they have expressed it in the language of the XXZ spin chain defined on a space-like section of the cylinder.The eigenvectors of the Hamiltonian of the XXZ model ( 51) are indeed equal to those of the transfer matrix of the six-vertex model [97].The entanglement entropy of half of the infinite cylinder corresponds, in the XXZ model, to the Shannon entropy of the groundstate wave function of a chain with periodic boundary conditions and length L. The XXZ Hamiltonian is given by In the range −1 < ∆ ≤ 1 the Hamiltonian is critical and the low-energy physics is described by a CFT with c = 1 describing a free boson compactified on a circle with radius R = 2 − 2 π arccos(∆).In the whole phase the topological entropy is given by [99], The specific point we are studying, called the ice-point of the six-vertex model corresponds to ∆ = −1/2.
The numerical results we have obtained are presented in Fig. 24.We have only access to modest sizes in the transverse direction L = 4, . . ., 20. γ T is easy to extract close to θ = 0 and θ = π/2 where we are able to recover, from our numerics, its exact analytical value.As a cross-check we have further reduced the size of the system and considered only the smaller cylinders from L = 4, . . ., 10; L = 10, . . ., 16; L = 12, . . ., 18; L = 14, • • • , 20.The results, obtained with those sets of data (represented by different symbols in Fig. 24), still provide estimates of γ T in agreement with the theory close to θ = 0, where finite size corrections are completely negligible, and close to θ = π/2 where they are reasonably small (see the rightmost inset of Fig. 24).
The situation is very different for intermediate values of θ.Especially in the region between 0.7 ≤ θ ≤ 1.5, we observe strong cross-over effects.The value of γ T extracted from different series of L do not agree as shown by the fact that curves made by different symbols are distinct.This effect could be related to the sub-leading corrections that become more important when we approach the transition.We also observe that for larger systems, the cross-over region shrinks and move towards the phase transition at θ = π/2.It looks like that, if we were able to reach the thermodynamic limit, γ T would present a very sharp jump between the two asymptotic values.
These results give further evidence that, provided one is able to address large enough systems, γ T can be used as an order parameter, away from a relatively small crossover region (which further-more shrinks with increasing system size).In our specific case indeed it allows to discern the gapped Z 2 spin-liquid phase from the algebraic U (1) spin-liquid phase at θ = π/2.
We now analyze another possible order parameter based on the scaling of the entanglement.Li and Haldane in Ref. [63] suggested that phases could be easier  50), while the cyan dashed line represents its value for the U (1) spin liquid from Eq. ( 52) with R associated to ∆ = −1/2.We see that, for small θ, γT coincides, independently of the size of the cylinder considered, with the expected exact value Z2 (left inset).As we move towards the transition γT shows a transient oscillation that tends to become sharper, deeper and move towards π/2 for larger L. At π/2 it attains again the expected analytical value with very small corrections induced by considering the two different set of data (right inset).In the main text we provide a discussion of these results.
to identify by considering the scaling of the full entanglement spectrum rather than focusing on a single number as the topological entropy.The entanglement spectrum is the collection of the logarithm of the eigenvalues of the reduced density matrix log(λ n ).
In particular, numerical studies of 1D systems have provided a precise characterization of the scaling of the lowest part of the entanglement spectrum, the one associated to the largest eigenvalues of the reduced density matrix [101,102].In many cases, the lowest gap of the entanglement spectrum, called the Schmidt gap, vanishes when approaching a quantum phase transition following universal scaling laws.The authors thus have proposed to use the Schmidt gap as an order parameter.This idea is further supported by the recent results that show that for conformal invariant critical points, several gaps in the entanglement spectrum close in a way that allows to identify the critical exponents of the underlying CFT [102].It is still unclear how general these results are.
For this reason we have decided to analyze the behavior of the lowest part of the entanglement spectrum of ρ 1/2 of half cylinders, when approaching the transition at θ = π/2.In particular we address the cross-over re- gion between 1 ≤ θ ≤ π/2, where the analysis of the topological entropy is unreliable.
The results are presented in Fig. 25.The main panel shows the first 100 values of the entanglement spectrum log(λ n ) as a function of θ in the cross-over region.Surprisingly nothing strange seems to happen.The spectrum presents the plateaux structure characteristic of the RK wave functions.The structure of the first plateaux seems quite stable, and the only effect of increasing θ towards π/2 is to shift the relative height of the plateaux so to accommodate the appearance of new ones in the tails.In particular the first two eigenvalues are degenerate for all the interval considered.The Schmidt gap is indeed constantly zero and does not detect the transition.Even from the plot of the second Schmidt gap, which increases monotonically with θ → π/2, we are unable to appreciate that we are approaching a phase transition as shown in the inset of Fig. 25 for several values of L. We thus conclude that the low-energy part of the entanglement spectrum seems to fail to detect the phase transition between the the gapped Z 2 spin-liquid phase and the algebraic U (1) spin liquid occurring at θ = π/2.

XI. PREVIOUS WORK ON THE SUBJECT
Here we try to list the works that have contributed to our understanding of various topics and to the final formulation of our proposal as we have outlined.
There are several good references for group theory in a diagrammatic notation.In particular the book [67] deals with continuous groups.Continuous groups and the specific case of SU (2) have been extensively studied in the literature of TNs [56-58, 72, 103].The reader not familiar with the elementary concepts in the theory of group representations would benefit from studying the first few chapters of some of the standard text-books [69,81].A nice summary of relevant material can also be found in the appendices of [104].
A nice introduction to LGT in the Lagrangian formulation can be found in [105] and in any of the standard textbook on the subject, i.e. [82,106].The standard Hamiltonian formulation was obtained by Kogut and Susskind, and by Creutz [77,78].Truncated LGT where discussed independently by many authors [46,47,49] that have called them gauge magnet or quantum link models.Horn originally introduced a model similar to the one described here in Sect.VI, which we generalize here to arbitrary continuous and discrete groups.Later in Ref. [50], the quantum link models where generalized to several continuous gauge groups with a different strategy from the one presented here.In the same work, they where also given an interpretation in terms of rishons.In that language, the truncated LGT we have discussed in Sec.VI when dealing with continuous groups, is a specific quantum link model with two rishons per link, while the one in Sect.VII is a quantum link model with one rishon per link [107].Still the results we present here can be applied also to discrete groups, and thus provide a further generalization of quantum link models.Also they allow to easily distinguish between those quantum link models that can be obtained as a consistent truncation of the KS LGT and those that cannot.
The study of lattice gauge theories with Matrix Product States, the simplest 1D TN structure, has by now a quite long tradition, [24][25][26][108][109][110][111] 2D LGT with TNs on the other hand have been less studied.
LGT with discrete groups have been addressed with entanglement renormalization in [23], some aspects of them have been studied in [85] with categorical TNs, a construction that has strong connections to the present proposal.There however the emphasis is on Abelian discrete groups and the LGT are addressed at the exactly solvable point obtained at g = 0 while here we discuss a construction that allows to tackle generic groups both Abelian and non-Abelian, discrete and continuous at any point in the phase diagram.
There have been several proposal on how to obtain the gauge invariant Hilbert space.The original proposal by KS was to act on a reference state with all possible gauge invariant operators.However, there the states generated are not necessarily orthogonal and thus special care need to be taken.T. Osborne has pointed out Refs. [115,116] to us that is related (implicitly) to our work, and we also found the discussion in Ref. [117] very illuminating.T. Osborne himself is working along similar ideas [87] and in particular he has independently worked out operators similar to the ones we have presented in Eq. ( 19) and (25).
In the context of characterizing a family of states (such as the RK states we have discussed), T. Osborne has pointed out Refs. [118,119].In condensed matter, in particular, the recent results presented in Ref. [120,121] have been obtained by applying similar ideas to the characterization of singlet states.
At last we have also used the available literature about TN and topological order in order, whenever possible to make connections between our ideas and the one presented in that context.In particular we have found particularly useful the Ref. [83,104,122].
To our knowledge the only previous mention to vertex operators in the context of LGT is the one of Ref. [60] however there the analysis is limited to Z 2 and U (1) LGT while here we give a prescription for arbitrary groups.
It is also worth mentioning that there is an alternative connection between LGT and TN through a map of the low-energy physics of QCD in the chiral limit to the physics of specific spin chains as pursued in [123,124].
With respect to the absence of the closure of the Schmidt gap across a phase transition, a similar observation was made in Ref. [100] and while we were preparing the final version of our manuscript in Ref. [132] the authors have provided a plausible argument to understand that this is a quite general phenomenon for phase transitions between different RK states.

XII. CONCLUSIONS
In this paper we have defined a TN framework for studying LGT.It allows to use TNs as both a LGT model-building tool (and as such we have used to construct the minimal consistent-truncation scheme for the KS LGT) and as a practical tool to numerically explore LGT, their phase diagrams, and their emerging properties.
The ansatz we have proposed follows the same spirit as the one proposed in Ref. [23].The TN indeed has a symmetric part that allows to exactly encode the constraints imposed by the gauge-symmetry conditions, and a variational part, which can be optimized numerically in order to characterize interesting physical states such as the low-energy states of gauge invariant Hamiltonians.
The new framework is also very powerful from the theoretical point of view.In this paper we have been indeed able to derive through it a consistent truncation of local Hilbert space of the KS LGT with continuous group to finite dimensional Hilbert spaces.We have obtained also an explicit alternative construction of gauge mag-nets and of their U -operators for arbitrary gauge groups [Eq.(37)] that is also applicable to discrete groups, and the construction of gauge invariant vertex operators for arbitrary gauge groups [Eq.( 45)].We have also been able to show that, differently from the Abelian case, the non-Abelian gauge magnets cannot be obtained as a consistent local truncation of the KS LGT.For this reason they stand as an alternative microscopic formulation of LGT.This result does not exclude the possibility that both gauge magnets and the KS LGT can encode the same emergent physics.It excludes however that they are locally (where by locally we mean at the level of a single link) unitarily equivalent.Furthermore, the distinct form of their projectors onto H P in terms of TN (given explicitly in App.A 2 and A 3) also points to the fact that their RK states are probably different (as we will analyze in a subsequent paper).This is not particularly surprising since the relation between the lowenergy physics of quantum link models and of standard LGT was already discussed in Ref. [90] and required the use of dimensional reduction arguments (so that D + 1 dimensional quantum link models are expected in some limit to be equivalent to D dimensional standard LGT).
The tools that we have developed here can be used to analyze the entanglement content of interesting LGT states.The entanglement, studied in a basis of states belonging to the original Hilbert space, tensor product of the constituents, does not have a direct physical meaning (since the only measurable operators in a real GT are gauge invariant operators, c.f. the recent discussion in [131]).However, it still provides an estimate of the computational cost of simulating such states using a TN (c.f. the related discussion in [23]).
As a benchmark, we have considered the transition between the eight-vertex and the six-vertex model in terms of the RK wave function of the corresponding LGT.We have shown that, while the transition is correctly detected by the behavior of the entanglement entropy, it is hard to detect it by observing the behavior of the Schmidt gap and the lower part of the entanglement spectrum.
We envisage that the tools that we have developed will play an important role in the characterization of the real time dynamics in LGT, and in the quest for finding model displaying stable topological phases even at finite temperature.All the recent developments about the characterization of topological phases in terms of 2D TN such as the ones of Ref. [83,122] can be easily applied to our construction as we plan to in the near future.
Recently, gauge magnets have received a lot of attention from the AMO community, due to the possibility of implementing them in experiments based on the emerging new quantum technologies such as cold-atoms, trapped ions etc [80,88,89,96,[125][126][127][128][129][130].There is still a large room for improvement on these first proposals and the tools we have designed will help in this task.We have indeed just become aware that a new proposal for simulating SU (2) LGT along the lines of our discussion has already been independently designed [134].
Furthermore, our analysis is just the starting point in the development of a TN approach to LGT.In particular, questions relevant for high-energy LGT like, e.g., taking the continuous limit, have not been addressed here and constitute a logic next step to be done.Some of such questions are subject of an ambitious collaborative project, coordinated by Tobias Osborne, that is open to contributions and available on-line [87].

Figure 2 .
Figure 2. Graphic representation of tensors and their contractions.Tensors are generalized vertexes (geometric shapes) whose legs are represented by dangling arrows.In panel a) we represent a tensor with three legs X a bc .Upper indexes are incoming legs while lower indexes are outgoing legs.Complex conjugation is denoted by mirror reflection of the vertex.Different colors denote different tensors.Indexes are ordered clockwise starting from the solid dot on the vertex.The contraction of two tensors is denoted by an arrow joining them.The dagger operation X † involves both the complex conjugation of the elements of the tensor, and the inversion of the arrows attached to its legs.As a consequence the order of the legs also changes, X † = Xcb a[67].Panel b) An isometric tensor (or simply isometry) is always represented by a triangular vertex.A tensor W is isometric if there is a specific choice of legs, which identifies two vector spaces U and V , such that, when W is contracted with W † through the legs in U , the result is the identity tensor in V .In the figure, U is spanned by the leg a, while V is spanned by the two legs b, c.

Figure 3 Figure 4
Figure 3. a) The orthogonality relation in (3) allows to identify a set of isometries Wr projecting C(g) onto Vr ⊗ Vr.If one knows the matrices Γr(g) for all g ∈ G, Wr is defined by collecting them inside a three-index tensor.The index r identifying the irrep is written on the top of one of the two legs.b)The isometric property of the tensor Wr. c) Alternatively, if we know the Wr isometry, we can obtain the matrices in the r representation by acting with Wr on a vector proportional to |g (yellow circle in the figure).The resulting tensor has two indexes i, j, and is the matrix Γr(g) i j .

Figure 6 .
Figure6.Gauge boson constituents are defined on the links of an oriented lattice.Links are represented by dashed lines, and constituents are small solid circles along these lines (which should not be confused with tensors, whose legs are solids lines).a) In the Kogut-Susskind LGT, each constituent is described by a state |g of the group algebra C(G).b) Left and right rotations L(h −1 ) and R(k) are introduced in Eq.(11) and Eq.(12).They transform the state |g into |h −1 gk .Both operators require an initial change of basis from C(G) to ⊕r(Vr ⊗ Vr), obtained through WG of Eq. (7) and represented in Fig.4(the first horizontal triangle).One then applies to each of the legs the corresponding rotation matrix given by ⊕r Γr(h −1 ) ⊗ Γr(k) , with the individual Γr defined in panel c) of Fig.3and represented here by the two vertical triangles.At last W † G , represented by the inverted triangle, allows to go back to to C(G) .

Figure 8
Figure 8. a) The Us n operator of(19) in the KS LGT.It acts on the tensor product of the physical space C(G) of the link sn and of an auxiliary space that defines the irrep rm, C(G) ⊗ Vr m .It is built from the contraction of a copy tensor C ≡ |g g| ⊗ g| (red circle), and the corresponding rotation matrices Γr m (g) i j (defined in Eq. (6)).b) The above definition implies that the Us n transmits the rotation onto the physical index, as induced by conjugation by L and R, to the auxiliary indexes.This property allows to use Us n as building block of the gauge invariant plaquette operator in Eq.(22), where, thanks to the trace, the rotations attached to the auxiliary indexes cancel.

Figure 9 .
Figure9.The plaquette operator Bp of Eq. (22) constructed as a matrix product operator from four Up n 's, acting on the links around a plaquette in the KS LGT.As a consequence of the covariance of the Up n under conjugation by L and R (see panel b) of Fig.8).It transfers the rotation onto the physical legs to rotations onto the auxiliary legs.The operator commutes with the gauge transformations, and, thus, it be used as building block of a gauge invariant Hamiltonian (see Eq. (23)).

Figure 10 .
Figure10.The projector on the gauge invariant states.a) The corresponding TN is defined through the contraction of several copies of two elementary tensors, C, which copies the physical Hilbert space onto the auxiliary Hilbert space, and G, which selects only configurations fulfilling the gauge invariance condition.b) An example of gauge-constraint decoupling at site s − 1 and s obtained through the insertion of the copy tensor C. c) The projector on the gauge invariant states for a 4 × 4 square lattice with PBC.

Figure 11 .
Figure11.The definition of the tensors C and G for the Kogut-Susskind LGT.The tensor G is obtained by composition of several copies of unitaries CL and CR described in the main text.They are followed by the projection onto the states |+ and |+ defined in the main text.

Figure 12
Figure12.a) The Hilbert space of a gauge boson in the truncated KS LGT is obtained by truncating C(G) with the isometry WT defined in Eq. (28).It is isomorphic to (Vr ⊗ Vr) ⊕ (V r ⊗ Vr ).Each term of the direct sum is a tensor product of two constituents so that we represent it by two solid circles on each link.b) The operators implementing the left and right rotations defined in Eq. (29) and (30) are obtained from those of Fig.6after conjugation with WT .

Figure 15
Figure15.a)  The tensor G that is used to build the projector onto the physical Hilbert space is an invariant tensor under the action of G as defined in Eq. (8).The legs of G carry an index of the irrep, since the Hilbert space on which they act has a direct sum structure labeled by the irrep r. b) G can be obtained by using the explicit form of the projector onto the trivial irrep(9).The red circle is the copy tensor in the group algebra.After acting with the projector, we have to take an equal superposition of all vectors in the trivial-irrep space, so to obtain PT .This implies finding the image of the projector, taking an equal superposition of vectors spanning such image, state that we represent by the cyan |+ , and contracting on it all open legs.c) Alternatively one can use the construction introduced in Ref.[58] for building symmetric tensors.The tensor is then divided into a piece Q that takes care of correctly matching the various irrep's (made by the Clebsch-Gordan coefficients), and a degeneracy tensor P , made of free parameters, that assigns a four-leg tensor to each of the irrep's which enter in composition of representations.In the example we draw, P depends on the irrep's r5 that are contained into the tensor product of r1 and r2.Once more, the projector PT is obtained by taking a uniform superposition of the possible values of r5, that is setting P = |+ .

Figure 16
Figure16.a) Gauge boson constituents in gauge-magnets are states of the direct sum of two irrep's, Vr ⊕ Vr, which can be identified as the left and the right constituents at the ends of each link.Graphically, we represent this local Hilbert space as a single circle embracing the two copies of Vr, each of them being a smaller circle identified by a different color and position inside the bigger circle.b) The legs of the tensors acting on this Hilbert space are represented by bands rather than lines so that we can specify operators that only act on one sector as acting on half of the band.Each sub-sector is colored differently.c)-d) The left and right rotations in the gauge magnets only act on half of the direct sum as depicted here and discussed in Eq.(35).

Figure 18
Figure18.a) The U G sn operator in the gauge magnet LGT defined in Eq.(37).It can be defined, once more, as the contraction of three Γr(g)'s, and a copy tensor in C(G) (red circle).b)-c) From the definition, one can check that it allows to pass the L and R rotations on the physical legs, induced by the gauge transformation of Fig.17, to analogous rotations onto the auxiliary legs.This is exactly the covariance property that allows to define a gauge invariant plaquette operator, defined as in Eq.(22), where the rotation on the auxiliary legs cancel by taking the trace onto the auxiliary legs.

Figure 19
Figure19.a)  In gauge magnet LGT, the tensor G is an invariant G-tensor, i.e., it is left invariant under multiplying all its legs by Γr(g).b) G is obtained, for a finite group, by summing all the representation matrices through the projector on the trivial representation.After projecting, the uniform superposition of all the states of the trivial representation is obtained by closing the free legs with the product of |+ .c) For continuous gauge groups, the projector can either be written as an integral over the group elements with the appropriate invariant measure, or it can be obtained by using the Clebsch-Gordan coefficients, which transform the product of the four representations into a direct sum of irrep's, and, then, by projecting onto to the trivial irrep.

Figure 22
Figure22.a)  The setup used in our numerical calculations.Each of the elementary tensors C (cyan) and G (orange) has bond dimension D = 2 and its matrix elements are those described in the main text.The elementary tensors are contracted so to provide the quantum states |ψ of a 2D infinitely large cylinder of circumference L. In the drawing one has to assume PBC along the vertical direction.Here we represent the norm of the state that defines the partition function Z of a 2D classical model.b) We compute the spectrum of the transfer matrix T M across the cylinder (sketched on the left), which characterizes the decay of the correlations addressed in Sect.X A, and the spectrum of the reduced density matrix of half of the cylinder ρ 1/2 (shown on the right), which gives access to the entanglement characterization of the states addressed in Sect.X B. Both calculations are performed via sparse exact diagonalization and their cost increase exponentially with L so that we can address at most systems with L = 20.

Figure 23 .
Figure23.Upper panel) The second gap of the TM represented in panel b) of Fig.22in the Z2 spin-liquid phase closes as θ approaches π/2, where there is the transition from the Z2 spin-liquid phase to the U (1) algebraic spin-liquid phase.The collapse of the data for the ∆2L close to π/2, for the values of L in the range L = 10, . . ., 16, confirms that the gap at the transition closes as 1/L as expected.Thus, what we are studying is a transition from a gapped phase with exponential decay of correlations to a gapless phase governed by algebraic decay of correlation.Lower panel) On the other hand, the first gap of the TM ∆1, representing the gap between the two different topological sectors appearing on the cylinder, opens exponentially with L as θ tends to π/2.This is again confirmed by the collapse of our numerical data for log(∆1)/L, with L in the range L = 10, . . .,16.

18 Figure 24 .
Figure24.The topological entropy γT defined in Eq.(49), and extracted from the scaling of the entropy of half infinite cylinders with respect to their circumference L. The red dots are obtained by considering the scaling of the entropy in the interval L = 4, . . .10, blue up-facing triangles L = 10, . . ., 16, green squares L = 12, . . ., 18, and the yellow triangles pointing to the right L = 14, . . ., 20.The red solid orange line represents the exact value of γT for the Z2 spin liquid in Eq. (50), while the cyan dashed line represents its value for the U (1) spin liquid from Eq. (52) with R associated to ∆ = −1/2.We see that, for small θ, γT coincides, independently of the size of the cylinder considered, with the expected exact value Z2 (left inset).As we move towards the transition γT shows a transient oscillation that tends to become sharper, deeper and move towards π/2 for larger L. At π/2 it attains again the expected analytical value with very small corrections induced by considering the two different set of data (right inset).In the main text we provide a discussion of these results.

Figure 25 .
Figure25.The behavior of first 100 eigenvalues λn (n is on the y-axis) of the reduced density matrix of half infinite cylinders ρ 1/2 defined in the panel b) of Fig.22with L = 16.We plot them as as a function of θ (x-axis).θ varies in the crossover range 1 ≤ θ ≤ π/2 identified during the analysis of the topological entropy in Fig.24.The entanglement spectrum presents clear plateaux, footprint of RK wavefunctions.Nevertheless, its lower part does not seem to detect the phases transition.The first Schmidt gap is identically zero everywhere (there are two degenerate eigenvalues), and the second Schmidt gap increases while approaching the transition (inset in the Figure)for all the L = 10, . . .,16.
(35)we now study how U G sn changes under a left rotation, Figure17.The operator that generates gauge transformations in the gauge-magnet LGT defined in Eq.(35).It rotates both incoming and outgoing links by the same group elements.On every link it only acts on the constituent that is closer to the site.