Break-even point of the phase-flip error correcting code

In this theoretical study, we explore the use of quantum code-based memories to enhance the lifetime of qubits and exceed the break-even point, which is critical for the implementation of fault-tolerant quantum computing. Specifically, we investigate the quantum phase-flip repetition code as a quantum memory and theoretically demonstrate that it can preserve arbitrary quantum information longer than the lifetime of a single idle qubit in a dephasing-time-limited system, e.g. in semiconductor qubits. Our circuit-based analytical calculations show the efficiency of the phase-flip code as a quantum memory in the presence of relaxation, dephasing, and faulty quantum gates. Moreover, we identify the optimal repetition number of quantum error correction cycles required to reach the break-even point by considering the gate error probabilities of current platforms for quantum computing. Our results provide guidelines for developing quantum memories in semiconductor quantum devices.


I. INTRODUCTION
Quantum memory, storing qubits for a sufficiently long time, is a key ingredient of almost any application in quantum communication 1 , computing 2 , and sensing 3 .Designing long-lived quantum memories is one of the recent challenges in the field of quantum technology.It can be achieved by improving the lifetime of each physical qubit and storing the logical quantum information in a collective quantum state of multiple physical qubits.The theory of quantum error correction proves that quantum codes are promising platforms for the fault-tolerant storage of quantum information.Typical quantum memory consists of the following processes: encoding the quantum information into the quantum code, idling time, correction, and recalling the quantum state 4 .(See Fig. 1.) Recalling is the inverse process of encoding when the logical information is refocused onto one physical qubit.
A large zoo of quantum codes is applicable for quantum memory 5 .However, only a few were demonstrated experimentally, such as surface code, color code, Bacon-Shor code, and perfect code.One of the most promising platforms is the surface code because, in theory, the logical errors could be reduced by scaling up the size of the system if the physical errors are below a threshold 6,7 .Moreover, it can be realized on a 2D square grid of physical qubits with connectivity only between the neighbors.However, because of initialization, gate, and measurement errors the break-even point -i.e., preserving an arbitrary quantum state with surface code longer than a single idle qubit's lifetime -was not reached so far 8 .With other codes, such as cat code 9 and a discrete-variableencoded logical qubit 10 the break-even point has been already reached.
The quantum repetition code is not a real quantum error correction code in the sense that it cannot protect the logical information against any Pauli error.Choosing any one of two types of repetition code (bit-flip code and phase-flip code) makes the quantum information resilient against Pauli X or Z errors, but at the same time, leaves it more vulnerable to the other error type 11 .Nonetheless, mainly due to its simplicity, the repetition code is widely investigated theoretically and used for bench- FIG. 1.The schematic draw of a quantum code-based memory.In the decoding step, the initial state Ψin is entangled with a few ancillary qubits initialized in the ground state.During the idling time, every qubit is affected by the noise sources, e.g., dephasing and relaxation.After the correction, the state is recalled to one of the physical qubits.A reset of the ancilla qubits is necessary if we want to repeat this process.In many applications, the order of the recalling and correction processes is reversed.
marking state-of-the-art quantum devices [12][13][14] .Up to now, the longest repetition code, containing 25 qubits, was implemented on a superconducting platform, and it was operated as a classical memory, where the noise was exponentially suppressed by scaling up the code 8,15 .However, in the case of repetition code-based quantum memories, any single-qubit errors cannot be overcome by scaling up the system, only by combining the bit-flip and phase-flip quantum codes 16 .
The simplicity of the repetition code comes from the fact that it requires only linear connectivity between the qubits, and for the implementation, only three qubits are enough 17,18 .Thus, it was used in the first error correction experiments based on nuclear magnetic resonance 19 , ion traps 20 , superconducting circuits [21][22][23][24] , and NV-centers 25 .Furthermore, repetition code is the only error-correcting code that was realized on semiconductor qubits.Phaseflip code-based quantum memory without mid-circuit measurements was implemented in Ge-based and in Sibased spin-qubit devices, but due to the imperfection of the gates, the lifetime of the logical qubit was smaller than the lifetime of an idle physical qubit 26,27 .
In this work, we aim to analytically determine the parameter regime (gate error, relaxation T 1 , and dephasing T * 2 ), where the repetition code-based quantum memory beats the break-even point.According to our results, it can be achieved by applying phase-flip repetition code in a dephasing time-limited system (T 1 > 2T * 2 ) if the gate errors are below a certain threshold.This result is a generalization of an earlier work, where only relaxation was taken into account 28 .We analytically study how the qubit's lifetime can be increased by repeating the quantum memory cycle sketched in Fig. 1.The investigated quantum circuit, shown in Fig. 2, contains no mid-circuit measurements and it is composed of 1qubit and controlled-NOT gates, or it is composed of 1qubit, controlled-Z, and controlled-S −1 gates motivated by semiconducting hardware.
The rest of the paper is arranged as follows.In Sec.II, we briefly review the bit-flip and phase-flip repetition codes.The applied analytical methods based on densitymatrix calculation are described in Sec.III.The breakeven point of the repetition code is determined without gate errors in Sec.IV and with gate errors in Sec.V.The paper is enclosed with concluding remarks related to recent experiments in Sec.VI.

