Dissipative quantum error correction and application to quantum sensing with trapped ions

Quantum-enhanced measurements hold the promise to improve high-precision sensing ranging from the definition of time standards to the determination of fundamental constants of nature. However, quantum sensors lose their sensitivity in the presence of noise. To protect them, the use of quantum error-correcting codes has been proposed. Trapped ions are an excellent technological platform for both quantum sensing and quantum error correction. Here we present a quantum error correction scheme that harnesses dissipation to stabilize a trapped-ion qubit. In our approach, always-on couplings to an engineered environment protect the qubit against spin-flips or phase-flips. Our dissipative error correction scheme operates in a continuous manner without the need to perform measurements or feedback operations. We show that the resulting enhanced coherence time translates into a significantly enhanced precision for quantum measurements. Our work constitutes a stepping stone towards the paradigm of self-correcting quantum information processing.


Supplementary Note 1 -Correction of other types of errors
In the following we discuss the generalization of our scheme to other types of errors. We start by discussing correlated spin-flips. Then we generalize the scheme to individual phase-flips, and finally explain how to correct for collective dephasing.

Correlated spin-flips
The correction of the error syndromes σ (1) x , σ (2) x , and σ (3) x we have discussed in the main text does not interfere with each other and is performed using separate cooling resources. Instead of targeting individual errors, our scheme can as well be formulated to correct for correlated errors, such as, e.g., collective spin-flips, L x = L (1) x + L (2) x + L (3) x = Γ X (σ (1) x + σ (2) x + σ (3) x ).
(2) |ψ can be restored by the single-qubit correcting operators in equations (6)- (8). In this case, however, a simpler strategy is to engineer a single correcting operator L x,qec = L (1) x,qec + L (2) x,qec + L (3) x,qec , which is given by the sum of the operators in equations (6)- (8). We implement this interaction by replacing the individual mapping from single ions onto single auxiliary modes in equation (13) by a collective mapping of all ions onto a single auxiliary mode c, using the coupling In the presence of only correlated noise, this approach is preferable since it reduces the required resources compared to realizing three operators. If both types, uncorrelated and correlated errors are present, the operations in equations (6)- (8) for the correction of uncorrelated errors suffice for the correction of both.

Phase errors and collective dephasing
Instead of correcting for spin errors, our scheme can as well be formulated to correct for phase errors where σ (j) z = |0 j 0| − |1 j 1| applies a phase change to qubit j. To correct such errors we make the replacements |0 → |+ = (|0 + |1 )/ √ 2, |1 → |− = (|0 − |1 )/ √ 2 throughout the protocol. Our codeword is then with a correction rate Γ qec for every single error. The operators are identical to the ones in equations (6)-(8) when making the above replacements. Experimentally, these modified operators can be realized by making similar replacements in all involved Hamiltonians. This can be achieved by a suitable combination of coupling lasers. Another experimentally common error is correlated phase noise, or, collective dephasing. It is described by a single jump operator which causes a decay from |ψ z to the single-error state To correct for this error, we use a coupling to a single auxiliary mode, This realizes the jump operator with the single-qubit correcting operators in Supplementary Equations (8)- (10).

Supplementary Note 2 -Analysis
In this Supplementary Note we provide a detailed analysis of the presented scheme. We derive analytical expressions for the effective rates in the system and provide a numerical comparison to the full dynamics. Considering a simplified rate equation model we assess the performance of the scheme and determine the optimal parameters of the scheme analytically.

