Introduction

Symmetry has long been a pivotal concept and tool in physics. Continuous symmetries are those described by transformations that vary continuously as a function of some parameterization, mathematically modeled by Lie groups. Associated with conservation laws as dictated by the celebrated Noether’s theorem1, continuous symmetries ubiquitously arise in physical systems and play fundamental roles in their behaviors. A basic, prototypical example of a continuous symmetry group is U(1), coming with a conserved quantity that may correspond to charge, particle number, energy, etc., depending on the physical scenario.

A phenomenon that has drawn significant interest lately is that continuous symmetries can induce fundamental limitations on quantum error correction (QEC)2,3, a cornerstone of quantum technologies that was initially introduced as a technique to protect quantum information4,5,6,7 and has since been found to play fundamental roles in many areas in physics including quantum gravity8,9 and condensed matter physics10,11,12,13. An early result is the Eastin–Knill theorem3 which, in a quantum computation language, says that if a (finite-dimensional) quantum code implements any continuous group of gates transversally (see Fig. 1 for an illustration), it cannot exactly correct local errors. It is worth noting that the transversality property is not only important in quantum computation since transversal gates are particularly desirable for fault tolerance, but also widely so in physics as a fundamental feature of internal symmetries in many-body scenarios. Further, there has been a series of recent works that consider approximate QEC by covariant codes, providing bounds on the accuracy as well as explicit constructions14,15,16,17,18,19,20,21,22. Viewing the gates as symmetry actions, these results indicate that the QEC accuracy of a code admitting transversal continuous symmetries is necessarily restricted to some extent. Such codes are called covariant codes in the literature2,14,15. Besides the direct relevance to quantum computation, covariant codes have intriguing connections to wide-ranging disciplines in physics including condensed matter physics12,13,16, holography14,15,23,24,25, and quantum information2,15,22.

Fig. 1: An illustration of the transversality property.
figure 1

The logical gate (orange) is transversal in the sense that it is implemented by physical gates with tensor product forms, i.e., acting on individual physical subsystems (yellow). Transversal gates are desirable for fault tolerance because they do not spread errors within code blocks. In our context, the gates represent symmetry actions so transversality signifies the product property of the symmetry representations on the physical system.

As certain forms of invariance under transformations, symmetries are by definition exact. The existing works on QEC with symmetries2,14,15,16,17,18,19,20,21,22 indeed focused on the QEC performance of exactly covariant codes. However, it is often useful or even necessary to consider approximate forms of symmetries or conservation laws, especially in quantum physics. For instance, noise effects and imperfections that are common in realistic scenarios can cause deviations from the exact symmetry conditions. There are various more fundamental symmetry breaking mechanisms including spontaneous symmetry breaking, anomalies, and non-renormalizable effects26. Remarkably, the inexactness of symmetries plays a significant role in our understanding of wide-ranging aspects of fundamental physics. In particle physics, many fundamental symmetries are known to be only approximate27. In fact, it is commonly believed that global symmetries cannot be exact in a unified theory of quantum mechanics and gravity27,28,29,30,31,32. Notably, one modern argument justifying the belief in more concrete terms in AdS/CFT is closely related to covariant codes14,23,24. Despite the importance of approximate symmetries, our understanding of them, especially on a quantitative level, is quite limited and unsystematic, raising the need for a general theory of symmetry violation measures. In particular, for QEC and associated problems in physics, it is imperative that we quantitatively understand how symmetry violation is induced by QEC accuracy, which represents a theory of the emergence of approximate symmetries.

In this work, we introduce a variety of approximate continuous symmetry measures in quantum channels and codes, and furthermore, establish a comprehensive theory of the competition between them and QEC accuracy for the most fundamental U(1) case. More specifically, we introduce three different meaningful measures of the degree of symmetry violation in terms of group-global and group-local covariance violation respectively, and charge conservation violation, which correspondingly induce different quantitative notions of approximately covariant codes. We then derive a series of trade-off relations between the QEC inaccuracy and the above approximate symmetry measures under a general condition called Hamiltonian-in-Kraus-span (HKS) condition which subsumes transversality in our setup, by employing various techniques and ideas from approximate QEC33,34, quantum metrology35,36,37 and quantum resource theory38,39,40,41. In particular, our results indicate various forms of lower bounds on the symmetry violation of QEC codes, which imply universal fine-grained restrictions on the transversally implementable gates, improving the Eastin–Knill theorem. To exemplify the general theory, we present two explicit families of approximately covariant codes that nearly saturate certain lower bounds. In the end, we provide a blueprint for several potential applications in quantum gravity and condensed matter physics.

The main goal of this paper is to elucidate the intuitions behind our approaches and report the most representative results. We refer interested readers to the Supplementary Information, which can be read independently as an extended companion paper gearing more toward the technical audience. All technical details, additional results, and more extensive discussions can be found in it.

Results

Quantitatively characterizing approximate symmetries

We first introduce, from a general standpoint, three physically motivated types of quantitative measures of the symmetry violation of quantum systems.

Let G be a compact Lie group corresponding to the continuous symmetry of interest. Denote by \({{{{\mathcal{E}}}}}_{B\leftarrow A}\) a quantum channel from system A to system B. The channel exactly respects symmetry G if it is covariant with respect to the group actions, i.e.,

$${{{{\mathcal{E}}}}}_{B\leftarrow A}\circ {{{{\mathcal{U}}}}}_{A,g}={{{{\mathcal{U}}}}}_{B,g}\circ {{{{\mathcal{E}}}}}_{B\leftarrow A},$$
(1)

or equivalently \({{{{\mathcal{U}}}}}_{B,g}^{{\dagger} }\circ {{{{\mathcal{E}}}}}_{B\leftarrow A}\circ {{{{\mathcal{U}}}}}_{A,g}={{{{\mathcal{E}}}}}_{B\leftarrow A}\), for all gG, where we use \({{{\mathcal{U}}}}(\cdot ):= U(\cdot ){U}^{{\dagger} }\) to denote the channel action of unitary U, and Ug is determined by the unitary representation of G under consideration (on the appropriate system).

To characterize the deviation from the exact symmetry, it is natural to consider the mismatch between the two sides of the covariance condition. Then an intuitive overall measure is the maximum mismatch overall the entire group as given by some channel distance D, which we call group-global covariance violation:

$$\begin{array}{r}{\tilde{\delta }}_{{{{\rm{global}}}}}:= \mathop{\max }\limits_{g\in G}D({{{{\mathcal{E}}}}}_{B\leftarrow A}\circ {{{{\mathcal{U}}}}}_{A,g},{{{{\mathcal{U}}}}}_{B,g}\circ {{{{\mathcal{E}}}}}_{B\leftarrow A}).\end{array}$$
(2)

Note that we may not explicitly write down the arguments of the measures when they are unambiguous.

Another important notion is the symmetry violation around a certain point g0 in the group at which the covariance condition \({{{{\mathcal{E}}}}}_{B\leftarrow A}\circ {{{{\mathcal{U}}}}}_{A,{g}_{0}}={{{{\mathcal{U}}}}}_{B,{g}_{0}}\circ {{{{\mathcal{E}}}}}_{B\leftarrow A}\) holds. Here we are interested in the local geometry of the mismatch around this point. Without loss of generality, we assume \({g}_{0}={\mathbb{1}}\), because for an arbitrary g0, we can always redefine the quantum channel to be \({{{{\mathcal{U}}}}}_{A,{g}_{0}}\circ {{{{\mathcal{E}}}}}_{B\leftarrow A}\). Let the symmetry actions be parametrized by \({{{\boldsymbol{\theta }}}}=\{{\theta }_{k}\}\in {{\mathbb{R}}}^{K}\) via some unitary representation Ug = eiJθ where J = {Jk} are infinitesimal generators of G. For all k = 1, …, K, we define the group-local (point) covariance violation as