II. REPETITION CODE
This chapter briefly introduces the two kinds of threequbit repetition codes, the bit-flip and the phase-flip repetition codes.In these, three physical qubits are used to encode the logical qubit, so that we can detect and correct one bit-flip or one phase-flip error, respectively.First, we discuss the bit-flip repetition code and then compare it with the phase-flip repetition code.
In the case of the bit-flip repetition code, the logical information |Ψ in = α|0 + β|1 is encoded as |Ψ = α|000 + β|111 , where |000 (|111 ) means the productstate of three qubits, all being in the ground state |0 (excited state |1 ).Bit-flips are detected by measuring the parity of the neighboring physical qubits.For this purpose, we perform projective measurement with the stabilizer operators Z 1 Z 2 and Z 2 Z 3 , where Pauli-Z operator Z i is acting on the i-th physical qubit.Applying a majority-vote decoder on measurement outcomes, called error syndromes, one bit-flip error is corrected by acting with an X gate on the faulty qubit chosen by the decoder.After the correction, the qubit is returned to the codespace then, as a final step, the information is recalled from the encoded state.
Two or more bit-flip errors cannot be corrected in the three-qubit repetition code.However, the logical state still becomes more robust to bit-flip errors.On the other hand, this code cannot detect phase-flip errors, and because of the encoding, more qubits are exposed to its harmful effects, thus in bit-flip code, the logical qubit is more vulnerable to phase-flip errors.
Realizing projective measurement with the stabilizers requires two extra ancilla qubits.Moreover, from an experimental point of view, measurements are the most time-consuming and faulty steps in quantum error correction schemes.Therefore, these mid-circuit measure- ments are sometimes replaced by a three-qubit Toffoli gate.Toffoli gates have already been realized by resonant driving 27,29 , but even in some recent experiments, it has been composed of single-qubit and two-qubit gates 26 .
In the phase flip repetition code, the initial state Ψ in is encoded as |Ψ = α| − −− + β| + ++ , where |± = 1 √ 2 (|0 ± |1 ).Compared with bit-flip code, the role of Pauli-X and Pauli-Z operators are exchanged, then in phase-flip repetition code, we can correct one phase-flip (Z error) by measuring with the stabilizer X 1 X 2 and X 2 X 3 .The bit-flip code is converted to phase-flip code by acting on every qubit with Hadamard gates before and after transmission through the error channel.
The quantum circuit of the repetition code-based quantum memory is realized in the following way: (1) initially, one qubit holds the information, while the two other ancilla qubits are in their ground state; (2) for the encoding two CNOT gates are applied; (3) only in case of phase-flip code Hadamard-gates are acting on every qubit; (4) errors are acting during the idling time; (5)  only in case of phase-flip code Hadamard-gates are acting on every qubit; (6) two other CNOT gates for the recalling; (7) Toffoli gate for the error correction.
The circuit diagram of the phase-flip repetition code is plotted in Fig. 2a and b, composed of 1-qubit gates and CNOT gates.This decomposition is motivated by experimental platforms, where CNOT gates are easy to implement between any two of the three physical qubits used for the repetition code.For the bit-flip code, one should omit the Hadamard gates in Fig. 2a.In Fig. 2c  and d, we show the experimental realization of phase flip code composed of 1-qubit, controlled-Z, and controlled-S −1 gates recently used on semiconducting hardware 26 .In our analytical calculation, we will use these two different decompositions of the phase-flip repetition code.

