Modeling coherent errors in quantum error correction

Analysis of quantum error correcting codes is typically done using a stochastic, Pauli channel error model for describing the noise on physical qubits. However, it was recently found that coherent errors (systematic rotations) on physical data qubits result in both physical and logical error rates that differ significantly from those predicted by a Pauli model. Here we examine the accuracy of the Pauli approximation for coherent errors on data qubits under the repetition code. We analytically evaluate the logical error as a function of concatenation level and code distance. We find that coherent errors result in logical errors that are partially coherent and therefore non-Pauli. However, the coherent part of the error is negligible after two or more concatenation levels or at fewer than $\epsilon^{-(d-1)}$ error correction cycles, where $\epsilon \ll 1$ is the rotation angle error per cycle for a single physical qubit and $d$ is the code distance. These results lend support to the validity of modeling coherent errors using a Pauli channel under some minimum requirements for code distance and/or concatenation.


I. INTRODUCTION
Progress in fault-tolerant quantum computation relies on the ability to simulate the performance of quantum error correcting codes. For example, the numerical prediction of a high fault-tolerant error threshold for the surface code [1] is one of the motivating factors in the significant recent experimental effort to realize topological codes [2][3][4]. Numerical predictions of performance metrics such as the fault tolerant threshold and the logical failure rate typically assume a stochastic (incoherent) and uncorrelated Pauli channel model for physical qubit errors, since this model is easiest to simulate. However, recent findings indicate that a Pauli channel significantly underestimates the diamond norm error rate of coherent errors -errors that are both unitary and slowly varying relative to the gate time [5][6][7][8]. Such errors can occur, for example, due to systematic control noise, cross-talk, global external fields, and unwanted qubit-qubit interactions. It is therefore important to examine the accuracy of the Pauli approximation for coherent errors in the context of quantum error correction (QEC).
A variety of results have recently appeared that evaluate the impact of realistic noise on QEC. The numerical work of Refs. [9][10][11] has lent support to using a Pauli model for certain types of incoherent errors. These authors performed simulations of QEC for amplitude and phase damping and the corresponding Pauli-twirl approximations, finding no significant difference in logical error rates. This is consistent with a recent result of Wallman which states that non-unital deviations from Pauli channels (as in amplitude damping) do not significantly impact the error rate [7].
A different result was obtained by Fern, et al. [12] in the case of coherent errors. Using a formalism developed by Rahn, et al. [13] for general noise, these authors found that coherent errors in the physical error channel can lead * greenbaum.daniel@gmail.com to coherent errors in the logical channel, as manifested by off-diagonal elements in the superoperators for these channels. For the specific example of the d = 3 Steane code, Ref. [12] found that an off-diagonal element of order ǫ in the unencoded error superoperator leads to an encoded (logical) error superoperator with off-diagonals of order ǫ 3 and diagonals of order ǫ 4 . This leads to a diamond-distance logical error rate of order 1/ǫ greater than would be obtained by replacing the physical error by its Pauli twirl. The same result was also obtained numerically recently [14].
Another recent paper has reported diamond-distance logical error rates for surface codes up to distance d = 10 for coherent physical errors [15]. That work also finds discrepancies between coherent physical errors and their Pauli twirl approximation that are consistent with coherent errors at the logical level.
Despite these insights, it remains a challenge to obtain analytic expressions for the logical error map for general noise as a function of code distance and (for concatenated codes) concatenation. Such information can be useful for determining parameter regimes where a Pauli model is valid. Indeed, Ref. [12] considered general channels, deriving upper bounds on superoperator coefficients for the logical error, but not their actual value except for the d = 3 Steane code. The results of Ref. [13] were limited to diagonal channels, while Refs. [14,15] evaluated the logical noise maps numerically, a technique which does not make explicit the scaling of the logical error parameters with d. The latter references also considered coherent and incoherent errors individually but not simultaneously.
Our aim in the present work is to obtain analytic expressions for the logical error map due to a combination of coherent and incoherent physical noise, since both are present in real qubits. We work with the repetition code, which, though not a full quantum code in that it cannot correct both X and Z errors, has the advantage of being analytically tractable and yet nontrivial. Indeed, we find that it reproduces the key features of generic codes, saturating the bounds on error channel parameters under concatenation given in [12].
Our analysis is restricted to the case of a quantum memory (or of gate-independent errors) and perfect syndrome extraction. Consideration of gate-dependent and syndrome extraction errors is left for future work. We also do not consider coherent leakage errors [6,16] or coherent errors due to residual qubit-qubit interactions. The latter are discussed briefly in Section I C.
We find that two levels of concatenation are sufficient to eliminate the effect of the coherent error on the logical qubits. We also point out that the coherent contribution to the logical error -as quantified by the infidelity of the entire quantum computation -becomes important only after a timescale (number of QEC cycles) τ coh that increases exponentially with code distance. Our analysis predicts the same scaling of the failure rate with the error model parameters as one obtains using the diamond norm error metric. However it emphasizes the nature of the error process as it unfolds in time. In particular, the coherent error will not be important at modest code distances for which τ coh is longer than the correlation time of the physical error. When this is the case, replacing the physical error by its Pauli-twirl accurately determines the logical error probability for quantum computations of arbitrary length.

