Avoiding coherent errors with rotated concatenated stabilizer codes

Coherent errors, which arise from collective couplings, are a dominant form of noise in many realistic quantum systems, and are more damaging than oft considered stochastic errors. Here, we propose integrating stabilizer codes with constant-excitation codes by code concatenation. Namely, by concatenating an [[n, k, d]] stabilizer outer code with dual-rail inner codes, we obtain a [[2n, k, d]] constant-excitation code immune from coherent phase errors and also equivalent to a Pauli-rotated stabilizer code. When the stabilizer outer code is fault-tolerant, the constant-excitation code has a positive fault-tolerant threshold against stochastic errors. Setting the outer code as a four-qubit amplitude damping code yields an eight-qubit constant-excitation code that corrects a single amplitude damping error, and we analyze this code’s potential as a quantum memory.


INTRODUCTION
Quantum error correction (QEC) promises to unlock the full potential of quantum technologies by combating the detrimental effects of noise in quantum systems. The ultimate goal in QEC is to protect quantum information under realistic noise models. However, QEC is most often studied by abstracting away the underlying physics of actual quantum systems, and assumes a simple stochastic Pauli noise model, as opposed to coherent errors which are much more realistic.
Coherent errors are unitary operations that damage qubits collectively, and are ubiquitous in many quantum systems. Especially pertinent are coherent phase errors that occur on any quantum system that comprises non-interacting qubits with identical energy levels. In such systems, coherent phase errors can result from unwanted collective interactions with stray fields 1 , collective drift in the qubits' energy levels, and fundamental limitations on the precision in estimating the magnitude of the qubits' energy levels. To address coherent errors, prior work either (1) analyzes how existing QEC codes perform under coherent errors without any mitigation of the coherent errors, (2) uses active quantum control which incurs additional resource overheads to mitigate coherent errors offers partial immunity against coherent errors 2 or (3) completely avoids coherent errors using appropriate decoherence-free subspaces (DFS) [3][4][5][6][7][8][9][10][11] . In this paper, we focus on a family of QEC codes that are compatible with approach (3), and discuss performing QEC protocols with respect to this family of QEC codes.
In this paper, we give an accessible procedure to construct QEC codes that not only completely avoid coherent phase errors, but also support fault-tolerant quantum computation. Namely, we concatenate stabilizer codes C Stab with a length two repetition code C REP2 , and apply a bit-flip on half of the qubits. We can also naturally interpret these codes within the codeword stabilized (CWS) framework 15,16 , thereby extending the utility of CWS codes beyond a purely theoretical setting.
Amplitude damping (AD) errors model energy relaxation, and accurately describe errors in many physical systems. By concatenating the four-qubit AD code 17 with the dual-rail code 18 , we construct an eight-qubit CE code that corrects a single AD error. We provide this code's QEC circuits (Figs. 3 and 4), and analyze its potential as a quantum memory under the AD noise model (Fig. 5).
Our work paves the way towards integrating CE codes with mainstream QEC codes. By doubling the number of qubits required, we make any quantum code immune against coherent phase errors. When coherent phase errors are a dominant source of errors, we expect CE codes to significantly reduce fault-tolerant overheads.

