Quantum error correction meets continuous symmetries: fundamental trade-offs and case studies

We systematically study the fundamental competition between quantum error correction (QEC) and continuous symmetries, two key notions in quantum information and physics, in a quantitative manner. Three meaningful measures of approximate symmetries in quantum channels and in particular QEC codes, respectively based on the violation of covariance conditions over the entire symmetry group or at a local point, and the violation of charge conservation, are introduced and studied. Each measure induces a corresponding characterization of approximately covariant codes. We explicate a host of different ideas and techniques that enable us to derive various forms of trade-off relations between the QEC inaccuracy and all symmetry violation measures. More specifically, we introduce two frameworks for understanding and establishing the trade-offs respectively based on the notions of charge fluctuation and gate implementation error, and employ methods including the Knill--Laflamme conditions as well as quantum metrology and quantum resource theory for the derivation. From the perspective of fault-tolerant quantum computing, our bounds on symmetry violation indicate limitations on the precision or density of transversally implementable logical gates for general QEC codes, refining the Eastin--Knill theorem. To exemplify nontrivial approximately covariant codes and understand the achievability of the above fundamental limits, we analyze the behaviors of two explicit types of codes: a parametrized extension of the thermodynamic code (which gives a construction of a code family that continuously interpolates between exact QEC and exact symmetry), and the quantum Reed--Muller codes. We show that both codes can saturate the scaling of the bounds for group-global covariance and charge conservation asymptotically, indicating the near-optimality of these bounds and codes.


I. INTRODUCTION
Quantum error correction (QEC) is one of the most important and widely studied ideas in quantum information processing [1][2][3][4].The spirit of QEC is to protect quantum information against noise and errors by suitably encoding logical quantum systems into quantum codes living in a larger physical Hilbert space.Since quantum systems are highly susceptible to noise effects such as decoherence so that errors easily occur, it is clear that QEC is of vital importance to the practical realization of quantum computing and other quantum technologies.Interestingly, besides the enduring efforts on the study of QEC and quantum codes for quantum information processing purposes, in recent years, they are also found to play fundamental roles in many important physical scenarios in e.g., holographic quantum gravity [5,6] and many-body physics [7][8][9][10], and have consequently drawn great interest in physics.
When considering the practical implementation of QEC as well as its connections to physical problems, it is important to take symmetries and conservation laws into account as they are ubiquitous in physical systems.More explicitly, symmetries may constrain the encoders in the way that they must be covariant with respect to the symmetry group, i.e., commute with certain representations of group actions, generating the so-called covariant codes [11][12][13][14].A principle of fundamental significance in both quantum information and physics is that (finite-dimensional) covariant codes for continuous symmetries (mathematically modeled by Lie groups) 1 are in a sense fundamentally incompatible with exact QEC [11,15].A well known no-go theorem that unfolds this principle from a quantum computation perspective is the Eastin-Knill theorem [15], which indicates that any QEC code covariant with respect to any continuous symmetry group in the sense that the logical group actions are mapped to transversal physical actions (that are tensor products on physical subsystems) cannot correct local errors perfectly.An intuitive explanation of this phenomenon is that, due to the conservation laws and transversality, physical subsystems necessarily contain logical charge information that gets leaked into the environment upon errors, so that the perfect recovery of logical information is prohibited.Crucially, transversal actions are highly desirable for the "fault tolerance" [2][3][4]16] of practical quantum computation schemes because they do not spread errors across physical subsystems within each code block.It is also worth noting that the transversality property is widely important in physics as a fundamental feature of internal symmetries in many-body scenarios.More specifically, they are normally generated by sums of disjoint local charge observables, or in particular, on-site (transversal with respect to sites).Note that whether the symmetries are on-site is linked to whether they can be gauged or are anomaly-free, which plays important roles in the physics of quantum many-body systems and field theories [17].In AdS/CFT, transversality also plays fundamental roles [18][19][20].
Due to the Eastin-Knill theorem, unfortunately, it is impossible to find an exact QEC code that implements a universal set of gates transversally, or namely achieves the full power of quantum computation while maintaining transversality.However, it may still be feasible to perform QEC approximately under these constraints, and a natural task is then to characterize the optimal degree of accuracy.Recently, several such bounds on the QEC accuracy achievable by covariant codes (which give rise to "robust" or "approximate" versions of the Eastin-Knill theorem) as well as explicit constructions of near-optimal covariant codes are found using many different techniques and insights from various areas in quantum information [12][13][14][21][22][23][24][25][26][27], showcasing the fundamental nature of the problem.Remarkably, covariant codes have also found interesting applications to several important areas in physics already, including quantum many-body physics [9,10,14], AdS/CFT correspondence [12,13,18,28,29], and quantum information [11,13,27].
These existing studies on covariant codes are mostly concerned with the precision of QEC under exact symmetry conditions.Indeed, when symmetry principles arise, they are exactly respected by default.However, especially for continuous symmetries, it is often important or even necessary to consider approximate forms of symmetries or conservation laws in physical and practical scenarios.First of all, realistic quantum many-body systems are often dirty or defective so that the exact symmetry conditions and conservation laws could generally be violated to a certain extent.Furthermore, there are many important situations in physics where non-exact symmetries need to be considered for fundamental reasons.There are various symmetry breaking mechanisms that play key roles in wide-ranging physical scenarios including spontaneous symmetry breaking, anomalies, and non-renormalizable effects [30].In particle physics, many important symmetries are known to be only approximate [31].More notably, it has long been believed that global symmetries cannot be exact in a unified theory of quantum mechanics and gravity [31][32][33][34][35][36] (justified in more concrete terms in AdS/CFT [18,28]).Considering the need for large quantum systems to boost the advantages of quantum technologies and also the broad connections between QEC and physics, it would be important and fruitful to have a quantitative theory of QEC codes with approximate symmetries, or approximately covariant codes.For example, given that the QEC accuracy of exactly covariant codes is limited, one may wonder whether for codes that achieve exact QEC there are "dual" bounds on the degree of symmetry or covariance.It is particularly worth noting that the no-global-symmetry arguments in AdS/CFT indeed have deep connections to covariant codes, and in particular this question [12,18].However, our understanding of approximate symmetries, especially characterizations and applications on a quantitative level, is very limited to date.
Our work aims to establish a quantitative theory of the interplay between the degree of continuous symmetries and QEC accuracy, which in particular allows us to understand symmetry violation in exact QEC codes.(Note that our discussion here mainly proceeds in terms of the most fundamental U (1) symmetry which is sufficient to reveal the key phenomena.)To this end, we first formally define three different meaningful measures of symmetry violation, in terms of the violation of covariance conditions globally over the entire symmetry group or locally at a specific point in the group, and the violation of charge conservation respectively, which induce corresponding quantitative notions of approximately covariant codes.Our main results are a series of trade-off bounds between QEC accuracy and the above different symmetry measures under a general condition called Hamiltonian-in-Krausspan (HKS) condition which subsumes transversality in our setup, each of which may suit certain scenarios the best.(For readers' convenience, we provide in Appx.A a table that identifies the key theorems and summarizes their respective strengths and weaknesses.)We introduce two concepts-charge fluctuation and gate implementation error-each providing a framework for analyzing the QEC-symmetry trade-off and could be useful in their own rights.Furthermore, our derivations feature ideas and techniques from several different fields.More explicitly, various different forms of the trade-off relations are derived by analyzing the "perturbation" of the Knill-Laflamme conditions [37,38], as well as by leveraging insights and techniques from the fields of quantum metrology [39,40] and quantum resource theory [24,[41][42][43].Our theory provides a complete understanding of the transition between exact QEC and exact symmetry.On the exact symmetry end, the previous limits on covariant codes (often referred to as "approximate Eastin-Knill theorems" [12,13,21,22]) are recovered, while the exact QEC end provides new lower bounds on various forms of symmetry violation for the commonly studied exact codes.In particular, we use our symmetry bounds to derive fundamental limitations on the set of transversally implementable logical gates for general QEC codes, which represent a new type of improvement of the Eastin-Knill theorem and apply more broadly than previous results along a similar line about stabilizer codes in Refs.[44][45][46][47][48], advancing our understanding of fault tolerance.Then, to solidify our general theory, we present case studies on two explicit code constructions, which can be seen as examples of approximately covariant codes that exhibit certain key features, as well as upper bounds (achievability results) that help understand how strong our fundamental limits are.First, we construct a parametrized code family that interpolates between the two ends of exact QEC and exact symmetry and exhibits a full trade-off between QEC and symmetry, by modifying the so-called thermodynamic code [9,12].In the second case study, we analyze the quantum Reed-Muller codes which exhibit nice structures and features and, in particular, have been widely applied for the transversal implementation of certain non-Clifford gates and magic state distillation [49][50][51][52].We find that in both cases the codes can almost saturate the bounds on global covariance and charge conservation (up to constant factors) asymptotically, that is, both the code constructions and bounds are nearly optimal.
Here we present the study in a rigorous and comprehensive manner.In particular, this work contains all technical details of the derivation, thorough discussions of all different approaches, and many additional results.This paper is organized as follows.First, in Sec.II, we review the formalism of QEC and the incompatibility between QEC and continuous symmetries, and also formally define the accuracy of approximate QEC codes as well as the different quantitative charaterizations of approximate continuous symmetries associated with QEC codes that will be considered.In Sec.III and Sec.IV, we introduce the two frameworks based on the notions of charge fluctuation and gate implementation error respectively, under which we discuss a series of different approaches to deriving the trade-off relations between the QEC inaccuracy and the group-global covariance violation.Then in Sec.V, we specifically discuss the application to fault-tolerant quantum computing, deriving general restrictions on the transversally implementable logical gates in QEC codes from the results above.Afterwards, in Sec.VI, we present our results on the trade-off relations between QEC inaccuracy and group-local symmetry measures including the group-local covariance violation and the charge conservation violation.After the above discussion of fundamental limits, in Sec.VII we study the modified thermodynamic code and quantum Reed-Muller codes, which gives concrete examples of nearly optimal approximately covariant approximate codes in certain cases.Finally, in Sec.VIII we summarize our study, and discuss important open problems and future directions.
Note that this long paper is a companion paper of Ref. [53] with extended results and technical details which focuses on the most representative results and the physical motivation behind this study.It was published as the Supplementary Information to Ref. [53].
QEC functions by encoding the logical quantum system in some quantum code living in a larger physical system with redundancy, so that a limited number of errors can be corrected to recover the original logical information.A quantum code is defined by an encoding quantum channel E S←L from a logical system L to a physical system S, and it perfectly protects the logical information against a physical noise N S if and only if there exists a recovery channel R S←L such that In particular, when S,i and Π is the projection onto the code subspace in the physical system, such a recovery channel exists if and only if the Knill-Laflamme (KL) conditions, ∀i, j, ΠK † S,i K S,j Π ∝ Π [37], hold.
In many scenarios, a quantum code is still useful in protecting quantum information when it only achieves approximate QEC, namely, R L←S • N S • E S←L is close to but not exactly equal to 1 L .To characterize the inaccuracy of an approximate QEC code, we will use the channel fidelity and the Choi channel fidelity, defined by respectively, where f (ρ, σ) = Tr( ρ 1/2 σρ 1/2 ) is the fidelity of quantum states, |Ψ⟩ = 1 |i⟩ |i⟩ is the maximally entangled state and Ψ = |Ψ⟩ ⟨Ψ|.Here the inputs ρ and Ψ lie in a bipartite system consisting of the original system Φ 1,2 acting on and a reference system as large as the original.Correspondingly, one can define the purified distance of states 55,61].The (worst-case) QEC inaccuracy and the Choi QEC inaccuracy for approximate QEC codes are then defined as respectively.The Choi inaccuracy reflects the average-case behavior in the sense that ε = d L +1 d L ε avg [62,63], where in which the integral is over the Haar random pure logical states.For simplicity, we will not explicitly write down the arguments of ε or ε (and of many other measures defined later) when they are unambiguous.
In the above, we used the channel purified distances as channel distance measures.As mentioned, we may also consider the the diamond distance D ⋄ (Φ 1 , Φ 2 ) induced by the diamond norm of channels [60,64]: where ∥•∥ 1 is the nuclear (trace) norm.Naturally, the diamond distance version of QEC inaccuracy is defined as It is easy to see that lower bounds on ε (that we derive below) directly indicate lower bounds on ε ⋄ .According to the Fuchs-van de Graaf inequality 1 − f (ρ, σ) ≤ 1 2 ∥ρ − σ∥ 1 [65], we have In the case of our interest where the second channel is the identity, the above inequality can be further improved using Therefore, ε ⋄ ≥ ε2 .