$${\tilde{\delta }}_{{{{\rm{local}}}},k}:= {\left(2{\partial }_{{\theta }_{k}}^{2}D{({{{{\mathcal{E}}}}}_{B\leftarrow A}\circ {{{{\mathcal{U}}}}}_{A,{e}^{-i{J}_{k}{\theta }_{k}}},{{{{\mathcal{U}}}}}_{B,{e}^{-i{J}_{k}{\theta }_{k}}}\circ {{{{\mathcal{E}}}}}_{B\leftarrow A})}^{2}\right)}^{1/2}{\left\vert \right.}_{{\theta }_{k} = 0},$$
(3)

where \({\partial }_{\theta }^{2}{D}^{2}\) denotes the second-order derivative of D2 with respect to θk. The square root and the coefficient \(\sqrt{2}\) in the definition are chosen to simplify calculations, as will be seen later on. It is worth noting that this notion is closely connected to local parameter estimation, which is a standard setup in metrology, as will be further discussed.

Lastly, it is natural to consider the deviation from conservation laws. Specifically, each generator Jk is associated with a charge, and we can quantify the variation of the charge for input state ρ by

$${\tilde{\delta }}_{{{{\rm{charge}}}},k}(\rho ):= \left\vert {{{\rm{Tr}}}}{J}_{k,B}{{{{\mathcal{E}}}}}_{B\leftarrow A}(\rho )-{{{\rm{Tr}}}}{J}_{k,A}\rho \right\vert ,$$
(4)

where Jk,A and Jk,B are the generators on systems A and B, respectively, so the trace gives the expectation value of the associated charge. Then overall measures can be defined based on e.g. maximization over ρ. Note that \({\tilde{\delta }}_{{{{\rm{charge}}}}}\) is not necessarily zero for covariant encoding channel \({{{\mathcal{E}}}}\), except when \({{{\mathcal{E}}}}\) is isometric, which is the standard case in QEC scenarios42.

Since \({\tilde{\delta }}_{{{{\rm{local}}}}}\) and \({\tilde{\delta }}_{{{{\rm{charge}}}}}\) only depend on the local geometry of the symmetry group, we shall collectively call them local symmetry measures. As will become evident, these three measures are inequivalent and their behaviors should be understood independently; notably, \({\tilde{\delta }}_{{{{\rm{global}}}}}\) is a unitless measure with range [0, 1], in contrast to \({\tilde{\delta }}_{{{{\rm{local}}}}}\) and \({\tilde{\delta }}_{{{{\rm{charge}}}}}\).

QEC setting: code accuracy and symmetry

Now we describe the QEC setup and in particular, formally define the QEC (in)accuracy and symmetry measures associated with a quantum code (as an application of the general measures introduced above) that will be considered.

In this work, we mainly consider a type of distance measure based on the purified distance, which is particularly well behaved and of broad importance in quantum information. More specifically, the state purified distance is given by

$$P(\rho ,\sigma ):= \sqrt{1-f{(\rho ,\sigma )}^{2}}$$
(5)

where \(f(\rho ,\sigma ):= {{{\rm{Tr}}}}(\sqrt{{\rho }^{1/2}\sigma {\rho }^{1/2}})\) is the fidelity, based on which one can define the channel purified distance43,44,45 as

$$P({{{\Phi }}}_{1},{{{\Phi }}}_{2}):= \mathop{\max }\limits_{\rho }P(({{{\Phi }}}_{1}\otimes {\mathbb{1}})(\rho ),({{{\Phi }}}_{2}\otimes {\mathbb{1}})(\rho )).$$
(6)

In principle, one may also consider other metrics. In Supplementary Notes 2 and 7, we also discuss the situations where one uses e.g. the diamond norm distance46, which is another standard channel distance measure. Additionally, the purified distance is equal to the Bures distance defined by \(\sqrt{2(1-f(\rho ,\sigma ))}\) up to the leading order when f ≈ 1 or the distance is small, a quantity used to study approximate QEC before34. The choice of purified distance directly relates the local covariance violation to the quantum Fisher information (QFI)47,48,49,50, which is a central notion in quantum metrology as a standard quantifier of the amount of information a parametrized quantum state ρθ carries about the parameter θ locally. Note that the QFI we use here is conventionally called the symmetric logarithmic derivative (SLD) QFI, while there are other types of QFIs, e.g., the right logarithmic derivative (RLD) QFI51,52,53 which we will encounter in Methods.

A quantum code is defined by an encoding channel \({{{{\mathcal{E}}}}}_{S\leftarrow L}\), which is a map from a logical system L to a physical system S. The physical system may be subject to a noise channel \({{{{\mathcal{N}}}}}_{S}\). Ideally, if we can find a recovery (decoding) channel \({{{{\mathcal{R}}}}}_{L\leftarrow S}\) that achieves

$${{{{\mathcal{R}}}}}_{L\leftarrow S}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}={{\mathbb{1}}}_{L},$$
(7)

where \({{\mathbb{1}}}_{L}\) denotes the logical identity channel, indicating that the QEC procedure essentially removes the noise effects so that the logical information is perfectly recovered, we say the code achieves exact QEC or is an QEC code. For general codes, there may not exist a recovery channel that satisfies (7), meaning that QEC cannot be done perfectly. Naturally, we characterize the QEC inaccuracy by

$$\varepsilon := \mathop{\min }\limits_{{{{{\mathcal{R}}}}}_{L\leftarrow S}}P({{{{\mathcal{R}}}}}_{L\leftarrow S}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L},{{\mathbb{1}}}_{L}),$$
(8)

that quantifies the minimum deviation from perfect information recovery.

We now consider symmetry in the QEC setting. Here the encoding \({{{{\mathcal{E}}}}}_{S\leftarrow L}\) is the channel of interest in the last section, and the symmetry acts on its input and output systems, namely the logical system L and the physical system S. From here on, we shall base our discussion on U(1) symmetry, which is of fundamental importance in itself and nicely reveals the key phenomena. Specifically, consider the family of logical gates \({U}_{L,\theta }={e}^{-i{H}_{L}\theta }\) for every \(\theta \in {\mathbb{R}}\), implemented by physical gates \({U}_{S,\theta }={e}^{-i{H}_{S}\theta }\) for every \(\theta \in {\mathbb{R}}\), which are U(1) representations on L and S generated by non-trivial Hamiltonians (symmetry generators) HL and HS, respectively (note that they should not be confused with the intrinsic Hamiltonians of the systems).

Suppose the Kraus decomposition of the noise channel is given by \({{{{\mathcal{N}}}}}_{S}(\cdot )={\sum }_{i}{K}_{S,i}(\cdot ){K}_{S,i}^{{\dagger} }\) where KS,i are the Kraus operators. A sufficient condition for the non-existence of exactly covariant QEC codes, or in other words, the incompatibility between exact symmetry and QEC, is

$${H}_{S}\in {{{\rm{span}}}}\{{K}_{S,i}^{{\dagger} }{K}_{S,j},\forall i,j\},$$
(9)

which will be referred to as the ‘Hamiltonian-in-Kraus-span’ (HKS) condition18. Note that although the HKS condition is defined using Kraus operators, it is just a function of the noise channel, because different Kraus representations of a channel will give the same Kraus span. An important scenario obeying the HKS condition that can be regarded a prototypical case of our theory is when HS is 1-local and \({{{{\mathcal{N}}}}}_{S}\) is any single-qubit noise with a full Kraus span. This includes erasure, depolarizing, and amplitude damping noises54. The 1-local property means that each term in HS acts nontrivially only on one subsystem and corresponds to the transversality of US,θ (illustrated in Fig. 1). As motivated earlier, this transversality property is crucial to practical quantum computing since transversal gates are fault-tolerant. Moreover, it is broadly important in physical contexts, where one normally considers global internal symmetries generated by sums of disjoint local charge observables, in particular on-site (transversal with respect to sites) symmetries; a typical example is U(1) generated by the Hamming-weight-type charge observable. 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 theories55. Transversality also plays fundamental roles in AdS/CFT23,56,57. It is worth noting that, when the HKS condition fails, examples of exactly covariant QEC codes exist, for instance, when \({{{{\mathcal{N}}}}}_{S}={\mathbb{1}}\) (unitary dynamics), when HS is a Pauli-X operator and \({{{{\mathcal{N}}}}}_{S}\) is a dephasing noise58,59, and when HS is 2-local and \({{{{\mathcal{N}}}}}_{S}\) is a single-erasure noise60. We will assume the HKS condition holds from now on and study the consequent competition between QEC and covariance.