RESULTS
Hybridizing stabilizer and CE codes Coherent phase errors can arise from the collective interaction of identical qubits with a classical field. Since the collective Hamiltonian of non-interacting identical qubits is proportional to S z = Z 1 + ⋯ + Z N where Z j flips the jth qubit's phase, we model coherent phase errors with unitaries of the form U θ ¼ expðÀiθS z Þ.
Here, θ depends on both the interacting field's magnitude and the qubits' energy levels.
Using any CE code, we can completely avoid coherent phase errors. This is because such codes must lie within an eigenspace of S z , which is spanned by the computational basis states x j i ¼ x 1 j i Á Á Á x N j i for which the excitation number, given by the Hamming weight wt(x) = x 1 + ⋯ + x N of x, is constant. The simplest CE code is the dual-rail code 18 , C KLM , with logical codewords 0 KLM j i¼ 01 j i and 1 KLM j i¼ 10 j i.
However, C KLM cannot correct any errors. Therefore, we concatenate it with an [[n, k, d]] stabilizer code C Stab to obtain a code C with encoding circuit given in Fig. 1. Then C is an [[2n, k, d]] QEC code that is also impervious to coherent phase errors. Now, concatenating any state P x2f0;1g n a x x j i 2 C Stab with C KLM yields P x2f0;1g n a x φðxÞ j i, where φ((x 1 , x 2 , …, x n−1 , x n )) = (x 1 , 1 − x 1 , x 2 , 1 − x 2 , …, x n−1 , 1 − x n−1 , x n , 1 − x n ). Since wt(φ(x)) = n for every x ∈ {0, 1} n , it follows that the concatenated state must be an eigenstate of S z with the same eigenvalue. Hence, C Stab;KLM is a CE code, and therefore avoids coherent phase errors.
The code C Stab;KLM is very similar to C Stab;REP2 , which is C Stab concatenated with a length two repetition code C REP2 that maps 0 j i to 00 j i and 1 j i to 11 j i. Since C Stab;KLM ¼ RC Stab;REP2 where R = (I⊗X) ⊗n , and I and X denote the identity and bit-flip operations on a qubit respectively, C Stab;KLM is equivalent to C Stab;REP2 up to the Pauli rotation R and we call C Stab;KLM a rotated-stabilizer code.
We can also cast C Stab;KLM within the CWS framework by deriving its word stabilizer and word operators. Since C Stab;KLM and C Stab;REP2 are equivalent up to R, it suffices to derive C Stab;REP2 's word stabilizer and word operators. Namely, C Stab;KLM and C Stab;REP2 have identical word stabilizers generated by the stabilizer and logical Z operators of C Stab;REP2 . Moreover, the word operators w 1 ; ; w 2 k of C Stab;REP2 are its logical X operators and the word operators C Stab;KLM are Rw 1 ; ; Rw 2 k . We supply explicit constructs of the word stabilizer and word operators of C Stab;KLM in "Methods" section.
The code C Stab;KLM inherits its logical operators from the logical operators of C Stab;REP2 . Given any single-qubit logical operator U on C Stab , the corresponding unitary L REP2 (U) on C Stab;REP2 is given in Fig. 2a. Then the corresponding logical operator on C Stab;KLM is U ¼ RL REP2 ðUÞR. Similarly, given an m-qubit logical operator U m on C Stab , the corresponding logical operator on C Stab;REP2 is L REP2 (U m ) (Fig. 2b), and the corresponding logical operator on C Stab;KLM is R ⊗m L REP2 (U m )R ⊗m . If U is a tensor product of single-qubit Pauli gates, thenŨ is also a tensor product of single-qubit Pauli gates. Hence, if C Stab has transversal gates comprising of single-qubit Paulis, then C Stab;KLM also has corresponding transversal gates of the same form. If U m is a diagonal unitary in the computational basis, thenŨ m ¼ π y m ðU m I nm Þπ m is also the logical operator on C Stab;KLM .
To design error-correction procedures for C Stab;KLM , we leverage on the error-correction procedures of C Stab;REP2 and the interpretation that C Stab;KLM is C Stab;REP2 with an effective R error. We can extract the syndrome of a Pauli error E acting on C Stab;KLM by measuring eigenvalues of Pauli observables. These Pauli observables can be generators associated with C Stab;REP2 's stabilizer, and these generators are derived easily from the generators of C Stab ; if We complete the QEC procedure by using measured eigenvalues of G 1 ; ; G 2nÀk to estimate the Pauli error E 0 that could have occurred, and reverse its effect.
The generator G j 's eigenvalue on E ψ j i for ψ j i 2 C Stab;KLM when measured is θ j ¼ ðÀ1Þ sj for some s j = 0, 1. Here, s j = 0 when G j and ER commute and s j = 1 otherwise. Now, denote the eigenvalue of G j on R ψ KLM j i2C Stab;REP2 as ðÀ1Þ rj for some r j = 0, 1. Whenever E = I ⊗2n , we have r ⊕ s = 0 where r = (r 1 , …, r 2n−k ) and s = (s 1 , …, s 2n−k ). Using r ⊕ s, we estimate the error E 0 that could have occurred on C Stab;KLM . For this, we use any decoder Dec Stab,REP2 that maps a syndrome vector obtained from a corrupted state of C Stab;REP2 to an estimated Pauli error. Such a decoder Dec Stab,REP2 can be a maximum likelihood decoder 19,20 or a belief propagation decoder [21][22][23] . Explicitly, our code C Stab;KLM 's decoder has the form Dec Stab;KLM ðsÞ ¼ Dec Stab;REP2 ðr È sÞ; (1) and thereby inherits its performance from the decoder Dec Stab,REP2 on the stabilizer code C Stab;REP2 . Now let us introduce some terminology related to the decoding of stabilizer codes. Denoting the single-qubit Pauli operators as I, X, the phase-flip operator Z, and Y = iXZ, the set of n-qubit Pauli operators is {I, X, Y, Z} ⊗n . Define bin(P) = (a|b) as a 2n-bit binary vector where a = (a 1 , …, a n ) and b = (b 1 , …, b n ) are n-bit binary vectors such that P ¼ wX a1 Z b1 Á Á Á X an Z bn for some w = ±1, ± i. Given any two Pauli matrices P and P 0 with binary representations bin(P) = (a, b) and binðP 0 Þ ¼ ða 0 ; b 0 Þ, their symplectic inner product 24 over F 2 i s defined to be hbinðPÞ; binðP To see how to decode our concatenated code, note that r j ¼ hbinðG j Þ; binðRÞi sy ; By linearity of the inner product, it follows that r j È s j ¼ hbinðG j Þ; binðEÞi sy . This shows that ðÀ1Þ rjÈsj is equal to the eigenvalue of G j when measured on R ψ j i, the latter of which is a state in C Stab;REP2 , from which we can deduce (1). = Fig. 1 Encodings of C Stab;KLM from the encoding E Stab of C Stab . On the right side, CNOTs apply transversally to each pair of control and target qubits in the code blocks. The permutation π maps the jth qubit in the first block of n qubits to the (2j − 1)th qubit and the jth qubit in the second block of n qubits to the (2j)th qubit. Fig. 2 Logical operators for C Stab;REP2 . Given single-qubit and multiqubit logical operators of C Stab denoted by U and U m , respectively, we obtain corresponding logical operators for C Stab;REP2 in a and b, respectively. The permutation π m maps the jth qubit in the first block of mn qubits to the (2j − 1)th qubit and the jth qubit in the second block of mn qubits to the (2j)th qubit.