B. Measuring approximate symmetries of QEC codes
Symmetries of quantum codes manifest themselves in the covariance of the encoder with respect to symmetry transformations.For the case of current interest, the symmetry transformations on the logical and physical systems are, respectively, U L,θ = e −iH L θ generated by a logical Hamiltonian (charge observable) H L , and U S,θ = e −iH S θ generated by a physical Hamiltonian (charge observable) H S 2 , both representations of the U (1) Lie group periodic with a common period τ .The transversality property of symmetry transformations (gate actions) corresponds to the 1-local form of H S , namely, H S = n l=1 H S l where each term H S l acts locally on physical subsystem S l .We say a quantum code is covariant (with respect to such U (1) representations given by H L and H S ), if The definitions of covariant codes can be easily extended to general compact Lie groups [12,13].We also assume H L and H S to be both non-trivial, i.e., not a constant operator.Note that applying constant shifts on H L and H S do not change the definition of Eq. ( 11) and we will often use this property below.
As mentioned, the covariance of quantum codes is often incompatible with their error-correcting properties and approximate notions of covariance may play important roles in wide-ranging scenarios.For example, here the Eastin-Knill theorem indicates that codes that can perfectly correct local noise cannot simultaneously be covariant with respect to non-trivial 1-local H S [15].More generally, exact QEC is known to be incompatible with exact covariance as long as which we refer to as the Hamiltonian-in-Kraus-span (HKS) condition, holds [22,40].The HKS condition holds for many typical scenarios, including the one mentioned above where N S represents single-erasure noise (where one subsystem chosen uniformly at random is erased) and H S is 1-local.When the HKS condition does not hold, examples of exactly covariant QEC codes exist, e.g., when N S = 1 (noiseless dynamics), when H S is a Pauli-X operator and N S is dephasing noise [66,67], and when N S is single-erasure noise but H S is 2-local [68].We shall assume that the HKS condition holds for the quantum codes considered in our work.We also emphasize that there exist examples of exact QEC codes covariant with respect to discrete symmetry groups [11], so the assumption of continuous groups is important.
Besides quantum computation, approximately symmetries and covariant codes are potentially useful in quantum gravity and condensed matter physics, as discussed in the main text.To formally characterize and study approximate covariance, an important first step is to find reasonable ways to quantify it.We now do so.

Group-global covariance violation
The first, most important type of measure is based on the global covariance violation over the entire symmetry group.Codes that are approximately covariant with respect to H L and H S in such a global sense should have small covariance violation for all θ.We define the group-global3 covariance violation and the Choi group-global covariance violation by respectively.Intuitively, they measure the maximum deviation of the encoding channel E S←L from the exact covariance condition Eq. ( 11) in the entire symmetry group.It is known that δ group and ε cannot be simultaneously zero in non-trivial situations, and previous works [12-14, 21-23, 25] mostly focus on deriving lower bounds on ε for exactly covariant codes (δ group = 0).We will present bounds that involve δ group which reveal the trade-off between QEC and global covariance, derived via two notions we introduce called the charge fluctuation and gate implementation error.This extends the scope of previous consideration to general codes including exact QEC codes.Similar to the case of QEC inaccuracy, we can also consider the diamond distance and define Again, lower bounds on δ group,⋄ that we derive below directly indicate lower bounds on δ group .Using Eq. ( 9), we directly see that δ group,⋄ ≥ δ 2 group /2.In particular, when E S←L is isometric, we have δ group,⋄ = δ group , using the fact that 1  2

Group-local (point) covariance violation
One may wonder if the incompatibility between QEC and continuous symmetries can be relieved when we relax the requirement from exact global covariance to exact local covariance, i.e., when we require only the code covariance for θ inside a small neighborhood of a point θ 0 , satisfying U S,θ0 • E S←L = E S←L • U L,θ0 .Unfortunately, the no-go results also extend to the local case, meaning that a non-trivial QEC code cannot be exactly covariant even in an arbitrarily small neighborhood of θ 0 .Without loss of generality, we assume θ 0 = 0 because we can always redefine E S←L • U L,θ0 to be the new encoding channel such that the code is covariant at θ = 0. To characterize the local covariance, we introduce the group-local (point) covariance violation defined by Here F (Φ θ ) is the quantum Fisher information (QFI) defined using the second order derivative of the purified distance which characterizes the amount of information of θ one can extract from Φ θ around point θ [69].Correspondingly, the QFI of quantum states is defined by [58,70] which characterizes the amount of information of θ one can extract from ρ θ around point θ and we have Note that the QFI defined here using the purified distance is usually called the SLD QFI and there are other types of QFIs, e.g., the RLD QFI [71][72][73] which we will encounter later in Sec.IV B 2. When δ local = 0, the code is locally covariant up to the lowest order of dθ.We shall see later that for any δ local < ∆H L (we will use ∆(•) to denote the difference between the maximum and minimum eigenvalues of (•)), there is a non-trivial lower bound on ε, leading to a trade-off relation between QEC and local covariance.

Charge conservation violation
The correspondence between symmetries and conservation laws is a landmark result of modern physics.Inspired by this correspondence, we can define another intuitive measure of the symmetry violation by the degree of charge deviation.It can be shown that for an isometric encoding channel E S←L the covariance condition Eq. ( 11) is equivalent to for some ν ∈ R, where E † is the dual channel of E satisfying Tr(HE(ρ)) = Tr(E † (H)ρ) for any H and ρ.Since H S and H L represent the charge observables in the physical and logical systems, Eq. ( 17) implies that the eigenstates of H L are mapped to the corresponding eigenstates of H S after the encoding operation [12], indicating the charge conservation nature of the encoding map.The charge conservation law can also be understood through the relation Tr(H S E S←L (ρ)) = Tr(H L ρ) − ν for any ρ, where ν represents a universal constant offset in the charge.To measure the degree to which the charge conservation law is violated, we consider the following quantity which we call the charge conservation violation (also defined in Ref. [12]): Note again that ∆(•) denotes the difference between the maximum and minimum eigenvalues of (•).It can be easily verified that δ charge /2 is equal to the difference between physical and logical charges, formally given by min ν∈R max ρ |Tr(H S E S←L (ρ)) − Tr((H L − ν1)ρ)| (a constant offset on the definitions of charges is allowed).For general CPTP encoding maps, δ charge is not always zero for exactly covariant codes [74], unlike δ group and δ local .However, for isometric encoding we always have the following relation between δ local and δ charge : and Let Then The QFI for pure states is given by we have ≥ max proving the result.
We shall see later that, similar to the situation of local covariance violation, for any δ charge < ∆H L , there is a non-trivial lower bound on ε.We refer to both δ local and δ charge as local symmetry measures because their values only depend on the approximate covariance of a code in the neighborhood of the point θ = 0. Note that both δ local and δ charge have the same unit as the charges while δ group is dimensionless, i.e., after replacing H S and H L with cH S and cH L for some constant c, both δ local and δ charge are changed to cδ local and cδ charge while δ group is unchanged.

