Detecting bit-flip errors in a logical qubit using stabilizer measurements

Quantum data are susceptible to decoherence induced by the environment and to errors in the hardware processing it. A future fault-tolerant quantum computer will use quantum error correction to actively protect against both. In the smallest error correction codes, the information in one logical qubit is encoded in a two-dimensional subspace of a larger Hilbert space of multiple physical qubits. For each code, a set of non-demolition multi-qubit measurements, termed stabilizers, can discretize and signal physical qubit errors without collapsing the encoded information. Here using a five-qubit superconducting processor, we realize the two parity measurements comprising the stabilizers of the three-qubit repetition code protecting one logical qubit from physical bit-flip errors. While increased physical qubit coherence times and shorter quantum error correction blocks are required to actively safeguard the quantum information, this demonstration is a critical step towards larger codes based on multiple parity measurements.

A recent roadmap 1 for fault-tolerant quantum computing marks a transition from storing quantum data in physical qubits to protection of logical qubits by quantum error correction (QEC) [2][3][4][5][6] as the fourth of the seven development stages. Experimental demonstrations of QEC to date, using nuclear magnetic resonance 7 , trapped ions 8,9 , photons 10 , superconducting qubits 11 and nitrogen-vacancy centres in diamond 12,13 , have circumvented stabilizers at the cost of decoding at the end of a QEC cycle. This decoding leaves the quantum information vulnerable to physical qubit errors until re-encoding, violating a basic requirement for fault tolerance. Following steady improvements in qubit coherence, coherent control and measurement over 15 years, superconducting quantum circuits are well poised to face this outstanding challenge common to all quantum computing platforms. Initial experiments using superconducting processors include one round of either bit-flip or phase-flip QEC with decoding 11 , and the stabilization of one Bell state using dissipation engineering 14 . Independent, parallel work 15 demonstrates the detection of general errors on a single Bell state using stabilizer measurements.
By analogy to the classical repetition code that maps bit 0 (1) to 000 (111), the quantum version maps the one-qubit superposition state a|0i þ b|1i to the entangled Greenberger-Horne-Zeilingertype (GHZ) state a|0 t 0 m 0 b i þ b|1 t 1 m 1 b i of three data qubits (labelled top, middle and bottom) 16 . The stabilizers of this code consist of two-qubit parity measurements described by Hermitian operators Z t Z m and Z m Z b . While GHZ-type states are eigenstates of both stabilizers with eigenvalue þ 1, their corruption by a bitflip error on one data qubit produces eigenstates with a unique pattern of À 1 eigenvalues. Measuring stabilizers can thus discretize and signal single bit-flip errors without affecting the encoded information (that is, the probability amplitudes a and b). Depending on the error signalled, the logical qubit is transformed to an orthogonal two-dimensional subspace. It is both sufficient and better to keep track of this subspace transformation rather than attempt to return to the original subspace using correcting p pulses, which are not perfect and thus introduce errors.
In this work, we construct these stabilizers as parallelized indirect measurements using ancillary qubits, and evidence their non-demolition character by generating three-qubit entanglement from the superposition states. We demonstrate stabilizer-based QEC on the minimal unit of encoded quantum information, a logical qubit, restricting to bit-flip errors.

