Continuous symmetries and approximate quantum error correction

Quantum error correction and symmetry arise in many areas of physics, including many-body systems, metrology in the presence of noise, fault-tolerant computation, and holographic quantum gravity. Here we study the compatibility of these two important principles. If a logical quantum system is encoded into $n$ physical subsystems, we say that the code is covariant with respect to a symmetry group $G$ if a $G$ transformation on the logical system can be realized by performing transformations on the individual subsystems. For a $G$-covariant code with $G$ a continuous group, we derive a lower bound on the error correction infidelity following erasure of a subsystem. This bound approaches zero when the number of subsystems $n$ or the dimension $d$ of each subsystem is large. We exhibit codes achieving approximately the same scaling of infidelity with $n$ or $d$ as the lower bound. Leveraging tools from representation theory, we prove an approximate version of the Eastin-Knill theorem: If a code admits a universal set of transversal gates and corrects erasure with fixed accuracy, then, for each logical qubit, we need a number of physical qubits per subsystem that is inversely proportional to the error parameter. We construct codes covariant with respect to the full logical unitary group, achieving good accuracy for large $d$ (using random codes) or $n$ (using codes based on $W$-states). We systematically construct codes covariant with respect to general groups, obtaining natural generalizations of qubit codes to, for instance, oscillators and rotors. In the context of the AdS/CFT correspondence, our approach provides insight into how time evolution in the bulk corresponds to time evolution on the boundary without violating the Eastin-Knill theorem, and our five-rotor code can be stacked to form a covariant holographic code.