Remarks on non-compact groups and infinite-dimensional codes
In the above discussion, we assumed compact Lie groups and finite-dimensional quantum codes.Here we remark on possible extensions to non-compact Lie groups and infinite-dimensional codes.
First, note that our definitions of δ local and δ charge can be naturally extended to the situations of non-compact groups where H S and H L are arbitrary finite-dimensional Hermitian operators but the group transformations are not periodic, because their definitions only depend on the local geometry of the symmetry group.For the global measure δ group , we need to assume compact Lie groups, i.e., the physical and logical group transformations are both periodic with a common period.
Moreover, when the physical system S is infinite-dimensional, one may naturally consider some finite-dimensional truncation HS of H S .The trade-off relations we derive below hold for HS and H L , so when the truncation is suitably chosen we can still obtain nontrivial results that well indicate the behaviors of H S .For example, when ∥(E S←L ) † (H S ) − (E S←L ) † ( HS )∥ (∥•∥ is the spectral norm) is small, HS is a good substitute for H S in terms of the charge conservation violation [12].

III. TRADE-OFF BETWEEN QEC AND GLOBAL COVARIANCE: CHARGE FLUCTUATION APPROACH
In this section, we derive trade-off relations between the QEC inaccuracy ε and the global covariance violation δ group by connecting them to a quantity which we call the charge fluctuation χ (note that this notion is distinct from the charge conservation violation although they are in some way related as will be discussed).Our approach essentially proceed in two steps.First, we connect δ group and χ by providing a lower bound on δ group which depends on χ.Then we prove upper bounds on |χ| in terms of the QEC inaccuracy ε using two different methods.The first one is based on analyzing the deviation of the approximate QEC code from the the KL conditions, which we call the KL-based method, and the second one is based on treating the problem as a channel estimation problem and using quantum metrology techniques.These methods eventually lead to two types of trade-off bounds between QEC and global covariance.Note that we assume quantum codes are isometric throughout this section unless stated otherwise.

