Gauging the bulk: generalized gauging maps and holographic codes

Gauging is a general procedure for mapping a quantum many-body system with a global symmetry to one with a local gauge symmetry. We consider a generalized gauging map that does not enforce gauge symmetry at all lattice sites, and show that it is an isometry on the full input space including all charged sectors. We apply this generalized gauging map to convert global-symmetric bulk systems of holographic codes to gauge-symmetric bulk systems, and vice versa, while preserving duality with a global-symmetric boundary. We separately construct holographic codes with gauge-symmetric bulk systems by directly imposing gauge-invariance constraints onto existing holographic codes, and show that the resulting bulk gauge symmetries are dual to boundary global symmetries. Combining these ideas produces a toy model that captures several interesting features of holography — it exhibits a rudimentary sort of dynamical duality, can be modified to demonstrate the relationship between metric fluctuations and approximate error-correction, and serves as an illustration for certain no-go theorems concerning symmetries in holography. Finally, we apply the generalized gauging map to construct codes with arbitrary transversal gate sets — for any compact Lie group, we use a symmetry-preserving truncation scheme to construct covariant finite-dimensional approximate holographic codes.


Introduction
The anti-de Sitter/conformal field theory (AdS/CFT) correspondence [1,2] is a general pattern of holographic dualities [3,4] that relate a Bulk theory of quantum gravity in asymptotically AdS spacetime to a Boundary 1 CFT in a space with one fewer dimension. Recent years have seen the development of quantum error correcting code toy models [5][6][7][8][9][10][11][12][13][14][15][16][17][18][19] that capture some of the most puzzling aspects [20] of the AdS/CFT correspondence. These toy models have provided valuable insight on holography by providing an explicit, finite-dimensional theory amenable to concrete calculations [18]. Although these models are useful for understanding static features like entanglement and geometry, they have had limited success at replicating aspects of dynamics and the inclusion of symmetry [19,21], particularly gauge symmetries [22,23]. The interplay of symmetry and quantum gravity has been the subject of much investigation [24][25][26][27][28][29][30][31][32]. In Ref. [28] it was shown that AdS/CFT can never exhibit a Boundary global symmetry that is dual to a Bulk global symmetry, and that this eliminates the possibility of the latter's existence entirely. Instead, all Boundary global symmetries must be dual to Bulk gauge symmetries, and vice versa. These statements hold even for spacetime symmetries, and in particular time evolution. Models of time evolution in holographic codes are of interest because they may be used to practically implement ideas in Ref. [33], such as the efficient implementation of non-local quantum computations. Existing toy models are not developed enough for this purpose as they either do not implement a proper symmetry duality [15], or they do not achieve entangling dynamics [34]. This motivates the construction of toy models that implement gauge symmetries in the Bulk as a means for concretely studying possible avenues towards time evolution, as well as studying symmetries in holography more generally.
Some of the major issues that remain for the incorporation of symmetries into toy models are: 1. the construction of a toy model with an explicit realization of Bulk gauge symmetry dual to a Boundary global symmetry 2 2. a deeper investigation of the conditions under which current holographic codes, such as HaPPY, do allow for Bulk global symmetries that are dual to Boundary global symmetries despite the results of [28], and finally 3. the construction of a toy model which properly incorporates a Boundary global time evolution symmetry, along with a dual Bulk gauge symmetry.
In this work we resolve the first issue by imposing Bulk gauge symmetry on the holographic code introduced in [7]. We then adapt the proof used for AdS/CFT in [28] to show that any holographic code whose Bulk exhibits such a symmetry must have a dual Boundary global symmetry. Thus the construction exhibits the desired duality.
We suggest a resolution to the second issue by showing that an apparent global symmetry in the Bulk can emerge from a gauge symmetry when one restricts to a specific subspace of the Bulk gauged system. This can explain why global symmetries appear in a context in which only gauge symmetries are allowed; the symmetries merely appear to be global due to this subspace restriction. To be more concrete, we generalize the "gauging map" defined in Ref. [35], so that it isometrically maps systems with global symmetries into systems with gauge symmetries. We show that the image of this generalized gauging map is a "fixed-flux sector" -a subspace characterized by specific eigenvalues of all relevant Wilson operators [36]. Thus, it can be inverted to map this subspace of a gauged system into a system with global symmetry, a process we refer to as "ungauging". Then an explicit way to construct a holographic code with Bulk global symmetry is to take one with Bulk gauge symmetry, ungauge it in this way to project out all but a single fixed-flux sector, and obtain a system in which the original gauge symmetry now appears as a global one. This circumvents the "no Bulk global symmetries" theorem of Ref. [28] which requires the global symmetry to appear in any Bulk subspace. We argue that this loophole explains the presence of global symmetries in HaPPY, as its Bulk can be understood as having been restricted to a fixed-flux sector.
Despite applying only to internal i.e. non-spacetime symmetries, the gauging map also offers insight into the third issue, how Bulk time evolution appears. Drawing an analogy to diffeomorphism invariance (the gauge symmetry of gravity) we interpret the fixed-flux subspace as a fixed geometry subspace, and the application of the ungauging map as the emergence of Bulk locality in such a subspace. The duality thus generated between Bulk and Boundary global symmetries can then be interpreted as a trivial kind of time evolution under a non-interacting Hamiltonian, in which all information is stuck in place.
There is an interesting consequence of this work that may have applications in the study of pure quantum error correction. We can generalize the construction of a code with Bulk gauge symmetry to allow for an arbitrary finite or continuous compact Lie group. By using the map to ungauge the Bulk, the Bulk gauge symmetry is converted to a global symmetry, as before. In the language of quantum error correction, we have uncovered a new method to construct codes with arbitrary transversal gate sets. For continuous (compact Lie) groups the code is infinite dimensional [37][38][39], but we show how to use a truncation scheme which produces finite dimensional approximations to the exact continuous code while preserving the covariance property, as must be the case to respect the results of Ref. [21].
The structure of the paper is as follows. In Section 2 we introduce notation, definitions, and background that is used throughout the paper. Of particular importance are the definitions of global symmetries, gauge symmetries, and dualities between them. In Section 3 we define the gauging map and prove its relevant properties, although some more detailed proofs are left to Appendix B. In Section 4 we give a working definition of holographic codes and provide illustrative examples of the two main types of holographic code we are interested in, those with unconstrained local Bulk degrees of freedom, and those with Bulk constraints due to gauge symmetries. We also prove here that any holographic code whose Bulk exhibits a gauge symmetry has a dual Boundary global symmetry. As part of this construction, we derive new results for quantum error-correcting codes to do with the implementation of a logical unitary representation via a physical unitary representation on the complement of a correctable subsystem, which may be of independent interest -see Appendix A for details. Finally, in Section 5 we illustrate a number of applications of the gauging map to holographic codes, including gauging and ungauging holographic codes, and commentary on the resulting models of holography.

Setup
In this section we review and introduce notation for the background concepts needed to understand the results of this work. Readers with a background in quantum error correction and/or gauge theory will likely have an easier time, though neither of these is prerequisite. In 2.1 we introduce notation for basic definitions of linear algebra (for discussing quantum systems) and graph theory (for giving these systems geometrical structure). In 2.2 we give definitions for quantum many body systems that keep track of their local tensor product structure and any constraints they may have, which are helpful in keeping track of the variety of systems being mapped to each other throughout the rest of the paper. In 2. 3 we define what it means to equip a system with a global symmetry, and what it means for a map between systems to exhibit a global/global symmetry duality. Finally in 2. 4 we define what it means for a system to have a gauge symmetry, show how the Hilbert space of such systems naturally breaks up into "fixed-flux sectors", and what it means for a map between a gauged system and an unconstrained system to exhibit a gauge/global duality.
As part of our conventions we capitalize Boundary and Bulk throughout this paper when referring to the two systems dual to each other in AdS/CFT or holographic codes. This is to avoid confusion with other meanings of the word boundary.

Mathematical notation
We use the following notation for the basic mathematical objects that appear in the work that follows. We encourage the reader to skip this section on a first read and use it merely for reference where necessary.

Linear algebra
• Hilbert spaces are denoted by H x with x some label.
• For a Hilbert space H x , we denote the set of all linear operators acting on H x by L(H x ).
• For a Hilbert space H x we denote the identity element of L(H x ) by 1 x , or 1 when the space is clear from context. We reserve the symbol I for the identity of a group.
• For a set V , and a set of Hilbert spaces {H v |v ∈ V }, we define H V ≡ v∈V H v . We refer to the labels v as subsystems.
• For a Hilbert space H and a projector Π : H → H we denote by ΠH the Hilbert space which is the image of Π.
• We use the word support in the conventional, slightly ambiguous way. Which of these two meanings is intended should be clear from context.

Graph theory
• A directed graph Λ = (V, E) consists of a set V also called the vertices and set E ⊆ V × V also called the edges.
• A directed graph Λ = (V, E) is said to be oriented if for any two vertices v, u ∈ V , there is at most one edge connecting the two, i.e. (v, u) ∈ E → (u, v) ∈ E. We refer to such a graph simply as an oriented graph, and every Λ from here on refers to an oriented graph.
• A path in Λ is a tuple of vertices (v 1 , v 2 , . . . , v n ) such that for all i ∈ {1, . . . , n}, v i ∈ V and for all i ∈ {1, . . . , n − 1} (v i , v i+1 ) ∈ E or (v i+1 , v i ) ∈ E. We emphasize that although the path itself has a specific direction (from v 1 to v n ), there is no restriction on the direction of each individual edge.
• A cycle in Λ is a path (v 1 , v 2 , . . . , v n ) such that v 1 = v n .
• We say that Λ is connected if any two vertices are connected by a path, noting again that there is no constraint on the directions of the edges comprising the path 3 .
• For any edge e in Λ we define the vertices e + and e − such that e = (e + , e − ). For a set of edges F ⊆ E and a vertex v ∈ V we define F (v) = {e ∈ F |v ∈ e}, F + (v) = {e ∈ F (v)|e + = v}, and F − (v) = {e ∈ F (v)|e − = v}.
• A planar graph is a graph which can be embedded in a plane without edges intersecting. When we speak of planar graphs, we implicitly assume that a specific embedding has already been chosen.

Quantum many body systems
We now define the two fundamental objects of interest that we deal with: a quantum many body system with or without constraints. An unconstrained quantum many body system is a labeled collection of Hilbert spaces. A constrained quantum many body system additionally involves considering only a subspace of the combined Hilbert space to be physical. These two types of systems are of interest because they describe states of condensed matter systems, lattice ultraviolet completions of quantum field theories, and quantum error correcting codes. For brevity we replace the phrase "quantum many body system" with simply "system" for the rest of this work.
When W = V we simply say that A S (V ) is the algebra of S-operators. When W = V we simply say that A T (V ) is the algebra of physical T -operators. We also call ΠH V the physical Hilbert space of T .
We emphasize that this definition of physical is relative to the system being considered. In this work, we consider error-correcting codes in which the logical system is constrained in some way, meaning we can sensibly talk about a "physical logical operator", which may sound strange to readers familiar with error-correction. In our context, this is just a logical operator which is physical with respect to the logical system, meaning it commutes with the relevant projector (i.e. preserves the constraint).
Note that a constrained system is a generalization of an unconstrained system. Note also that, unlike for an unconstrained system, for a constrained system T with non-trivial projector we can find two distinct elements in the algebra of physical T -operators that have the same action on states in the physical Hilbert space of T . This is a key property which the reader may recognize from either quantum error correction or gauge symmetry. In a quantum error correction context, such a non-uniqueness appears because information which is stored in the logical Hilbert space may be manipulated by acting on any set of physical systems from which it may be recovered. In the context of gauge symmetry, it appears because a physical operator may be multiplied (on either side) by an operator implementing a gauge transformation, and its action on physical states would remain the same.

Global symmetries & global/global dualities
In this subsection we define what it means for a system to have a global symmetry, and what it means for an isometry between two systems to exhibit a global/global duality.
One of the most fundamental features unconstrained 4 systems may exhibit is an internal 5 , also known as "on-site", global symmetry. This usually means that 1) there exists a unitary representation of a group acting on the whole system which is a product of unitary representations acting on individual subsystems, and 2) all elements of this "collective" representation commute with the Hamiltonian. We do not consider systems with dynamics in this work, so we do not require 2). With this in mind we now provide a formal definition: 3. An unconstrained system transforming under a global symmetry, (S, G, {U v }) consists of a system S = (V, {H v }), a group G, and a set of unitary representations of G where we drop the set brackets around v for brevity. For any W ⊆ V we define U W (g) ≡ w∈W U w (g). We refer to U W (g) as a global symmetry transformation restricted to W , and when W = V we simply refer to it as a global symmetry transformation.
To genuinely be a global symmetry, we should also require that the representations acting on each site be faithful. This is not necessary for our results to apply except when we need to use the results of [28] in Section 5.3, since they explicitly make use of this.
In this paper we often examine isometries between the Hilbert spaces of two systems. When these two systems are unconstrained and transform under a global symmetry with the same group, then we may inquire whether the isometry possesses a global/global duality -that is, whether the isometry is a group isomorphism between the two sets of global symmetry transformations acting on the two different systems. This can be more explicitly stated as follows. Consider an isometry V : H V →HṼ . We say that V has a global/global symmetry duality if for all g ∈ G the global symmetry transformationŨṼ (g) acting onS implements the global symmetry transformation U V (g) acting on S, i.e.

