Fault-tolerant in the Pauli or Clifford frame with slow error diagnostics

Christopher Chamberland1, Pavithran Iyer2, and David Poulin2

1 Institute for Quantum Computing and Department of Physics and Astronomy, University of Waterloo, Waterloo, Ontario, N2L 3G1, Canada 2 D´epartement de Physique and Institut Quantique, Universit´e de Sherbrooke, Sherbrooke, Qu´ebec, J1K 2R1 Canada December 27, 2017

We consider the problem of fault-tolerant cause the error probability to build up between logi- quantum computation in the presence of slow cal gates, thus effectively decreasing the fault-tolerance error diagnostics, either caused by measure- threshold. But as we will see, this is not necessarily the ment latencies or slow decoding algorithms. Our case. scheme offers a few improvements over previ- One of the key tricks to cope with slow error diagnos- ously existing solutions, for instance it does not tics is the use of error frames [8]. While the basic idea of require active error correction and results in a error correction is to diagnose and correct errors, it can reduced error-correction overhead when error often be more efficient to keep track of the correction diagnostics is much slower than the gate time. In in classical software instead of performing active error addition, we adapt our protocol to cases where correction. In particular, this saves us from performing the underlying error correction strategy chooses additional gates on the system, thus removing poten- the optimal correction amongst all Clifford gates tial sources of errors. In most quantum error-correction instead of the usual Pauli gates. The resulting schemes, the correction consists of a Pauli operator, i.e., Clifford frame protocol is of independent inter- tensor products of the identity I and the three Pauli est as it can increase error thresholds and could matrices X,Y, and Z. Thus, at any given time, the find applications in other areas of quantum com- computation is operated in a random but known Pauli putation. frame: its state at time t is P |ψ(t)i for some Pauli oper- ator P and where |ψ(t)i denotes the ideal state at time t. When error-diagnostics is slow, the system will un- 1 Introduction and Motivation avoidably evolve in an unknown error frame for some time. In fault-tolerant quantum computation, syndrome mea- The problem of slow measurements in solid-state sys- surements are used to detect and diagnose errors. Once tems was addressed by DiVincenzo and Aliferis [9] in the diagnosed, an error can be corrected before it propa- context of concatenated codes. In addition to error di- gates through the rest of the computation. In this ar- agnostics, concatenated schemes require measurements ticle, we are concerned with the impact of slow error to prepare certain ancilla states used to fault-tolerantly diagnostics on fault-tolerance schemes. There are two extract the error syndrome and to inject magic states to origins for this concern. First, in certain solid-state and complete a universal gate set. DiVincenzo and Aliferis’ ion-trap architectures, measurement times can be scheme hinges on the fact that the logical gate rate de- arXiv:1704.06662v2 [quant-ph] 25 Dec 2017 between 10 to 1000 times slower than gates times [1–7]. creases exponentially with the number of concatenation Thus, on the natural operating time-scale of the quan- levels; thus, at a sufficiently high level, measurement tum computer, there is a long delay between an error and gate times become commensurate. To concretely event and its detection. Second, processing the mea- realize this simple observation, they combine a number surement data to diagnose an error—i.e., decoding—can of known and new techniques including ancilla correc- be computationally demanding. Thus, there can be an tion, high-level state injection, and Pauli frames. additional delay between the data acquisition and the One limitation of this solution is that it only ap- error identification. At first glance, these delays might plies to concatenated codes realizing a universal gate set through magic state injection. This leaves out for Christopher Chamberland: [email protected] instance surface codes [10] or concatenated codes with Pavithran Iyer: [email protected] alternate universal gate constructions [11–16]. In par- David Poulin: [email protected] ticular, they inject noisy magic-states directly at high

Accepted in Quantum 2017-12-23, click title to verify 1 concatenation levels, thus losing the benefit of low-level emphasize that slow decoding is a very serious concern. correction. In addition, when decoding times are very For instance, numerical simulations used to estimate slow, this solution could wastefully use additional layers the threshold or overhead of the surface code are com- of concatenation with the sole purpose of slowing down putationally dominated by the decoding algorithm and the logical gates. Another drawback of their scheme is require intense computational resources. Depending on that it requires active error correction to ensure that the code distance and error rate, a single decoding cycle high-level corrections are always trivial. can take well above 1µs [17] on a standard processor, In this article, we introduce an alternative scheme to considerably slower than the natural GHz gate rate in cope with slow error diagnostics which applies broadly the solid state. to all codes and universal gate constructions. Like the As explained in [18], if the rate of the classical syn- DiVincenzo and Aliferis scheme, the key idea will be drome processing (decoding) is smaller than the rate at to slow-down the logical gate rate to learn the error which the syndrome is generated, an exponential slow frame before it propagates to the rest of the compu- down would occur during the computation. However, tation. This is simply achieved by spacing out gates in just as measurements with long latencies can be handled the logical circuit and thus circumvents the unnecessary with a supply of additional fresh measurement , additional qubit overhead associated to extra concate- slow decoding can be handled with a supply of paral- nation layers. Our scheme does not require active error lel classical computers so that the overall decoding rate correction, it is entirely realized in an error frame. In matches the syndrome creation rate. Thus, in this arti- addition, our scheme is compatible with a more gen- cle, slow error diagnostics is used to designate latencies eral form of error correction which uses Clifford frames, in measurements and/or decoding. where at any given time t, the state of the computer Finally, to our knowledge, a theory of Clifford frames is C|ψ(t)i where C is a tensor-product of single-qubit for fault-tolerant quantum computation has not been Clifford group elements (defined below). Note that de- worked out before. By enabling them, our scheme of- tails of the Pauli frame scheme are given in Section2 fers a greater flexibility for error correction, thus poten- whereas details of the Clifford frame scheme are given tially correcting previously non-correctable error mod- in Section3. els, or increasing the threshold of other noise models Regarding slow measurements, it is important to dis- [19]. More generally, the possibility of fault-tolerantly computing in a Clifford frame opens up the door to tinguish two time scales. First, the time tl it takes for the outcome of a measurement to become accessible to new fault-tolerant protocols, e.g., using new codes or new hardware that have a different set of native fault- the outside world. For instance, tl could be caused by various amplification stages of the measurement, and tolerant gates. For instance, Clifford frames were used we refer to it as a measurement latency. Second, the as an accessory in measurement-based quantum compu- tation with Majorana fermions [20]. Lastly, the possi- measurement repetition time tr is the minimum time between consecutive measurements of a given qubit. In bility of computing in a Clifford frame could have appli- cations to randomized compiling [21] which introduces principle, tr can be made as small as the two-qubit gate time, provided that a large pool of fresh qubits are ac- random frames to de-correlate physical errors. cessible. Indeed, it is possible to measure a qubit by performing a CNOT to an ancillary qubit initially pre- pared in the state |0i and then measuring this ancillary 2 Pauli frame qubit. While the ancillary qubit may be held back by For the remainder of the paper, we will often make use measurement latencies for a time tl before it can be re- (1) set and used again, other fresh qubits can be brought in of the following definitions. First, we define Pn to be to perform more measurements in the meantime. The the n-qubit Pauli group (i.e. n-fold tensor products of scheme we present here and the one presented in [9] the identity I and the three X,Y, and (k) are designed to cope with measurement latencies tl, but Z). Then the Clifford hierarchy is defined by Pn = † (k−1) (1) both require small tr. Indeed, the accuracy threshold {U : UPU ∈ Pn ∀P ∈ Pn }. is a function of the error rate per gate time (including In physical implementations where measurement measurement gates). Thus, increasing the measurement times are much longer than gate times or when error repetition time tr relative to the decoherence rate will decoding is slow, if one were to perform active error cor- unavoidably yield a lower threshold. rection, a large number of errors could potentially build While the DiVincenzo and Aliferis scheme was mo- up in memory during the readout times of the measure- tivated by slow measurements, most of it applies di- ment. However, for circuits containing only Clifford rectly to the case of slow decoding. Our scheme too gates, all Pauli recovery operators can be tracked in is oblivious to the origin of slow error diagnostics. We classical software without ever exiting the Pauli group.

