{'fraction_non_alphanumeric': 0.051716335897601655, 'fraction_numerical': 0.017260327105824553, 'mean_word_length': 4.352768166089965, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Soft Decoding of a Qubit Readout Apparatus

Qubit readout is commonly performed by thresholding a collection of analog detector signals to obtain a sequence of single-shot bit values. The intrinsic irreversibility of the mapping from analog to digital signals discards soft information associated with an \emph{a posteriori} confidence that can be assigned to each bit value when a detector is well characterized. Accounting for soft information, we show significant improvements in enhanced state detection with the quantum repetition code as well as quantum state or parameter estimation. These advantages persist in spite of non-Gaussian features of realistic readout models, experimentally relevant small numbers of qubits, and finite encoding errors. These results show useful and achievable advantages for a wide range of current experiments on quantum state tomography, parameter estimation, and qubit readout.

PACS numbers: 03.65.Ta,03.67.Ac,03.65.Wj In most quantum-measurement tasks, the goal is to extract information encoded in a stream of quantum states. For a single-qubit expectation value, the stream is a collection of identically prepared single qubits. To perform a Bell-inequality measurement, the stream is a collection of entangled qubit pairs. For quantum error detection or correction, the stream consists of many qubits that make up the code, on which multiqubit syndrome measurements are performed. In practice, in all of these scenarios, information is commonly extracted by measuring individual qubits or joint observables in a single shot [1][2][3][4][5][6][7][8]. While this strategy can be optimal for extracting a single bit of information, e.g., the state |± of a single qubit, it is generally suboptimal when considering streams of data. A single-shot qubit readout typically involves the irreversible conversion of an analog outcome O from a readout apparatus (e.g., a current or voltage pulse, the quadrature of a microwave tone, etc.) into a binary outcome c ± via thresholding [9][10][11][12][13][14][15][16][17] (see Fig. 1). Thresholding erases information about the posterior probability P (±|O) that can be ascribed to each bit value given O. In contrast, when a sequence of analog readout outcomes O is fed into a decoder that accepts analog values as input, the frequency of decoding errors can be significantly reduced [18]. Such soft-decoding techniques have been central to the development of capacity-achieving classical codes [19] now used in deep-space communications and high-bandwidth 3G/4G cellular networks. Soft-decision decoding has been applied to quantum codes [20,21] and to schemes for fault-tolerant quantum computing [22], in which the soft decision is made by correlating multiple single-shot qubit readout outcomes. Soft decoding has also been identified as an important tool for continuousvariable quantum key distribution [23].
While soft-decoding methods are routinely applied to The single-shot readout thresholding procedure (threshold ν) erases information by irreversibly converting a continuum of analog readout outcomes O into a single binary value c±. The conditional probability distributions P (O|±) are typical of the readout performed in Refs. [11,24] and described in Ref. [25]. classical noisy signals for communication applications, they have not seen widespread application in qubit readout methods. Here, we exploit the fact that the qubit readout itself can be treated as a communication channel characterized by a pair of conditional probability distributions P (O|±) for the analog signal O (see Fig. 1), even if the readout apparatus is designed to perform a binary measurement. Soft decoding of a readout appa-ratus can lead to significant improvements in a number of quantum-information tasks. To achieve these improvements, the physical characteristics of the readout dynamics and the noise must be well understood to determine the distributions P (O|±). Readout errors are especially sensitive to the tails of these distributions, so it is important to understand non-Gaussian features (fat tails or bimodality) to reap the benefits of soft decoding. Crucially, the distributions P (O|±), which must already be known to characterize the single-shot readout fidelity, can be measured or modeled accurately for several state-ofthe-art qubit implementations [9][10][11][12][13][14][15][16][17][25][26][27][28].
In this Letter, we explicitly demonstrate the advantages of soft decoding through two experimentally significant examples: enhanced state detection via the quantum repetition code, and state or parameter estimation. In particular, the number of qubits required for efficient enhanced state detection can be reduced, through data processing alone, by up to a factor of 2, an advantage which persists for a small number of qubits and finite encoding errors. Because additional qubits are an expensive resource, this result is of immediate practical importance. We also extend a result of Ref. [29] by making use of soft information to further improve the precision of measurements of Pauli operators required for state tomography. In both cases, we benchmark the improvement by comparing the performance of the widely used and efficient maximum-likelihood estimation [30] when applied to analog instead of thresholded qubit readout outcomes. Crucially, we find and characterize significant improvements not only for the idealized Gaussian readout, but also for the realistic non-Gaussian readout investigated in Ref. [25] and relevant to many experiments [11,14,24,26].
Enhanced state detection.− In the quantum repetition code, a logical qubit (with basis {|0 , |1 }) in the state |ψ = α 0 |0 + α 1 |1 is encoded into N physical qubits (with basis {|+ , |− }): |ψ N = α 0 |− ⊗N + α 1 |+ ⊗N [31][32][33]. The redundant outcomes of independent measurements of the N physical qubits are then correlated to reduce measurement errors. The simplest approach is to measure each qubit in a single shot and assign the binary value c i = c ± to the ith qubit. When the encoded states |0 and |1 are equally likely a priori, the optimal approach is to calculate the likelihood ratio [34] of the data {c i }: In Eq. (1), P (c i |±) is the probability to obtain the value c i given that the ith qubit is in the state |± . The projected state of the logical qubit is most likely |1 (|0 ) if Λ c > 1 (Λ c < 1). We may rewrite the likelihood ratio, Eq. (1), in terms of the conditional single-shot error rates ± ≡ P (c ∓ |±) < 1/2: where n + is the number of measurements for which the outcome c + occurred. For a binary symmetric readout, = ± , Eq. (2) results in a simple majority vote since n + > N/2 (n + < N/2) implies Λ c > 1 (Λ c < 1).
Equation (2) is a maximum-likelihood estimator applied to single-shot readout outcomes. However, a physical readout apparatus typically yields an analog readout outcome O i that need not be thresholded to a binary value c i . The observable O i could be, for example, the time average of a fluorescence signal [9,13,33], the peak of a current pulse through a single-electron transistor or quantum point contact [11,24,26], the quadrature of a microwave tone [15,16,27], or even the likelihood ratio of a single-shot readout [9,17,25,28,35]. Thresholding leads to an irreversible loss of information about the confidence P (±|O i ) in each bit value. Soft decoding, which makes full use of that information, is achieved by instead applying the maximum-likelihood estimator to the analog readout outcomes: where P (O i |±) is the probability density for outcome O i given that the ith qubit is in the state |± . To take full advantage of soft decoding, it is necessary to have an accurate representation of the conditional probability distributions P (O|±) for the analog qubit readout outcomes. A common idealization for a readout is the Gaussian readout, P (O|±) = r/2π exp −(O ∓ 1) 2 r/2 , where r is the power signalto-noise ratio. Soft decoding of the Gaussian readout with maximum-likelihood estimators such as Eqs. (1) and (3) has been extensively studied in the context of classical communication theory [18,34]. Since a projective measurement collapses |ψ N to either |+ ⊗N or |− ⊗N , the advantage obtained by soft decoding of the readout apparatus translates directly to the quantum case. More precisely, for r 1, the number of qubits N c and N O required to achieve a target error rate ε using Λ c and Λ O , respectively, are related (for N c odd) by [36]: Thus, soft decoding can reduce the number of required physical qubits by up to a factor of 2 compared to the majority vote (asymptotically, N c ∼ 2N O , or alternatively, for fixed N , ε O ∼ ε 2 c up to a logarithmic prefactor in ε c ). Intuitively, this advantage arises since the majority vote ignores all information contained in strings for which more than half of the bits are corrupted, while soft decoding associates every string with some confidence. A similar asymptotic advantage exists for arbitrary block codes transmitted through a Gaussian communication channel [18]. Importantly, Eq. (4) is valid for the regime of reasonably small N relevant to recent experiments [2, 5-8, 37, 38]. Moreover, the form of the subleading corrections in Eq. (4) suggests that they can be small for realistic experimental values of r. We have indeed verified, using the exact analytical expressions for the error rates [36], that an advantage persists for low signal-to-noise ratio and relatively small N . For example, we require N O = 6 instead of N c = 9 to reach an error rate ε < 3 × 10 −4 for r = 2.
Realistic qubit readouts are typically not well represented by Gaussian probability distributions [9,11,13,25,28]. To verify that soft decoding of the readout apparatus still provides an advantage in experimentally relevant cases, we apply the estimators in Eqs. (1) and (3) to the realistic non-Gaussian "peak-signal" readout implemented in Refs. [11,24] and for which the distributions P (O|±) were analyzed in Ref. [25]. In this measurement, the analog outcome O is the peak value of a finite-duration current pulse signalling the excited state |+ and subject to Gaussian white noise (see Ref. [36] for a summary). A typical pair of distributions for this readout is illustrated in Fig. 1. Even though the distribution P (O|+) has strong non-Gaussian features, soft decoding still gives an appreciable advantage. For example, Monte Carlo simulations with 10 6 random records show that, similar to the Gaussian readout, we require N O = 6 instead of N c = 9 to reach an error rate ε < 0.05 for a signal-to-noise ratio r = 2 [36].
To account for errors during encoding, we allow for uncorrelated bit flips with probability η for both states |± . The probability distributions for the analog readout outcomes then become giving a modified version of the likelihood ratio, Eq. (3). We find that when encoding errors η are sufficiently large, the soft-decoding procedure reduces to a simple thresholding procedure [36]. However, for the Gaussian readout, soft decoding can still give an advantage over thresholding if when r 1. Thus, the encoding bit-flip rate must merely be smaller than some power of the single-shot readout error rate ( ∼ e − r 2 up to logarithmic corrections). To verify this, we have performed a Monte Carlo simulation of the error rate for the Gaussian readout by generating 10 7 random measurement records taking into account the bit-flip rate η [36]. For example, we find that for r = 2 and η = 1%, we require N O = 6 instead of N c = 9 qubits to achieve ε < 8 × 10 −4 . Similarly, for the peak-signal readout described in Ref. [25], we find from a simulation of 10 6 random measurement records that for a signal-tonoise ratio of r = 2 and η = 5%, we require N O = 6 instead of N c = 9 qubits to achieve ε < 0.08 [36].
State and parameter estimation.− Many quantum information processing applications, such as state and process tomography [1,4,29,39,40] and parameter estimation [41], benefit from accurate and precise estimation of qubit observables (e.g., the Pauli operators). Analog data processing has been used extensively, e.g., for parameter [42] and state [43] estimation in quantum optical systems, where it is often natural to process quasicontinuous field quadratures or photon counts. For many qubit systems, the common approach is instead to threshold the data. Thresholding the data is generally suboptimal, as we now illustrate.
For definiteness, we consider estimating the quantum expectation value s 0 = σ z of the single-qubit Pauli operator σ z (in the basis |± ) from the independent readout of N identically prepared copies of a qubit. As in the case of the repetition code, we compare the standard maximum-likelihood estimator (MLE) [30] applied to the analog data set {O i } instead of the thresholded data set {c i } in order to benchmark the improvement. In both cases, the MLE is the value s that maximizes the likelihood function In practice, the MLE is obtained by maximizing the equivalent log-likelihood function (s) = N −1 ln L(s). The MLE is asymptotically unbiased, normally distributed, and minimizes the variance [i.e. saturates the Cramér-Rao bound, see Eq. (7), below] for large N [30].
When the analog data are thresholded, the MLE is the (bias-corrected) thresholded average s TA = N −1 N i=1 c i considered, e.g., in Ref. [29]. This estimate does not make use of the soft information contained in the distributions P (O|±) for reconstruction of s 0 . In contrast, the softdecoded estimate s SD obtained by applying the MLE to the analog data set makes full use of the distributions P (O|±). In Ref. [29], the alternative soft average s SA = N −1 N i=1 O i was also employed as an estimator for s 0 , but this approach is also suboptimal [36].
We will measure the deviation of an estimate s from the true value s 0 with the mean squared error (MSE) ζ, given by the sum of the variance and of the squared bias of the estimator, ζ ≡ (s − s ) 2 + ( s − s 0 ) 2 . Here, the statistical average is taken with respect to the distribution of outcomes: For this distribution, (s) is a concave function with a unique maximum. A general expression for the asymptotic MSE of the thresholded average s TA can be derived [36]. For the Gaussian readout, it takes the simple form reported in Ref. [29], ζ TA ∼ [(1 − 2 ) −2 − s 2 0 ]/N . For the soft-decoded MLE estimate, the asymptotic MSE can be computed directly from the Fisher information of P (O|s 0 ): Here, we use the symbol "∼" to indicate a strict asymptotic equality. From Eqs. (6) and (7), an explicit asymptotic form for ζ SD can be found in terms of the distributions P (O|±) [36]: In Eq. (8), the integral I contains all information about the noise introduced by the readout apparatus. The remaining contribution when I = 0 is the quantum shot noise (projection noise), which reflects the choice of a particular measurement basis. Since I has the form of an overlap integral, it is especially important to understand the tails of the (generally non-Gaussian) readout distributions P (O|±).
To quantitatively verify that soft decoding can improve state estimation, we set s 0 = 0 and evaluate Eq. (8) numerically for both the Gaussian readout and the peak-signal readout of Ref. [25]. We plot the asymptotic MSE as a function of the signal-to-noise ratio r in Fig. 2. We also plot the asymptotic MSE of the bias-corrected thresholded average, ζ TA . Figure 2 confirms that soft decoding always outperforms thresholding (i.e., ζ SD < ζ TA ). As r increases, ζ TA and ζ SD exhibit an approximate power-law approach to the projectionnoise limit for the (non-Gaussian) peak-signal readout of Ref. [25], whereas they decrease exponentially for the Gaussian readout. In the intermediate regime for r, there is a clear advantage in soft decoding with the MLE for both readouts, demonstrating substantial benefits in the experimentally relevant regime of signal-to-noise ratios, r ∼ 1 for the Gaussian readout [29], and r ∼ 10 for the peak-signal readout.
To show that the asymptotic advantage persists when N is finite, we calculate ζ from a Monte Carlo simulation with N = 100. We first randomly generate 5 × 10 4 measurement records {O i } from the distribution N i=1 P (O i |s 0 ) for both the Gaussian readout and non-Gaussian peak-signal readout of Ref. [25]. For each measurement record, we calculate s TA and optimize the log-likelihood function (s) to obtain s SD . We then directly obtain ζ from the variance and bias of the simulated estimates. The results are displayed (open symbols) in Fig. 2 for s 0 = 0. The simulated data points coincide with the asymptotic predictions.
In conclusion, we have shown that making use of the soft information contained in the analog outcomes of a qubit readout apparatus, as opposed to irreversibly thresholding each qubit to a binary value, can significantly improve the performance of quantum information processing tasks involving the measurement of many  [36], as a function of the signal-to-noise ratio r assuming s0 = σz = 0 for (a) the Gaussian readout and (b) the "peak-signal" readout of Ref. [25]. The finite-N MSEs of the thresholded average (magenta squares) and soft-decoded estimate (gold triangles) are obtained from 5 × 10 4 randomly generated measurement records of N = 100 qubits. Insets: Asymptotic MSEs on a logarithmic scale.
qubits. We have focused on two examples of practical importance. In the case of enhanced state detection with the quantum repetition code, the number of qubits required to achieve a given error rate can be reduced by up to a factor of 2 through improved data processing alone. Importantly, we have shown that an advantage persists for small numbers of qubits and finite encoding errors. In addition, we have shown that optimal processing of analog qubit readout outcomes can appreciably increase the precision on the measurement of qubit observables (e.g., the Pauli operators). Crucially, in both cases we have demonstrated a significant improvement for an experimentally relevant, non-Gaussian qubit readout model [11,14,[24][25][26].
Our results offer encouraging prospects for direct improvements of both small and large scale quantum information processing applications through soft decoding of the qubit readout. For example, readout error models for decoders of topological codes [21,44] could be modified using the ideas presented here to accept analog readout outcomes with realistic statistics at the single-physicalqubit level, improving error detection rates. While there are many possible extensions of this work, the direct improvements we have shown to enhanced state detection and quantum state or parameter estimation are both practical and immediately realizable in a wide array of current experiments.

REALISTIC NON-GAUSSIAN READOUT: THE PEAK-SIGNAL READOUT
To show that soft decoding of a readout leads to an advantage for realistic readouts, we have investigated the performance of soft decoding for the experimentally relevant [11,24,26] 'peak-signal' readout analyzed in Ref. [25]. In this section, we briefly summarize this readout for completeness.
In this readout, the ground and excited states |− and |+ are mapped to a time-dependent signal ψ(t) subject to Gaussian white noise. When the state is |− , the signal has a constant value −1 on average. When the state is |+ , however, the signal is a square pulse starting at a random turn-on time t i and ending at a random turn-off time t f , as illustrated in Fig. S.1. The times t i and t f − t i each follow their own Poisson statistics. The measurement time τ M is divided into N bins of length τ b , with the average signal on the l th bin beingψ l . The observable O is then chosen to be the maximum ofψ l over all bins. Finally, the measurement time τ M , bin time τ b and threshold ν are chosen to optimize the single-shot readout fidelity. Other choices for the observable O have also been discussed in Refs. [25,28].
Typical probability distributions P (O|±) for the peak-signal readout are shown in Fig. S.2 for two different values of the power signal-to-noise ratio r (integrated over a time t f − t i ). We see that the distributions have prominent non-Gaussian features. To perform fast sampling of these distributions, we first cut off the tails of each distribution (the lost probability weight is smaller than about 10 −7 ) and renormalize them. Next, we numerically integrate the analytic expressions for P (O|±) given in Ref. [25] to construct a linear interpolation of the inverse cumulative distribution function Q −1 ± associated with P (O|±), as shown in Fig. S.2. An independent sample of P (O|±) is then given by , where x is a random number generated from a uniform distribution between 0 and 1 [45].

Advantage of soft decoding
In this section, we give a brief derivation of the advantage obtained for enhanced state detection through soft decoding of the quantum repetition code for a Gaussian readout, Eq. (4) of the main text. Note that to benefit from enhanced state detection, coherent encoding of the logical state |ψ = α 0 |0 + α 1 |1 into the state |ψ N = α 0 |− ⊗N + α 1 |+ ⊗N is not necessary. For example, encoding into the mixed state ρ N = |α 0 | 2 |− −| ⊗N + |α 1 | 2 |+ +| ⊗N (e.g. by allowing the qubits to purely dephase) gives the same advantage.
For the Gaussian readout, each qubit measurement yields an analog value O conditioned on the qubit state |± according to the probability distributions: Here, r is the power signal-to-noise ratio and the signal is normalized to have average values ±1. If the qubit is read out in a single shot, each analog outcome O i is converted to a binary outcome c i = c ± by setting a threshold ν. The single-shot error rates conditional on the qubit state are: Assuming equal a priori probabilities for the ground and excited states, the average single-shot readout error rate = ( + + − )/2 is minimized by choosing P (ν|+) = P (ν|−) ⇒ ν = 0. An explicit calculation of the integrals gives: Eq. (S.3) defines the binary symmetric readout associated with the Gaussian readout. We assume for simplicity that when the N qubits of the quantum repetition code are measured, the N -qubits state collapses to |+ ⊗N or |− ⊗N with equal probability. The resulting dataset consists of N analog readout outcomes O i . In the main text, we gave two likelihood ratios Λ c and Λ O for thresholded and analog readout outcomes, respectively. In both cases, if Λ > 1 (Λ < 1) we infer that the qubit state is |1 (|0 ). For the Gaussian readout, the likelihood ratios reduce to: where n + is the number of times that the outcome O i is converted to c + if the qubits are read out in a single shot and whereŌ = N −1 N i=1 O i is the sample average of the analog outcomes [7]. Since < 1/2, the likelihood ratio Λ c is equivalent to majority vote decoding of the repetition code. The corresponding average error rate ε c is given by the probability that n + > N/2 given that |0 is encoded, which is the same as the probability that n + < N/2 given that |1 is encoded. If N = 2M − 1 is odd, ε c is given by: Here, I (a, b) is the regularized incomplete beta function [46]. The error rate for N = 2M is the same since the case n + = N/2 provides no information on the qubit state for a binary symmetric readout. For r large enough (N 1), Eq. (S.5) takes the approximate form:  4). The corresponding average error rate ε O is given by the probability thatŌ > 0 given that |0 is encoded, which is the same as the probability thatŌ < 0 given that |1 is encoded. Since P (Ō|1) and P (Ō|0) are also Gaussians centered at ±1 with signal-to-noise ratio N r, the average error rate for the soft decoding of the readout apparatus is simply: When r 1, Eq. (S.7) becomes: This expression is valid for any odd N c ≥ 1. The asymptotic advantage, N O ∼ N c /2, has been discussed for arbitrary block codes in Ref. [? ].

Encoding errors
In this section, we expand on the effect of encoding errors on the repetition code. As discussed in the main text, we consider only uncorrelated bit flip errors for simplicity. We consider both the Gaussian readout and the realistic peak-signal readout analyzed in Ref. [25] and summarized above.
Let η be the probability for any qubit of the code to flip during the encoding sequence. The likelihood ratio for analog readout outcomes takes the modified form: where Λ O,i is the likelihood ratio for a single qubit measurement: If the a priori probabilities of the logical states |0 and |1 are equal, the single-shot threshold ν is obtained as usual from P (ν|1) = P (ν|0) ⇒ P (ν|+) = P (ν|−). Therefore, sufficiently localized readout probability distributions such as the Gaussian distributions satisfy: Because Λ O,i is approximately constant above and below threshold, it seems that soft decoding of the analog readout outcomes is reduced to a simple thresholding procedure when η is finite. As illustrated in Fig. S.3, additional information can nevertheless be extracted from values O i falling near the threshold, where Λ O,i is non-constant, provided that η is small enough.
In the case of the Gaussian readout distributions, Λ O,i is non-constant for values of O such that exp (−2r|O|) η/(1 − η), as illustrated in Fig. S.3. In order for a significant fraction of measured values to lie in that interval, we must have |O| 1. Therefore: (S. 13) In the limit r 1, this reduces to η e −2r . Since Eq. (S.3) implies that ∼ e − r 2 up to logarithmic corrections for r 1, we conclude that η must be smaller than some power of . As shown in Fig. S.5, a similar upper bound on η exists for the non-Gaussian peak-signal readout of Ref. [25].
If each analog outcome O i is instead thresholded to a binary outcome c i = c ± , the likelihood ratio is: where n + is the number of qubits that are assigned the value c + . To show quantitatively that a significant advantage can be obtained by utilizing the analog readout outcomes in the presence of encoding errors, we must compare the performance of Eq. (S.14) to that of Eq. (S.10). For both the Gaussian readout and the realisitic peak-signal readout, we performed Monte-Carlo simulations of the error rates for maximum-likelihood decoding of the analog and thresholded readout outcomes. In both cases, we take the signal-to-noise ratio to be r = 2 and choose parameters that optimize the single-shot readout fidelity. We randomly choose the logical state |0 or |1 with equal probability and generate a random measurement record by sampling N independent values from the distributions P , respectively. We then infer the state with both Eq. (S.10) and Eq. (S.14) and record an error if the decision is incorrect. We repeat the procedure 10 7 times (10 6 times) for the Gaussian readout (peak-signal readout) and obtain the error rate from the ratio of errors to the number of trials. The resulting error rates are shown in Figs. S.4 and S.5 respectively. For the Gaussian readout with η = 0, we instead plot the analytic expressions, Eqs. (S.5) and (S.7). Numerical values of the error rates for both readouts without encoding errors are tabulated in Table S.1 for convenience.

STATE AND PARAMETER ESTIMATION
In this section, we give a brief derivation of the asymptotic mean squared error of the maximum-likelihood estimator for s 0 = σ z when applied to analog and thresholded readout outcomes. We also review the soft average discussed in Ref. [29]. In all cases, we estimate s 0 with N independent analog or thresholded readout outcomes, {O i } or {c i }, following a distribution of the form: In the following, we will denote statistical expectation values with respect to Eq. (S.15) by the double brackets . The maximum-likelihood estimator is the value s that maximizes the log-likelihood function: under the constraint −1 ≤ s ≤ 1.

Thresholded readout outcomes
First we assume that the values O i are thresholded to a binary outcome c ± , where the threshold ν is chosen to satisfy P (ν|+) = P (ν|−).
To obtain the maximum-likelihood estimator, we must maximize the likelihood function, Eq. (S.16). We first note that Bayes' rule gives the probability of an outcome c i given the true expectation Here, the transition probabilities of the binary readout are given by the conditional single-shot error rates: Thus, Eq. (S.17) becomes: Next, we use the form of Eq. (S. 19) in the log-likelihood function, Eq. (S. 16), and optimize with respect to s. Maximizing without the constraint −1 ≤ s ≤ 1 (i.e. setting d (s)/ds = 0), the optimum is the thresholded average: where the binary outcomes c i = c ± are chosen to be: (S. 21) In the limit of large N , the estimate is unlikely to fall outside the region −1 ≤ s ≤ 1. In this asymptotic limit, the estimate is unbiased: 23) In this case, the asymptotic mean squared error ζ TA of the maximum-likelihood estimate, Eq. (S.20), is equal to its asymptotic variance and is given by the central limit theorem: In the special case of a binary symmetric readout with + = − = , we have c + = −c − = (1 − 2 ) −1 and we recover the expression given in Ref. [29]:

Analog readout outcomes
The asymptotic mean squared error ζ SD of the maximum-likelihood estimator applied to the analog readout outcomes is equal to its asymptotic variance, which saturates the Cramér-Rao bound [30]: where I is an overlap integral containing all information about the intrinsic measurement noise described by P (O|±). Therefore, the asymptotic mean squared error of the maximum-likelihood estimator applied to the analog readout outcomes is: Another possible estimator for the qubit expectation value is the soft average discussed in Ref. [29]: We compare the performance of this estimator to the previously discussed estimators, s TA and s SD , for completeness. The expectation value of Eq. (S.32) with respect to P (O|s 0 ) has the form: s SA = As 0 + B, (S. 33) where: The asymptotic mean squared error ζ SA of the unbiased soft average estimate, Eq. (S.35), is equal to its asymptotic variance and is given by the central limit theorem:  6 compares the asymptotic performance of the soft average s SA to that of the maximum-likelihood estimates s TA and s SD as a function of the signal-to-noise ratio r, for both the Gaussian and the peak-signal readouts. As noted in Ref. [29], the soft average outperforms the thresholded average s TA for low r. This is because the distribution P (O|s 0 ) approaches a Gaussian centered at s 0 when r → 0 for both readouts, P (O|s 0 ) , and the maximumlikelihood estimator for the mean of a Gaussian coincides with the soft average. In that case, the soft average s SA is therefore the same as the soft-decoded estimate s SD . However, the soft average estimate offers suboptimal performance for finite r and suffers from an significant loss in performance compared to s TA and s SD when r becomes large. In contrast, the soft-decoded estimate s SD is optimal for all r.