Effective open system dynamics
Following the procedure of the effective operator formalism [1], we set up the non-Hermitian Hamiltonian H NH = H e − iL † eng L eng /2 describing the dynamics in the single-excitation manifold (higher excitations are neglected). It is of block-diagonal form Each of the blocks H NH,|φ |1 f contains a single motionally excited state |φ |1 f , where |φ can be any ground state of the system ions and f ∈ {a, b} denotes the motional mode. For example, is needed for the correction of a single error on qubit 1, participates in the undesired decay of |100 , and mediates the undesired decay from |111 . The non-Hermitian Hamiltonian is formulated in terms of complex detunings∆ = ∆ − iκ eng /2 − iγ m /2 andδ = δ − iκ r /2, where γ m (κ r ) accounts for potential finite lifetime of the excited levels (motional modes used for interrogation). Inversion of the blocks of the non-Hermitian Hamiltonian yields, e.g., with effective detunings and couplings∆ By our choice of ∆ = δ = G and the assumption κ eng γ m , κ r , we engineer the effective detuning involved in the correction mechanism to be small and only limited by the linewidth due to the engineered cooling, In contrast, the terms with n = 1, i.e.,∆ n,eff ≈ (n − 1)G, are chosen to be large to render the undesired processes weak. We identify the driving fields with the perturbative couplings between ground and excited subspaces, H drive,Ω = V + + V − , where V + is the part responsible for the excitation out of the ground subspace. We obtain the effective jump operators [1] Here, P n0=n (P n1=n ) denote projectors onto all ground states with n atoms in state |0 (|1 ). The decay rates of the effective processes are given by For the parameters at hand we obtain Here, κ eff,1 is the effective decay rate from the single-error states to the logical subspace containing the codeword and κ eff,2/3 are intrinsic loss rates: κ eff,2 is the leakage rate from the single-error states to the double-error states and κ eff,3 is a decay rate from the logical states to the single-error states. Comparing Supplementary Equation (26) with equation (9), thereby identifying Γ qec = κ eff,1 , we conclude that we have engineered the desired correction operators up to small terms O(κ eng Ω 2 /G 2 ) acting on manifolds other than the single-error subspace. In addition to the effective decays considered so far, the effective operator formalism [1] also contains an effective Hamiltonian H eff , which in the case at hand is found to only contain minor Stark shifts.

Strong driving effects
It should be noted that the above expressions are obtained by means of a perturbative formalism, and are thus only correct for Ω κ eng . Numerical optimization shows, however, that the scheme is more effective for Ω ∼ κ eng because this allows for faster correction of errors (cf. Ref. [2]). We therefore include two strong driving effects: Power broadening and population of the excited states. Power broadening is relevant for the linewidth-limited process leading to κ eff,1 . Including it is easily achieved by replacing the bare linewidth of the excited states that mediate the correction of the single-error states, κ eng , by a broadened one, κ eng + 2Ω 2 /κ eng , which can be justified using adiabatic elimination [2]. We find for the preparation rate. While considering a simple two-level model would yield r = 2 [2], the numerics in the case at hand turn out to be more accurate for r ≈ 2.5. This can be understood from further excited levels coupled by the drive. The error rates in Supplementary Equations (29)-(30) remain effectively unchanged by power broadening (under the reasonable assumption of Ω G). Secondly, we need to take into account that due to the increased driving, part of the population resides in the excited state manifold, which we previously eliminated. The main contribution to this steady population comes from the off-resonant excitation of the codeword. The effect can be taken into account by replacing the fidelity of the codeword F by (1 − f e )F , where the excited fraction f e is estimated to be [2]: Here the expression ( √ 3 ± 1) 2 G 2 has its origin in the energies ± √ 3G of the dressed states off-resonantly excited by the drives with detunings G.

Numerical results and comparison of the methods
We simulate the evolution due to the effective operators in Supplementary Equation (26), taking into account the strong driving effects in Supplementary Equations (31) and (32). The results after parameter optimization assuming sideband couplings G/Γ = 500 -10000 are presented in Supplementary Figure 1. We plot them together with the result from a simulation of the full master equation in equation (23) truncated to a single excitation. We find that the effective dynamics agrees well with the full dynamics.
It can be seen that for G/Γ = 1000 and higher, substantial improvement is obtained compared to the unprotected single-qubit case.