Accepted in Quantum 2017-12-23, click title to verify 2 chy, Pauli operators are mapped to Clifford operators (3) under conjugation by T ∈ P1 gates. Therefore, the output correction after applying a logical T gate can be Figure 1: Example of extended rectangle (exRec) for imple- outside the Pauli frame. menting the logical gate G. The leading and trailing EC cir- In order to overcome these obstacles, we note that cuits (LEC and TEC) perform fault-tolerant error correction for if error correction is performed immediately after the input errors and errors occurring during the implementation of application of the T gate, the output correction can be G. written as a logical Clifford gate C times a Pauli matrix (a proof is presented in AppendixA). Indeed, suppose that at some given time during the computation, the state of the computer is in some Pauli frame defined by P —i.e., the state of the computer is P |ψi where |ψi is the ideal state (here P can be any (1) element of Pn , not necessarily a logical Pauli opera- (2) tor). If we then apply a Clifford gate U ∈ Pn (again, not necessarily a logical gate), then the state will be Figure 2: Illustration of the scheme for propagating Pauli cor- rections through a T gate when error diagnostics are much UP |ψi = P 0U|ψi where P 0 is another Pauli operator. longer than gate times. (TOP) When propagating the input We thus see that the effect of U is to correctly transform Pauli P1 through a T gate and performing error correction, the the perfect state |ψi and to change the Pauli frame P in output can be written as CP2 where C is a logical Clifford some known way. Moreover, updating the Pauli frame gate and P2 is a Pauli matrix. A buffer is introduced to learn 0 † P = UPU can be done efficiently, with complexity the Pauli frame immediately before applying the T gate which O(n2) [22]. This shows that as long as we only apply enables the logical Clifford correction C to be known. During Clifford gates, there is no need to actively error-correct, the buffer, repeated rounds of error correction are performed to we can instead efficiently keep track of the Pauli frame prevent the accumulation of errors for qubits waiting in mem- in classical software [8]. ory. We denote the final Pauli correction arising from the EC In concatenated codes for instance, error correction is rounds as P3. (BOTTOM) We propagate the correction CP2 through the buffer and apply a logical Clifford gate C† in order performed in between the application of gates to ensure to remove C thus restoring the Pauli frame. Although the prop- that errors don’t accumulate in an uncontrolled fash- agation can map the buffer correction P3 → P4, P4 remains ion. A gate location in a is thus Pauli and can be known at a later time. replaced by an extended rectangle, where error correc- tion is performed both before and after the application If we were to keep track of the logical Clifford correc- of the gate [23]. The leading error correction circuit tion C in classical software, it could propagate through in an extended rectangle is used to correct input errors the next T gate, resulting in a correction involving even that could have occurred prior to the application of the more T gates. It could also propagate through a log- gate. The trailing error correction circuits correct er- ical two-qubit gate (such as a CNOT) resulting in a rors that can occur during the application of the gate two-qubit correction (the exact transformation rules are (see Fig.1). Each error correction circuit will multi- derived in Section3). The two-qubit corrections could ply the current Pauli frame by a Pauli operator (the then propagate through other gates in the quantum al- correction). gorithm leading to a generic Clifford correction. To pre- Since Clifford gates can be efficiently simulated on vent these scenarios from occurring, a buffer can be in- a classical computer, non-Clifford gates are needed serted right before the next logical two-qubit gate or T for universal quantum computation. Universal quan- gate part of the quantum algorithm. The role of the tum computation can be achieved for instance using buffer is to learn what the Pauli frame was right before gates from the Clifford group combined with the T = the application of the previous logical T gate. During iπ/4 (3) diag(1, e ) ∈ P1 gate [24]. In general, Pauli opera- the buffer, repeated rounds of error correction are per- tors will not remain in the Pauli-group when conjugated formed to prevent the accumulation of a large number by non-Clifford gates and so the Pauli frame cannot sim- of errors. There could be leftover Pauli corrections aris- ply propagate through them. ing from error correction rounds which would only be Consider the application of a logical T gate in a quan- known at a later time. However, by propagating the tum algorithm. Since measurement times are much logical Clifford correction through the buffer, the Pauli longer than gate times, the Pauli frame right before the corrections would remain Pauli. application of a T gate can only be known at a later Once the logical Clifford correction is propagated time. Furthermore, by definition of the Clifford hierar- through the buffer, we apply a logical C† thus restor-