Finally, we formally define the three quantitative measures of code symmetry (violation) that we shall consider, obtained by applying the general ideas from the last section to our setup where the symmetry group is U(1).

  1. i.

    Group-global covariance violation: directly following the general definition, we consider

    $$\begin{array}{r}{\delta }_{{{{\rm{global}}}}}:= \mathop{\max }\limits_{\theta }P({{{{\mathcal{U}}}}}_{S,\theta }\circ {{{{\mathcal{E}}}}}_{S\leftarrow L},{{{{\mathcal{E}}}}}_{S\leftarrow L}\circ {{{{\mathcal{U}}}}}_{L,\theta }).\end{array}$$
    (10)

    δglobal = 0 if and only if the code is exactly covariant.

  2. ii.

    Group-local covariance violation, in the vicinity of a certain θ0 where the code is exactly covariant (as explained, we assume θ0 = 0 without loss of generality): For our setting, by letting D be the channel purified distance in \({\tilde{\delta }}_{{{{\rm{local}}}}}\) we obtain

    $${\delta }_{{{{\rm{local}}}}}:= \sqrt{F({{{{\mathcal{U}}}}}_{S,\theta }\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}\circ {{{{\mathcal{U}}}}}_{L,\theta }^{{\dagger} }){| }_{\theta = 0}},$$
    (11)

    where F(  ) is the channel QFI given by \(F({{{\Phi }}}_{\theta })=\mathop{\max }\nolimits_{\rho }F(({{{\Phi }}}_{\theta }\otimes {\mathbb{1}})(\rho ))\)61, in which

    $$F({\rho }_{\theta }):= 2{\left.\frac{{\partial }^{2}P{({\rho }_{\theta },{\rho }_{{\theta }^{{\prime} }})}^{2}}{\partial {\theta }^{{{\prime} }^{2}}}\right\vert }_{{\theta }^{{\prime} } = \theta },$$
    (12)

    is the conventional state QFI47,48,49,50,62. (Note that it is standard to take the infinitesimal form of a distance function to define a measure of local sensitivity. Different definitions of QFI will be induced by different distance functions, e.g., the Wigner-Yanase skew information is induced by the Hellinger distance63. However, we will focus only on the purified distance and the above definition of group-local covariance violation in this work.)

  3. iii.

    Charge conservation violation: recall that the logical and physical charge observables are, Hermitian operators HL and HS respectively. As mentioned, isometric covariant channels are always charge-conserving, i.e., satisfying \({H}_{L}-\nu {\mathbb{1}}={({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})\) (up to some constant offset ν which does not affect the U(1) group representations) where \({({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }\) is the dual of the encoding channel14 that maps from S to L (the subscript L ← S is omitted for simplicity of notation). Here we directly consider

    $$\begin{array}{r}{\delta }_{{{{\rm{charge}}}}}:= {{\Delta }}\left({H}_{L}-{({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})\right),\end{array}$$
    (13)

    where Δ(H) denotes the difference between the maximum and minimum eigenvalues of a Hermitian operator H, or equivalently,

    $${{\Delta }}(H)=2\mathop{\max }\limits_{\nu \in {\mathbb{R}}}\left\Vert H-\nu {\mathbb{1}}\right\Vert .$$
    (14)

    (For simplicity of notation ΔH is used interchageably with Δ(H).) δcharge is a close variant of the general \({\tilde{\delta }}_{{{{\rm{charge}}}}}\). It can be verified that \({\delta }_{{{{\rm{charge}}}}}=2\mathop{\min }\nolimits_{\nu \in {\mathbb{R}}}\mathop{\max }\nolimits_{\rho }| {{{\rm{Tr}}}}({H}_{S}{{{{\mathcal{E}}}}}_{S\leftarrow L}(\rho ))-{{{\rm{Tr}}}}(({H}_{L}-\nu {\mathbb{1}})\rho )|\), where we allow a constant offset on the definitions of charges.

In what follows, we will refer to ‘group-global’ and ‘group-local’ as ‘global’ and ‘local’ respectively for simplicity as is common in e.g. estimation theory, which should be distinguished from the geometric notions commonly used in physical contexts. The remarks on the general measures at the end of the last section still apply here.

Symmetry vs. QEC

We now present our main results—general joint bounds of the QEC accuracy and approximate symmetry measures of a code—which reveal fundamental trade-offs between them under the HKS condition (see Fig. 2 for an illustration). Detailed proofs and further results can be found in Supplementary Notes 3 and 4. When expressing the results, by ‘xy’ we mean x ≥ (y) for some (y) that is equivalent to y asymptotically (i.e., \(\mathop{\lim }\nolimits_{y\to {0}^{+}}\ell (y)/y=1\)).

Fig. 2: Measuring approximate QEC and approximate symmetry.
figure 2

We study the trade-off between QEC inaccuracy (the deviation of the QEC procedure from the logical identity channel, as shown in the left panel) and symmetry violation (the deviation of the encoding map from being covariant with respect to symmetry actions, as shown in the right panel).

We first discuss the global symmetry violation δglobal. Using different approaches that will be explained, we prove the following two results:

Theorem 1

When \({{{{\mathcal{E}}}}}_{S\leftarrow L}\) is isometric,

$${\delta }_{{{{\rm{global}}}}}\gtrsim \sqrt{\frac{{{\Delta }}{H}_{L}-2\varepsilon {\mathfrak{J}}({{{{\mathcal{N}}}}}_{S},{H}_{S})}{{{\Delta }}{H}_{S}}},$$
(15)

where \({\mathfrak{J}}({{{{\mathcal{N}}}}}_{S},{H}_{S}):= {\min }_{{h:{H}_{S}={\sum }_{ij}{h}_{ij}}{K}_{S,i}^{{\dagger} }{K}_{S,j}}{{\Delta }}h,h\) is an arbitrary Hermitian matrix.

Theorem 2

$$\varepsilon +{\delta }_{{{{\rm{global}}}}}\gtrsim \frac{{{\Delta }}{H}_{L}}{\sqrt{4{\mathfrak{F}}({{{{\mathcal{N}}}}}_{S},{H}_{S})}},$$
(16)

where \({\mathfrak{F}}({{{{\mathcal{N}}}}}_{S},{H}_{S}):= 4\,{\min }_{h:{H}_{S}={\sum }_{ij}{h}_{ij}{K}_{S,i}^{{\dagger} }{K}_{S,j}}\left\Vert {\sum }_{ij}{({h}^{2})}_{ij}{K}_{S,i}^{{\dagger} }{K}_{S,j}-{H}_{S}^{2}\right\Vert ,h\) is an arbitrary Hermitian matrix.

Theorem 1 and Theorem 2 both demonstrate the robust trade-off between ε and δglobal; specifically, they give non-trivial lower bounds on ε for sufficiently small δglobal and vice versa. Here, both \({\mathfrak{J}}\) and \({\mathfrak{F}}\) are positive functions of the noise channel \({{{{\mathcal{N}}}}}_{S}\) and the physical charge Hamiltonian HS (different Kraus representations of a noise channel do not induce different values of \({\mathfrak{J}}\) and \({\mathfrak{F}}\).). Note that the definition of \({\mathfrak{J}}\) has a close connection to the HKS condition; \({\mathfrak{F}}\) equals the regularized channel QFI of the noisy physical gate \({{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{U}}}}}_{S,\theta }\) (the regularized QFI of a channel Φθ is defined by \({F}^{\infty }({{{\Phi }}}_{\theta })=\mathop{\lim }\nolimits_{N\to \infty }F({{{\Phi }}}_{\theta }^{\otimes N})/N\)36,37). The above results can be broadly applied to different noise and charge settings simply by analyzing \({\mathfrak{J}}\) and \({\mathfrak{F}}\), which are efficiently computable using semidefinite programming (see details Supplementary Notes 3 and 4).

To be more concrete, we now discuss the specific scaling behaviors of the above general bounds (see Table 1). Consider quantum codes on an n-partite system with 1-local HS corresponding to transversal symmetry action (such that ΔHS = O(n) and ΔHL = O(1)). Consider the following important practical noise models: i) single-erasure noise, defined by \({{{{\mathcal{N}}}}}_{S}(\cdot )=\frac{1}{n}\mathop{\sum }\nolimits_{l = 1}^{n}{{{{\mathcal{N}}}}}_{S}^{(l)}\) where \({{{{\mathcal{N}}}}}_{S}^{(l)}(\cdot )=\left\vert {{\emptyset}}\right\rangle {\left\langle {{\emptyset}}\right\vert }_{{S}_{l}}\otimes {{{{\rm{Tr}}}}}_{{S}_{l}}(\cdot )\) represents the complete erasure on the l-th subsystem with other subsystems unaffected (we use \(\left\vert {{\emptyset}}\right\rangle\) to denote the vacuum state). In this case we have \({\mathfrak{J}}=O(n)\) and \({\mathfrak{F}}=O({n}^{2})\). Then both Theorem 1 and Theorem 2 give a Ω(1/n) lower bound on ε for sufficiently small δglobal; but for sufficiently small ε, Theorem 1 gives a \({{\Omega }}(1/\sqrt{n})\) lower bound on δglobal, which is tighter than Ω(1/n) given by Theorem 2. ii) i.i.d. erasure noise, defined by \({{{{\mathcal{N}}}}}_{S}(\cdot ){ = \bigotimes }_{l = 1}^{n}{{{{\mathcal{N}}}}}_{{S}_{l}}\) where \({{{{\mathcal{N}}}}}_{{S}_{l}}(\cdot )=(1-{p}_{{{{\rm{e}}}}}){(\cdot )}_{{S}_{l}}+{p}_{{{{\rm{e}}}}}\left\vert {{\emptyset}}\right\rangle {\left\langle {{\emptyset}}\right\vert }_{{S}_{l}}{{{{\rm{Tr}}}}}_{{S}_{l}}(\cdot )\) represents a local erasure on the l-th subsystem and pe is the noise rate. In this case we have \({\mathfrak{J}}=O(n)\) and \({\mathfrak{F}}=O(n)\). Then both Theorem 1 and Theorem 2 give a \({{\Omega }}(1/\sqrt{n})\) lower bound on δglobal for sufficiently small ε; but for sufficiently small δglobal, Theorem 2 gives a \({{\Omega }}(1/\sqrt{n})\) lower bound on ε, which is tighter than Ω(1/n) given by Theorem 1. To sum up, we see that our two bounds can behave differently and complement each other in different important settings. Note that, these lower bounds grow inverse-polynomially with n while the system dimension is exponentially large. That means errors in systems can easily become intolerable in a linear or a square-root size of circuits of n qudits, demonstrating the strong competition between QEC and continuous symmetries. The above discussions can be extended to general noise models, e.g., single-depolarizing noise acts on each subsystem with different probabilities, and the exact values of the lower bounds can be analytically calculated (see discussions in Supplementary Note 3).