III. METHOD: DENSITY-MATRIX CALCULATION
Density-matrix description is a useful tool for handling small quantum systems, such as repetition codes 30,31 , because of the following advantages.(i) We can easily take into account any noise channel described by Kraus operators without any simplification, e.g., Pauli-twirling approximation 32,33 .(ii) Instead of performing projective measurements and sampling the outcome at the end of each quantum error correction cycle, we derive the density matrix and directly extract the probability density of the measurement from it.(iii) This simulation method opens up the possibility of deriving analytical formulas, for example, for the fidelity of repetition-code-based quantum memories.
This chapter shows how to build the density matrix calculation for the quantum error correction circuits shown in Fig. 2. We consider two kinds of errors: independent qubit errors during the idling time and faulty gates.We neglect other potential noise sources.Thus, for example, we assume perfect initialization and reset.
During the idling time, t idle the qubits are coupled to the environment, which is usually modeled by amplitude and phase damping channels characterized by the relaxation time T 1 and dephasing time T * 2 , respectively.These noisy single-qubit quantum channels are described by a density-matrix evolution: where E k Kraus-operators are chosen in the following way 34 : The parameters in the Kraus operators have the form γ = 1 − e −t idle /T1 , α = 1 − e −2t idle /T * 2 .Going through the error channel the density matrix of a single qubit is transformed as where Pure dephasing (T 1 = 0, T * 2 = final) is an asymmetric depolarization channel where the qubit suffers from a simple Pauli-Z error.However, relaxation, where amplitude damping always goes together with dephasing, cannot be exactly captured by the asymmetric depolarization channel.Therefore, it is usually approximated by the Pauli twirling, with which the relaxation is decomposed into the sum of Pauli X, Y and Z channels 34 .In our work, we use the exact time evolution instead of the Pauli twirling approximation.
The error channel of the faulty gates is taken into account by the depolarizing error model, which is parameterized by the probability p 1 for the single-qubit gates and p 2 for the two-qubit gates.In the case of a single qubit depolarizing channel, after every single-qubit gate the density matrix is mapped as where I 2 is a 2 × 2 identity matrix.The Kraus decomposition of this transformation is given by the following four Kraus operators, Z .Two-qubit faulty gates are defined by similar transformations after every two-qubit gates The Kraus decomposition of this two-qubit channel is given by sixteen Kraus operators, 15 XX, . . ., p2 15 ZZ , where the tensor products of the Pauli-matrices {I 2 , X, Y, Z} have appeared.The first (second) Pauli-matrix in the Krausoperator is acting on the first (second) output of the twoqubit quantum gate.No Pauli-matrix is acting on the qubit, which was not involved in the two-qubit operation.
The use of the depolarizing channel for faulty gates is a simplifying assumption, but it is widely used in simulations and theoretical analyses because it keeps low the number of parameters in the calculation.
Here, the quantum error correction cycle operates as a quantum memory, therefore, the longest step in Fig. 1 is the idling time t idle between the encoding and the correction.Based on this, gate operation times are neglected, and the length of the quantum error correction cycle is assumed to be t idle .If we repeat the error correction cycles N times, then the total storage time is t tot = N t idle .We will investigate this repetition with and without the reset of the ancilla qubits.In the case of the former one, after the recalling and correction, the two ancilla qubits are instantaneously set to their ground state, which can experimentally be achieved by using two new, already relaxed ancilla qubits.If there is no reset of the ancilla qubits, then the outcome of the error correction cycle will be the three-qubit input state of the next cycle.In our scheme, encoding, and recalling must be done in every round.
At the end of the quantum information storage procedure, we trace over the degrees of freedom of the ancilla qubits and obtain a 2 × 2 density matrix ρ out .The efficiency of the quantum memory is characterized by the fidelity, which measures the closeness of the initial state Ψ in and the output density matrix ρ out in the following way, F = Ψ in |ρ out |Ψ in .It depends on the initial state, and we want to store arbitrary quantum states.Therefore the fidelity is integrated over the Bloch sphere to calculate the average of the fidelity The average fidelity F is a simple quantity to characterize the accuracy of the quantum storage, hence the main goal of this paper is to calculate it for different quantum codebased memories as a function of relaxation and dephasing time, gate errors, idling time, and the number of error correction cycles.