Accepted in Quantum 2017-12-23, click title to verify 3 So in particular, there is no need to introduce additional coding layers to slow-down the logical gate rate during this waiting time. While this is a fairly minor distinc- tion, it does enable us to generalize to any other coding schemes and implementations of the T gate, a feature which has not been addressed prior to our work. Figure 3: Circuit for implementing a T gate. The circuit uses the state T |+i which is prepared offline and applies a sequence of Clifford gates. The correction SX is only applied if the 3 Clifford frame Z-basis measurement outcome is -1. As was shown in [19], including Clifford corrections as part of the recovery protocol for error correcting codes ing the Pauli frame. The protocol guarantees that only that can implement logical Clifford gates transversely Pauli corrections would be propagated through the next could significantly improve the code’s threshold for cer- logical T or two-qubit gates. An illustration of the tain noise models. In fact, for coherent noise chan- in·σ −in·σ scheme is outlined in Fig.2. As in [9], the proposed nels (N (ρ) = e ρe where n = (nx, ny, nz) with approach also effectively slows down gate times mak- ||n|| = 1), it was shown that in some regimes the 5-qubit ing them comparable to measurement times1. However, code (see [25]) can tolerate an arbitrary amount of co- buffers are only introduced when necessary and without herent noise when Clifford corrections are used, while having to increase the size of the code. Pauli corrections have a finite threshold. We conclude this section by noting that in [9, 18], the In this section, we extend the protocol used to cope Pauli frame scheme was described in the context of con- with slow error-diagnostics to the case where error cor- catenated codes where T gates are implemented using rection uses Clifford gates. When performing error state injection as shown in Fig.3. In these schemes, a correction on a set of encoded qubits with a stabi- buffer is included to learn what the logical Pauli frame lizer code, if one measures a non-trivial syndrome value was before applying the SX correction in order to cor- l, a recovery map Rl is applied to the data block. rectly interpret the outcome of the Z-basis measure- The recovery map can always be written in the form (1) ment. For instance, if a logical Pauli X occurred on Rl = L(l)T (l)G(l) where G(l) ∈ Pn is a product of the data prior to implementing the T gate, the Clifford stabilizer generators, L(l) is a product of logical oper- correction SX would be applied if the measurement out- (1) ators and T (l) ∈ Pn is a product of pure errors [26], come was +1 instead of −1 (see the caption of Fig.3). see also AppendixA. Pure errors form an abelian group Further, as was described in [9], additional layers of con- of operators that commute with all of the code’s logical catenation are required to prevent the build up of errors operators and all but one of the codes stabilizer genera- in the presence of quantum measurements with a long tors. The logical operators L(l) are chosen to maximize latency. the probability of recovering the correct codeword – this While it builds on the same general ideas, the Pauli is the decoding problem. The operators in the set L(l) frame scheme presented in this section is not restricted are not necessarily restricted to logical Pauli operators to a particular implementation of the T gate (for in- as they can be extended to include all logical operators stance, it also directly applies to codes which can im- that can be applied fault-tolerantly. plement a logical T gate transversely) nor to concate- It is thus natural to restrict L(l) to gates that can be nated schemes. In fact, our scheme slightly differs from applied transversally on the code. In particular, we will [9, 18] even in the case where the T gate is applied us- (2) ⊗n consider logical corrections in (P1 ) , the group gen- ing state injection. Indeed, one does not wait to learn erated by n-fold tensor products of single-qubit Clifford what the frame was before determining whether to ap- operators. This latter group is generated by ply the logical SX correction (the Z-basis measurement outcome is always interpreted in the same way). The en- 1  1 1  1  1 0  H = √ , and S = √ , (1) tire state injection circuit is completed before the Pauli 2 1 −1 2 0 i frame (prior to the application of the state injection circuit) is known. Once it becomes known, one would i.e., P(2) = hH,Si. The order of the group is |P(2)| = 24 know if the wrong logical SX correction was applied and 1 1 (ignoring global phases). For the n-qubit case, P(2) = any remaining logical Clifford errors would be removed. n hHi,Si, CNOTiji where the indices i, j indicate which 1Note that the buffer increases the overall time for implement- qubits to apply the Clifford gates. We point out that ing a non-Clifford gate. However, this impacts the overall running 2-D color codes [15] admit transversal realizations of time of the quantum algorithm only by a constant factor. (2) all gates in P1 . Furthermore, the 5-qubit code [25, 27]

Accepted in Quantum 2017-12-23, click title to verify 4 admits transversal realizations of logical gates in the set classical software, these could grow due to other CNOT generated by hSH,X,Zi. gates resulting in a generic Clifford correction. Further- For concatenated codes, we restrict the discussion to more, when propagating Clifford corrections through the case where logical Clifford corrections are performed non-Clifford gates (such as the T gate), the output can at the last concatenation level only. If Clifford correc- potentially be outside of the Clifford hierarchy. These tions were performed at every level, one would need to could then propagate through the remainder of the log- wait for the measurement outcomes of every level and ical circuit resulting in a unitary gate correction ex- actively perform Clifford corrections. This is because pressed as a product of several T gates. a level-k logical Clifford correction does not generally commute with the level-(k+1) syndrome measurements. 3.1 Clifford propagation through CNOT gates The goal of defining a Clifford frame is to avoid actively correcting since the corrections themselves can intro- duce more errors into the computation. We now derive the transformation rules for Clifford operators propagating through CNOT gates. Two- a qubit controlled unitary gates C-U12|ai|bi = |aiU |bi, where the first qubit is the control and the second qubit is the target, can be written as 1 1 C-U = (I + Z) ⊗ I + (I − Z) ⊗ U. (2) 12 2 2