Table 1 Scalings of our lower bounds on ε and δ for different noise models (see details in Supplementary Notes 3 and 4).

We now explain the main ideas behind the derivation of Theorem 1 and Theorem 2. The full proofs can be found in Supplementary Notes 3 and 4. In particular, each of the two results builds upon a meaningful quantity we introduce associated with a code and the symmetry, which may be of independent interest.

Theorem 1 comes from a notion that we call charge fluctuation, defined by

$$\chi := \langle {0}_{L}| {({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})| {0}_{L}\rangle -\langle {1}_{L}| {({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})| {1}_{L}\rangle ,$$
(17)

where \(\left\vert {0}_{L}\right\rangle\) and \(\left\vert {1}_{L}\right\rangle\) are eigenstates of HL corresponding to the largest and the smallest eigenvalues, respectively. For intuition, consider the following extremes. For exact QEC codes, it is straightforward to see that χ = 0: the Knill–Laflamme conditions33 indicate that \({{\Pi }}{K}_{S,i}^{{\dagger} }{K}_{S,j}{{\Pi }}\propto {{\Pi }}\) for all i, j where Π is the projection onto the code subspace, so \(\left\langle {0}_{L}\right\vert {({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({K}_{S,i}^{{\dagger} }{K}_{S,j})\left\vert {0}_{L}\right\rangle =\left\langle {1}_{L}\right\vert {({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({K}_{S,i}^{{\dagger} }{K}_{S,j})\left\vert {1}_{L}\right\rangle\); then since HS can be written as a linear combination of \({K}_{S,i}^{{\dagger} }{K}_{S,j}\) due to the HKS condition, we have \(\left\langle {0}_{L}\right\vert {({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})\left\vert {0}_{L}\right\rangle =\left\langle {1}_{L}\right\vert {({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})\left\vert {1}_{L}\right\rangle\). That is, the value of χ characterizes the degree of deviation from Knill–Laflamme conditions. On the other hand, for exactly covariant codes, we have χ = ΔHL because \({({{{{\mathcal{E}}}}}_{S\leftarrow L})}^{{\dagger} }({H}_{S})={H}_{L}-\nu {\mathbb{1}}\) for some \(\nu \in {\mathbb{R}}\)14. More generally, for approximately QEC or covariant codes, ε (or δglobal) can be lower bounded using the distance between χ and 0 (or ΔHL). Indeed, Theorem 1 is established by combining the following two inequalities for isometric encoding channels,

$$\varepsilon \ge \left\vert \chi \right\vert /(2{\mathfrak{J}}),$$
(18)
$${\delta }_{{{{\rm{global}}}}}\gtrsim \sqrt{\left\vert {{\Delta }}{H}_{L}-\chi \right\vert /{{\Delta }}{H}_{S}},$$
(19)

where Eq. (18) is derived from the approximate Knill–Laflamme conditions34, and Eq. (19) follows from the definition of δglobal.

Theorem 2 is derived from another notion that we call gate implementation error, defined by

$$\gamma := \mathop{\min }\limits_{{{{{\mathcal{R}}}}}_{L\leftarrow S}}\mathop{\max }\limits_{\theta }P({{{{\mathcal{R}}}}}_{L\leftarrow S}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{U}}}}}_{S,\theta }\circ {{{{\mathcal{E}}}}}_{S\leftarrow L},{{{{\mathcal{U}}}}}_{L,\theta }),$$
(20)

which quantifies the error of implementing an ideal set of logical gates \({{{{\mathcal{U}}}}}_{L,\theta }\) using the error-corrected noisy gates \({{{{\mathcal{R}}}}}_{L\leftarrow S}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{U}}}}}_{S,\theta }\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}\). The gate implementation error unifies QEC accuracy and symmetry in a sense: it can be proven that

$${\delta }_{{{{\rm{global}}}}}+\varepsilon \ge \gamma ,$$
(21)

putting ε and δglobal on the same footing. A crucial observation here is that these quantities can be understood from a quantum metrology (channel estimation) perspective: intuitively, smaller error goes hand in hand with higher sensitivity of parameter estimation under noise. This allows us to make use of quantum metrology and QFI techniques to analyze γ. Specifically, we show that

$${\mathfrak{F}}\gtrsim {({{\Delta }}{H}_{L})}^{2}/(4{\gamma }^{2}),$$
(22)

which implies Theorem 2. We include in the Methods section further explanations and details of the quantum metrology method.

Furthermore, using quantum resource theory methods, we can derive different versions of Theorem 2 which, in particular, give results on the average-case behavior over different input states, in addition to the worst-case results discussed above. Again, see Methods and Supplementary Note 4 for further explanations and details of the quantum resource theory method.

For the local symmetry measures δlocal and δcharge, we establish the following trade-off bounds which are also expressed in terms of the general, efficiently computable quantities \({\mathfrak{J}}\) and \({\mathfrak{F}}\) that encode the noise and charge Hamiltonian:

Theorem 3

When \({{{{\mathcal{E}}}}}_{S\leftarrow L}\) is isometric,

$$\varepsilon \ge \frac{{{\Delta }}{H}_{L}-{\delta }_{{{{\rm{charge}}}}}}{2{\mathfrak{J}}({{{{\mathcal{N}}}}}_{S},{H}_{S})}\ge \frac{{{\Delta }}{H}_{L}-{\delta }_{{{{\rm{local}}}}}}{2{\mathfrak{J}}({{{{\mathcal{N}}}}}_{S},{H}_{S})},$$
(23)

where \({\mathfrak{J}}({{{{\mathcal{N}}}}}_{S},{H}_{S}):= {\min }_{h:{H}_{S}={\sum }_{ij}{h}_{ij}{K}_{S,i}^{{\dagger} }{K}_{S,j}}{{\Delta }}h,h\) is an arbitrary Hermitian matrix.

Theorem 4

$$\varepsilon \gtrsim \frac{{{\Delta }}{H}_{L}-{\delta }_{{{{\rm{local}}}}}}{\sqrt{4{\mathfrak{F}}({{{{\mathcal{N}}}}}_{S},{H}_{S})}},$$
(24)

where \({\mathfrak{F}}({{{{\mathcal{N}}}}}_{S},{H}_{S}):= 4\,{\min }_{h:{H}_{S}={\sum }_{ij}{h}_{ij}{K}_{S,i}^{{\dagger} }{K}_{S,j}}\left\Vert {\sum }_{ij}{({h}^{2})}_{ij}{K}_{S,i}^{{\dagger} }{K}_{S,j}-{H}_{S}^{2}\right\Vert ,h\) is an arbitrary Hermitian matrix.

Again, Theorem 3 and Theorem 4 indicate trade-offs between ε and δlocal (or δcharge), and set non-trivial lower bounds on ε for sufficiently small δlocal (or δcharge) and vice versa. The proof of Theorem 3 uses Eq. (18) and the following inequalities for isometric encoding channels:

$$\left\vert \chi \right\vert \ge {{\Delta }}{H}_{L}-{\delta }_{{{{\rm{charge}}}}},$$
(25)

which follows from the definitions, and a simple relation between δlocal and \({\delta }_{{{{\rm{charge}}}}},\)

$${\delta }_{{{{\rm{local}}}}}\ge {\delta }_{{{{\rm{charge}}}}}.$$
(26)

Similar to Theorem 2, Theorem 4 is derived using quantum metrology for quantum channel techniques. See also Methods and Supplementary Note 6 for explanations and details.

Note that δlocal and δcharge have the same units as the Hamiltonians and may naturally be superconstant (in contrast to δglobal which is always no larger than one). For example, consider the trivial encoding where L = S and \({{{{\mathcal{E}}}}}_{S\leftarrow L}={\mathbb{1}}\). Then we have δlocal = δcharge = Δ(HS − HL) = Θ(n) for an n-partite system with 1-local HS such that ΔHS = O(n) and ΔHL = O(1), implying that a constant scaling of δlocal or δcharge still requires non-trivial code structures.

Discussions on further refinements of Theorem 1 and Theorem 3 using quantum metrology techniques, as well as remarks on non-compact groups and infinite-dimensional codes, can be found in Supplementary Method 4 and Supplementary Note 2.

When setting δglobal = δlocal = 0, our theorems recover previous results on exactly covariant codes14,15,17,18,19. The results and methods here apply to general quantum codes beyond exactly covariant codes. In particular, they enable us to quantitatively understand the symmetry restrictions on exact QEC codes which are of utmost interest. In the following section, we demonstrate a particularly important application of our symmetry bounds for QEC codes.

General limitations on transversal gates

As motivated earlier, transversal gates or symmetry actions are of central importance to fault-tolerant quantum computing and also widely important in physical contexts. Recall that our theory indicates non-trivial bounds for symmetry under the HKS condition, like transversal symmetry. Remarkably, by analyzing such bounds, we are able to prove the following fundamental restriction on the set of transversal logical gates for general QEC codes, which refines the Eastin–Knill theorem:

Corollary 5

Suppose an n-qudit QEC code with distance at least 2 admits a transversal implementation \({V}_{S}{ = \bigotimes }_{l = 1}^{n}{e}^{-i2\pi {T}_{{S}_{l}}/D}\) of the logical gate \({V}_{L}={e}^{-i2\pi {T}_{L}/D}\) where D is a positive integer and TL,S are Hermitian operators with integer eigenvalues. Then D is at most

$$O\left(\max \left\{\frac{\left.\right(\mathop{\sum }\nolimits_{l=1}^{n}{({{\Delta }}{T}_{{S}_{l}})}^{3/2}}{\sqrt{{{\Delta }}{T}_{L}}},{{\Delta }}{T}_{L}\right\}\right).$$
(27)

Intuitively, D characterizes the precision or density of the gates. A key insight behind Corollary 5 is that in the D →  limit, the code becomes arbitrarily close to an exactly covariant code, which is in conflict with the incompatibility between QEC and continuous symmetries. Further, we obtain the upper bound on D by transforming the lower bound on δglobal obtained by applying Theorem 1 to exact QEC codes (setting ε = 0) with \({H}_{S}=\mathop{\sum }\nolimits_{l = 1}^{n}{T}_{{S}_{l}}\) and HL = TL (see Supplementary Note 5).

As a standard example, consider the Pauli-Z rotation corresponding to \({T}_{L}={Z}_{L},{T}_{{S}_{l}}=-{Z}_{l}\); that is, D characterizes the precision of the Pauli-Z rotation. Our Corollary 5 gives the upper bound D = O(n3/2). On the achievability side, there exists a set of [[n = 2t − 1, 1, 3]] (t ≥ 3) quantum Reed–Muller codes64 (which will be further discussed later) such that the logical Pauli-Z rotation \({V}_{L}={e}^{-i\pi {Z}_{L}/{2}^{t-1}}\) is implemented by transversal physical gate \({V}_{S}{ = \bigotimes }_{l = 1}^{n}{e}^{i\pi {Z}_{l}/{2}^{t-1}}\), i.e., achieves D = 2t = Ω(n), which is polynomially close to our upper bound O(n3/2).

For stabilizer codes, Corollary 5 implies that \({\tilde{V}}_{S}{ = \bigotimes }_{l = 1}^{n}{e}^{-i2\pi {a}_{l}{Z}_{l}/D}\) where al is an integer and D is a power of two (which is the most general form of transversal logical gates up to local Clifford equivalences65,66) can only implement logical gates up to the \(O(\log n)\)-th level of the Clifford hierarchy when al = O(poly(n)) (see Supplementary Note 5), which can be attained by the aforementioned quantum Reed–Muller codes. Note that several similar bounds65,66,67,68,69 were known for stabilizer codes. A key point of our results is that such restrictions fundamentally stem from symmetry principles and hold generally for arbitrary codes, meaning that the stabilizer structure is not essential here. We remark that there are ways to circumvent the Eastin–Knill theorem and the above limitations that involves more complex QEC procedures such as code switching70 and magic state injection71,72.

Concrete code examples

We now discuss two specific families of quantum codes that exhibit important approximate covariance features and also provide evidence of the tightness of our bounds (more details in Supplementary Note 7).

The first example we give is a family of exact QEC codes that are approximately covariant. Specifically, let us consider the [[n = 2t − 1, 1, 3]] (t ≥ 3) quantum Reed–Muller code64. The codewords are

$$\left\vert {{\mathfrak{c}}}_{0}\right\rangle =\frac{1}{\sqrt{{2}^{t}}}\left(\left\vert {{{\bf{0}}}}\right\rangle +\mathop{\sum}\limits_{{{{\bf{x}}}}\in \overline{R(1,t)}\backslash \{{{{\bf{0}}}}\}}\left\vert {{{\bf{x}}}}\right\rangle \right),$$
(28)
$$\left\vert {{\mathfrak{c}}}_{1}\right\rangle =\frac{1}{\sqrt{{2}^{t}}}\left(\left\vert {{{\bf{1}}}}\right\rangle +\mathop{\sum}\limits_{{{{\bf{x}}}}\in \overline{R(1,t)}\backslash \{{{{\bf{0}}}}\}}\left\vert {{{\bf{1}}}}+{{{\bf{x}}}}\right\rangle \right),$$
(29)

where we use x to denote n-bit strings (0 and 1 are all zero and all one strings, respectively) and \(\overline{R(1,t)}\) is the classical shortened Reed–Muller code73. Note that all strings in \(\overline{R(1,t)}\backslash \{{{{\bf{0}}}}\}\) have weight 2t−1. Consider the single-erasure noise which is exactly correctable, namely, ε = 0. As mentioned above, the code admits a transversal implementation \({\otimes }_{l}\left({e}^{i\pi {Z}_{l}/{2}^{t-1}}\right)\) of the logical operator \({e}^{-i\pi {Z}_{L}/{2}^{t-1}}\) (here the symmetry is defined by \({H}_{L}=\frac{1}{2}{Z}_{L},{H}_{S}=-\frac{1}{2}\mathop{\sum }\nolimits_{l = 1}^{n}{Z}_{l}\)). Intuitively, the larger t or n (associated with the precision of transversal gates) is, the closer the code is to being covariant. Indeed, calculations indicate that \({\delta }_{{{{\rm{global}}}}}\simeq \sqrt{4/n}\) for large n (‘  ’ indicates equivalence at the leading order), saturating our lower bound \({\delta }_{{{{\rm{global}}}}}\gtrsim \sqrt{1/n}\) up to a constant factor. We see that δglobal nicely captures the relation between global gate precision and the closeness to covariance, leading to results like Corollary 5. As for the local symmetry measures, we find that here \({\delta }_{{{{\rm{local}}}}}=\sqrt{n+1}\) for all \(\theta =\frac{4k\pi }{n+1}\) (\(\forall k\in {\mathbb{Z}}\)) at which the code is exactly covariant, having a gap with its constant lower bound δlocal 1, and δcharge = 1, exactly matching the lower bound δcharge≥1.

In the second example, we construct a parametrized family of codes that exhibits a smooth transition from exact covariance to exact QEC, which we call modified thermodynamic code, based on the previously studied thermodynamic code12,14. Our modified thermodynamic code is an n-qubit 2-dimensional quantum code defined on a spin chain with Hamiltonian \({H}_{S}=-\frac{1}{2}\mathop{\sum }\nolimits_{l = 1}^{n}{Z}_{l}\) given by codewords

$$\left\vert {{\mathfrak{c}}}_{0}^{q}\right\rangle =\sqrt{\frac{n}{n+qm}}\left\vert {m}_{n}\right\rangle +\sqrt{\frac{qm}{n+qm}}\left\vert {(-n)}_{n}\right\rangle ,$$
(30)
$$\left\vert {{\mathfrak{c}}}_{1}^{q}\right\rangle =\sqrt{\frac{n}{n+qm}}\left\vert {(-m)}_{n}\right\rangle +\sqrt{\frac{qm}{n+qm}}\left\vert {n}_{n}\right\rangle ,$$
(31)

where q is a tunable parameter in [0, 1] and it is assumed that m + n is an even number with 2 ≤ mn, and \(\left\vert {l}_{n}\right\rangle\) are Dicke states, i.e., symmetric eigenstates of HS, satisfying \({H}_{S}\left\vert {l}_{n}\right\rangle =\frac{l}{2}\left\vert {l}_{n}\right\rangle\). To understand the code, let us now consider different values of q. When q = 0, the code reduces to the thermodynamic code12,14, which is exactly covariant with respect to \({H}_{L}=\frac{m}{2}{Z}_{L}\), due to the fact that the codewords are eigenstates of HS with eigenvalues \(\pm \frac{m}{2}\). When q = 1, the code satisfies the Knill–Laflamme conditions and is exactly error-correcting under the single-erasure noise. When q is taken in between 0 and 1, the code interpolates between the above two extreme cases. Here, we find that \({\delta }_{{{{\rm{global}}}}}\simeq \sqrt{4qm/n}\) and ε (1 − q)m/2n, saturating the scaling of their lower bounds \({\delta }_{{{{\rm{global}}}}}\gtrsim \sqrt{qm/n}\) and ε (1 − 4q)m/2n, respectively. As for the local symmetry measures, we find that \({\delta }_{{{{\rm{local}}}}}\simeq \sqrt{qmn}\) for all \(\theta =\frac{4k\pi }{n+m}\) (\(\forall k\in {\mathbb{Z}}\)) at which the code is exactly covariant, having a gap with its lower bound δlocalqm, and δcharge = qm, exactly matching the lower bound δchargeqm. In conclusion, both examples achieve the optimal scalings of δglobal and δcharge.

Potential applications to physics

Here we point out a few important areas in physics where our theory is potentially useful.

First, we expect our study to lead to new quantitative insights into the crucial symmetry problem in quantum gravity (see e.g., refs. 23,28,29,30,31,32,74), through the following lenses:

  1. (i)

    Holography and AdS/CFT correspondence: AdS/CFT is known to have fundamental connections with QEC8,9 and indeed, the no-global-symmetry arguments of Harlow and Ooguri23,24 is underpinned by insights from QEC. In particular, for the continuous symmetry case, the situation becomes largely equivalent to Eastin–Knill (due to the transversality deduced from inherent properties of AdS/CFT8,14,23,24,56), indicating that our theory can potentially be used to establish quantitative statements about the breaking of global symmetries in AdS/CFT.

  2. (ii)

    Black hole evaporation: A standard no-global-symmetry argument is based on certain inconsistencies between the evaporation and charge conservation of charged black holes32 (note that the weak gravity conjectures31,75 are closely relevant). Our results may be applied to symmetric versions of Hayden–Preskill model of black hole evaporation as the model can be formulated in terms of QEC (see also refs. 21,76,77,78), through which new insights on charged black hole evaporation may be obtained.

In these scenarios, our theory can potentially be used to derive interesting quantitative bounds on the magnitude of symmetry-violating effects (operators, terms, modes, etc.). Note that there are some recent field or string theory calculations on approximate symmetries in quantum gravity79,80,81 and it could be intriguing to draw comparisons with our quantum information results.

Furthermore, QEC and symmetries naturally arise together in various key areas in many-body physics like topological phases of matter10,11,82,83,84,85,86,87,88 and information scrambling21,22,76,89,90,91,92,93,94,95, where the interplay between them is expected to find interesting applications. To be more specific, note first that the notions of many-body entanglement, topological and quantum order, and QEC are intimately connected10,11,82,84,88; besides, as mentioned above, the violation of symmetry conditions is important in realistic systems and in particular, goes hand in hand with anomalies, which play fundamental roles in the physics of quantum systems in various ways. Our study potentially provides a powerful framework for establishing rigorous connections among these important concepts.

Discussion

In this work, we developed a systematic quantitative theory of the interplay between continuous symmetries and QEC by introducing several notions of approximate symmetry measures based on both global and local symmetry violation and analyzing QEC accuracy together with them in quantum codes. A key message is that the degree of symmetry (in multiple senses) and optimal QEC accuracy of a code are concurrently limited by trade-off relations between them, which has interesting implications in quantum computation and physics.

We point out a few directions that are worth further study. First, it would be interesting to further understand whether the two trade-off relations between global symmetry and QEC, which exhibit different behaviors under different noise models, can be unified. Another natural future task is to extend our study to more general continuous symmetry groups including non-Abelian ones with multiple non-commuting charges, in particular, SU(d) symmetry, which will complete the understanding of the limitations on the ability to perform universal quantum computation using transversal gates. More involved representation theory machinery is expected to be useful14,22 in the SU(d) extension. Discrete symmetries are also important and worth further exploring—although they are not as fundamentally incompatible with QEC as continuous symmetries2, there exist important scenarios where the incompatibility arises from simple additional constraints (e.g., AdS/CFT codes14,23,24)—it would be interesting to have a more systematic understanding of the discrete symmetry case (note that this paper readily implies some results). Finally, in the last section we pointed to a few potentially relevant physical problems. It would be worthwhile to further consolidate these connections in physics languages, which would enrich the interaction between quantum information and physics and open new doors for both.

Methods

We employed methods and techniques native to the fields of quantum metrology and quantum resource theory in our derivation, which we overview here (further details can be found in Supplementary Notes 3 and 4).

Quantum metrology method

First, we describe the quantum metrology method used in the proofs of Theorem 2 and Theorem 4.

As introduced in the main text, we consider the regularized channel QFI36,37 of the noisy physical gate \({{{{\mathcal{N}}}}}_{S,\theta }:= {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{U}}}}}_{S,\theta }\) which is a function of \({{{{\mathcal{N}}}}}_{S}\) and HS only. We have

