\section*{ACKNOWLEDGMENTS}
This research was sponsored by the Army Research Office (ARO) under grant numbers W911NF-17-1-0274 and W911NF-12-1-0607. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the ARO or the US Government. The US Government is authorized to reproduce and distribute reprints for government purposes notwithstanding any copyright notation herein. Development and maintenance of the growth facilities used for fabricating samples is supported by DOE (DE- FG02-03ER46028). B.D. acknowledges funding from NSERC. W.A.C. acknowledges funding from NSERC, CIFAR, and FRQNT. We acknowledge the use of facilities supported by NSF through the University of Wisconsin-Madison MRSEC (DMR-1121288). We acknowledge useful discussions with Matthew G. House, and the members of the Vandersypen group, and technical assistance by R. Schouten and R. Vermeulen.



\section{Bayesian inference \label{sec:bayesianInference}}

In this section, we give an algorithm to efficiently perform optimal Bayesian inference of the logical qubit state using the empirically determined statistics of the repetitive readout.

\subsection{Repetitive readout}

Suppose that the logical qubit is repetitively read out $N$ times, with each repetition having a duration $\delta t_{\textrm{rep}}$. We may consider the state of the logical qubit at the discrete times:
\begin{align}
	t_k = k\,\delta t_{\textrm{rep}}, \;\;\; k=0,1,...,{N},
\end{align}
with the $k^{\textrm{th}}$ repetition taking place in the interval $\left[t_{k-1},t_k\right]$. 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 \leq N$ repetitions follows the stochastic time series:
\begin{align}
	\mathbf{X}_{k} = \left\{ x_0, x_1, \dots, x_k \right\}.
\end{align}
In reality, each individual readout is noisy. Thus, the state $x_k$ at each repetition is not directly recorded. Instead, a noisy observation $\mathcal{O}_k$ is recorded. This gives the observation sequence:
\begin{align}
	\mathbf{O}_k = \left\{\mathcal{O}_0, \mathcal{O}_1, \dots ,\mathcal{O}_{k-1}\right\}.
\end{align}
Note that in general, the observations $\mathcal{O}_k$ need not be scalar.

\subsection{Maximum-likelihood decision}

Our goal is to infer the most likely initial state of the logical qubit from the sequence $\mathbf{O}_k$ of noisy repetitive readout outcomes. This is most easily done by calculating the posterior probability ratio:
\begin{align}
	\frac{P(x_0 = 1|\mathbf{O}_k)}{P(x_0 = 0|\mathbf{O}_k)} = \frac{P(\mathbf{O}_k|x_0 = 1)}{P(\mathbf{O}_k|x_0 = 0)} \frac{P(x_0 = 1)}{P(x_0 = 0)}.
\end{align}
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 {\it maximum a posteriori} decision~\cite{kay1998} reduces to calculating the log-likelihood ratio:
\begin{align}
	\lambda^{\textrm{log}}_k = \ln \frac{P(\mathbf{O}_k|x_0 = 1)}{P(\mathbf{O}_k|x_0 = 0)}. \label{eq:logicalLogLikelihoodRatio}
\end{align}
The initial state is now most likely $1$ if $\lambda^{\textrm{log}}_k > 0$, and it is most likely $0$ if $\lambda^{\textrm{log}}_k < 0$. This results in a maximum-likelihood decision~\cite{kay1998}.

\subsection{Logical readout error rate \label{eq:logicalErrorRate}}

The average logical readout error rate $\epsilon$ is given by
\begin{align}
	\epsilon^{\textrm{log}} = \frac{1}{2}\left(\epsilon^{\textrm{log}}_1 + \epsilon^{\textrm{log}}_0\right).