A. Bounding global covariance violation by charge fluctuation
Consider a code defined by encoding isometry E S←L .We start by considering the situation where the code achieves exact QEC under the noise channel N S (•) = i K S,i (•)K † S,i .According to the KL conditions, where Π is the projection onto the code subspace.In particular, let |0 L ⟩ and |1 L ⟩ be eigenstates corresponding to the largest and the smallest eigenvalues of H L .(We do not specify the exact choices of |0 L ⟩ and |1 L ⟩ even when H L is degenerate, as long as they correspond to the largest and smallest eigenvalues, respectively.)Using Eq. ( 27), we have Using the HKS condition H S ∈ span{K † S,i K S,j , ∀i, j}, we must also have The incompatibility between QEC and symmetry could be understood through the incompatibility between Eq. ( 29) and Eq.(17).Eq. ( 29) implies that for exactly covariant codes from Eq. ( 17), implying the non-existence of exact QEC codes with exact covariance.
For general codes, we define the charge fluctuation: Based on the discussion above, one can see that χ embodies the transition between exact QEC and exact symmetry quantitatively-when a code is close to being an exactly covariant code, χ cannot be too far away from ∆H L , and when a code is close to being an exact QEC code, χ cannot be too far away from 0 (see an illustration in Fig. 1).Thus the trade-off relation between ε and δ group can be derived by connecting χ to each of them separately.We now derive the following lower bound on the global covariance violation δ group in terms of the charge fluctuation χ, which directly connects δ group with χ.Note that, in this paper, "≳", "≲", and "≃" mean "≥", "≤", and "=", respectively, up to the leading order.
and when |∆H L − χ| > ∆H S , δ group ≥ 3/8.In particular, when |∆H L − χ| ≪ ∆H S , we have Proof.Since U S,θ and U L,θ are both periodic with a common period, we assume H S and H L both have integer eigenvalues.We also assume the smallest eigenvalue of H S is zero because constant shifts do not affect the definitions of symmetry measures.When where η c 0 η 2 = η c 1 η 2 = 1 and |η 0 ⟩ and |η 1 ⟩ are eigenstates of H S with eigenvalue η. |η 0 ⟩ and |η 1 ⟩ may not be the same when H S is degenerate.Note that when η is not an eigenvalue of H S , we simply take c 0 η = 0 (or where R is a reference system.Then the channel fidelity where we define and choose η * such that c η * ≥ c η for all η.Note that there is always a θ such that η̸ =η * c η cos((η − η * )θ) = 0 (because the integration of it from 0 to 2π is zero) and that η̸ =η * c η e −i(η−η * )θ is imaginary.Then we must have To arrive at a non-trivial lower bound on δ group = 1 − min θ f 2 θ , we need an upper bound of min θ f θ which is smaller than 1.To this end, we analyze c η * in detail.In particular, we consider two situations: (1) c η * ≤ 1/2 and a constant upper bound on min θ f θ exists.We can always find a subset of {η} denoted by s such that 1/4 ≤ η∈s c η ≤ 1/2.To find such a set, we first include η * in s and add new elements into s one by one until their sum is at least 1/4.Then there is always a θ such that ( η∈s c η e −iηθ ) • ( η / ∈s c η e −iηθ ) is imaginary, in which case min θ f θ ≤ (1/4) 2 + (3/4) 2 = 5/8 and we have (2) 2 is a monotonically increasing function of c η * and we only need to find an upper bound on c η * .To see such an upper bound exists, we first consider the special case where ε = 0 and, according to the KL conditions and the HKS condition, In general, to derive a non-trivial upper bound on c η * , we first note that 0 Proposition 2 then follows from combining Eq. ( 36) and Eq.(37).

B. Bounding charge fluctuation by QEC inaccuracy
We now need to establish connections between χ and the QEC inaccuracy in order to link the global covariance violation to the QEC inaccuracy.We discuss two different methods that achieve this.

Knill-Laflamme-based method
Intuitively, a non-zero charge fluctuation leads to a violation of the KL conditions (Eq. ( 27)), which indicates a non-zero QEC inaccuracy.Therefore, we may bound the QEC inaccuracy through analyzing the deviation from the KL condition.We call this method the KL-based method.Specifically, we have Proposition 3. Consider an isometric quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.Then it holds that where J is a function of H S and N S defined by where h is Hermitian.
One can verify that J(N S , H S ) is efficiently computable using the following semidefinite program [75]: The proof of Proposition 3 is partly based on a useful lemma from Ref. [38] which connects the QEC inaccuracy ε to the deviation from the KL conditions: Lemma 4 ( [38]).Let Π be the projection onto the code subspace of an isometric quantum code E S←L and the noise channel is where |i⟩ ⟨j|, and λ ij and B ij are constant numbers and operators satisfying ΠK † i K j Π = λ ij Π + ΠB ij Π. Proposition 3 then follows by connecting the deviation from the KL conditions to the charge fluctuation.The proof goes as follows.
Proof of Proposition 3. Let Π be the projection onto the code subspace under consideration, where According to the HKS condition, H S = ij h ij K † S,i K S,j for some Hermitian matrix h.Without loss of generality, we assume h is diagonal and H S = i h ii K † S,i K S,i because if not, we can always choose another set of Kraus operators that diagonalizes h.We can also assume max i h ii = − min i h ii = ∆h 2 because we can replace H S with H S − ν1 for any ν ∈ R. Then we have Note that there might be many different choices of h such that H S = ij h ij K † S,i K S,j holds true.In order to obtain the tightest lower bound on ε, we can minimize ∆h over all possible h such that

Quantum metrology method
Besides the KL-based method, the relationship between the charge fluctuation and the QEC inaccuracy could be understood through the lens of quantum metrology, which results in another inequality concerning χ and ε, as shown in the following.A detailed comparison between the two bounds obtained from the KL-based method and the quantum metrology method (Proposition 3 and Proposition 5) will later be given in Sec.III C and Sec.III D.
Proposition 5. Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.Then it holds that Here where the variance V H (ρ) := Tr(H 2 ρ) − (Tr(Hρ)) 2 , and F is a function of N S and H S defined by where h is Hermitian.In particular, when ε ≪ 1 and B ≪ √ F, we have Unlike J(N S , H S ) introduced in Sec.III B 1, F(N S , H S ) appearing in Proposition 5 has a clear operational meaning: Here F ∞ (N S,θ ) is the regularized QFI [40,76] of the quantum channel N S,θ := N S • U S,θ where θ is the unknown parameter to be estimated.(Generally, the regularized QFI of quantum channel Φ θ is defined by ) is independent of θ and computable using semidefinite programming [77].Also, F ∞ (N S,θ ) ≤ ∞ if and only if the HKS condition is satisfied.The channel QFI inherits many nice properties from the QFI of quantum states.For example, here F ∞ obeys the monotonicity property, i.e.
for arbitrary parameter-independent channels R and E.
The operational meaning of the quantity B is not immediately clear for general encoding channels, but when E S←L is isometric we have that which satisfies due to the chain rule of the square root of the channel QFI [73]: In general, B depends on specific encodings and in order to obtain an code-independent bound we should replace B with its upper bound ∆H S so that Eq. ( 45) becomes which still leads to useful bounds, e.g., for single-erasure noise as discussed in Sec.III D. However, in many cases B is negligible, i.e., B ≪ √ F (or δ local ≪ √ F for isometric codes) in the examples we study later in Sec.VII.The monotonicity of the regularized QFI is a key ingredient in the proof of Proposition 5. Specifically, we introduce a two-level system C and an ancillary qubit A and consider the channel estimation of the error-corrected noise channel ) handwavily as a quantity proportional to the square of the "signal-to-noise ratio" where the QEC inaccuracy ε is roughly the noise rate of N C,θ and the charge fluctuation |χ| is roughly the signal strength.Proposition 5 then follows from the monotonicity of QFI: We now explain the error-corrected metrology protocol in detail.We first introduce an ancilla-assisted two-level encoding.Consider a two-level system C spanned by |0 C ⟩ and |1 C ⟩ and a Hamiltonian where Z C is the Pauli-Z operator.We define a repetition encoding from C to LA, where A is the ancillary qubit.The corresponding repetition recovery channel is where Moreover, the repetition code corrects all bit-flip noise.When concatenated with E S←L and R L←S , the error-corrected noisy channel [22] (see Fig. 2).The regularized QFI of any rotated dephasing channel where the complex number x θ = ⟨0|Φ θ (|0⟩ ⟨1|)|1⟩.We consider the estimation around θ = 0 for N C,θ .The monotonicity of the regularized QFI guarantees that where Proposition 5 can then be proven, connecting ξ θ with ε and χ.Now we are ready to present the formal proof of Proposition 5.
Proof of Proposition 5. Let R opt L←S be the recovery channel such that ε = P (R opt LA←C , we have two rotated dephasing channels (see Fig. 2): where D C,θ and N C,θ are rotated dephasing channels of the following forms: and . D C,θ is identity when the code is both exactly covariant and exactly error-correcting; it is θ-independent when the code is exactly covariant (see also Ref. [22]).Note that we will not use the channel D C,θ in this proof (it will be used later in Sec.IV), but we introduce the notation here to clarify its physical meaning.Consider the parameter estimation of θ in the neighborhood of θ = 0. On one hand, for rotated dephasing channels (see Appx.B for the purified distance of rotated dephasing channels from identity), we have On the other hand, we have where we use the monotonicity of the purified distance [55] and the definition of ε.Combining Eq. ( 61) and Eq. ( 62), we have As shown in Appx.C, we also have when |χ| ≥ 2εB.Hence, when |χ| ≥ 2εB, we must have completing the proof.

C. Consequent bounds on the trade-off between QEC and global covariance
In Sec.III A and Sec.III B, we derived bounds on δ group and ε separately, using the notion of charge fluctuation χ.Combining these results, we immediately obtain the trade-off relations between δ group and ε.Theorem 6.Consider an isometric quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.It holds that, when 0 ≤ G(ε) ≤ ∆H S , and when G(ε) > ∆H S , δ group ≥ 3/8, where we could take either or where J, F, and B are given by Eq. ( 39), Eq. ( 47), and Eq. ( 46), respectively.
For the extreme cases of exactly covariant codes and exactly error-correcting codes, we have the following corollaries: Corollary 7. Consider an isometric quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.When ε = 0, i.e., the code is exactly error-correcting, it holds that when ∆H L ≤ ∆H S , where J is given by Eq. ( 39).
Corollary 9. Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.When δ group = 0, i.e., the code is exactly covariant, we must have either 2εB where F and B are given by Eq. ( 47) and Eq. ( 46), respectively.
We make a few remarks on the scope of application of these results.Although Proposition 2 and Proposition 3 need the isometric encoding assumption, Proposition 5 (and thus Corollary 9) holds for arbitrary codes.Also, Proposition 2 only holds when H L and H S share a common period, but Proposition 3 and Proposition 5 hold true for arbitrary Hamiltonians without the U (1) assumption.Finally, a keen reader might have already noticed that the choice of the pair of orthonormal states {|0 L ⟩ , |1 L ⟩} in the proofs of Proposition 2, Proposition 3 and Proposition 5 is quite arbitrary (chosen only for the purpose of proving Theorem 6) and we can in principle replace it with any other pair and the proofs will still hold, leading to refinements of these propositions.We present these refinements in detail in Appx.D. In particular, Proposition 2 leads to an inequality between δ group and δ charge .
To compare the results from the KL-based method and the quantum metrology method, we first consider the limiting situation where δ group ≪ 1 and ε ≪ 1.Then we have When B ≪ √ F, the metrology bound performs no worse than the KL-based bound because we always have J 2 ≥ F (proof in Appx.E).For the examples we study later in Sec.VII, we find that B is negligible, but in practice one may need to bound the parameter B a priori using properties of specific codes to obtain desired trade-off relations.It still open in general under which conditions B ≪ √ F holds, and whether Proposition 5 might be further improved with B removed.
A byproduct of our results are lower bounds on ε (Eq.( 70) and Eq. ( 71)) for exactly covariant codes, a special case which has been extensively studied in previous works [12,13,[21][22][23].As discussed below, the bound Eq. ( 70) for random local erasure noise behaves almost the same as the one in Ref. [12] and our Proposition 3 provides an alternative method to obtain this result.However, compared to Proposition 5, the bound in Ref. [22] ε does not involve the parameter B, implying that the proof of our Proposition 5 might be further improved.

D. Noise models and explicit behaviors of the bounds
Now we explicitly discuss how the bounds in Theorem 6 behave under difference types of noise in an n-partite system.We consider 1-local Hamiltonians H S = n l=1 H S l , so ∆H S = O(n).In this case we have δ group = Ω(1/ . On the other hand, when G(ε) = o(1), the scaling of ε must be lower bounded by ) so it is important to understand the scalings of J, F and B. When n is large, the values of J and F may be not efficiently computable.However, in Proposition 3, Proposition 5 and Theorem 6, we could always replace them with their efficiently computable upper bounds and the trade-off relations still hold then.We discuss the following two general noise models [12,13,[21][22][23] (there are still other types of noises that we will not cover, e.g., random long-range phase errors [13]): (1) Random local noise, where different local noise channels acting on a constant number of subsystems randomly.Specifically, S represent the local noise channels acting on a constant number of subsystems, q i represent their probabilities (q i > 0 and i q i = 1), and the HKS condition is satisfied for each pair of (N S ).Then we have S , H where We prove Eq. ( 75) in Appx.F and Eq. ( 76) was previously known in Ref. [22].Note that F might be different when we replace H S l with H S l − ν1 for some ν ∈ R, one need to minimize over ν to find the optimal F [22].For example, consider single-erasure noise in an n-partite system and let the erasure channel of the ℓ-th subsystem be Note that using Eq. ( 78) and Eq. ( 70), we obtain ε ≥ ∆H L /(2n max l ∆H S l ) which is identical to Theorem 1 in Ref. [12].In Eq. ( 80), we use Comparing Eq. ( 80) with Eq. ( 78), we find that when B is not negligible, the quantum metrology method can still outperform the KL-based method in some cases (e.g., when one of ∆H S l is extremely large).For other types of random local noise acting on each subsystem uniformly randomly, we also have J = O(n) and √ F + B = O(n) and the behaviors of the trade-off relations from the KL-based method and the quantum metrology method are similar.From Eq. ( 72) and Eq. ( 73), we have ε + Θ(1) • δ 2 group = Ω(1/n), meaning that when both ε and δ group are sufficiently small, their optimal scalings are Θ(1/n) and Θ(1/ √ n), respectively.
(2) Independent noise, where noise channels act on each subsystem independently.Note that independent noise is considered a "stronger" noise model than local noise because the noise actions are no longer guaranteed to be local.Specifically, N S = n l=1 N S l and H S = n l=1 H S l where N S l represent independent noise channels acting on each subsystem and H S l acts only non-trivially on the subsystem S l , and the HKS condition is satisfied for each pair of (N S l , H S l ).Here we have The proof of Eq. ( 82) is provided in Appx.F, and Eq. ( 83) follows directly from the additivity of the regularized . Therefore we have J = O(n) and and there is now a quadratic gap between them.If B can be upper bounded by O( √ n) (e.g., in Sec.VII), from Eq. ( 73), we have √ n), meaning that when both ε and δ group are sufficiently small, their optimal scalings are both Θ(1/ √ n).From Eq. ( 72), we only have ε + Θ(1) • δ 2 group = Ω(1/n) and a worse lower bound ε = Ω(1/n) for small δ group .In general, for independent noise, the trade-off bound from the KL-based method is asymptotically weaker than the one from the quantum metrology method as long as B = o(n).
Finally, we remark here that the exact values of J(N S l , H S l ), F(N S l , H S l ) and F(N S l , H S l ) can also be analytically calculated (or upper bounded) for not only erasure noise, but also other types of practically relevant noise, e.g., depolarizing noise.In principle, to derive an upper bound on J(N S l , H S l ), F(N S l , H S l ) or F(N S l , H S l ), one only need to find a Hermitian matrix h that satisfies H S l = ij h ij K † S l ,i K S l ,j and use the target functions ∆h, as the upper bound.One can further tighten the bound by minimizing the target functions over all possible h.We give a few examples below.
First, we note that for an erasure noise channel To derive these, we assume the system is d-dimensional and let The above equations follow straightforwardly by minimizing the target functions over h 11 (see also Ref. [22]).
Similarly, for single-qubit depolarizing noise To derive these, we let j in J are minimized (see Ref. [40]).The above equations follow straightforwardly by minimizing the target functions over h 14 and h 23 .Note that for J, there is no guarantee that the anti-diagonal form of h is optimal, so it only provides an upper bound on J.
Finally, for depolarizing noise on qudits: d , we have from Ref. [22] that and how to find a simple upper bound on J is still open.

IV. TRADE-OFF BETWEEN QEC AND GLOBAL COVARIANCE: GATE IMPLEMENTATION ERROR APPROACH
In this section, we introduce another framework that also enables us to derive the trade-off between the QEC inaccuracy ε and the global covariance violation δ group and could be interesting in its own right.Here the idea is to analyze a key notion which we call the gate implementation error γ that allow us to treat ε and δ group on the same footing.More specifially, we first formally define γ in Sec.IV A and show that ε + δ group ≥ γ.Then we derive two lower bounds on γ using two different methods from quantum metrology and quantum resource theory, which automatically induce two trade-off relations between the QEC inaccuracy and the global covariance violation.We will compare the gate implementation error approach to the charge fluctuation approach at the end of this section.

A. Gate implementation error as a unification of QEC inaccuracy and global covariance violation
Consider a practical quantum computing scenario where we want to implement a set of logical gates U L,θ = e −iH L θ for θ ∈ R using physical gates U S,θ = e −iH S θ under noise N S .We would like to design an encoding and a recovery channel such that R L←S • N S,θ • E S←L simulate U L,θ .We call the error in such simulations the gate implementation error and the Choi gate implementation error, defined by γ := min Both the QEC inaccuracy and the covariance violation contribute to the gate implementation error (see Fig. 3).
Clearly, γ = 0 when the quantum code is exactly error-correcting and covariant.In general, γ is upper bounded by the sum of ε and δ group , as shown in the following proposition.
Proposition 10.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .It holds that Proof.Using the triangular inequality of the purified distance [55], we have The first term is upper bounded by P (U S,θ • E S←L , E S←L • U L,θ ) using the monotonicity of the purified distance and the second term is equal to P (R L←S • N S • E S←L , 1 L ) by definition.Then γ ≤ ε + δ group follows by taking the maximization over θ and the minimization over R L←S on both sides.The above discussion also holds when we replace the purified distance P (•, •) with the Choi purified distance P (•, •), implying that γ ≤ ε + δ group .

Quantum metrology method
Now we derive a lower bound on the gate implementation error γ, where we consider the approximate gate implementation of U L,θ using noisy gates N S,θ as an error-corrected metrology protocol where θ is an unknown parameter to be estimated.

Approximate gate implementation
Both the QEC inaccuracy ε and the covariance violation δgroup contribute to the error in approximate gate implementation.Specifically, the (Choi) gate implementation error γ (γ) is upper bounded by δgroup + ε (δgroup + ε).Note that the gates are applied from right to left.
Again, we use the ancilla-assisted two-level encoding, as introduced in Sec.III B 2. We choose the repetition code concatenated with the quantum code under study, so that the error-corrected noise channel LA←C becomes a rotated dephasing channel.The main difference between the error-corrected metrology protocol we use here and the one in Sec.III B 2 is that now we choose the recovery channel R L←S to be the optimal recovery channel which minimizes the gate implementation error (instead of the QEC inaccuracy) and guarantees a lower noise rate over the entire group of θ (instead of just around θ = 0).In this case, we show that there always exists some θ * such that F ∞ (N C,θ * ) = Θ((∆H L /γ) 2 ), which then provide us a lower bound on γ using the monotonicity of the regularized QFI.Now we state and prove Theorem 11 which provides a lower bound on γ (and thus on ε + δ group ).
Theorem 11.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.Then it holds that where F is given by Eq. ( 47), ℓ 1 (x) = x + O(x 2 ) is the inverse function of the monotonic function x = y In particular, for exact QEC codes, we have the following corollary: Corollary 12. Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.When ε = 0, i.e., when the code is exactly error-correcting, it holds that δ group ≥ ℓ 1 (∆H L /2 √ F), where F is given by Eq. ( 47).
Proof of Theorem 11.By definition, there exists a R opt(G) , and D C,θ and N C,θ are rotated dephasing channels of the following forms: where p θ ∈ (0, 1) and . The regularized channel QFI of rotated dephasing channels is In order to get a lower bound on F ∞ (N C,θ ) as a function of γ.We note that the purified distance between D C,θ and 1 C (see Appx.B) is upper bounded by γ: because where we use the monotonicity of the purified distance and the definition of γ.Eq. (96) implies for all θ ∈ R. Since U L,θ and U S,θ are periodic with a common period τ , we must have ϕ θ = ϕ θ+τ .Therefore, there must exists a θ * such that ∂ θ ϕ θ θ=θ * = 0. Then using Eq. ( 95) and the monotonicity of the regularized QFI, we see that Theorem 11 then follows from Proposition 10.
Note that Theorem 11 coincides with Theorem 1 in Ref. [22] in the special case where δ group = 0.

Quantum resource theory method
Now we present another derivation based on quantum resource theory, which allows us to derive not only a lower bound on the worst-case gate implementation error, but also on the Choi gate implementation error.
We work with a resource theory of coherence [42] where the free (incoherent) states are those whose density operators commute with the Hamiltonian and the free (covariant) operations are those that commute with the Hamiltonian evolution, e.g., a covariant operation C L←S from S to L satisfies C L←S • U S,θ = U L,θ • C L←S for all θ ∈ R. Assuming that the recovery operations R L←S and the noise channel N S are covariant, we can formulate the covariant QEC as a resource conversion task from noisy physical states to error-corrected logical states and the noise rate of the latter is upper bounded by γ, illustrated by the following lemma: Proposition 13.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose N S commutes with U S,θ .Then the QEC inaccuracy measures under the restriction that the recovery channel is covariant satisfy L←S be a recovery channel such that γ = max θ P (R ). Suppose U S,θ and U L,θ share a common period τ .Consider the following recovery channel: It can be verified that R

Similarly, let R opt(C)
L←S be a recovery channel such that γ = max θ P (R In order to derive a concrete lower bound on γ and γ using Proposition 13, we choose a resource monotone based on another type of QFI of quantum states called the RLD QFI [71] defined by F R (ρ θ ) = Tr((∂ θ ρ θ ) 2 ρ −1 θ ) when the support of ∂ θ ρ θ is contained in ρ θ and = +∞ otherwise.The resource monotone satisfies for all ρ S and covariant operations C L←S , where Consider an error-corrected logical state R cov L←S • N S • E S←L (|ψ L ⟩) using covariant recovery operations.On one hand, its RLD QFI is lower bounded by Θ(1/γ 2 ) when ρ is γ-close to a coherent pure state in terms of purified distance [22,42].On the other hand, its RLD QFI is upper bounded by the RLD QFI of the noisy physical state where We now state and prove Theorem 14 which provides lower bounds on γ and γ by considering different input logical states |ψ L ⟩. Theorem 14.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose N S commutes with U S,θ .Then it holds that for y ∈ 0, In particular, when ε = 0, i.e., when the code is exactly error-correcting, we have the following corollary: Corollary 15.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose N S commutes with U S,θ .When ε = 0, i.e., when the code is exactly errorcorrecting, it holds that Proof of Theorem 14.
. Then according to Proposition 13, there exists a covariant recovery channel R cov L←S such that where According to Lemma 3 in Ref. [40], where the variance 2) guarantees the right-hand side is positive.On the other hand, using Eq. ( 101), where Using Eq. ( 107) and Eq. ( 108), we have proving Eq. ( 104).Similarly, let Then according to Proposition 13, there exists a covariant recovery channel R opt(C) where According to Lemma 3 in Ref. [40], The rest of the proof is exactly the same as in the proof of the lower bound on the worst-case gate implementation error.
In fact, the proof of Theorem 14 follows almost exactly from the proof of Theorem 2 in Ref. [22] and our new contribution here is Proposition 13.
To compare Theorem 14 to Theorem 11 , we first note that [72,73].Moreover, Theorem 14 requires the commutativity between the noise and the Hamiltonian and ℓ 1 (x) ≥ ℓ 2 (x), so Theorem 14 provides a weaker bound on the (worstcase) gate implementation error than Theorem 11.Note that F R (N S,θ ) < +∞ only when span{K S,i H S , ∀i} ⊆ span{K S,i , ∀i} which is also a stronger condition than the HKS condition.The resource theory method leads to a bound on the Choi gate implementation error, however, which is not available using the quantum metrology method.
Also note recent works Refs.[80,81] (results implied by Ref. [25]) which considered the coherence cost of implementing unitary gates based on relevant insights.

C. Explicit behaviors of the bounds and comparison with the charge fluctuation approach
We first make a general comparison between the trade-off relations derived using the gate implementation error approach (Theorem 11 and Theorem 14) and the charge fluctuation approach (Theorem 6) in Sec.III.Two clear advantages of the gate implementation error approach are that 1) it applies to general quantum codes (e.g., the non-isometric encodings in [13,23]) while the charge fluctuation approach only holds for isometric codes; 2) it leads to a trade-off relation for the Choi measures.Additionally, for the special case of δ group = 0, the results based on the gate implementation error approach directly reduce to the previous known result for exactly covariant codes in Ref. [22], while there is still some discrepancy with previous results using the charge fluctuation approach (see more discussion in Sec.III C).For the special case of ε = 0 which was not previously studied, we have two lower bounds on δ from Corollary 12 and Corollary 7 which behave as follows: It is interesting to observe that the first bound depends on the noise channel while the second one does not (as long as the HKS condition is satisfied).We now remark on the explicit scalings of our bounds for different noise models as in Sec.III D. Again, consider a n-partite system and a local physical Hamiltonian with ∆H S = O(n).For random local noise which acts uniformly randomly on each subsystem, F = O(n 2 ) and the two bounds give δ group = Ω(1/n) and δ group = Ω(1/ √ n), respectively.That is, the charge fluctuation approach outperforms the gate implementation error approach in this case.For noise acting independently on each subsystems, we have F = O(n) which gives δ group = Ω(1/ √ n) using the gate implementation error approach.In this situation, the bounds based on the two approaches are comparable.Note that in situations where F = o(n), i.e., the noise is even stronger than independent noise so that the regularized QFI is sublinear, the bound based the gate implementation error approach should outperform the bound based on the charge fluctuation approach.In general situations where both the QEC inaccuracy and the global covariance violation are non-vanishing, we expect a similar behavior, i.e., the gate implementation error approach performs better in the extremely strong noise regime, while the charge fluctuation approach performs better in weaker noise regimes.