Note that from this definition CNOT12 = C-X12. Us- ing Eq. (2), it is straightforward to show the following (a) relations

(S ⊗ I)C-X12 = C-X12(S ⊗ I), (3)

(I ⊗ S)C-X12 = C-Y12(I ⊗ S), (4)

(I ⊗ H)C-X12 = C-Z12(I ⊗ H), (5)

(H ⊗ I)C-X12 = UX (H ⊗ I), (6)

1 1 (b) where we defined UX ≡ 2 (I + X) ⊗ I + 2 (I − X) ⊗ X.

Figure 5: (a) Propagating input Clifford gates C1 ⊗ C2 across a CNOT (part of a quantum algorithm) leads to two possible outcomes, one in Cgood (defined in Eq. (8)) and the other in Cbad (defined in Eq. (9)). (b) Buffers are introduced to learn if the outcome in Fig. 5a belongs to Cgood or Cbad. Rounds of (a) error correction in the buffers introduce the corrections C3 ⊗C4. If the outcome in Fig. 5a belongs to Cbad, we apply a CNOT correction following the buffers. The protocol is repeated until the resulting gate belongs to Cgood.

(b) We first address the propagation of logical Clifford corrections (expressed in tensor product form) through Figure 4: (a) Propagation of I ⊗ S through a CNOT gate. CNOT gates. The goal is to prevent a two-qubit correc- (b) Propagation of H ⊗ I through a CNOT gate where Uf = 1 1 tion from spreading to multiple code blocks in order to 2 (I + iY ) ⊗ I + 2 (I − iY ) ⊗ X. In both cases, if instead of correcting the Clifford errors prior to the CNOT gate we were avoid performing a generic Clifford correction. After the to keep track of them using a Clifford frame, the corrections application of a logical CNOT gate (as part of a quan- would involve two-qubit gates in addition to the original Clifford tum algorithm), we can place a buffer before the next corrections. logical two-qubit gate (or non-Clifford gate) in order to determine what the Clifford frame was right before the From Fig.4 and Eqs. (3) to (6), it can be seen that application of the logical CNOT. Note that during the propagating Clifford corrections through CNOT gates application of the buffer, repeated rounds of error cor- can result in both single and two-qubit Clifford correc- rection are performed to prevent the build-up of a large tions. By keeping track of logical Clifford corrections in number of errors, producing additional Clifford gates.

Accepted in Quantum 2017-12-23, click title to verify 5 From Eqs. (3) to (6), upon propagating the input When applying a logical T gate in a quantum algo- Clifford gates C1 ⊗ C2 through a logical CNOT gate rithm, we could also place a buffer before the next log- part of a quantum algorithm using a Clifford frame, two ical gate part of the quantum algorithm to learn the outcomes are possible. In the first case, we can have Clifford frame immediately before applying the T gate. If the output correction is non-Clifford, we can perform 0 0 C-X12(C1 ⊗ C2) = (C1 ⊗ C2)C-X12, (7) appropriate corrections in order to restore the Clifford frame. If successful, this would guarantee that the input for some Clifford gates C0 and C0 . In particular, we 1 2 correction to the next gate would belong to the Clifford define group.

Cgood = (C1 ⊗ C2)C-X12. (8) Suppose the input to the logical T gate is a Clif- ford correction C1, so the resulting gate is TC1. On If Eq. (7) is not satisfied for C1 ⊗ C2, then the output the one hand, if TC1 = C˜1T for some Clifford C˜1— (2) will belong to the set Cbad defined to be † or equivalently TCT ∈ P1 —then no further oper- (2) ations are necessary. Only gates in the set gener- Cbad = P \ Cgood, (9) 2 ated by C1 ∈ hS, Xi satisfy this property. In fact, if † (2) C1 ∈ hS, Xi, then TC1T ∈ hS, Xi. Thus, we define where P2 is the two-qubit Clifford group. Performing a computer search, we found that out of the 242 = 576 (2) C− = hS, Xi, and C+ = P1 \ C−. (10) possible input Clifford gates (expressed in tensor prod- uct form), 64 will satisfy Eq. (7). Note that |C−| = 8 while |C+| = 24 − 8 = 16. Once we After the application of the CNOT gate part of the learn that the input Clifford correction C1 to the logical quantum algorithm, the buffers will introduce the Clif- T gate belongs to C−, then no further operations are necessary to restore the Clifford frame. If the buffer ford corrections C3 ⊗ C4 arising from the repeated rounds of error correction. Once the Clifford frame prior Clifford operations are uniformly distributed over the 1 to applying the CNOT gate is known, we will be able Clifford group, this occurs with probability 3 . to determine if the output from the propagation of the On the other hand, when we learn that the input Clifford correction C to the logical T gate belongs to Clifford frame belongs to Cgood or Cbad. If it belongs 1 C , we apply another logical T in the hope to restore to Cgood, then no further operations are required. In + the Clifford frame. Since an additional Clifford gate C the case where it belongs to Cbad, we perform a logi- 2 cal CNOT correction after the buffer. A second set of was accumulated during the buffer, the resulting gate is ˜ 2 buffers is introduced to determine if the resulting gate TC2TC1. When C2 ∈ C−, then TC2TC1 = C2T C1 ∈ (2) 2 belongs to Cgood or Cbad. We can repeat this process P1 , since T = S is a Clifford transformation. At this recursively until the resulting gate belongs to Cgood. stage, we have returned to a Clifford frame, but have Assuming the input Clifford gates and buffer Clif- removed the desired logical T gate: we are thus back at ford corrections are chosen uniformly at random, we our starting point and can try anew. performed a simulation to estimate the transition prob- Once again, whenever the Clifford corrections occur- 5 ability from Cbad → Cgood. Performing 5 × 10 sim- ring during the buffer are biased to the Pauli group ulations, we found that the Cbad → Cgood transition (e.g., when the probability of an error is low), before 1 applying another T gate correction to restore the al- occurs with probability 12 . Thus, when computing in a random Clifford frame, each logical CNOT requires on gorithm T gate, we should apply the Clifford transfor- † average 12 + 1 logical CNOTs. mation (C˜2SC1) . In this way, we would increase the Lastly, we point out that for noise models where the probability of being in a state of the form CT where Clifford corrections arising from the buffer are biased to- C ∈ C− (thus restoring the Clifford frame). To take this wards the Pauli gates, it would be more advantageous possibility into account, we will henceforth assume that † † to apply C1 ⊗ C2 (where C1 and C2 are the input Clif- the Clifford corrections arising from the buffer belong ford gates in Fig. 5a) after the following initial CNOT to C− with probability 1−p and to C+ with probability correction. More specifically, if the probability of ac- p. (0) (2) quiring a non-trivial Clifford correction in the buffer is Define T = P1 to be the set of single-qubit Clif- , then the Cbad → Cgood transition probability becomes ford gates, and define 1 −  11 . 12 k (k) Y T = (TCj) where Cj ∈ C+. (11) 3.2 Clifford propagation through T gates j=1 We now address the propagation of Clifford corrections Every time we learn that the previous buffer Clifford through a logical T gate, which is a non-Clifford gate. was in C+, we apply a T gate and wait for another