Results
Stabilizer measurements in a superconducting processor. This realization of bit-flip QEC with stabilizer measurements employs a superconducting quantum processor with 12 quantum elements ( Fig. 1a) exploiting resonant and dispersive regimes of circuit quantum electrodynamics 17 . Three data transmon qubits (D t , D m and D b ) encode the logical qubit. Two ancillary transmons i . Coherent or incoherent bit-flip errors are then introduced on data qubits with independent single-bit-flip probability p err . Parallelized Z t Z m and Z m Z b stabilizer measurements discretize these errors and the two-bit measurement result P t P b is interpreted as signalling either no error or error on one qubit. (c) Gate sequence implementing the stabilizer measurements by parallelized interaction with ancilla qubits and projective ancilla measurements. Each ancilla is prepared in a superposition state that is transferred to the respective bus with an iSWAP gate (diagonal lines). Consecutive CPHASE gates between each bus and the coupled data qubits (vertical lines) encode the data-qubit parity in the quantum phase of the bus superposition state. The final iSWAP transfers this state to the ancilla, and the latter is then projectively measured in the |±i basis. Halfway through the interaction step, a refocusing p pulse is applied to D m to reduce inhomogeneous dephasing.
(A t and A b ), two bus resonators (B t and B b ) and two dedicated ancilla readout resonators are used for the stabilizer measurements. Dedicated readout resonators on data qubits are used to quantify performance (fidelity measures, entanglement witnessing and state tomography). All readout resonators couple to one feedline used for all qubit control and readout pulses. The feedline output couples to a single amplification chain allowing readout of all qubits by frequency-division multiplexing 18 . Ancilla readout fidelity is boosted by a Josephson parametric amplifier 19 with a bandwidth covering both ancilla readout frequencies (9 MHz apart).
Building on recent developments 20,21 , we construct quantum non-demolition stabilizer measurements in a two-step process combining entanglement with ancilla qubits and their projective measurement. Measuring the stabilizer Z t Z m involves an iSWAP gate between A t and B t , two CPHASE gates between B t and each of D t and D m , and a final iSWAP transferring the B t state onto A t . These interactions correlate the joint states of D t and D m with even/odd (e/o) number of excitations with orthogonal states of A t . Subsequently, A t is measured by interrogating its dispersively coupled resonator. Conveniently, the interaction and measurement steps needed for both the stabilizers can be partially parallelized (Fig. 1c). (Note that a refocusing p pulse is applied to D m after its interactions to minimize its inhomogeneous dephasing. ) We begin characterizing these stabilizer measurements by testing their ability to detect the parities of the computational states |i t j m k b i, i,j,kA{0,1}. Because all of these states are eigenstates of Z t Z m and Z m Z b , a fixed two-bit measurement outcome P t P b A{ee,eo,oe,oo} is expected for each one. Histograms of declared double parities clearly reveal the correlation (Fig. 2). The average assignment fidelity of 71%, defined as the probability of correct double-parity assignment averaged over the eight states, is limited by errors in the interaction step. An upper bound of 91% is set by the combined readout error for the two ancilla measurements (Supplementary Table 1).

Top parity
Bottom parity , we selectively perform stabilizer measurements by activating the corresponding ancilla, i.e., preparing it in a maximal superposition state. (a,b), Performing one parity measurement generates entanglement between the paired data qubits. Measured average W h i of the four witness operators W F AE ð Þ and W C AE ð Þinvolving the data qubits paired by activating the top (a) or bottom (b) ancilla only and postselection on P t ¼ o and P b ¼ o, respectively. Entanglement is witnessed whenever W h io0 (shaded area). The weak oscillations in W C AE ð Þ result from false positives, which we have partially reduced here by postselecting more strongly than the threshold maximizing the average parity assignment fidelity. Standard deviations of W h i (B0.007, smaller than the symbol size) are estimated by bootstrapping 31 . (c), Measured average of the Mermin operator M with both ancillas activated and data strongly postselected on P t P b ¼ oo (black circles). Three-qubit entanglement is witnessed whenever M j j42 (shaded area). A stronger violation of the Mermin inequality is observed when targeting the GHZ state GHZ using unitary gates only (white circles). The average standard deviations of 0.1 (encoding by measurement) and 0.08 (encoding by gates) are smaller than the symbol size. (d), Tomography (absolute value of the density matrix elements) of the M j j-maximizing state generated by double-parity measurement. The fidelity F ¼ hGHZ|r|GHZi is 73%. For comparison, targeting this state with gates achieves F ¼ 82%.
NATURE COMMUNICATIONS | DOI: 10.1038/ncomms7983 ARTICLE Two-and three-qubit entanglement by stabilizer measurements. The next test probes the ability of each stabilizer to discern twoqubit parity subspaces while preserving coherence within each. Specifically, we target the generation of two-and three-qubit entanglement (2QE and 3QE) via single and double stabilizer measurements on a maximal superposition state. The gate sequence in Fig. 1c is executed with D t and D . First, we activate one stabilizer by performing the initial p/2 rotation only on the corresponding ancilla, and measure the data-qubitpair witness operators  (Fig. 3a,b). A dual result is obtained with postselection on e, for which W C AE ð Þ h i witness entanglement (data not shown). Note that in both cases the parity of the generated entanglement differs from the detected one due to the refocusing p pulse on D m .
We continue building multi-qubit entanglement by activating both parity measurements and postselecting on the two-bit result (Fig. 3c,d, and Supplementary Fig. 2). Ideally, P t P b ¼ oo collapses the maximal superposition onto the GHZ-type state GHZðjÞ h i versus j reaches 2.5 (best fit, Fig. 3c). Full state tomography at the optimal j reveals a fidelity hGHZ(0)|r|GHZ(0)i ¼ 73% to the ideal GHZ state (Fig. 3d).
This 3QE-by-measurement protocol can also be used to perform the encoding step of bit-flip QEC. Ideally, the state | þ t i (a|0 m i þ b|1 m i) | þ b i is mapped onto a|1 t 1 m 1 b i þ b|0 t 0 m 0 b i up to the transformation X t X b , X t , X b , I signalled by P t P b ¼ ee, eo, oe, oo, respectively (the amplitudes a and b, in addition to the parities, are also exchanged by the refocusing p pulse on D m ). Postselection on P t P b ¼ oo (Supplementary Fig. 3) Fig. 4) achieves 82% average fidelity.
QEC of bit-flip errors. Finally, we use this encoding by gates to demonstrate bit-flip QEC by parallelized stabilizer measurements (Fig. 4a). Bit-flip errors are coherently added via X rotations by an angle y, yielding a single-qubit bit-flip probability p err ¼ sin 2 (y/2) (adding incoherent errors at this stage yields very similar results, see Methods and Supplementary Fig. 5). While the three-bit code is by design only resilient to errors on a single qubit, we also consider the realistic case where such error can occur with the same probability on any of the three qubits. Therefore, we consider two scenarios: the errors added on only one data qubit and the errors added independently on all the three. In both scenarios, we assume no prior knowledge of error probability and literally interpret the stabilizer measurement results as though they were perfect. We first quantify QEC performance using the average fidelity F 3Q to the ideal three-qubit state accounting for the subspace transformationĈ pq ¼ X m ; X m X b ; X t X m ; I signalled by P t P b ¼ ee,eo,oe,oo (in order): Here, jc j L i is the ideal encoded cardinal state, p pq is the measured probability of P t P b ¼ pq, and r(j,pq) is the experimental pq-conditioned density matrix. The near constancy of F 3Q (p err ) with errors on one qubit and the second-order dependence with errors on all three qubits (Fig. 4b) reflect the ability of the stabilizers to discretize and signal single-qubit bit-flip errors without decoding.
To assess the ability of QEC to detect added errors without unfairly penalizing for intrinsic decoherence and encoding errors, Encoding Encoding  we compare F 3Q with the stabilizer interactions replaced by idling for equal duration (with a refocusing D m pulse): Without QEC, one expects a linear decrease in F 3Q with errors on one qubit as one bit flip orthogonally transforms the encoded state. The slight curvature observed reflects residual coherent errors in encoding. The non-monotonicity of F 3Q with errors on all qubits reflects that triple errors perform a logical bit flip, which leaves | þ L i and | À L i unchanged. Comparing the curves suggests that QEC provides net gains for p err ]15% in the first case and for p err ]10% in the second (Fig. 4b).