Gauge symmetries
We now review the standard construction of a lattice gauge theory originally introduced in Ref. [22], but stripped of all dynamics. In particular, we describe how to build a constrained system "with gauge symmetry". We begin by introducing some basic definitions in 2.4.1, and then the formal definition in 2.4.2. In 2.4.3 we show how the "gauge-invariant Hilbert space" can be written as a direct sum of "fixed-flux sectors". Finally in 2.4.4 we define what it means for an isometry to have "gauge/global symmetry duality".
Gauge symmetries are different in nature than global symmetries. A global symmetry involves a unitary representation acting on a system, generically changing its state. In contrast, a system exhibits gauge symmetry if it is constrained to be invariant under the action of local unitary representations. Such a system can be constructed by adding new degrees of freedom to an unconstrained system and restricting the resulting Hilbert space (thus making a constrained system) to be invariant under the action of "gauge transformations", defined in depth below. It is not necessary to include gauge transformations at all locations in this restriction, a fact which is of vital importance to our results, and which is encoded in an assignment of a bit to each subsystem of the original system, i.e. a "bit labeling".

Basic definitions
One of the ingredients of a system with gauge symmetry is the presence of degrees of freedom which encode group elements. More specifically, these degrees of freedom live in the Hilbert space L 2 (G) for some group G. For finite groups this is a Hilbert space with {|g |g ∈ G} as an orthonormal basis. For continuous compact Lie groups it is essentially the same along with the usual subtleties that we address in Section 5.5.2. A natural representation of G which acts on L 2 (G) is "left-multiplication", U L : G → L(L 2 (G)) 6 , which acts on the basis vector |h as Another representation is "right-multiplication", U R : G → L(L 2 (G)), which acts on the basis vector |h as It is easy to check that these representations commute with each other, i.e.
We often need to take the averaged sum over all group elements of an expression. We denote this as dg, which for finite groups means 1 |G| g∈G , and for continuous compact Lie groups means integration using the Haar measure 7 . In the remainder of the paper we restrict to finite groups and continuous groups that are also compact Lie groups 8 . Therefore, when we say continuous group we really mean continuous compact Lie group.

Systems with gauge symmetry
The definition of gauge symmetry proceeds as follows. Starting with an "ungauged" system, we first introduce new gauge degrees of freedom to obtain a "pre-gauging" system. On this system, we can then define gauge transformations, which couple the gauge degrees of freedom with the original degrees of freedom. The gauge-symmetric theory is then obtained by constraining the pre-gauging system into a subspace invariant under such gauge transformations. We formalize this as follows.
Definition 2.5. Given a system transforming under a global symmetry, (S, G, {U v }), with S = (V, {H v }), referred to here as the ungauged system, and an oriented graph Λ = (V, E), we define the pre-gauging system to be the system with H v∈V the same for the ungauged and pre-gauged systems. We also require H e∈E ∼ = L 2 (G), which we sometimes describe as "gauge degrees of freedom" that "live on the edges". Definition 2.6. Given a system transforming under a global symmetry, (S, G, {U v }), with S = (V, {H v }) and an oriented graph Λ = (V, E), let S be the pre-gauged system. For 6 In the literature U L and U R are more commonly denoted as L and R. We deviate from this notation as we use other meanings for both L and R. 7 More explicitly, we use the unique left and right invariant measure normalized so that G 1 dg = 1. 8 Note that a finite group is trivially a compact Lie group as it has the discrete topology so every map is trivially smooth and the compactness follows from the finiteness of the group.
a vertex v ∈ V we define a gauge transformation (operator) localized to v as an operator of the form with U R and U L defined as in Eqs.
is a unitary representation of G. The Hilbert space invariant under (or stabilized by) gauge transformations localized to v is the image of the projector, called the local gauge projector.
Definition 2.7. Given a system transforming under a global symmetry, , and an oriented graph Λ = (V, E) with bit labeling α : V → {0, 1}, let S be the pre-gauged system. We define the system obtained by gauging (S, G, {U v }) to be the where a projector to the power of zero is understood to mean the identity and as above, . We call Π GI H Λ the gauge-invariant Hilbert space, and operators in A T (Λ), gauge-invariant operators. We use the convention that edges connecting vertices in V 0 to those in V 1 always point from the former to the latter.
The label α(v) determines whether or not the Hilbert space is restricted to be invariant under a gauge transformation localized to a vertex v. We sometimes refer to the vertices in V 0 as NGC (not gauge-constrained) vertices, and those in V 1 as GC (gauge-constrained) vertices. Because gauge transformations localized to NGC vertices are not constrained, they continue to have a non-trivial action on the gauge-invariant subspace, which is a key feature for the rest of the paper. When we introduce holographic codes, NGC vertices are associated with the Boundary system and GC vertices with the Bulk system. Definition 2.8. Given a system transforming under a global symmetry, gauged with respect to an oriented graph Λ = (V, E) with bit labeling α, for any W ⊆ V 0 we define the NGC or asymptotic symmetry transformation restricted to W as For the special case W = V 0 , we refer to A V 0 (g) simply as an NGC or asymptotic symmetry transformation.
It is straightforward to show that NGC symmetry transformations are gauge-invariant. We do not include vertices in V 1 in this transformation. Doing so would make no difference to how the NGC symmetry transformation would act on states in the gauge-invariant Hilbert space, though it would change which subsystems it acts on for states in the pre-gauged Hilbert space. In particular, the T -operator v∈V A v (g) has the same action as the NGC symmetry transformation A V 0 (g).
We use the term asymptotic symmetry transformation in holographic contexts because it is used in Ref. [28] in the specific case where the system has a geometric structure and the V 0 vertices correspond to vertices on the Boundary. For quantum field theories these transformations take place at asymptotically spacial infinity, hence the name. In more application-agnostic settings, such as here and in Section 3, we use the term NGC simply to emphasize the generality of the construction.

Fixed-flux sectors
We can decompose the gauge-invariant Hilbert space into a direct sum of fixed-flux sectors, or simultaneous eigenspaces of all "NGC-to-NGC" Wilson lines and all Wilson loops, defined below. This decomposition is useful in understanding the image of the gauging isometry.
The name "fixed-flux sector" is inspired by quantum electrodynamics, which can be described as a continuum version of a gauged system where G = U (1). In this context, the Wilson loop operators measure the magnetic flux going through them, and thus a "fixed-flux sector" is the portion of the state space for which all magnetic fluxes have fixed given value. For e = (u, v) ∈ V × V defineē ≡ (v, u), and Wē ij ≡ (W e ji ) † . To each cycle l = (v 1 , . . . , v n ) such that v 1 , . . . , v n ∈ V 1 , we associate the Wilson loop operator where both the multiplication of operators on the right hand side and the trace are understood to be with respect to the representation indices.
For each undirected path p = (u, v 1 , . . . , v n , w) with u, w ∈ V 0 and v 1 , . . . , v n ∈ V 1 we define the NGC-to-NGC Wilson line operator It is possible to remove the overlines by switching left and right multiplication in the definition of gauge transformations. We choose this convention instead to maintain consistency with [35].
All Wilson loop and NGC-to-NGC Wilson line operators commute with each other and are gauge-invariant (Shown in the appendices under Theorem B.1), and thus their eigenspaces can be used to partition the gauge-invariant Hilbert space. We call a subspace of Π GI H Λ which is a simultaneous eigenspace of W l and W p ij for all loops l and NGCto-NGC paths p, for all choices of r, a fixed-flux sector. There is a special sector for which it is sufficient to use a single representation r, called the flux-free sector, which has eigenvalue T r(r(I)) for all W l and r ij (I) for all W p ij . We denote its projector by Π F F . Because these lines and loops measure only edge degrees of freedom, H E , this projector can also be expressed in the form Π E F F ⊗ 1 V Π GI , with Π E F F projecting onto the eigenspaces described above.
To understand this definition, notice that W e essentially measures the group element at site e. Thus an NGC-to-NGC Wilson line measures the product of group elements along its path. The reason that we only consider Wilson lines ending on NGC vertices at both ends is that only these Wilson lines are gauge invariant on their own. As we discuss below Wilson lines ending at GC vertices can be gauge-invariant when in combination with vertex operators.
The Wilson loop is a bit more subtle. We can not say that it measures the product of group elements, g, along the loop because g would depend on which link we started with. The Wilson loop actually measures the conjugacy class of g, defined by C(g) = {hgh −1 |h ∈ G}. Using the cyclic property of the trace, it is clear that Tr[r(g)] depends only on C(g). Character theory ensures that the values of Tr[r(g)] for all irreducible representations r uniquely determines conjugacy class (see e.g. Ref. [40]). However, it is sufficient to use a single faithful (finite-dimensional) unitary representation to distinguish the conjugacy class C(I) from the others. This, and the fact that the identity is the only member of its conjugacy class, shows that the flux-free sector as defined is the unique subspace of Π GI H Λ for which the product of group elements along any path or loop is the identity.
What degrees of freedom remain within each fixed-flux sector? Even if all elements of {H v∈V } are trivial, there may still remain some pure gauge degrees of freedom (see Refs. [41] and [42]). As we uncover in greater detail in Section 3, if some of the {H v∈V } are non-trivial, then they contribute additional degrees of freedom to each flux sector. These are completely fixed by Wilson lines that, on at least one side, end with an action on a subsystem corresponding to an element of V 1 . We call these "NGC-to-GC" (when the other end is in V 0 , i.e. an NGC vertex) and "GC-to-GC" (when both are in V 1 ) Wilson lines.
We note that, alongside Wilson loops, NGC-to-NGC Wilson lines, and NGC-to-charge Wilson lines, there is another gauge invariant operator U L e (g) = U R e (g) for g in the center of G and any e is also gauge invariant. We refer to these as central flux operators. Note that left and right multiplication are equivalent only for central elements, and that only for central elements are they gauge-invariant.

Gauge/global dualities
We now introduce a definition for an isometry with a gauge/global duality. The definition is motivated by AdS/CFT, where global symmetry transformations acting on the Boundary CFT implement asymptotic gauge transformations in the Bulk AdS [28]. Consider an isometry V : Π GI H Λ →HṼ . We say that V has a gauge/global symmetry duality if for all g ∈ G the global symmetry transformationŨṼ (g) onS implements the NGC symmetry transformation If instead V is an isometry of the form V :HṼ → Π GI H Λ then we say it has a global/gauge symmetry duality if for all g ∈ G the global symmetry transformationŨṼ (g) onS is implemented by the NGC symmetry transformation Lastly, if instead we replace Π GI H Λ with one of its fixed-flux sectors, we instead say that V exhibits a fixed sector gauge/global (or global/gauge) symmetry duality.

The gauging isometry
The procedure for defining a system with gauge symmetry, as we have presented it in Sec. 2.4, appears at first glance an involved modification of a system with global symmetry. There is, however, an explicit relationship between these two systems in the form of a linear map between their two overall Hilbert spaces. The properties of this map in the context of lattice spin systems have been studied in various guises since the work of Refs. [43,44]. We follow the recent treatment in Ref. [35], which focused on the case where gauge constraints are imposed over all the local gauge transformations, i.e. V 0 = ∅. In this case, the map has as its support the space of states that transform trivially under the global symmetry, where it acts as an isometry.
In the Bulk of AdS/CFT however, the gauge constraint is not enforced at the asymptotic boundary (see Ref. [28]). To model additional features of AdS/CFT we would like to study holographic codes that do likewise. For this reason we now generalize this map by allowing for some local gauge transformations to be excluded from the gauge constraint. We then prove the relevant properties of this map, namely that it can be an isometry on the whole system, that it preserves the locality of operators up to a "dressing to the boundary", that it displays a global/gauge duality, and that its image is the full flux-free sector. We then describe a generalization of this map to other flux sectors.

Definition of the map
We now define a map that "gauges" states of a system transforming under a global symmetry by encoding them into gauge-invariant states. Our definition differs from the one in Ref. [35] only in that it allows for the possibility that some gauge transformations are not included in the gauge constraint.
where I is the identity element of G.
There is a subtle terminology distinction that should be clarified, as it may cause confusion. The phrase "the system obtained by gauging (S, G, {U v })", as defined in Definition 2.7, refers only to a system constructed from an ungauged system, with appropriate edge degrees of freedom added and a gauge-invariance constraint imposed. It is not to be confused with the application of the gauging map G to an ungauged system, because its image, as we explain shortly is additionally constrained beyond the gauge-invariance requirement. The former is a prescription for constructing a Hilbert space, whereas the latter is a specific isometry that embeds the ungauged system into the former. This potential cause for confusion is an unfortunate consequence of the former phrase being standard in the literature.

The map can be an isometry
We now show that the gauging map can be made an isometry when the graph is connected and some gauge transformations are not included in the gauge constraint.
Theorem 3.2. If V 0 = ∅ and Λ is connected, then G is an isometry up to an overall normalization factor.
Proof. Consider the map P = G † G : H V → H V given by where in the last line if e + ∈ V 0 we have g e + = I since the gauge transformation acting on e + is not included in the gauge constraint. The last factor is non-zero only when g e − = g e + .
When V 0 = ∅ and Λ is connected, this causes all g's to be set to I 10 . Thus P = κ 2 1 H V with In particular, for G finite the above formula is Then one could make G an isometry by dividing by κ.
In Section 3.5, we find that the image of this map is precisely the flux-free sector introduced in Definition 2.9. We can use that here result to provide a heuristic degreesof-freedom-counting argument for why the existence of at least one NGC vertex makes allows the map become an isometry. When there are no NGC vertices (i.e. the setting studied in Ref. [35]), the gauging map enforces too many constraints, causing all states other than the symmetric subspace of the input system to be annihilated. Although the gauging map provides additional degrees of freedom in the form of edge states, these are counteracted by the gauge constraints and the flux-free Wilson loop constraints. If a GC vertex is changed to be an NGC vertex, then these constraints are replaced by the trivial NGC-to-NGC Wilson line constraints, but only so long as there is already at least one other NGC vertex, otherwise no such lines can exist. Thus the first NGC vertex added provides additional degrees of freedom not counteracted by constraints, allowing the map to no longer annihilate any states.

