Implementation of leakage elimination operators and subspace protection

Decoherence-induced leakage errors can potentially damage physical or logical qubits embedded in a subspace of the entire Hilbert space by coupling them to other system levels. Here we report the first experimental implementation of Leakage Elimination Operators (LEOs) that aims to reduce this undermining. LEOs are a type of dynamical decoupling control that have been previously introduced to counteract leakage from a chosen subspace into the rest of a Hilbert space, and have been widely explored theoretically. Different from other error correction strategies, LEOs are compatible with any gate sequence in a code space, and thus, compatible with universal quantum computation. Using IBM’s cloud quantum computer (QC), we design three potentially applicable examples of subspaces in two- and three-qubit Hilbert spaces and derive the explicit forms of the corresponding LEOs for these subspaces. For the first time, we experimentally demonstrate that these LEOs significantly suppress leakage. The results also show that the LEO time-scale condition can be satisfied with noise in the IBM’s cloud QC and pave a way for quantum setups to get rid of leakage trouble.

www.nature.com/scientificreports/ logical qubit-encoding and stabilizers. Most research is thus focused on the application of quantum theory to quantum setups and quantum algorithms, which are of interest for building a future large-scale fault-tolerant QC. Therefore, this study also paves a way for generic use in these quantum setups to dispose of leakage troubles.

Universal leakage elimination
Efforts to get rid of decoherence begin with the choice of the logical qubit subspace. If one could, somehow, find an available subspace that remains protected against decoherence, a decoherence-free subspace, that would constitute the most adequate choice for the logical qubit subspace. However, such a passive idealization is difficult to find, so typically, one looks for active ways to prevent decoherence. In this work, we aim to make the logical qubit subspace leakage-free, that is, we try to suppress leakage from the encoded subspace, or codespace, C , to other states of the Hilbert space which reside in the orthogonal complement of the codespace, C ⊥3 , such as in continuous variable systems 23 . Elimination of the coupling between these subspaces rids the system from the most pressing decoherence-induced error. Further protection from decoherence, if necessary, could be achieved through, for instance, quantum error-correction codes (QECCs). To obtain these leakage-free subspaces, we will apply leakage-elimination operators, and we will do this through dynamical decoupling sequences. Leakage elimination operators are based on dynamical decoupling controls. These are control pulses used to average away noise in quantum systems, and can be understood as a projection onto a subspace of the space of operators acting on the system Hilbert space H S 3 . More specifically, we will benefit from the application of fast, intense bang-bang (BB) pulses. The briefness and strength of these pulses effectively reduce the system-bath interaction Hamiltonian. Consider a general Hamiltonian, with H S ( H B ) acting exclusively on the system (bath) and H SB , the system-bath interaction Hamiltonian coupling the system to the bath. If we are to apply the dynamical decoupling method, that means we will be applying control pulses periodically to our system, leaving an interval t of free evolution between them. Denoting these control pulses as U i , and considering free evolution to be negligible while the control pulses are acting on the system, we obtain an expression for an effective unitary evolution for the combined system-bath after N control pulses 3 , The control sequences should be applied as fast as possible, and the propagator (2) will be exact when N → ∞ and t → 0 . The first order U eff is described by an effective Hamiltonian, Ideally, we would be able to completely eliminate the system-bath interaction for N → ∞ . The closer our experimental realization is to an ideal BB pulse scenario, the more efficient our LEO will be. This effectiveness depends mainly on three factors: pulse strength, pulse duration, and the time interval between pulses. The higher the pulse strength and the shorter the time scales, the closer the pulse will be to an ideal BB pulse. More precisely, the effectiveness of an LEO depends on the integral of these pulse sequences 24 , which can be of great interest when considering non-ideal LEOs. However, in this work, we will consider our BB sequences to be ideal.
To construct an LEO, we arrange the basis vectors of a N-level Hilbert space H N and assume the first two levels, |0� and |1� , correspond to our logical qubits. Then, as is stated in 2 , we can easily classify all system operators into (a) logical operators E acting on the qubit subspace C , (b) operators acting on the orthogonal complement of this subspace, that is, acting on C ⊥ , that thus act entirely outside of the logical qubit subspace, and (c) leakage operators L, that connect these two orthogonal subspaces, and that take the following forms: This decomposition is valid both for physical and logical qubits. The general form of an LEO is 2 , where the identity blocks I have the dimension of the subspace of the encoded qubits and its orthogonal subspace. That is, the dimension of these blocks matches the ones of the blocks in (4). ϕ is a global phase. This operator satisfies the following commutation and anti-commutation relations: Since the LEO R L commutes with all operators that act on the encoded qubit subspace, we conclude that LEOs can be applied alongside any logical operation and are, thus, compatible with universal quantum computing. After applying a BB parity-kick sequence, we have  (6), and knowing that each of the terms of the Hamiltonian will be composed of operators as the ones described in (4) the term e −iR † L H SB R L t/m becomes e −i(H E +H E ⊥ −H L )t/m . The term e −iH E ⊥ t in (7) acts outside the logical qubit subspace and will thus have no effect on the code of interest. The term e −iH E t does act on the logical qubit subspace and can therefore be the source of logical errors. If necessary, these errors may need further treatment, either by QECCs or additional BB pulses 3 . We see, however, that the leakage H L has been eliminated. For practical purposes, we need only consider m = 1 , and Eq. (7) will hold up to order t 2 . The condition t ≪ 1/ω c must also be fulfilled, where ω c is the bath high-frequency cutoff 2 .
A general choice for LEOs is where σ is a vector containing all three Pauli matrices (or X, Y and Z logical operations), n is a real unit vector, and P is a projector operator onto the qubit subspace. When a canonical logical operation is available, however, this projector becomes redundant and we may write an LEO as in 3 : where σ L is any operation fulfilling σ † L = σ L , σ 2 L = I , and σ L |ψ� = 0 for any |ψ� ∈ C ⊥ .