$${\mathfrak{F}}({{{{\mathcal{N}}}}}_{S},{H}_{S})={F}^{\infty }({{{{\mathcal{N}}}}}_{S,\theta })=\mathop{\lim }\limits_{N\to \infty }\frac{F({{{{\mathcal{N}}}}}_{S,\theta }^{\otimes N})}{N},$$
(32)

where F() is the channel QFI given by \(F({{{\Phi }}}_{\theta })=\mathop{\max }\nolimits_{\rho }F(({{{\Phi }}}_{\theta }\otimes {\mathbb{1}})(\rho ))\)61. The goal is to relate it with the error quantities.

The regularized channel QFI possesses the following useful properties: i) Monotonicity: for arbitrary Φθ and Φ1,2 independent of θ, it holds that

$${F}^{\infty }({{{\Phi }}}_{1}\circ ({{{\Phi }}}_{\theta }\otimes {\mathbb{1}})\circ {{{\Phi }}}_{2})\le {F}^{\infty }({{{\Phi }}}_{\theta }).$$
(33)

It indicates that any type of parameter-independent superchannel, including quantum error correction, cannot increase the value of the regularized channel QFI; ii) \({F}^{\infty }({{{{\mathcal{N}}}}}_{S,\theta })\ge 0\), and \({F}^{\infty }({{{{\mathcal{N}}}}}_{S,\theta })=+\infty\) if and only if the HKS condition is violated. As a result, when the HKS condition is satisfied as we assume, there do not exist encoding and decoding channels \({{{{\mathcal{E}}}}}_{S\leftarrow L}\) and \({{{{\mathcal{R}}}}}_{L\leftarrow S}\) such that