Local operators are implemented by their dressed versions
We now show that local ungauged operators are implemented by "dressed" gauged operators. The dressed operator may be chosen to have support on any path from the original site to a point on the boundary, as portrayed in Fig. 1. The non-uniqueness can be understood in analogy with error correcting codes 11 , where a logical operation can be implemented on any subset of physical degrees of freedom on which the logical information can be recovered. This is true for isometries in general, even if they are not good at correcting errors.
all the vertices of the edges on E Γ are in V 0 or V Γ . Define, for any 10 In the case when V0 = ∅ then all g's are equal to each other but there remains a sum over all elements of the group, making the map a projector onto the trivial representation. 11 In general, our discussions of error-correcting codes throughout this work are in the context of correcting for erasure errors. v ∈ V Γ and g ∈ G, the following S operator: .
Proof. The proof is given in Appendix B.2.
We now prove our claim that a local ungauged operator supported on some vertex u ∈ V 1 can be implemented by a gauged operator with the same support plus an arbitrary dressing to the boundary. Specifically, this dressing lies on a subgraph Γ = (V Γ , E Γ ) consisting of a path from u to v 0 ∈ V 0 and its edges. However, it does not have support on v 0 itself.
Proof. The proof is by construction. The candidate O Γ is the one defined in Lemma 3.3 Looking at the right hand side, expanding G and using the gauge-invariance of O Γ to commute it with Π GI gives where we must define g v 0 = I for the third line to be valid. For the edge e ∈ E Γ such that e + = v 0 (i.e. the edge e ∈ E Γ ∩ E 0 with E 0 as defined in Section 2.1.2), the matrix element I g e − g −1 e + e imposes g e − = I. Then after integration over g v and using the constraints from the other matrix elements, we can set To prove the implementation condition we need only then to redefine O Γ → O Γ κ Γ . Finally, we just need to show that O Γ commutes with the projector onto the image of G, that is, it is block diagonal with respect to a decomposition into the image and its orthogonal complement. In this decomposition, it follows from It is possible to map some operators to their gauged counterparts without a boundary attached dressing. In particular, for a G-symmetric O, i.e. one satisfying for every g ∈ G and having support on some subset of vertices W ⊆ V 1 , it is possible to use as Γ a subgraph which includes all of W and no edges connecting to vertices in V 0 . This fact was originally shown in Ref. [35] using essentially the same proof. The idea is that without the constraint imposed by the edge connecting to V 0 , in the last part of the proof, all g v are set equal to each other, but not necessarily to I, leaving a projection of O onto the space of G symmetric operators. But this does nothing on G symmetric operators. For all other operators a boundary attached dressing is required.
In the appendices under Theorem B.4, we show a sort of converse to the theorem proving a "reverse dressing property", namely that any gauged operator that preserves the flux-free sector and is supported on some subgraph Γ of Λ, with certain conditions on Γ, implements an ungauged operator supported on only the vertices of Γ.

The isometry exhibits a global/gauge duality
We now show that global symmetry transformations are implemented by NGC symmetry transformations (see Fig. 2).
Theorem 3.5. Consider a system transforming under a global symmetry, and labeled by α such that V 0 = ∅. Let T be obtained from gauging S. Let G be the corresponding gauging isometry. NGC symmetry transformations on the output implement global symmetry transformations on the input, i.e.
Proof. In order to prove the equality, we show that for every |ψ V ∈ H V we have Expanding the left hand side we get Figure 2: A global symmetry action acting on the input to the gauging map acts as an NGC symmetry transformation acting on its output. Note that we are omitting the action on NGC vertices (represented by white dots) for consistency with future diagrams. This is because for holographic codes we require in the Bulk that all V 0 Hilbert spaces are trivial.

The image of the isometry is the flux-free sector
We now show that the image of the gauging isometry is the flux-free sector of the gaugeinvariant Hilbert space, when the V 1 induced subgraph is connected.

Lemma 3.6. For a gauging map G and a Wilson link operator
Proof. Consider an arbitrary state |ψ V , then G |ψ V = Π GI |ψ V ⊗ e∈E |I e . As the Wilson link operators are gauge-invariant, we can move them past the projector and act them on |I e to give the desired result.
Theorem 3.7. Consider a system transforming under a global symmetry, is still connected. Let T be obtained from gauging S. Let G be the corresponding gauging isometry. The image of G is Π F F H Λ , the entire flux-free sector of the gauge-invariant Hilbert space.
Proof. By Lemma 3.6 and the definition of flux-free sector, any state in the image of G is in the flux-free sector, i.e.
The other inclusion is more difficult to prove, thus we sketch it here but relegate a full proof to the appendices under Theorem B.3. By the comments at the end of Definition 2.9, note that states of the form form a basis for the flux-free sector, with e∈E |g e living in the support of Π E F F (i.e. the flux-free sector when all vertex degrees of freedom are trivial). Thus we just need to show that every such state lies in the image of G.
If the edge configuration e∈E |g e were the trivial one, e∈E |I e , then we would be done -this would simply be equal to G |ψ V . Lemma 3.3 of Ref. [41] allows us to relate the above configuration to the trivial one. It shows that because these edge configurations are both in the flux-free sector, they can be related by some product of gauge transformations, up to corrections that act just on vertices and not edges (and thus can just be absorbed into a redefinition of |ψ V ). The gauge transformations associated with GC vertices, by the way that the gauge invariant sector was constructed, are simply absorbed into the gauge-invariant constraint Π GI .
The gauge transformations associated with NGC vertices are slightly more complicated. Because the edge configuration in question is in the flux-free sector, it turns out that all gauge transformations on NGC vertices used to relate it to the trivial configuration must actually correspond to the same group element. Thus the product of all such gauge transformations is just an NGC symmetry transformation, which via Theorem 3.5 is dual to a global symmetry on the input system. This global symmetry can also just be absorbed into a redefinition of the vertex configuration, |ψ V . Thus we can effectively replace the edge configuration above with the trivial one, and conclude that the state Π GI |ψ V ⊗ e∈E |g e is in the image of the gauging map.
For more details, see the proof of Theorem B.3 in the appendices.

NGC flux sectors and beyond
In this section, we consider a family of gauging maps related to the original by NGC gauge transformations. We show that each such map displays the four major properties shown above for the standard gauging map, all of which are relevant for later sections. Namely, it is an isometry, it implements local operators via dressed ones, it exhibits a gauge/global duality, and it is surjective on the relevant flux sector. In Section 5.3 we find that this family of generalized maps is related to acting with restricted global symmetry actions on the Boundary of a holographic code. We state some results for even more general gauging maps but leave their proofs to Appendix B.3.
Definition 3.8. Consider an unconstrained system transforming under a global symmetry, and an oriented graph Λ = (V, E) with α labeling. Let T = (S, Π GI ) be the constrained system obtained by gauging S. For any function φ : E → G, we define the twisted gauging map as Definition 3.9. We call the subset of such maps that are related to the original gauging map by NGC gauge transformations NGC flux gauging maps. More explicitly such maps can be written as Notice that any such choice of group elements gives a legitimate twisted gauging map, since they can be commuted past Π GI to act on the edge degrees of freedom.
Showing that an NGC flux map G φ has the same properties as G is essentially just a matter of stating that they are unaffected by a local basis change. Note that, we can reach an even larger class of maps by acting acting on the output of the flux free map G with local unitaries that act as central elements of G on the E 1 edge degrees of freedom. Because they act as central elements, they commute with the gauge projector and are thus equivalent to changing the flux configuration φ e for e ∈ E 1 before the gauging map was applied.
That the map G φ is an isometry (when Λ is connected and V 0 = ∅) for NGC flux maps is clear. In Theorem B.5 we show that it holds for any choice of φ.
Local operators in the ungauged system also continue to be implemented by dressed operators in the gauged system, which can be seen as follows. Let O u be an A S (u) operator, and let O Γ be the A T (Γ) operator with arbitrary dressing along the path Γ which one may use to implement O u using the original gauging map, i.e. GO u = O Γ G. Then is a product of local unitaries which preserves the support of an operator.
The reverse dressing property also holds. More explicitly, for any subgraph Γ satisfying the conditions in Theorem B.4, an operator O Γ ∈ A T (Γ) which preserves the image of G φ implements an operator O V Γ supported on the vertices of Γ. This can be proven as follows. First, notice that Furthermore this operator is also supported only on Γ. Thus by the reverse dressing property for the original gauging map, it implements an operator O V Γ supported on only the vertices of Γ, i.e.
Multiplying the left by U 0 gives the desired result. 13 The global/gauge property holds for NGC flux maps up to a local basis change of the symmetry actions. More explicitly, Interestingly, this means that the gauge/global duality still holds for h in the centralizer of φ(E).
We provide the proof that the image of an NGC flux map is the full relevant flux sector in Theorem B.9, where we additionally assume that Λ \ (V 0 ∪ E 0 ) is still connected. For general φ we no longer have that the image is the full flux sector, because as discussed in the end of Section 2.4.3, for groups with outer class automorphisms there are additional pure gauge degrees of freedom besides Wilson loops. This means that it is not possible in general to reach every configuration of gauge degrees of freedom in a given nontrivial fixed flux sector by acting with gauge transformations. Since the gauging map essentially takes the superposition of all gauge transformations, there are some states in such a flux sector outside its image. Although the image of a single gauging map may not be surjective in a fixed nonabelian flux sector, there are many gauging maps with image in the same flux sector and the union of all their images coincides with the full fixed flux sector.

Holographic codes
A holographic code is a type of error correcting code which encodes a logical "Bulk" system living on discretized d dimensional geometry into a physical "Boundary" system which lives on a discretized d − 1 dimensional geometry, with the geometry of the Boundary inherited from the boundary of the Bulk geometry [5,20].
there is a node in V 0 which participates in more than one edge, and d) there is an edge connecting two nodes in V 0 .
We define more specific requirements for a holographic code in this section, and give two examples: 1) the HaPPY code [5], which has an unconstrained Bulk system and exhibits a Z 2 global/global duality, and 2) what we have dubbed the gauged LOTE code [7], whose Bulk system is a full Z 2 gauge constrained system. We then show that any holographic code whose Bulk system is a gauge-constrained system with group G, and whose constrained subspace is the full gauge-invariant sector (i.e. the constraint is Π GI ), exhibits a gauge/global duality. The definition of holographic codes, as well as this result on the existence of gauge/global dualities, is used in section 5 to demonstrate an equivalence between holographic codes with various symmetry dualities.

Working definition
For clarity we restrict our discussion to Bulk geometries that are two dimensional. This geometry determines which subsystems of the Bulk system are encoded into which subsystems of the Boundary system [20]. This is usually done via a Ryu-Takayanagi (RT)-like prescription [45][46][47], but for the sake of both clarity and generality we only require prescriptions that obey a property we call near-boundary probing. For the remainder of the work we describe the Bulk geometry with a planar graph with quantum degrees of freedom living on its nodes and edges. In higher dimensions, it would be more appropriate to use something like a CW complex [48]. Fig. 3) Given a planar graph Λ = (V, E) with boundary vertices ∂V ⊆ V 14 and bit labeling α : V → {0, 1}, we say that (Λ, α) is a planar graph with dangling edges if the following conditions hold In the context of holographic codes, we sometimes refer to E 0 (that is, the set of edges containing one vertex in V 0 ) as the set of dangling edges.
For holographic codes, the V 0 vertices comprise the Boundary system 15 , so these conditions can be phrased as follows: all Boundary vertices are on the boundary, and connected to exactly one other vertex which is a Bulk vertex also on the boundary (with the edge pointing from Boundary to Bulk).
We now define the necessary requirements for the entanglement wedge map, which plays a crucial role in the definition of a holographic code. Fig. 4) Consider a connected planar graph with dangling edges (Λ = (V, E), α). We say that a map E : 2 V 0 → 2 V 1 ∪E 16 is near-boundary probing if it possesses the following three properties.
1. The dangling edges in E(R) are exactly those that connect to vertices in R; that is, 2. Every vertex in E(R) is connected by a path in E(R) ∪ R to an element of R.

A non-dangling edge is in E(R) if and only if it is incident on at least one vertex in E(R).
Furthermore, we define the exterior of E(R) to be Ext E(R) = {e ∈ E(R)|∃v ∈ e|v / ∈ R ∪ E(R)}, i.e. those edges in E(R) that connect to only one vertex in R ∪ E(R). We also define its interior Int E(R) to be all other edges and vertices.
14 A boundary vertex is one from which it is possible to draw a path reaching to infinity on the embedding plane without intersecting another part of the graph. 15 Recall that Boundary is capitalized when referring to the system and its vertices V0 to distinguish from other uses of "boundary", such as the boundary vertices of the planar graph, ∂V . 16 Recall that for a set S its power set 2 S is the set of all of its subsets.

A map
probing; and such that the map R → E(R c ) c ∪Ext E(R c ) is also near-boundary probing.
4. An algebra A E(R) for each Boundary region R ⊆ V 0 called the entanglement wedge algebra, which is a subalgebra of the physical algebra restricted to E(R); formally, Furthermore, we require it to contain the full algebra of physical operators supported on the interior of E(R), i.e. A T (Int E(R)) ⊆ A E(R) .
5. An encoding isometry V : ΠH V 1 ∪E →H V 0 from the Bulk to the Boundary.
Furthermore it obeys a condition known as "entanglement wedge reconstruction" [49,50], that is for any R ⊆ V 0 , any Bulk operator localized to the entanglement wedge of R which is in the corresponding entanglement wedge algebra, i.e. every O ∈ A E(R) must be implementable by a Boundary operator localized to R,Õ ∈ A B (R), i.e.

VO =ÕV
and [Õ, VV † ] = 0. 17 17 The entanglement wedge reconstruction condition for a given Boundary region R and the algebra (a) Depiction of a four legged tensor.
The legs may be colored differently in order to emphasize some grouping among them.
(b) The same tensor "viewed from the top" so that the red leg is coming out of the page.
(c) Two three legged tensors with one leg from each contracted together. Though our definition of holographic codes and results about them naturally generalize to higher dimensions, in that case there are additional types of gauging prescriptions corresponding to placing degrees of freedom on simplices with dimension greater than one, which we have not explored. In the language of field theory: though our results apply to 1-form gauge fields in any dimension, we expect similarly interesting results for higher-form gauge fields [51].