A. Repetition code
We begin with a brief review of the repetition code. For more details see, e.g., [17]. The repetition code on N qubits (code distance d = N ) is defined by the encoding |0 = |00 . . . 0 , |1 = |11 . . . 1 . The logical X operator, which flips |0 to |1 and vice versa, is denotedX and is equal toX Bit flips (X errors) are detected by measuring the parity of neighboring qubits, which is given by the eigenvalues (σ 1 , σ 2 , · · · , σ N −1 ) of the stabilizer operators S 1 = Z 1 Z 2 , S 2 = Z 2 Z 3 , . . . , S N −1 = Z N −1 Z N . Stabilizer eigenvalues are ±1 corresponding to even or odd parity, and the set of eigenvalues is called the syndrome. N − 1 stabilizers are required to encode a single logical qubit. When the syndrome is measured, the state is projected onto the subspace of the Hilbert space corresponding to that syndrome. E.g., if the syndrome is (1, 1, . . . , 1) then the state after syndrome extraction is in the error-free subspace, known as the codespace. If on the other hand a faulty syndrome is detected, the error can be corrected by flipping (applying the X operator to) the faulty qubit(s), thereby returning the state to the codespace. We do not pause to discuss the procedure for syndrome measurement since we assume this is done without error. Importantly, we note that the association of a syndrome to a particular error is done in a maximum likelihood rather than deterministic sense -multiple errors can have the same syndrome (e.g., X 1 and X 2 X 3 for the N = 3 code) and we choose the one which is most likely given the syndrome. In this way we minimize the error of the encoded (logical) bits.

B. Single-qubit errors
For an N -qubit register, we consider the error where each N is a single-qubit error operator. This form of error describes many of the physically relevant noise processes affecting qubits, such as cross-talk, systematic control errors, relaxation, dephasing, and external fields. An important noise source not described by Eq. (2) is that due to qubit-qubit interactions. We discuss such processes in Section I C.
We assume the following form for the single-qubit error acting on an arbitrary input state ρ per QEC cycle.
where q is the probability of a stochastic bit-flip and ǫ is the angle of a small rotation error that is constant in time. We can relate these parameters to a physical dephasing rate γ and systematic rotation at rate ω (e.g., from cross-talk or an external field) through the master equation by setting ǫ = ωτ and q = (1 − e −2γτ )/2 for a gate time (QEC cycle time) τ [18]. Eq. (3) describes the composition of a coherent process, Λ ǫ , and an incoherent process, Λ q . The latter is an appropriate description for environmentally induced decoherence as well as for random coherent rotations, such as those due to fluctuating control noise. These are described by the average over many instances of U = e −iθX/2 , where the angle θ fluctuates from one QEC cycle to the next. (Hence q is the infidelity of the operator U , which can be related [19] to the rms rotation angle as q = θ 2 rms /4.) Therefore Λ q and Λ ǫ are suitable for describing the high and low-frequency components of a stochastic X rotation error. Although this error model is somewhat restrictive in that the operators Λ q and Λ ǫ commute, it captures the relevant impact of coherent errors on qubit error metrics [5,6].
We note that in general, it is possible to have a different rotation angle ǫ j and a different bit-flip rate q j for each qubit. We are interested in capturing the properties of errors that have broad spatial extent such as external fields. It is therefore only important that these parameters have similar (non-zero) magnitude. Choosing them all identical as in Eq. (2) simplifies the calculations without sacrificing any significant generality.