Accepted in Quantum 2017-12-23, click title to verify 6 buffer. Since this buffer will belong to C− with proba- bility 1−p and to C+ with probability p, each step of the above protocol can be seen as a step in a random walk over the sets T (k) with transition T (k) → T (k+1) occur- ring with probability p and transition T (k) → T (k−1) occurring with probability 1 − p. Every time T (0) is reached, there is a probability 1 − p that a logical T gate is successfully realized at the next step. To summarize, when attempting to implement a log- ical T gate starting in a Clifford frame T (0), we either succeed with probability 1−p or end up applying a T (1) gate with probability p. In the latter case, we enter a random walk over k ∈ N, and our goal it to return to k = 0. This clearly requires an odd number of steps. Figure 6: For a fixed value of 1 − p, we plot the value of n The one-step process 1 → 0 occurs with probability such that F (p, n) > q. We give plots for q = 0.9, q = 0.99 1 − p. The three step process 1 → 2 → 1 → 0 occurs and q = 0.999. Hence, each curve corresponds to the expected 2 with probability p(1 − p) . Generalizing to t = 2j + 1 number of T gate corrections that are required for obtaining a time steps, where j ∈ N, the number of paths that lead gate in T (0) with probability greater than q. to a gate in T (0) is given by the j’th Catalan number 1 2j Kj = [28]. Therefore, the probability of return- j+1 j steps. The result is given by ing to a gate in T (0) after t = 2j + 1 time steps is given n by X F (p, n) = P2k+1 k=0 1 2j P = pj(1 − p)j+1. (12) = 1 − f(p, n), (14) 2j+1 j + 1 j where   1 − p 2(n + 1) n+1 Using the generating function√ for the Catalan num- f(p, n) = (p(1 − p)) × P j 2 + n n + 1 ber c(x) = Kjx = (1 − 1 − 4x)/(2x), the total j≥0 3 probability that the random walk terminates is given by × F (1, + n; 3 + n; 4p(1 − p)), (15) 2 1 2 and F (a, b; c; z) is the Hypergeometric function de- X 1 − p  2 1 P2k+1 = min , 1 . (13) fined in [29]. Plots of Eq. (14) are given in Fig.6. p k≥0 We now obtain an upper bound on the number of time steps n that are necessary to restore the Clifford If p > 1/2, then with finite probability the random frame with probability q = 1 − . In other words, we walk will not terminate whereas if p ≤ 1/2, the random would like to obtain an upper bound on n such that walk is guaranteed terminate. This means that we must F (p, n) > 1 − . We first obtain a lower bound for the function f(p, n) by using the following inequalities choose Clifford gates from C− with probability greater than 1/2. The latter condition can be satisfied in cases !n+1 2(n + 1) 2(n + 1) where Clifford corrections arising from the buffer are ≥ = 2n+1, (16) n + 1 (n + 1) biased towards gates belonging to C−, or in particular if they are biased towards Pauli gates or the identity. When the buffers are chosen uniformly over the Clifford 3 F (1, + n; 3 + n; 4p(1 − p)) ≥ 2p + 1. (17) group, then p = 16/24 = 2/3 > 1/2 so with some finite 2 1 2 probability the procedure will not terminate. Inserting Eqs. (16) and (17) into Eq. (14), we obtain We conclude this section by calculating the probabil- (1 − p)(2p + 1) ity of obtaining a gate in T (0) within n time steps, which F (p, n) ≤ 1 − [2p(1 − p)]n+1. (18) we define as F (p, n). This quantity gives the number of n + 2 expected T gate corrections that need to be applied in Setting F (p, n) > 1 − , we obtain order to restore the Clifford frame after propagation [2p(1 − p)]n+1  through a logical T gate. The probability F (p, n) is ≤ (19) obtained by summing Eq. (12) with a cut-off of n time- n + 2 (1 − p)(2p + 1)