Y. Ouyang
When stochastic errors evolve under the influence of U θ ¼ expðÀiθS z Þ, their weight is preserved. First, note that Then, for any N-qubit Pauli matrix P = P 1 ⊗ ⋯ ⊗ P N , we have that When P j = I or Z, we clearly have expðÀiθZÞP j expðiθZÞ ¼ P j . When P j = X or Y, we have expðÀiθZÞP j expðiθZÞ ¼ expðÀ2iθZÞP j . For any value of θ, expðÀ2iθZÞX and expðÀ2iθZÞY are never the identity operator. Hence we can see that the weight ofP is identical to the weight of P. By performing stabilizer measurements, the errorP gets projected randomly onto some Pauli of weight equal to the weight of P, if this weight is no greater than half of the code's distance, it can be corrected according to the earlier-described decoding procedure.
We now show that C Stab;KLM has a positive fault-tolerant threshold when C Stab is a Calderbank-Shor-Steane (CSS) code 25,26 that encodes a single logical qubit and has transversal logical Pauli I, X, Y, and Z gates given by I ¼ I n , X ¼ X n , Y ¼ Y n and Z ¼ Z n , respectively. (also with transversal Hadamard.) First, C Stab;KLM has transversal logical Pauli and controlled-not (CNOT) gates. Then C Stab;REP2 has transversal logical X and Z gates given by X REP2 ¼ X 2 ¼ X 2n and Z REP2 ¼ πðZ IÞπ y , respectively, and logical CNOT gate CNOT REP2 given by 2n transversal CNOT gates. Thus, C Stab;KLM has its logical X and Z operators given by X KLM ¼ RX REP2 R ¼ X 2n and Z KLM ¼ RZ REP2 R ¼ ðÀ1Þ n Z REP2 , respectively. Furthermore, the logical CNOT gate of C Stab;KLM has the form CNOT KLM ¼ ðR RÞCNOT REP2 ðR RÞ ¼ CNOT REP2 : Second, since we can perform these transversal CNOTs and have stabilizers that correspond to a CSS code, we can measure syndromes and logical Paulis faulttolerantly using Steane's method for CSS codes 27 . Relying on gateteleportation techniques 28 , we can implement all Clifford and non-Clifford gates fault-tolerantly. Since the fault-tolerant logical operations will have a finite number of circuit components, using the method of counting malignant combinations in extended rectangles 29 yields a positive fault-tolerant threshold for stochastic noise.