C. Errors due to qubit-qubit interactions
Before presenting the analysis of single qubit errors, we wish to emphasize the importance of qubit-qubit interactions as a source of coherent error. Interactions contribute to coherent errors affecting data qubits and to syndrome errors when interactions occur between data and syndrome qubits. Generally, interactions entangle all the qubits and so are complicated to analyze. We do not consider them further beyond the example given in this section.
Here we comment on a special case that is simple but relevant, motivated by the hardware proposal in [20]. In this architecture, resonator-mediated qubit-qubit interactions are a dominant error source, resulting in an effective ZZ interaction between the qubits that cannot be turned off [21]. We consider such an interaction between data qubits only (although in the architecture of [20] there will also be interactions between data and syndrome qubits), and show that it is fully correctable.
For an interaction time t, the error is of the form where the angular brackets indicate that the product is restricted to pairs of qubits connected by a resonator, and Here η ij is the interaction strength between qubits i and j. The error operator, Eq. (5), factors into terms belonging to individual qubit pairs because the corresponding Hamiltonian terms, Eq. (6), commute.
To make contact with our repetition code analysis in terms of X errors, we now consider the error where ǫ ij is a generalized rotation angle. Expanding the exponential, we can write this error operator as a sum over all even-weight tensor products of X's, Each term in Eq. (8) corresponds to a unique syndrome. Since the code distance is odd, there is no redundancy in the syndromes that result from errors of weight less than or equal to (d − 1)/2 and those with weight greater than (d − 1)/2. (Compare Eq. (A.12) in the Appendix). We thus find the surprising result that coherent errors of the form Eq. (8) are uniquely projected to Pauli errors by stabilizer measurement and therefore are perfectly correctable. The caveat is that the decoding protocol must be modified from the standard one. For example, the syndrome normally corresponding to X 1 now indicates an error X 2 X 3 . . . X N .
This result illustrates the possibility of tailoring the decoding protocol to correct for a dominant error of a particular type. However, if there are multiple comparable error sources one runs into difficulties. In the present example, if there are single-qubit errors, Eqs. (2)-(3), the decoding protocol tailored to ZZ-interactions gives a logical error, so these errors are amplified by a factor of order N . Therefore this approach is only useful if the rate of ZZ-interaction errors is much greater than N p, where p is the single-qubit error probability.

II. ANALYSIS
Upon logical encoding with the repetition code, we obtain an effective error model for the logical qubit that has the same form as Eq. (3) but with renormalized parameters q and ǫ, as shown in the Appendix. This mirrors the general transformation found in [12], and stems from the fact that unital and trace preserving physical errors lead to unital, trace preserving logical errors. Such channels can be expressed as Pauli times a unitary. Non-unital deviations from Pauli channels were found in [7] to not change the error rate significantly so we do not consider them here.
For low physical error rates, q, |ǫ| ≪ 1, we find the following recursion relations giving the values of q and ǫ at the (n + 1)-st level of concatenation in terms of the ones at level n.
Here d = N is the code distance. The computation is elementary but lengthy. Details are given in the Appendix. These recursion relations saturate the bounds given in [12]. In terms of our parameters, these bounds are: . The second of these bounds is not tight when q n = 0, and so cannot be used to determine the impact of the coherent error at level n + 1 on the logical error rate.