Accepted in Quantum 2017-12-23, click title to verify 7 1 n+1 For n ≥ 1, we have 1/(n + 2) > ( 2 ) , so Eq. (19) by applying logical Clifford corrections prior to the ap- becomes plication of the next two-qubit or non-Clifford gate part  of a quantum algorithm. [p(1 − p)]n+1 ≤ (20) (1 − p)(2p + 1) Given that logical Clifford corrections can signifi- cantly increase a code’s threshold value [19], in the re- which shows that n ∼ | log |—the T gate overhead for mainder of the manuscript, we showed how to perform restoring the Clifford frame scales logarithmically in . fault-tolerant error correction in the Clifford frame. We We now consider regimes where the noise is below performed an in-depth study of the propagation of log- −2 the fault-tolerance threshold of a code (say p . 10 as ical Clifford corrections through logical CNOT and T is required for the surface code [10]). In such regimes, gates, and the same idea can be generalized to other corrections based on syndrome measurement outcomes universal gate sets. will be significantly biased towards the identity, or more For the propagation through CNOT gates, we placed generally towards Pauli operators. More specifically, buffers at strategic locations to ensure that the output suppose that for a given noise model and code, a Pauli Clifford corrections could be expressed in tensor prod- correction leads to a logical error rate δP . Applying uct form. To achieve this, we found that on average Clifford corrections can only improve this logical error 12 logical CNOT corrections would be required when rate to δC ≤ δP since they include Pauli corrections. Clifford corrections arising from buffers are chosen uni- But in a Clifford correction scheme, non-Pauli correc- formly at random. This ensures that two-qubit Clifford tions are only used when Pauli corrections are not op- corrections would not propagate through the remainder timal, which occurs at a rate δP , which is small below of the circuit yielding a generic Clifford correction. threshold. Consequently, in the case where a correction We also used buffers to keep track of the Clifford cor- from Cbad was applied, the expected number of T gate rections propagating through T gates. We showed that corrections to return to the Clifford frame (as shown in in certain conditions, by applying enough T gate correc- Fig.6) would be very close to one since p . δP . Thus, tions, the Clifford frame could be restored with prob- we conclude that the Clifford gates can be used with ability arbitrarily close to 1. Furthermore, to restore the scheme proposed here at a negligible cost. the Clifford frame with probability at least 1 − , we We conclude this section by mentioning that Clif- showed that the number of T gate corrections scales as ford frames are also useful in randomized benchmark- log (1/). ing schemes where random Clifford gates are applied While [19] has shown that Clifford corrections can to transform a given noise channel into an effective de- produce a higher error threshold, the impact and ap- polarizing channel [21, 30, 31]. In these schemes, once plicability of Clifford corrections remains largely unex- the random Clifford gates have been applied, they must plored. Our original motivation for the current work be propagated in classical software through a sequence was to determine if one of the key tricks used in FT of logical gates that are part of the of schemes — Pauli frames — could be generalized to Clif- interest (which typically includes Clifford and T gates) ford corrections. Having found that it can indeed be and conjugate Clifford gates are subsequently applied generalized at a negligible cost below threshold, we pave after the Clifford frame has been restored. The tech- the way to future investigations of Clifford corrections. niques presented in this section can be used to restore the Clifford frame after propagation through the logical gates and could thus be an attractive approach for per- forming randomized benchmarking using Clifford gates. 5 Acknowledgements Note that if only random Pauli operators were used, the We thank Tomas Jochym-O’Connor and Daniel Gottes- noise would be transformed to a Pauli channel (but not man for useful discussions. C. C. would like to acknowl- in general a depolarizing channel). edge the support of QEII-GSST and to thank the In- stitut Quantique at the University of Sherbrooke for 4 Conclusion their hospitality where most of this work was completed. This work was supported by the Army Research Office In this paper, we considered performing fault-tolerant contract number W911NF-14-C-0048. quantum computation when measurement times and/or decoding times are much slower than gate times. This was realized by providing a new scheme for per- References forming error correction using the Pauli frame by plac- ing buffers after the application of a non-Clifford gate. [1] R. Barends, J. Kelly, A. Megrant, A. Veitia, We showed that the Pauli frame can always be restored D. Sank, E. Jeffrey, T. C. White, J. Mutus, A. G.