Rate equation model
We reduce the complexity of the model further by reducing the effective dynamics to a system of rate equations. Here, we consider three subspaces: The logical subspace, with population P l , is comprised by the manifold of encoded states |ψ = (c 0 |000 + c 1 |111 )/ √ 2. The correctable subspace, with population P c , contains the states where one error has occurred, |ψ (j) . States where more than one qubit has been flipped form the subspace of uncorrectable states, P u . The described partitioning is possible due to the fact that the decay rates between the states of the considered subspaces are identical: all |ψ (j) decay to |ψ with κ eff,1 , and |ψ decays to |ψ (j) with κ eff, 3 . In our analysis, we assume that we operate in the regime where G Γ . This means that the dominant effect which limits the driving is the reduction of the pumping strength in Supplementary Equation (31), and we do not need to consider the population in the excited states. We also note that our simplified model does not capture Supplementary Figure 2. Rate equation model. The dynamics can be described by three subspaces and the decay rates between them. The logical subspace (population P l ) contains the codeword |ψ . It decays to the correctable subspace (Pc) with the single-error states |ψ (j) (j = 1, 2, 3) at a rate Γerr. The error correction restores the logical subspace with a rate Γqec. The single-error subspace decays to the subspace of uncorrectable states that contain more than one error (with population Pu) at a rate Γ leak . the steady state fidelities lim t→∞ F (t) > 0. This is however of less concern here, where we are mainly interested in conditions for achieving a high fidelity. With the above assumptions we obtain a system of coupled differential equations, with rates Γ err = 3(Γ + κ eff,3 ), Γ qec = κ eff,1 (neglecting that random spin-flips at a rate Γ can also lead back to the desired state), and Γ leak = 2(Γ + κ eff,2 ). The subspaces and transition rates are illustrated in Supplementary Figure 2. Solving for P l (t) under the initial condition that P l (0) = 1 yields The evolution of the logical population is thus dominated by two exponential decays, a fast one with the rate where Γ total = Γ qec + Γ err + Γ leak and a slow one with rate For intermediate times 1/Γ f t ∼ 1/Γ , the exponential decays appear linear, as seen in Supplementary Figure 1. The two timescales Γ f and Γ s thus generate the characteristic "hockey stick" form of the curve that can be seen from Fig. 5. Assuming the drop due to Γ f to be faster than the timescale of interest, we can simplify Supplementary Equation (36) to In this simplified model, the evolution is described by the two quantities: Here E 0 denotes the static error of the scheme that arises at approximately t = 0, when the scheme is switched on. The physical explanation for this initial drop is that P c and P l come to equilibrium fast and then population slowly leaks from this coupled subspace. Alternatively it can be understood from the fact that it takes a certain time to pump back after a spin-flip. The effective decay rate Γ eff , previously Γ s , is the slow effective decay rate of the codeword when it is protected by the error correction scheme.