A. Coherent errors and code concatenation
We are interested in the extent to which the effective error at concatenation level n is coherent, and at what value of n this error becomes effectively stochastic. As discussed in [6], a convenient metric for doing so is the ratio D/r of the diamond distance D [22] to the average infidelity r [19,23]  D r , for the physical qubit (concatenation level n = 0) and logical qubit (n = 1) of the distance 3 repetition code. Larger values indicate greater coherence. Both plots refer to the same range of initial values of ǫ and q in Eq. (3) for the physical error. For higher concatenation levels, n ≥ 2 (not shown), the ratio D/r does not differ significantly from 3/2 anywhere in the given parameter region, indicating that the error is completely incoherent in this case.
In the physically relevant regime of small initial values q, |ǫ| ≪ 1, q n and ǫ n are also small. Eqs. (11)-(12) then give Therefore the error channel is incoherent if |ǫ n | ≪ q n . Using the recursion relations, Eqs. (9)-(10), it is straightforward to show that this occurs when both n ≥ 2 and d ≥ 3 for any initial q, |ǫ| ≪ 1. Hence only two levels of concatenation are necessary to obtain a stochastic effective logical error channel, for any size repetition code. Figs. 1 and 2 illustrate this result. Fig. 1 plots the ratio of Eq. (12) and Eq. (11) (without approximation) for d = 3, n = 0, 1 and a range of initial values of ǫ and q. Essentially no deviation from D/r = 3/2 is observed when n ≥ 2. Fig. 2 plots ǫ n /q n vs d for a single initial value ǫ = 0.1 and q = 0, and for several values of n. From Eqs. (9)-(10) it is clear that |ǫ n |/q n for any initial condition (q, ǫ) = (q 0 , ǫ 0 ) is upper-bounded by its value for (q, ǫ) = (0, ǫ 0 ). The plot shows that, for a given set of initial parameters, the encoded channel becomes more incoherent with increasing d.

B. Logical time to failure
We now examine the logical time to failure of the encoded qubit as a function of concatenation level, n. As a failure metric we use the worst-case infidelity [7] after m QEC cycles, defined as w n (m) ≡ max This is the maximum probability of logical failure over all initial states. Here |ψ n (m) is the state of the level-n concatenated logical qubit after m QEC cycles, |ψ n (m) = N n • · · · • N n m times (|ψ n (0) ) .
The noise operator N n is the single qubit operator, Eq. (3), with ǫ, q replaced by ǫ n , q n from Eqs. (9)-(10). Eq. (14) is satisfied for some initial state |ψ n (0) = |ψ * n (0) . For the noise operator N n , |ψ * n (0) is any state of the form cos(θ)|0 − i sin(θ)|1 . This is a state whose Bloch vector is in the y-z plane and is therefore maximally affected by the X-rotation in Eq. (3).
In the limit q n , |ǫ n | ≪ 1/m, this becomes This is a sum of two error rates, the first from the incoherent channel Λ m qn = Λ mqn and the second from the coherent rotation, Λ m ǫn = Λ mǫn . (The notation Λ m denotes the composition of Λ with itself m times.) Eq. (16) predicts logical failure at m fail = O(1/max(ǫ n , q n )) QEC cycles. This is the same scaling one obtains using the diamond distance as an error metric. Indeed, Eq. (12) gives the diamond distance after m QEC cycles as from which the result follows by setting D n (m fail ) ∼ 1. Eq. (16) also predicts a crossover from stochastic behavior, w m ≈ mq n , to coherent behavior, w m ≈ sin 2 (mǫ n /2), above a critical number m crit of QEC cycles, We showed above that ǫ n ≪ q n for n ≥ 2. Therefore the logical failure rate has a coherent contribution only for n = 1. In this case, inserting the values of ǫ 1 , q 1 from Eqs. (9)-(10) into Eq. (19) we find that the crossover from stochastic to coherent behavior of the logical error is lower-bounded by m crit ∼ 1/ǫ d−1 , which holds when q = 0. In contrast, the number of QEC cycles to logical failure at n = 1 is lower-bounded by m fail ∼ 1/ǫ d , which is O(1/ǫ) cycles greater than the crossover point. stochastic part of the full error probability. This model predicts a logical time to failure proportional to m st fail = O(1/ǫ d+1 ). This is O(1/ǫ) longer (more QEC cycles) than when the coherent part of the error was included.
We conclude that a stochastic error model would correctly predict the logical failure rate up to m crit QEC cycles, beyond which it is necessary to take account of the coherence of the error. If the correlation time of the coherent error is less than τ coh = m crit τ QEC , where τ QEC is the duration of a QEC cycle, then the logical error is effectively stochastic and can be obtained by replacing the physical error, Eq. (3), by its Pauli twirl. Fig. 3 plots the worst-case failure probability vs number of QEC cycles for physical error parameters ǫ = 0.1, q = 0 and for d = 3. The blue curve is the result of a Monte Carlo simulation of three data qubits initialized to |ψ * 1 (0) = |0 , each subject to the error operator, Eq. (3), once per QEC cycle. This is compared to the theoretical curve, Eq. (16), as well as the coherent and incoherent parts of Eq. (17). The simulation results show good agreement with Eq. (16). The crossover from stochastic to coherent behavior occurs at m crit ∼ 1/ǫ 2 = 100, consistent with the discussion above.