V. LIMITATIONS ON TRANSVERSAL LOGICAL GATES
Note that a key implication of our results is symmetry constraints on QEC codes that achieve a given accuracy, which extends the scope of previous knowledge on the incompatibility between symmetries and QEC to general codes, especially exact QEC codes which are most commonly studied.As we shall discuss in this section, such constraints actually allow us to derive restrictions on the transversally implementable gates for general QEC codes, advancing our understanding of fault tolerance.A key intuition is that the precision of gate implementation is associated with the degree of symmetry.Recall that there are no QEC codes which admit a continuous symmetry acting transversally on physical qubits and thus there are no transversal universal gate sets, according to the Eastin-Knill theorem.For stabilizer codes, the incompatibility between QEC and symmetry are reflected in the classification of transversally logical gates in finite levels of the Clifford hierarchy [45][46][47][48].Here we present new restrictions of transversal gates for arbitrary QEC codes from the perspective of global covariance violations.
The following corollary puts a restriction on the logical transversal gates using Corollary 7. Namely, the non-trivial logical gates cannot be too close to the identity operators when implemented by transversal physical gates in the vicinity of identity operators because δ group has a lower bound of Θ(1/ √ n).Note that here we implicitly consider exact QEC codes under single-erasure noise (so that the HKS condition is satisfied for 1-local Hamiltonians) and in this case Corollary 7 outperforms Corollary 12, so we will only use Corollary 7 in this section.
Corollary 16.Suppose an n-qudit QEC code with distance at least 2 admits a transversal implementation V S = n l=1 e −i2πT S l /D of the logical gate V L = e −i2πT L /D where D is a positive integer and T L,S have integer eigenvalues.Then it holds that Proof.Any codes with distance at least 2 can correct single-erasure noise.Let H L = T L and H S = l T S l .They have integer eigenvalues implies that U S,θ and U L,θ share a common period 2π.According to Corollary 7, the code must satisfy We can always write θ = 2jπ D + θ 1 for some j ∈ N and θ 1 ∈ [0, 2π/D).Then we have (116) 4 The conditions are satisfied in common settings; see, e.g., the proof of Corollary 17. Similarly, Otherwise, The result then follows by combining Eq. (114), Eq. (117) and Eq.(118).
Corollary 16 shows that the precision of transversal logical gates under certain restrictions only increases polynomially in the number of qubits.For the important case of stabilizer codes, this implies that the levels of the Clifford hierarchy that can be reached only increase polynomially in the number of qubits.Specifically, consider an n-qubit stabilizer code with distance at least 2. The following corollary describes the limitation on the transversally implementable logical gates for stabilizer codes: a transversal logical gate for an n-qubit stabilizer code with distance at least 2, where D is a power of two and a l is an integer and V 1,2 are transversal Clifford operators.(This describes the most general form of transversal logical gates for stabilizer codes [44,47]).When a l = O(poly(n)), we must have D = O(poly(n)) and ṼS implements a logical gate ṼL in the O(log n)-th level of the Clifford hierarchy.
Proof.Let Π be the projection onto the stabilizer code under consideration and where Both Π 1 and Π 2 are stabilizer codes with the same code distance as Π.Without loss of generality, we assume Π, Π 1 and Π 2 are two-dimensional stabilizer codes (by considering subcodes of the original codes).
As proven in Proposition 4 in Ref. [47], V S = (Q S ) 4 must be a logical gate on Π 2 , satisfying and the logical gate V L has the form V L = e −i2πaZ L /D where a is an integer.First consider the situation where a = 0 (for any choice of two-dimensional codes), i.e., (Q S ) 4 Π 2 = Π 2 .By writing down the stabilizer code Π 2 in its computational basis, it is easy to observe that either Q S Π 2 = Π 2 , then ṼS implements a Clifford logical gate and the Corollary holds, or Q S Π 2 ̸ = Π 2 , then n l=1 a l /D must be a positive constant and D = O( n l=1 a l ) = O(poly(n)).Now we consider the situation where a ̸ = 0.By writing down the stabilizer code Π 2 in its computational basis, we observe 1 ≤ a ≤ n l=1 4a l = O(poly(n)).Let H L = aZ L and H S l = 4a l Z l .Then we must have Using Corollary 16, we have D = O(poly(n)).Since D is a power of 2, for all l, e −i2πa l Z l /D (see Proposition 1 in Ref. [47]) and thus Q S = n l=1 e −i2πa l Z l /D must be in the (log D)-th level of the Clifford hierarchy.Corollary 17 then follows from the fact that Clifford operators V 1 , V 2 preserve the level of the Clifford hierarchy and any physical gate in the j-th level of the Clifford hierarchy implements a logical gate in the j-th level of the Clifford hierarchy (because logical Pauli operators can be implemented by physical Pauli operators for stabilizer codes).
Corollary 17 provides a simple proof on the limitations of transversal logical gates for stabilizer codes from the perspective of continuous symmetries.Note that the relevant results previously known for stabilizer codes [45,46,48] were obtained using very different techniques.