\end{align}
Here, $\epsilon^{\textrm{log}}_1$ and $\epsilon^{\textrm{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:
\begin{align}
\begin{split}
	\epsilon^{\textrm{log}}_1 = P(\lambda^{\textrm{log}}_k < 0| x_0 = 1), \\
	\epsilon^{\textrm{log}}_0 = P(\lambda^{\textrm{log}}_k > 0| x_0 = 0).
\end{split}	
\end{align}
An experimental estimate of the logical readout error rate $\epsilon^{\textrm{log}}_1$ ($\epsilon^{\textrm{log}}_0$) is obtained by preparing the logical qubit in state $\ket{1}$ ($\ket{0}$) $10^4$ times, measuring the record $\mathbf{O}_k$ and calculating $\lambda^{\textrm{log}}_k$ for each attempt, and counting the number of times where $\lambda_k^{\textrm{log}} < 0$ ($\lambda_k^{\textrm{log}} > 0$). Finally, we note that the average readout fidelity quoted in the main text is defined as $F^{\textrm{log}} = 1 - \epsilon^{\textrm{log}}$, while the logical visibility is $\mathcal{V}^{\textrm{log}} = 1 - 2\epsilon^{\textrm{log}}$.

\subsection{Calculating the log-likelihood ratio}

To calculate $\lambda^{\textrm{log}}_k$, the statistics of the observations $\mathbf{O}_k$ given the initial state of the logical qubit must be known. More precisely, the probability distributions $P(\mathbf{O}_k|x_0 = 1)$ and $P(\mathbf{O}_k|x_0 = 0)$ appearing in Eq.~\eqref{eq:logicalLogLikelihoodRatio} 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~\cite{hann2018,nakajima2019,elder2019,bultink2019,yoneda2019}. The hidden Markov model provides a direct connection between the single-repetition probability distributions, $P(\mathcal{O}_k|x_k)$, and the probability distributions for the full measurement record, $P(\mathbf{O}_k|x_0)$, accounting for the dynamics of the logical qubit.  From $P(\mathbf{O}_k|x_0)$, the log-likelihood ratio can be evaluated directly using Eq.~\eqref{eq:logicalLogLikelihoodRatio}.  As described in Sec.~\ref{sec:repetitiveStatistics}, following Eq.~\eqref{eq:softNoiseVector}, here we have determined $P(\mathcal{O}_k|x_k)$ empirically. However, note that these distributions can also be found from an appropriate dynamical model of the readout. See for instance Refs.~\cite{gambetta2007,gammelmark2014,ng2014,danjou2014,danjou2016} and others, where hidden Markov models are used to determine $P(\mathcal{O}_k|x_k)$ at the level of a single repetition.

\subsubsection{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}$:
\begin{align}
	P(x_{k+1}|\mathbf{X}_k) = P(x_{k+1}|x_k). \label{eq:markovCondition}
\end{align}
Because the ancilla qubit is reinitialized after each repetition, the noisy observations $\mathcal{O}_k$ are independent from each other and depend only on the state of the logical qubit at time $t_k$:
\begin{align}
	P(\mathbf{O}_k|\mathbf{X}_k) =  \prod_{l=0}^{k-1} P(\mathcal{O}_l|x_l). \label{eq:whiteNoise}
\end{align}
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 $\left\{P(x_{k+1}|x_k), P(\mathcal{O}_k|x_k), P(x_k)\right\}$ defines a `Hidden Markov Model'.


\subsubsection{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~\cite{gambetta2007,gammelmark2013,gammelmark2014,danjou2014,danjou2016,hann2018,nakajima2019,elder2019,bultink2019,yoneda2019}. 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
\begin{align}
	\varrho_k(x_k) = P(x_k|\mathbf{O}_{k}).
\end{align}
Using Bayes' rule, the distribution $\varrho_k(x_k)$ may be rewritten as
\begin{align}
	\varrho_k(x_k) = \frac{P(x_k,\mathbf{O}_{k})}{P(\mathbf{O}_{k})} = \frac{P(x_k,\mathbf{O}_{k})}{\sum_y P(y,\mathbf{O}_{k})} = \frac{\ell_k(x_k)}{\sum_y \ell_k(y)}. \label{eq:likelihoodToState}
\end{align}
Here,
\begin{align}
	\ell_k(x_k) = P(x_k,\mathbf{O}_k)
\end{align}
is the joint probability distribution of the state $x_k$ and of the previous observations. One advantage of calculating $\ell_k(x_k)$ instead of $\varrho_k(x_k)$ is that $\ell_k(x_k)$ obeys a linear recurrence relation while $\varrho_k(x_k)$ obeys a non-linear recurrence relation (see Sec.~\ref{sec:filteringEquations}).

We note that the denominator in Eq.~\eqref{eq:likelihoodToState} is the likelihood function
\begin{align}
	\mathcal{L}_k = P(\mathbf{O}_k) = \sum_{x_k} \ell_k(x_k). \label{eq:likelihoodFunction}
\end{align}
Eq.~\eqref{eq:likelihoodToState} now takes the form
\begin{align}
	\ell_k(x_k) = \varrho_k(x_k) \times \mathcal{L}_k. \label{eq:likelihoodToState2}
\end{align}
It is convenient to introduce the vector notation
\begin{align}
\begin{split}
	\ketR{\varrho_k} = \sum_x \varrho_k(x) \ketR{x}, \;\;\;\ketR{\ell_k} = \sum_x \ell_k(x) \ketR{x},
\end{split} 
\end{align}
where $\left\{\ketR{x}\right\}$ is a set of basis vectors representing the classical logical qubit states $x$. Eq.~\eqref{eq:likelihoodToState2} is then rewritten as
\begin{align}
	\ketR{\ell_k} = \mathcal{L}_k  \times \ketR{\varrho_k}.\label{eq:likelihoodToStateVec}
\end{align}
The likelihood function, Eq.~\eqref{eq:likelihoodFunction}, may compactly be written as
\begin{align}
	\mathcal{L}_k = \Tr \ketR{\ell_k}. \label{eq:likelihoodFunctionVec}
\end{align}
Here, the trace $\Tr$ of a vector is the sum of its elements. Choosing the basis $\left\{\ketR{1},\ketR{0}\right\}$, the likelihood function may be calculated for the initial states $x_0 = 1$ and $x_0 = 0$ of the logical qubit by setting $\ketR{\varrho_0} = \ketR{\ell_0} = (1,0)^\textrm{T}$ and $\ketR{\varrho_0} = \ketR{\ell_0} = (0,1)^\textrm{T}$, respectively. This enables the maximum-likelihood decision discussed following Eq.~\eqref{eq:logicalLogLikelihoodRatio}.


\subsubsection{The filtering equations \label{sec:filteringEquations}}

For completeness, we now derive the recurrence relation for forward filtering of hidden Markov models. We note that
\begin{align}
\begin{split}
	\ell_{k+1}(x_{k+1}) = P(x_{k+1},\mathbf{O}_{k+1}) &= \sum_{x_k} P(x_{k+1},\mathbf{O}_{k+1}|x_k)P(x_k) \\
	&= \sum_{x_k} P(\mathbf{O}_{k+1}|x_{k+1},x_k)P(x_{k+1}|x_k)P(x_k).
\end{split}
\end{align}
Next we recall that 1) $\mathbf{O}_{k+1} = \left\{\mathcal{O}_1,\mathcal{O}_2,\dots,\mathcal{O}_k \right\}$ does not depend on $x_{k+1}$ by causality and that 2) the observation noise is white, Eq.~\eqref{eq:whiteNoise}. Thus, we have
\begin{align}
\begin{split}
	\ell_{k+1}(x_{k+1}) &= \sum_{x_k} P(\mathbf{O}_{k+1}|x_k)P(x_{k+1}|x_k)P(x_k) \\
	&= \sum_{x_k} P(\mathcal{O}_k|x_k)P(\mathbf{O}_k|x_k)P(x_{k+1}|x_k)P(x_k) \\
	&= \sum_{x_k} P(\mathcal{O}_k|x_k)P(x_{k+1}|x_k)\ell_k(x_k).
\end{split}
\end{align}
This recurrence relation may be written in vector form
\begin{align}
   \ketR{\ell_{k+1}} = V_k(\mathcal{O}_k) \ketR{\ell_k}.
\end{align}
Here, we have introduced the matrix $V_k(\mathcal{O}_k)$ with elements
\begin{align}
   &\braR{x}V_k(\mathcal{O}_k)\ketR{y} = P(x_{k+1}|y_k) P(\mathcal{O}_k|y_k) = w_k^{x y}\, \mathcal{P}_k^y(\mathcal{O}_k),
\end{align}
and we have defined
\begin{align}
\begin{split}
   &w_k^{x y} = P(x_{k+1}|y_k), \\
   &\mathcal{P}_k^x(\mathcal{O}_k) = P(\mathcal{O}_k|x_k). \label{eq:modelMatrices}
\end{split}
\end{align}
The matrix $w_k^{x y}$ describes the transition probabilities for the evolution of the logical qubit state and the vector $\mathcal{P}_k^x(\mathcal{O}_k)$ describes the observation noise for each logical qubit state. Note that there exist corresponding recurrence relations for the state vector $\ketR{\varrho_k}$ and for the likelihood function $\mathcal{L}_k$. They take the form
\begin{align}
	\ketR{\varrho_{k+1}} = \frac{1}{\mathcal{N}_{k+1}} \ketR{\tilde{\varrho}_{k+1}}, \;\;\; \mathcal{L}_{k+1} =  \mathcal{N}_{k+1} \times \mathcal{L}_k,
\end{align}
where
\begin{align}
	\ketR{\tilde{\varrho}_{k+1}} = V_k(\mathcal{O}_k) \ketR{\varrho_k}, \;\;\; \mathcal{N}_{k+1} = \Tr\ketR{\tilde{\varrho}_{k+1}}.
\end{align}

\subsubsection{Numerical algorithm \label{sec:numericalAlgorithm}}

We now provide an efficient numerical algorithm for forward filtering. The algorithm simultaneously calculates the probability vector $\ketR{\varrho_k}$ and the log-likelihood function $\ln \mathcal{L}_k$ as follows:
\begin{enumerate}
	\item Set $k=0$.
	\item Calculate the matrix $V_k(\mathcal{O}_k)$.
	\item Calculate $\ketR{\tilde{\varrho}_{k+1}} = V_k(\mathcal{O}_k) \ketR{\varrho_k}$.
	\item Calculate the norm $\mathcal{N}_{k+1} = \Tr \ketR{\tilde{\varrho}_{k+1}}$.
	\item Update the probability distribution $\ketR{\varrho_{k+1}} = \ketR{\tilde{\varrho}_{k+1}}/\mathcal{N}_{k+1}$.
	\item Update the log-likelihood ratio with $\ln\mathcal{L}_{k+1} = \ln\mathcal{L}_{k} + \ln \mathcal{N}_{k+1}$.
	\item Increase $k$ by one and start again.
\end{enumerate}
Note that we are only interested in estimating the initial state of the logical qubit. Therefore, the matrix $V_k(\mathcal{O}_k)$ may be normalized at each step by any constant factor independent of the qubit state without affecting the maximum-likelihood estimate. In some cases, this may prevent the values of the log-likelihood function from becoming too large. 

\section{Repetitive readout statistics \label{sec:repetitiveStatistics}}

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 $\mathcal{P}_k$ appearing in Eq.~\eqref{eq:modelMatrices}.

As discussed in the main text, the qubit undergoes relaxation to its spin ground state on a time scale $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.~2b to an expression of the form
\begin{align}
\begin{split}
P_1(t) &= A \epsilon^{-t/T_1} + B, 
\end{split}
\end{align}
for the case when Q1 is prepared in $\ket{1}$ before the first measurement cycle, and of the form
\begin{align}
P_0(t) &= B.
\end{align}
for the case when Q1 is initially prepared in $\ket{0}$. 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.~2b and yields $T_1 = 1.8 \pm 0.6 s$. For a relaxation process, the transition matrix $w_k^{x y}$ in the basis $\left\{\ketR{1},\ketR{0}\right\}$ takes the form:
\begin{align}
	w_k =
	\textrm{exp}
	\left[
	\left(
	\begin{array}{cc}
	-1 & 0\\
	 1 & 0
	\end{array}
	\right)
	\frac{\delta t_{\textrm{rep}}}{T_1}
	\right]. \label{eq:lindbladian}
\end{align}
Here, $\delta t_{\textrm{rep}} = 3.263\,\textrm{ms}$.

The noise vector $\mathcal{P}_k^y(\mathcal{O}_k)$ describing the distribution of the outcome $\mathcal{O}_k$ for each logical qubit state is given by
\begin{align}
	\mathcal{P}_k(\mathcal{O}_k) =
	\left(
	\begin{array}{c}
	P(\mathcal{O}_k|x_k = 1) \\
	P(\mathcal{O}_k|x_k = 0)
	\end{array}
	\right). \label{eq:softNoiseVector}
\end{align}
Here, $P(\mathcal{O}_k|x_k = 1)$ and $P(\mathcal{O}_k|x_k = 0)$ are the probability distributions of the readout outcome $\mathcal{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 $\mathcal{O}_k$ is taken to be the peak signal $I_p$ (see Sec.~\ref{sec:singleRepetition}). The distributions of outcomes conditioned on the logical qubit state are then simply the empirically observed distributions of the peak signal $P(I_p|x_k = 1)$ and $P(I_p|x_k = 0)$ displayed in Figs.~3a-b of the main text. For the hard decoding procedure, the readout outcome $\mathcal{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 $\epsilon_1$ and $\epsilon_0$:
\begin{align}
\begin{array}{ll}
	P(1|x_k = 1) = 1 - \epsilon_1,  &P(1|x_k = 0) = \epsilon_0, \\
	P(0|x_k = 1) = \epsilon_1,  &P(0|x_k = 0) = 1-\epsilon_0 . \label{eq:hardNoiseVector}
\end{array}
\end{align}
The procedure used to obtain the distributions $P(I_p|x_k = 1)$ and $P(I_p|x_k = 0)$ and the conditional single-repetition readout error rates $\epsilon_1$ and $\epsilon_0$ is detailed in Sec.~\ref{sec:singleRepetition}.

\section{Single-repetition readout calibration \label{sec:singleRepetition}}

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\,\textrm{ms}$ in steps of $\delta t = 16.38\,\mu\textrm{s}$. For all readout times $t_R \leq 2.01\,\textrm{ms}$, we extract the peak signal $I_p = \max_t I(t)$~\cite{elzerman2004} and construct the probability distributions of $I_p$ conditioned on the logical qubit state, $P(I_p|x_0=1)$ and $P(I_p|x_0=0)$. For a given readout time $t_R$, single-repetition readout is performed by calculating the single-repetition log-likelihood ratio
\begin{align}
	\lambda(I_p) = \ln \frac{P(I_p|x_0=1)}{P(I_p|x_0=0)}.
\end{align}
If $\lambda(I_p) > 0$ [$\lambda(I_p) < 0$], we decide that the qubit state is most likely $\ket{1}$ [$\ket{0}$]. Therefore, the single-repetition readout error rates $\epsilon_1$ and $\epsilon_0$ for each state are obtained from marginals of the distributions $P(I_p|x_0 = 1)$ and $P(I_p|x_0 = 0)$ as follows:
\begin{align}
\begin{split}
	\epsilon_1 = P(\lambda^{\textrm{log}}<0|x_0 = 1) = \sum_{\left\{I_p | \lambda(I_p)<0\right\}} P(I_p|x_0 = 1), \\
	\epsilon_0 = P(\lambda^{\textrm{log}}>0|x_0 = 0)= \sum_{\left\{I_p|\lambda(I_p)>0\right\}} P(I_p|x_0 = 0), \label{eq:conditionalSingleShot}
\end{split}
\end{align}
and the average single-repetition readout error rate is given by:
\begin{align}
	\epsilon = \frac{1}{2}\left(\epsilon_1 + \epsilon_0\right)
\end{align}
The value of $\epsilon$ is plotted in Fig.~\ref{fig:figS1} 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 $\epsilon$. The histograms $P(I_p|x_0 = 1)$ and $P(I_p|x_0 = 0)$ and the error rates $\epsilon_1$ and $\epsilon_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 Sec.~\ref{sec:repetitiveStatistics}. Without adding artifical noise to the readout traces, we find $\epsilon_1 = 32.9 \pm 0.5\%$ and $\epsilon_0 = 16.2 \pm 0.4\%$ at an optimal readout time $t_R = 623\,\mu\textrm{s}$. After adding noise, we find $\epsilon_1 = 41.1\pm 0.5 \%$ and $\epsilon_0 = 42.3\pm 0.5\%$ at an optimal readout time $t_R = 475\,\mu\textrm{s}$. The error bars on $\epsilon_1$ and $\epsilon_0$ are given by the standard deviation of the corresponding binomial error process with $N = 10^4$ samples, $\delta \epsilon_{1} = \sqrt{\epsilon_{1}(1-\epsilon_{1})/N}$ and $\delta \epsilon_{0} = \sqrt{\epsilon_{0}(1-\epsilon_{0})/N}$.
\begin{figure} 
\center{\includegraphics[width=\columnwidth]{figS1}}
\caption{Average single-repetition readout error rate $\epsilon$ 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 \approx 1.7\,\textrm{ms}$ is a consequence of the finite histogram bin size and has no particular physical significance.}
\label{fig:figS1}
\end{figure}

Note that we have assumed perfect preparation of the logical qubit state throughout. For this device, preparation errors have been reported~\cite{watson2018} to be $\sim 1\%$, smaller than the single-repetition readout errors reported in Sec.~\ref{sec:singleRepetition}. In Sec.~\ref{sec:theoreticalSimulation}, we argue that the average preparation error is in fact around $2-3\%$ ($4-5\%$ for state $\ket{1}$ and $< 1\%$ for state $\ket{0}$) for this run of the experiment. Therefore, the empirically measured single-repetition readout distributions in Figs.~3a-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 Sec.~\ref{sec:theoreticalSimulation}, we give rough estimates for the expected logical readout fidelity that would be measured in the absence of preparation errors.

\section{Theoretical simulation \label{sec:theoreticalSimulation}}

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 Sec.~\ref{sec:repetitiveStatistics}. We use the experimentally extracted value of $T_1$ and the empirically measured peak-signal distributions of Fig.~3a as input parameters. A Monte-Carlo estimate of the average logical readout error rate $\epsilon^{\textrm{log}}$ is obtained by thresholding the simulated outcome sequences as described in Sec.~\ref{sec:singleRepetition} and then applying the hard decoding procedure detailed in Sec.~\ref{sec:bayesianInference}.
\begin{figure} 
\center{\includegraphics[width=0.8\columnwidth]{figS2}}
\caption{Simulated logical readout error rate (solid blue line) as a function of the number of repetitions for (a) state $\ket{1}$ and (b) state $\ket{0}$. 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 Sec.~\ref{sec:singleRepetition}. Moreover, the dotted black curves give the simulated curves corrected to fit the experimental curves accounting for finite preparation errors using Eq.~\eqref{eq:errorComposition}. The best fit values for the preparation errors are $\eta_1 = 4\%$ for state $\ket{1}$ and $\eta_0 = 0.44\%$ for state $\ket{0}$, resulting in an average preparation error of $\eta = 2.2\%$. }
\label{fig:figS2}
\end{figure}

The conditional logical readout error rates $\epsilon_1^{\textrm{log}}$ and $\epsilon_0^{\textrm{log}}$ are plotted in Fig.~\ref{fig:figS2} as a function of the number of repetitions. The experimental results of Fig.~3c are shown for comparison. It is clear from Fig.~\ref{fig:figS2} 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\%$~\cite{watson2018}). In fact, it is possible to estimate the preparation error $\eta$ by fitting the simulated error rate $\epsilon^{\textrm{sim}}$ to the experimentally measured error rate $\epsilon^{\textrm{log}}$ using the error composition relation
\begin{align}
  \epsilon^{\textrm{log}} = (1-2\eta)\epsilon^{\textrm{sim}} + \eta. \label{eq:errorComposition}
\end{align}
We find that the simulation and experiment agree for a preparation error of $\eta_1 \approx 4-5\%$ for state $\ket{1}$ and of $\eta_0 < 1\%$ for state $\ket{0}$, giving an average preparation error of approximately $\eta \approx 2-3\%$. The simulation results suggest that in the absence of preparation errors, the measured fidelity could reach $\sim 98\%$ after 15 repetitions and saturate at $>99\%$ for more than 30 repetitions. 


\section{Engineering Gaussian distributions}

It is known that if $P(I_p|1)$ and $P(I_p|0)$ are unimodal Gaussian distributions, soft decoding can reduce the number of readout cycles by up to a factor of two 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~\cite{danjou2014-2}. 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-to-charge 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 $\ket{1}$, the dot should ideally remain empty at all times. Thus, imperfect spin-to-charge conversion arises either from
\begin{enumerate}
\item[1)] the finite time scales for an electron to leave or re-enter the dot. The conversion errors caused by these charge transitions could be suppressed by, e.g., engineering the density of states~\cite{mottonen2010} 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~\cite{danjou2014}. If that were the case, the dot would remain empty at nearly all times and the bimodality of $P(I_p|1)$ would be suppressed.

\item[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\,\textrm{ms}$, which is only an order of magnitude longer than the observed time scale $\sim 100\,\mu\textrm{s}$ for an electron to escape to the reservoir. The strategy to suppress spin relaxation of Q2 during readout depends strongly its physical origin. However, there is \emph{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).
\end{enumerate}

For initialization of Q2 in state $\ket{0}$, 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 $\ket{0}$ 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 $\mu\textrm{eVs}$ 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|0)$ 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.