III. CONCLUSION
Implementing quantum error correction for coherent errors will be an important challenge for realizing scalable fault-tolerant quantum computing. It is now understood that despite the projective nature of QEC stabilizer measurements, coherent physical errors give rise to a logical error that is also coherent to some extent [12,14,15]. Several strategies for mitigating coherent errors have been proposed, including the realization of Pauli twirling through random updates to the Pauli frame [24][25][26], and optimization of the decoding algorithm [27]. Our goal in this paper was to investigate another possibility, namely whether there exist parameter regimes in standard stabilizer QEC for which the logical error is Pauli even when the physical error is coherent. This would enable the use of existing techniques for correcting Pauli errors, and justify numerical simulations of QEC based on a Pauli error model.
To this end, we analyzed repetition code quantum error correction for an error model containing coherent and incoherent errors. Focusing on the repetition code allowed us to obtain quantitative analytic results on the scaling of coherent and incoherent logical error rates with code distance and concatenation.
We found that coherent physical errors result in logical errors that are partially coherent and therefore non-Pauli, in agreement with recent numerical studies [14,15], but that the degree of coherence depends on the code distance and concatenation level. At one concatenation level, the coherent part of the logical error is negligible at fewer than ǫ −(d−1) error correction cycles, where ǫ ≪ 1 is the rotation angle error per cycle for a single physical qubit and d is the code distance. Logical failure occurs at O(1/ǫ d ) QEC cycles, which is O(1/ǫ) faster than predicted by the Pauli-twirl approximation of the error. At two or more concatenation levels, the coherent part of the logical error is negligible at any number of error correction cycles for small initial error rates and any distance d.
The result on concatenation is worth emphasizing. It is remarkable that two concatenation levels suffice to make the logical error effectively stochastic over a broad range of initial error rates (See Fig. 1). A similar result holds for the d = 3 Steane code, as can be shown by inserting our error model, Eqs. (2)-(3), in the general equations of Ref. [12]. If true for general codes, this opens the possibility of using code concatenation to eliminate coherent errors.
Our findings lend support to using stochastic Pauli error models in the presence of low-frequency coherent errors under conditions of large enough code distance or concatenation. However, several questions remain to be addressed to justify the use of Pauli models for general coherent errors. Our error model was limited to a tensor product of single-qubit errors on data qubits only. Future work must include syndrome qubit and measurement errors, coherent leakage errors [6,16], and gate dependence.
In addition, recent hardware proposals (e.g., [20]) include couplings both between data and syndrome qubits as well as between pairs of datas and syndromes. Such couplings cause coherent syndrome errors that need to be included in the analysis.
Finally, while the calculations presented here are suggestive, the real test lies in their applicability to the particular QEC codes that will be implemented in real devices. To this end, we hope these results may inform further studies of, e.g., the surface code, which at present can only be done numerically.

