Repetitive quantum non-demolition measurement and soft decoding of a silicon spin qubit

Quantum error correction is of crucial importance for fault-tolerant quantum computers. As an essential step towards the implementation of quantum error-correcting codes, quantum non-demolition (QND) measurements are needed to efficiently detect the state of a logical qubit without destroying it. Here we implement QND measurements in a Si/SiGe two-qubit system, with one qubit serving as the logical qubit and the other serving as the ancilla. Making use of a two-qubit controlled-rotation gate, the state of the logical qubit is mapped onto the ancilla, followed by a destructive readout of the ancilla. Repeating this procedure enhances the logical readout fidelity from $75.5\pm 0.3\%$ to $94.5 \pm 0.2\%$ after 15 ancilla readouts. In addition, we compare the conventional thresholding method with an improved signal processing method called soft decoding that makes use of analog information in the readout signal to better estimate the state of the logical qubit. We demonstrate that soft decoding leads to a significant reduction in the required number of repetitions when the readout errors become limited by Gaussian noise, for instance in the case of readouts with a low signal-to-noise ratio. These results pave the way for the implementation of quantum error correction with spin qubits in silicon.

The compatibility of spin qubits with industrial semiconductor technology as well as their relatively small size makes them scalable to large dense arrays [1,2] and facilitates the implementation of fault-tolerant quantum computing based on quantum error correction. A key requirement of quantum error correction is the ability to repeatedly measure multiple physical qubits in a quantum nondemolition (QND) way to identify logical errors [3]. One approach to achieve quantum nondemolition readout of spin qubits is to use a two-qubit gate to map the state of the logical qubit to an ancilla which is then measured. While the readout of the ancilla may be destructive, it leaves the state of the original qubit unperturbed. Consequently, the ancilla may be reinitialized and the logical qubit measurement can be repeated to enhance the signal. Recently, ancilla-based repetitive QND readout has been implemented across several platforms, from trapped ions [4,5] to electron-nuclear spin systems [6][7][8][9][10][11][12][13][14][15] and superconducting qubits [16]. In GaAs quantum dots, repeated nondestructive readout of spin states [17] as well as QND measurement of a spin qubit [18] have been reported. In the latter experiment, however, the information had to be decoded from the evolution of the ancilla qubit under a twoqubit controlled-phase operation with variable interaction time to overcome the fluctuations of the Overhauser field. This makes the cumulative fidelity only slowly increase with the number of QND readouts. In addition, the binary thresholding of individual measurements in these experiments discards valuable information. Furthermore, future experiments on large arrays of spin qubits will likely rely on gate-based dispersive readout, where it is challenging to achieve a high signal-to-noise ratio (SNR) [19][20][21][22]. Consequently, both a repetitive QND readout with uniform repetitions and improved decoding methods are highly desirable for quantum error correction. In particular, "soft decoding" makes full use of the analog information contained in the successive measured detector responses. Such analog information can lead to a more efficient readout of the logical qubit [23].
Here we implement ancilla-based repetitive QND readout of an electron spin qubit hosted in a silicon quantum dot. We study the enhancement in the logical readout fidelity as a function of the number of repetitions, and analyze based on experiment the conditions under which "soft decoding" reduces the number of repetitions needed to achieve a target fidelity.
We use two electron spin qubits in a double quantum dot (DQD) confined in a Si/SiGe heterostructure. The sample and qubit control techniques are described in detail in Ref. [24]. In brief, single-qubit gates are realized by electricdipole spin resonance (EDSR) enabled by the magnetic field gradient from a nearby micromagnet [25,26]. The micromagnet gradient also causes the resonance frequencies of the two qubits to be well separated. A two-qubit gate is realized by changing the detuning between the chemical potentials of the two dots, which modifies the strength of the exchange interaction J between the two spins. Because of the interplay of the exchange and the energy difference between the qubits, the energies of the j01i and j10i states are shifted down by J=2, due to their coupling to the doubly occupied singlet state Sð0; 2Þ [ Fig. 1(b)]. Consequently, the EDSR resonance frequency of qubit 2 (Q2) depends on the state of qubit 1 (Q1). By applying an EDSR pulse at the resonance frequency of Q2 corresponding to a particular Q1 state, we obtain a controlled-rotation (CROT) gate: is shown in color scale as a function of two gate voltages that control the electrochemical potentials of the two dots. The gate voltages for steps 1-5 in the experiment (discussed in the main text) are indicated with black circles, which also appear in (c) and (d). We note that the DQD remains in the (1,1) state during step 5 (the CROT gate) because the operation is much faster than the tunneling-out time of Q1. (b) Spin states of the two-electron system with and without exchange coupling. The spin state of Q1 is mapped onto the spin state of Q2 via a CROT gate based on frequency-selective spin transitions. (c) Quantum circuit for the QND readout procedure. Q1 is used as a logical qubit and as control qubit of the CROT gate, while Q2 is used as ancilla qubit and as target qubit of the CROT gate. An optional X π pulse is used to prepare Q1 into the spin-up state following initialization to spin-down. (d) Schematic representation of the DQD system during the QND measurement protocol. Initialization and readout are implemented by aligning the electrochemical potential of the last electron in dot 2 close to the Fermi energy of the reservoir. The exchange coupling is switched on by detuning the electrochemical potentials of dots 1 and 2. Both electrochemical potentials are varied by applying voltage pulses on the depletion gates that define the DQD confining potential. Spin flips in single-and two-qubit gates are implemented by EDSR.
Because of the low concentration of nuclear spins in silicon, the mapping from logical qubit to ancilla is close to optimal in every single repetition. In the QND readout experiment, we choose Q1 [shown as a blue spin in Figs. 1(c), 1(d)] as the logical qubit and Q2 (shown as a red spin) as the ancilla qubit. We do this for two reasons. First, Q1 has a much longer T 1 than Q2 (T 1 > 50 ms versus T 1 ≈ 1 ms), allowing multiple readout cycles of Q1 before significant relaxation occurs. Second, Q2 is physically closer to the Fermi reservoir, which makes it easier to perform destructive readout and reinitialization. Here, the readout of Q2 is performed by detecting spin-selective tunneling to the reservoir with the help of a charge sensor [27]. The signature of the spin-up state is the appearance of a step in the charge sensor response as only a spin-up electron tunnels out of the quantum dot. A commonly used [27] and near-optimal [28] strategy to detect such a step is to compare the peak value I p of the charge sensor signal during the readout time to a fixed threshold [see inset of Fig. 3(c) for an example of a charge sensor trace]. In the data shown below, we infer the spin states using a readout time that minimizes the average single-repetition readout error rate (see the Appendix D). We test the QND readout through a protocol whereby voltage pulses applied to two of the quantum dot gate electrodes take the system through the following steps [see Figs. 1(a), 1(c), and 1(d)]. (1) Empty dot 2, (2) initialize Q1 to the spin-down state via spin relaxation at a hot spot [29], (3) initialize Q2 in the spin-down state using spin-selective tunneling, (4) apply an optional single-qubit π pulse for initialization of Q1 in the spin-up state, (5) perform a CROT gate to map the state of Q1 onto the state of Q2, and (6) perform single-shot readout of Q2.
Step 6 occurs at the same gate voltages as step 3, so at the end of the sequence, Q2 is automatically reinitialized through spin-selective tunneling. In successive QND measurements, steps 1 and 2 are omitted, and the optional rotation at step 4 is omitted as well [ Fig. 2(a)]. Each readout cycle lasts 3.263 ms. Because the CROT gate does not affect the state of Q1, successive cycles each yield information on the state of Q1 before the first cycle, as long as Q1 has not been flipped due to relaxation or excitation. Therefore, the readout fidelity of the logical qubit Q1 can be significantly enhanced by repeating the readout cycle. In order to obtain directly the visibility from experiment, we prepare Q1 either in state j0i or in state j1i. We then perform up to 15 sequential QND measurements.
The simplest way to infer the state of Q1 from the repeated readout of Q2 is to perform a majority vote on the readout outcomes [30]. Ideally, this leads to an exponential suppression of the logical readout error probability ϵ log with the number of cycles N, ϵ log ∝ ϵ N . Here, ϵ is the singlerepetition readout error rate, which includes errors from the CROT mapping and the spin readout of Q2.
A slightly more sophisticated approach to inferring the state of Q1 is through a weighted majority vote that accounts for spin relaxation (see Appendix B for full details). Intuitively, the later measurement cycles have accumulated more errors from relaxation than the earlier ones, and are thus given less weight. Figure 2(b) shows the estimated spin-up probability of Q1 for each individual QND readout cycle as well as for a cumulative weighted majority vote. The cumulative visibility increases from 51.0 AE 0.6% after 1 cycle to 88.9 AE 0.3% after 15 cycles, which corresponds to a cumulative logical fidelity of 94.5 AE 0.2%. Here, the logical fidelity is defined as F log ¼ 1 − ϵ log (see Appendix B). The oscillation in the cumulative spin-up probabilities is due to an even-odd effect from (weighted) majority voting. Because of spin relaxation of Q1, there is a slow decay of the (single-repetition) spinup probability when Q1 is prepared in j1i. Previous T 1 measurements on the same device show that there was no observable decay of Q1 up to 50 ms [24], consistent with our observations. From the data, it is clear that even higher cumulative fidelities can be achieved using more repetitions (see Appendix E for a detailed discussion).
Further improvements in the readout fidelity for repeated QND readout are possible when taking into account additional information contained in the individual readout traces. This approach is based on the log-likelihood ratio for the logical state, λ log ¼ P N i¼1 λðO i Þ [5,31] (in the data analysis below, we use a slightly more sophisticated  2. (a) Circuit diagram for the repetitive QND readout scheme, using the same labels as in Fig. 1(c). (b) Spin-up probability obtained from individual QND readout cycles (triangles) and from a cumulative weighted majority vote (circles) for preparation of Q1 in state j1i (blue) and in state j0i (red). For the individual readout cycles, the visibility does not improve and in fact slightly decreases due to the finite relaxation time T 1 of Q1. By fitting the measured P 1 for preparation of Q1 in state j1i to an exponential, we estimate T 1 ¼ 1.8 AE 0.6 s. The cumulative weighted majority vote improves the logical readout visibility as more QND readout cycles are performed. variant, accounting for relaxation of Q1 during the repeated measurements, see Appendix B). Here, O i is the measurement outcome for the ith repetition and λðO i Þ ¼ ln ½PðO i j1Þ=PðO i j0Þ is the log-likelihood ratio for that outcome. PðO i j1Þ [PðO i j0Þ] is the probability to obtain O i when the qubit is prepared in j1i [j0i]. If λ log > 0 (λ log < 0), it is decided that the most likely premeasurement logical state is j1i (j0i). When thresholding, the observable O i is either a 1 or a 0, an approach we call "hard decoding." When considering only a single readout instance, thresholding is optimal. For the repetitive QND readout discussed here, and also for quantum error correction in general, thresholding each individual qubit readout leads to an irreversible loss of information because it discards the level of confidence λðO i Þ that can be assigned to individual readout outcomes [23,[32][33][34][35][36][37]. A better approach is to take an analog variable as the observable O i to calculate λ log . For the readout scheme used here, the peak signal is a good choice [28]. We refer to this procedure as "soft decoding." The logical readout error probabilities resulting from hard and soft decoding applied to our raw data are plotted in Fig. 3(c) as a function of the number of QND readout cycles. Interestingly, in this instance, the improvement of soft decoding over hard decoding is almost nonexistent. This can be understood by examining the empirically measured peak-signal distributions PðI p j1Þ and PðI p j0Þ at the optimal readout time (∼623 μs, see Appendix D) shown in Fig. 3(a) along with the log-likelihood ratio λðI p Þ. Since readout errors caused by noise in the readout traces are small compared to the bit-flip errors arising from imperfect CROT operations, ancilla preparation, and spin-to-charge conversion in the readout of the ancilla spin, the peak-signal distributions have clear bimodal features (this is discussed in more detail below). As a result, λðI p Þ approximates a step function. This means that all values of I p on one side of the step are assigned the same level of confidence. It follows that thresholding the values of I p does not discard much information on the level of confidence in each readout outcome.
Empirically measured distributions PðI p j1Þ and PðI p j0Þ of the peak sensing dot signal I p in arbitrary units for preparation of Q1 in j1i (blue histograms) and in j0i (yellow histograms), respectively. The distributions are obtained for the readout time that minimizes the single-repetition readout error (see Appendix D). Because of the bimodal features of the two distributions, the loglikelihood ratio λðI p Þ is approximately a step function (magenta curve). (b) Same dataset as in (a) but with artificially added Gaussian white noise. Here, the two distributions largely overlap. As a result, the log-likelihood ratio λðI p Þ is not a step function and different values of I p on one side of the threshold acquire different weights. This means that if the values of I p are thresholded at each cycle, useful information is discarded. (c),(d) Logical readout error rate without and with artificially added white noise. When the loglikelihood ratio λðI p Þ approximates a step function, there is little advantage in using soft decoding. When the log-likelihood ratio λðI p Þ strongly deviates from a step function, soft decoding reduces the number of repetitions required to achieve a given error rate. Insets: Example readout traces containing a tunnel event without or with added Gaussian white noise.
For soft decoding to yield an advantage, we must therefore consider situations where λðI p Þ is not a step function. One such generic situation occurs in the limit of low SNR for the single-repetition readout. To demonstrate that soft decoding yields an advantage for low SNR, we artificially add Gaussian white noise on top of the experimental readout traces. Figure 3(d) shows the resulting logical error probabilities for both hard and soft decoding. We see that soft decoding achieves the same logical error rate with 10 repetitions instead of 15 repetitions, a reduction by a third in the number of repetitions. Consequently, a significant amount of readout time may be saved. The reason for this advantage is apparent in Fig. 3(b), which shows the probability distributions PðI p j1Þ and PðI p j0Þ and the corresponding λðI p Þ after adding the noise (optimal readout time ∼475 μs).
Here, the distributions are close to unimodal Gaussians and strongly overlap. This results in a λðI p Þ that varies smoothly with I p such that values of I p on a given side of the threshold are given different levels of confidence. This is the additional information that yields the soft decoding advantage.
It is important to note that the low-SNR readout is not merely of theoretical interest but is also of great practical relevance. One reason is that it might be difficult to achieve high SNR in dense qubit arrays where charge sensors, electron reservoirs, or on-chip resonators [21,22] are not available, and where only gate-based readout [19][20][21][22] with SNR limited by a large parasitic capacitance [19,20] is possible. It also opens the possibilities to improve the fidelity readout at higher operating temperatures [38,39], in particular, when raising the temperature reduces the SNR (e.g., from broadening of the sensing dot Coulomb peaks) while not or only mildly increasing spin-charge conversion errors (e.g., in Pauli spin blockade readout). Operation above 1 K is essential to the integration of quantum dots with cryoelectronics [40]. Such situations are precisely the ones where repetitive QND readout may become necessary to achieve low logical readout error rates. Moreover, there are situations where relaxing the constraints on SNR could be beneficial. For instance, it may allow the repetitive readout to operate at lower detector-qubit coupling without loss of fidelity, which could reduce unwanted interference of the detector on the system. Note that these advantages are not limited to the special case of the repetitive QND readout considered here. For instance, quantum errorcorrecting codes infer error syndromes by using both spatial and temporal redundancy from repeated measurement of ancillas [41][42][43][44][45][46][47][48][49][50][51]. Both our results and recent theoretical work on continuous-variable quantum error correction [52][53][54][55] suggest that soft decoding of quantum codes could help reduce the number of physical qubits and the number of measurements required to achieve a desired logical error rate.
It must also be emphasized that a low SNR is in general not necessary to benefit from soft decoding. Soft decoding helps when errors arising from noise, as small as they may be, are larger than bit-flip errors. This ensures that the log-likelihood ratio changes smoothly instead of stepwise [23]. We discuss ways to engineer such conditions for readout of spin qubits in quantum dots in Appendix F.
In conclusion, we have performed high-fidelity QND readout of a spin qubit in silicon. The readout fidelity is enhanced by repeatedly mapping the qubit state to a nearby ancilla using a two-qubit gate and measuring the ancilla, from 75.5 AE 0.3% for a single repetition to 94.5 AE 0.2% for 15 repetitions, and with room for further improvements from additional repetitions (see Appendix E). We compared two different decoding methods, hard decoding and soft decoding, and discussed the conditions under which soft decoding yields a significant advantage. In the present experiment, hard decoding and soft decoding perform equally well since errors from noise in the readout traces are far less frequent than errors from bit flips. However, with the same rate of bit-flip errors, soft decoding is expected to significantly reduce the number of ancilla measurements required for high-fidelity readout when the SNR is low, as can be the case for gate-based readout in dense qubit arrays, for readout at elevated temperatures, or when SNR must be traded for readout speed. Note added.-Recently, we became aware of related work on repeated QND readout of a silicon spin qubit using the thresholding technique [56].
Data supporting the findings of this study are available online [57]. Xue et al. [58]. We summarize a few key points. The device is cooled in a dilution refrigerator to ∼20 mK. An external magnetic field of 617 mT is applied in the plane of the sample. The longitudinal component of the magnetic field from the micromagnet contributes to the Zeeman splitting and its gradient gives a large separation of the qubit frequencies (Q1, 18.4 GHz; Q2, 19.7 GHz), which facilitates single-qubit addressability. Two confinement gates P1 and P2 (we use the same labels as in Xue et al. [58]) are connected to an arbitrary waveform generator (Tektronix 5014C) via coaxial cables. dc voltage pulses applied to the sample through these two gates allow the system to move into different positions in the charge stability diagram for initialization (Q1, 0.1 ms for fast relaxation; Q2, 4 ms for spin-selective tunneling), operation, and readout (1-2 ms for each qubit). A full cycle of the pulse sequence can be found in Watson et al. [24]. Furthermore, during the operation stage, the gates P1 and P2 are also used to switch on and off the exchange coupling between the two electron spins by controlling the detuning of chemical potentials between them, and thus realize the two-qubit gate. Another two confinement gates MW1 and MW2 are connected to two vector microwave sources (VSG, Keysight E8267D) for single-qubit gates by microwavecontrolled EDSR. We calibrate the VSG powers to achieve Rabi frequencies of both qubits to be 2 MHz, corresponding to a 180 deg rotation (X π gate) of 250 ns. Readout traces are sampled by a digitizer card (Spectrum M4i.44) after a 20 kHz Bessel low-pass filter (SRS SIM965). Each single readout trace is either converted into a single bit value by comparing the peak signal to a threshold value (hard decoding) or saved for soft decoding analysis.

APPENDIX B: BAYESIAN INFERENCE
In this Appendix, we give an algorithm to efficiently perform optimal Bayesian inference of the logical qubit state using the empirically determined statistics of the repetitive readout.

Repetitive readout
Suppose that the logical qubit is repetitively read out N times, with each repetition having a duration δt rep . We may consider the state of the logical qubit at the discrete times with the kth repetition taking place in the interval ½t k−1 ; t k .
Here, the coherence of the logical qubit in the computational basis plays no role in the statistics of the measurement. For the present purposes, we may therefore model the time evolution of the logical qubit classically. The classical state of the logical qubit at time t k is labeled x k . The state evolution of the logical qubit up to k ≤ N repetitions follows the stochastic time series: In reality, each individual readout is noisy. Thus, the state x k at each repetition is not directly recorded. Instead, a noisy observation O k is recorded. This gives the observation sequence: Note that in general, the observations O k need not be scalar.

Maximum-likelihood decision
Our goal is to infer the most likely initial state of the logical qubit from the sequence O k of noisy repetitive readout outcomes. This is most easily done by calculating the posterior probability ratio: The initial state is most likely 1 if the ratio is larger than unity, and it is most likely 0 if the ratio is smaller than unity.
In the absence of prior information on the logical qubit state, Pðx 0 ¼ 0Þ ¼ Pðx 0 ¼ 1Þ ¼ 1=2, the above maximum a posteriori decision [31] reduces to calculating the loglikelihood ratio: The initial state is now most likely 1 if λ log k > 0, and it is most likely 0 if λ log k < 0. This results in a maximumlikelihood decision [31].

Logical readout error rate
The average logical readout error rate ϵ is given by Here, ϵ log 1 and ϵ log 0 are the error rates conditioned on preparation of the logical qubit in states 1 and 0 at time t 0 , respectively. These are given by An experimental estimate of the logical readout error rate ϵ log 1 (ϵ log 0 ) is obtained by preparing the logical qubit in state j1i (j0i) 10 4 times, measuring the record O k and calculating λ log k for each attempt, and counting the number of times where λ log k < 0 (λ log k > 0). Finally, we note that the average readout fidelity quoted in the main text is XIAO XUE et al.

Calculating the log-likelihood ratio
To calculate λ log k , the statistics of the observations O k given the initial state of the logical qubit must be known. More precisely, the probability distributions PðO k jx 0 ¼ 1Þ and PðO k jx 0 ¼ 0Þ appearing in Eq. (B5) must be calculated. In the following, we show how to model and calculate these distributions for the repetitive readout using the theory of hidden Markov models [16,18,49,56,59]. The hidden Markov model provides a direct connection between the single-repetition probability distributions, PðO k jx k Þ, and the probability distributions for the full measurement record, PðO k jx 0 Þ, accounting for the dynamics of the logical qubit. From PðO k jx 0 Þ, the log-likelihood ratio can be evaluated directly using Eq. (B5). As described in Appendix C, following Eq. (C4), here we have determined PðO k jx k Þ empirically. However, note that these distributions can also be found from an appropriate dynamical model of the readout. See for instance Refs. [28,[60][61][62][63][64][65] and others, where hidden Markov models are used to determine PðO k jx k Þ at the level of a single repetition.

a. Hidden Markov models
As discussed in the main text, the logical qubit state evolves during the measurement via spin relaxation on a time scale T 1 . Such a process is Markovian in the sense that the statistics of the state at time t kþ1 are fully determined by the state at time t k : Because the ancilla qubit is reinitialized after each repetition, the noisy observations O k are independent from each other and depend only on the state of the logical qubit at time t k : In other words, the observation noise is white. Finally, prior knowledge about the system state at each time is specified by the prior probability distribution Pðx k Þ for the state x k at each time t k . The set fPðx kþ1 jx k Þ; PðO k jx k Þ; Pðx k Þg defines a "hidden Markov model."

b. Forward filtering
For the hidden Markov models discussed above, the log-likelihood ratio may be calculated with the help of an iterative forward filtering algorithm for the logical qubit state. Forward filtering consists in calculating the probability distribution of the logical qubit state x k at time t k given all previous observations. We denote this probability distribution as Using Bayes's rule, the distribution ϱ k ðx k Þ may be rewritten as Here, is the joint probability distribution of the state x k and of the previous observations. One advantage of calculating l k ðx k Þ instead of ϱ k ðx k Þ is that l k ðx k Þ obeys a linear recurrence relation while ϱ k ðx k Þ obeys a nonlinear recurrence relation (see Appendix B 4 c).
We note that the denominator in Eq. (B11) is the likelihood function: Equation (B11) now takes the form It is convenient to introduce the vector notation, where fjxÞg is a set of basis vectors representing the classical logical qubit states x. Equation (B14) is then rewritten as The likelihood function, Eq. (B13), may compactly be written as Here, the trace Tr of a vector is the sum of its elements. Choosing the basis fj1Þ; j0Þg, the likelihood function may be calculated for the initial states For completeness, we now derive the recurrence relation for forward filtering of hidden Markov models. We note that Next we recall that (1) for Markov dynamics, Eq. (B8), O kþ1 ¼ fO 1 ; O 2 ; …; O k g cannot depend on x kþ1 when x k is already given and that (2) the observation noise is white, Eq. (B9). Thus, we have This recurrence relation may be written in vector form: Here, we have introduced the matrix V k ðO k Þ with elements ðxjV k ðO k ÞjyÞ ¼ Pðx kþ1 jy k ÞPðO k jy k Þ ¼ w xy k P y k ðO k Þ; ðB21Þ and we have defined The matrix w xy k describes the transition probabilities for the evolution of the logical qubit state and the vector P x k ðO k Þ describes the observation noise for each logical qubit state. Note that there exist corresponding recurrence relations for the state vector jϱ k Þ and for the likelihood function L k . They take the form where

d. Numerical algorithm
We now provide an efficient numerical algorithm for forward filtering. The algorithm simultaneously calculates the probability vector jϱ k Þ and the log-likelihood function ln L k as follows.
Update the probability distribution jϱ kþ1 Þ ¼ jρ kþ1 Þ= N kþ1 . (6) Update the log-likelihood ratio with ln L kþ1 ¼ ln L k þ ln N kþ1 . (7) Increase k by one and start again. Note that we are only interested in estimating the initial state of the logical qubit. Therefore, the matrix V k ðO k Þ may be normalized at each step by any constant factor independent of the qubit state without affecting the maximumlikelihood estimate. In some cases, this may prevent the values of the log-likelihood function from becoming too large.

APPENDIX C: REPETITIVE READOUT STATISTICS
The hidden Markov model relevant for the repetitive readout discussed in the main text is obtained by specifying the transition matrix w k and the noise vector P k appearing in Eq. (B22).
As discussed in the main text, the qubit undergoes relaxation to its spin ground state on a timescale T 1 . We obtain the value of T 1 by simultaneously fitting the measured single-repetition probabilities P 1 and P 0 shown in Fig. 2(b) to an expression of the form for the case when Q1 is prepared in j1i before the first measurement cycle, and of the form for the case when Q1 is initially prepared in j0i. Here, t is the total readout time after the beginning of the repetitive readout and A and B are constants. The fit is shown in Fig. 2(b) and yields T 1 ¼ 1.8 AE 0.6 s. For a relaxation process, the transition matrix w xy k in the basis fj1Þ; j0Þg takes the form Here, δt rep ¼ 3.263 ms. The noise vector P y k ðO k Þ describing the distribution of the outcome O k for each logical qubit state is given by XIAO XUE et al.
PHYS. REV. X 10, 021006 (2020) 021006-8 Here, PðO k jx k ¼ 1Þ and PðO k jx k ¼ 0Þ are the probability distributions of the readout outcome O k for preparation of the logical qubit in states 1 and 0, respectively. For the soft decoding procedure discussed in the main text, the readout outcome O k is taken to be the peak signal I p (see Appendix D). The distributions of outcomes conditioned on the logical qubit state are then simply the empirically observed distributions of the peak signal PðI p jx k ¼ 1Þ and PðI p jx k ¼ 0Þ displayed in Figs. 3(a) and 3(b) of the main text. For the hard decoding procedure, the readout outcome O k is taken to be the binary value 1 or 0 obtained by thresholding the peak signal at each repetition. The distributions of outcomes conditioned on the logical qubit state are then given by the conditional single-repetition readout error rates ϵ 1 and ϵ 0 : The procedure used to obtain the distributions PðI p jx k ¼ 1Þ and PðI p jx k ¼ 0Þ and the conditional single-repetition readout error rates ϵ 1 and ϵ 0 is detailed in Appendix D.
When ϵ 1 ¼ ϵ 0 and when T 1 → ∞, the hard decoding procedure reduces to a simple majority vote on the binary outcomes [23].

APPENDIX D: SINGLE-REPETITION READOUT CALIBRATION
Since all repetitions are identical, we use the first repetition to calibrate the single-repetition readout. At t 0 ¼ 0, the logical qubit is prepared 10 4 times in state x 0 ¼ 1 and 10 4 times in state x 0 ¼ 0. For each preparation, a readout trace IðtÞ is recorded for a total time of 2.01 ms in steps of δt ¼ 16.38 μs. For all readout times t R ≤ 2.01 ms, we extract the peak signal I p ¼ max t IðtÞ [27] and construct the probability distributions of I p conditioned on the logical qubit state, PðI p jx 0 ¼ 1Þ and PðI p jx 0 ¼ 0Þ. For a given readout time t R , single-repetition readout is performed by calculating the single-repetition log-likelihood ratio: If λðI p Þ > 0 [λðI p Þ < 0], we decide that the qubit state is most likely j1i [j0i]. Therefore, the single-repetition readout error rates ϵ 1 and ϵ 0 for each state are obtained from marginals of the distributions PðI p jx 0 ¼ 1Þ and PðI p jx 0 ¼ 0Þ as follows: PðI p jx 0 ¼ 1Þ; PðI p jx 0 ¼ 0Þ; and the average single-repetition readout error rate is given by The value of ϵ is plotted in Fig. 4 as a function of readout time in the absence and in the presence of artificially added noise. We choose the value of t R that minimizes ϵ. The histograms PðI p jx 0 ¼ 1Þ and PðI p jx 0 ¼ 0Þ and the error rates ϵ 1 and ϵ 0 corresponding to that optimal value of t R are those used throughout the main text. In particular, they are used to perform the Bayesian analysis detailed in Appendix C. Without adding artificial noise to the readout traces, we find ϵ 1 ¼ 32.9 AE 0.5% and ϵ 0 ¼ 16.2 AE 0.4% at an optimal readout time t R ¼ 623 μs. After adding noise, we find ϵ 1 ¼ 41.1 AE 0.5% and ϵ 0 ¼ 42.3 AE 0.5% at an optimal readout time t R ¼ 475 μs. The error bars on ϵ 1 and ϵ 0 are given by the standard deviation of the corresponding binomial error process with N ¼ 10 4 samples, Note that we have assumed perfect preparation of the logical qubit state throughout. For this device, preparation errors have been reported [24] to be ∼1%, smaller than the single-repetition readout errors reported here.
In Appendix E, we argue that the average preparation FIG. 4. Average single-repetition readout error rate ϵ as a function of readout time t R in the absence of added noise (solid blue line) and in the presence of added noise (dashed yellow line). The optimal readout time in the absence (presence) of added noise is indicated by the dot-dashed (dotted) line. In both cases, the shaded areas give the statistical uncertainty (see text). Finally, we note that the small discontinuity in the blue curve at t R ≈ 1.7 ms is a consequence of the finite histogram bin size and has no particular physical significance. error is in fact around 2%-3% (4%-5% for state j1i and < 1% for state j0i) for this run of the experiment. Therefore, the empirically measured single-repetition readout distributions in Figs. 3(a) and 3(b) are close to what they would be without preparation errors and lead to decoding procedures (hard and soft) that are close to optimal. In Appendix E, we give rough estimates for the expected logical readout fidelity that would be measured in the absence of preparation errors.

APPENDIX E: THEORETICAL SIMULATION
To explore the full potential of the repetitive readout discussed in the main text, we perform a numerical simulation. For each qubit state, we randomly sample 10 4 outcome sequences according to the hidden Markov model described in Appendix C. We use the experimentally extracted value of T 1 and the empirically measured peak-signal distributions of Fig. 3(a) as input parameters. A Monte Carlo estimate of the average logical readout error rate ϵ log is obtained by thresholding the simulated outcome sequences as described in Appendix D and then applying the hard decoding procedure detailed in Appendix B.
The conditional logical readout error rates ϵ log 1 and ϵ log 0 are plotted in Fig. 5 as a function of the number of repetitions. The experimental results of Fig. 3(c) are shown for comparison. It is clear from Fig. 5 that the simulated logical readout error rate underestimates the experimentally measured readout error rate as the number of repetitions increases. We believe that this is due to the logical readout error rate becoming comparable to preparation errors for Q1. This assumption is consistent with the simulation and experiment agreeing at low repetition number, where the logical readout error rate is much larger than the expected preparation error (of the order of 1% [24]). In fact, it is possible to estimate the preparation error η by fitting the simulated error rate ϵ sim to the experimentally measured error rate ϵ log using the error composition relation: We find that the simulation and experiment agree for a preparation error of η 1 ≈ 4%-5% for state j1i and of η 0 < 1% for state j0i, giving an average preparation error of approximately η ≈ 2%-3%. The simulation results suggest that in the absence of preparation errors, the measured fidelity could reach ∼98% after 15 repetitions and saturate at > 99% for more than 30 repetitions.

APPENDIX F: ENGINEERING GAUSSIAN DISTRIBUTIONS
It is known that if PðI p j1Þ and PðI p j0Þ are unimodal Gaussian distributions, soft decoding can reduce the number of readout cycles by up to a factor of 2 for arbitrarily large readout SNR. For this advantage to exist, the "bit-flip" conversion errors creating the bimodal features of the measured probability distributions must be small enough that the errors are dominated by the Gaussian noise [23]. Understanding the origin of the conversion errors is thus of great importance. Here, the bit-flip conversion errors may arise from an imperfect CROT gate, imperfect ancilla preparation, or imperfect spin-to-charge conversion in the readout of Q2. The CROT and preparation errors will be generically suppressed as the control and preparation fidelities are improved. The imperfect spin-tocharge conversion in the readout of Q2 may be the most challenging to overcome. In what follows, we discuss avenues to suppress the spin-to-charge conversion errors.
For initialization of Q2 in state j1i, the dot should ideally remain empty at all times. Thus, imperfect spin-to-charge conversion arises from one of the following. In both cases, the experimentally measured logical readout error rate is shown for comparison (dashed yellow line). The bands give the statistical error associated with the binomial statistics of the sampled errors as explained in Appendix D. Moreover, the dotted black curves give the simulated curves corrected to fit the experimental curves accounting for finite preparation errors using Eq. (E1). The best fit values for the preparation errors are η 1 ¼ 4% for state j1i and η 0 ¼ 0.44% for state j0i, resulting in an average preparation error of η ¼ 2.2%.
(1) The finite timescales for an electron to leave or return to the dot. The conversion errors caused by these charge transitions could be suppressed by, e.g., engineering the density of states [66] of the reservoir so that a spin-up electron tunnels out of the quantum dot very rapidly, and so that a spin-down electron tunnels back in the quantum dot very slowly [28]. If that were the case, the dot would remain empty at nearly all times and the bimodality of PðI p j1Þ would be suppressed. (2) Spin relaxation of Q2 before the electron is able to leave the dot. Indeed, the spin relaxation time of Q2 is of order 1 ms, which is only an order of magnitude longer than the observed timescale ∼100 μs for an electron to escape to the reservoir. The strategy to suppress spin relaxation of Q2 during readout depends strongly on its physical origin. However, there is a priori no fundamental reason why the spin relaxation time of Q2 cannot be as large as that of Q1 [although it must be noted that increasing the dot-reservoir coupling as suggested in point (1) may negatively affect the spin relaxation time via cotunneling processes]. For initialization of Q2 in state j0i, the dot should ideally remain occupied at all times. The probability of an electron leaving the dot should in principle be exponentially suppressed in the ratio of the thermal energy to the Zeeman splitting. However, the observed probability of transitioning to the reservoir is too large to be explained by such thermal suppression. Instead, a measurement of the transition probability as a function of the plunger gate voltage of Q2 suggests that the electron escapes the j0i state via an excited quantum dot state. The value of the plunger voltage at which the transitions are suppressed is consistent with an excited state with energy tens of μeV above the ground state. We conjecture that this state is an excited valley state with the same spin (spin-down) as the ground state. Therefore, a likely explanation for the dominant transition mechanism is excitation to a higher valley state (via, e.g., absorption of energy from the biased charge sensor) followed by a transition from the excited valley state to the reservoir. The bimodality of PðI p j0Þ could therefore be suppressed by engineering valley splitting much larger than the charge sensor bias.
The above discussion highlights the importance of understanding the underlying physics for optimization of qubit readout.