IV. BREAK-EVEN POINT -WITHOUT GATE ERROR
To determine the parameter range required for reaching the break-even point, we need to compare the accuracy of a quantum code-based memory and a single idle qubit.Hence, first of all, we calculate the average fidelity of a single qubit suffering from decoherence and relaxation for a time t idle , This is the same formula as Eq.(1) in Ref. 35.In this chapter, the main goal is to calculate the average fidelity without gate errors (p 1 = p 2 = 0) for a bit-flip and a phase-flip repetition code-based quantum memory, F bit and F phase , respectively, and compare these values with F idle .The definition of beating the break-even point is that the condition F bit/phase > F idle is fulfilled for a certain storage time.
After one cycle of the error correction in a three-qubit bit-flip repetition code model, the average fidelity is given by the formula For arbitrary values of storage, relaxation, and dephasing time, F bit is always smaller or equal to F idle , hence the break-even point cannot be reached by the bit-flip code.The qualitative understating of this statement is the following, a bit-flip code cannot correct pure dephasing (Pauli-Z) error.Relaxation is approximately a combination of Pauli-X, Y and Z errors, and only the first 3.The size of the phase-flip repetition code giving the largest fidelity after one cycle of error correction as well as three iso-fidelity contours as a function of relaxation and idling times in units of T * 2 .Gate errors are neglected.For n = 1 (white region) the idle qubit gives better fidelity than a quantum code.In a dephasing-time limited system (T1 > 2T * 2 ) if the idling time is shorter than a threshold value (colorful region) then the break-even point is beaten.
of them, the Pauli-X error is mitigated, meanwhile, the information becomes more vulnerable to the Pauli-Z error.As a consequence, the lifetime of a qubit cannot be enhanced by a bit-flip repetition code, therefore further on, we focus on only the phase-flip repetition codes.
After one cycle of 3-qubit phase flip code-based quantum error correction, the average fidelity is decreased as This value is larger than F idle , if T 1 > 2T * 2 and the storage time t idle is below a threshold value.This statement is visualized in Fig. 3, the white region shows the parameter range, where the single qubit performs better F idle > F phase , while in the colorful region (yelloworange-purple-black) the quantum code performs better The phase-flip repetition code mitigates (amplifies) the fidelity reduction due to the pure dephasing (relaxation), therefore, the break-even point is beaten only in a dephasing-time limited system, where T 1 > 2T * 2 .In the rest of the paper, we focus on the 3-qubit repetition codes, but now in this single paragraph, we investigate longer ones.In an n-qubit phase-flip code, where n is an odd number, the logical information is encoded via the superposition of collective states of n qubits , all being in the state |+ or all being in the state |− .After the measurement with the stabilizer operators, which are products of two Pauli-X operators acting on the neigh-boring qubits, we can detect and also correct (n − 1)/2 phase-flip errors.Calculation of the average fidelity after one cycle of the error correction using n-qubit phase-flip repetition code is analytically tractable and leads to the following Substituting n = 1 and n = 3 into this formula, we get back Eq. ( 8) and Eq. ( 10), respectively.The dephasing error can be overcome by scaling up the system, but the relaxation error cannot, in fact, relaxation causes an increasingly harmful effect.Therefore, a finite-size phaseflip code is an optimal choice if we would like to maximize the fidelity.According to Eq. ( 11), in Fig. 3 we plot the length of the optimal phase-flip code as well as three isofidelity contours as a function of relaxation and idling times.It is worth choosing phase-flip codes longer than three only if T 1 T * 2 .If we would like to store the quantum information for a time t tot , then we can execute one error correction cycle as it was discussed so far in this chapter, or we can repeat the cycles N times one after another.Assuming uniform time step, every cycle has a duration t tot /N .Repetition is executed with or without the reset of the ancilla qubits between the error correction cycles.In the former case, the values of two ancilla qubits are instantaneously reset to their original ground state.The average fidelity after N rounds of the error correction reads It can be proven that F reset phase (N ) is a monotonically increasing function of N .Therefore, in this simple model, where gate errors are neglected, the lifetime of the logical qubit in a phase-flip code-based quantum memory can be enhanced by increasing the number of error correction cycles.If we repeat the cycles infinitely many times, the errors due to the pure dephasing disappear, however, the fidelity lim is decreasing in time because of the relaxation.
In the other case, we repeat the cycles without resetting the ancilla qubits.It means, that the 3-qubit outgoing state of an error correction cycle will be the initial state of the next one.Only for clarification, we note, that the ancilla qubits are not measured in our scheme.The average fidelity after two cycles of error correction with total time t tot reads and it is always smaller than Eq. ( 10), which is the average fidelity after one cycle with the same storage time.This result implies, that even without gate errors, it is not worthwhile to repeat the error correction cycles if we are not capable of resetting the ancilla qubits.