Discussion
However, the true merit of QEC hinges on the ability to suppress the accumulation of errors. We believe that a better comparison is the logical state fidelity F L following two rounds of errors with QEC or idling in between. F L is defined as the fidelity to the initial unencoded D m state following an ideal decoderD (Fig. 4a) that is resilient to a bit-flip error remaining in any one qubit. For example, with QEC and a second-round errorÊ, Here we consider the scenario with errors on all three qubits and only incoherent second-round errors. We expect QEC to win over idling in select cases, such as single errors on both rounds but on different qubits, all of which we observe ( Fig. 4d and also Supplementary Fig. 6). Weighing in all the possible cases (from 0 to 3 errors in each round) according to their probability, we find that the current fidelity of the stabilizer measurements precludes boosting F L for the cardinal states using this quantum repetition code at any p err (Fig. 4c). This stricter comparison sets the benchmark for gauging future improvements in QEC.
In summary, we have realized parallel stabilizer measurements with ancillary qubits and used them to perform a quantum repetition code on a superconducting circuit. Stabilizer-based QEC can detect bit-flip errors on data qubits while maintaining the encoding at the logical level, thus meeting a necessary condition for fault-tolerant quantum computing. Evidently, it remains a priority to extend qubit coherence times and shorten the QEC step to boost logical fidelity. In the longer term, parallelized ancilla-based parity measurements as demonstrated here may be used to protect a logical qubit against general errors with a Steane 6,26 or small surface code 27 .