An amplitude damping CE code
The simplest CE code that detects AD errors is the four-qubit C ABCþ code 6 . AD errors are introduced by an AD channel A γ , which has Kraus operators A 0 ¼ 0 j ih0j þ ffiffiffiffiffiffiffiffiffiffiffi 1 À γ p j1i 1 h j and A 1 ¼ ffiffi ffi γ p 0 j i 1 h j. These Kraus operators model the damping an excited state's amplitude and the relaxation of an excited state to the ground state with probability γ. While C ABCþ detects a single AD error, it cannot correct any AD errors. Other CE codes that can correct some AD REP2 is the two-qubit repetition code, KLM is the dual-rail code 18 , LNCY code is the four-qubit AD code 17 , a up to a permutation of qubits, ABC+ is a four-qubit CE code 6 , 2LNCY is LNCY concatenated with REP2 and is a step to obtain our construct, and the 8qubit code is our eight-qubit code. b We depict the relationship between the codes in a pictorially. Here X j denotes a bit ip on the jth qubit. c State preparation circuits for C 8qubit , such as 0 L j i and þ L j i and the logical encoding of an arbitrary logical codestate. d Logical computations on C 8qubit are depicted. Here, R z (θ) = e iZθ . The logical Hadamard is performed via logical gate-teleportation after preparing a logical þ L j i ancilla. a The four-qubit AD code is also a subcode of the [[4,2,2]] code.
errors have been designed, but either have overly complicated encoding and QEC circuits 3 , or lack explicit QEC circuits 5,7-10 .
Here, we present a CE code that is the concatenation of the four-qubit AD code C LNCY 17 with C KLM , and permute the qubits to get C 8qubit with logical codewords We elucidate the connection between C LNCY , C ABCþ , C 8qubit , C KLM , and C REP2 in Fig. 3b. We prove that C 8qubit corrects a single AD error by verifying that the Knill-Laflamme QEC criterion 30 holds with respect to the Kraus operators K 1 , …, K 8 and A 8 0 where K a denotes an n-qubit operator that applies A 1 on the ath qubit and A 0 on each of the remaining qubits. The simplicity of C 8qubit allows for the direct construction of a simple error-correction strategy for AD errors, without referring to the properties of C LNCY , C ABCþ , and C KLM .
In Fig. 3, we illustrate accessible constructs for C 8qubit 's encoding circuits and logical computations. In Fig. 4, we give decoding procedures when an AD error is detected. We measure the eigenvalues m 1 , m 2 , m 3 , and m 4 of the respective operators Z 1 Z 2 , Z 3 Z 4 , Z 5 Z 6 , and Z 7 Z 8 to determine if any AD error has occurred.
Denoting b a = (1 − m a )/2 for a = 1, …, 4, we have five correctible outcomes with respect to the syndrome vector b = (b 1 , b 2 , b 3 , b 4 ). When b = 0, the codespace is damped uniformly and no AD error has occurred. When b has a Hamming weight equal to one, each logical codeword is mapped to a unique product state, and we can ascertain that exactly one AD error must have occurred. When b a = 1 and the other syndrome bits are zero, an AD error must have occurred on either the (2a − 1)th or the (2a)th qubit. Since the effect of an AD error on the (2a − 1)th and (2a)th qubit is identical, this makes C 8qubit a degenerate quantum code with respect to AD errors, and explains why C 8qubit has five correctible outcomes as opposed to nine if it were non-degenerate. The elegant structure of the four corrupted codespaces with a single AD error aids our construction of decoding circuits for C 8qubit (see details in the "Methods" section).
We illustrate C 8qubit 's performance as a quantum memory assuming perfect encoding and decoding and that AD errors only occur during the memory storage. We calculate probabilities ϵ and ϵ base of having uncorrectable AD errors occurring on C 8qubit and an unprotected qubit after T applications of A 8 δ and A δ respectively. Since the transmissivity (1 − δ) of an AD channel A δ )/2. If the Hamming weight of the syndrome vector is one, we can still correctly decode the logical qubit. For this, we discard four qubits and subsequently employ the same decoding circuit up to a permutation. If the Hamming weight of b is 0, we can use any of the above decoding circuits.

DISCUSSION
When coherent phase errors occur more frequently than stochastic errors, we expect CE codes to outperform generic QEC codes. For future work, the numerical fault-tolerant thresholds of our codes can be calculated when the noise model is a convex combination of stochastic errors and coherent phase errors. In particular, the outer codes could be chosen to be surface codes [31][32][33] , quantum LDPC codes 34,35 and Aliferis-Preskill concatenated codes for biased noise 36 . One can also study other choices for the inner codes in our construction to obtain concatenated codes with different structures and residing in different types of decoherence-free subspaces. For instance, we can consider other CE codes 37 , quantum codes that avoid exchange errors [38][39][40][41][42] , and quantum codes that avoid other different errors 4,5,8,18,43 .