Methodology
We have experimentally tested three LEOs using IBM's cloud quantum computer. The IBM Q project offers access to several quantum devices; in particular, we have worked with the five-qubit IBMX2 server in Yorktown (see 25 for technical specifications)-as well as the QASM simulator in the same platform, for testing the code before sending it to the server. The native gates in IBMQ are single qubit rotation R α (φ) = exp (iφ/2σ α ) , with α = {x, y, z} and σ α being the Pauli matrices. In practice, we have used X ( σ x ), Z ( σ z ) and H (Hadamard gate) as single-qubit gates and the two-qubit CNOT (controlled-X) gate. For each program, the computer makes 1024 shots. The programs have been written in qiskit 26 , using the notebooks provided by IBM's platform. See 27,28 for a introductory tutorials on qiskit.
For testing the effectiveness of each LEO, we have proceeded as follows: We first initialize the system to be in a quantum state corresponding to the leakage-free subspace of interest. Then we study the effect of the LEO in the system. For that purpose, we apply the corresponding LEO N times, and measure. Similarly, to study the free evolution of the same state, we apply N identity gates to a system initialized in the same way. We repeat this process for N ∈ [1, 600] . Each experiment was then repeated inserting an identity gate between LEO pulses, to study the effect of increased free-evolution intervals in the effectiveness of leakage elimination. In summary, we took the following steps: 1. Initialization of the system. ii. With an extra identity gate between pulses.
The first two LEOs we tested consist of a sequence of Z gates applied to all qubits in the system, which is the first example presented in 2 . The protected subspace for the two-qubit In these subspaces, the application of a Z operator for each qubit follows the form given in (8) with n =û z ; acting as I in the protected subspace S 1 or S 2 and as −I in its orthogonal subspace. For our tests, we have chosen initial states with equal populations in every state of the protected subspace: |� 2 � = (|01� + |10�)/ √ 2 and |� 3 � = (|001� + |010� + |100� + |111�)/2 , respectively. The gates applied for initialization and LEO application can be seen in the circuits in Fig. 1a,b. www.nature.com/scientificreports/ The third example considers how a CNOT gate behaves as an LEO. In this case, the subspace spanned by |10� − |11� , S 3 , is protected from leaking into {|00�, |01�, |10� + |11�} . The effectiveness of CNOT as an LEO in this system is easy to see if we write its explicit matrix form in the basis of {|00�, |01�, |10� + |11�, |10� − |11�}: This is in accordance with the form of a universal LEO given in (5), meaning that CNOT is an LEO in the chosen basis. We prepare the initial state |�� = (|10� − |11�)/ √ 2 when studying this LEO. Since the measurement options in IBM's cloud computer are limited to measuring the z component of the spin of the qubits, further manipulation of the system has been needed for measurement purposes − that is, to be able to discern what part of the populations of |10� and |11� correspond to the protected subspace {|10� − |11�} . After the LEO has been applied N times, we have applied a Hadamard gate to the second qubit, and then an X gate to both qubits, so that | � turns into |00� before the measurement. The circuit describing this can be seen in Fig. 2.
Once we have completed all runs, we compare the fidelity of the run where an LEO was applied with the one achieved through free evolution. This quantity is obtained for each N, by computing the ratio of the populations of the desired states by the number of total pulses in each run. For example, in the case of the two-qubit system where we used Z as an LEO, this fidelity would be f 1 = (number of |01� states + number of |10� states)/1024.  Circuit for the initialization and application of a two-quibit LEO, through CNOT gates. At step 1, we have successfully initialized the system in the desired state, and step 2 means the application of the LEO has finished. Note that after the application of the LEO, we must further manipulate our system for measurement purposes.  Figure 3 shows the population of each state in the cases where Z was used as an LEO. We can clearly see that, when an LEO is used (see Fig. 3a,c), initial populations remain roughly constant over time, with some expected fluctuations due to the probabilistic nature of quantum mechanics. While one would expect populations of the components of the initial state to be evenly distributed [for example, having equal populations of |01� and |10� in Fig. 3a, differences in the physical qubits prevent this from happening 25 . When the LEO is not applied (Fig. 3b,d), the population of the ground state increases, as the population of the states of interest decreases. This is due to the decay of qubits in state |1� into the lower energy state |0� . This is precisely the leakage we seek to prevent through the use of LEOs. We have found that the performance of the LEOs varies between operators. It also depends on the dimension of the studied system. All experiments, however, share one trait: application of an LEO maintains the fidelity of the final state constant in time, as we can see in Fig. 4. This, in accordance to Fig. 3a,c, means the population Table 1. Parameters obtained after fitting the measured fidelities of systems prepared in states |� 1 � = (|01� + |10�)/ √ 2 , |� 2 � = (|001� + |010� + |100� + |111�)/2 and |� 3 � = (|001� + |010� + |100� + |111�)/2 after application of N ∈ [1, 600] LEOs to the linear function in Eq. (11). The specific LEOs we used are Z for | 1 � and | � 2 and CNOT for | 3 �.   Table 3. Parameters obtained after fitting the measured fidelities of systems prepared in states |� 1 � = (|01� + |10�)/ √ 2 , |� 2 � = (|001� + |010� + |100� + |111�)/2 and |� 3 � = (|001� + |010� + |100� + |111�)/2 after application of N ∈ [1, 600] LEOs to the exponential function in Eq. (12), with extra identity gates between LEO applications. The specific LEOs we used are Z for | 1 � and | � 2 and CNOT for | 3 �.  Table 4. Parameters obtained after fitting the measured fidelities of systems prepared in states |� 1 � = (|01� + |10�)/ √ 2 , |� 2 � = (|001� + |010� + |100� + |111�)/2 and |� 3 � = (|001� + |010� + |100� + |111�)/2 after application of N ∈ [1, 600] pairs of identity gates (extended free evolution) to the exponential function in Eq. (12). www.nature.com/scientificreports/ of states in the protected subspace remains constant-that is, protected. To quantify this, we have fitted several curves to the gathered data through Mathematica, obtaining what can be seen in Fig. 5. Since we expect LEOs to fully protect the system from leakage and we thus anticipate that the initial fidelity will remain constant in time, we have chosen a linear fit for the cases in which the LEO was applied optimally, that is, Fig. 5a,c,e:

Results and discussion
The obtained parameters and their standard deviations can be seen in Table 1. The rest of the curves have been fitted to an exponential function of the form where we choose β i the fidelity at N = 1 and α i to be the fidelity at N → ∞ . In practice, we have imposed α i = f exp i (N = 600) , since it is the last piece of information we have. In any case, this is an optimistic choice, since we expect exponential decay to continue after our last measurement. The values we obtained for these parameters are collected in Tables 2, 3 and 4. Taking a look at Table 1, we are able to quantify the efficiency of LEOs. The linear fitting of the data confirms what we already suspected from Fig. 4a-c: the fidelity of the protected states remains nearly constant, the b i being at least four orders of magnitude smaller than all a i . In fact, we would expect b i < 0 for all cases, however, we only get this for b 3 , which has an standard error of the same magnitude and even value as the parameter itself. The standard errors of the a i , however, allow for three significant figures in the parameters. This difference in precision, together with our knowledge that the fidelity of this states should decrease in time, makes the accuracy of the b i dubious, and we will thus consider the fidelity constant from now on, taking the values given by a i .
To compare these results to the freely evolving case, we will compare the expected fidelities at N → ∞ . For the system protected by a LEO, this will be a i , as we have previously justified. For the freely evolving systems, we have chosen α i to be the fidelity at N → ∞ , even if, as has already been stated, this actually corresponds to the fidelity at N = 600 . We must thus keep in mind that we weill be dealing with an optimistic prediction for the expected fidelity at N → ∞ for the freely evolving case.
When Z gates were used as an LEO, we have achieved f This greater efficiency may be a consequence of the presence of |00� states prior to the manipulation of the final state for measurement purposes. The improvement in fidelity is, nonetheless, the most significant among our three cases of study. www.nature.com/scientificreports/ On another note, looking at Fig. 4d-f, we can see that an increase in free evolution time between LEO pulses decreases the effectiveness of leakage elimination. This is to be expected, since, as explained in "Universal leakage elimination", the ideal LEO relies on BB pulses for effectiveness. That is, elongating the time between pulses strays us further away from the ideal LEO. This effect is the most prominent for the case of CNOT gates (see Fig. 4f), which makes the application of an LEO counterproductive. These data have been fitted to exponential curves of the form (12), and the obtained parameters can be seen in Table 3, for the case where LEOs were applied, and (4), for the freely evolving cases. We see that the fidelity achieved at N → ∞ is lower than when LEOs were applied with no identity gates between pulses, with f

Fidelity
Free LEO (f) Figure 4. Fidelity of quantum states measured at different times, corresponding to up to 600 pulses, with 1024 shots at each time. The blue dots correspond to the run where LEO pulses where applied; the red dots correspond to the freely evolving system. (a,b) Show the evolution of a two-qubit system, with inital state |� 2 � = (|01� + |10�)/ √ 2 and Z pulses used as an LEO, with (b) having identity pulses applied between LEO applications; (c,d) depict the three-qubit case that also uses Z as an LEO, with initial state |� 3 � = (|001� + |010� + |100� + |111�)/2 , again, (d) has had identity pulses applied between LEO applications.
In (e,f) we used |�� = (|10� − |11�)/ √ 2 as our initial state and the role of LEO was carried out by CNOT gates, having identity pulses applied between LEO applications for (f).

Conclusion
The present experiments confirm that LEOs are able to help stabilize fidelity for two-and three-qubit leakage-free subspaces on IBMQ's 5-qubit QC, as predicted in our theories. The three subspaces are decoherence-free against collective dephasing, for three-site quantum state transfer and eigenvectors of the CNOT gate. Although IBMQ's 5-qubit QC limits the application of ideal dynamic decoupling control sequences, further decay in fidelity has been successfully suppressed, confirming that the LEO time-scale condition can be satisfied with noise in the device. Figure 4f shows a counterexample, where the LEO time-scale condition is not satisfied with noise in the device. Therefore, as long as the time interval between pulse applications is short enough (within the capability of IBMQ's 5-qubit QC), the use of an LEO is surely advantageous with respect to a free evolution of the system. Keeping in mind that LEOs are universal and can be applied alongside other qubit operations in the corresponding code space, we have experimentally provided a powerful tool for higher accuracy of quantum algorithms.  11) for (a,c,e) and Eq. (12) for (b,d,f). The red curves correspond to the freely evolving systems and have all been fitted with the exponential function in (12). (a,b) Show the evolution of a two-qubit system, with inital state |� 2 � = (|01� + |10�)/ √ 2 and Z pulses used as an LEO, with (b) having identity pulses applied between LEO applications; (c,d) depict the three-qubit case that also uses Z as an LEO, with initial state |� 3 � = (|001� + |010� + |100� + |111�)/2 , again, (d) has had identity pulses applied between LEO applications. In (e,f) we used |�� = (|10� − |11�)/ √ 2 as our initial state and the role of LEO was carried out by CNOT gates, having identity pulses applied between LEO applications for (f). www.nature.com/scientificreports/ Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.