Methods
Processor fabrication. The integrated circuit is fabricated on a c-plane sapphire substrate. A NbTiN film (80 nm) is reactively sputtered at 3 mTorr in a 5% N 2 in Ar atmosphere, resulting in a superconducting critical temperature of 15.5 K and normal-state resistivity of 110 mOcm. This film is e-beam patterned using SAL601 resist and etched by SF 6 /O 2 RIE to define all coplanar waveguide structures: feedline, resonators and flux-bias lines. The transmon Josephson junctions and shunting interdigitated capacitors are patterned using PMGI/PMMA e-beam lithographed resist and double-angle shadow evaporation of Al with intermediate oxidization. Air bridges are added to suppress slot-line propagation modes, to connect ground planes and to allow the crossing of transmission lines ( Supplementary Fig. 8). Bridge fabrication starts with a 6-mm-thick PMGI layer, which is patterned and then reflowed at 220°C for 5 min, producing a gently arched profile. A second MAA/PMMA resist layer is spun and e-beam patterned to define the bridge geometry. Finally, Ti (5 nm) and Al (450 nm) are e-beam evaporated. The 2 mm by 7 mm chip is diced and cleaned in 88°C NMP for 30 min.
Experimental setup. The quantum processor is anchored to the mixing chamber plate of a dilution refrigerator with 15-20 mK base temperature. A detailed schematic of the experimental setup at all temperature stages is shown in Supplementary Fig. 8. The single coaxial line for readout and microwave control has in-line attenuators and absorptive low-pass filters providing thermalization, noise reduction and infrared radiation shielding. Coaxial lines for flux control are broadband attenuated and bandwidth limited (1 GHz) with reactive and absorptive low-pass filters.
Qubit control. Most microwave pulses for X and Y qubit rotations have a Gaussian envelope in the main quadrature (5 ns sigma and 20 ns total duration), and a derivative-of-Gaussian envelope in the other (DRAG pulses 28 ). Wah-Wah pulses 29 combining DRAG with sideband modulation are used for D t and A b to avoid leakage in D m and D b , respectively. Taking advantage of the proximity in frequency between D t and A t , and between D m and A b , we coherently control the five qubits by sideband modulation of three carriers (Supplementary Fig. 8).
Flux pulses for iSWAPs are sudden (12 ns duration), while those for CPHASEs are mostly fast adiabatic 30 (40 ns). The pulse for CPHASE between D m and B t is kept sudden (19 ns) to avoid leakage during the crossing of D m through B b . Pulse distortion resulting from the flux control bandwidth is minimized by manual optimization of convolution kernels.
Qubit readout. The five qubits are readout by frequency division multiplexing 18 . The readout pulses for data and ancilla qubits are separately generated by sideband modulation of the two carriers.
The amplitude and duration of readout pulses are chosen to maximize assignment fidelity. D t , D m and D b readout pulses have 1,200, 1,000 and 700 ns duration, respectively. The signal-to-noise boost provided by the Josephson parametric amplifier allows shorter ancilla qubit readouts, 600 ns (550 ns) for A t (A b ). The amplified feedline output is split and downconverted with two local oscillators. The two signals are amplified, digitized, demodulated and integrated to yield one voltage for each qubit measured. The low crosstalk between the qubit readouts is evidenced by simultaneous measurement immediately following preparation of the 32 combinations of the five qubits in either |0i or |1i ( Supplementary Fig. 9).
Using the method of ref. 20 based on Hahn echo sequences, we have bound the dephasing of each data qubit induced by the ancilla measurements to o1% (data not shown). Since data-qubit fidelity loss during ancilla measurements is dominated by intrinsic decoherence and our main interest is to quantify the ability of stabilizers to detect the intentionally added errors, we have opted to advance the data qubit measurements, making them simultaneous to those of ancillas ( Supplementary Fig. 4).
Initialization. The four qubits {D t , D b , A t and A b } and two buses {B t and B b } are initialized to their ground state by postselection on six measurements performed before any encoding or manipulation protocol. The buses are initialized by swapping states with their coupled ancilla immediately after initialization of the latter. D m is initialized by swapping its excitation (B10%) with that of B b (B1%). The postselected fraction of runs (50-60%) have a residual excitation of 1-2% in every quantum element.
Gate sequence. Gates are parallelized as much as possible. We note two important exceptions. Because of frequency crowding and the common feedline, pulses targeting one qubit induce ac Stark shifts on untargeted qubits. We serialize single-qubit control to restrict the effect of these shifts to residual phase rotations on unaddressed qubits. Also, the first iSWAP between B t and A t and CPHASE between B t and D m (Fig. 1c) are applied before populating B b to avoid a strong dispersive shift of D m . All others iSWAPS, CPHASE gates and ancilla measurements are simultaneous.
Incoherent errors. We have also tested stabilizer-based QEC with incoherent first-round errors generated using p rotations ( Supplementary Fig. 5). Following encoding of a D m cardinal input state c j m , we apply the eight combinations of error/no error on the three data qubits. We calculate F 3Q and F L for each combination and weigh by the corresponding probability.