Our CE code as a CWS code
Here, we derive the word stabilizer and word operators of our CE code C Stab;KLM . Now denote S Stab as the stabilizer of C Stab and G 1 , …, G n−k as its generators. Then the operators L REP2 (G i ), Z 2j−1 Z 2j generate C Stab;REP2 's stabilizer where i = 1, …, n − k and j = 1, …, n. Denoting the logical X and Z operators of C Stab as X 1 ; ; X k and Z 1 ; ; Z k respectively, the logical X and Z operators of C Stab;REP2 are given by L REP2 ðX 1 Þ; ; L REP2 ðX k Þ and L REP2 ðZ 1 Þ; ; L REP2 ðZ k Þ, respectively. Since C Stab;REP2 is a stabilizer code, its word stabilizer of C Stab;REP2 is Since the word stabilizer of C Stab;KLM is identical to the word stabilizer of C Stab;REP2 , the word stabilizer of C Stab;KLM is then given by W.

An amplitude damping CE code: additional details
We now explain the connection between the codes C LNCY , C ABCþ , C 8qubit , C KLM , and C REP2 as illustrated in Fig. 4b. Now recall that the four-qubit amplitude damping code 17 has logical codewords Concatenating this with the dual-rail code C KLM gives the code It is visually easier to work with a code if we collect the odd and even qubits in separate blocks of four qubits. We can achieve this by applying the permutation π † , which maps qubits 1, 3, 5, 7 to qubits 1, 2, 3, 4 and qubits 2, 4, 6, 8 to qubits 5, 6, 7, 8, to get our code with logical codewords Note that the above code can be obtained from the four-qubit code C ABCþ with logical codewords after concatenation with C REP2 . Note that by concatenating C LNCY with C REP2 , we get a concatenated code C 2LNCY ¼ C LNCY C REP2 with logical codewords Since the stabilizer code C 2LNCY is equivalent to C 8qubit up to a Pauli rotation given by X ⊗4 ⊗ I ⊗4 , we can interpret C 8qubit as a rotated concatenated stabilizer code.
To encode an arbitrary single-qubit logical state into C 8qubit , we concatenate the encoding circuits of C LNCY and C REP2 , and apply a Pauli rotation. Quantum circuits can be further simplified when encode the logical stabilizer states 0 L j i and þ L j i ¼ ð 0 L j i þ 1 L j iÞ= ffiffi ffi 2 p . To show that our QEC code spanned by 0 L j i and 1 L j i, corrects single AD errors, it suffices to verify the Knill-Laflamme QEC conditions. In particular, we show that for i, j = 0, 1 and a, b = 1, …, 8, we have 〈i L |K a K b |j L 〉 = δ i,j δ a,b g a for some real number g a . Now let us explain the effects of correctible AD errors on C 8qubit . Recall that the correctible AD errors are given by Then we can see the following.   5 Failure probability of using C 8qubit and an unprotected qubit versus the number of timesteps when exposed to AD errors. The baseline error probability is ϵ base and the logical error probability is ϵ. At each timestep, A δ afflicts each qubit with δ = 10 −4 . When the target failure probability is 0.01, using C 8qubit increases the number of timesteps T from about 100 to 200. When the target failure probability is over 0.0424, there is no advantage in using C 8qubit .
Y. Ouyang In the above, we can see that the effect of K 2j−1 is identical to K 2j for j = 1, …, 4. Hence there are only five unique correctible outcomes that correspond to the correctible errors K 0 , K 1 , K 3 , K 5 and K 7 . Each of these correctible outcomes are clearly orthogonal. Hence to perform quantum error correction, it suffices to rotate the orthogonal corrupted codespaces back to the original codespace. Now, to extract the error syndrome, it suffices to measure the stabilizers Z 2j−1 , Z 2j for j = 1, 2, 3, 4. These stabilizer measurements leave the codespace afflicted with correctible AD errors unchanged, and measure the parity of the (2j − 1)th and (2j)th qubits. We can then make the following decisions.
1. If the parity of the all blocks is even, then we can ascertain that no AD error has occured, which corresponds to the effect of the Kraus operator K 0 . 2. If the parity of the first and second qubit is odd, while the parity of the remaining blocks is even, then we can ascertain that either K 1 or K 2 has occured. 3. If the parity of the third and fourth qubit is odd, while the parity of the remaining blocks is even, then we can ascertain that either K 3 or K 4 has occured. 4. If the parity of the fifth and sixth qubit is odd, while the parity of the remaining blocks is even, then we can ascertain that either K 5 or K 6 has occured. 5. If the parity of the seventh and eight qubit is odd, while the parity of the remaining blocks is even, then we can ascertain that either K 7 or K 8 has occured. The structure of the corrupted codespaces allows us to decode them into a physical qubit by first discarding four qubits, and subsequently employing the same decoding circuit up to a permutation.

DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon reasonable request.