$${{{{\mathcal{R}}}}}_{L\leftarrow S}\circ {{{{\mathcal{N}}}}}_{S,\theta }\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}={{{{\mathcal{U}}}}}_{L,\theta },$$
(34)

because \({F}^{\infty }({{{{\mathcal{U}}}}}_{L,\theta })=+\infty\) while \({F}^{\infty }({{{{\mathcal{N}}}}}_{S,\theta }) < +\infty\), so Eq. (34) is forbidden by the monotonicity property.

In order to derive the results, consider an error-corrected noise channel

$${{{{\mathcal{N}}}}}_{C,\theta }={{{{\mathcal{R}}}}}_{C\leftarrow SA}\circ ({{{{\mathcal{N}}}}}_{S,\theta }\otimes {{\mathbb{1}}}_{A})\circ {{{{\mathcal{E}}}}}_{SA\leftarrow C}.$$
(35)

Here, we introduce an ancillary qubit system A and a logical qubit system C, and consider specifically the encoding and decoding channels

$${{{{\mathcal{R}}}}}_{C\leftarrow SA}={{{{\mathcal{R}}}}}_{C\leftarrow LA}^{{{{\rm{rep}}}}}\circ ({{{{\mathcal{R}}}}}_{L\leftarrow S}\otimes {{\mathbb{1}}}_{A}),$$
(36)
$${{{{\mathcal{E}}}}}_{SA\leftarrow C}=({{{{\mathcal{E}}}}}_{S\leftarrow L}\otimes {{\mathbb{1}}}_{A})\circ {{{{\mathcal{E}}}}}_{LA\leftarrow C}^{{{{\rm{rep}}}}},$$
(37)