VI. TRADE-OFF BETWEEN QEC AND LOCAL SYMMETRY MEASURES
In this section, we study relations between QEC and local symmetry measures, that is, the local covariance violation and the charge conservation violation.We will first prove a lemma which links the charge conservation to the charge fluctuation and then derive trade-off relations using Proposition 3 and Proposition 5. We will also derive a lower bound on the local covariance violation using the quantum metrology method.
Note that the results in this section (Theorem 19, Theorem 21 and Theorem 23) hold true for arbitrary Hermitian operators H L and H S , which do not necessarily share a common period as generators of U (1) representations.

A. Bounds via charge fluctuation
We first observe a simple connection between the charge fluctuation χ and the charge conservation violation δ charge : Lemma 18.Consider a quantum code E S←L , a physical Hamiltonian H S and a logical Hamiltonian H L .Then Using the KL-based method (Proposition 3) and Proposition 1, we immediately have the following trade-off relations: Theorem 19.Consider an isometric quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.It holds that where J is given by Eq. ( 39).
In particular, for exact QEC codes, we have the following corollary: Corollary 20.Consider an isometric quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.When ε = 0, i.e., when the code is exactly error-correcting, we must have δ local ≥ ∆H L and δ charge ≥ ∆H L .
Similarly, using the quantum metrology method (Proposition 5) and Proposition 1, we have the following trade-off relations: Theorem 21.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.It holds that In particular, when ε ≪ 1 and B ≪ √ F, we have where F and B are given by Eq. ( 47) and Eq. ( 46), respectively.Furthermore, when the code is isometric, it holds that Corollary 22. Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.When ε = 0, i.e., when the code is exactly error-correcting, we must have δ charge ≥ ∆H L .
Note that Corollary 22 is slightly more general than Corollary 20 as the former covers the situation where the encoding is non-isometric.