Visualizing many body systems with tensor networks
Before introducing examples of holographic codes, we first introduce the tools used to build and visualize all examples known to date, namely tensor networks. We only do so briefly, and readers unfamiliar with tensor networks are encouraged to refer to Refs. [5,52] for more details.
The basic building block of a tensor network is, unsurprisingly, a tensor. A tensor with n indices is represented diagrammatically by some shape with lines, or "legs" coming out of it, with each leg representing one index of the tensor, see figures 5a and 5b. A tensor network consists of a set of tensors, each with some number of indices, with some indices contracted 18 together among the various tensors. Diagrammatically, this contraction is represented by the two corresponding legs joining together into a single line -see Fig. 5c. Legs can also remain unconnected, in which case they represent an uncontracted index of the resultant tensor. 19 associated to its entanglement wedge AT (E(R)) is equivalent, via the so called "cleaning lemma", to the condition that V0\R is "correctable" in the error correction sense with respect to AT (E(R)). See Appendix A for further details. 18 A contraction between two indices refers to a summation over that index in both tensors, e.g. for two two-legged tensors Mij and N kl , contracting the first index of the former with the second of the latter would give i MijN ki . 19 Such as j and k in the example of the previous footnote.
... Figure 6: A tiling of the hyperbolic plane with a cutoff labeled by l. Increasing l by one amounts to adding an additional "layer" of pentagons.
In our context, legs are generally identified with corresponding Hilbert spaces. For example, a code encoding a single qubit into five qubits can be represented as a six-legged , with one input leg and five output legs. This is defined implicitly by the encoding isometry V : according to some choice of basis for each individual Hilbert space. In this way, we can identify the leg of M indexed o 2 with the Hilbert space of the second physical qubit, and the leg indexed by i with the logical Hilbert space.

Example with unconstrained Bulk: the HaPPY code
The first and most common example of a holographic code is the celebrated HaPPY code introduced in [5]. We describe it here, although we do not go in depth into its structure except as necessary to see how it fits into our definition of a holographic code. We then discuss the global/global symmetry duality it exhibits and the mystery it presents. The specific family of HaPPY codes we discuss here requires two main ingredients: 1) a uniform pentagonal tiling of hyperbolic space with a radial cutoff, see Fig. 6, and 2) a 6-legged so-called perfect tensor. The code is constructed by contracting many copies of the perfect tensor in a manner which mimics the tiling, see Fig. 7.
To show that such a HaPPY code satisfies our definition, we first construct the corresponding planar graph with labelled dangling edges (Λ HaPPY = (V, E), α). Each input leg (e.g. those in red in Fig. 7) is assigned a vertex labeled 1, while each output leg (e.g. those in white in Fig. 7) is assigned a vertex 20 labeled 0 . Two vertices labeled 1 are connected by an edge if the tensors of the legs they are assigned are contracted together. A vertex labeled 1 and a vertex labeled 0 are connected by an edge if the legs they are assigned belong to the same tensor.
In this case, the Bulk system is unconstrained, so T = (U, 1). In the U = (V 1 ∪ E, {H v∈V 1 } ∪ {H e∈E }) system, for all e ∈ E we have that H e is trivial since no degrees of freedom are associated to edges in the HaPPY code. For v ∈ V 1 we have that H v is taken The red dot legs are treated as inputs, and the legs terminating in a white dot as outputs.
Legs which terminate at tensors on both sides are refereed to as "virtual legs". (This and similar subsequent figures are adapted from those in Ref. [5]).
to be the Hilbert space of the input leg that v is assigned to, in this case a qubit. For the Boundary system, it is left only to specifyH v for v ∈ V 0 , which is identified with the Hilbert space of the output leg that v is assigned to. The isometry V is the HaPPY code itself. Figure 8 depicts V as a map from the Bulk to the Boundary while abstracting away the internal structure of the tensor network.
The entanglement wedge E(R) ⊆ V 1 ∪ E of a Boundary region R ⊆ V 0 is given by the greedy entanglement wedge algorithm, defined in Ref. [5], and which we review here in terms of the language we have defined. To construct it, one initializes E(R) to contain just the dangling edges connecting to the Boundary region R. We then iterate the following procedure. For each vertex labeled 1 not included in the entanglement wedge, check the number of incident edges already included in the entanglement wedge. If it is least half of its total number of incident edges (at least three in this case), then add that vertex and every non-dangling edge it participates in into E(R). Repeat this process until none of the remaining vertices labeled 1 satisfy this criterion. It is argued in Ref. [5] that the order of adding vertices does not matter, and so this gives a uniquely defined algorithm. Furthermore, by the properties of perfect tensors, it is guaranteed that an operator acting in the entanglement wedge can be reconstructed on the starting Boundary region as a codespace-preserving operator (i.e. one commuting with the projector onto the image of the isometry), so A E(R) = A T (E(R)).
This map qualifies as near-boundary probing, which we argue as follows. When adding new vertices, only non-dangling edges are added; so the set of dangling edges in E(R) does not change from the initial conditions, thus the first point is satisfied. Secondly, any included vertex must be connected to R by some path of in E(R) ∪ R, which can be argued as follows: start at the vertex in question. If it is connected to a dangling edge, we are done. Otherwise move to the neighboring vertex which was earliest to be included by the algorithm. Since every included vertex either is connected to a dangling edge or neighbors a vertex that was included earlier, this eventually reaches a vertex connected by a dangling edge to R. Finally, the third requirement is satisfied because the set of non-dangling edges included contains exactly those that connect to included vertices. Furthermore, the "complement" map R → E(R c ) c ∪ Ext E(R c ) is also near-boundary probing. The first requirement follows from the same reasoning as above (noting that Ext E(R c ) does not contain any dangling edges). The third requirement follows from the inclusion of Ext E(R c ). The second requirement is more subtle, but can be argued by contradiction. Suppose it does not hold; then there is a site v ∈ V 1 that is excluded from the entanglement wedge of R c but has no path to the boundary contained in E(R c ) c . Then v is contained in some region S ⊆ E(R c ) c that is fully surrounded by vertices in E(R c ). But any region S of a hyperbolic pentagonal tiling that doesn't extend to the Boundary must contain at least one vertex with three edges on the boundary of S due to the negative curvature of the tiling. That vertex should have been included in the entanglement wedge E(R c ) by the greedy algorithm; thus we have a contradiction.
Besides satisfying the definition of a holographic code, the HaPPY code exhibits another feature: a global/global symmetry duality. A Bulk operator that is a product of X operators on every input leg is implemented on the Boundary system by an operator that is a product of X operators on every output leg. 21 This can be seen from the fact that each perfect tensor itself has the same global/global duality with respect to its input and outgoing legs, or in other words each perfect tensor is stabilized by the action of X on all legs (see Ref. [19] for a pictorial argument). This together with the identity operators make a Z 2 global/global symmetry duality. This global symmetry is somewhat mysterious, because, as we discuss in Section 5.3, arguments from Ref. [28] appear to imply it is impossible, and the resolution of this paradox in Ref. [21] leaves an unexplained difference between AdS/CFT and the HaPPY code. In the same section we discuss where this difference comes from.

Example with gauge constrained Bulk: the LOTE code
We now discuss an example of a holographic code with a Z 2 gauge constrained Bulk, which we dub the "gauged LOTE" code 22 . We give a summary of the code, show explicitly how it is constructed, and finally, show how it satisfies our definition of a holographic code. We then comment about the symmetry dualities it exhibits. In Section 5.5 we give a generalization to finite groups and an approximate version for compact Lie groups.
Despite its great success, the HaPPY code fails to capture many of the features of AdS/CFT. One such feature is the fact that some Bulk degrees of freedom can be recovered on both a Boundary region and its complement. This circumvents the no-cloning theorem because these degrees of freedom are classical, or more precisely only a central (i.e. abelian) algebra is associated to them. To remedy this, Donnelley et. al. introduced in Ref. [7] a modification of the HaPPY code which we refer to as the LOTE code, that 1) gives the edges non-trivial Hilbert spaces and 2) has the property that an edge sitting on the boundary of some entanglement wedge (i.e. only one of its vertices is included in the wedge) has a central sub-algebra that can be reconstructed on the corresponding Boundary region and (often) 23 its complement as well. Although the Bulk system clearly has the structure of a pre-gauging Hilbert space, the authors stopped short of considering gauge symmetries. We now take a step further and impose gauge constraints on the Bulk, resulting in the gauged LOTE code. As we see in section 5, this code exhibits additional properties that illuminate aspects of symmetries in AdS/CFT and offer a new method to build covariant codes.
First, we provide an explicit construction of the (ungauged) LOTE code introduced in Ref. [7]. The first step is to "stack" 6 copies of the HaPPY code, and to use the same graph 21 This is also true of Z operators and together they generate a unitary representation of a larger group (that is projective on each site). There are also further symmetries coming from Clifford operators, see Ref. [19]. Here we ignore these additional symmetries so we can deal with the simpler group Z2. 22 As we soon explain, it is modified from the original "LOTE" code [7], which we refer to by an acronym for the title of that paper. 23 This is not always true because the HaPPY code also fails to perfectly capture the "complementary recovery" property of AdS/CFT, which is E(R c ) = E(R) c for any choice of R. However for many choices of R this still holds.
Λ HaPPY as defined in 4.3. Initially, we identify the Hilbert spaces for each component of this graph to just be six copies of the corresponding Hilbert spaces from HaPPY -each Bulk vertex v ∈ V 1 and Boundary vertex v ∈ V 0 is associated with Hilbert spaces consisting of six qubits, while edge Hilbert spaces are taken to be trivial for now. To introduce nontrivial Hilbert spaces for each edge, we now shuffle some of these assignments around as follows. For each Bulk vertex v ∈ V 1 , and for each of its neighboring Bulk vertices v ∈ V 1 , one leg from each is combined to form an input leg associated with the corresponding edge (v, v ) or (v , v). This is done by contracting the two legs with the so-called "copying tensor" -the conjugate of the isometry |i → |i |i , i ∈ {+, −}, see Fig. 9. For Bulk vertices that do not connect to any dangling edges, only one of the six input legs remains after this procedure has assigned the other five to all neighboring edges. How the legs are assigned is arbitrary -for each vertex, the legs from any of the six layers can be arbitrarily distributed to the six assignments, namely five connections to adjacent copying tensors and one assignment to remain as a vertex leg.
The procedure is slightly more complicated for Bulk vertices v ∈ V 1 connecting to dangling edges. In HaPPY, such vertices have only one or two neighboring Bulk vertices -see Fig. 7. After assigning one leg to be the input leg for H v , this leaves either three or four unassigned legs. Instead of using the copying tensor, we associate these legs directly with the Hilbert spaces of the adjacent dangling edges, H e with e ∈ E 0 . We now deviate from the construction in Ref. [7] in a small and superficial way. In order to make the entanglement wedge the same as the one used for HaPPY, we want that a Bulk dangling edge H e be reconstructable on the Boundary on H v 0 alone, with v 0 being the Boundary vertex connected to the dangling edge e. However, in the code's current state, reconstruction of H e on the Boundary must use the reconstruction properties of the tensor at the adjacent Bulk vertex to implement it on three Boundary vertices (i.e. v 0 and two more). This can be fixed using a minor reshuffling of the assignments of output legs to vertices in the Boundary system. Specifically, for each vertex v 0 ∈ V 0 , consider the adjacent vertex v ∈ V 1 to which it is connected by the dangling edge e = (v 0 , v). The input leg associated to H e belongs to a unique layer in the stack, in that it was originally H v for that layer of HaPPY. Thus H e can be reconstructed on the set of all output legs neighboring v in that layer. Thus, these legs should all be reassigned toH v 0 , so that they can be used to reconstruct the input leg at H e as we desire. By doing this for all vertices in V 0 one can guarantee the desired reconstruction properties. We stress that this reshuffling of labels is unimportant to the central points of the paper; if we did not do so then each dangling edge leg would just be reconstructed on O(1) Boundary vertices instead of a single one. We choose to include it in order to align as closely as possible the algebra associated to an entanglement wedge, A E(R) with the algebra of physical operators supported on that wedge, A T (E(R)).
This defines the ungauged/original LOTE code. We now argue that the Bulk of the ungauged LOTE code has the structure of a Z 2 pre-gauging system as defined in Definition 2.5. It has a graph, Λ HaPPY , Hilbert spaces associated with vertex degrees of freedom (via the input legs), and Hilbert spaces associated to each edge that are isomorphic to L 2 (Z 2 ) (i.e. they have dimension 2). All that remains is to equip the vertex degrees of freedom with a global symmetry transformation. This can be any unitary representation  of Z 2 , i.e. U v (0 ∈ Z 2 ) = 1, and U v (1 ∈ Z 2 ) any unitary squaring to 1.
Having constructed the ungauged LOTE code and shown that its Bulk system has the structure of a Z 2 pre-gauging Hilbert space, we are ready to define the gauged LOTE code. For the logical constrained system we take T = (U, Π GI ) with graph Λ HaPPY , with U the Bulk system of the ungauged LOTE code described above, and with Π GI the projector onto the gauge-invariant Hilbert space as defined in Definition 2.7. The construction of that projector requires an oriented graph, whereas our definition of holographic codes did not require directions to be assigned to each edge; this orientation can be chosen arbitrarily so long as dangling edges e ∈ E 0 point from the Boundary to the Bulk, i.e. take the form This gauge constraint is essentially the only difference from the original LOTE code: we use the same Boundary system; we use the same isometry but with the domain restricted to gauge-invariant states; and we use the same entanglement wedge map as defined for the HaPPY code in the previous section.
Since the entanglement wedge map is unchanged, it is still near-boundary probing. For now, we choose the entanglement wedge algebra to be generated by the entire algebra of physical (i.e. gauge-invariant) operators supported on the interior of the entanglement wedge (as it must be), as well as the central flux operators on the boundary, that is, those of the form U L e (g) with g in the centre of G and e on the boundary of E(R). Note that this includes any gauge-invariant operators supported on E(R) that can be generated from Wilson loops, NGC-to-NGC Wilson lines, NGC to charge Wilson lines, and central flux operators. We also conjecture that the entanglement wedge algebra can be chosen instead to simply be the entire algebra of physical operators supported on E(R).
First, we outline the reconstruction of arbitrary operators in the interior of E(R), before discussing central flux operators on its boundary. Asymptotic gauge transformations are clearly recoverable just on the V 0 whose edge they act on, because of the superficial degree of freedom shuffling we did above. For larger boundary regions, reconstruction of E 1 edge degrees of freedom makes use of the fact that an isometry such as the copy tensor can always implement an operator O on its input system via an operator V OV † on its output system. Thus components of gauge-invariant operators supported on inputs to copying tensors can be reconstructed as operators on the output legs. Then these output legs connect to the tensors located at the two adjacent vertices, so the operators can again be reconstructed using properties of perfect tensors. If the initial edge leg and both its adjacent vertices are in the entanglement wedge, then this allows for reconstruction of the operator on R. With this reasoning we can conclude that the the entanglement wedge algebras contain all gauge invariant operators supported on the interior of the entanglement wedge.
For operators supported on the boundary of E(R), this procedure would in general result in an implementation with support on a vertex just outside the entanglement wedge. However, the only obvious non-trivial gauge-invariant operator supported on these boundary edges can also be reconstructed, namely the central flux operators U L e (1 ∈ Z 2 ) = U R e (1 ∈ Z 2 ) = X. This is because although the implementation defined by O → V OV † generally has support on both output legs, in special cases one can exploit redundancy in this reconstruction to implement an input operator via an output operator localized to one subsystem. Because of the way that we constructed the copy tensor, for example, an X operator on the input can be implemented via either X ⊗ 1 or 1 ⊗ X on the output. Thus the X operator defined above can always be chosen to be implemented on the neighboring vertex that lies inside of the entanglement wedge.
As a final note, we would like to stress that the gauge symmetry exhibited by the Figure 10: Depiction of the main part of the argument that holographic codes with full gauge-invariant Bulks automatically exhibit a gauge/global duality. The green dots represent the operators constituting the asymptotic symmetry transformation on the T system. They are each in an entanglement wedge of a small Boundary region and thus can be reconstructed as a product of operators along the T system, depicted by the small blue rectangles, forming a global symmetry transformation. This part of the proof appears also in the proof of the same duality in AdS/CFT as shown in Ref. [28].
gauged LOTE code is in no way related to the global/global symmetry dualities exhibited by HaPPY. As we see in the following subsection, this code does indeed display a Z 2 gauge/global duality, but this is a coincidence; at no point do we rely on the global/global duality in HaPPY. In fact, we could have constructed the gauge/global duality using a different idempotent unitary operator to emphasize this fact, but we chose the X operator (and associated copying tensor) for simplicity. Later, we also show how to generalize this construction to build Bulk systems gauged with respect to arbitrary finite groups, and these are certainly unrelated to the HaPPY Z 2 global/global duality.