Minimization of the error and the decay rate
Using the solution of the rate equation model, we can optimize the fidelity F = P l (t) in Supplementary Equation (39) at a given time t by the choice of available parameters κ eng and Ω . For that we need to fulfill the condition: for x ∈ {κ eng , Ω 2 }. For the derivatives we have By setting these derivatives to zero and comparing Supplementary Equations (43) and (44), and (45) for x = κ and x = Ω 2 , we find that where, in the second step, we have used r = 2.5. To solve for κ eng,opt , we make an ansatz κ eng,opt Ω 2 opt = αΓ G 2 With this, Supplementary Equation (42) can be written as where τ A = Aτ eff with A = (1 − E 0 )/E 0 and τ eff = Γ eff t. From this we derive the condition Note that we neglected one solution because of the requirement α > 0. The optimal decay rate is then given by Finally, this leads to the optimal static error and effective decay rate of the form with the numeric prefactors β E and β Γ being given by β Γ (τ A ) = 9 32 (16 + α)(4 + α) β 2 4α We thus find that the optimal parameters depend on the operation time of the protocol. Here, we regard two limiting cases: First, we consider the long-time limit where τ A 1. This corresponds to optimizing Γ eff under the assumption that Γ eff t E 0 . This yields α ∞ ≈ 4(3 √ 5 − 5)/5 ≈ 1.4 and thereby results in an optimal decay rate κ eng,opt ≈ 1.2 √ Γ G 2 . For the correction rate, we obtain Γ qec = 2κ/(3β) ≈ 0.3 3 √ Γ G 2 , for the error and leakage rates Γ err ≈ 3.3 Γ and Γ leak ≈ 2.7 Γ . For the prefactors in Supplementary Equations (50)-(51) we thus find β E ≈ 10 and β Γ ≈ 22.
Alternatively, the protocol can be optimized for short operation times, τ A → 0. Here, minimizing the initial drop E 0 requires a stronger correction rate, and thus, higher κ eng , at the expense of a higher leakage rate. We obtain α 0 = 8, resulting in Γ G 2 , Γ err = 9/2 Γ , and Γ leak = 6 Γ . This yields the coefficients β E ≈ 8 and β Γ = 47. The reduction of the initial drop by this parameter choice is therefore not very pronounced (β E = 8 vs. β = 10), whereas the slope of the effective decay is strongly increased (β Γ = 22 vs. β Γ = 47). The optimization for τ A 1 hence constitutes the better choice and is used for the metrology application.
The above findings for κ eng,opt in the long-time limit are in good agreement with the numerical optimization of this parameter from the truncated dynamics which fulfills τ A 1. Using β = 2.5, the optimal driving strength in Supplementary Equation (46) is, however, slightly stronger than the result obtained from the numerical optimization, where we find Ω opt ≈ 4κ eng,opt /5. This is due to the fact that we ignored the population in the excited states: This amounts to about 4 − 7% at t = 1/Γ for typical parameters and would thus yield a smaller value for Ω opt . The resulting discrepancy vanishes, however, in the limit of large G/Γ . Supplementary Note 3 -Application to quantum metrology: Extension to N log logical qubits Here we consider an extension of the metrology scheme discussed in the main text to N log logical qubits, using a segmented trap [3,4]. In this setup, groups of three ions constitute logical qubits that are trapped in separate trap segments. For sufficiently high potential barriers separating the ion triples, the motional modes associated with the different logical qubits can be assumed to be independent. The Ramsey sequence explained in the main text can be straightforwardly generalized to this setting, as explained in the following.
Ramsey scheme using a product state of N log logical qubits: (i) Starting from the initial state |0 (ii) During the Ramsey waiting time of duration τ R , each logical qubit state picks up a relative phase φ(τ R ) = 3ωτ R , such that |ψ(τ R ) = (|000 + e −i3ωτR |111 )/ √ 2 ⊗N log .
(iv) For each logical qubit (i.e. for each trap segment), a measurement on one of the three physical qubits is performed in the σ z basis. For each ion triple, the probability to detect the first (or any other) qubit in state |1 is given by P 1 = cos 2 (3ωτ R /2), which allows one to determine the phase φ(τ R ) and therefore the signal strength ω.
In the ideal case, the sensitivity of this measurement 1 is given by |δω| = 1/(3 N log τ R T ), where T = n runs τ R is the total measurement time. As described in the main text, the dependence of the measurement precision |δω| on the Ramsey time τ R changes in the presence of noise. The limitations due to transversal noise can be mitigated by applying our quantum error correction scheme. Since the protocol is applied for each trap segment individually, the results discussed in the main text generalize directly to the setting involving N log logical qubits.
We note that the three-qubit Ramsey pulses in step (iii) of the scheme can be replaced by individual pulses that act on each physical qubit separately, The phase φ(τ R ) and therefore the signal strength ω can then be inferred by measuring the parity operator P z = σ z for each logical qubit (which can be implemented straightforwardly by measuring the state of each individual qubit in the σ z -basis). In the ideal case, the sensitivity of this modified scheme is also given by |δω| = 1/(3 N log τ R T ).
The Ramsey sequence described above does not yield a quantum enhancement of the scaling of the measurement precision |δω| with the number of logical qubits N log since the logical qubits remain in a product state throughout the measurement sequence. To conclude this section, we consider an alternative setting where collective effects with respect to the logical qubits play a role and where quantum error correction allows one in principle to perform Heisenberg limited precision measurements even in the presence of noise. This setting is conceptually interesting even though its applicability may be limited in practice. More specifically, we consider the following Ramsey sequence assuming a trap with adjustable segmentation.
Ramsey scheme using N log entangled logical qubits: (i) The ions are initially held in an unsegmented trap and couple to a common motional mode which allows one to apply a global Ramsey pulse transforming the initial state |0 (ii) After the first Ramsey pulse, potential barriers are ramped up which divide the trap into N log independent trap segments that each contain a logical qubit. This segmentation into sets of three ions is kept during the whole Ramsey waiting period τ R and the quantum error correction scheme is applied for each segment individually. Ideally, the relative phase acquired during the Ramsey waiting time results in |ψ(τ R ) = (|0 ⊗3N + e −i3N log ωτR |1 ⊗3N )/ √ 2.
(iii) After the Ramsey waiting period, the potential barriers of the trap are ramped down such that the ions share again a motional mode that can be used to perform a second global Ramsey pulse resulting in the state |ψ (τ R ) = cos(3N log ωτ R /2)|1 ⊗3N log + i sin(3N log ωτ R /2)|0 ⊗3N log .
(iv) As last step, one of the 3N log qubits is measured in the σ z basis.
In the absence of imperfections, the sensitivity is given by , where the N = 3N log is the number of ions.
If we consider a situation involving only the signal Hamiltonian and spin-flips at a rate Γ (in the absence of error correction), the measurement precision drops to √ T |δω| = cΓ 1/6 /N 5/6 , where c is a numerical constant that depends on the estimated parameter ω (see [5,6]). If a continuous three-qubit repetition code is operated in the strong correction regime where the correction rate Γ qec is much larger than the spin-flip rate Γ , the dynamics can be described in terms of logical qubits that undergo logical spin-flips |000 ↔ |111 at a reduced rate Γ L . In this regime, the population of states involving one or two single-qubit spin-flips becomes negligible [7]. As a result, the achievable measurement precision is given by By scaling up the correction rate with the number of qubits such that ∝ N −1/6 , the measurement precision of the scheme is Heisenberg limited (up to a maximum number of logical qubits N log,max that is determined by the maximum achievable error correction rate). While it is conceptually interesting that the Heisenberg scaling can be restored in principle, experimental imperfections will considerably limit its applicability. Still, the Ramsey scheme based on a product state of N log logical qubits described above is likely to be of higher practical value for current quantum hardware. We note that the N -qubit Ramsey pulse in step (iii) of the Heisenberg limited measurement scheme described above can be replaced by pulses that act on each logical qubit separately |0 L → (|0 In this case, a measurement of the logical parity operator P zL = σ (which can be realized by measuring the states of all physical qubits locally in the σ z -basis) allows ideally also for a Heisenberg limited measurement of of the signal strength ω [6].

Supplementary Note 4 -External Imperfections
Imperfect cooling and heating of the motion We investigate the effect of imperfections due to imperfect cooling and heating of the motional modes by simulating the master equation including states with up to two motional excitations per mode (including three did not change the results noticeably). We do not perform adiabatic elimination of the modes c (j) . Instead, we set up the couplings H drive,Ω and H aux,Ω in a timedependent manner, with two frequency tones, a red-detuned (+G) one and a blue-detuned one (−G), which also improves the fidelity. The heating is modeled by operators L r = κ + r r † where r ∈ {a, b, c (j) } for j = 1, 2, 3. For each mode r, we assume an initial thermal distribution described by a mean phonon numbern r = κ + r /(κ r + κ + r ). For the auxiliary modes c (j) we find that both imperfect cooling and heating only lead to minor reductions of the fidelity at the sub-percent level. For example, forn r ∼ 0.01 and κ + r ∼ 10 quanta/s for each mode [8,9], and G/Γ = 1000, we obtain a reduction of 0.003 at t = 1/Γ . This can be understood from the fact that the cooling of the motional modes L κ is assumed to be strong also in the absence of imperfections, in order to remove errors from the system. The optimal cooling rate is found to be κ ∼ G, which, for G/(2π) ∼ 10 kHz translates into κ/(2π) ∼ 10 kHz. Such rates can be realized using continuous sympathetic cooling. If ancilla ions are used rather than auxiliary modes, these need to be continuously reset at a rate κ.
For the interrogation modes a and b, states with motional excitations are not supposed to participate in the scheme. Hence, the resulting error due to imperfect cooling can be estimated by the population in higher motional states, P n>0 . Assumingn 1, this is approximately given by P n>0 ≈n a +n b ≈ 2n. Again, this error is small if the interrogation modes are cooled.
Motional heating of the interrogation modes has a more pronounced effect on the scheme than for the auxiliary modes. This is due to the fact that H int,G is assumed to be strong (G Γ ), in order to create the splittings of the resonances. Excitations of the modes a and b can thus couple to excitations of the system ions, leading to additional loss channels (cf. [10]) causing errors. Cooling of the interrogation modes can counteract these effects. However, the cooling rate κ should be moderate, to minimize effects on the coherence of the two paths of the error correction which involve both modes, a and b. Considering G/Γ = 1000, assuming for each mode a heating rate κ + r = 3 quanta/s (as recently demonstrated in [9]), a cooling rate κ a/b = G/1000, and the corresponding thermal distribution withn ≈ 0.05, we observe a drop from F = 0.81 to F = 0.74 for t = 1/Γ . As expected, the additional error due to heating of the interrogation modes is thus larger than that due to heating of the auxiliary modes, and is comparable to the initial drop of E 0 ≈ 0.1. Yet, the operation of the error-correcting scheme still allows for much higher fidelity than in the uncorrected single-ion case with F ≈ 0.56 at t = 1/Γ and is thus useful for quantum metrology applications. The fidelity can be increased by using stronger sideband couplings compared to the error rate. To further suppress losses due to motional decoherence, the cooling of the interrogation modes and the operation of the error correction scheme can be separated in time. T of a spin-flip corrected Ramsey measurement in the presence of additional phase noise. As a consequence of the uncorrected noise, the prolongation of the Ramsey time becomes detrimental for longer times Γ τR 10 2 , but is still beneficial for Γ τR ∼ 10 0 . In the simulation, we use G = 5000 Γ , ΓZ = Γ /100, where ΓZ (Γ ) is the collective phase-flip (individual spin-flip) rate, and the optimized parameters Ω = 4κeng/5 and κeng = 1.2

Sensitivity in the presence of parallel noise
In our discussion of the sensitivity of the quantum measurement protected by our error-correcting scheme, we have so far considered the correction of local spin flips with a rate Γ. In the following, we investigate the effect of collective phase noise as an additional, experimentally common source of noise, described by a jump operator with a rate Γ Z . Such noise acting along the direction of the signal cannot be targeted by error correction. Supplementary Figure 3 shows the improvement of the measurement precision that can be achieved in the presence of both transversal and parallel noise (σ x and σ z errors). It can be seen that the performance of the scheme is reduced compared to the case without parallel noise shown in Fig. 7. For long Ramsey times Γ τ R 10 2 , the application of the error correction results in a reduction of the sensitivity, which turns out to be stronger for the idealized operators than for the full dynamics in some cases. Still, for times Γ τ R ∼ 10 0 , using the error correction scheme leads to significantly better results than in the cases where the scheme is not applied.