V. BREAK-EVEN POINT -WITH GATE ERROR
In this chapter, we calculate the average fidelity in the presence of gate errors.These results depend on the gate decomposition of the error correction cycles, therefore, we choose two special ones which are investigated further on.These two quantum circuits, the CNOT-based and the CS-CZ-based have already been introduced in Fig. 2.
We assume that the gate errors are small, {p 1 , p 2 } 1, therefore the drop in the fidelity is linearized in the variables of p 1 and p 2 .The average fidelity after one error correction cycle reads as where the fidelity without gate errors F phase is formulated in Eq. ( 10), furthermore, f 1 is slightly different for the CNOT-based quantum circuit and for the CS-CZ-based quantum circuit Surprisingly, the prefactor of the two-qubit gate error is the same for the two realizations.If the relaxation and dephasing errors are negligible, the fidelity is dropped by 184p 2 /45 due to the faulty two-qubit gates and dropped by 10p 1 /3 or 40p 1 /9 due to the faulty single-qubit gates in the case of CNOT-based or in the case of CS-CZ-based quantum circuit, respectively.The gate errors (p 1 , p 2 ) required to reach the break-even point can be determined for any parameter point of the colored region in Fig. 3 by fulfilling the inequality F error phase > F idle .It was shown in the previous section, that in the case of perfect gates and reset, the fidelity can be maximized by repeating the error correction cycles as often as possible.These changes due to gate errors, and a finite number of repetitions is the optimal choice, which is demonstrated in Fig. 4, where the number of error correction cycles for the maximal fidelity as well as three iso-fidelity contours are plotted as the function of the relaxation time and the two-qubit gate errors for storage time t tot = 0.1T * 2 in figure a, and t tot = T * 2 in figure b.In the experiments, typically the two-qubit gate error exceeds the single-qubit gate error, therefore, in these plots we assume perfect single-qubit gates p 1 = 0.The parameter range where the single idle qubit is an optimal choice against the phase-flip code-based quantum memory is colored white.In the colorful region, the break-even point is beaten, and it is worthwhile to repeat cycles more often if the two-qubit gate errors can be reduced.

VI. DISCUSSION
In this chapter, we discuss the relevance of the abovederived analytical results in light of current experiments.Recently developed quantum processing units with the largest qubit numbers utilize superconducting architectures, and therefore, first we discuss the performance of the phase-flip code-based quantum memory on these platforms.In Table I we collect the mean value of relaxation and decoherence times, and we calculate the pure dephasing times from them according to Eq. ( 4) for a few superconducting quantum processors.In these systems, the qubit lifetime is limited by the relaxation because the T 1 relaxation time is shorter or approximately the same as the pure dephasing time T * 2 .Except for the ibm jakarta, all the other quantum chips do not fit the condition T 1 > 2T * 2 required to reach the break-even point.In the case of the ibm jakarta, if the waiting time t idle is smaller than 11 µs and the gates are perfect, then F idle < F phase .However, due to the imperfect operations, the mean CNOT error is around 8 • 10 −3 for ibm jakarta 36 , hence we cannot demonstrate the breakeven point.In conclusion, these superconducting quantum chips are unsuitable platforms for implementing an efficient phase-flip code-based quantum memory.The lifetime of qubits in semiconductor quantum devices is typically limited by the dephasing, and not by the relaxation, i.e., T 1 T * 2 as shown in Table II.Dephasing time is mitigated by a Hahn-echo experiment, which technique is also compatible with the quantum memory scheme.In this case, an inverse pulse is applied in the middle of the idling time.Even after the Hahn-echo experiment T 1 T Hahn