Full gauge-invariant Bulk =⇒ gauge/global duality
We now show that if the Bulk system of a holographic code has a full gauge-invariant Hilbert space, i.e. Π = Π GI 24 , then that code automatically exhibits a gauge/global duality. We only require the bare-bones assumption that local asymptotic gauge transformations are recoverable, i.e. that the entanglement wedge algebra A E(R) of a single-site Boundary region R = {v 0 } includes local operators on the adjacent edge e v 0 . This proof is adapted from a similar proof given in [28] for AdS/CFT. We give an intuitive sketch of the proof, and then give a formal statement and proof.
The sketch of the proof proceeds as follows (see also Fig. 10). Consider an asymptotic symmetry transformation in the Bulk. It consists of a product of local asymptotic gauge transformations, which act only all dangling edges, as there are no Bulk degrees of freedom associated with vertices in V 0 . Because the Bulk has a full gauge-invariant Hilbert space, each local asymptotic gauge transformation in the product is also a physical operator, as it commutes with each local gauge constraint 25 . We now need to make the mild assumption that each of these operators can be reconstructed on the Boundary vertex to which the edge it lives on is attached. Reconstructing all of these operators in this way gives a product of operators along single site regions of the Boundary system. It can be shown that these operators are unitary and form a representation of the same group, and thus the code exhibits a gauge/global duality. This is an adaptation of the proof strategy employed in Ref. [28] to show that in AdS/CFT a Bulk long-range gauge symmetry implies a Boundary global symmetry. Other than explicit realization in a toy model, the difference in the proofs is how we show that the reconstructed operators can be chosen to be unitary representations.  26 , with e the unique dangling edge incident to v 0 . By the definition of a holographic code, since

Proof. Recall that
can be chosen to be unitary and by Lemma A.4 it can also be chosen to be a representation. Thus {Ũ v 0 (g)} is a global symmetry transformation of the type whose existence was to be shown.

The gauging isometry applied to holographic codes
Having defined and examined the gauging isometry, we turn to its application in constructing, and mapping between, holographic codes with various symmetry dualities. We show with a simple application of the gauging isometry that any holographic code with a global/global duality can be made into one with a gauge/global duality, and vice versa. We then use these results to make several observations about holographic codes and AdS/CFT. First, we discuss connections between this work and Ref. [28], in particular we use our results to gain a better understanding of why holographic codes seem to violate their no global symmetries result, and point out a sufficient condition for holographic codes to exhibit gauge symmetry. We then argue that our toy models can be seen as a rudimentary model of time evolution, and can be used to illustrate the relationship between metric fluctuations and approximate error correction in AdS/CFT. Finally, we explicitly construct a holographic code with a global/global duality for an arbitrary finite symmetry group, as well as an approximate version for any compact Lie groups.

Gauging: global/global =⇒ fixed sector gauge/global
We now show that given a holographic code with a global/global symmetry duality, one may "gauge" its Bulk via the gauging map to obtain a holographic code with a fixed sector 25 This would not be the case if the Bulk system were further constrained to a fixed-flux sector, since restricted asymptotic symmetry transformations generically mix flux sectors 26 Notice this would not be true if T were only a flux-free sector since an asymptotic symmetry transformation restricted to act on only a subset of V0 generically changes the flux sector.
gauge/global symmetry duality with the same symmetry group. We first give an intuitive sketch of the argument in the next paragraph and Fig. 11. We then give a formal proof in Theorem 5.1. Finally we give an example using the HaPPY code in Example 5.2. The construction of the gauge/global code is accomplished by composing the inverse of the gauging map with the encoding isometry of the given holographic code, see Fig. 11a. The resulting map inherits the entanglement wedge recovery properties of the original encoding isometry because all ungauged operators in an entanglement wedge may be implemented by gauged ones supported strictly within same entanglement wedge, see Fig. 11b. Lastly, the resulting map exhibits a gauge/global symmetry duality because the inverse of the gauging map "converts" a Bulk global symmetry into an asymptotic symmetry transformation using its own gauge/global duality, see Fig. 11c. We present this more formally now.  Then there exists a holographic code (T , Λ, α, B, E, {A E(R) }, V ) whose encoding isometry V exhibits a gauge/global duality, and with logical Bulk system T = (U , Π F F ) such that T is the flux-free sector of the system obtained by gauging (T , G, U v∈V ).
Proof. The proof is carried out by constructing the promised holographic code from the given one. Let Π GI H Λ denote the gauge-invariant Hilbert space of the system obtained by gauging (T , G, U v∈V ) as per Definition 2.7, and let G : H Λ → Π GI H Λ be the gauging map from Definition 3.1. Since G is invertible on the flux-free sector via Theorems 3.2 and 3.7, the map V ≡ V • G † isometrically encodes the Hilbert space of T into that of B. Furthermore, this map exhibits a global/gauge duality as per Definition 2.10 since VG † A V 0 (g) = VU V (g)G † =Ũ V 0 (g)VG † . It remains only to show that we can choose A E(R) to include A T (Int E(R)), i.e. any operator O ∈ A T (Int E(R)) can be reconstructed on R ⊆ V 0 . Since O is supported on Int E(R), we can use Theorem B.4 with Γ = Int E(R), to conclude that there exists an operator O supported on the vertices of E(R) such that G † O = OG † . The fact that Γ satisfies the assumptions of Theorem B.4 follows from our requirement that R → E(R c ) c is near-boundary probing, applied to R c ; namely, it guarantees that after removal of E(R), all Bulk vertices remain path-connected to sites in R c . Now, by definition of a holographic code there must existÕ ∈ A B (R) that preserves the image of V such that VO =ÕV.
We can show an example of this construction in the context of a HaPPY code.    it exhibits a global/global symmetry duality with group G = Z 2 . Thus we can apply the above reasoning to gauge HaPPY with respect to this Z 2 symmetry -that is, to produce a holographic code with a Z 2 fixed sector gauge/global duality.

Comment on entanglement entropy
A primary motivation for including gauge-like degrees of freedom "living on the edges" in the LOTE code from Ref. [7] was to capture higher order corrections to the entanglement entropy than was possible in HaPPY. In this subsection we examine the entanglement entropy of gauged HaPPY and find that no similar correction term linear in the bulk state appears, as the contribution to entanglement entropy from edge degrees of freedom on the gauge invariant Hilbert space is stripped off as the bulk state passes through the ungauging map.
The entanglement entropy of a holographic code constructed from the above theorem is most easily understood by viewing the gauged code as a conventional holographic code with encoding isometry V with the ungauged state G † |ψ Bulk in the Bulk, where |ψ Bulk is a gauge invariant Bulk state within the zero flux sector. For simplicity consider a decomposition of the Boundary into R, R c with respective Bulk entanglement wedges E(R), E(R) c , i.e. satisfying complementary recovery. This is realized by certain regions for example in the HaPPY code using the greedy entanglement wedge [5,19]. The entanglement entropy of the boundary region R is where ρ = G † |ψ Bulk ψ Bulk | G is the ungauged Bulk state, and γ R is the RT surface for R, counted in units of how many legs with bond dimension χ are cut in the holographic tensor network. From this formula we see that the Bulk gauge fields do not directly contribute to the boundary entropy as only the ungauged Bulk state appears in Eq. (5.1). More generally when complementary recovery is not strictly satisfied, as is ubiquitous in exact holographic codes, there may be some residual region not contained within the entanglement wedge of R or R c which leads to a further correction. In Appendix C of Ref. [53] a formula was derived for the entanglement entropy of a gauged state in terms of the ungauged state and a state independent perimeter term (due to the gauge degrees of freedom), assuming the gauging map is abelian and has no NGC vertices. The explicit formula is , and |∂A| counts the number of edges between A and A c . In this case the entropy of the ungauged state clearly differs from the entropy of the gauged state by a term that is proportional to the boundary. This boundary term is of a different nature to the boundary term appearing in the calculation of entanglement entropy in Ref. [7] as it does not depend on the Bulk state. There is an additional complication, as the simple formula above does not straightforwardly generalize to the family of gauging maps considered here due to the presence of NGC vertices. Thus, we do not draw an explicit comparison with the entropy decomposition found in Ref. [7] for the gauging maps we consider.

Ungauging: gauge/global =⇒ global/global
We can also show a result that mirrors Theorem 5.1, by constructing a code with a global/global duality given a theory with either a fixed sector or full gauge/global duality. The intuitive picture is similar, and is shown in Fig. 12. We prove the statement formally in theorem 5.3, and exemplify it with example 5.4. Proof. Let G : H Λ → ΠH Λ be the gauging map for the Hilbert space H Λ associated with system T . The map W = W • G isometrically encodes the Hilbert space of T into that of B. W has a global/global duality since WGU V (g) = WA V 0 (g)G =Ũ V 0 (g)WG, and by assumption,Ũ V 0 (g) preserves the image of W. In the last equation, we used that if Π = Π GI or Π F F , the asymptotic symmetry transformation A V 0 is a physical operator and thus can be reconstructed on the Boundary.
It remains to show that this construction is a valid holographic code, i.e. for any Boundary region R ⊆ V 0 any operator O ∈ A T (Int E(R)) can be reconstructed on R. In this case, the interior restriction is irrelevant as there are no edge degrees of freedom. By Example 5.4. The gauge/global code obtained by gauging the HaPPY code, as in example 5.2, can be ungauged to re-obtain HaPPY and its Z 2 symmetry.
Example 5.5. Consider the gauged LOTE code. It is a holographic code with a constrained Bulk system, whose Hilbert space is one obtained by gauging a system with global symmetry, and whose encoding isometry, by Theorem 4.4, exhibits a gauge/global duality. Thus it can be ungauged to obtain a system with a global/global duality.