IV. ACKNOWLEDGEMENTS
We are grateful to Marcus P. da Silva for valuable discussions. This document does not contain technology or technical data controlled under either U.S. International Traffic in Arms Regulations or the U.S. Export Administration Regulations.

Appendix: Derivation of the logical error map
We derive the recursion relations, Eqs. (9)-(10), for the repetition code under the error model, Eqs. (2)-(3). We follow the notation of Rahn, et al. [13]. The effective logical error map is the composition of encoding, noise, and decoding, The encoding map for the repetition code is The decoding map includes syndrome measurement and recovery, followed by the inverse of encoding. It can be expressed as a sum over all syndromes, where is the projection operator corresponding to the syndrome σ = (σ 1 , · · · , σ N −1 ), S i = Z i Z i+1 is the i-th stabilizer, and R σ is the recovery operation that maps the logical state back to the codespace.
To simplify the notation, we work directly in terms of the physical qubit density matrix,ρ = E(ρ) and drop the E operators. The logical error map is then given by We now factor the stochastic and coherent parts of N N : The incoherent part can be written Here O k is the sum over all weight-k products of X i 's: The operatorX = O N is the lowest-weight undetectable error, and is also the logical bit-flip operator [17]. This can be expanded as We note that the error Λ ⊗N ǫ includes coherent linear combinations of correctable and uncorrectable errors. The term in brackets defines a unitary operator, This can be written where the rotation angle ǫ j is given by Collecting terms, we can write the full error map, Eq. (A.6), as for some coefficients m n jk . It is straightforward to calculate these coefficients.
Now the only operator in this equation that creates a non-trivial syndrome is O k+j−2n . If k + j − 2n ≤ (N − 1)/2 then the recovery operation transforms each of the N k+j−2n terms in this operator to the identity, while if k + j − 2n > (N − 1)/2 then the recovery operation transforms each term in this operator toX. Substituting Eq. (A.19) for m n jk and collecting terms, we find (A.23) The sum over n runs over all values for which the combinatorial coefficients are defined. Here Θ(x) is a Heaviside step function which takes the value 1 when the statement x is true and 0 when it is false. Using Vandermonde's identity, Returning now to the full error map G = E † •Ḡ • E we obtain for the effective 1-qubit logical error channel Eqs. (A.26)-(A.28) show that the effective logical error is an incoherent sum of terms, each of which is the composition of a stochastic bit flip and coherent rotation.
To enable further simplification it is helpful to use the Liouville, or Pauli Transfer Matrix (PTM) representation of quantum channels [28]. For an N -qubit channel this is defined as where V i , V j ∈ {1, X, Y, Z} ⊗N are basis vectors in the vector space spanned by all tensor products of N Pauli matrices (including the identity). The PTMs are linear functions of their arguments, and map composition is represented by matrix multiplication.
The following identities hold for arbitrary quantum channels Λ 1 , Λ 2 and constants a, b.
R ij (aΛ 1 + bΛ 2 ) = aR ij (Λ 1 ) + bR ij (Λ 2 ). (A.31) The logical error channel, Eq. (A.26), is a single-qubit channel. It contains only identity and X operators, leaving the space spanned by {1, X} invariant. By analogy to the notation in Ref. [14] for process matrices, we can therefore write R in terms of 2 X 2 blocks, Expanding and keeping the lowest order terms in q and ǫ, we find that the above equation reduces to 1 − 2q, wherē This proves Eq. (10).
Next we calculate the off-diagonals in Eq. (A.34).
The sum in the last equation is straightforward to simplify by writing the sums over even and odd j separately and using Pascal's rule. The result is