2
, therefore semiconductor quantum devices are promising platforms to demonstrate the efficiency of the phase-flip code-based quantum memory.After substituting Eqs. ( 8), ( 10), ( 15), (17), and (18) into the inequality F idle < F error phase we define the range of the single-and two-qubit gate errors for which the break-even point is reached.For example, after an idling time t idle = 0.1T Hahn 2 , the fidelity of a single idle qubit is dropped to 0.97.It is enhanced by one cycle of error correction with phase-flip code if the single-and twoqubit gate errors satisfy the condition p 2 < 0.0067 − 1.1p 1 .
Similarly, after an idling time t idle = T Hahn 2 , which is a time 40 µs and 4 µs in experiments [27] and [26], respectively, the fidelity of a single idle qubit is dropped to 0.79.It is enhanced by one cycle of error correction with phase-flip code if We should note that these calculations are valid for the experiments [26], but give only a rough estimation for the experiment [27], because there the Toffoli gate was implemented by resonant driving and not by the decomposition into single-and two-qubit gates.It is also worth noticing that our analytical results are accurate if the idling time is much larger than the time duration of the gate sequence, which is around 0.5-1 µs in both experiments.According to Eq. ( 20), gate errors of around 1-2% are required to demonstrate the break-even point with a phase-flip code.

VII. SUMMARY
To summarize, we collect all the necessary ingredients to hit the break-even point with a repetition code-based quantum memory.
• Apply on a dephasing time-limited platform, where • The idling time should be below a threshold value, as it is shown in Fig. 3.
• The gate errors should be below a threshold value, but the exact condition depends on the gate decomposition of the code.For two kinds of decomposition, the fidelity was analytically calculated in Eqs.(15) to (20).
• Repeat the error correction cycles only if you can reset the ancilla qubits.The optimal number of repetitions depends on the gate errors, as shown in Fig. 4.
We envision that our results will foster the design and interpretation of future experiments on repetition codebased quantum memories.

FIG. 2 .
FIG. 2. Quantum circuit of the phase-flip repetition code.(a) and (b), it is decomposed of 1-qubit gates and CNOT gates.(c) and (d), it is decomposed of 1-qubit gates, controlled-Z, and controlled-S −1 gates FIG.3.The size of the phase-flip repetition code giving the largest fidelity after one cycle of error correction as well as three iso-fidelity contours as a function of relaxation and idling times in units of T * 2 .Gate errors are neglected.For n = 1 (white region) the idle qubit gives better fidelity than a quantum code.In a dephasing-time limited system (T1 > 2T *2 ) if the idling time is shorter than a threshold value (colorful region) then the break-even point is beaten.

4 FIG. 4 .
FIG.4.The optimal number of the error correction cycles in a phase-flip code-based quantum memory as well as three isofidelity contours as a function of the relaxation time and the two-qubit gate error.Single-qubit gate errors are neglected p1 = 0.For N = 0 (white region) the idle qubit gives better fidelity than a quantum code.The colored region (yelloworange-purple-black) shows the parameter range where the break-even point is reached.Black color means that the optimal number of repetitions is four or more.In Fig. a) the storage time is ttot = 0.1T * 2 , while in Fig. b) it is ttot = T * 2 .

TABLE II .
The relaxation, pure dephasing and spin-echo dephasing times for a few semiconductor quantum devices.Phase-flip code has already been implemented on the 3-qubit Si and 4-qubit Ge devices.