Comment on entanglement entropy
Let us briefly discuss what can be said about the entanglement entropy of boundary regions in a code constructed via Theorem 5.3. If one gauges and ungauges in succession, i.e. applies Theorem 5.1 and then Theorem 5.3, the entropy simply has the same bulk/boundary relationship as in the original holographic code (note with the boundary conditions we pick there is no projector onto the symmetric sector due to gauging and ungauging i.e. G † G = 1). For a less trivial example, consider a holographic code with gauge/global duality produced by projecting a Bulk pre-gauged Hilbert space onto the gauge invariant subspace, such as gauged LOTE. The holographic encoding isometry of the LOTE code [7] is given by composing six copies of the HaPPY code isometry, V, with an isometry associated to each edge of the Bulk, W ⊗|E| illustrated in Fig. 9 (b), to form a combined encoding isometry V ⊗6 W ⊗|E| . In what follows we allow each V to be a stack of multiple HaPPY codes to achieve the bond dimension required to support the group representations of a finite group G we consider.
For simplicity of presentation, in this subsection we choose the edge isometry to be the group multiplication tensor is a maximally entangled state. The tensor W on edge e is oriented such that left multiplication moves through to act on the vertex e − and right multiplication on e + . Projecting the bulk of LOTE onto the gauge invariant subspace produces a holographic code with encoding map V ⊗6 W ⊗|E| Π GI that exhibits gauge/global duality. Ungauging the bulk produces a new code with encoding map V ⊗6 W ⊗|E| G that exhibits global/global duality.
The entropy of a boundary region R that satisfies complementary recovery in the ungauged LOTE code is similar to Eq. (5.1), where χ measures the total bond dimension of the stack of HaPPY tensor networks and for ρ Bulk the state on the ungauged Bulk Hilbert space. The prefactors |G| |V | are included to correctly normalize the state. We point out that the |γ R | ln |G| term in the entropy can be absorbed into the RT term by making the coefficient (ln χ + ln |G|), which reflects an increase in the bond dimension of the encoding isometry due to the gauging map G.
To explain the decomposition of the S([ρ Bulk ] E(R) ) term on the second line of Eq. (5.6) it is useful to first rewrite the W ⊗|E| G part of the encoding map by making use of the properties of W introduced above in Eq. (5.4) for where Π v acts on the six legs of the HaPPY copies at vertex v in the Bulk. Next, we note where v e denotes the vertex in E(R) that is adjacent to e, and Π E(R) = v∈E(R) Π v . We have used Eq. (5.10) and successive applications of Φ| U L/R (g)⊗1 |Φ = δ(g) starting from the rough boundary conditions to fix all the group elements from Π GI acting on vertices within E(R) c to identity. We now make use of the equality which follows from the observation above that all group elements from Π E(R) s appearing on the LHS are fixed to the identity by |Φ states. To finally arrive at the desired decomposition of the bulk entropy term

Connection to Harlow-Ooguri
So far we have frequently discussed holographic codes with global/global symmetry dualities. This notion may cause alarm to those familiar with the results of Ref. [28], which show that AdS/CFT cannot exhibit such dualities. Adding further to the confusion is that these results appear to rely only on precisely those aspects of AdS/CFT that holographic codes, which certainly can exhibit such dualities, manage to capture. In Ref. [21] the subtle but key distinction between the two was pointed out: for holographic codes, the action of Boundary global symmetries on restricted regions need not preserve the code subspace. We now argue that this distinction is potentially superficial, and propose a more complete criteria by which to judge toy models which deserves further exploration. We first clarify an additional subtlety in the distinction between AdS/CFT and holographic codes with global/global dualities. We then use the gauged LOTE code to point out that a holographic code displaying a global/global duality may just mean that its bulk is overly restricted. We proceed by arguing that any global/global holographic code is in fact overly restricted, and that there ought to be a way to lift its Bulk to a full gauge-like symmetry so that a restricted global symmetry keeps it in the code space. We discuss a way to do this for the HaPPY code, proposed in Ref. [7], that unfortunately destroys the entanglement wedge reconstruction property. This leads us to pose the question: when is it possible to lift the Bulk of a holographic code to a full gauge invariant Hilbert space while maintaining its holographic properties? Finally, we give a sufficient condition for holographic codes to both display Bulk gauge symmetry and to have restrictions of the Boundary global symmetry preserve the code space.

Global/global dualities in holographic codes are benign
The additional subtlety mentioned above is that the restricted action is only defined up to local operators supported on a neighborhood of the domain walls, that cancel out when restricted actions are multiplied to form a global symmetry action. To state this more precisely we need to introduce the notion of symmetry domain walls for holographic codes.
Definition 5.6. A collection of g-domain walls of a global symmetry on the Boundary of a holographic code with encoding isometry V are created at the location ∂R by a partial symmetry action v∈R U v (g) on a subregion R of the Boundary. This defines a new holographic encoding map v∈R U v (g) V which contains g-domain walls on ∂R.
Definition 5.7. The superselection sector within a sufficiently small neighborhood N of a g-domain wall at ∂R is the equivalence class Remark 5.8. If a decomposition of the Boundary into disjoint regions R i is fixed, the restricted symmetry actions U R i (g) = v∈R i U v (g) can be redefined up to any boundary unitaries D ∂R i (g) that preserve the global symmetry condition Such redefinitions clearly preserve the superselection sectors of the domain walls created by restricted symmetry actions The freedom in redefining the domain wall was effectively used in Ref. [28] to argue that the restricted action of any continuous symmetry (or a finite group symmetry embedded into a continuous group) can be made code space preserving because the domain wall can be smeared out so as to become an arbitrarily low energy excitation, which, in AdS/CFT means it can be added to the code space if not already contained. In holographic codes with global/global dualities such as HaPPY, the symmetry domain walls lie in nontrivial superselection sectors, i.e. no redefinition of the domain wall by multiplication with a local operator can return the domain wall to the codespace. This is guaranteed by the arguments in Ref. [28] -if such a redefinition were possible, such that the restricted symmetry was codespace-preserving, then the arguments presented there would apply and rule out the possibility of a global/global duality, which is inconsistent with the explicit presence of such a duality in HaPPY [19].
The global/global code we have constructed from the gauged LOTE code evades this theorem for precisely the same reason -its restricted symmetry actions are not codespacepreserving. However, by looking "under the hood" of this model we see that this is only true in a subspace, and that the full ambient Hilbert space does not violate the Harlow-Ooguri theorem. More precisely, the global/global symmetry appears only when we restrict the Bulk system to a fixed-flux sector. This causes the action of a restricted global symmetry transformation to leave the codespace because such an action is mapped to restricted asymptotic symmetry transformations in the Bulk, and these generically change the flux sector from flux-free to an NGC-flux sector (see Section 3.6). As we have seen, we can ungauge these flux sectors using a gauging map tailored to them, and recover a different holographic code. This is consistent with the fact that a restricted boundary global symmetry action can be viewed as a change of basis, and thus should not change the entanglement wedge map. If we return to the full gauge theory description of the bulk (i.e. one with constraint Π GI rather than Π F F ), then a restricted boundary global symmetry action preserves the codespace because it now includes all flux sectors.
Interestingly, we can conclude from this that it is impossible to isometrically ungauge a full gauge invariant Hilbert space using a map with the same properties as the original gauging map -namely, being an isometry, exhibiting a gauge/global duality, and preserving the locality of vertex operators. Such a map could be composed with HaPPY to create a holographic code with a global/global duality that does exhibit all the properties necessary to use the Harlow-Ooguri theorem, meaning it cannot have a global/global duality, which is a contradiction. In fact, this allows us to draw a general conclusion about gauge theory that is independent of holographic codes: there is no general map that isometrically maps a system with gauge symmetry into an unconstrained system such that the map exhibits a gauge/global duality and preserves the locality of operators supported on the vertices.
It is natural now to wonder whether the global/global duality of the HaPPY code really just comes from an over-restriction of the Bulk. After all, as we discuss in the next section, even in AdS/CFT there emerges a global/global duality at sufficiently low energies. 28 For any global/global holographic code, it still holds that the action of restricted global symmetries on the boundary takes the code out of the codespace, resulting in another holographic code with the same entanglement wedge map as the original. So inside of the code there is secretly something resembling multiple flux sectors. In the case of HaPPY, it is possible to lift the Bulk to a gauge invariant like system so that such an action preserves the code space. This is done by inserting the copying tensor described in Section 4.4 directly in between the virtual edges of the tensor network, as explained Ref. [7]. However, in this lifted HaPPY code entanglement wedge reconstruction no longer holds outside of the fixed flux sectors, in contrast with the gauged LOTE code and AdS/CFT. We see then that before dismissing global/global holographic codes as irredeemably inaccurate models of AdS/CFT, it can be constructive to first ask whether or not it is possible to lift their Bulk to a gauge-like theory which maintains entanglement wedge reconstruction and has boundary domain walls preserving the codespace. We leave the characterization of conditions under which this is possible for future work.

A sufficient condition for gauge symmetry
For the remainder of this subsection we focus on domain walls created by partial global symmetry actions within the Bulk and on the Boundary, and the consequences for the holographic encoding map when they can be created and removed by local operators. 28 That is, at low energies the emergence of bulk locality makes time evolution look like a spacetime version of a global/global duality (which still violates Harlow-Ooguri), albeit only approximate due to metric fluctuations Recall that the arguments of Ref. [28] imply a contradiction if we have a holographic isometry map V with an unconstrained Bulk Hilbert space satisfying both the global/global duality conditionŨṼ (g)V = VU V (g) and that the restricted symmetry actionŨR on a regioñ R preserves the codespace, potentially after multiplication with a domain wall operatorD ∂R . It is further argued in Ref. [28] that in AdS/CFT with these assumptions the bulk must support a gauge symmetry. It would certainly be interesting to establish a similar result in the setting of holographic codes satisfying the above two symmetry conditions. However, it is unclear that giving up the unconstrained Bulk assumption is the only way to resolve the tension, it could also be interesting to look into whether abandoning the symmetry conditionŨṼ (g)V = VU V (g) while maintaining the holographic structure of the code is possible. We leave these questions to future work and instead identify a natural sufficient condition on a holographic map, that we call locally removable domain walls, that implies the two symmetry conditions introduced above. We go on to show that this condition automatically ensures the bulk is constrained to be invariant under local symmetries that we suggest can be interpreted as gauge symmetries.
We first define symmetry domain walls in the Bulk of a holographic map analogously to the Boundary definition above.
Definition 5.9. A collection of g-domain walls of a global symmetry in the Bulk of a holographic code with encoding isometry V are created at the location ∂R by a partial symmetry action v∈R U v (g) on a subregion R of the Bulk. This defines a new holographic encoding map V v∈R U v (g) which contains g-domain walls on ∂R.
Remark 5.10. Part, or all, of ∂R may coincide with the Boundary, we decompose it as ∂R = (∂R) ∂ (∂R) • for (∂R) ∂ the portion of ∂R on the Boundary and (∂R) • the portion in the Bulk. See Fig. 13 for an illustration.
Remark 5.11. In HaPPY for the Z 2 symmetry generated by X operators the domain walls can be identified explicitly as X operators acting on the virtual and/or Boundary legs of the tensors on ∂R. A similar property holds for tensor network holographic codes satisfying a local symmetry condition such as in Ref. [54][55][56][57][58], but our definition above does not require a tensor network structure.
Domain walls of the Bulk symmetry that coincide with the Boundary can be removed by acting on the boundary. In particular the domain wall of the global action U V in the bulk covers the whole Boundary and can be removed by the global actionŨ † V on the Boundary. To see this notice that creating the domain wall from the bulk and then removing it on the boundary preserves the original encoding mapŨ † V VU V = V. Hence the Boundary symmetry appears as a domain wall of the bulk symmetry, and consequently domain walls of the Boundary symmetry correspond to twist defects of the Bulk symmetry, i.e. locations where the bulk domain wall terminates, see Refs. [56][57][58] for a discussion of such twist defects in tensor networks. For a restricted Bulk symmetry action v∈R U v (g), any component of its domain wall that lies on the Boundary can be removed by the restricted Boundary symmetry action v∈(∂R) ∂Ũ v (g), up to some operator in the neighborhood of the twist defect at ∂(∂R) ∂ on the Boundary, see Remark 5.8. Figure 13: The symmetry action U R within a Bulk region R introduces a domain wall along a neighborhood of its boundary. A symmetry action U R in a Bulk region R along with a Boundary symmetry actionŨ (∂R) ∂ where R coincides with the Boundary introduces a domain wall along a neighborhood of the boundary (∂R ) • and a Bulk defect (or Boundary domain wall) in a neighborhood of ∂((∂R ) ∂ ).
Next we explore the consequences of a local symmetry condition that requires any domain wall in a holographic map to be removable by some operator acting within a neighborhood of the domain wall, this is analogous to the domain walls lying in trivial superselection sectors.
Definition 5.12. A holographic map V satisfying VU V =ŨṼ V has locally removable domain walls if for any restricted symmetry action v∈R U v (g) there exists an operator D • (g) supported in a neighborhood of the bulk domain wall (∂R) • and an operator D ∂ (g) supported in a neighborhood of the boundary twist defect ∂(∂R) ∂ such that Remark 5.13. For the connected Bulk geometries we consider, it is sufficient to require the above condition to hold only for connected Bulk subregions that overlap nontrivially with the Boundary. By considering multiple Bulk subregions with the same Boundary overlap one can generate all purely Bulk constraints covered by the above definition.
Remark 5.14. The condition introduced in the definition above is sufficient to ensure that the domain walls of the Boundary symmetry lie in the trivial superselection sector and hence the arguments of Ref. [28] apply. It further implies that the bulk is constrained to be invariant under local symmetries that have a similar form to gauge symmetries. To see this consider Eq. 5.19 for Bulk regions that consist of single sites.
Example 5.15. The LOTE code after projection onto a gauge invariant Hilbert space satisfies the above definition, as does the modification of HaPPY via the introduction of edge copy tensors also considered in Ref. [7].
Remark 5.16. A non-example that fails the locally removable domain walls condition is the original HaPPY code. Although the domain walls for the global symmetry generated by X are simply represented by X operators on the virtual indices, there is no way to locally remove them in the bulk, as this would lead to further constraints that are not present in HaPPY. More generally, the above condition must fail for any nontrivial holographic isometry map with an unconstrained Bulk.

Analogies with gravity
We now discuss some analogies that can be drawn between the application of the gauging map to make the gauged LOTE code global/global, and two different features of AdS/CFT: time evolution, and the approximate appearance of Bulk locality. In Section 5.5 we show how to generalize the gauged LOTE code to any group G. We use this here to improve our analogies.