where \({{\mathcal{E}}}_{S\leftarrow L}\) is the quantum code under study, \({{{{\mathcal{E}}}}}_{LA\leftarrow C}^{{{{\rm{rep}}}}}\) is the repetition code \({{{{\mathcal{E}}}}}_{LA\leftarrow C}^{{{{\rm{rep}}}}}(\left\vert {i}_{C}\right\rangle )=\left\vert {i}_{C}{i}_{A}\right\rangle\) for i = 0, 1, and \({{{{\mathcal{R}}}}}_{LA\leftarrow C}^{{{{\rm{rep}}}}}\) is the decoding channel that perfectly corrects bit-flip errors on L. We show that for any \({{{{\mathcal{R}}}}}_{L\leftarrow S},\,{{{{\mathcal{N}}}}}_{C,\theta }\) is a rotated dephasing channel on C satisfying

$${{{{\mathcal{N}}}}}_{C,\theta }(\left\vert {i}_{C}\right\rangle \left\langle {j}_{C}\right\vert )={\delta }_{ij}\left\vert {i}_{C}\right\rangle \left\langle {j}_{C}\right\vert +(1-{\delta }_{ij}){\xi }_{\theta }\left\vert {i}_{C}\right\rangle \left\langle {j}_{C}\right\vert ,$$
(38)

for all i, j = 0, 1 and some complex number ξθ (the angle of ξθ indicates the angle of Pauli-Z rotation and the magnitude of ξθ indicates the dephasing rate). The regularized channel QFI of the rotated dephasing channel is given by

$${F}^{\infty }({{{{\mathcal{N}}}}}_{C,\theta })=\frac{{\left\vert {\partial }_{\theta }{\xi }_{\theta }\right\vert }^{2}}{1-{\left\vert {\xi }_{\theta }\right\vert }^{2}},$$
(39)

where \(\left\vert {\partial }_{\theta }{\xi }_{\theta }\right\vert\) characterizes the strength of the signal and \(\sqrt{1-{\left\vert {\xi }_{\theta }\right\vert }^{2}}\) characterizes the strength of the dephasing noise; that is, \({F}^{\infty }({{{{\mathcal{N}}}}}_{C,\theta })\) can be handwavily understood as the square of the signal-to-noise ratio. By some calculations based on Eq. (38), we obtain (for δlocal < ΔHL)

$${F}^{\infty }({{{{\mathcal{N}}}}}_{C,\theta })\gtrsim \frac{{({{\Delta }}{H}_{L})}^{2}}{4{\gamma }^{2}}\quad \,{{\mbox{for some}}}\,\,\theta ,$$
(40)
$${F}^{\infty }({{{{\mathcal{N}}}}}_{C,\theta })\gtrsim \frac{{({{\Delta }}{H}_{L}-{\delta }_{{{{\rm{local}}}}})}^{2}}{4{\varepsilon }^{2}}\quad \,{{\mbox{for some}}}\,\,\theta .$$
(41)

Now note that by the monotonicity of the regularized channel QFI, we have

$${F}^{\infty }({{{{\mathcal{N}}}}}_{C,\theta })\le {F}^{\infty }({{{{\mathcal{N}}}}}_{S,\theta })={\mathfrak{F}}({{{{\mathcal{N}}}}}_{S},{H}_{S}),\forall \theta .$$
(42)

By combining Eqs. (42) and (40), we obtain Eq. (22), namely \({\mathfrak{F}}\gtrsim {({{\Delta }}{H}_{L})}^{2}/(4{\gamma }^{2})\), which implies Theorem 2; and by combining Eqs. (42) and (41), we obtain Eq. (24) (Theorem 4), namely \(\varepsilon \gtrsim ({{\Delta }}{H}_{L}-{\delta }_{{{{\rm{local}}}}})/\sqrt{4{\mathfrak{F}}}\).

Quantum resource theory method