Accepted in Quantum 2017-12-23, click title to verify 8 Fowler, B. Campbell, et al. Superconducting quan- tum computation. arXiv: quant-ph/9610011, tum circuits at the surface code threshold for fault 1996. URL https://arxiv.org/abs/quant-ph/ tolerance. Nature, 508(7497):500–503, 2014. DOI: 9610011. 10.1038/nature13171. [12] Tomas Jochym-O’Connor and Raymond [2] Evan Jeffrey, Daniel Sank, J. Y. Mutus, T. C. Laflamme. Using concatenated quantum codes White, J. Kelly, R. Barends, Y. Chen, Z. Chen, for universal fault-tolerant quantum gates. Phys. B. Chiaro, A. Dunsworth, A. Megrant, P. J. J. Rev. Lett., page 010505. DOI: 10.1103/Phys- O’Malley, C. Neill, P. Roushan, A. Vainsencher, RevLett.112.010505. J. Wenner, A. N. Cleland, and John M. Martinis. [13] Adam Paetznick and Ben W. Reichardt. Univer- Fast accurate state measurement with supercon- sal fault-tolerant quantum computation with only ducting qubits. Phys. Rev. Lett., 112:190504, May transversal gates and error correction. Phys. Rev. 2014. DOI: 10.1103/PhysRevLett.112.190504. Lett., 111:090505, Aug 2013. DOI: 10.1103/Phys- [3] J. R. Petta, A. C. Johnson, J. M. Taylor, E. A. RevLett.111.090505. Laird, A. Yacoby, M. D. Lukin, C. M. Marcus, [14] Jonas T. Anderson, Guillaume Duclos-Cianci, and M. P. Hanson, et al. Coherent manipulation of David Poulin. Fault-tolerant conversion between coupled electron spins in semiconductor quantum the steane and reed-muller quantum codes. Phys. dots. Science, 309(5744):2180–2184, 2005. DOI: Rev. Lett., page 080501. DOI: 10.1103/Phys- 10.1126/science.1116955. RevLett.113.080501. [4] M. Veldhorst, J. C. C. Hwang, C H. Yang, A. W. [15] H´ector Bomb´ın. Gauge color codes: optimal Leenstra, B. de Ronde, J. P. Deholla, J. T. Muho- transversal gates and gauge fixing in topological nen, F. E. Hudson, K. M. Itoh, A. Morella, stabilizer codes. New J. Phys., 18:043038, 2016. and A. S. Dzurak. An addressable quantum URL http://stacks.iop.org/1367-2630/17/i= dot qubit with fault-tolerant control-fidelity. Na- 8/a=083002. ture nanotechnology, 9(12):981–985, 2014. DOI: 10.1038/nnano.2014.216. [16] Theodore J. Yoder, Ryuji Takagi, and Isaac L. Chuang. Universal fault-tolerant gates on concate- [5] J. Stehlik, Y.-Y. Liu, C. M. Quintana, C. Eichler, nated stabilizer codes. Phys. Rev. X, 6:031039, Sep T. R. Hartke, and J. R. Petta. Fast charge sens- 2016. DOI: 10.1103/PhysRevX.6.031039. ing of a cavity-coupled double quantum dot using a josephson parametric amplifier. Phys. Rev. Ap- [17] S.J. Devitt, A.G. Fowler, T. Tilma, W.J. Munro, plied, 4:014018, Jul 2015. DOI: 10.1103/PhysRe- and K. Nemoto. Classical processing require- vApplied.4.014018. ments for a topological quantum computing sys- [6] S. Olmschenk, D. Hayes, D. N. Matsukevich, tem. Int. J. Quant. Inf., 8:1–27, 2010. DOI: P. Maunz, D. L. Moehring, K. C. Younge, and 10.1142/S021974991000637X. C. Monroe. Measurement of the lifetime of the [18] Barbara M. Terhal. for 2 o + quantum memories. Rev. Mod. Phys., 87:307–346, 6p P 1/2 level of yb . Phys. Rev. A, 80:022502, Aug 2009. DOI: 10.1103/PhysRevA.80.022502. Apr 2015. DOI: 10.1103/RevModPhys.87.307. [7] H. H¨affner,C.F. Roos, and R. Blatt. Quantum [19] Christopher Chamberland, Joel Wallman, Stefanie computing with trapped ions. Physics Reports, Beale, and Raymond Laflamme. Hard decoding 469(4):155 – 203, 2008. ISSN 0370-1573. DOI: algorithm for optimizing thresholds under general http://doi.org/10.1016/j.physrep.2008.09.003. markovian noise. Phys. Rev. A, 95:042332, Apr [8] Emanuel Knill. Quantum computing with realisti- 2017. DOI: 10.1103/PhysRevA.95.042332. cally noisy devices. Nature, 434(7029):39–44, 2005. [20] Torsten Karzig, Christina Knapp, Roman M. DOI: 10.1038/nature03350. Lutchyn, Parsa Bonderson, Matthew B. Hastings, [9] David P. DiVincenzo and Panos Aliferis. Effec- Chetan Nayak, Jason Alicea, Karsten Flensberg, tive fault-tolerant quantum computation with slow Stephan Plugge, Yuval Oreg, Charles M. Mar- measurements. Phys. Rev. Lett., 98:020501, Jan cus, and Michael H. Freedman. Scalable de- 2007. DOI: 10.1103/PhysRevLett.98.020501. signs for quasiparticle-poisoning-protected topo- [10] Austin G. Fowler, Matteo Mariantoni, John M. logical quantum computation with majorana zero Martinis, and Andrew N. Cleland. Surface codes: modes. Phys. Rev. B, 95:235305, Jun 2017. DOI: Towards practical large-scale quantum computa- 10.1103/PhysRevB.95.235305. tion. Phys. Rev. A, 86:032324, Sep 2012. DOI: [21] Joel J. Wallman and Joseph Emerson. Noise tai- 10.1103/PhysRevA.86.032324. loring for scalable quantum computation via ran- [11] Emanuel Knill, Raymond Laflamme, and Woj- domized compiling. Phys. Rev. A, 94:052325, Nov ciech H. Zurek. Threshold accuracy for quan- 2016. DOI: 10.1103/PhysRevA.94.052325.

Accepted in Quantum 2017-12-23, click title to verify 9 [22] Daniel Gottesman. The heisenberg representa- [33] A. Jamiolkowski. Linear transformations which tion of quantum computers, talk at. In Inter- preserve trace and positive semidefiniteness of national Conference on Group Theoretic Methods operators. Reports on Mathematical Physics, in Physics. Citeseer, 1998. URL https://arxiv. (4):275 – 278. ISSN 0034-4877. DOI: org/abs/quant-ph/9807006. http://dx.doi.org/10.1016/0034-4877(72)90011-0. [23] Panos Aliferis, Daniel Gottesman, and John [34] Christopher J. Wood, Jacob D. Biamonte, and Preskill. Quantum accuracy threshold for con- David G. Cory. Tensor networks and graphical cal- catenated distance-3 codes. Quantum Info. Com- culus for open quantum systems. Quantum Info. put., 6(2):97–165, March 2006. ISSN 1533- Comput., 15(9-10):759–811, July 2015. ISSN 1533- 7146. URL http://dl.acm.org/citation.cfm? 7146. URL http://dl.acm.org/citation.cfm? id=2011665.2011666. id=2871422.2871425. [24] P. Oscar Boykin, Tal Mor, Matthew Pulver, Vwani Roychowdhury, and Farrokh Vatan. On universal and fault-tolerant quantum computing: A novel basis and a new constructive proof of universal- ity for shor’s basis. In Foundations of Com- puter Science, 1999. 40th Annual Symposium on, pages 486–494. IEEE, 1999. DOI: 10.1109/SF- FCS.1999.814621. [25] Raymond Laflamme, Cesar Miquel, Juan Pablo Paz, and Wojciech Hubert Zurek. Perfect quantum error correcting code. Phys. Rev. Lett., 77:198–201, Jul 1996. DOI: 10.1103/PhysRevLett.77.198. [26] David Poulin. Optimal and efficient decoding of concatenated quantum block codes. Phys. Rev. A, 74:052333, Nov 2006. DOI: 10.1103/Phys- RevA.74.052333. [27] Charles H. Bennett, David P. DiVincenzo, John A. Smolin, and William K. Wootters. Mixed- state entanglement and quantum error correction. Phys. Rev. A, 54:3824–3851, Nov 1996. DOI: 10.1103/PhysRevA.54.3824. [28] Thomas Koshy. Catalan Numbers with Ap- plications. Oxford University Press, Oxford, England, 2008. ISBN 0-19-533454-X. URL https://global.oup.com/academic/product/ catalan-numbers-with-applications-9780195334548? cc=nl&lang=en&. [29] George E Andrews, Richard Askey, and Ranjan Roy. Special functions (encyclopedia of mathemat- ics and its applications vol 71), 1999. [30] Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized bench- marking of quantum processes. Phys. Rev. Lett., 106:180504, May 2011. DOI: 10.1103/Phys- RevLett.106.180504. [31] Easwar Magesan, Jay M. Gambetta, and Joseph Emerson. Characterizing quantum gates via ran- domized benchmarking. Phys. Rev. A, 85:042311, Apr 2012. DOI: 10.1103/PhysRevA.85.042311. [32] Benjamin Rahn, Andrew C. Doherty, and Hideo Mabuchi. Exact performance of concatenated quantum codes. Phys. Rev. A, 66:032304, Sep 2002. DOI: 10.1103/PhysRevA.66.032304.