Time evolution
Arguably the most significant challenge holographic codes face in accurately modelling AdS/CFT is the inclusion of dynamics; specifically a dynamical duality in which the time evolution in the bulk is equivalent to time evolution on the boundary. Although proposals for such constructions exist [15,16], they fall short of obtaining desired features like having the appropriate speed of information propagation. Since AdS/CFT is a model of quantum gravity, its Bulk geometry can change with time. For low enough energy dynamics, the Bulk geometry can remain fixed but matter degrees of freedom may still undergo dynamical evolution. We now argue that the global/global code constructed by applying the gauging map to a G gauged LOTE code can be thought of as a model of a simple type of time evolution where all degrees of freedom are stuck in place. Choosing G = U (1), we can write the Boundary global symmetry transformation as v∈V 0Ũ v (g) = e −i( vH v )t = e −iH bdry t by parametrizing the elements of U (1) with t. We can do the same for the Bulk transformation to obtain a Bulk Hamiltonian composed of a sum of single site terms. Thus we have a local boundary Hamiltonian implementing a local Bulk Hamiltonian via a symmetry duality. Since nearby sites are decoupled, the degrees of freedom can not interact and are "stuck in place". Thus far this construction is not particularly new, as there already existed codes with a U (1) global/global duality (see Ref. [21]). What is new is that the time evolution comes about from an ambient gauge theory. Before applying the gauging map to the gauged LOTE code, a Boundary global symmetry transformation would implement a Bulk asymptotic symmetry transformation. The latter acts entirely on the boundary of the Bulk system. It is only by restricting the Bulk to a fixed flux sector that the transformation can act in the deep Bulk. The same thing occurs for time evolution in AdS/CFT; it only appears to act deep within the Bulk when we describe the Bulk using some local coordinates in a fixed geometry subspace (i.e. we have the appearance of Bulk locality using a "gravitational" analog of the gauging map).

Noise from metric fluctuations
Another aspect of AdS/CFT that our model illuminates is why insisting on Bulk locality results in AdS/CFT functioning as only an approximate error correcting code. In that context, the codespace consists of the Bulk ground state and states obtained by acting on it with a finite number of local operators [20]. In the ground state, a certain fixed geometry dominates in the Bulk path integral, which fixes the metric to leading order. However, a full description of the ground state includes contributions from fluctuations about this fixed geometry. When seeking a local description of the system -that is, a locally generated algebra of observables -we approximate the ground state and its excitations in the codespace by ignoring these fluctuations and considering just the fixed-geometry background. It is this approximation which results in the approximate nature of the associated code.
We can construct a conceptual toy model for this from a generalized gauged LOTE code with code isometry V GL as follows. First, we artificially introduce fluctuations by constraining the codespace from the full gauge-invariant Hilbert space to a subspace Π s that is slightly perturbed from the flux-free sector, i.e. Π s ≈ Π F F , but is still gaugeinvariant. This is done in such a way that all of states in the image of Π s are close to, but not equal to, a state in the flux-free sector (i.e. no states are left unperturbed). In a gauge constrained system, the algebra of observables is not locally generated, but for a flux-free sector this can be resolved by ungauging the Bulk. This is done by replacing the code isometry V GL with V GL • G, with G the gauging map, so that the input is now an unconstrained Bulk system. For the perturbed system, we consider instead the coding map V = V GL • Π s • G. This is only an approximate isometry, as Π s ≈ Π F F and thus Π s • G ≈ G.
That it approximately preserves entanglement wedge reconstruction follows from the fact that Π s ≈ Π F F , and since Π F F exactly commutes with gauge-invariant operators, Π s does so approximately 29 . It can be converted into an exact isometry with approximately the same reconstruction properties. For example, one way to do this is to notice that since P = V † V is close to the identity, and P is Hermitian, P should have positive eigenvalues for a close enough approximation. Thus one can use the positive square root √ P to create the exact isometry V • ( √ P ) −1 .

Building holographic codes with arbitrary symmetry dualities
Using theorems 5.3 and 4.4, we now explicitly construct a holographic code with a global/global duality for an arbitrary finite group. We then show how to modify this construction to include all compact Lie groups at the cost of making the code approximate, as it must be due to the results of Ref. [21]. Besides giving a concrete example of the theorems described above, this construction is interesting because it provides a new method for building approximate codes with U (2 n ) transversal gate sets, the first such holographic codes for n > 0.

The construction
We now construct, for any finite group G, a holographic code with global/global duality with respect to G. The construction is identical to that of the LOTE case described in Section 4.4 except in two regards. First, all vertex legs, edge legs, and legs which are to be combined on edges in the LOTE code have dimension 2. In general, we need to increase the dimension of the edge legs to be |G|, which requires increasing the dimension of the legs to be combined to some number that depends on G. The dimension of the vertex legs equals that of whatever unitary representations we choose for them. Second, we would like to generalize the copy tensor so that we retain reconstruction of central flux operators living on the boundary of an entanglement wedge. This is not necessary to build the global/global code, but we would like that the gauged version of this generalized LOTE code still allows of the reconstruction of as many gauge-invariant operators as possible (again we conjecture that our construction includes all gauge-invariant operators with support on the exterior of the entanglement wedge).
We begin by addressing the second concern. The natural choice for the generalized copy tensor is what we refer to here as the "grand-orthogonality tensor," described in detail in Ref. [60], from which we heavily base our review of it below.
Our construction of the tensor proceeds as follows: using the grand-orthogonality theorem, we can construct a unitary map between L 2 (G) and a direct sum over representations. We then embed the latter space into a larger space, that can be written as a product of two subsystems of equal dimension. This is necessary to obtain the desired reconstruction properties, namely that a central operator on the input leg can be reconstructed on either output leg. These systems are then identified with the output legs of the copying tensor.
The grand-orthogonality theorem states that for any group G, √ n r n r |G| g∈G π r ij (g) * π r kl (g) = δ rr δ ik δ jl (5.20) where r and r label unitary representations of G, with dimensions n r and n r respectively; π r ij (g) is the i, j component of the representation matrix of g for the representation r in an arbitrary but fixed basis, and π r ij (g) * is the complex conjugate of π r ij (g). We can build from π r ij (g) an isometry from the Hilbert space H r ⊗ Hr, with both components having dimension n r , to L 2 (G) via the map |i r |j r → n r |G| g∈G π r ij (g) |g .
If we take a direct sum of these maps, so that the domain is ⊕ r (H r ⊗ Hr), then using the grand-orthogonality theorem Eq. (5.20), as well as the representation theory result that r n 2 r = |G|, implies that it is a unitary map. Now, we take the conjugate of the unitary map and extend its target to (⊕ r H r ) ⊗ (⊕ r H r ) -the product of two equal-dimension subsystems mentioned above. This gives us the map W : |g → n r |G| r,ir,jr π r ij (g) * |i r r |j r r , which is an isometry of the type we need, namely from L 2 (G), the edge degree of freedom, to two factors of equal dimension.
To show that central flux operators can still be reconstructed properly, we use a special property of this tensor: that U L (g) can be reconstructed on the left factor, and U R (g) on the right one. This can be seen as follows: with a similar argument for U R . Since the central flux operators U R (g) = U L (g) for g in the center of the group, we have shown that they can be reconstructed on either side. We may now turn our attention to the first concern. From the above argument, the legs in the stack that are to be contracted need to be of dimension r n r . This can be achieved by making five codes in the stack themselves stacks of log 2 ( r n r ) and removing any extra states from the codespace. Since the six codes in the stack may now have different dimensions, one must be slightly more careful than in the construction of the LOTE code; legs from the sixth code in the stack must always be assigned to the vertex degrees of freedom, and those from the other five codes (which are themselves stacks of codes) must be assigned to the edges, rather than these assignments being arbitrary as before.
Using these two alterations to the LOTE construction we obtain a holographic code with a G-gauge-constrained Bulk. By Theorem 4.4 this code has a gauge/global duality and by Theorem 5.3 we can convert it to a code with a global/global duality. Thus we have constructed a holographic code with a global/global duality for arbitrary finite groups, or in more information-theoretic terminology, transversal gates for an arbitrary finite group.

Compact Lie groups
In order to implement our ideas for compact Lie groups, we use a truncation scheme which we argue, in principle, implements the full isometry in the appropriate limit. The tensor networks still only requires legs associated with finite dimensional Hilbert spaces. Throughout this section we are somewhat cavalier about assuming potential subtleties that appear when regularizing the δ distribution evaluated at group identity elements work out.
In this section we construct an isometry W : where Ω G is the set of all irreducible representations of G 31 . This isometry is used to construct 30 Recall that for a continuous group, L 2 [G] is a Hilbert space corresponding to Lebesgue-square-integrable real functions on G. A basis for such functions is given by Dirac delta functions for each group element, just as with real-space quantum wavefunctions spanned by states {|x }. 31 Strictly speaking we include one representative of each equivalence class of irreducible representations of the group G.
the appropriate analog of the copying tensor, which is rendered finite by simply truncating the sum over representations. Specifically we define W as a sum over maps to each representation, W = r∈Ω G W r , with W r : L 2 [G] → V r ⊗ Vr defined as where π r ij (g) are the coefficients of g in representation g as in the previous section. The adjoint is simply To verify that W is an isometry, we need to introduce two results first -the Peter-Weyl theorem, and the grand-orthogonality theorem for continuous groups. The latter is a straightforward generalization of Eq. (5.20), namely G dg π r ij (g) * π r kl (g) = δ r,r δ ik δ jl √ n r n r . (5.21) The former is needed in place of our argument in the previous section that relied on equality of Hilbert space dimensions, which does not work for infinite dimensional Hilbert spaces. Specifically, the Peter-Weyl theorem (see e.g. Ref. [61]) serves as a generalization of the Fourier decomposition beyond the abelian case of U (1) when G is a compact Lie group. Specifically, for every state |Ψ ∈ L 2 [G] there is a family of n r × n r matrices Ψ r indexed by r ∈ Ω G (analogous to a set of Fourier coefficients) such that Applying both of these results to the definition of W r gives Then W is an isometry, because We can then define a (truncation) operation W Σ : By the definition of W r and its adjoint, this operator satisfies Furthermore, δ Σ (g) converges to a Dirac delta distribution when Σ → Ω G because W Σ → W.
Eq. (5.26) implies that W † Σ W Σ commutes with the left and right action of G because the RHS expression is invariant if we left or right multiply g and h by any group element, i.e.
Finally, we note that although W Σ is not an isometry, W † Σ is, which one can verify using the observation that With this truncated isometry in hand, we can define a truncated gauging map for compact Lie group G and a finite set Σ of irreducible representations of G: is the standard generalization of the gauging map (which maps to an infinite-dimensional Hilbert space), and is the truncation acting on every edge degree of freedom to render the target space finitedimensional. Unlike the original gauging map G, this truncated version is not an isometry. From its definition, one can see that is a Hermitian operator acting on H V that is not necessarily proportional to the identity because the δ Σ does not enforce all g to be I. Nevertheless when Σ → Ω G , we find that as in the finite G case A caveat in the last expression is that if |E| > |V 1 | we are left with positive powers of δ(I) which are not well-defined numbers. A way to regularize the above is to understand it as the limit δ(I) = lim We can construct a regularized version P Σ by dividing by an appropriate power of δ Σ (I) so that it converges to 1 H V , i.e.P Σ = δ Σ (I) −α P Σ satisfies lim Σ→Ω GP Σ = 1 H V , where α ∈ R. Next notice thatP Σ is a Hermitian operator on a finite Hilbert space H V that converges to the identity. Thus for large enough Σ, all the eigenvalues ofP Σ should be close to 1 which in particular means that they are all positive. Therefore, for some (finite) Σ one can define an operator K Σ which is the (positive) square root of P Σ , i.e.
What is more, as P Σ commutes with U V (h), its square root still commutes with U V (h)! Thus for an appropiate Σ, we can construct an isometry from G Σ bỹ Finally, we would like to show that this map implements a gauge/global symmetry, i.e.
with A V 0 (h) defined to act on the truncated, finite-dimensional space. First, we show that this holds for the (non-isometric) G Σ , i.e.
This holds as follows, is a representation of the group G due to the fact that W † Σ W Σ commutes with the left and right actions, which is how A V 0 (h) acts on the edge degrees of freedom. Thus this is our "finite-dimensional version" of A V 0 (h).
To expand to the proper isometry,G Σ , we show that P Σ commutes with the action of the group. Consider the square of Eq. (5.29), namely Thus P Σ commutes with the group action, which implies that K −1 Σ commutes with it, implying Eq. (5.28).
One may now wonder why usingG Σ on a generalized gauged LOTE code does not violate the Eastin-Knill theorem [62], which says that codes capable of correcting erasure errors can not have a continuous transversal gate set. The reason is that by truncating we have lost the property that locality of operators is preserved up to dressing (see Section 3.3). This was necessary to argue that the resulting code kept the same entanglement wedge map. After truncation, the reconstruction properties holds only approximately, in which case the code can have a continuous transversal gate set, as shown in Ref. [21].