B. Bounding local covariance violation using quantum metrology
The trade-off relation between ε and δ local in Theorem 21 requires the code to be isometric.In fact, we can show a cleaner version of the trade-off between the QEC inaccuracy and the local covariance violation using the quantum metrology method which does not contain B and also covers the non-isometric scenario, as shown below.
Theorem 23.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.It holds that When ε ≪ 1, we have where F and B are given by Eq. ( 47) and Eq. ( 46), respectively.
Corollary 24.Consider a quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.When ε = 0, i.e., when the code is exactly error-correcting, it holds that δ local ≥ ∆H L .
Proof.Let R opt L←S be the recovery channel such that ε = P (R opt Let (see Fig. 2) Consider the parameter estimation of θ in the neighborhood of θ = 0 and let Following the proof of Proposition 5, we have from Eq. ( 63) that As shown in Appx.C, we also have when completing the proof.

C. Remarks on the behaviors of the bounds
From Theorem 19, Theorem 21 and Theorem 23, we observe that in n-partite systems, the local covariance violation δ local and the charge conservation violation δ charge are usually lower bounded by constants for small ε which does not vanish as n → ∞ like the global covariance violation δ group .However, also note that δ local and δ charge may naturally be superconstant (for example, for the trivial encoding E S←L = 1 we usually have indicating that the constant or even sublinear scaling of δ local and δ charge requires non-trivial code structures. Also note that the bounds on δ local in both Theorem 19 and Theorem 21 rely on the fact that δ local ≥ δ charge , indicating that these bounds may not be tight when there is a gap between δ local and a function of δ charge .Such a gap does exist as we shown later in examples (see Sec. VII) and we provide a possible explanation of the existence of the gap in Appx.H.

VII. CASE STUDIES OF EXPLICIT CODES
In the above, we have derived several forms of fundamental limits on the QEC accuracy and degree of symmetry or charge conservation that a quantum code can possibly admit.Then a natural question is to what extent these limits can be attained by certain codes.Furthermore, explicit constructions of approximately covariant codes would be important for our understanding of the QEC-symmetry trade-off and may find broad applications.In this section, we introduce and analyze two code examples with interesting approximate covariance features to address these needs.In the first example, we generalize a covariant code called the thermodynamic code [9,12] to a class of general quantum codes which exhibits a full trade-off between symmetry and QEC via a smooth transition from exact covariance to exact QEC.The second one involves a well-known QEC code called the quantum Reed-Muller codes [82,83], which can be seen as a prominent example of approximately covariant exact QEC codes.In particular, we explicitly compute their QEC and symmetry measures, and compare them to the fundamental limits.Remarkably, the scalings of the global covariance violation and the charge conservation violation for both examples match well with the optimal scalings from our bounds.

A. Modified thermodynamic codes
Thermodynamic codes [9,12] are n-qubit quantum codes given by certain Dicke states with different magnetic charges which become approximately quantum error-correcting for large n.Specifically, a two-dimensional thermodynamic code have codewords where |m n ⟩ for m ∈ [−n, n] is the Dicke state defined by satisfying n l=1 Z l |m n ⟩ = −m.Note that m + n must be an even number and we assume 2 ≤ m ≪ n.It is easy to verify that the thermodynamic code is exactly covariant with respect to H L = m 2 Z L and H S = − 1 2 n l=1 Z l and it was proven that for single-erasure noise [40] ε = m/2n + O(m 2 /n 2 ) which is infinitely small when m/n → 0.Here we extend the thermodynamic code in such a way that it smoothly transitions from an exactly covariant code to an exact QEC code as tuned by a continuous parameter 0 ≤ q ≤ 1.Specifically, our modified thermodynamic code is defined by In particular, when q = 0, we have the original thermodynamic code, and when q = 1, we obtain an modified code which is exactly error-correcting under single-erasure noise.We shall compute the QEC inaccuracy and the different covariance violation measures, and compare them with our trade-off bounds.

QEC inaccuracy
Here we compute the QEC inaccuracy of modified thermodynamic codes ε(N S , E S←L ) where We need to use the following lemma which compute the purified distance between error-corrected channels, employing the formalism of complementary channels [38].
for arbitrary Φ 1,2 , where the minimizations are taken over all channels with the appropriate input and output spaces.
As detailed in Appx.G, we have that and furthermore, explicitly construct a recovery channel R opt L←S which achieves the optimal QEC inaccuracy up to the lowest order of m/n:

Symmetry violation measures
We now compute all the approximate symmetry measures associated with our modified thermodynamic codes.Note that we let H L = m 2 Z L and H S = − 1 2 n l=1 Z l , which guarantees that the code tends to be covariant as n → ∞.We first compute δ group and R ⟩ be an arbitrary pure state on L ⊗ R. Then and where the maximum of P (|ψ θ ⟩ , |ψ⟩) is attained at |ψ⟩ = (|0 L ⟩ + |1 L ⟩)/ √ 2 (here the reference system can be onedimensional, namely L ⟩ for all θ).Therefore, the global covariance violation is given by The code is exactly covariant when θ = 4kπ m+n and k is an integer, and the corresponding local covariance violation is given by To compute the charge conservation violation δ charge , note that 4(n+qm) 1 L so we have Also note that the parameter B which shows up in Theorem 6 and Theorem 21 is given by when qn ≫ m and B = O(m) otherwise.Here we plot δgroup, δ local , δC and ε (which is approximately equal to ε for large n).As q increases from 0 to 1, ε decreases while the symmetry measures increase.We can also see that fixing q, the slopes of δgroup, δ local , δC , and ε with respect to n are −1/2, 1/2, 0, and −1, respectively, matching our calculations.

Trade-off between QEC and symmetry, and explicit comparisons with lower bounds
Let us first overview the behavior of modified thermodynamic codes.Our calculations above indicate that up to the leading order, ε ≃ (1 − q)m/2n, while δ group ≃ 4qm/n, δ local ≃ √ qmn, and δ charge ≃ qm (see Fig. 4).That is, as q varies from 0 to 1, the symmetry violation (in terms of different measures) and the QEC inaccuracy exhibit trade-off behaviors-the former increases from 0 while the latter decreases to 0.
We now discuss the comparison with our lower bounds, focusing on the large n asymptotics.Note that H L = m 2 Z L and H S = − 1 2 n l=1 Z l , so we have ∆H L = m and ∆H S l = 1 for each l.For single-erasure noise channels (as shown in Sec.III D), we have J ≤ n max l ∆H S l = n and F ≤ n n l=1 (∆H S l ) 2 = n 2 , and Theorem 6 then gives: Plugging in the QEC inaccuracy ε ≃ (1 − q)m/n, we have Recall that for the modified thermodynamic code we have δ group ≃ 4qm/n, which saturates this lower bound on δ group up to a constant factor of 2 in the leading order of m/n.Similarly, we could also plug the actual value δ group ≃ 4qm/n into Eq.( 148) and obtain the lower bound which shows that the actual value ε ≃ (1 − q)m/2n of the modified thermodynamic code saturates this lower bound up to a constant factor in the leading order of m/n for q < 1/4.
For the local symmetry measures, we first note that for the modified thermodynamic code with q > 0 we have δ local /m ≃ qn/m which becomes larger than 1 as m/n → 0, thus Theorem 23 is not saturated.We provide one possible explanation of this gap between δ local and its lower bound in Appx.H, where we show a refinement of Theorem 23 by replacing δ local in Theorem 23 with δ ⋆ local (≤ δ local ) which is defined using the QFI of the error-corrected channel We show that the gap between δ local and its lower bound could be explained by its gap with δ * local , explaining the looseness of Theorem 23.
Recall that for the modified thermodynamic code the charge conservation violation is δ charge ≃ qm.From Theorem 19, we have Namely, δ charge exactly saturates this lower bound in the leading order of m/n.Note that B = O( √ n) and F = O(n 2 ) satisfies B ≪ √ F in Theorem 6 and Theorem 21 so that B is negligible in the trade-off relations from Theorem 6 and Theorem 21 for modified thermodynamic codes in the large n asymptotics.
Finally, note that the trade-off relation given by the diamond distance, which follows from Theorem 6 and the discussion in Sec.II, is also saturated up to a constant factor because δ group,⋄ = δ group and ε ⋄ = ε 2 + O(m 3 /n 3 ) (see Appx.G for details).

B. Quantum Reed-Muller codes
Reed-Muller codes constitute a family of error-correcting codes of great theoretical and technological interest.The classical Reed-Muller code R(s, t) [83] is a [2 t , s i=0 t i , 2 t−s ] code whose codewords correspond to Boolean functions of t variables of degree at most s.Then the shortened Reed-Muller codes R(s, t) = [2 t −1, s i=1 t i , 2 t−s ] are obtained by selecting the codewords of R(s, t) whose first digits are 0 and deleting their first digits.
The generalization to the quantum regime based on the stabilizer formalism and CSS construction, which leads to the quantum Reed-Muller codes, are also an important type of QEC codes [82].Given the nice structures and features of quantum Reed-Muller codes, they provide a natural platform for understanding code properties.For example, quantum Reed-Muller codes were widely applied in magic state distillation and implementing transversal non-Clifford operations [49][50][51][52].Quantum Reed-Muller codes were also known to reach the highest level of the Clifford hierarchy possible under the disjointness restriction [48].Here we consider the [[n = 2 t −1, 1, 3]] quantum Reed-Muller code, which is a CSS code [2] whose X stabilizers correspond to R(1, t) and Z stabilizers correspond to R(t − 2, t).It is exactly error-correcting under single-erasure noise and admits a transversal implementation l e iπZ l /2 t−1 of the logical operator e −iπZ L /2 t−1 .We now compute its symmetry violation measures.This code has the following form in the computation basis: where we use x to denote n-bit strings (0 and 1 are all-zero and all-one strings, respectively).All strings in R(1, t)\{0} have weight 2 t−1 .Let W be the encoding isometry and thus Therefore, we have The lower bound from Theorem 6 gives Similar to the modified thermodynamic code, δ group saturates its lower bound up to a constant factor of 2 in the leading order of 1/n.Also note that δ group,⋄ = δ group in this case according to the discussion in Sec.II, indicating the saturation of the lower bound when we consider the diamond distance.The code is exactly covariant when θ = 4kπ n+1 and k is an integer, and the corresponding local covariance violation can also be easily computed from Eq. ( 156): which has a quadratic gap with its lower bound ∆H L = 1.To compute the charge conservation violation δ charge , we note that matching our lower bound ∆H L .Also note that B = √ 2n, so it is negligible in the trade-off relations from Theorem 6 and Theorem 21.

VIII. DISCUSSION
In this work, we devised and explored various approaches that enable us to quantitatively understand the fundamental trade-off between the QEC capability and several different characterizations of the degree of continuous symmetries associated with general QEC codes, including the violation of covariance conditions in both global and local senses as well as the violation of charge conservation (see Appx.A for a summary).In particular, we introduced two intuitive and powerful frameworks based on the notions of charge fluctuation and gate implementation error respectively, and employed several different methods from approximate QEC, quantum metrology, and quantum resource theory, to derive various forms of the trade-off relations in terms of distance metrics that address both worst-case and average-case inputs.Our results and techniques are expected to have numerous interesting applications to quantum computation as well as physics (see the main text).We specifically discussed the consequent restrictions on the transversal logical gates for general QEC codes, which could be of interest for fault tolerance.We also provided detailed analysis of two interesting examples of approximately covariant codes-a parametrized extension of the (covariant) thermodynamic code, which gives a code family that continuously interpolates between exactly covariant and error-correcting, and the quantum Reed-Muller codes.We showed that both codes can saturate the lower bounds asymptotically up to constant factors, indicating that the bounds are quite tight.
We would like to point out a few issues arising from our technical analysis that are not yet satisfactorily understood and could be worth further investigation: • For both of the code examples we studied, the global covariance violation and charge conservation violation attain the optimal asymptotic scaling as indicated by the bounds based on the charge fluctuation approach, but the local covariance violation does not (there is a Θ( √ n) vs. O(1) gap).Note the observation (discussed above and in Appx.H) that if we additionally consider a recovery step in the definition of local covariance violation then it exhibits a tight scaling.We would hope to close this gap by further understanding both sides of it.This is potentially key to a complete understanding of the behavior and practical meanings of the local symmetry measures.
• The gate implementation error approach provides bounds that behave worse than the corresponding bounds from the charge fluctuation approach under uniformly random local noise.It would be interesting to further understand whether this gap stems from the looseness of Proposition 10.On the other hand, the discussion in Sec.IV C also indicates that for extremely strong noise (so that the regularized QFI is sublinear), the gate implementation error approach outperforms the charge fluctuation approach.The question remains whether there is a universal bound which exhibits optimal scalings under any noise models.
There are also several important directions for future study: • Gate implementation error.We introduced the gate implementation error as a notion that nicely unifies QEC inaccuracy and global covariance violation, and in turn serves as a tool for deriving the trade-off between them.We believe that this quantity is interesting in its own right and expect it to find broader applications in the analysis of QEC, distillation etc.
• General continuous symmetry groups.Here we mainly carried out the discussion in terms of U (1) which corresponds to a single conserved quantity, but obviously the symmetry groups are often more complicated in quantum computation and physical scenarios.It would be useful to extend our study to other important continuous symmetry groups such as SU (d), for which we expect that our analysis for U (1) provides a basis and serves as a sub-theory but it is useful to invoke corresponding representation theory machinery (like in Refs.[12,27]).
• Discrete symmetries.Given the incompatibility results for continuous symmetries, it is natural to ask whether discrete symmetries, which are also broadly important, place restrictions on QEC.It is known that for discrete symmetry groups one can in principle construct a covariant code which also achieves exact QEC [11], indicating that the incompatibility is not as fundamental as continuous symmetries.However, we do know interesting cases where exact QEC is forbidden even in the presence of discrete symmetries under simple additional constraints (e.g., AdS/CFT codes-see Refs.[12,18,28]).It would be interesting to further explore both the possible limitations as well as good code constructions for QEC with discrete symmetries in more general terms.
Furthermore, we expect the study of how QEC interacts symmetries to be relevant in wide-ranging physical scenarios.In the main text, we discussed potential applications of our theory and techniques to several topics of great interest in physics, including AdS/CFT, black hole radiation, and many-body physics.It would be interesting to further consolidate these ideas.To this end, an important task is to bridge the language of quantum information used here and those commonly used in high energy and condensed matter physics.To conclude, our study enriches the "physical" understanding of QEC using a wide variety of approaches in quantum information.We hope it will stimulate further interest into exploring the interaction between QEC, quantum information, and physics.(B1) Then and Proof.We have two rotated dephasing channels: where we use Lemma S1, the monotonicity of the purified distance and the definition of ε.
(1) We first prove Eq. (C1).The channel QFI [40,69,77] of rotated dephasing channel D C,θ is where h is an arbitrary Hermitian matrix and K C = √ 1 − p θ e −iϕ θ Z C √ p θ e −iϕ θ Z C Z C .Moreover, using the monotonicity of the channel QFI, Then We claim that where U L,θ = e −i(E S←L ) † (H S )θ (•)e i(E S←L ) † (H S )θ .Clearly, Eq. (C2) is then proven combining Eq. (C15) and Eq.(C16).Now we prove Eq. (C15).First, let We have for any ρ in system C ⊗ R where R is a two-dimensional reference system.In particular, choose ρ to be the maximally entangled state in C ⊗ R, we have where A ij = R i E j and (•) = (•) − Tr(•)1 2 , and ∥•∥ HS denotes the Hilbert-Schmidt norm.Note that where η c 0 η 2 = η c 1 η 2 = 1 and |η 0 ⟩ and |η 1 ⟩ are eigenstates of H S with eigenvalue η. |η 0 ⟩ and |η 1 ⟩ may not be the same when H S is degenerate.Note that when η is not an eigenvalue of H S , we simply take c 0 η = 0 (or c 1 η = 0) so that c 0 η (or c 1 η ) and is well-defined for any integer η.Let |ψ⟩ = 1 To arrive at a non-trivial lower bound on δ group = 1 − min θ f 2 θ , we need an upper bound of min θ f θ which is smaller than 1.To this end, we analyze c η * in detail.In particular, we consider two situations: (1) c η * ≤ 1/2 and a constant upper bound on min θ f θ exists.We can always find a subset of {η} denoted by s such that 1/4 ≤ η∈s c η ≤ 1/2.To find such a set, we first include η * in s and add new elements into s one by one until their sum is at least 1/4.Then there is always a θ such that ( η∈s c η e −iηθ ) • ( η / ∈s c η e −iηθ ) is imaginary, in which case min θ f θ ≤ (1/4) 2 + (3/4) 2 = 5/8 and we have √ q 1 K (1) √ q 2 K (2)   . . .√ q m K (m) S ) = min (∆h (i) ) = 4 min Suppose (h ) is optimal for J(N

Figure 1 .
Figure1.For exact QEC codes (ε = 0) which satisfy the HKS condition, the charge fluctuation χ = 0.For exactly covariant codes (δgroup = 0), the charge fluctuation χ = ∆HL.The trade-off can be derived by investigating the relations between the distances of χ from ∆HL and 0, and the symmetry and QEC measures.

Proposition 2 .
Consider an isometric quantum code defined by E S←L .Consider physical Hamiltonian H S , logical Hamiltonian H L , and noise channel N S .Suppose the HKS condition is satisfied.Then when |∆H L − χ| ≤ ∆H S , it holds that

Figure 2 .
Figure 2. A two-level encoding scheme for the estimation of θ.(a) Definition of the encoded channel N C,θ in the system C. N C,θ = RC←SA • (N S,θ ⊗ 1A) • ESA←C where RC←SA = R rep LA←C • (R opt L←S ⊗ 1A) and ESA←C = (ES←L ⊗ 1A) • E rep LA←C .It includes a concatenation of the repetition encoding from C to LA and the encoding under consideration ES←L from L to S with the optimal recovery channels chosen accordingly.(b) N C,θ is the composition of D C,θ and U C,θ where U C,θ is the unitary rotation with respect to a Pauli-Z Hamiltonian HC and D C,θ is a rotated dephasing channel which is at most ε-far from identity at θ = 0.When δgroup ≈ 0, D C,θ ≈ RC←SA • (NS ⊗ 1A) • ESA←C is almost θ-independent.Note that the gates are applied from right to left.

= n l=1 1 n
•) (we use |∅⟩ to represent the vacuum state after erasure).When N S N S l and the Hamiltonian takes the 1-local form θ and verify that P (Rcov(C) L←S • N S • E S←L , 1 L ) ≤ γ,leading to Eq. (99).
115) where we use the monotonicity and the triangular inequality of the purified distance.Without loss of generality, assume H L = d L i=1 λ i |i⟩ ⟨i| and let |ψ⟩ = d L i=1 ψ i |i⟩ |i⟩.Consider first the situation where D > 2 max{∆H L , ∆H S }, then we have θ 1 max{∆H L , ∆H S } < π and
must have K † S h * K S = i K (i) † S h * K (i) S = H S − ν * 1.Therefore, J(N S , H S ) = 4 min h,ν:K † S hK S =H S −ν1 ∥h∥ ≤ 4 ∥h * ∥ = 4 max Let N S = n l=1 N S l and H S = n l=1 H S l .Suppose the HKS condition is satisfied for each pair of N S l and H S l .Then Eq. (82) holds, i.e.,J(N S , H S ) ≤ n l=1 J(N S l , H S l ).(F6) Proof.Let N S l (•) = r l j=1 K S l ,j (•)K † S l ,j and K S l = Then we could take K S = n l=1 K S l .Recall thatJ(N S , H S ) = min h:K † S hK S =H S (∆h) = 4 min h,ν:K † S hK S =H S −ν1 ∥h∥ ,(F7)J(N S l , H S l ) = min h l :K † S l h l K S l =H S l (∆h l ) = 4 min h l ,ν l :K † S l h l K S l =H S l −ν l 1 ∥h l ∥ .(F8)Suppose (h l, * , ν l, * ) is optimal for J(N S l , H S l ), then let ν * = l ν l, * and K † S h * K S = l H S l − ν l, * 1 = H S − ν * 1.Therefore, J(N S , H S ) = 4 min h,ν:K † S hK S =H S −ν1 ∥h∥ ≤ 4 ∥h * ∥ = 4 l ∥h l, * ∥ = n l=1 J(N S l , H S l ).(F10)