Accepted in Quantum 2017-12-23, click title to verify 10 A Error correction for input Clifford er- where σ is a permutation of {1, 2, 3, 4} that depends on rors the Clifford operation. Hence the process matrix of a Clifford channel is a permutation matrix. In this appendix we will explain why a generic n−qubit We now have all the necessary ingredients to prove Clifford error on an encoded state transforms into a log- our claim. Note that if ρ in Eq. 21 is the Bell state ical Clifford operation and a physical Pauli operation, and E acts on one half of the encoded Bell state, then upon doing stabilizer measurements. using Eq. 23, we know that φ in Eq. 22 is simply the Before proceeding, we provide a few definitions. Let ρ¯ Choi matrix corresponding to the effective projection be an encoded state of a with stabilizer channel. From Eq. 24, it follows that the process matrix (1) S, that undergoes an error described by some CPTP for the effective projection channel, denoted by Λ , is given by map E, i.e, ρ¯ 7→ E(¯ρ). Let Π0 denote the projector onto the code space and consequently Πs denote the (1)  Λ = Tr TsΠs E(Π0 · P¯i)ΠsTsΠ0P¯j projector onto the syndrome space of s. Let Ts be a ij  Pauli operation that takes a state from the syndrome = Tr E(Π0 · P¯i) · Πs · P¯j s subspace to the code space, i.e, Πs = Ts · Π0 · Ts. X X = c Λ Upon measuring the stabilizer generators to obtain a k lk l k syndrome s and applying the corresponding Ts opera- Pl∈P¯i·S Pk∈P¯j ·S tion, the noisy state can be projected back to the code X X space, = ckδl,σ(k) (26) l k Pl∈P¯i·S Pk∈P¯j ·S E(¯ρ) 7→ TsΠs E(¯ρ)ΠsTs . (21)

Since the resulting state is in the codespace, it can be where ck ∈ {+1, −1} and in the last step, we have used decoded back to a single qubit state φ, given by the fact that Λ is the process matrix of a Clifford oper- ation, Eq. 25. That Λ(1) is also a permutation matrix X  (1) φ = Tr TsΠs E(¯ρ)ΠsTs · P¯a Pa (22) follows from two properties – (i) Every row of Λ has a a unique non-zero column and (ii) every column of Λ(1) Let us denote the combined effect of the encoder, noise has a unique non-zero row. We will show (i) explicitly model, the projection to code space and the decoder by in what follows, the proof for (ii) is almost identical. 0 00 a called the effective projection. The Suppose that there are two columns j and j such that effective projection can be seen as acting directly on ρ Λij0 6= 0 and Λij00 6= 0. Along with Eq. 26, it implies ¯ ¯ to result in φ [32]. that there exists Pk0 ∈ Pj0 ·S and Pk00 ∈ Pj00 ·S such that 0 00 However, in order to extract the (single qubit or log- δl,σ(k0) = δl,σ(k00). Hence, it must be that σ(k ) = σ(k ), 0 00 ical) CPTP map defining the effective projection chan- in other words, j = j . nel, we must make use of another tool, an isomor- Hence the effective projection channel is indeed a Clif- phism between channels and states, called the Choi- ford operation, in other words, any n−qubit Clifford Jamilowski isomorphism [33, 34]. Under this isomor- operation on the physical qubits can be promoted to a phism, a single qubit CPTP channel E is mapped to a logical Clifford operation and a physical Pauli error (Ts unique bipartite quantum state J (E) called the Choi in Eq. 21), by a syndrome measurement. matrix corresponding to E, in the following manner. 1 X J (E) = E(P ) ⊗ P T (23) 4 i j i,j Furthermore, when the quantum channel is expressed as a process matrix Λ, where Λi,j = Tr (E(Pi) · Pj), where Pi,Pj ∈ {I,X,Y,Z} are Pauli matrices, it follows that T  Λij = Tr J (E) · (Pj ⊗ Pi ) . (24) Lastly, note that when E(ρ) = C · ρ · C† where C is a Clifford operation, the corresponding process matrix Λ(E) is given by †  Λ(E)ij = Tr C · Pi · C · Pj  = Tr Pσ(i) · Pj = δσ(i),j (25)

Accepted in Quantum 2017-12-23, click title to verify 11