I. INTRODUCTION
Quantum error-correcting codes protect fragile quantum states against noise [1]. If quantum information is cleverly encoded in a highly entangled state of many physical subsystems, then damage inflicted by local interactions with the environment can be reversed by a suitable recovery operation. Aside from their applications to resilient quantum computing, quantum error-correcting codes appear in a wide variety of physical settings where quantum states are delocalized over many subsystems, such as topological phases of matter [2][3][4][5] and the AdS/CFT correspondence in holographic quantum gravity [6,7].
On the other hand, naturally occurring physical systems often respect symmetries. For instance, phases of matter can be classified according to how these symmetries are realized in equilibrium states. Likewise, quantum error-correcting codes often have approximate or exact symmetries with important implications. In the case of a time-translationinvariant many-body system, for example, certain energy subspaces are known to form approximate quantum errorcorrecting codes [8,9], which are preserved under time evolution. Limits to sensitivity in quantum metrology are related to the degree of asymmetry of probe states, a notion formalized in the resource theory of asymmetry and reference frames [10,11]. Thus, reference frame information can be protected against noise using quantum codes with suitable symmetry properties [12]. Furthermore, recent developments in quantum gravity have shown that the AdS/CFT correspondence can be viewed as a quantum error-correcting code which is expected to be compatible with the natural physical symmetries of the system, such as time-translation invariance [6,7,[13][14][15][16]. Finally, the Eastin-Knill theorem [17][18][19], which complicates the construction of fault-tolerant schemes for quantum computation by forbidding quantum error-correcting codes from admitting a universal set of transversal gates [20][21][22][23], can be viewed as the statement that finite-dimensional quantum codes which correct erasure have no continuous symmetries [12]. Thus, there are loopholes to the Eastin-Knill theorem that are naturally exploited by holographic theories of quantum gravity. This article provides a detailed quantitative investigation of those loopholes, critically evaluating their potential for application to quantum fault tolerance (see also recent related results [24]).
A continuous symmetry, as opposed to a discrete symmetry, allows for infinitesimally small transformations that are arbitrarily close to the identity operation. Such symmetry transformations are generated by conserved operators called charges. For instance, consider a particle in three-dimensional space that we rotate about the Z axis by an angle θ. Acting on the Hilbert space, this symmetry transformation is represented by a unitary U θ that is generated by the Z component of the Hermitian angular momentum operator J z , i.e., U θ ¼ e −iJ z θ . In general, we say that a quantum operation is "covariant" with respect to a group G if the operation commutes with the group action. Specifically, a unitary transformation V is covariant with respect to rotations about the Z axis if V and U θ commute up to a phase factor: where α is a real number. If α ¼ 0, this covariance property implies that V conserves the physical quantity J z ; if the initial state jψi is an eigenstate of J z with eigenvalue m, then the transformed state Vjψi must also be an eigenstate of J z with the same eigenvalue. For nonzero α, V additively shifts all eigenvalues by α, preserving the difference of any two eigenvalues.
When we say that a quantum code is covariant with respect to the group G, we mean that its encoding map is a G-covariant operation. More specifically, this map embeds a "logical" code space in the tensor product of n physical subsystems, and, as indicated in Fig. 1, a unitary group transformation acting on the code space can be realized as a tensor product of n unitary transformations, one acting on each subsystem. In this case, we say that the transformation is "transversal" with respect to the decomposition into subsystems. In this paper, we study the accuracy of quantum error-correcting codes that are covariant with respect to continuous symmetries. We say that an "erasure" error occurs when one or more of the n subsystems has been lost, and we know which subsystems are missing; we investigate properties of recovery operations which correct such erasure errors approximately. Our results build on earlier work showing that, for a continuous group G, infinite-dimensional G-covariant quantum codes exist, while finite-dimensional G-covariant codes cannot correct erasure errors perfectly [12,25].
In the case where the group G is continuous, it is convenient to express the G-covariance condition in terms of the generators of G. If T is a generator of the symmetry acting on the code space, then transversality of the symmetry operation implies that T ¼ P T i , where each T i is supported on a single subsystem. If the erasure of a subsystem can be corrected exactly, then it must be impossible for any adversary who steals that subsystem to infer any information about the encoded state; otherwise, theft of the subsystem would drive irreversible decoherence of the logical quantum information. More concretely, if Π is the projector onto the code space, and the erasure of any subsystem is perfectly correctable, then the error-correction conditions [26,27] state that any operator O supported on a single subsystem must act trivially within the code space, i.e., ΠOΠ ∝ Π. Thus, if the symmetry generator T is transversal, then ΠTΠ ¼ P i ΠT i Π ∝ Π. Therefore, T acts as a multiple of the identity on the logical space and cannot generate any nontrivial logical operation.
Crucially for the considerations in this paper, the above argument makes two implicit assumptions: that the sum over i is finite (bounded number of subsystems) and that the code words are normalizable (rather than infinite-energy states such as position or momentum eigenstates). If both assumptions are relaxed, then quantum codes covariant with respect to a continuous symmetry are possible, as shown in Ref. [12]. Our main task in this paper is to explore quantitatively the case where the number of subsystems and the dimension of each subsystem are finite, using the toolbox of approximate quantum error correction [28][29][30]. That is, we quantify the deviation from perfect correctability in this case, for a code covariant with respect to a continuous symmetry. Assuming that the symmetry acts transversally and that the noise acts by erasing one or more subsystems, we provide upper bounds on the accuracy of Code FIG. 1. Quantum information represented on an abstract logical system L is encoded on several physical subsystems A 1 …A n using a code. Suppose that the code is compatible with a continuous transversal symmetry, for instance, rotations in 3D space. This compatibility means that by rotating all individual physical subsystems one induces the same transformation as if one had simply rotated the initial logical system L. No such code provides exact protection against erasure of a single subsystem. To understand why, consider two eigenstates with different eigenvalues of the logical charge T L that generates the symmetry. Transversality means that the corresponding physical charge T A ¼ P T i is a sum of terms, each supported on a single subsystem. By measuring the charge T i of a random subsystem, the environment can infer information about the total charge T L , distinguishing the two eigenstates. It follows that erasure of a single subsystem cannot be perfectly corrected. the code, characterized using either the entanglement fidelity for a fixed input state or the worst-case entanglement fidelity of the error-corrected state (Fig. 2). Our proof strategy is to show that, in the presence of a continuous symmetry, the environment necessarily learns some information about the logical charge, which implies that the code necessarily performs imperfectly as an errorcorrecting code [30][31][32][33]. Some of these assumptions may FIG. 2. Overview of our main results and structure of the paper.

CONTINUOUS SYMMETRIES AND APPROXIMATE QUANTUM …
PHYS. REV. X 10, 041018 (2020) 041018-3 be relaxed in our main technical theorem. For instance, the generating charge may be a sum of k-local terms, instead of a sum of strictly local terms as for a transversal symmetry action, and the code needs to be only approximately rather than exactly covariant. Our lower bound on infidelity vanishes in two interesting regimes: as the dimension d of the physical subsystems gets large or as the number n of physical subsystems gets large. In these limits, we can find error-correcting codes whose infidelity approximately matches the scaling of our bound with d or n. We construct explicit examples based on normalized versions of the rotor code presented in Ref. [12] and note that codes considered in Ref. [8] provide further examples. We also discuss a five-rotor code that can be stacked to construct a covariant holographic code [7]. Furthermore, our results provide an approximate version of the Eastin-Knill theorem for quantum computation [12,[17][18][19], which states that a universal set of transversal logical gates cannot exist for a finite-dimensional encoding that protects perfectly against erasure. By applying our bounds and exploiting the non-Abelian nature of the full unitary group on the logical space, we derive a lower bound on infidelity which scales as 1= log d, where d is the subsystem dimension, for a code that admits universal transversal logical gates. We also find that if a code admits a universal set of transversal logical gates, then there are strong lower bounds on the subsystem dimension d that depend on both the code's infidelity and the logical system dimension d L . Using randomized code constructions, we prove (nonconstructively) the existence of codes which approximately achieve this relationship between d and d L . In addition, we exhibit codes with universal transversal logical gates which achieve arbitrarily small infidelity when the number n of subsystems becomes large with the logical dimension d L fixed.
We also provide a general framework for constructing codes that are covariant with respect to a general symmetry group, by encoding logical information into the so-called regular representation of the group. Using this framework, we can generalize several widely known codes (bit-flip, phase-flip, ½½4; 2; 2 code, etc.) to infinite-dimensional covariant codes based on oscillators or rotors.
Finally, we discuss the interpretation of our results in the context of quantum gravity and, in particular, the AdS/CFT correspondence. Time evolution itself provides an example of a symmetry that must be reconciled with the errorcorrecting properties of the system.
The remainder of the manuscript is organized as follows (Fig. 2). In Sec. II, we summarize our main results in an intuitive fashion (this section may be skipped for readers who prefer more precise explanations). The notation is laid out in Sec. III, and in Sec. IV we prove a bound on the performance of codes covariant with respect to a Uð1Þ symmetry. A criterion certifying code performance is derived in Sec. V. In Sec. VI, we apply our bounds and criterion to the following examples of Uð1Þ-covariant encodings: an infinite-dimensional rotor extension of the qutrit ½½3; 1; 2 and qubit ½½5; 1; 3 codes as well as a manybody Dicke-state code. We apply our bound to codes admitting universal transversal gates in Sec. VII, discussing a UðdÞ-invariant encoding based on W states in Sec. VII C. Erasure-correcting codes whose transversal gates form a general group G are introduced in Sec. VIII. In Sec. IX, we relate our work to recent observations about global symmetries in quantum gravity. We conclude with a discussion in Sec. X.

II. SUMMARY OF MAIN RESULTS
This section presents a high-level overview of our main results using intuitive arguments. The reader may safely skip to Sec. III if they prefer a more precise exposition.
A. Bound on the accuracy of codes covariant with respect to a continuous symmetry Our first main result is a bound on the accuracy of any approximate quantum error-correcting code that is covariant with respect to a continuous symmetry (Sec. IV). We consider an encoding map from a logical system L to a physical system A consisting of n subsystems denoted A 1 ; A 2 ; …; A n . A one-parameter family of continuous unitary symmetries acting on L is generated by the logical charge observable T L , which corresponds to the physical charge observable T A acting on A. We assume that the symmetry acts transversally, so that T A ¼ P n i¼1 T i , where T i acts on subsystem T i .
How well does this code protect the logical system against erasure of one of the subsystems? To quantify the code's performance, we may use the worst-case entanglement fidelity, where "worst case" means the minimum fidelity for any entangled state shared by the logical system and a reference system. (See Sec. III for a precise definition.) Then we consider the value f worst of this worst-case entanglement fidelity which is achieved by the best possible recovery map applied after an erasure error. A measure of the residual error after recovery is Our result is a lower bound on ϵ worst which limits the performance of any covariant quantum code: where ΔT denotes the difference between the maximum and minimum eigenvalue of T. That is, the code's accuracy is constrained by the range of charges one wishes to be able to encode, by the range of possible charge values that each subsystem can accommodate, and by the number of physical subsystems. The term ΔT i in Eq. (2) is a proxy for the magnitude of the charge fluctuations of the code word states within each subsystem. We also find that Eq. (2) can be generalized in a number of ways. We can express the limit on code performance in terms of other measures besides worst-case entanglement fidelity, such as the entanglement fidelity for a fixed input state. We can derive bounds that apply in the case where more than one subsystem is erased or where errors occur on an unknown subsystem rather than a known subsystem. Similarly, the physical charge can have terms acting on several subsystems, including overlapping and noncommuting terms, such as those commonly encountered in many-body physics. We can consider cases where the charge distribution for a subsystem has infinite range but with a normalizable tail. We also treat the cases where the code is only approximately covariant with respect to a continuous symmetry, the case of a nonisometric approximately charge-conserving code, and the case where the physical charge operator is not strictly transversal.

B. Regimes where our bound is circumvented and criterion for code performance
The idea underlying Eq. (2) is that, for erasure correction to work well, one should not be able to learn much about the global value of the charge by performing a local measurement on a subsystem. Hence, to be able to correct the errors to good accuracy, the code words need to be able to have either large fluctuations of the local charge values (which requires ΔT i → ∞ to accommodate these fluctuations) or many subsystems (n → ∞) so that the global charge is a sum of many local contributions. In fact, codes can be constructed in either limit for which ϵ worst approximately matches the scaling in ΔT i and n of the lower bound (2) (see Sec. VI).
To study the case of large ΔT i , we consider a normalized variant of the infinite-dimensional covariant code constructed in Ref. [12]. The infinite-dimensional version encodes one logical rotor [with unbounded Uð1Þ charge] in a code block of three rotors. In the modified version of this code, we truncate the charge of the logical system to f−h; −h þ 1; …; þhg and also normalize the physical code words by truncating the charge of the subsystems, either by imposing a sharp cutoff on the local charge or by modulating the local charge using a Gaussian envelope of width w. The value of ϵ worst achieved by this code, and our lower bound, both scale like h=w up to a logarithmic factor.
Regarding the limit of a large number of subsystems, we observe that a code discussed in Ref. [8] matches the 1=n scaling of our lower bound on ϵ worst . Here, the subsystems are qubits, regarded as spin-1=2 particles, and the code space is two-dimensional, spanned by two Dicke states with different values of the total angular momentum J z along the z axis. (A Dicke state is a symmetrized superposition of all basis states with a specified J z ). This code is covariant with respect to z-axis rotations by construction and can be shown to achieve ϵ worst scaling like 1=n, where n is the number of physical qubits.
A further result of independent interest is a general criterion used in our analysis for certifying the performance of an error-correcting code against arbitrary noise (Sec. V). The Knill-Laflamme conditions for exact quantum error correction can be phrased as follows: For any fixed basis fjiig for the logical system, all code words jiihij must look the same to the environment, and operators of the form jiihi 0 j must map to zero on the environment if i ≠ i 0 . We extend this statement to approximate quantum error correction by proving an upper bound on the parameter ϵ worst of the code, which holds if all code words look nearly alike to the environment and if operators of the form jiihi 0 j are mapped to operators of small norm on the environment. An advantage of this bound relative to previously proposed approximate versions of the Knill-Laflamme conditions [30] is that it is easy to compute. While this criterion suffices to certify the performance of an approximate errorcorrecting code, it is not necessary-there may be codes achieving small ϵ worst that do not satisfy it.

C. Approximate Eastin-Knill theorem and random U(d)-covariant codes
Quantum error-correcting codes are essential for realizing scalable quantum computing using realistic noisy physical gates. In a fault-tolerant quantum computation, logical quantum gates are applied to encoded quantum data, and error recovery is performed repeatedly to prevent errors due to faulty gates from accumulating and producing uncorrectable errors at the logical level. For this purpose, transversal logical gates are especially convenient. For example, if a logical gate on an n-qubit code block can be achieved by applying n single-qubit gates in parallel, then each faulty physical gate produces only a single error in the code block. Nontransversal logical gates, on other hand, either require substantially more computational overhead or propagate errors more egregiously, allowing a single faulty gate to produce multiple errors in a code block.
A nontrivial transversal logical gate can be regarded as a covariant symmetry operation acting on the code. If all the logical gates in a complete universal gate set could be chosen to be transversal, then the Lie group of transversal gates would include the group Uðd L Þ of unitary gates acting on the d L -dimensional logical system (up to an irrelevant overall phase). It then follows that any generator T A of Uðd L Þ acting on the physical system A could be expressed as a sum of terms, where each term in the sum has support on a single subsystem. Unfortunately, the Eastin-Knill theorem rules out this appealing scenario, if erasure of each subsystem is correctable and the code is finite dimensional. But now that we see that there are parameter regimes in which covariance can be compatible with good performance of approximate quantum errorcorrecting codes, one wonders whether a universal transversal logical gate set is possible after all, at the cost of a small but nonzero value of ϵ worst .
We find, however, that a fully Uðd L Þ-covariant code requires a value of ϵ worst which scales quite unfavorably with the local subsystem dimension (Sec. VII). Leveraging tools from representation theory, we show that the lower bound on ϵ worst becomes where d i is the dimension of the ith physical subsystem. We also find lower bounds for the local subsystem dimension that depend on the number of logical qubits and the code's infidelity. This result also applies to the case when each gate can be approximated with a discrete sequence of transversal operations to arbitrary accuracy, as in the context of the Solovay-Kitaev theorem. Furthermore, using randomized constructions, we prove the existence of Uðd L Þ-covariant code families which achieve arbitrarily small infidelity in the limit of large subsystem dimension. In addition, we exhibit a simple Uðd L Þ-covariant code family, whose code words are generalized W states, such that ϵ worst approaches zero as the number of subsystems n approaches infinity.

D. Covariant codes from multiqubit codes
We also construct codes that are covariant with respect to any group G admitting a Haar measure, where both the logical system and the physical subsystems transform as the regular representation of G (see Sec. VIII). In this construction, the dimension of each subsystem is the order jGj of the group when G is finite and infinite when G is a Lie group.
Using this formalism, we construct natural generalizations of well-known families of qubit codes, such as the bit-flip and phase-flip codes, with the qubits replaced by jGj-dimensional systems. These codes admit transversal logical gates representing each element of G.
When G is a Lie group, the qubits are replaced by infinite-dimensional systems such as rotors or oscillators. These infinite-dimensional codes circumvent the Eastin-Knill theorem-they are covariant with respect to a continuous symmetry group, yet erasure of a subsystem is perfectly correctable.

A. Approximate quantum error correction
We define a code as a completely positive, tracepreserving map E which assigns to each logical state on some abstract logical system L a corresponding state on a physical system A consisting of n subsystems (Fig. 3). Unless explicitly stated otherwise, we consider in this paper codes that are isometric, i.e., that map any pure logical state jxi L to a pure physical state fjψ x i A g. The latter is called a code word. The span of all the code words fjψ x i A g forms the code space. While typically encountered codes are isometric, it is useful in some instances to consider more general encoding maps such as encodings that symmetrize a state with a reference frame [12].
The noise channel is the process to which the physical system is exposed, which might cause the information encoded in it to get degraded. It is a quantum channel N A→B mapping the physical system to physical system B.
(The system B might be the same as A, but it might be different; for instance, B might include a register which remembers which type of error occurred or which subsystem was lost.) To study the approximate error-correction properties of a code, we need to quantify the approximation quality using distance measures between states and channels. Proximity between quantum states can be quantified using the trace distance δðρ; σÞ ¼ kρ − σk 1 =2 or using the fidelity [34] Fðρ; σÞ ¼ k ffiffi ffi ρ p ffiffiffi σ p k 1 [1]. We need to quantify how close a quantum channel K L→L is to the identity channel. Two standard measures to achieve this quantification are the entanglement fidelity F e for a maximally mixed input state and the worst-case entanglement fidelity F worst [35,36], defined, respectively, as FIG. 3. A code E L→A maps a logical state jxi on an abstract logical space L to a state jψ x i A on a physical system A. Here, we consider a physical system composed of several subsystems The code space, with associated projector Π A , is the range of the encoding map. The environment acts by erasing a subsystem A i , represented as a noise channel N ðiÞ A→A . A good error-correcting code is capable of recovering the original logical state jxi from the remaining subsystems, by applying a recovery map R ðiÞ A→L . In our analysis, we assume that the environment chooses randomly which subsystem A i is erased and that i is known, so that the recovery map may depend on i. The quality of the code is characterized by how close the overall process (erasure followed by recovery) is to the identity process acting on the logical system, as measured by either the (fixedinput) entanglement fidelity or the worst-case entanglement fidelity.
Here, the input state appearing in the definition of F e is , the maximally entangled state of L and a reference system R; the system R has the same dimension as L, which we denote by d L . The optimization in the definition of F worst ranges over all bipartite states of L and R. We may also use the state fidelity Fðρ; σÞ to compare two channels K and K 0 ; the entanglement fidelity between K and K 0 for a fixed bipartite input state jϕi LR is defined as By optimizing over the input state, we may define F worst ðK; K 0 Þ, which is closely related to the diamond distance between the channels [35,36]. We now ask how well one can recover the logical state after the encoding and the application of the noise channel. That is, we seek a completely positive map R B→L (the recovery map), such that R B→L ∘N A→B ∘E L→A is as close as possible to the identity channel id L→L . The resilience of a code E L→A to errors caused by a noise map N A→B is, thus, quantified by the proximity to the identity channel of the combined process R B→L ∘N A→B ∘E L→A for the best possible recovery map R B→L . Using either the entanglement fidelity with fixed input jϕi LR or the worst-case entanglement fidelity measures, the quality of the code E L→A under the noise N A→B is quantified as We also find it convenient to work with the alternative quantities which are closely related to the infidelity and Bures distance measures. A code which performs well has f ≈ 1 and correspondingly ϵ ≈ 0.

B. Erasures at known locations
In this work, we consider the noise model consisting of erasures which occur at known locations. (Our bound then naturally applies also to erasures at unknown locations, since the latter are necessarily harder to correct against.) For instance, if the ith physical subsystem is lost to the environment with probability q i , then the corresponding noise map is where we introduce a classical register C, which records which one of the n systems was lost, and where jϕi i are some fixed states.
One can also consider more general erasure scenarios, where any given combination of subsystems can be lost with a given probability. For instance, one might assume that systems A 1 and A 2 are simultaneously lost with probability q f1;2g , systems A 2 and A 3 are simultaneously lost with probability q f2;3g , and systems A 1 and A 3 are lost with probability q f1;3g . More generally, a combination of subsystems, which we label generically by α, can be lost with probability q α ; we assume we know exactly which systems are lost. The corresponding general noise map is then where the register C encodes the exact locations at which simultaneous erasures occur, where A α denotes the physical systems labeled by α (for instance, if α ¼ f2; 3g, then A α ¼ A 2 ⊗ A 3 ), and where fjϕi α g are fixed states. The sum ranges over a set K of possible α's corresponding to erasures which may occur. Technically, K is any set of subsets of f1; 2; …; ng, and A α ¼ ⊗ i∈α A i . Situations which can be described using this setting include, for instance, any k consecutive erasures or the erasure of any k subsystems.

C. Characterization via the environment
A very useful characterization of the quantities (8) is provided by Bény and Oreshkov [30], building upon the decoupling approach to error correction [31,32]. The recoverability of the logical information can be characterized by studying how much information is leaked to the environment, as represented by a complementary channel d N ∘E of N ∘E. Recall that a complementary channelF A→C of a quantum channel F A→B is a channel of the form F A→C ð·Þ ¼ tr B ½W A→BC ð·ÞW † , where W A→BC is a Stinespring dilation isometry for the map F , i.e., F A→B ð·Þ ¼ tr C ½W A→BC ð·ÞW † . Bény and Oreshkov show that the fidelity with which one can reverse the action of the encoding and the noise is exactly the fidelity of the total complementary channel to a constant channel: where T ζ ð·Þ ¼ trð·Þζ is the constant channel outputting the state ζ and where the maximizations range over all quantum states ζ on the output system of d N ∘E. Now we determine a complementary channel d N ∘E to the encoding and noise channels. Consider first the singleerasure noise channel (10). A Stinespring dilation of N ð1Þ A→AC on two additional systems C 0 ⊗ E is given as N ð1Þ where 1 A i →E is an isometric embedding of A i into E and 1 AnA i is the identity operator on all systems A except A i . Now consider a Stinespring dilation of E L→A as where tr AnA i denotes the partial trace over all systems except A i (the latter is then embedded in the E system). Hence, the complementary channel to the single erasure channel simply gives the erased information to the environment with the corresponding erasure probability. It is straightforward to see that for the more general noise channel (11) a complementary channel is given by where the register C 0 now remembers which combination of systems are lost. This channel provides the environment with the systems that are erased, where each erasure combination α appears with probability q α .

D. Covariant codes
The final ingredient we introduce is covariance with respect to a symmetry group (Fig. 1). Let G be any Lie group acting unitarily on the logical and physical systems, with representing unitaries U L ðgÞ and U A ðgÞ, respectively, for any g ∈ G. A code E L→A is covariant if it commutes with the group action: On either logical and physical systems, we can expand the unitary action of G in terms of generators of the corresponding Lie algebra; i.e., for a given g, there is a generator T L on L and a generator T A on A such that for some θ ∈ R that we can choose to normalize our generators. The generators are Hermitian matrices, and they can be interpreted as physical observables. (For instance, the generators of the rotations in 3D space are the angular momenta.) If the encoding map is isometric, E L→A ð·Þ ¼ V L→A ð·ÞV † , then any eigenstate jti of T L with eigenvalue t must necessarily be encoded into an eigenstate of T A with the same eigenvalue t (up to a constant offset). This constraint can be seen as follows. Expanding the condition (16) for small θ yields Let fjt; ji L g be a basis of eigenstates of T L where t is the eigenvalue and where j is a degeneracy index. Inserting in the place of ð·Þ the operator jt; jiht 0 ; j 0 j, we obtain where jψ t;j i ¼ Vjt; ji. Setting t ¼ t 0 ; j ¼ j 0 , we see that jψ t;j i is necessarily an eigenstate of T A ; let u t;j be its corresponding eigenvalue. Setting t ¼ t 0 ; j ≠ j 0 in Eq. (19) implies 0 ¼ ðu t;j − u t;j 0 Þjψ t;j ihψ t;j 0 j and, hence, u t;j ¼ u t;j 0 ≕ u t . Now Eq. (19) tells us for any t; t 0 ; j; j 0 that t − t 0 ¼ u t − u t 0 . It follows that u t ¼ t − ν for all t, for some constant offset ν; in other words, the code words must have the same charge as the logical state, except for a possible constant offset ν. We may condense this condition into the constraint ½T A ; VV † ¼ 0 along with the identity Equivalently, acting with V on Eq. (20), we have This result is a crucial property of covariant codes and is a central ingredient of the proof of our main result. Our main result, in its simplified form, further assumes that the action of the group is transversal on the physical systems, meaning that U A ðgÞ ¼ U 1 ðgÞ ⊗ U 2 ðgÞ ⊗ ÁÁÁU n ðgÞ. In this case, the corresponding generator is strictly local, As opposed to covariant isometries, covariant channels, in general, do not conserve charge, since they may exchange charge with the environment. For instance, the fully depolarizing channel is covariant with respect to any symmetry, but it changes the charge of its input. Our main result in its fully general form is formulated for approximately charge-conserving channel encodings, which is a superset of covariant isometries.

IV. INFIDELITY OF COVARIANT CODES FOR A CONTINUOUS SYMMETRY
Our first main result is a general characterization of how poorly a code necessarily performs against erasures at known locations, given that the code must be covariant with respect to a continuous symmetry. For the sake of clarity, we first present a simplified version of our general bound. Consider an encoding map jxi L → jψ x i A with respect to some basis fjxi L g, which we may represent by an isometry Pick any generator T L from the Lie algebra of the symmetry acting on L. Let T i be the corresponding generator acting on the ith physical subsystem A i , with the total generator on A being T A ¼ P i T i . As Hermitian matrices, these are quantum mechanical observables whose eigenvalues we may think of as abstract "charges." (These charges might correspond to the component of angular momentum in a given direction, the number of particles, or some other physical quantity.) Crucially, since the code E is covariant, a logical charge eigenstate jti L must be encoded into a code word jψ t i A which is an eigenvector of T A with the same eigenvalue t, up to a constant offset ν. Let us assume without loss of generality ν ¼ 0, because this offset can be absorbed in T A by shifting Assume the environment erases a subsystem i chosen at random with probability q i ¼ 1=n. Then, the environment gets the information represented by the complementary channel (14). That is, if the original state is jxi L , then the environment gets the state ρ x i ¼ tr AnA i ðjψ x ihψ x j L Þ on subsystem i with probability 1=n. Yet, because the charge observable is local, the environment can gain information about the expectation value of the charge. Indeed, for any jxi L , where the first equality holds because the code is covariant and the second because the charge is local. Hence, if we define the observable Z C 0 E ¼ n P i jiihij C 0 ⊗ T i on the environment systems, we have making it clear that the environment can measure the average charge using the information it has available. Surely, if the charge expectation value leaks to the environment, then the code must be bad. However, the accuracy of the code is measured in terms of an entanglement fidelity (worst-case or fixed input) to the identity channel. Hence, it still remains to relate the accuracy of the code to the environment's ability to access the code word's total charge. On one hand, we observe that the difference in expectation value of Z C 0 E on the environment can be translated into a distinguishability of code words in terms of the trace distance. More precisely, in our case, consider two logical charge eigenstates jϕ AE i L corresponding to the maximum and minimum eigenvalues of T L . Then, we may exploit the characterization of the trace distance as δðρ; σÞ ¼ max Q tr½Qðρ − σÞ=kQk ∞ for any states ρ, σ and where the optimization is over all Hermitian operators Q, to see that where ΔT L is the spectral range of T L , i.e., the difference between the maximum and minimum eigenvalue of T L . We assume here for simplicity that the maximum and minimum eigenvalues of T i are equal in magnitude, such that On the other hand, if the environment's states are distinguishable for different code words, then the accuracy of the code is bad; specifically, we can show that, for any two logical states jxi L ; jx 0 i L , we have (Supplemental Material [37], Lemma 28) By combining the above, we establish our simplified main result. Theorem 1. The performance of the covariant code Eð·Þ ¼ Vð·ÞV † under the above assumptions, quantified by the worst-case entanglement fidelity, is bounded as follows: where ΔT L (respectively, ΔT i ) is the difference between the maximum and minimum eigenvalue of T L (respectively, T i ).
One can also derive a bound on the figure of merit ϵ e introduced in Eq. (9a): where sðT L Þ and s 0 ðT L Þ are measures of the spread of the eigenvalues of T L . These are defined more precisely as where μ is the median of the eigenvalues of T L counted with multiplicities, and These quantities, unlike ΔT L , take contributions from all eigenvalues of T L . In sðT L Þ, the median appears as the optimal solution to sðT L Þ ¼ d −1 L min μ kT L − μ1k 1 . The argument of the norm in s 0 ðT L Þ is simply the charge T L with a global shift that makes the operator traceless. Equation (27) is proven as a special case of Theorem 2 below.
The bound (27) is intuitively sensitive to the "average amount of logical charge" in absolute value, up to an arbitrary charge offset; this sensitivity makes sense, since the entanglement fidelity for the maximally mixed input state "only samples the average logical state." On the other hand, the worst-case entanglement fidelity picks up the worst possible situation, noticing that there are two states with maximally different charges; the bound (26) reflects that the code performs the worst for those input states.
In short, a covariant code with respect to a local charge may not perform well for correcting a single erasure at a known location, unless either it encodes the information into large physical systems, with a large range of possible charge values (max i ΔT i → ∞), or it encodes the information into many physical systems (n → ∞).
It is also possible to prove the bound (27) using a different approach (cf. Supplemental Material, Sec. B [37]), by studying the correlations induced by the code words between the local charges and the logical charge. The essence of this alternative argument goes as follows. If the code is covariant with respect to a continuous symmetry, then the global physical charge must be exactly correlated with the logical charge, and this constraint imposes a global constraint on the correlation functions of the local charges with the logical charge. On the other hand, for an approximate error-correcting code, the local reduced states of the code words must be nearly uncorrelated with the logical state to ensure that hardly any information leaks to the environment. Combining quantitative versions of these two statements provides an alternative proof of the bound (27) with s 0 ðT L Þ in the numerator (up to a constant factor).
We now present a theorem that generalizes Theorem 1 in the following ways. It allows for the code to only approximately conserve charge, considers erasures affecting multiple systems with arbitrary erasure probabilities, and does not require the charge to be strictly local; finally, it can be applied in situations in which the code words have most of their weight on a finite charge range (but may have distribution tails extending to arbitrarily large charge values). First, we introduce some definitions required to state the theorem. The setting of Theorem 2 is depicted in Fig. 4.
Consider an encoding map E which can be any completely positive, trace-preserving map from a logical space L to the physical space A ¼ A 1 ⊗ Á Á Á ⊗ A n . Let T L denote the logical charge operator and T A the corresponding global physical charge observable. Let K be a collection of subsets of f1; …; ng, let fq α g α∈K be a probability distribution, and let the noise channel N A→AC be given by Eq. (11). We further define the following. (a) The mapping E is charge conserving with respect to T L and T A if there exists ν ∈ R such that where Π ⊥ α projects onto the eigenspaces of T α whose eigenvalues do not lie in the interval ½t − We may now state our first main result in its following more general form.
Theorem 2. Suppose that E is charge conserving with respect to T L and T A . Let K 0 ⊂ K and assume that T A is K 0 local. Suppose that q α > 0 for all α ∈ K 0 . Then, An approximately charge-conserving encoding maps a logical state onto several physical systems. The noise acts by randomly erasing some subsystems and storing a record of which systems are erased in a register C. Which combinations of subsystems can be lost and with which probability can be chosen arbitrarily. The continuous symmetry is assumed to have a generator represented by T L on the logical system and by T A on the physical systems. We assume that T A can be written as a sum of terms T A ¼ P T α , where each T α acts on a combination of subsystems that could possibly be lost to the environment. For instance, T A may include a term T 3;4;7 acting on systems A 3 A 4 A 7 only if the noise model is such that the systems 3, 4, and 7 have a nonzero probability of being simultaneously erased. The different terms may overlap and do not have to commute.
where h·i α ¼ P α∈K q α ð·Þ. Furthermore, we can easily incorporate a tolerance to maps that are only approximately charge conserving (or isometric encodings that are approximately covariant) or if the code words have negligible tails reaching far onto large charge eigenstates.
Corollary 3. Let δ ≥ 0 such that the map E is δ-charge conserving with respect to T L and T A . where For isometric encodings, the condition of being δ-charge conserving is the same as being approximately covariant. Our theorem holds also for encodings that are not an isometry, as long as they approximately conserve charge. The latter condition is stricter than being covariant. However, an approximately covariant channel encoding that does not approximately preserve charge can still fit in the context of Theorem 2, by explicitly considering instead its covariant Stinespring dilation [38][39][40][41] into an ancilla system which is then erased by the environment with certainty as part of the noise channel (see, for instance, Ref. [24]).
Theorem 2 requires the locality structure of the charge to be compatible with the locality of the error model. That is, for each term T α in the charge, there must be a nonzero probability of simultaneously losing the corresponding subsystems to the environment. If this situation is not the case, then a code can conceal the global charge value from the environment through correlations between subsystems that are not accessible to the environment. For instance, consider the [ [4,2,2]] code which can correct one erasure [42]. It has a 2-local logical operator Q ¼ X ⊗ X ⊗ I ⊗ I, which we can exponentiate to generate a Uð1Þ rotation of the first encoded logical qubit. The code is exactly Uð1Þ covariant and can also correct single erasures exactly.
Corollary 3 also makes it clear that the term ΔT α in Theorem 2 and ΔT i in our simplified main result Eq. (26) are proxies for measuring the local charge fluctuations of the code word states. For a fixed η > 0 and a fixed encoding E, if we need cutoffs t AE α with a large range Δt α ¼ t þ α − t − α , this result means that, after cutting tails with total error η, the code words have local reduced states that have support over a large range of charge values. The quantities ΔT α in Theorem 2 and ΔT i in Eq. (26) are special cases for η ¼ 0 with trivial cutoffs t AE α . The proof of Theorem 2 is provided in Supplemental Material, Sec. A [37]. The proof is split into two parts. The first part shows that there exists an observable accessible to the environment which is able to infer the global logical charge to a good approximation. The second part deduces from the existence of such an observable that the code must necessarily have limited performance, as quantified by various entanglement fidelity measures.

V. CRITERION FOR CERTIFYING CODE PERFORMANCE
Here, we introduce a criterion that allows us to certify a given encoding as performing accurately as an approximate error-correcting code against any given noise channel, as measured by the worst-case entanglement fidelity. Proving that a code has a good entanglement fidelity for the maximally mixed input state [i.e., showing that ϵ e ðN ∘EÞ is small] is perhaps comparatively easier, as one can attempt to guess a suitable recovery map for a maximally entangled input state and directly compute the fidelity of recovery. The method we present provides an upper bound to the stricter measure ϵ worst ðN ∘EÞ and does not require us to come up with explicit recovery procedures.
Intuitively, if we consider erasures at known locations, we can expect that if all local reduced states of code words look alike independently of the logical information, then the code performs well. That is, if for each individual subsystem each code word has the same reduced state, then, because the environment gets access only to those individual reduced states, it obtains no information about the code word and the erasure is, thus, correctable. This intuition is correct in the exact case, but in the approximate case the fact that the entanglement fidelity is defined with a "stabilization" over a reference system poses an additional challenge [43]. Our solution is to consider how logical operators of the form jxihx 0 j are encoded, where fjxig is any fixed basis of the logical system. In the case of a single erasure at a known location, we define noting that ρ x;x 0 i is a quantum state if x ¼ x 0 but is not even necessarily Hermitian for x ≠ x 0 . Our criterion then states the following: If the states ρ x;x i are approximately independent of x, and if each ρ x;x 0 i for x ≠ x 0 has a very small norm, then the code is a good approximate error-correcting code against erasure of subsystem i.
Our criterion is a variant of the approximate Knill-Laflamme conditions of Bény and Oreshkov [30] in a particular basis. The nontrivial part of our condition is the simple and practical conditions on how to bound the error parameter ϵ worst of the code.
Proposition 4. For any completely positive, tracepreserving maps E and N (the encoding and noise channels, respectively), let d N ∘E be a complementary channel of N ∘E. Fixing a basis of logical states fjxig, define Assume that there exists a state ζ, as well as constants ϵ, ν ≥ 0, such that Then, the code E is an approximate error-correcting code with an approximation parameter satisfying where d L is the logical system dimension.
If one of several noise channels is applied at random and it is known which one occurs, then Eq. (34) holds for the overall noise channel if the assumptions above are satisfied for each individual noise channel.
Note that the criterion holds for any arbitrary noise channel, not only for erasures at known locations. The proof of Proposition 4 is given in Supplemental Material, Sec. C [37].
Our criterion is a sufficient condition for a code to be approximately error correcting, but the condition is not necessary. When the criterion does not apply, we cannot draw any conclusion about the code's performance.
We note that our criterion does not make reference to individual Kraus operators of the noise channel, as the Knill-Laflamme conditions or their approximate versions do [26,30]. This property eases its application to largedimensional physical quantum systems.

VI. EXAMPLES OF COVARIANT CODES
Here, we study three classes of covariant codes that illustrate the behavior of our bound in regimes of either large subsystem dimensions or a large number of physical subsystems (Table I).
A. Three-rotor secret-sharing code In this subsection, we apply our criterion to a truncated version of a code introduced by Hayden et al. [12], linking that code to the well-known three-qutrit secret-sharing quantum polynomial code [44,45]. While illustrating how to use our criterion, it also provides a covariant code which performs well in the limit of code words covering a large range of physical charge on the subsystems.

Rotor version of the qutrit secret-sharing code
For our purposes, a quantum rotor [also, an Oð2Þ or planar quantum rotor] is simply a system with a basis fjxig that is labeled by an integer x ∈ Z indexing representations of Uð1Þ [46]. Consider the three-rotor code given in Ref. [12] defined by the map from L to where the states fjxig are eigenstates of the angular momentum operators T L and T A ¼ T 1 þ T 2 þ T 3 . This code can correct against the loss of any of the three subsystems [12]. Moreover, the code is covariant with respect to the charge T: A logical state jxi L is mapped onto a code word with the same total charge x.
Interestingly, this code is a natural rotor generalization of the three-qutrit secret-sharing code [44,45]. The three-qutrit code maps the basis vectors jji L (j ¼ 0, 1, 2) of a logical qutrit into the code words P k jk; k − j; k þ ji where the addition is modulo 3. Now, substitute each qutrit subsystem with a rotor. We obtain a code defined by the following encoding map: This code is not yet covariant with respect to the charge states jxi, as the charge of the code word corresponding to jxi L is not x. However, we may apply the isometry mapping jð:Þi → j−3ð:Þi on the first rotor and jð:Þi → j2ð:Þi on the second, yielding the encoding map (35). [In fact, the code (36) is covariant with respect to a different physical charge generator, T 0  is covariant with respect to the natural physical charge carried by three rotors, In this sense, the code (35) is a natural Uð1Þ-covariant generalization of the qutrit secret-sharing code.
In the following sections, we address the problem that the code words in Eq. (35) are not normalizable, by building suitable wave packet states. We normalize the code words in two different ways: The sharp cutoff selects a range of charges to use for each rotor and discards the rest, while the smooth cutoff imposes a Gaussian envelope on each rotor, thereby keeping all the states but making them less prominent as the charge increases [47] (see also related recent work [24]). Our noise model is one single erasure at a known location with probabilities q 1 ; q 2 ; q 3 ¼ 1=3, as given by Eq. (10).

Sharp cutoff
Let us now truncate the logical system L to a dimension of 2h þ 1 for some fixed h, so the charge with respect to which the system is Uð1Þ covariant becomes T L ¼ P h x¼−h xjxihxj L . The physical subsystems are truncated, in turn, to 2m þ 1 dimensions, so there are in total two parameters fh; mg that determine the ranges of the logical and physical charges. Normalizing the code words, the isometry becomes Since the code is covariant and finite dimensional, it does not allow for perfect error correction. We show that the code has an accuracy parameter which satisfies (cf. Supplemental Material, Sec. D. 1 [37]) By comparison, our bound (26) in this case reads There is a difference of a square root between the scaling of our actual code performance and of our bound. This difference is due to switching between the trace distance and a fidelity-based distance in both of our bounds and in the way we have applied our criterion to derive Eq. (38).

Smooth cutoff
We now consider a different approach to normalizing the code words: By using a Gaussian envelope, we can achieve a "smoother" cutoff in contrast to the sharp cutoff considered above (such an envelope is known to be optimal for finite-sized quantum clocks [48]). We impose an envelope controlled by a parameter w > 0 on the code states to make them normalizable. The encoding isometry V ðwÞ L→A now acts as with a normalization factor c w ¼ P ∞ y¼−∞ e −y 2 =ð2w 2 Þ . Note that the envelope does not disturb the symmetry-the code remains covariant, since all of the basis states used to write each logical state still have the same charge. We still consider a (2h þ 1)-dimensional logical system L in order to see how the bound scales in terms of h=w. The present code has an accuracy parameter satisfying (we defer calculations to Supplemental Material, Sec. D. 1 [37]) Our bound (26) in this case reads where we keep only the first order in h=w and where the logarithmic term results from cutting off the infinite tails of our code words. Hence, we see that the present code achieves approximately the scaling of our bound, as both expressions scale as h=w up to a logarithmic factor. We may ask for the reason of the discrepancy in the accuracy between the sharp and the smooth cutoff versions of our code. For the sharp cutoff the error parameter scales as ϵ worst ∼ ffiffiffiffiffiffiffiffi ffi h=w p , while for the smooth cutoff it scales approximately as ϵ worst ∼ h=w. This result can be explained from the following property of the infidelity. Loosely speaking, the error parameter ϵ worst is related to how much the local reduced state on a single system varies as a function of the logical state, as measured in terms of the infidelity [this relation can be seen from Eq. (12)]. While in both normalized versions of the above code, using either the sharp or the smooth cutoff, we are careful to ensure that all code words are close to each other, it turns out that code words with a sharp cutoff are in a regime where the infidelity is more sensitive to differences than the smooth cutoff. This sensitivity is because those code words have incompatible supports. More precisely, for any state ρ, the infidelity ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 − F 2 ðρ; ρ þ εXÞ p , for a small perturbation ρ → ρ þ εX, can grow like the square root of ε if ρ þ εX has overlap outside of the support of ρ, while it grows linearly in ε in well-behaved cases. The sharp cutoff belongs to the former regime, while in the case of the smooth cutoff the infidelity is better behaved.

B. Five-rotor perfect code
Here, we provide a rotor extension of the five-qubit perfect code [27,49] that can be tiled to construct holographic codes [7]. While qudit [50] and oscillator [51] extensions have been considered, a rotor extension is not as straightforward, because one has to take care of preserving the phases in the code states as needed to error correct erasures. Our rotor code is the limit of a sequence of qudit code words whose constituent phases approach multiples of an irrational number. This same trick has been used to obtain an irrational magnetic flux via a sequence of rational fluxes in the two-dimensional electron gas problem [52] as well as rotor limits of other Hamiltonians [46]. This limit is meant to be an idealization, since there is not enough storage space to measure an irrational number to infinite precision.
Let the dimension D of each of the five physical subsystems be finite for the qudit ½½5; 1; 3 Z D code and infinite for the rotor ½½5; 1; 3 Z code. The general form of the unnormalized encoding for both codes is We introduce the rotor code as a limiting case of the qudit code, obtaining a concise expression for the qudit perfect tensor T ðDÞ in the process.

Qudit version
Consider first the known finite-D case, for which [53] T ðDÞ jklmnx ¼ δ where δ and ω is a primitive Dth root of unity. Notice how the above expression makes the cyclic permutation symmetry naturally manifest. The delta function encodes the state label x into the sum of the physical qudit variables, with the key difference from the sharply cutoff ½½3; 1; 2 Z code being that the sum is modulo D. This property makes this code exactly error correcting and not covariant with respect to a Uð1Þ symmetry. Instead, this code is covariant with respect to a Z D symmetry generated by Z ⊗5 , where Z ¼ P k∈Z D ω k jkihkj is the qudit Pauli matrix.

Smooth cutoff
To take the qudit-to-rotor limit, pick ω ¼ expð2πiL=DÞ with incommensurate integers L; D → ∞ such that L=D approaches a positive irrational number Φ. The indices in Eq. (43) now range over Z: and δ is the usual Kronecker delta function. The final ingredient is to normalize the states, which can be done via a sharp or a smooth cutoff as in the ½½3; 1; 2 Z code. We perform the latter using a cyclically symmetric Gaussian envelope with spread w, prepending exp½−ð1=4w 2 Þðj 2 þ k 2 þ l 2 þ m 2 þ n 2 Þ to the tensor T ð∞Þ jklmn in Eq. (43), and then normalizing the code words. The resulting code is covariant with respect to a Uð1Þ symmetry generated by the total physical charge T A ¼ P 5 i¼1 T A i , analogous to the three-rotor code (40). With the addition of the envelope, the resulting tensor becomes approximately perfect. This rotor version can be stacked to form an approximately errorcorrecting Uð1Þ-covariant holographic code in the same way as the qubit perfect tensors are connected in Ref. [7].
One can apply the certification criteria to this code to yield the same scaling as for the three-rotor code (41) for the model of a single erasure (see Supplemental Material, Sec. D. 2 [37] for details): However, this code is capable of correcting any singlesubsystem error, so it can correct for known erasure of any two subsystems. Calculating the bound for the noise channel N consisting of erasure of any two sites with equal probability yields the same scaling: The larger coefficient is sensible, since a code approximately correcting at most two erasures should be better at correcting only one. In both cases, there are additional corrections of the order of Oðhe −cw 2 Þ for c > 0 arising from a detailed application of our criterion.
C. Thermodynamic codes for n → ∞ We now investigate a class of covariant codes in the limit where the number of subsystems n grows large. We exploit the codes developed in Ref. [8], relevant for quantum computing with atomic ensembles [54].
For these codes, the basis vectors for the code space can be chosen to be energy eigenstates of a many-body system, with the property that the reduced state on a subsystem appears to be thermal with a nonzero temperature; we therefore call them thermodynamic codes. This thermal behavior of local subsystems is expected for closed quantum systems that satisfy the eigenstate thermalization hypothesis [55] or dynamical typicality [56,57] (states exhibiting many-body localization or the eigenstate thermalization hypothesis have been prepared experimentally [58]). Energy eigenstates with slightly different values of the total energy also have slightly different values of the locally measurable temperature; thus, the identity of a code word is imperfectly hidden from a local observer, and, therefore, erasure of a subsystem is imperfectly correctable.
Consider a many-body system, such as a onedimensional spin chain, and pick out two global energy levels jEi A and jE 0 i A in the middle of the spectrum, with a given energy difference ΔE ¼ E 0 − E. Assume, in the spirit of the eigenstate thermalization hypothesis, that the reduced states of both jEi A and jE 0 i A on each individual system A i are approximately thermal. The corresponding temperature scales as T ∝ E=n, since the temperature is an intensive thermodynamic variable. Then, the temperature difference vanishes for n → ∞, and the resulting reduced thermal states for these two states are very close. Intuitively, this result means that if a system A i is provided to the environment, the latter cannot tell whether the global state is jEi or jE 0 i, and, hence, the two energy levels form a twodimensional code space that is approximately error correcting against erasures at known locations.
For example, consider the code developed in Appendix D in Ref. [8], in the context of a 1D translation-invariant Heisenberg spin chain. Here, we consider as the relevant charge the total magnetization M ¼ P σ i Z of the spin chain. The code words jh n m i in Appendix D in Ref. [8] are Dicke states with respect to total magnetization-i.e., they are a superposition of canonical n-spin basis states that all have some fixed magnetization m: The code is covariant with respect to total magnetization by construction, by defining the magnetization charge operator in the abstract logical system to correspond to the magnetization of the corresponding code word. The values m are spaced out by steps of 2d þ 1, thus ensuring that any errors which change the magnetization by at most 2d cannot cause logical bit flips. This trick-using a sufficiently large spacing between code words so that they are not mapped into each other by errors-has analogs in Calderbank-Shor-Steane codes, related multiqubit codes [59], and bosonic error correction [60]. However, to show that such errors are indeed correctable, one still has to make sure that expectation values of errors with each code word do not depend on the code word in the large-n limit. This code's approximation parameter as an approximate error-correcting code against the erasure of a constant number of sites scales as (cf. Supplemental Material, Sec. D. 3 [37]). On the other hand, our bound (26) also displays the same scaling: In consequence, this code has an approximation parameter that displays the same scaling as our bound, meaning that our bound is approximately tight in the regime n → ∞.

D. Thermodynamic codes with an Ising Hamiltonian
A noteworthy feature of Theorem 2 is that the physical observable T A can include terms fT α g which act on overlapping subsystems. In particular, then, T A could be the Hamiltonian of a many-body quantum system in which the subsystems fA i g have nontrivial interactions.
Several examples of approximate quantum errorcorrecting codes in interacting many-body systems are already discussed in Ref. [8]. Here, we present a simple illustrative example showcasing the application of our general theorem. Consider a simple 1D quantum Ising spin chain at zero field, described by the Hamiltonian on n sites and with an open boundary condition. Energy eigenstates are diagonal in the Z basis, where the total energy is the number of domain walls-that is, the number of links with σ Z i−1 σ Z i equal to −1. We can define a code in the same spirit as the Dicke-state code described above, where the code word jmi is now a uniform superposition of all states with exactly m domain walls. Again, we need to choose a restricted set of values for m in order to ensure good properties of the code.
To construct the code formally, we observe that, under a well-known duality transformation [61,62], the Ising spin chain Hamiltonian (51) is equivalent to the noninteracting HamiltonianH which, except for the first site i ¼ 1, is the same as the magnetization operator considered in our discussion of the thermodynamic code in Sec. VI C. This correspondence is established directly on the basis states fj⃗ xig ¼ fjx 1 i ⊗ Á Á Á ⊗ jx n ig of the full Hilbert space, where ⃗ x is a bit string and the states jx i ¼ 0; 1i are eigenstates of the σ Z i operator. We encode this bit string into another bit string ⃗ sð⃗ xÞ that provides the value of the first bit and all pairwise consecutive parities, namely, s 1 ¼ x 1 and s i ¼ x i−1 þ x i ðmod 2Þ for 2 ≤ i ≤ n. Clearly, this mapping is one to one and onto acting on the set of all bit strings of length n. Denote by U the unitary on the n-site Hilbert space that implements this transformation, i.e., U ¼ P ⃗ x j⃗ sð⃗ xÞih⃗ xj. We see that σ Z i j⃗ sð⃗ xÞi ¼ ð−1Þ s i j⃗ sð⃗ xÞi ¼ ð−1Þ x i−1 þx i j⃗ sð⃗ xÞi and, thus, The HamiltonianH is exactly the same operator as the magnetization operator in the thermodynamic code of Sec. VI C on the n − 1 the sites labeled by i ¼ 2; …; n, with a dummy site at i ¼ 1. Using the code words j0i 1 ⊗ jh n−1 m i 2…n which force the dummy site to the constant state j0i, we still have a code with the same asymptotic properties as before (the dummy site cannot impact negatively the error-correction properties of the code). Similarly, any operator supported on d − 1 consecutive sites is mapped under the unitary U to an operator that has support on at most d sites. Hence, the erasure of d − 1 consecutive sites in the mapped model corresponds to erasure of at most d consecutive sites in the original model, which is correctable. Our construction, thus, defines a code that is covariant with respect to the Ising Hamiltonian, with distance d − 1 and with ϵ worst ðN ∘EÞ ≤ Oð1=nÞ.
Although the overlapping terms in Eq. (51) all commute pairwise, we emphasize that Theorem 2 does not require these terms to commute. In consequence, one can study the error-correction accuracy of codes that are defined using more complicated many-body models [8], going beyond the rather simplistic model presented here.
Being able to characterize the performance of codes in which subsystems interact is helpful for potential applications of our results. For example, in quantum metrology, the probe detecting a weak signal might contain many mutually interacting particles. In the AdS/CFT correspondence (see Sec. IX), the charge is the energy of a conformal field theory; in a lattice regularization of this theory, the subsystems are lattice sites with strong nearest-neighbor interactions.

VII. CODES WITH A UNIVERSAL TRANSVERSAL GATE SET
Our second main technical contribution is a robust version of the Eastin-Knill theorem for quantum computation. The goal of this section is to extend Theorem 1 to impose restrictions on the error-correcting infidelity of any code that admits a universal transversal gate set, in terms of the dimensions of the logical and physical systems. As is seen intuitively in Fig. 1, a code for which any logical unitary can be carried out transversally is, in fact, covariant with respect to the full unitary group on the logical space Uðd L Þ. Theorem 1 can therefore be applied to any generator of Uðd L Þ to yield a lower bound on the infidelity of recovery after erasing a system.

A. Bound on error-correcting infidelity
In the setting of the Eastin-Knill theorem, we consider a code for which there would exist a mapping that associates to any logical unitary U L a transversal physical unitary U A ðU L Þ whose action on the logical space is U L . In order to apply our Theorem 1, we need to ensure that the assumptions of our theorem are met by showing that the code is covariant with respect to a tensor product representation of Uðd L Þ.
Because the unitary U A ðU L Þ outside the code space can be arbitrary, this mapping neither has to be continuous nor does it have to be compatible with the group structure on the full physical space. Because these properties are required in the definition of a group representation, one might fear that there is no bona fide group representation under which this mapping is Uðd L Þ covariant.
We show that we can assume Uðd L Þ covariance without loss of generality: Intuitively, as long as one can generate logical unitaries that are close to the identity with a transversal physical unitary, one can show that there are corresponding physical generators which can be used to define a representation. The same conclusion applies if the physical unitaries do not exactly implement a logical U L gate, as long as logical unitaries can approximated to arbitrary precision, which is the case, for instance, if the gates are compiled from a suitable generating set of gates. We prove the following proposition (see proof in Supplemental Material, Sec. E. 1 [37]).
Proposition 5. Let V L→A be any code, with A ¼ A 1 ⊗ Á Á Á ⊗ A n . Let fG x g be a set of unitaries (the set may be discrete or continuous) that generate the full special unitary group SUðd L Þ. Suppose that for each G x there exists a transversal physical unitary that implements it; i.e., there exists U A ðG Then, there exists a tensor product representation of Uðd L Þ on A with respect to which V L→A is covariant.
The bounds derived in Theorems 1 and 2 cannot, in general, be directly related to the dimension of the local physical subsystems, because there is, in general, no dimensional-dependent restriction on how large ΔT i can be. The only restriction that enters the statement of Theorems 1 and 2 is that a logical charge eigenstate must be mapped onto a global physical eigenstate of the same charge (up to a constant offset); the logical charge operator and the local physical charge operators may otherwise be chosen arbitrarily. For example, the repetition code spanned by fj000i; j111ig with logical charge δσ z , physical charge Mσ The above observation is an expression of the fact that the covariance is with respect to an Abelian symmetry group [Uð1Þ]. In contrast, for non-Abelian Lie groups, one may no longer choose the generators arbitrarily, because they have to obey nontrivial commutation relations with each other. Consider, for instance, a code that is covariant with respect to spin, where the group is SUð2Þ. The three generators of the corresponding Lie algebra, J x , J y , and J z , satisfy the commutation relations ½J x ; J y ¼ iJ z along with the corresponding cyclic permutations of x, y, z. We know in the case of SUð2Þ that the irreducible representations are labeled by a spin quantum number j that is a positive integer or half-integer, that the generator J z in this representation has nondegenerate eigenvalues m ¼ −j; −j þ 1; …; þj, and, hence, that the dimension of the irreducible representation labeled by j is 2j þ 1. By rotational symmetry, the same holds for any other standard generator in that irreducible representation by choosing an appropriate basis. In other words, if the dimension of a physical subsystem is small, we cannot "fit" a generator on that system with a large range of angular momentum values. More precisely, if T z i is the spin generator corresponding to J z on the ith physical subsystem, the largest irreducible representation that can appear in the action of T z i must fit in the physical subsystem; that is, we may not have any j larger than ðd i − 1Þ=2, where d i is the dimension of the ith physical subsystem, or else the representation is too big. In turn, this constraint bounds the range of J z charge values as ΔT z i ≤ d i − 1. Hence, if we encode a qubit using a code that admits a universal set of transversal logical unitaries, we may apply our bound (26) Thus, the non-Abelian nature of the group SUð2Þ allows us to bound the expression in Eq. (26) directly in terms of the dimensions of the local physical subsystems. This result is because, physically, the generators J x;y;z of SUð2Þ correspond to rotations around different axes, and the Lie algebra commutation relations require all of them to be of a similar scale. No such requirement is present for Uð1Þ, since we are free to rotate around a chosen axis arbitrarily quickly.
In the case of a code that is covariant with respect to SUðdÞ with d > 2, the dependence on the physical subsystem dimensions becomes considerably more restrictive. We provide an overview of our argument, leaving technical details to Supplemental Material, Sec. E. 2 [37]. Irreducible representations, or irreps, of SUðdÞ are indexed by d − 1 non-negative integers ðλ 1 ; λ 2 ; …; λ d−1 Þ ≡ λ arranged in decreasing order. These integers determine the largest eigenvalues of the now d − 1 commuting generators of SUðdÞ. For SUð2Þ, only one generator J z is diagonal in the canonical basis, and the integer λ ¼ λ 1 ¼ 2j determines the highest spin attainable in that irrep. For the fundamental representation λ ¼ ð1; 0Þ of SUð3Þ, the two simultaneously diagonalizable generators are the two Gell-Mann matrices that are diagonal in the canonical basis. Since the entries in λ are decreasing, the largest eigenvalue that any generator could have is λ 1 ; i.e., kT ðiÞ λ k ∞ ≤ λ 1 . It turns out that the irrep that minimizes the dimension out of all irreps with fixed λ 1 is the completely symmetric irrep ðλ 1 ; 0; 0; …; 0Þ. The dimension of this irrep is the dimension of the symmetric subspace on λ 1 number of d-dimensional systems, which is a polynomial of degree d − 1 in λ 1 . Therefore, in order to fit in a system of dimension d i , the largest possible λ 1 is of the order of Oðd 1=ðd−1Þ i Þ. Now, any general representation can be decomposed into irreps, and a generator T is simply T ¼ ⨁T λ , where T λ is the corresponding generator for each irrep. We then have kTk ∞ ¼ max λ kT λ k ∞ . So, if a representation fits in the system dimension d i , then it cannot contain any irrep λ with λ 1 larger than Oðd For a code that is covariant with respect to the full unitary group on the logical space, we have d ¼ d L , and picking a simple standard generator for our earlier bound (26), we obtain the following theorem.
Theorem 6. (Approximate Eastin-Knill theorem for quantum computation). Consider a SUðd L Þ-covariant code as in Fig. 1. Then, the local subsystem dimensions must obey A similar bound can be obtained for the figure of merit ϵ e , based on the (fixed-input) entanglement fidelity, by making in Eq. (54a) the replacement ϵ worst → d L ϵ e =2.
In other words, any code that (a) stores a large amount of quantum information and (b) admits universal transversal gates has severe restrictions on its ability to recover from erasure errors.
If ϵ worst is kept constant and for d L → ∞, then we can ignore the second term in Eq. (54b), and we see that there must be an i for which lnðd i Þ grows linearly in lnðd L Þ with a proportionality factor 1=ð2nϵ worst Þ. We can imagine that each physical subsystem of the physical system is composed of m i ∼ ln d i qubits lumped together. Then if, for instance, we wish to achieve a precision of ϵ worst ∼ 10 −3 , then we must have the scaling lnðd i Þ ≳ ð500=nÞ lnðd L Þ, or, equivalently, m i ¼ log 2 ðd i Þ ≳ ð500=nÞ log 2 ðd L Þ. Concretely, for ten logical qubits (d L ¼ 2 10 ) encoded into n ¼ 10 subsystems, Eq. (54b) tells us that at least one physical subsystem needs to be of a respectable dimension log 2 ðd i Þ ≥ 216 qubits; i.e., at least one of the unitary tensor factors in the physical transversal unitary must act jointly on m i ≥ 216 qubits lumped together into a single physical subsystem.
In order to consider the regime of extremely high accuracy, we can recast the bound (54a) as CONTINUOUS SYMMETRIES AND APPROXIMATE QUANTUM … PHYS. REV. X 10, 041018 (2020) 041018-17 (see proof in Supplemental Material, Sec. E. 2 [37]). Suppose we wish to accurately resolve individual logical basis states of a highly mixed logical state. The logical information might, for instance, be entangled with a large reference system. In such a situation, we require ϵ worst ≲ d −1 L . Bound (55) then asserts that, at constant n, the physical subsystem dimension must grow exponentially in the logical system dimension.
From Theorem 6, we can further write (see proof in Supplemental Material, Sec. E. 2 [37]). The bound (56) is useful to determine the precision limit of a code that has a universal set of transversal gates. If we imagine that each physical subsystem is composed of m i ¼ log 2 ðd i Þ qubits lumped together, then the error parameter of the code scales at least inversely in the largest number of qubits m i that are lumped together. If we consider, for instance, ten logical qubits (d L ¼ 2 10 ) that are encoded into n systems consisting of ten qubits each, i.e., d i ¼ 2 10 , we obtain the rather prohibitive error parameter ϵ worst ≳ 0.14=n. In this example, we can improve this estimate to ϵ worst ≥ 0.5=n by using Eq. (54a) directly: If max i d i ¼ d L , we must have ⌈½2nϵ worst −1 ⌉ ≤ 1, because any larger value would make the binomial coefficient too large to satisfy Eq. (54a).

B. Random constructions
The bounds of Theorem 6 severely limit the errorcorrection capability of the unitary SUðd L Þ-covariant codes. We now show that it is possible to find good SUðd L Þ-covariant codes in regimes of large physical systems that are not excluded by Theorem 6.
The constructions we present are randomized as well as asymptotic in the dimension of the physical subsystems. More precisely, we consider the encoding of one d Ldimensional Hilbert space H L in a physical space which is a tensor product of three Hilbert spaces The encoding is done via an isometry V L→A , which is Uðd L Þ covariant: For all U ∈ Uðd L Þ, Here, r 1 , r 2 , and r 3 are three irreps of Uðd L Þ. Our constructions are randomized in the following way: (i) V is chosen randomly from all possible isometries satisfying the covariance condition (57); (ii) the irreps r 1 , r 2 , and r 3 are chosen randomly, or at least generically. In fact, we need only that the irreducible representation does not belong to a small subset of all possible irreducible representations. We use randomized constructions to prove the existence of Uðd L Þ-covariant codes with a small error [measured by ϵ e based on the (fixed-input) entanglement fidelity], as summarized in the following theorem. We refer to the Supplemental Material, Sec. F [37] for a complete proof.
Theorem 7. For d L ≥ 4 and every ϵ > 0, there exists a Uðd L Þ-covariant code with error ϵ e ≤ ϵ and physical dimensions d i , i ∈ f1; 2; 3g, such that for some C 2 which is only a function of d L .
It is not clear how to compare the performance of our code given by Eq. (58) to our bounds of Theorem 6, because our nonconstructive proof does not specify the behavior of C 2 as a function of d L , which is given by details of the representation theory of Uðd L Þ. It remains open whether the lower bound can be strengthened or the constructions can be improved.
Our proof technique does not immediately work for Uð2Þ-covariant codes, as it is harder to bound the fluctuations of the fidelity of recovery when the logical Hilbert   FIG. 5. Smoothness of the Littlewood-Richardson coefficients, required for our proof that random covariant codes can asymptotically correct against errors. A Littlewood-Richardson coefficient c λ μν is the coefficient that counts the degeneracy of the Uðd L Þ irrep labeled by the Young diagram λ in the tensor product of two other irreps labeled by μ and ν. The Littlewood-Richardson coefficients are nonzero in a convex cone in the space of ðμ; ν; λÞ. This cone-or chamber complex-is divided into several smaller convex cones-or chambers-in which c λ μν is a polynomial of μ, ν, and λ. Hence, a generic choice of irreps on which we choose a random code has corresponding coefficients that are smooth, which we show implies good asymptotic performance of the code.
space is too small. For Uð3Þ-covariant codes, our methods lead to codes with a slightly different scaling from Eq. (58). In fact, for the Uð3Þ case, one can provide randomized and nonasymptotic constructions (which work for known finite physical dimensions) using the explicit formulas for the Littlewood-Richardson coefficients [63]. These constructions are not included in the present paper, as there is little specific interest in the d L ¼ 3 case.
The proof of Theorem 7 is technical and relies on the representation theory of the unitary group (cf. Supplemental Material, Sec. F [37] for details). The proof starts by connecting the average fidelity recovery of erasure of a fixed subsystem to the smoothness of the Littlewood-Richardson coefficients. Littlewood-Richardson coefficients are representation theory quantities that count the degeneracy of a particular irrep of Uðd L Þ in the tensor product of two other irreps, and their smoothness follows from modern results in representation theory of the unitary group [63] (Fig. 5).

C. Generalized W-state encoding
Here, we consider another example of an approximate quantum error-correcting code, covariant with respect to the full unitary group on the logical system. It is based on the W state and achieves an arbitrarily small ϵ worst in the limit of a large number of subsystems, n → ∞. The logical system L of dimension d L is encoded into a physical system composed of n copies of a ðd L þ 1Þ-dimensional space, where each subsystem is a copy of the logical system with an additional basis vector j⊥i. The encoding is Remarkably, aside from being Uðd L Þ covariant, this trivial code is also effective against random erasures. Intuitively, there is only a probability 1=n that the logical state jψi is stored on the subsystem the environment chose to access; that is, the environment is unlikely to learn anything about the logical state. This effectiveness can be formalized with a direct application of our criterion (Proposition 4). Given a basis jxi L of L, the reduced state ρ x 1 on any single physical subsystem of the code word (59) corresponding to jxi L is and, thus, and, thus, kρ x;x 0 1 k 1 ¼ 1=n ≕ ν. The corresponding reduced states on the other physical subsystems are the same by symmetry of the code word (59). Then, Proposition 4 asserts that this code has an error parameter that is at most That is, for fixed d L , the code becomes a good errorcorrecting code in the limit n → ∞.
In contrast to the thermodynamic codes presented above, this W-state code does not saturate our bound on ϵ worst , which is inversely proportional to n rather than the square root of n. The reason for this discrepancy is the same as for the difference between a sharp and a smooth cutoff for the three-rotor code, discussed in Sec. VI A 3. Again, here, as n becomes large, the local reduced state grows close to the rank-deficient state j⊥ih⊥j, which is a regime where the infidelity is particularly sensitive to small perturbations. In contrast, for instance, our thermodynamic codes of Sec. VI C have reduced states that are full rank, allowing the code to achieve the same scaling as our accuracy bound as n → ∞. While this code does not achieve the same 1=n scaling as the thermodynamic codes, it does exhibit covariance with respect to the full logical unitary group Uðd L Þ.

VIII. ERROR-CORRECTING CODES FOR GENERAL GROUPS
In this section, we construct families of codes that are covariant with respect to any group G admitting a left-and right-invariant Haar measure, encompassing, in particular, codes that are based on rotors, oscillators, and qudits. Our construction is based on quantum systems that transform as the regular representation of G. Orthonormal basis states fjgig g∈G for this representation are labeled by group elements; if the group has an infinite number of elements, then the quantum system is infinite dimensional. Regular representations of a group are a useful tool to develop models in quantum information and quantum matter: Examples include Kitaev's quantum double model [2], dyonic models [64], generalized color codes [65], and generalized cluster states [66]. Our quantum errorcorrecting codes can also be seen as extensions to general groups of continuous variable codes [51,[67][68][69].
A qubit can transform as the regular representation of the group Z 2 , and a qudit as the regular representation of Z D . An oscillator provides a regular representation of the (noncompact) group R, with the group acting by translation in either its position basis fjxig or its momentum basis fjpig. Similarly, a rotor provides a regular representation of the group Uð1Þ, with orthonormal basis states fje iϕ ig; when Fourier transformed, it can transform as a regular representation of Z, where the basis states are the eigenstates of angular momentum fjlig l∈Z .
The present constructions are inspired by the three-rotor code of Ref. [12]. Our constructions differ from the other constructions of Ref. [12] for both infinite-and finitedimensional groups. It is shown there that covariant codes for infinite groups can be constructed by twirling a noncovariant encoding with two ideal reference frames; encodings considered in this section are instead isometric. In the construction of Ref. [12] for finite groups, the group permutes subsystems as opposed to acting on regular representations of the group; the approach considered here allows system sizes to scale linearly, instead of exponentially, in the group size.
For ease of presentation, we consider codes whose logical system and whose physical subsystems transform as the regular representation of any compact group G, commenting on noncompact groups in Sec. VIII C. Wellknown qubit codes such as the bit-flip, phase-flip, and ½½4; 2; 2 codes naturally extend to this setting. More generally, we also discuss extensions of the ½½m 2 ; 1; m and ½½2m; 2m − 2; 2 qubit codes. where δ x;y ¼ 1 if x ¼ y modulo 2. Bit-flip codes protect against single-qubit shifts x → x þ 1, while phase-flip codes protect against single-qubit operators which are diagonal in the canonical basis. By viewing a qubit as a regular representation of the group G ¼ Z 2 , we can see how to generalize this construction to other groups. For a finite group G with order jGj, consider the jGj-dimensional Hilbert space V spanned by fjgijg ∈ Gg with inner product hgjhi ¼ δ g;h , where δ g;h ¼ 1 if g and h are the same group element and zero otherwise. For compact continuous groups, the Hilbert space is infinite dimensional, and δ g;h becomes the Dirac delta function-infinite when g ¼ h and zero otherwiseand sums ð1=jGjÞ P h∈G are replaced by integrals R dg, where dg is the group's normalized Haar measure [70,71]. We write sums below for simplicity, with the understanding that the sum is to be replaced by an integral when G is a compact Lie group.

A. Bit-and phase-flip codes
The respective M ¼ 3-subsystem bit-and phaseflip generalizations of Eq. (63) for finite groups are, respectively, jgi bit L → jg; g; gi; ð64aÞ The bit-flip encoding records a group element redundantly, while the phase-flip encoding hides g in a product of three group elements. The error-correction properties of these codes are analogous to those for G ¼ Z 2 : The bit-flip codes correct against errors which take individual subsystems into states orthogonal to jgi, while phase-flip codes correct against single-subsystem errors diagonal in the jgi basis.
To perform an X-type gate on these codes, introduce left and right multipliers ⃗ X g and ⃖ X g , which act as ⃗ X g jhi ¼ jghi and ⃖ X g jhi ¼ jhgi: The sets f ⃗ X g g g∈G and f ⃖ X g g g∈G are permutation matrices forming the left and right regular representations of G. Note that the arrow points toward h from the side that g acts. Since multiplying from the left commutes with multiplying from the right, the two sets commute with each other.
For the bit-flip code (64a), the logical left multiplication gate can be implemented transversally: For the phase-flip code, which provides no protection against bit flips at all, logical left multiplication is implemented by acting on a single subsystem: where I is the subsystem identity. Similar constructions hold for logical right multipliers. For continuous G, the code states become nonnormalizable, but the gates work the same way. Therefore, the logical operators ⃗ X L;k define exact continuous symmetries of these codes. However, these codes do not correct erasure of a subsystem; rather, each code corrects only a limited set of single-subsystem errors. The same is true for the qubit codes that inspired this construction.
We can concatenate the bit-flip code and the phase-flip code for qubits to obtain Bacon-Shor codes [72,73], which have the parameters ½½m 2 ; 1; m Z 2 . This notation means that one logical qubit is encoded in a code block of m 2 physical qubits and that the code distance is m; hence, erasure of any m − 1 of the qubits can be corrected. Of the codes in this family, the best known are the ½½4; 1; 2 Z 2 errordetecting code [74,75] and Shor's nine-qubit ½½9; 1; 3 Z 2 error-correcting code [76].
Likewise, by concatenating the G-covariant bit-flip and phase-flip codes, we obtain the G-covariant ½½m 2 ; 1; m G code. For finite G, this code is a G-covariant encoding of a jGj-dimensional logical system in m 2 jGj-dimensional subsystems, protected against erasure of any m − 1 of the subsystems. If G is a compact Lie group, this code has continuous G symmetry. In that case, as the Eastin-Knill theorem requires, the encoding is infinite dimensional.
Rather than discussing this generalized Bacon-Shor code construction more explicitly here, in Sec. VIII B we provide a more detailed discussion of a related code, with two rather than just one jGj-dimensional logical subsystems.

B. The ½½4;2;2 G code and its generalizations
There is also a ½½4; 2; 2 Z 2 qubit code [77], which can be extended to a covariant ½½4; 2; 2 G code, with encoding map In fact, the ½½4; 2; 2 Z 2 code can be viewed as a minimal version of Kitaev's toric code [2], defined by just one plaquette operator and one star operator, and Eq. (69) defines the corresponding quantum double code with group G. Given l ∈ G, the physical operator I ⊗ I ⊗ ⃖ X l ⊗ ⃖ X l has the effect of replacing g 2 by g 2 l in Eq. (69), hence mapping the logical state to jg 1 ; g 2 li L . The physical operator ⃗ X l ⊗ I ⊗ ⃗ X l ⊗ I, after a redefinition of the summation variable (g → l −1 g 0 ), has the effect of replacing g 1 by lg 1 , hence mapping to the logical state to jlg 1 ; g 2 i L . Since the left and right multipliers commute, and both logical operations are transversal, the code is covariant with respect to the group G × G.
Using the quantum error-correction conditions [26,27], we can check that this code corrects one erasure. Let O 1 be an operator acting on the first subsystem, and consider its matrix element between code states. Plugging into Eq. (69) and contracting indices, we find acts on the code's basis states according to jg 1 ; g 2 ; g 3 ; g 4 ; g 5 ; g 6 i L → jg 1 h 1 ; g 2 ; g 3 h 3 ; g 4 ; g 5 h 5 ; g 6 i L : In general, the ½½2m; 2m − 2; 2 G code has a transversal G m−1 symmetry, acting similarly.

C. Further extensions and some limitations
One can extend these constructions to noncompact groups. For example, the oscillator ½½9; 1; 3 R code was noticed early on [51,67] (see also Refs. [68,69]). Another example is the rotor ½½4; 2; 2 Z encoding ja; bi → X j;k;l∈Z δ a;jþk δ b;l jj; k; j þ l; k þ li: As done in Sec. VI A, one can impose an envelope so that the code words are normalizable. In general, a bi-invariant Haar measure is sufficient to perform the left-and rightmultiplier transversal gates as well as the error correction, but one would have to approximate the code words to avoid infinities due to non-normalizable Haar measures. For the oscillator code ½½4; 2; 2 R , for which the above is an integral over oscillator position states, we additionally need to approximate the position states with a displaced and finitely squeezed vacuum [47]. In other words, noncompactness and the continuous nature of the group may each require approximations to achieve normalizability of the code words. One may also ask if it is possible to extend the secretsharing code ½½3; 1; 2 Z 3 from Sec. VI A to a more general group G. An extension does indeed work for G ∈ fR; Z; Z 2Dþ1 ; Uð1Þg, but the code breaks down at, e.g., Z 2D due to there being a non-measure-zero set of order-2 elements in the group. Writing a natural guess for the encoding, we see that the third subsystem stores the logical index "in plain sight" whenever h 2 ¼ 1. Roughly speaking, for groups with too many such elements, the environment can extract logical information from the code.

IX. SYMMETRIES AND ERROR CORRECTION IN QUANTUM GRAVITY
The interplay between continuous symmetries and quantum error correction has implications for holography and quantum gravity. The AdS/CFT correspondence [78,79] is a duality between quantum gravity in anti-de Sitter (AdS) space and a conformal field theory (CFT) in one fewer spatial dimensions, where the CFT resides on the boundary of the AdS space. It was recently discovered that the duality map from bulk operators to boundary operators may be regarded as the encoding map of a quantum errorcorrecting code, where the code space is spanned by lowenergy states of the CFT. Specifically, local operators deep inside the bulk AdS are encoded as highly nonlocal operators in the boundary CFT which are robust against erasure errors in the boundary theory [6,13,80]. Here, we discuss symmetries of this AdS/CFT code. First, we reprise a recent analysis from Refs. [15,16], which rules out exact global symmetries for quantum gravity in the bulk AdS space. Then, we explain how our results in this paper clarify the correspondence between time evolution in the bulk and boundary theories.

A. No bulk global symmetries
A longstanding conjecture holds that quantum gravity is incompatible with global symmetry. One argument supporting this claim goes as follows [81,82]. According to semiclassical theory, which should be reliable for large black holes, the Hawking radiation emitted by a black hole is not affected by the amount of global charge the black hole might have previously consumed. Therefore, a process in which a black hole arises from the gravitational collapse of an object with large charge, and then evaporates completely, will not obey charge conservation.
This argument may not be trustworthy if the symmetry group is a small finite group, in which case the total charge cannot be "large," and any missing charge might reappear in the late stages of black hole evaporation when semiclassical theory does not apply. But recently, Harlow and Ooguri used AdS/CFT technology to show that even discrete global symmetries are disallowed in the bulk [16]. Here, we reprise their argument, expressing it in language that emphasizes the conceptual core of the proof and that may be more accessible for those familiar with the formalism of quantum error correction.
To quantum coding theorists, it sounds strange to hear that the AdS/CFT code cannot have discrete symmetries, because typical quantum codes do. To illustrate this point, we revisit a simple quantum error-correcting code that is often used to exemplify the structure of the AdS/CFT code: the three-qutrit code [6], which we already discuss in Sec. VI A 1. This code encodes a single logical qutrit in a block of three physical qutrits and protects against the erasure of any one of the three qutrits.
The three-qutrit code is an example of a stabilizer codethe code space may be defined as the simultaneous eigenspace of a set of generalized Pauli operators. For a qutrit with basis states fjji; j ¼ 0; 1; 2g, the generalized Pauli group is generated by operators X and Z defined by where ω ¼ e 2πi=3 , which obey the commutation relations The code space of the three-qutrit code is the simultaneous eigenspace with eigenvalue 1 of the operators acting on the three qutrits in the code block. Note that, although X and Z do not commute, S X and S Z do commute and can, therefore, be simultaneously diagonalized. Any nontrivial weight-one Pauli operator (supported on a single qutrit and distinct from the identity) must fail to commute with at least one of S X or S Z . Therefore, no nontrivial weight-one operator preserves the code space, which is why erasure of a single qutrit is correctable. However, there are weight-two Pauli operators that commute with both S X and S Z and, therefore, preserve the code space; for example, Because they preserve the code space and act nontrivially on the code space, we say that X L and Z L are nontrivial logical operators for this code. Furthermore, X L and Z L obey the same commutation relations as X and Z; they generate the logical Pauli group acting on an encoded qutrit. Note that, because S X acts trivially on the code space, the operator X L , which is supported on the first two qutrits, acts on the code space in the same way as X L S X , which is supported on the first and third qutrits, and also in the same way as X L S −1 X , which is supported on the second and third qutrits. A similar observation also applies to Z L and S Z . This feature illustrates a general property: If O L is a logical operator and A is a subset of the qutrits in the code block such that erasure of A is correctable, then we may represent O L as a physical operator supported on the complementary set A c .
Our purpose in describing this code is just to point out that the transversal logical operators X L and Z L may be viewed as global symmetries of the code. The action of each of these operators on the logical system can be realized as a tensor product of single-qutrit operators. Such a symmetry is what Harlow and Ooguri rule out. We need to understand why their argument applies to the AdS/CFT code but not to the qutrit code or to other stabilizer codes.
Harlow and Ooguri use special properties of AdS/CFT in two different ways, and their argument proceeds in two steps. The first step (explained in more detail below) appeals to entanglement wedge reconstruction, together with the structure of global symmetries in quantum field theory, to show that any global symmetry acting on the bulk acts transversally on the boundary. That is, the boundary can be expressed as a union of disjoint subregions fA k g such that erasure of each A k is correctable, and any bulk global symmetry operator U L , when reconstructed on the boundary, can be expressed as a tensor product ⊗ k W k , where W k is supported on A k . (Here, we ignore a correction factor supported only where the regions touch, which is inessential to the argument.) This step is just the property that we have assumed throughout this paper and which is exemplified by the three-qutrit code discussed above.
The second step of the argument (also explained further below) is the crucial one, which invokes a property of the AdS/CFT code which is not shared by the typical quantum codes which arise in work on fault-tolerant quantum computation. Harlow and Ooguri argue that each W k is itself a logical operator; that is, each W k maps the code space to the code space. The essence of this part of the argument is that the code space is the span of low-energy states in the CFT, and the W k 's, perhaps after suitable smoothing, can be chosen so that they do not increase the energy of the CFT by very much. As we have already emphasized, this property does not apply to the three-qutrit code, where X L is a logical operator, yet its weight-one factors X ⊗ I ⊗ I and I ⊗ X −1 ⊗ I are not logical. Indeed, because X ⊗ I ⊗ I changes the eigenvalue of the unitary operator S Z by the multiplicative factor ω, it maps the code space (the simultaneous eigenspace of S Z and S X with eigenvalue 1) to a subspace orthogonal to the code space (the eigenspace of S Z with eigenvalue ω).
A logical operator supported on a region A, where erasure of A is correctable, must be the logical identity. We can easily see that is true, because otherwise an adversary could steal region A and apply a nontrivial logical operator, altering the encoded state and, therefore, introducing an uncorrectable error. Now the conclusion of Harlow and Ooguri follows easily. The bulk global symmetry operator U L is a product of logical operators, each of which is trivial; therefore, U L must be the identity.
As Harlow and Ooguri note (footnote 69 in Ref. [16]), their argument, which excludes discrete symmetries of the AdS/CFT code as well as continuous symmetries, is quite different than the Eastin-Knill argument, which excludes only continuous symmetries of a code. Both arguments apply in a framework where the symmetry of the code can be applied transversally, as a product of local operators. But, for the Eastin-Knill argument, there is no need to assume that these local operators individually preserve the code space, and, therefore, the argument applies to general codes. In contrast, Harlow and Ooguri assert that for the AdS/CFT code, in particular, the local operators do individually preserve the code space. Therefore, their argument excluding discrete symmetries applies to the AdS/CFT code but not to the typical codes studied by quantum information theorists.
For completeness, we now sketch the two key steps of the Harlow-Ooguri argument in slightly greater detail, starting with the step which shows that a bulk global symmetry acts transversally on the boundary. By definition, a global symmetry in the bulk maps a bulk local operator to another bulk local operator at the same position. Furthermore, a local operator in the bulk, as its position asymptotically approaches the boundary, becomes dual to a local operator on the boundary. It follows that a bulk local symmetry implies a corresponding symmetry of the dual boundary theory. Furthermore, a global symmetry operator of the boundary CFT is splittable [16]; that is, it can be expressed as a tensor product of many operators, each supported on a small region. In coding theory language, the encoding isometry V which maps bulk to boundary has the property where U L is the bulk symmetry operator and U CFT is the corresponding CFT symmetry operator. Because the CFT symmetry is splittable, we may consider decomposing the CFT into small spatial subregions fA k g and infer that where W k is a CFT operator supported on A k . Next, we would like to see that the boundary subregions can be chosen so that erasure of any A k is correctable. This point is most naturally discussed using the language of operator algebra quantum error correction [6]. We consider the subalgebra A of logical operators which are supported on a subregion of the bulk. Each logical operator O L ∈ A can be "reconstructed" as a physical operator O CFT acting on the boundary using the encoding isometry V: What we wish to show is that, for any O L in A, and for each boundary subregion A k , the reconstructed boundary operator O CFT can be chosen to have support on the complementary boundary subregion A c k . This property ensures that, for the bulk subalgebra A, erasure of boundary region A k is correctable.
The argument showing that erasure of boundary subregion A k is correctable is illustrated in Fig. 6. Associated with each boundary subregion A k is a bulk subregion a k which is called the entanglement wedge of A k . The AdS/ CFT code has these important properties [6]: (i) A bulk operator supported in bulk subregion a k can be reconstructed as a boundary operator supported in boundary subregion A k . This property is called subregion duality. (ii) Furthermore, a bulk operator supported in the bulk complement a c k of bulk subregion a k can be reconstructed as a boundary operator supported in the boundary complement A c k of boundary subregion A k . This property is called complementary recovery.
It follows from complementary recovery that if the bulk subalgebra A is supported in a c k , then erasure of boundary subregion A k is correctable for the subalgebra A. This result is the key fact that we need. As in Fig. 6, for any fixed subregion a 0 of the bulk, we can choose the decomposition of the boundary into subregions fA k g such that a 0 lies outside the entanglement wedge of each A k . Therefore, the algebra A of bulk operators supported on a 0 has the feature that erasure of each A k is correctable for the algebra A. This result completes the first step of the Harlow-Ooguri argument, showing that a bulk global symmetry operator U L must be transversal in the sense we assume in this paper-it factorizes as a tensor product of boundary operators, each of which is supported on a correctable boundary subregion.
Actually, so far, we ignore a subtlety in this argument associated with general covariance in the bulk [16]. Operators acting in the bulk are not really strictly local; rather, a bulk "local" operator is accompanied by gravitational dressing which connects it to the boundary. This dressing is needed in order to enforce invariance under bulk diffeomorphisms. Because the dressing extends to the boundary, it has support on at least one of the a k , and its reconstructed counterpart has support on at least one boundary subregion. However, this complication does not invalidate the argument, because the dressing is purely gravitational and is, therefore, oblivious to the global charge defined within the bulk subalgebra A. Now, we come to the second part of the Harlow-Ooguri argument, which establishes that the operator W k supported on boundary subregion A k is actually a logical operator. In the holographic correspondence, the choice of code space is actually rather flexible. One possible procedure [6] is to pick a set of local operators deep in the bulk, corresponding to highly nonlocal operators when reconstructed in the CFT. Then, the code space is spanned by polynomials of bounded degree in these operators acting on the CFT FIG. 6. Nontrivial bulk global symmetries are incompatible with the AdS/CFT quantum error-correcting code. A bulk global symmetry operator U L ðgÞ corresponds to a boundary global symmetry operator U CFT ðgÞ which is transversal with respect to the decomposition of the boundary into subregions fA k g: subregion a 0 is outside the entanglement wedge a k of each boundary subregion A k ; therefore, erasure of each A k is correctable for the algebra A of bulk local operators on a 0 . Furthermore, each W k ðgÞ maps low-energy states of the boundary CFT to lowenergy states. This result means that W k ðgÞ is a logical operator which preserves the code space of the CFT. A logical operator W k ðgÞ supported on a correctable boundary subregion A k must be the logical identity. Therefore, the global symmetry operator U L ðgÞ acts trivially on bulk local operators. vacuum state. The motivation for this choice is that each of the highly nonlocal CFT operators raises the energy of the CFT by only a small amount, hence producing only very weak backreaction on the bulk geometry. Logical operators are those that preserve this low-energy sector of the CFT, and Harlow and Ooguri assert that each operator W k can be chosen to have this property. Since W k preserves the code space and is supported on the correctable boundary subregion A k , it must act trivially on the code space. This assertion is affirmed if the code's logical operators may be regarded as bulk operators which are supported in a bulk region which is outside the entanglement wedge of the A k (such as the region a 0 in Fig. 6), since in that case each logical operator can be reconstructed on the complementary boundary region A c k , where W k acts trivially. Therefore, since each W k is a trivial logical operator, we conclude that the global symmetry operator U L is the identity acting on the code space.
In this argument, we assume that subregion duality and complementary recovery are exact properties of the AdS/ CFT code and, thus, infer that erasure of boundary region A k is exactly correctable. In fact, though, these properties of the code hold precisely only in the leading order of a systematic expansion in Newton's gravitational constant G N and can be modified when corrections higher order in G N are included. Nevertheless, the conclusion that bulk global symmetries are disallowed continues to hold even when these higher-order corrections are taken into account, assuming the corrections are small. A nontrivial global symmetry operation (if one were allowed), acting on a bulk local operator ϕ, should modify ϕ by an amount δϕ which is Oð1Þ, independent of G N . But we argue that δϕ ¼ 0 to leading order in G N (since exact correctability of A k holds to this order). Higher-order corrections might make an OðG N Þ contribution to δϕ, but these small corrections do not suffice to restore the proper nontrivial action on ϕ of the putative global symmetry. Now, we have found that exact bulk local symmetries cannot occur in AdS/CFT. But what can we say about whether approximate discrete global symmetries are allowed? As we discuss, finite-dimensional quantum error-correcting codes can have exact discrete symmetries, even though the AdS/CFT code does not. In this respect, discrete symmetries are essentially different than continuous symmetries, which are disallowed by the Eastin-Knill theorem for any finite-dimensional quantum code that can correct erasure of subsystems exactly. Therefore, we cannot expect to make general statements which are directly analogous to Theorem 2 about limitations on approximate discrete symmetries that apply to general codes.
Nevertheless, it may be instructive to study further the properties of approximate quantum error-correcting codes which are approximately covariant with respect to a discrete symmetry. In the setting of AdS/CFT, it is of particular interest to consider the case where the local transformations fW k g in Eq. (82) are either precisely or approximately logical.

B. Bulk time evolution
A natural symmetry arising in AdS/CFT is the timetranslation invariance of the boundary CFT, which is governed by a local Hamiltonian. Time evolution in the bulk AdS space is a bit subtle because of the general covariance of the bulk theory, but, if we fix the gauge by choosing a preferred sequence of bulk time slices, then time evolution in the bulk corresponds to time evolution on the boundary. From the perspective of quantum error correction, this correspondence is puzzling, because covariance of the AdS/CFT code with respect to time evolution seems to be incompatible with perfect correctability of erasure on the boundary [12,25]. Indeed, the analysis of bulk global symmetries in Sec. IX A, which is applicable to both discrete and continuous symmetries, builds on the observation that a boundary global symmetry operator, when restricted to a correctable boundary subregion, preserves the code space and, therefore, must be a trivial logical operator. Why can we not apply similar reasoning to the action of the boundary Hamiltonian, concluding (incorrectly) that bulk time evolution is trivial?
The answer hinges on a crucial distinction, emphasized in Refs. [15,16], between global symmetry and long-range gauge symmetry in the bulk. As we note, a "local" operator in the bulk is not truly local; it requires gravitational dressing connecting it to the boundary. For the analysis of bulk global symmetries, this dressing could be ignored, because the dressing transforms trivially under the global symmetry. For the analysis of bulk time evolution, the dressing cannot be ignored, because the dressing depends on the energy momentum of a bulk quantum state. It is the nontrivial action of the boundary Hamiltonian on the asymptotic gravitational dressing of bulk local operators which is responsible for the bulk time evolution. Furthermore, because the dressing can be detected by localized boundary observers, erasure of boundary subregions can really be corrected only approximately rather than exactly.
Our lower bound on the residual error achieved by a covariant code expressed in Theorems 1 and 2 vanishes in the limit of many subsystems (n → ∞) or large subsystems (ΔT i → ∞). The AdS/CFT setting fulfills both of these criteria. The boundary theory is a field theory, which formally has an unbounded number of local physical subsystems. Furthermore, in the "large-N" limit of the CFT, which corresponds to semiclassical gravity in the bulk, the Hilbert space dimension of each local subsystem is very large [78].
Holographic quantum codes, toy models of the bulk which capture some of the properties of full blown AdS/ CFT, have been constructed in which local Hamiltonian evolution in the bulk is realized approximately by a local Hamiltonian in the boundary theory [83]. Our Theorems 1 and 2 apply to such models, imposing further constraints on how accurately these models capture the erasure correction properties and symmetries of the AdS/CFT code. Using perturbative gadget methods, holographic codes which are approximately correctable and approximately covariant can be constructed [83], but at a cost-local interaction terms in the boundary Hamiltonian have a strength that increases with the system size.

X. DISCUSSION
In this paper, we quantify the incompatibility between continuous symmetries and quantum error correction, and we identify regimes in which these two notions can coexist, at least approximately. We focus mainly on codes that have a continuous symmetry acting transversally on the physical subsystems. This setting means two things: First, the logical system L is encoded in a physical system A which can be decomposed as a tensor product of physical subsystems fA i g such that erasure of each A i is correctable. Second, the code is covariant with respect to a logical charge operator T L that is represented on the physical systems by an operator T A that is a sum T A ¼ P i T i , such that T i is a local charge operator supported on only subsystem A i .
The Eastin-Knill theorem [17][18][19] asserts that no quantum error-correcting code can be covariant with respect to a continuous symmetry if the number of physical subsystems is finite, each subsystem is finite dimensional, and erasure of each subsystem is exactly correctable. However, it was shown in Ref. [12] that this conclusion can be evaded by infinite-dimensional codes. Our main results here concern a relaxed version of the Eastin-Knill theorem that applies if erasure is only approximately correctable and/or the code is only approximately covariant. We focus especially on how accurately erasure can be corrected when the number of physical subsystems is large but finite or the dimension of each subsystem is large but finite.
In Theorem 1, we consider codes that can correct erasure of a subsystem only approximately, and we derive a lower bound on the worst-case entanglement infidelity ϵ worst that can be achieved by the best recovery map after an erasure. In keeping with the findings of Ref. [12], this lower bound approaches zero when the number n of subsystems approaches infinity or when the fluctuations of the local charge of individual subsystems grow without bound. The idea behind the lower bound is that, if the number of subsystems and the local charge fluctuations are both finite, then some information about the value of the global logical charge is available to an adversary who takes possession of a single physical subsystem, resulting in irreversible decoherence of the logical state. In Theorem 2 and Corollary 3, we extend the result by relaxing several assumptions. This more general theorem applies when the code is not exactly covariant, when the logical charge operator is not exactly transversal, and when more than one subsystem is erased.
The focus on erasures at known locations as a noise model in Theorems 1 and 2 is motivated by the following considerations. First, commonly encountered quantum error-correcting codes are designed to correct any errors which affect a sufficiently small number of subsystems; this design implies, in particular, that erasures at known locations can be corrected. Second, if a code can correct errors at unknown locations, it can certainly also correct errors at known locations, and, therefore, our results apply. Third, to derive general lower bounds on the accuracy of error correction in covariant codes, it makes sense to choose a noise model in which any one of the physical subsystems could potentially be damaged by the noise. Otherwise, the physical charge operators fT i g might be supported on subsystems that are unaffected by the noise. Even in that case, we could study how the channel complementary to the noise channel leaks information to the environment as in the proof of Theorem 2. But the corresponding lower bound on the residual error would then depend on detailed features of the noise model, beyond merely specifying how many subsystems can be simultaneously affected (see, e.g., Refs. [84,85]).
To appreciate how the accuracy of error correction depends on the noise model, consider the three-qubit repetition code αj0i þ βj1i → αj000i þ βj111i, which is covariant with respect to the logical charge T L ¼ 3Z and This code can correct an X error on any of the three qubits, but it cannot correct a Z error on any qubit, nor can it correct erasure of any qubit. Nevertheless, under a noise model where only X errors occur, it is a covariant code that corrects single-qubit errors. On the other hand, if a Z error occurs at a random location, then a measurement on the environment can reveal information about the expectation value of an observable which is a sum of local Z operators, such as T A . A bound on the worst-case entanglement fidelity of recovery for this code under a noise model that admits Z errors can be obtained by repeating the steps after Eq. (23) in Sec. IV (or by directly applying Lemma 4 in Supplemental Material [37]). For such Z errors, the amount of information leaked to the environment can also be explicitly quantified in accord with recent results [33,86].
Our results hinge on an interplay between the noise model and the structure of the local charge observables. Specifically, Theorem 2 applies under the following condition: For any term T α that appears in the physical charge T A ¼ P α T α , there is a nonzero probability that all physical subsystems supporting T α are simultaneously lost to the environment. One may wonder whether this condition is really necessary-e.g., would a code with a 2-local charge operator be allowed if it could correct only a single erasure? It turns out that such codes do exist, showing that our condition is necessary. As a simple example, the erasure of a single qubit is correctable for the ½½4; 2; 2 quantum code, but there is also a nontrivial logical operator Q ¼ X ⊗ X ⊗ I ⊗ I supported on the first two qubits [42]. We can exponentiate this 2-local operator to generate a logical rotation of the first logical qubit. This example provides an example of a code that is exactly error correcting against a single located erasure and that is nevertheless exactly covariant with respect to a 2-local charge.
We note that our lower bounds on the residual error are expressed in Theorems 1 and 2 in terms of a charge range maximized over subsystems, such as max i ΔT i . But the charge range may vary substantially from one subsystem to another, in which case the bound can be tightened. Using known results in quantum metrology, the bound can be expressed in terms of alternative metrics which depend more smoothly on the charge ranges of all the subsystems [84,85,87].
In the lower bound (26), the range ΔT L of the logical charge operator and corresponding range ΔT i of the physical charge are not directly related to the corresponding system dimensions if the symmetry is Abelian. The situation is different when we apply the bound (26) to codes that are covariant with respect to the full unitary group Uðd L Þ. In that case, a representation of Uðd L Þ with specified ΔT i has a minimum dimension; using this bound on the dimension, we can derive Theorem 6 from Theorem 1.
The Eastin-Knill theorem shows that no quantum errorcorrecting code can admit a universal set of logical quantum gates, such that each gate in the set is transversal with respect to a fixed decomposition into subsystems, where erasure of any subsystem in exactly correctable. Various schemes have been proposed for completing a fault-tolerant universal gate set using nontransversal constructions [88][89][90][91][92][93][94]. An alternative approach is to stick with a universal set of transversal logical gates, at the cost of tolerating imperfect error correction. Our results Theorem 6 and Proposition 5 expose serious limitations on this approach. If a code admits a universal set of transversal gates, then it is necessarily covariant with respect to a tensor product representation of Uðd L Þ. Moreover, such codes achieve good accuracy only for quite sizable values of the local dimension d of each physical subsystem or the total number n of subsystems, as discussed in Sec. VII.
While originally derived in the context of fault-tolerant quantum computing, the Eastin-Knill theorem has a variety of other applications, for example, to quantum reference frames and quantum clocks [12,25] (cf. also recent related work [24]) and to the holographic dictionary relating bulk and boundary physics in the AdS/CFT correspondence [12]. When applied to these settings, our results provide limitations on transmission of reference frames over noisy channels and help to clarify the relationship between bulk and boundary time evolution for the AdS/CFT quantum code. Our lower bounds on infidelity also apply to the recently discovered quantum codes arising in one-dimensional translation-invariant spin chains [8].
Our work builds on Ref. [12], where covariant quantum codes arise in the study of reference frames, i.e., asymmetric states which convey "physical" information [10,95]. As shown in Ref. [12], exact error correction of reference frames is impossible for finite-dimensional systems, yet in the real world reference frames are always finite dimensional and communication channels are always imperfect. Nevertheless, in practice we routinely share reference frames over noisy channels, easily reaching agreement about which direction is "up" or what time it is; furthermore, quantum technologists can distribute entanglement between nodes of a quantum network, which is possible only if the nodes share a common phase reference. Our results clarify, quantitatively, why accurate communication of reference information is achievable in practice. A quantum reference frame of sufficiently high dimensionality becomes effectively classical, quite robust against the ravages of environment noise. Examples of such systems include highly excited oscillators and rotors, Bose-Einstein condensates, superconductors, and other macroscopic phases of quantum matter.
In metrology, quantum error correction provides a promising tool for improving sensitivity by protecting a probe system against a noisy environment [25,[96][97][98][99]. However, there is a delicate balance to achieve between error correcting against the noise while still being sensitive to the physical observable H one wishes to measure. In order to correct against errors, one needs to encode in an appropriate code space. Furthermore, in order to measure H, it needs to act nontrivially within that code space. The ability to measure H directly by local observations corresponds, in the language of this paper, to covariance of the code with respect to the physical charge H. In other words, adapting our setup to one from quantum metrology is straightforward: The goal now is to estimate the continuous parameter ω in H ¼ ωT A as accurately as possible while at the same time being able to correct against relevant noise.
Recent work shows that it is possible to measure H at the Heisenberg limit using an error-correcting code if H cannot be expressed as a linear combination of correctable noise operators [100][101][102][103][104]. But if the physical charge T A is a sum of local charges, the Eastin-Knill theorem poses a challenge to the application of error-correcting techniques; namely, error correction prevents probe states from evolving, obscuring the signal. The infinite-dimensional counterexamples of Ref. [12] show that it is nonetheless possible to correct against local noise and admit a charge that is a sum of noise operators, granted one has non-normalizable code words. The bounds and example codes of this paper characterize the imperfect code performance when the code words are normalizable.
Our results suggest that one might improve sensitivity to the signal using normalizable probe states by sacrificing some error-correction fidelity (cf. also Ref. [24]). However, to fruitfully apply our results to quantum metrology, additional steps are needed; these are the subject of follow-up work in progress. First, since we are trying to measure an unknown parameter (and not necessarily to protect quantum information per se), we should account for the fact that a code is required only to reconstruct a logical state that would yield a precise reading of said parameter. Second, our results are stated in terms of the worst-case entanglement fidelity, but for applications to metrology one would prefer different figures of merit, such as the precision at which the probe can sense magnetic fields or the ability of a quantum clock to tell time accurately. Finally, it would be desirable to consider noise models that are more relevant to quantum metrology, such as fluctuating background magnetic fields that induce dephasing errors. Bény's characterization of approximate quantum error correction of algebras [105] provides a potential approach to addressing these challenges, because one can precisely specify which observables need to be faithfully reproduced after action by the noise and a possible recovery operation.
Approximate quantum error-correcting codes also arise naturally in many-body quantum systems [8,9]. We anticipate that constraints on correlation functions of many-body quantum states can be derived from the covariance properties of the corresponding codes.
Finally, the interplay of symmetry and quantum error correction has a prominent role in the AdS/CFT holographic correspondence. Although covariance with respect to a continuous symmetry is incompatible with perfect correctability of erasure of physical subsystems for any finite-dimensional quantum code, nevertheless we expect that in the AdS/CFT code continuous time evolution of the boundary system corresponds to continuous time evolution of the encoded logical bulk system. Our results relieve the tension between these two observations, because nearperfect correctability can be achieved if either the number of physical subsystems or the dimension of each physical subsystem becomes very large. Both these provisos apply to the continuum limit of a regulated holographic boundary conformal field theory, as the number of lattice sites per unit volume is very large in this limit, and the number of degrees of freedom per site is also very large if semiclassical gravity accurately describes the bulk geometry (the "large-N limit"). Recent results indicate that not just exact continuous symmetries, but also exact discrete symmetries, are incompatible with the quantum errorcorrection properties of the AdS/CFT code [15,16]. An intriguing topic for further research is the investigation of approximate symmetries, both continuous and discrete, in the context of quantum gravity.