Discussion
While toy models of AdS/CFT remain far from perfect, there is much to be learned, in both holography and quantum information, by attempting to improve these models. In this work we took a step in this direction by constructing and analyzing codes with Bulk gauge symmetries that were dual to Boundary global symmetries.
We began by introducing the gauging map, which maps a system with global symmetry to another with gauge symmetry. We proved several key features of the map: that it can be isometric, that it preserves locality of vertex operators up to a dressing to the Boundary which can be chosen to go along an arbitrary path, and its global/gauge duality. We proceeded by introducing holographic codes. We gave a working definition of a holographic code, which allowed the Bulk to be a constrained system, meaning that only constraintpreserving operators need be reconstructable. We also required a version of entanglement wedge reconstruction that foreshadowed the compatibility of holographic codes and the gauging map: that an entanglement wedge must be "near boundary probing", that is there must always be a path from a point in the entanglement wedge to one on its corresponding Boundary region. We then gave two examples of our definition: the HaPPY code, whose Bulk is unconstrained and which exhibits a global/global duality, and the gauged LOTE code, whose Bulk's Hilbert space was constrained to a full gauge-invariant Hilbert space, but which did not a priori have a gauge/global duality. We then proved, however, that for holographic codes with such a gauge-invariant Bulk, there must always be a dual Boundary global symmetry. Thus we have constructed the first toy model of a holographic code with a gauge/global duality, but also, shown that establishing the presence of such a duality (given a Bulk gauge symmetry) requires only the error correcting properties of AdS/CFT, not any additional structure.
In the last section of the paper, we used the gauging map to analyze holographic codes. We began by establishing some general Bulk gauging and ungauging theorems: a code with a global/global duality can be converted into one with a gauge/global duality, albeit with all fluxes fixed to a particular value. A code with gauge/global duality with Bulk containing at least one flux sector can be converted to one with global/global duality by restricting the Bulk to that sector, i.e. by fixing the gauge field configuration to a classical value. This latter fact inspired the various remaining observations in the paper. First, it offers an explanation for why the HaPPY code fails to model AdS/CFT by displaying a global/global symmetry: its Bulk is already restricted to a fixed-flux sector. Second, it gives us a model of a somewhat trivial time evolution, in which nearby sites are completely decoupled from one another. Thirdly, it gave a concrete model in which one can understand how metric fluctuations contribute to AdS/CFT being only an approximate code. Finally, when combined with the generalized gauged LOTE code it gives us a new mechanism for creating approximate codes that are transversal with respect to a universal gate set.
We expect it to be straightforward to generalize this work to higher dimensions and to higher-form global symmetries. The most straightforward future direction is quantifying the code approximation factor of the codes with global/global continuous symmetry dualities as a function of the number of representations included in the truncation. Specifically, it would be interesting to know whether or not it saturates the upper bound given in Ref [21]. It would also be interesting to explore such bounds further in the context of toy models for AdS/CFT. Our gauging and ungauging approach to produce gauge/global or global/global holographic codes could also be applied to random (stabilizer) tensor network constructions [6,63] to avoid any "accidental" symmetries.
The discussion in this work has focused on toy models for holography close to a fixed background geometry. Recently there has been progress on establishing no-go results that constrain possible symmetries in a theory of quantum gravity that involves summing over topologies [29][30][31][32]. It would be interesting to extend the holographic code toy models to this setting and to study the possibilities for symmetry there. This would appear to require some new ideas, as here we have relied upon finding a path to the boundary in our dressing of operators to make them gauge-invariant, which may not always be possible. The resolution to this potential pitfall may be the incorporation of wormholes into the toy models.
The kind of dynamical duality that we construct here is only a fairly trivial one, in which subsystems are fully decoupled (i.e. the speed of light vanishes). However, a similar construction may be capable of implementing a proper dynamical duality between k-local Hamiltonians in the bulk and boundary. This could involve a map similar to the gauging map, but whose gauge/global duality involves symmetries that are not simply generated by sums of local operators, but rather sums of k-local terms. One approach would be to start by studying such a map in a general (non-holographic) setting, as we did in Section 3, before applying it to a code like LOTE as we did in Section 5 to obtain a holographic code with global/global duality. Conversely, if we find holographic codes with a proper dynamical duality (i.e. allowing for time evolution around a fixed Bulk geometry), it may be possible to construct from it a natural ambient constrained system, which may be of interest to the study of quantum gravity.

A Error correction
We define correctability of regions as follows.
Definition A.1. Consider a code with encoding isometry V : H L → H P and codespace projector P = VV † . A region R is said to be correctable with respect to an algebra of logical operators A L if the erasure channel N R (·):= tr R (·) is correctable; i.e. for every O L ∈ A L there exists a recovery channel R such that The most useful property of a correctable region in a holographic code is a result of the reconstruction or cleaning lemma, which shows that this is equivalent to The forward direction of this lemma is partially proven in Ref. [10], but without the condition that [O R c , P ] = 0. We prove this result here using results from [9,64].
Proof. By [64], correctability is equivalent to the following condition: where O R is any operator acting on the region R.
It is also supported on R c by assumption. Thus, U is unitary and also supported on R c . Second, consider the operator implemented by U . One can expand V † exp(iH)V as a power series to conclude that V † U V = U L .
Finally, U is also codespace-preserving, which again can be seen from the power series and [H, P ] = 0.
Lemma A.4. For any correctable region R with respect to an algebra of logical operators A L , and any logical unitary representation U L : G → A L , there is a unitary representation of G supported on R c that implements U L .
Proof. From Lemma A.3, we have a set of unitaries {U (g)} g∈G that are codespace-preserving, supported on R c , and implement the respective unitaries U L (g).
Using the fact that the U (g)V = V U L (g) and the representation property of U L , we have U (g 1 )U (g 2 )V = U (g 1 · g 2 )V . From this, where we have multiplied by V † on the right and then traced out R. We can then multiply on the right by Tr R (Π c ) + , the generalized inverse of Tr R (Π c ), and use Tr R (Π c ) Tr R (Π c ) + =: Π S , the projector onto S, which we define as the support of the partial trace of the codespace projector. We obtain Thus we have a representation on this subspace. We now just need to consider the orthogonal complement S ⊥ . We claim the following: (1) U (g) is block-diagonal with respect to the decomposition of R c = S ⊕ S ⊥ , and (2) the block acting on S ⊥ can be chosen freely without affecting the codespace-preserving property of U or its action on the codespace; in particular we can choose it to be 1 S ⊥ and thus act as a trivial representation of G.
Proof of (1): We know that U is codespace-preserving; thus where we traced out the R subsystem on line two, and on the last line used Tr R (Π c ) = Π S Tr R (Π c ) and Π ⊥ S Π S = 0. Similarly one can show Π S U Π ⊥ S = 0; thus U is block-diagonal as claimed.
Proof of (2): as shorthand for Π (⊥) S ⊗ 1 R . First, we show that this is still codespace preserving by demonstrating Π S Π c = Π c .
Given positive semidefinite operators M , N , it is known that M 1/2 N M 1/2 is also positive semidefinite; thus Π ⊥ S Π c Π ⊥ S 0. However, it is also traceless: But the trace of a positive semidefinite operator is only zero if the matrix equals zero, so Finally, the action on the codespace is the same: Unitarity also follows straightforwardly from the unitarity and block-diagonality of U , and thus we have shown the result.

Note that
So that after conjugation transpose and flipping indices, we get In order to proof the gauge-invariance, we need to show that every projector Π v for v ∈ V 1 commutes with the Wilson loops. If v is not in the Wilson loop, then they commute trivially. Otherwise, there is an incoming e − ∈ E − (v) and a outcoming e + ∈ E + (v) that are part of the Wilson loop (note that v is in V 1 ). Then we only need to show that as the Wilson loop trivially commutes with the other parts of A v (g). Consider U R e + (g) · W e + kj · U R e + (g −1 ) = klm W e − im r mk (g) r kl (g −1 )W e + lj = lm W e − im r ml (g · g −1 )W e + Let S be the pre-gauged system and T the gauged system. Consider a subgraph of Λ, Γ = (V Γ , E Γ ), such that E + Γ ∪ E − Γ ⊆ V Γ ∪ V 0 , i.e. all the vertices of the edges on E Γ are in V 0 or V Γ . Define, for any v ∈ V Γ and g ∈ G, the following S operator: U L e (g).
For any Q Γ ∈ A S (Γ) ≡ A S (V Γ ∪ E Γ ), the operator is an element of A T (Γ).

Proof.
Clearly O Γ has support only on Γ. We need to show that [O Γ , Π GI ] = 0. For v ∈ V \ V Γ , A v (g v ) commutes with O Γ since the only possible overlap is on edges but all edges of E Γ avoid vertices on V \ V Γ . Thus, we only need to keep track of the v ∈ V Γ , i.e. we need to show Now notice that We can use Eq. was shown in the main text. To prove the other inclusion, we need Lemma 3.3 of Ref. [41], which makes reference to group elements defined by Wilson lines defined over cycles in the following way. Consider a Wilson line along a cycle such that the trace is not taken at the end, distinguishing it from a Wilson loop. Then its eigenstates are group states of the edges along the cycle that have a well-defined product (or "holonomy"), which is the group element g γ assigned to the cycle γ for that state. We refer to the set of such cycles that start and end at a given point v ∈ V as C v . Then Lemma 3.3 of Ref. [41] states that two states |ψ , |ψ ∈ H E are related by a gauge transformation |ψ = v∈VĀ v (h v ) |ψ , withĀ v just the action of A v restricted to edge degrees of freedom, if and only if for any v ∈ V there is an element h ∈ G such that for all γ ∈ C v , the eigenvalue g γ for |ψ and the eigenvalue g γ for |ψ are related by g γ = hg γ h −1 .
For now, we focus on the state of the edges, e∈E |g e ∈ H E . For this state, and any point v ∈ V 1 and any cycle γ ∈ C v , we have tr r(g γ ) = tr r(I). By character theory, and the faithfulness of r, this means g γ = I. Then by the above lemma, this is related by a gauge transformation to the state with all edge states set to I, i.e. whereĀ v (h) is the gauge constraint operator A v (h) restricted to edges only, i.e. in the full Hilbert space we have A v (h) = U v (h) ⊗Ā v (h).
Our goal now is to show that the state Π GI |ψ V ⊗ e∈E |g e lies in the image of G. Let's start by using Eq. (B.4): where h e = h −1 e + and |ψ V = v∈V 1 U v (h −1 v ) |ψ V . As the NGC to NGC Wilson lines from e to f , with e, f ∈ E 0 , are trivial, this implies that h e h −1 f = I whenever there is a NGC to NGC path from e to f which is guaranteed because (V 1 , E 1 ) is connected. Therefore, there exist some h ∈ G such that for every e ∈ E 0 we have h e = h. Note that Thus we have shown Theorem B.4. Consider a subgraph Γ = (V Γ , E Γ ) such that for every point v ∈ V 1 \ V Γ there is a path between v and V 0 fully contained in Λ \ Γ. Let O Γ be an operator supported on Γ that commutes with Π F F = GG † . Then there exists an operator O acting on H V with support on V Γ such that Proof. Consider the operator O = G † O Γ G. Then Next consider any operator T v with support on v ∈ V 1 \ V Γ . Then one can use Theorem 3.4 with the subgraph P v being the path from v to V 0 that avoids Γ so that GT v = T Pv G. Then we can write Note that asÕ and O Pv have non-overlapping support they trivially commute, thus which means that O commutes with all T v for v ∈ V 1 \ V Γ therefore O acts as 1 on H v . Then one can see that O acts trivially on V 0 \ V Γ by explicitly expanding its definition: The partial trace over E of the operator with support on Γ has support on V Γ = Γ \ E. Then as the unitaries multiplying the partial trace has support on V 1 , this implies that the full operator has support on V Γ ∪ V 1 . The above two results imply that O has support on

B.3 Other flux sectors
Theorem B.5. If V 0 = ∅ and Λ is connected, then G φ is an isometry up to an overall normalization factor.
Proof. Similar to before, consider P φ = G † φ G φ . We want to show that the above map is still proportional to the identity.
Let us unpack G|ψ V by plugging in the explicit form of Π GI (see definition 2.7).
From where we can read The effect of the delta distributions is to ensure that the only terms contributing in the integrations are those with φ e g e + = g e − φ e for every vertex E. As usual if e + ∈ V 0 , we have g e + = I. From the last observation, we see that actually all g v are set to one. Then we get the same constant as the untwisted case φ e = I. Theorem B.6. Consider a system transforming under a global symmetry, (S, G, {U v }) with S = (V, {H v }) with Λ = (V, E) and labeled by α such that V 0 = ∅. Let T be obtained from gauging S. Let G be the corresponding gauging isometry. We have Proof. Expanding the left hand side we get where E 0 = {e ∈ E|e + ∈ V 0 } and E 1 = E \ E 0 and U V 0 (h) = v∈V 0 U v (h). Next, we perform the change of variables g v = g v h to get Proof. Note that the NGC to NGC Wilson lines do measure the product along the path they follow because we are using a faithful representation and we do not take a trace. Next, notice that as the Wilson loops, are all trivial, then the product of all the elements around a close loop in E 1 gives the identity. Together, these last two facts imply that the eigenvalue for an NGC to NGC Wilson line between two fixed edges in E 0 is path-independent. Furthermore, if we choose any one fixed edge e 0 ∈ E 0 , the eigenvalues of all the NGC-NGC Wilson lines are determined by knowing the eigenvalues for the line operators starting at e 0 and ending at every other point in E 0 \ {e 0 }. This is because when we matrix multiply two NGC-NGC Wilson line operators (the second beginning where the first one ends) we obtain another NGC-NGC Wilson line that follows that concatenation for the initial paths but skipping the repeated edge (see Remark B.7). Let p k be a path that goes from e 0 to e k and l e k be the group element such that The last step is to rewrite e∈E 0 \{e 0 } U R e (l −1 e ) as some product ofĀ v with v ∈ V 0 . For v with only one edge this is clear. If v participates in at least two edges, say e and e , i.e. e, e ∈ E 0 such that e + = e + , we need that l e = l e . This is true because, since Λ \ (V 0 ∪ E 0 ) is connected, we can consider a loop that leaves v through e and returns through e . Since by assumption this loop has trivial eigenvalues, we must have l e = l e . Then we can rewrite the product over E 0 \ e 0 as a product over V 0 of V 0 gauge transformations with and f (v 0 ) = I, such that the lemma holds.
Proof. As in Theorem 3.7, it is sufficient to show that for any |{g e } ∈ H E with the same eigenvalues for Wilson loops and NGC to NGC Wilson lines as |{φ e } , and for any |ψ V ∈ H V that Π GI |ψ V ⊗|{g e } is in the image of G φ . The NGC to NGC loops starting at the same vertex are trivial, because conjugation doesn't change the identity. Thus we can use Lemma B.8 to the states |{φ e } and |{g e } to get the promised objects {φ 0 e } , {g 0 e } , and f . Using the same arguments as in Theorem 3.7, we can write where we absorbed u∈V 1Ā u (h u ) in |ψ V by inserting gauge transformations after Π GI , and we absorbedĀ V 0 (w) using the gauge/global duality of flux free maps. By definition, this is in the image of G φ .