Here we introduce a different line of thought, which draws ideas and methods from another active field, namely quantum resource theory. More specifically, inspired by the no-purification theories39,40,41, we can bound the QEC inaccuracy and the global covariance violation jointly using the monotonicity of suitable asymmetry measures.

In particular, while the theorems introduced in the main text are worst-case (with respect to all input states) results, the resource theory method allows us to obtain average-case results. Specifically, we show that

$$\overline{\varepsilon }+{\overline{\delta }}_{{{{\rm{global}}}}}\gtrsim \sqrt{\frac{\frac{1}{{d}_{L}}{{{\rm{Tr}}}}\left({H}_{L}^{2}\right)-\frac{1}{{d}_{L}^{2}}{{{\rm{Tr}}}}{({H}_{L})}^{2}}{{F}^{{{{\mathscr{R}}}}}({{{{\mathcal{N}}}}}_{S,\theta })}},$$
(43)

assuming that \({{{{\mathcal{N}}}}}_{S}\) commutes with \({{{{\mathcal{U}}}}}_{S,\theta }\). Here \(\overline{\varepsilon }\) and \({\overline{\delta }}_{{{{\rm{global}}}}}\) are, respectively, what we call the Choi QEC inaccuracy and Choi global covariance violation defined by

$$\overline{\varepsilon }:= \mathop{\min }\limits_{{{{{\mathcal{R}}}}}_{L\leftarrow S}}\overline{P}({{{{\mathcal{R}}}}}_{L\leftarrow S}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L},{{\mathbb{1}}}_{L}),$$
(44)
$${\overline{\delta }}_{{{{\rm{global}}}}}:= \mathop{\max }\nolimits_{\theta }\overline{P}({{{{\mathcal{U}}}}}_{S,\theta }\circ {{{{\mathcal{E}}}}}_{S\leftarrow L},{{{{\mathcal{E}}}}}_{S\leftarrow L}\circ {{{{\mathcal{U}}}}}_{L,\theta }),$$
(45)

where \(\overline{P}({{{\Phi }}}_{1},{{{\Phi }}}_{2}):= P(({{{\Phi }}}_{1}\otimes {\mathbb{1}})({{\Psi }}),({{{\Phi }}}_{2}\otimes {\mathbb{1}})({{\Psi }}))\) with the maximally entangled state \(\left\vert {{\Psi }}\right\rangle =\frac{1}{\sqrt{d}}\mathop{\sum }\nolimits_{i = 1}^{d}\left\vert i\right\rangle \left\vert i\right\rangle\) (d is the input dimension of Φ1,2) as the input state, is the Choi purified distance. The Choi measures capture the average-case behaviors in the sense that they are closely related to the uniform averages over all pure input states given by integration over the Haar measure43,96,97. Furthermore, \({F}^{{{{\mathscr{R}}}}}({{{{\mathcal{N}}}}}_{S,\theta })\) is the right logarithmic derivative (RLD) channel QFI52 defined by

$${F}^{{{{\mathscr{R}}}}}({{{\Phi }}}_{\theta })=\mathop{\max }\nolimits_{\rho }{F}^{{{{\mathscr{R}}}}}(({{{\Phi }}}_{\theta }\otimes {\mathbb{1}})(\rho )),$$
(46)

where the RLD state QFI51\({F}^{{{{\mathscr{R}}}}}({\rho }_{\theta })\) is equal to \({{{\rm{Tr}}}}({({\partial }_{\theta }{\rho }_{\theta })}^{2}{\rho }_{\theta }^{-1})\) when supp(∂θρθ)  supp(ρθ), and +  otherwise.

In order to prove (43), we use a resource theory of asymmetry39 where the free (incoherent) states are quantum states that commute with the Hamiltonian and the free (covariant) operations \({{{{\mathcal{C}}}}}_{L\leftarrow S}\) are quantum operations that commutes with the symmetry actions, namely satisfying

$${{{{\mathcal{C}}}}}_{L\leftarrow S}\circ {{{{\mathcal{U}}}}}_{S,\theta }={{{{\mathcal{U}}}}}_{L,\theta }\circ {{{{\mathcal{C}}}}}_{L\leftarrow S},\forall \theta .$$
(47)

Here the RLD QFI induces a resource monotone:

$${F}^{{{{\mathscr{R}}}}}(\rho ,H):= {F}^{{{{\mathscr{R}}}}}({e}^{-iH\theta }\rho {e}^{iH\theta }).$$
(48)

It can be easily seen that it is infinite for pure coherent states.

The intuition goes as follows. First, we prove that there always exists a covariant recovery channel \({{{{\mathcal{R}}}}}_{L\leftarrow S}^{{{{\rm{cov}}}}}\) that can achieve QEC inaccuracy

$${\overline{\varepsilon }}_{{{{\rm{cov}}}}}=\mathop{\min }\limits_{{{{{\mathcal{R}}}}}_{L\leftarrow S}^{{{{\rm{cov}}}}}}\overline{P}({{{{\mathcal{R}}}}}_{L\leftarrow S}^{{{{\rm{cov}}}}}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L},{{\mathbb{1}}}_{L})\le \overline{\varepsilon }+{\overline{\delta }}_{{{{\rm{global}}}}},$$
(49)

assuming \({{{{\mathcal{N}}}}}_{S}\) commutes with \({{{{\mathcal{U}}}}}_{S,\theta }\). This is done by construction: we show that a variant of an optimal recovery channel achieving \(\overline{\varepsilon }\), obtained by a suitable twirling action over the symmetry group (which implies that the channel is covariant), satisfies Eq. (47). The monotonicity of the resource monotone indicates that

$${F}^{{{{\mathscr{R}}}}}({{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}({{{\Psi }}}_{LR}),{H}_{S}\otimes {{\mathbb{1}}}_{R})\ge {F}^{{{{\mathscr{R}}}}}({{{{\mathcal{R}}}}}_{L\leftarrow S}^{{{{\rm{cov}}}}}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}({{{\Psi }}}_{LR}),{H}_{L}\otimes {{\mathbb{1}}}_{R}),$$
(50)

where \(\left\vert {{{\Psi }}}_{LR}\right\rangle =\frac{1}{\sqrt{{d}_{L}}}\mathop{\sum }\nolimits_{i = 1}^{{d}_{L}}\left\vert {i}_{L}\right\rangle \left\vert {i}_{R}\right\rangle\) is a maximally entanglement state between the logical system L and a reference system R. The left-hand side is no larger than the RLD channel QFI \({F}^{{{{\mathscr{R}}}}}({{{{\mathcal{N}}}}}_{S,\theta })\) due to the definition of the channel QFI. Notice that the right-hand side tends to infinity when \({{{{\mathcal{R}}}}}_{L\leftarrow S}^{{{{\rm{cov}}}}}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}\) tends to the identity channel due to the property that \({F}^{{{{\mathscr{R}}}}}(\rho ,H)\) is infinite for pure coherent states. By a more detailed analysis, we can show that

$${F}^{{{{\mathscr{R}}}}}({{{{\mathcal{R}}}}}_{L\leftarrow S}^{{{{\rm{cov}}}}}\circ {{{{\mathcal{N}}}}}_{S}\circ {{{{\mathcal{E}}}}}_{S\leftarrow L}({{{\Psi }}}_{LR}),{H}_{L}\otimes {{\mathbb{1}}}_{R})\ge \frac{\frac{1}{{d}_{L}}{{{\rm{Tr}}}}({H}_{L}^{2})-\frac{1}{{d}_{L}^{2}}{{{\rm{Tr}}}}{({H}_{L})}^{2}}{{\overline{\varepsilon }}_{{{{\rm{cov}}}}}^{2}},$$
(51)

which links \({\overline{\varepsilon }}_{{{{\rm{cov}}}}}\) with the resource measures. Combining Eqs. (49), (50), and (51), we obtain Eq. (43).

Following an analogous argument, a trade-off relation between the worst-case ε and δglobal (which turns out to be weaker than Theorem 2; see Supplementary Note 4 for details) can also be derived using the quantum resource theory method.