# Logical Noise Bias in Magic State Injection

Nicholas Fazio  Robin Harper  Stephen Bartlett  Centre for Engineered Quantum
Systems, School of Physics,
The University of Sydney, Sydney, New South Wales 2006, Australia.

###### Abstract

Fault-tolerant architectures aim to reduce the noise of a quantum computation.
Despite such architectures being well studied a detailed understanding of how
noise is transformed in a fault-tolerant primitive such as magic state
injection is currently lacking. We use numerical simulations of logical
process tomography on a fault-tolerant gadget that implements a logical
$T=Z(\pi/8)$ gate using magic state injection, to understand how noise
characteristics at the physical level are transformed into noise
characteristics at the logical level. We show how, in this gadget, a
significant phase ($Z$) bias can arise in the logical noise, even with
unbiased noise at the physical level. While the magic state injection gadget
intrinsically induces biased noise, with extant phase bias being further
amplified at the logical level, we identify noisy error correction circuits as
a key limiting factor on the magnitude of this logical noise bias. Our
approach provides a framework for assessing the detailed noise
characteristics, as well as the overall performance, of fault-tolerant logical
primitives.

††preprint: APS/123-QED

##  I Introduction

Quantum computation has the potential to solve a number of challenging
problems, but current quantum devices are highly vulnerable to errors which
limit their usefulness. Fault-tolerant architectures will allow for large-
scale quantum computations even in the presence of noise [1, 2]. While fault-
tolerant quantum computing remains a long-term ambition, a number of recent
experiments are exploring the foundations of fault-tolerant logic,
demonstrating potential pathways for large-scale quantum computation [3, 4, 5,
6, 7, 8, 9, 10].

There are a variety of approaches to performing quantum logic fault-
tolerantly. Primarily, these are based around applications of the threshold
theorem [1]: if the physical error rate is below some threshold value,
together with some other mild assumptions, then logical operations can be
performed with arbitrarily small error rates through the use of quantum error
correction. Threshold values have become a common metric for the performance
of error correction schemes and fault-tolerant architectures, alongside other
key considerations such as the locality of operations, connectivity of qubits,
and spacetime-overheads. As a result of this emphasis on thresholds, research
on quantum gate operations has focused on overall error rates, quantified by
measures such as infidelity, diamond norm, or unitarity [11, 12, 13, 14, 15,
16], which can be readily compared against thresholds. Such a focus often
ignores other characteristics of the physical noise and their effect on
logical performance.

A recent and very fruitful line of investigation explores how to tailor
quantum codes and architectures to features of the noise at the physical
level, such as bias, coherence, or correlations across space and time. Such
tailored codes have been shown to significantly impact performance [17, 18,
19], beyond what is expected of generic noise models. While this research has
improved our understanding of how noise characteristics impact fault-
tolerance, we still have very limited understanding of the resultant noise at
the logical level, and how this affects both performance and architecture
design. An implicit assumption in prior works is that the characteristics of
logical noise will reflect those of physical noise, but it is not well
understood how noise characteristics are relevant in the context of error
correction [20, 21]. Consider, for example, the performance of logical gates
that are implemented using magic state injection—a primitive used in many
fault-tolerant architectures to achieve universal quantum computation [22, 23,
24, 25, 26]. The prolific usage of this gadget in quantum logic issues an
imperative for understanding the logical noise associated with its use. This
is especially important in this emerging period where experiments are
beginning to investigate fault-tolerance and the implementation of schemes for
magic state injection [7, 8, 9].

In this work, we investigate how the characteristics of noise at the physical
level are manifest in noise characteristics at the logical level when
performing logical gates using magic state injection. In particular, we focus
on biased Pauli noise, and a fault-tolerant construction for performing
logical $T$-gates (a non-Clifford gate) based on the Steane code. We find that
this implementation of the logical $T$-gate leads to an inherent noise bias at
the logical level, even for unbiased (depolarising) noise at the physical
level. A bias at the physical level towards dephasing ($Z$ noise) is
significantly amplified at the logical level. We undertake our investigation
using numerical simulations of logical process tomography on this fault-
tolerant gadget. These simulations allow us to isolate and identify the
components of the logical $T$-gate gadget that lead to biased logical noise
and those that limit the bias. Although we use the Steane code to drive our
investigation, we focus on the aspects of logical noise characteristics that
apply more broadly. The factors that contribute to the biasing of logical
noise here are also relevant in larger codes implementing magic state
injection, where simulations are less tractable. We consider the implications
of our results for implementations of state injection, suggesting how logical
bias can be managed, which will be especially relevant for magic state
distillation schemes [27, 26, 28, 29, 30, 31, 32, 33, 34].

We present our results as follows. In section II, we describe the noise
characteristics and noise models that we focus on in our simulations. In
section III we present the results of our simulations, exploring how physical
noise characteristics impact logical noise, and in particular how noise bias
affects each individual component of state injection. Finally, in section IV
we discuss how these features impact the use of state injection in schemes of
fault-tolerance, and suggest approaches to manage and leverage the bias of
noise.

##  II Methods

We use numerical simulations to predict the characteristics of logical noise
associated with fault-tolerant primitives. The details of these numerical
simulations are outlined throughout this section, as are our assumptions.

We start by reviewing notation and terminology in section II.1. In section
II.2 we define noise bias and outline how our noise models are specified and
simulated. Finally, in section II.3 we review the schemes that we use to
perform logical tomography of encoded magic state injection.

###  II.1 Gates and Noise Metrics

Here we review standard terms and metrics used throughout this work.

Any reference to the weight of an error operator refers to the number of
qubits that it is supported on. The order of an error refers to the number of
independent gate failures that give rise to the error.

Our work has a particular focus on the non-Clifford operator [1]

$T=Z(\pi/8)=\begin{bmatrix}1&0\\\ 0&e^{i\pi/4}\end{bmatrix}$ (1)

commonly known as the T-gate, whose logical process we implement through our
simulated circuits. Associated with this operator is the magic state
$\left|T\right\rangle=T\left|+\right\rangle\sim\left|0\right\rangle+e^{i\pi/4}\left|1\right\rangle$
which is stabilised by the Clifford operator $TXT^{\dagger}=(X+Y)/\sqrt{2}$.

We represent quantum operations as completely-positive trace-preserving maps
and define the noise of a faulty operation $\tilde{\mathcal{U}}$ to be the map
$\mathcal{E}$ such that $\tilde{\mathcal{U}}=\mathcal{E}\circ\mathcal{U}$,
where $\mathcal{U}$ is the ideal operation. The infidelity of an operation
refers to the average gate infidelity of the noise channel to the identity
[35, 13],

$r(\mathcal{E})=1-F(\mathcal{E})=1-\int
d\psi\langle\psi|\mathcal{E}(|\psi\rangle\langle\psi|)|\psi\rangle.$ (2)

The infidelity of a process can be determined experimentally using process
tomography [35, 36, 11]. Operations can be physical, acting on physical
qubits, or logical, acting on logical qubits. When referring to logical noise,
we are always referring to process noise that acts entirely within a logical
subspace.

###  II.2 Noise Models

The exact noise characteristics that we explore are essential details for this
work. We define those characteristics and how we perform our simulations of
noisy circuits in this section. Through our simulated noise models we can
understand how certain characteristics of physical noise influence the
characteristics of logical noise in fault-tolerant gadgets. Magic state
injection is one such gadget, and is an example where the physical-to-logical
noise relationship is non-trivial.

In order to simplify the description of general noise we use Pauli noise
models. Restricting to this class of noise models also makes our simulations
more tractable. The proportion of logical noise that is coherent is expected
to decrease with increased code distance [13, 14, 15], making Pauli noise
models relevant to large-scale fault-tolerant quantum computation. Moreover,
Pauli frame randomisation techniques such as randomised compiling can be used
to transform general noise models into stochastic Pauli noise [37, 38, 39].

For $n$-qubit Pauli group $\mathcal{P}_{n}$, we can express any stochastic
Pauli noise model acting on $n$ qubits in the form

$\mathcal{E}(\rho)=\sum_{P_{i}\in\mathcal{P}_{n}}p_{i}P_{i}\rho P_{i}$ (3)

where $p_{i}$ is the classical probability of Pauli $P_{i}$ occurring. Any
such noise model can be fully described with $4^{n}-1$ parameters.

The real noise of a device involves many parameters to fully classify, even
when performing randomised compiling. However, many of these parameters are
not relevant in practice, with a much smaller number of parameters accounting
for a large portion of the noise. A relevant example of such a parameter is
the characteristic of noise called the bias [40, 41, 42] and it is the focus
of this work.

####  II.2.1 Pauli Noise Bias

Since we are employing Pauli noise models, measures such as the unitarity [16,
15] or coherence angle [15], which concern coherent noise, are not relevant
here. The bias of noise [40, 41, 42], however, is a natural noise
characteristic to consider in the context of Pauli noise models. Notably, it
has been shown to be a characteristic of noise that can have a dramatic impact
on fault-tolerance [18, 17, 40, 41].

We can define a general notion of Pauli noise bias as follows. Given the set
of Pauli errors acting on $n$ qubits
$\mathcal{P}_{n}\backslash\\{\mathbb{I}\\}$, we can partition the errors into
two sets. The first set
$\mathcal{Q}\subset\mathcal{P}_{n}\backslash\\{\mathbb{I}\\}$ we call the set
of high-rate errors. The second set is its complement
$\mathcal{Q}^{C}\subset\mathcal{P}_{n}\backslash\\{\mathbb{I}\\}$, which we
call the set of low-rate errors. From this partitioning we define the
$\mathcal{Q}$-bias of noise

$\eta_{n}^{\mathcal{Q}}=\frac{\sum_{Q\in\mathcal{Q}}p_{Q}}{\sum_{Q^{\prime}\in\mathcal{Q^{C}}}p_{Q^{\prime}}}$
(4)

where $p_{Q}$ is the probability of a specific Pauli error $Q$ occurring. The
total error rate $p$ is the sum of error probabilities over all Pauli errors
$P\in\mathcal{P}_{n}\backslash\\{\mathbb{I}\\}$. For stochastic noise, the
bias takes values $\eta_{n}^{\mathcal{Q}}\in[0,\infty)$ with
$\eta_{n}^{\mathcal{Q}}\to\infty$ indicating noise completely biased to
$\mathcal{Q}$ and $\eta_{n}^{\mathcal{Q}}=0$ indicating that errors from
$\mathcal{Q}$ do not occur. We use the term extent of bias to refer to the
numerical value of $\eta_{n}^{\mathcal{Q}}$.

Since we are considering quantum circuits that include two-qubit entangling
gates, we would also like a measure of noise bias that specifically applies to
correlated noise over two qubits. Throughout this manuscript we will use
correlated noise to refer to the kind of two-qubit noise that an entangling
gate can introduce to both qubits it operates on. The measure of bias for
correlated noise should also be consistent with existing parameterisations of
single-qubit bias [40, 41], such as $Z$-bias

$\eta_{1}^{Z}=\frac{p_{Z}}{p_{X}+p_{Y}}$ (5)

One can define similar quantities for $X$\- and $Y$-bias.

For two-qubit noise bias, we define the $P$-bias $\eta^{P}_{2}$ to be the
ratio of error rates in which the numerator has all errors that are tensor
products of $P$ and $I$ exclusively, and all other Pauli errors are in the
denominator. In the case of two-qubit $Z$-bias,

$\eta^{Z}_{2}\vcentcolon=\eta^{\\{Z_{1},Z_{2},Z_{1}Z_{2}\\}}_{2}=\frac{p_{Z_{1}}+p_{Z_{2}}+p_{Z_{1}Z_{2}}}{p-p_{Z_{1}}-p_{Z_{2}}-p_{Z_{1}Z_{2}}}$
(6)

Defining two-qubit bias in this way guarantees that the concept of high
$Z$-bias still implies $Z$ errors occur at high-rate, but also that $X$ and
$Y$ errors never occur at high-rate. As an example, $Z_{1}Y_{2}$ would occur
at low-rate.

Two-qubit bias may also be compared with single-qubit bias. For two
independent single-qubit noise sources that are $Z$-biased at an extent of
$\eta_{1}^{Z}$, the two-qubit bias of those qubits satisfies
$\eta_{2}^{Z}\approx\eta_{1}^{Z}$ to first order in $p$.

For depolarising noise all Pauli errors have equal probability and so for
single-qubit depolarising noise we have the following values for noise bias:
$\eta_{1}^{X}=\eta_{1}^{Y}=\eta_{1}^{Z}=1/2$. For two-qubit depolarising noise
the values for noise bias are different, namely
$\eta_{2}^{X}=\eta_{2}^{Y}=\eta_{2}^{Z}=3/12$.

Further details on bias can be found in appendix A.

####  II.2.2 Simulated Noise Models

We need noise models that are consistent and comparable with each other in
order to investigate how the characteristics of noise affect fault-tolerant
gadgets. We specify our Pauli noise models in this subsection.

We vary our Pauli noise channels by the rate of error and the extent of noise
bias. For error rate $p$ and bias parameter $\eta_{n}^{\mathcal{Q}}$ we define

$\begin{split}\mathcal{N}(\eta^{\mathcal{Q}}_{n},p)(\rho)&=(1-p)\rho+\frac{p\eta_{n}^{\mathcal{Q}}}{(\eta_{n}^{\mathcal{Q}}+1)}\sum_{Q\in\mathcal{Q}}\frac{1}{|\mathcal{Q}|}Q\rho
Q\\\
&+\frac{p}{(\eta_{n}^{\mathcal{Q}}+1)}\sum_{Q^{\prime}\in\mathcal{Q}^{C}}\frac{1}{|\mathcal{Q}^{C}|}Q^{\prime}\rho
Q^{\prime}\end{split}$ (7)

to be the $n$-qubit noise channel such that the total error rate is equal to
$p$, the $\mathcal{Q}$-bias of noise is equal to the parameter
$\eta_{n}^{\mathcal{Q}}$, and the individual Pauli error probabilities are
such that all high-rate errors have equal probability and all low-rate errors
have equal probability.

In our simulations we implement the controlled-$X$ gate, also known as the
CNOT gate, as an operator sustaining biased noise. The other operations in our
simulated circuits are performed ideally. Generally each operation on a
physical device will have its own noise characteristics. However, entangling
gates are typically among the noisiest operations on a device [43, 4],
especially compared to single-qubit gates, and in the circuits we consider
they are the most common gates. We expect that the assumption made here should
be broadly applicable, addressing the predominant factors that contribute to
logical noise characteristics. Even so, we will later discuss how our results
could change if we relax this assumption. Since we are using Pauli noise
models, Pauli errors from other sources such as single-qubit gates are
equivalent to CNOT Pauli errors with the exact same scaling in the error rate
$p$. So we can infer what impact the neglected terms would have through our
assortment of noise models.

Our noisy CNOTs independently experience a biased Pauli noise channel over
two-qubits. We define our noisy CNOT as

$\tilde{C}_{X}(\rho)=\mathcal{N}(\eta^{\mathcal{Q}}_{2},p)(C_{X}(\rho))\ ,$
(8)

where the control qubit of the CNOT operator $C_{X}$ corresponds to the first
qubit in $\mathcal{Q}$. For example, if
$\mathcal{Q}=\\{Z_{1},Y_{2},Z_{1}Y_{2}\\}$, then $Z$ occurs with high-rate on
the control qubit of the CNOT and $Y$ occurs with high-rate on the target
qubit. Accordingly, $p_{Z_{1}}$, $p_{Y_{2}}$ and $p_{Z_{1}Y_{2}}$ are the
highest probabilities among Pauli errors.

We perform our simulation by placing the initial Pauli errors in the circuit,
conjugating these errors to the end of the circuit, and then computing the
impact of the error on the ideal logical state before measurement. For each
noise model, we simulate all error terms where the coefficient has a factor of
up to $p^{3}$ or fewer. Any terms with a $p^{4}$ factor are truncated, that
is, anything that occurs at a rate lower than $p^{4}$. Preliminary simulations
of higher order terms suggested that their contributions were negligible due
to the low distance of the code and relatively small number of CNOTs used. The
qualitative analysis of this work is unchanged by this approximation.

Note that $p$ is the rate of individual CNOT failure, so two-qubit correlated
errors occur at a rate proportional to $p$. Hence, the weight of an error can
be twice the number of two-qubit gate faults. This is not a problem in the
context of transversal operators, but for non-transversal components of fault-
tolerance such as state preparation and error correction these correlated
errors can pose a challenge for low-distance codes because of their high
weight. However, it is important that we consider correlated errors because
they commonly occur in the entangling gates of physical devices, and may even
be the dominant error.

Through our biased noise models we can investigate the predominant sources of
logical noise in a tractable way. We can vary both the rate of error and the
bias of physical noise to discern how changes in the noise characteristics
impact logical expectation values.

###  II.3 Fault Tolerance

Figure 1: A non-Clifford $T$-gate can be performed with a resource magic state
$\left|T\right\rangle$ using magic state injection. The injection process is
adaptive, applying an $S=Z(\pi/4)$ correction when $\left|T\right\rangle$ is
measured in the $\left|1\right\rangle$ state, and no correction otherwise.

Quantum devices are prone to errors so any form of computation that makes use
of them must also tolerate the ongoing faults of the device. Key to fault
tolerance is that the processes of detecting and correcting errors can be used
even if these processes also introduce noise. As long as the errors that
correction schemes introduce do not proliferate too much, quantum computation
can proceed. Recent research has shown that the nature of noise on a device
can have a considerable impact on the performance of fault tolerance [17, 18,
19], but the impact of noise characteristics on logical noise [13, 14, 15] is
largely unexplored.

We choose to use the Steane code [1, 44, 45] to investigate logical noise
characteristics due to its simplicity and widespread use in fault-tolerant
constructions. The Steane code possesses a number of logical operations that
can be implemented transversally, which is the simplest form of a fault-
tolerant gate. However these transversal operations are all elements of the
Clifford group, and so to achieve a universal gateset [46] the transversal
logic gates must be supplemented with gates that are implemented using an
alternative fault-tolerant construction.

Magic state injection [26], outlined in figure 1, is an important primitive of
quantum logic that can be used to implement the non-Clifford $T$-gate. In
conjunction with the Clifford group the $T$-gate forms a universal gateset, so
we can use magic state injection to compensate for the non-transversal gates
of the Steane code. High-fidelity magic states can be used to implement high-
fidelity $T$-gates, making encoded magic state injection an important
primitive for fault-tolerance [22].

Performance metrics already exist for magic states [47, 48, 49, 24], but there
has been little work that investigates how the characteristics of noise, such
as bias, affect the logical noise on a $T$-gate performed with an injection
gadget. We explore this particular logical gadget for the Steane code using
logical process tomography, a scheme that can be used to fault-tolerantly
characterise logical noise in experiment. Using fault-tolerant state
preparation schemes for the Steane code [44, 50], and fault-tolerant logical
measurements, we have the means to perform logical process tomography for a
logical $T$-gate, which we simulate numerically to probe logical noise
characteristics.

####  II.3.1 Steane Code

Figure 2: The Steane code is a seven qubit stabiliser code. Each numbered
vertex represents a qubit of the code. Corresponding to each coloured face
there are $X$ and $Z$ stabiliser generators that act on all incident vertices.

Our simulations are performed in a $\llbracket 7,1,3\rrbracket$ code called
the Steane code [1, 44, 45], depicted in figure 2. It encodes one logical
qubit in seven physical qubits. The transversal $X$, $Y$ and $Z$ logical
operators all have distance-three, meaning that the code can detect up to two
physical errors and can correct up to one [51].

The entire logical Clifford group can be performed transversally on the Steane
code. Therefore, together with a means to perform fault-tolerant logical
$T$-gates using magic state injection, a universal set of fault-tolerant gates
can be implemented for this code.

The aforementioned properties make the Steane code a viable candidate for the
demonstration of a fault-tolerant gateset. Since it is small and implementable
in a planar layout using nearest-neighbour entangling gates, it is accessible
for near-term experiments [7, 8, 10]. While codes with a larger distance are
likely to be needed for practical fault-tolerant approaches, we can use the
Steane code to establish the current performance of encoded operations and how
characteristics of physical noise impact logical noise in current devices.

####  II.3.2 Logical Tomography

Logical process tomography [8, 52] is the technique that we use to identify
logical noise characteristics in this work. Essentially, by using logical
state preparation and measurement we can perform tomography on a logical
process analogously to how process tomography is performed on a physical
process. We also require that all the components of logical tomography are
fault-tolerant.

We incorporate logical process tomography directly into the circuits that we
simulate, encompassing a logical $T$-gate (implemented via magic state
injection) with fault-tolerant state preparation and measurement. We perform
our noisy tomography simulations in the Steane code, for which the abstract
circuit structure is depicted in figure 3.

We use the state preparation schemes of Goto [44] and Chamberland [50] to
prepare logical states for the Steane code, preparing several different
initial states for use in logical tomography. Further considerations on these
schemes with respect to the noise models of this work can be found in appendix
C. In order to better tolerate correlated noise from faulty CNOTs we modify
existing flagged stabiliser measurement schemes [53, 54, 45] for use in state
preparation, detailed separately in appendix D.

The results of this work are obtained by simulating these noisy logical
tomography circuits and using the logical data to derive the noise of the
logical $T$-gate process. We consider logical state preparation, stabiliser
measurements and logical measurements to all be essential components in our
simulations of noise, motivated by how the noise of such circuits would impact
the logical tomography results of experiment. Unless otherwise stated, all
CNOTs of the circuit are faulty including those used for tomography, that is,
for state preparation and measurement.

The overall circuit structure, processing of measurement outcomes, and
implementation of adaptive corrections, are details that are kept consistent
across all simulations. The only difference between each simulation is the
noise model experienced by the circuit. Full details on the treatment of
measurement outcomes for logical tomography can be found in appendix B.

Figure 3: Logical process tomography of a $T$-gate implemented through magic
state injection. Fault-tolerant magic state preparation is a fundamental part
of the gadget, including a state check $T_{m}$ and error detection $ED$. By
preparing initial logical stabiliser states [44], and by performing final
error correction [45, 54] with logical measurements, the logical process
matrix of the $T$-gate can be reconstructed. We simulate such a circuit
encoded in the Steane code.

##  III Results

Through a series of numerical simulations we will interrogate how noise
characteristics at the physical level manifest in the characteristics of noise
at the logical level for logical $T$-gates implemented via magic state
injection using the Steane code. From this we discern the main mechanisms that
influence the bias of the noise at the logical level. Our findings demonstrate
that bias can be amplified at the logical level and identify the noise
associated with error correction as playing a pivotal role in determining the
characteristics of logical noise.

Figure 4: Process infidelity of a logical $T$-gate implemented via magic state
injection for a spectrum of $Z$-biased noisy CNOTs. The $Z$-bias of physical
noise $\eta_{2}^{Z}$ spans from two-qubit depolarising noise at
$\eta_{2}^{Z}=0.25$ to pure physical $Z$ noise $\eta_{2}^{Z}\to\infty$. There
is a quadratic reduction in logical process infidelity when compared to the
physical error rate, which is the expected scaling when performing error
correction in a distance-three code. Logical $Z$-bias $\eta_{1}^{Z}$ is
largely unaffected by changes in the physical error rate.

We simulate logical tomography of logical $T$-gates implemented in the Steane
code using state injection, utilising fault-tolerant schemes for state
preparation and measurement [45, 54, 44, 50]. We apply biased Pauli noise
models to our simulated circuits in order to investigate how physical noise
characteristics impact logical noise. We can isolate how different aspects of
magic state injection influence the characteristics of logical noise by
varying the parameters of our physical noise model, namely the physical rates
of error, different kinds of physical noise bias, and which circuit components
of the simulation are faulty. The full specifications of our simulations can
be found in section II, including how we define bias and parameterise our
noise models.

First we consider the impact that physical noise bias has on logical process
infidelity in section III.1. From there we focus on the relationship between
physical noise bias and logical noise bias. In section III.2, we investigate
why the logical $T$-gate implemented via state injection has intrinsically
$Z$-biased noise, and highlight the noise-transforming properties that are
inherent to magic state injection. Finally, in section III.3 we examine how
the type of physical noise bias matters in the state injection gadget,
highlighting how noisy error correction limits the extent of logical noise
bias in logical gates.

###  III.1 Biased Physical Noise in the Steane Code

The Steane code has distance $d=3$ and so can correct any single-qubit error.
Due to this and because we implement logical gates transversally, we expect
the logical infidelity to scale quadratically with the rate of physical error,
which we see verified in figure 4 for all the Pauli noise models considered.
Aside from the expected scaling, we note that the effect of physical noise
bias on the logical infidelity is quite minor. We found this weak dependence
on physical noise bias to hold in all the noise models considered within this
text, beyond the noise models considered in this section.

Figure 5: Logical $Z$-bias while varying the bias of CNOT noise. Simulations
are performed at error rate $p=5\times 10^{-3}$. Marked by $\blacktriangle$
are the bias values for depolarising noise. The logical $Z$-bias is always
greater than the bias for depolarising noise. The $Z$-bias of logical noise
has an asymptotically quadratic relationship with the $Z$-bias of physical
noise. Highly $X$\- or $Y$-biased physical noise tends to logical depolarising
noise.

The reason we do not see a strong relationship between the physical noise bias
and the logical process infidelity is due to properties of the Steane code
[55], which is no better suited for biased noise than unbiased noise. To more
directly exploit bias we could employ alternate codes tailored for biased
noise, but we do not investigate that in this work.

However, we still observe a slight dependence of the logical infidelity on
physical noise bias. We can understand this detail by considering the relative
frequencies between different kinds of error. We qualitatively describe this
as follows: As we change the physical bias, we also change the predominant
ways that physical noise accumulates into logical noise. At low bias, there
are a large number of error terms, each with low probability, that contribute
to the logical error. At high bias, a smaller number of error terms
contribute, each with a higher probability. As we transition between these two
regimes the logical infidelity changes as the relative contribution of each
error term changes. Regardless of bias, the sum probability of physical error
remains the same. So unless particular error terms are far more likely to be
successfully error corrected than others of the same weight the change to
logical infidelity will be minimal, which is the case here as previously
stated.

The inset of figure 4 indicates that the logical noise bias changes minimally
with the rate of physical error. This is once again a consequence of the
Steane code. Since it can correct weight-one errors, second order error terms
are the lowest order contribution to logical noise. These second order error
terms contribute to the vast majority of logical noise due to the small number
of qubits in the Steane code and relatively low number of CNOTs used.
Therefore, the bias in the second order terms is grossly indicative of the
logical noise bias, with third order and higher terms becoming less and less
relevant with smaller rates of error. For larger codes with larger distances
this will not generally hold: lowest order error terms will be less numerous
compared to the higher order terms, allowing for a more complicated dependence
of logical noise bias on the physical error rate.

###  III.2 Physical-to-Logical Bias

We now turn to how physical noise bias impacts logical noise bias. In figure
5, we consider how the $Z$-bias of logical noise in our logical $T$-gate
gadget is affected by different physical noise characteristics. Examining the
case of $Z$-biased physical noise first, there is a clear quadratic
relationship between the physical noise bias $\eta_{2}^{Z}$ and the bias of
the logical process noise $\eta_{1}^{Z}$. This relationship is closely related
to the code distance of the Steane code.

Figure 6: Logical $X$-bias against physical $X$-bias for fixed rate of error
$p=5\times 10^{-3}$. Marked by $\blacktriangle$ are the bias values for
depolarising noise. Although the logical $X$-bias marginally increases with
physical $X$-bias, it plateaus below the value for depolarising noise. Even
with pure $X$ physical noise, the logical noise is not $X$-biased. Contrast
this with physical $Z$-bias versus logical $Z$-bias.

Explicating on this relationship, the most likely logical errors are those
which come from high-rate physical errors. Since the Steane code’s distance is
three, the lowest weight error that can become a logical error is two. Since
all first order errors are detected or corrected in our gadget, the most
likely weight-two errors will occur when two independent sources of noise both
introduce high-rate errors. For $Z$-biased physical noise, such high-rate
error terms have a coefficient quadratic in $\eta_{2}^{Z}$ and are only
composed of physical $Z$ errors, which shall become logical $Z$ errors. Hence,
as the physical $Z$-bias increases, the most likely logical $Z$ errors scale
quadratically in $\eta_{2}^{Z}$ while all other logical error terms have a
decreasing likelihood, resulting in an amplification of bias at the logical
level.

Strikingly, when the bias at the physical level is in the $X$ or $Y$ direction
we still see a $Z$-bias at the logical level. This inherent $Z$-bias occurs
when the physical noise is depolarising, all the way through to highly $X$\-
or $Y$-biased noise, that is, when only $X$ and $Y$ errors are being
introduced to the circuit.

The same reasoning applied for $Z$-bias would suggest that we should see a
similar amplification in logical bias with $X$\- or $Y$-biased physical noise.
However, as explicitly demonstrated in figure 6, this does not occur. Rather
than scale quadratically, we find the bias of logical noise plateaus well
before the logical noise becomes $X$-biased. Even when the physical noise is
purely composed of $X$ errors, there is seemingly some additional source of
$Z$ noise that causes the logical noise to be mixed.

(a)

$\to$

(b)

$\to$

Figure 7: Pauli errors introduced by magic state preparation can only amount
to phase errors on the computational qubits. In (a) $Z$ errors on the magic
state spread to $Z$ errors on the computational qubits with the same weight
and syndrome. Even though $X$ errors do not spread to the computational qubits
in (b), they affect the logical measurement outcome. Depending on the weight
and syndrome of the $X$ error the logical measurement can fail and cause a
misapplication of the phase gate $S=Z(\pi/4)$, introducing a logical phase
error.

The quadratic scaling only occurs with $Z$ due to mechanisms within magic
state injection that convert arbitrary errors into $Z$ phase errors. So
although the physical noise becomes increasingly $X$-biased, the second order
$X$ error terms must also compete with other sources of logical $Z$ error. In
contrast, the $Z$-bias of logical noise is unimpeded and can scale
quadratically, for the reasons previously detailed.

We depict the cause of this mechanism in figure 7. Errors incurred during
magic state preparation either spread as $Z$ errors to the computational
qubits, or cause misapplications of the logical correction $S=Z(\pi/4)$.
Therefore, any type of Pauli noise on the logical magic state transfers to the
computational qubits as phase noise. If only magic state preparation were
noisy, the logical process noise of the $T$-gate would be completely
$Z$-biased regardless of the underlying physical noise model. In such a case
logical $X$ and $Y$ errors would still be present on the logical magic state
itself, but these errors would manifest as phase errors on the computational
qubits.

###  III.3 Structure of the Gadget Noise

(a) (b)

Figure 8: $Z$-biased physical noise $\eta_{2}^{Z}$ and mixed-biased physical
noise $\eta_{2}^{\mathcal{M}}$ against the $Z$-bias of logical noise
$\eta_{1}^{Z}$ for fixed rate of error $p=5\times 10^{-3}$. Marked by
$\blacktriangle$ are the bias values for depolarising noise. In (a) stabiliser
state preparation and error correction are ideal while the rest of the state
injection is noisy. Despite the noise bias being mixed
$\mathcal{M}=\\{Z_{1},X_{2},Z_{1}X_{2}\\}$, the $Z$-bias of logical noise
scales quadratically with the bias of physical noise. In (b) error correction
is also included in the faulty components, causing the logical $Z$-bias to
plateau as the $\mathcal{M}$-bias of physical noise increases. Although mixed
physical noise introduces high-rate $X$ and $Z$ noise, it is faulty error
correction that allows for the high-rate $X$ errors to limit the extent of
logical $Z$-bias.

In previous sections we have seen how the structure of the magic state
injection gadget transforms the characteristics of noise. These noise-
transforming properties lead to an inherent $Z$-bias in the logical process
noise, which is amplified by error correction if the physical noise is also
$Z$-biased. However, the simple Pauli noise models of previous sections do not
allow us to anticipate the logical noise bias from the physical noise bias, or
how each component of the injection gadget contributes to the logical noise.
We explore these questions in this section by investigating the contributing
factors to the logical noise incrementally. By breaking down the observed
logical noise into the contributions from individual components of the gadget
we can understand how bias affects each component separately and how this
culminates in the noise characteristics of the logical process.

The results of section III.2 provide a starting point for this analysis. They
demonstrate that noise of any character originating from magic state
preparation leads to logical phase noise. That is, if magic state preparation
was the only source of noise, the logical process would have noise that is
completely $Z$-biased.

Looking at noise with a more complex structure will allow us to better
understand how the type of bias impacts different components of the logical
gadget and the logical noise. We will use a mixed-bias noise model where the
high-rate set of Pauli errors is $\mathcal{M}=\\{Z_{1},X_{2},Z_{1}X_{2}\\}$,
that is, as the extent of bias $\eta_{2}^{\mathcal{M}}$ increases, the noise
introduces both $Z$ and $X$ errors at high-rate. Notably, the control qubit of
the CNOT gets biased towards $Z$ errors while the target qubit gets biased
towards $X$ errors. $\mathcal{M}$-biased noise on a CNOT is equivalent to
$Z$-biased noise on a Controlled-$Z$ gate,

$\vbox{\hbox{\includegraphics[width=82.38885pt]{figures/figure9.pdf}}}=\vbox{\hbox{\includegraphics[width=43.36464pt]{figures/figure10.pdf}}}$
(9)

a type of bias that is motivated by experiment [56, 57, 58].

In figure 8(a), we consider the logical performance of our process when all
the elements of magic state preparation and injection are noisy, but with
stabiliser state preparation and error correction performed ideally. For
increasing physical $Z$-bias, we find the logical $Z$-bias scaling
quadratically as we would expect, however, we also find the same quadratic
scaling while increasing the extent of mixed-bias $\eta_{2}^{\mathcal{M}}$.
Even though mixed-biased physical noise introduces both $X$ and $Z$ errors at
high rate, the logical noise only becomes biased to $Z$. We would naively
expect that the logical noise should be mixed like the physical noise.
However, a distinction between logical $X$ and $Z$ arises due to the
distribution of physical errors: high-rate $X$ errors are only being
introduced to the logical magic state while all the $X$ and $Y$ errors that
are introduced to the computational qubits are low-rate errors. As the mixed-
bias of physical noise increases, the low-rate $X$ and $Y$ errors become even
less likely, introducing a higher proportion of physical $Z$ noise onto the
computational qubits. Simultaneously, the high-rate $X$ errors are converted
into phase errors via the same mechanism as in figure 7. Hence, mixed physical
noise does not necessarily imply mixed logical noise, as seen in figure 8(a),
the logical noise can be highly $Z$-biased.

However, when we introduce faulty error correction, the quadratic scaling of
logical $Z$-bias is not maintained at large bias. From figure 8(b) we can see
that the logical $Z$-bias plateaus with increasing mixed-bias. The important
difference is that faulty error correction introduces a new source of high-
rate $X$ noise. The mixed character of bias becomes relevant for our logical
$T$-gate through the CNOTs involved in error correction. In the absence of
faulty error correction, $T$-gates implemented with magic state injection are
capable of having highly $Z$-biased noise, even under mixed noise models, but
in general the characteristics of noise in error correction constrain the
$Z$-bias of the logical process. Despite this constraint, we can still see
that the $Z$-bias remains fairly high when compared to the noise models
considered in previous sections where the logical $Z$-bias also plateaued. So,
the strong $Z$-bias that we would have seen if error correction were ideal
still makes an important contribution to the overall logical bias, albeit
tempered by error correction.

Ultimately, this demonstrates that the noise characteristics of error
correction play a determinative role in the logical noise characteristics of
magic state injection. Since error correction is a fundamental component in
fault-tolerance, all logical processes, including transversal gates, must
contend with the noise of error correction and how it affects extant noise.

##  IV Discussion

In this work we have set out to understand how the characteristics of physical
noise affect logical noise in fault-tolerant primitives. We explore this
question by simulating biased noise models in an encoded magic state injection
circuit, allowing us to discern the predominant factors that influence the
relationship between noise characteristics at the physical level and at the
logical level.

By far the most salient feature of our simulations is the $Z$-bias of logical
noise. This logical $Z$-bias is greatest when extant physical $Z$-bias is
amplified by error correction, however, across all the noise models considered
some level of logical $Z$-bias can be found due to the noise-transforming
properties of the injection gadget. Even in the presence of $X$-biased
physical noise the logical noise is marginally $Z$-biased. In the analysis
presented here, the logical noise specifically tends to $Z$ because we chose
to implement $T=Z(\pi/8)$; had we chosen another basis for our operator such
as $X(\pi/8)$ or $Y(\pi/8)$, the bias introduced by the injection gadget would
reflect that choice. Likewise, conjugating the $T$-gate by a Clifford operator
would realise an analogous situation.

These noise-transforming properties are an intrinsic feature of the injection
gadget, which do not occur with transversal Clifford gates. While Clifford
gates can change the type of bias, the overall extent of noise bias remains
unchanged. In contrast, the extent of noise bias changes in magic state
injection because any errors on the logical magic state get transformed.
Consequently, since the noise-transformation only affects noise on the magic
state, the structure of physical noise bias impacts the logical noise
characteristics of magic state injection. An example from this work occurs in
simulations of mixed-bias noise, where high-rate $X$ errors predominantly
arose on the logical magic state, but these high-rate $X$ errors did not
prevent a high logical $Z$-bias from appearing. This noise-transformation
presents us with an opportunity; we can exploit the inherent noise-
transforming properties to bring about highly biased logical noise.

Throughout this work there is a presupposition that high bias is worth
pursuing. The reason for this is straightforward: a higher bias is preferable
whenever the overall error rate is unchanged because we can tailor fault-
tolerant schemes to take the bias into account. However this reasoning is
usually applied in the context of physical noise bias rather than the logical
noise bias investigated here. One way to take advantage of logical bias is
through concatenated codes, with the bias informing which codes will be
appropriate for concatenation. Since we are specifically considering $T$-gates
within a logical code, the most natural context for this work is magic state
distillation.

Magic state injection is a fundamental component in magic state distillation,
used to pass magic states onto the next round of distillation. Analysis of
magic state distillation commonly assumes that magic states are the faulty
components in each distillation round, which corresponds to purely $Z$-biased
process noise in our work. Beyond ensuring the applicability of analytic
results, high $Z$-bias is a significant factor for the performance of several
distillation schemes. Logical $X$ and $Y$ errors that are introduced by a
$T$-gate (as opposed to on a magic state) cause more problems for distillation
than $Z$-errors. Since $X$ and $Y$ errors do not commute with the non-Clifford
phase operators of distillation, such errors can cause multiple phase
operators to be misapplied simultaneously [27]. In other words, these errors
are equivalent to correlated errors over multiple magic states, having a far
greater impact on the performance of distillation than $Z$ errors. Hence, the
extent of $Z$-bias in $T$-gates is an important metric for how well
distillation schemes will perform, putting further emphasis on the benefit of
high $Z$-bias.

Naturally, the noise transformed by the injection gadget will also be affected
by noise from later circuits. Whilst this work has shown that noise-
transformation is indeed very relevant at the logical level, noisy error
correction circuits will typically limit the extent of logical $Z$-bias
emerging from the gadget by introducing unbiased noise. Other fault-tolerant
operations, such as transversal operators, are also influenced by noisy error
correction circuits in the same way, so that without the noise-transforming
properties of magic state injection the logical noise bias of these operators
will be even more strongly determined by the noise from error correction.

Other sources of Pauli noise, such as noisy single-qubit gates, would have a
similar impact on noise characteristics in magic state injection. These errors
may likewise diminish the bias of logical noise or be converted into logical
phase noise, albeit independently of the physical noise bias of CNOTs. For the
most part, state preparation and measurement (SPAM) errors would affect
logical tomography rather than the logical noise of the $T$-gate. Idling
errors and other sources of intermediate noise are far more relevant to the
characteristics of logical noise that we have investigated here. However, as
initially prefaced, if CNOTs are the noisiest operators on a device then error
correction will constitute the majority of the aforementioned factors for
logical bias.

Although noise-transformation has the capability to bring about high logical
bias, the constraint placed on bias by error correction suggests that the
greatest challenge in the pursuit of high bias will be the way that error
correction is implemented. This problem motivates the development of circuits
for error correction that are bias-sensitive, preferring to introduce $Z$
errors in place of $X$ or $Y$ errors. Such schemes will likely need to be
designed with the noise parameters of a specific device in mind. In
particular, bias-sensitive error correction is critical for vulnerable
sections of distillation schemes.

With that in mind, this work demonstrates reassuring results that bias can be
high even when performing state injection in low-distance codes. Although we
used the Steane code, one example of a low-distance code, the noise was still
$Z$-biased at the logical level. We conjecture that the scaling of logical
bias with distance found in this work will generalise to larger distance CSS
codes, a potential area for research, but ultimately work in error correction
will be necessary to allow for high-bias to manifest in magic state injection.
Further work that explores error correction with close consideration for its
noise characteristics would be a promising area for future research.

###### Acknowledgements.

We thank Evan Hockings for helpful comments on an early draft. This work is
supported by the Australian Research Council via the Centre of Excellence in
Engineered Quantum Systems (EQUS) project number CE170100009, and by the ARO
under Grant Number: W911NF-21-1-0007. Access to high-performance computing
resources was provided by the National Computational Infrastructure (NCI),
which is supported by the Australian Government, and by the Sydney Informatics
Hub, a Core Research Facility of the University of Sydney.

## References

  * Campbell  _et al._ [2017] E. T. Campbell, B. M. Terhal, and C. Vuillot, Nature 549, 172 (2017).
  * Beverland  _et al._ [2022] M. E. Beverland, P. Murali, M. Troyer, K. M. Svore, T. Hoefler, V. Kliuchnikov, G. H. Low, M. Soeken, A. Sundaram, and A. Vaschillo, Assessing requirements to scale to practical quantum advantage (2022), arXiv:2211.07629 [quant-ph] .
  * Ristè  _et al._ [2020] D. Ristè, L. C. G. Govia, B. Donovan, S. D. Fallek, W. D. Kalfus, M. Brink, N. T. Bronn, and T. A. Ohki, npj Quantum Information 6, 71 (2020).
  * Acharya  _et al._ [2023] R. Acharya, I. Aleiner, R. Allen, T. I. Andersen, M. Ansmann, F. Arute, K. Arya, A. Asfaw, J. Atalaya, R. Babbush, D. Bacon, J. C. Bardin, J. Basso, A. Bengtsson, S. Boixo, G. Bortoli, A. Bourassa, J. Bovaird, L. Brill, M. Broughton, B. B. Buckley, D. A. Buell, T. Burger, B. Burkett, N. Bushnell, Y. Chen, Z. Chen, B. Chiaro, J. Cogan, R. Collins, P. Conner, W. Courtney, A. L. Crook, B. Curtin, D. M. Debroy, A. Del Toro Barba, S. Demura, A. Dunsworth, D. Eppens, C. Erickson, L. Faoro, E. Farhi, R. Fatemi, L. Flores Burgos, E. Forati, A. G. Fowler, B. Foxen, W. Giang, C. Gidney, D. Gilboa, M. Giustina, A. Grajales Dau, J. A. Gross, S. Habegger, M. C. Hamilton, M. P. Harrigan, S. D. Harrington, O. Higgott, J. Hilton, M. Hoffmann, S. Hong, T. Huang, A. Huff, W. J. Huggins, L. B. Ioffe, S. V. Isakov, J. Iveland, E. Jeffrey, Z. Jiang, C. Jones, P. Juhas, D. Kafri, K. Kechedzhi, J. Kelly, T. Khattar, M. Khezri, M. Kieferová, S. Kim, A. Kitaev, P. V. Klimov, A. R. Klots, A. N. Korotkov, F. Kostritsa, J. M. Kreikebaum, D. Landhuis, P. Laptev, K.-M. Lau, L. Laws, J. Lee, K. Lee, B. J. Lester, A. Lill, W. Liu, A. Locharla, E. Lucero, F. D. Malone, J. Marshall, O. Martin, J. R. McClean, T. McCourt, M. McEwen, A. Megrant, B. Meurer Costa, X. Mi, K. C. Miao, M. Mohseni, S. Montazeri, A. Morvan, E. Mount, W. Mruczkiewicz, O. Naaman, M. Neeley, C. Neill, A. Nersisyan, H. Neven, M. Newman, J. H. Ng, A. Nguyen, M. Nguyen, M. Y. Niu, T. E. O’Brien, A. Opremcak, J. Platt, A. Petukhov, R. Potter, L. P. Pryadko, C. Quintana, P. Roushan, N. C. Rubin, N. Saei, D. Sank, K. Sankaragomathi, K. J. Satzinger, H. F. Schurkus, C. Schuster, M. J. Shearn, A. Shorter, V. Shvarts, J. Skruzny, V. Smelyanskiy, W. C. Smith, G. Sterling, D. Strain, M. Szalay, A. Torres, G. Vidal, B. Villalonga, C. Vollgraff Heidweiller, T. White, C. Xing, Z. J. Yao, P. Yeh, J. Yoo, G. Young, A. Zalcman, Y. Zhang, and N. Zhu, Nature 614, 676 (2023).
  * Andersen  _et al._ [2020] C. K. Andersen, A. Remm, S. Lazar, S. Krinner, N. Lacroix, G. J. Norris, M. Gabureac, C. Eichler, and A. Wallraff, Nature Physics 16, 875 (2020).
  * Sundaresan  _et al._ [2023] N. Sundaresan, T. J. Yoder, Y. Kim, M. Li, E. H. Chen, G. Harper, T. Thorbeck, A. W. Cross, A. D. Córcoles, and M. Takita, Nature Communications 14, 2852 (2023).
  * Ryan-Anderson  _et al._ [2021] C. Ryan-Anderson, J. G. Bohnet, K. Lee, D. Gresh, A. Hankin, J. P. Gaebler, D. Francois, A. Chernoguzov, D. Lucchetti, N. C. Brown, T. M. Gatterman, S. K. Halit, K. Gilmore, J. A. Gerber, B. Neyenhuis, D. Hayes, and R. P. Stutz, Phys. Rev. X 11, 041058 (2021).
  * Postler  _et al._ [2022] L. Postler, S. Heußen, I. Pogorelov, M. Rispler, T. Feldker, M. Meth, C. D. Marciniak, R. Stricker, M. Ringbauer, R. Blatt, P. Schindler, M. Muller, and T. Monz, Nature 605, 675 (2022).
  * Marques  _et al._ [2022] J. F. Marques, B. M. Varbanov, M. S. Moreira, H. Ali, N. Muthusubramanian, C. Zachariadis, F. Battistel, M. Beekman, N. Haider, W. Vlothuizen, A. Bruno, B. M. Terhal, and L. DiCarlo, Nature Physics 18, 80 (2022).
  * Bluvstein  _et al._ [2023] D. Bluvstein, S. J. Evered, A. A. Geim, S. H. Li, H. Zhou, T. Manovitz, S. Ebadi, M. Cain, M. Kalinowski, D. Hangleiter, J. P. B. Ataides, N. Maskara, I. Cong, X. Gao, P. S. Rodriguez, T. Karolyshyn, G. Semeghini, M. J. Gullans, M. Greiner, V. Vuletić, and M. D. Lukin, Nature 10.1038/s41586-023-06927-3 (2023).
  * Evans  _et al._ [2022] T. Evans, W. Huang, J. Yoneda, R. Harper, T. Tanttu, K. Chan, F. Hudson, K. Itoh, A. Saraiva, C. Yang, A. Dzurak, and S. Bartlett, Phys. Rev. Appl. 17, 024068 (2022).
  * Blume-Kohout  _et al._ [2017] R. Blume-Kohout, J. K. Gamble, E. Nielsen, K. Rudinger, J. Mizrahi, K. Fortier, and P. Maunz, Nature Communications 8, 14485 (2017).
  * Beale  _et al._ [2018] S. J. Beale, J. J. Wallman, M. Gutiérrez, K. R. Brown, and R. Laflamme, Phys. Rev. Lett. 121, 190501 (2018).
  * Huang  _et al._ [2019] E. Huang, A. C. Doherty, and S. Flammia, Phys. Rev. A 99, 022313 (2019).
  * Iverson and Preskill [2020] J. K. Iverson and J. Preskill, New Journal of Physics 22, 073066 (2020).
  * Wallman  _et al._ [2015] J. Wallman, C. Granade, R. Harper, and S. T. Flammia, New Journal of Physics 17, 113020 (2015).
  * Bonilla Ataides  _et al._ [2021] J. P. Bonilla Ataides, D. K. Tuckett, S. D. Bartlett, S. T. Flammia, and B. J. Brown, Nature Communications 12, 2172 (2021).
  * Darmawan  _et al._ [2021] A. S. Darmawan, B. J. Brown, A. L. Grimsmo, D. K. Tuckett, and S. Puri, PRX Quantum 2, 030345 (2021).
  * Singh  _et al._ [2022] S. Singh, A. S. Darmawan, B. J. Brown, and S. Puri, Phys. Rev. A 105, 052410 (2022).
  * Iyer  _et al._ [2022] P. Iyer, A. Jain, S. D. Bartlett, and J. Emerson, Phys. Rev. Res. 4, 043218 (2022).
  * Jain  _et al._ [2023] A. Jain, P. Iyer, S. D. Bartlett, and J. Emerson, Phys. Rev. Res. 5, 033049 (2023).
  * Gottesman and Chuang [1999] D. Gottesman and I. L. Chuang, Nature 402, 390 (1999).
  * Jones [2013a] N. Jones,  _Logic Synthesis for Fault-Tolerant Quantum Computers_ , PhD dissertation, Stanford University (2013a).
  * Beverland  _et al._ [2020] M. Beverland, E. Campbell, M. Howard, and V. Kliuchnikov, Quantum Science and Technology 5, 035009 (2020).
  * Beverland  _et al._ [2021] M. E. Beverland, A. Kubica, and K. M. Svore, PRX Quantum 2, 020341 (2021).
  * Bravyi and Kitaev [2004] S. Bravyi and A. Kitaev, Physical Review A 71, 10.1103/PhysRevA.71.022316 (2004).
  * Litinski [2019] D. Litinski, Quantum 3, 205 (2019).
  * Meier  _et al._ [2013] A. M. Meier, B. Eastin, and E. Knill, Quantum Info. Comput. 13, 195–209 (2013).
  * Bravyi and Haah [2012] S. Bravyi and J. Haah, Phys. Rev. A 86, 052329 (2012).
  * Jones [2013b] C. Jones, Phys. Rev. A 87, 042305 (2013b).
  * Campbell and Howard [2017] E. T. Campbell and M. Howard, Phys. Rev. A 95, 022316 (2017).
  * Campbell and Howard [2018] E. T. Campbell and M. Howard, Quantum 2, 56 (2018).
  * Haah  _et al._ [2017] J. Haah, M. B. Hastings, D. Poulin, and D. Wecker, Quantum 1, 31 (2017).
  * Haah and Hastings [2018] J. Haah and M. B. Hastings, Quantum 2, 71 (2018).
  * Nielsen and Chuang [2011] M. A. Nielsen and I. L. Chuang,  _Quantum Computation and Quantum Information: 10th Anniversary Edition_ (Cambridge University Press, 2011).
  * Merkel  _et al._ [2013] S. T. Merkel, J. M. Gambetta, J. A. Smolin, S. Poletto, A. D. Córcoles, B. R. Johnson, C. A. Ryan, and M. Steffen, Phys. Rev. A 87, 062119 (2013).
  * Wallman and Emerson [2016] J. J. Wallman and J. Emerson, Phys. Rev. A 94, 052325 (2016).
  * Erhard  _et al._ [2019] A. Erhard, J. J. Wallman, L. Postler, M. Meth, R. Stricker, E. A. Martinez, P. Schindler, T. Monz, J. Emerson, and R. Blatt, Nature Communications 10, 5347 (2019).
  * Harper  _et al._ [2019] R. Harper, I. Hincks, C. Ferrie, S. T. Flammia, and J. J. Wallman, Phys. Rev. A 99, 052350 (2019).
  * Tuckett  _et al._ [2018] D. K. Tuckett, S. D. Bartlett, and S. T. Flammia, Phys. Rev. Lett. 120, 050505 (2018).
  * Tuckett  _et al._ [2020] D. K. Tuckett, S. D. Bartlett, S. T. Flammia, and B. J. Brown, Phys. Rev. Lett. 124, 130501 (2020).
  * Puri  _et al._ [2020] S. Puri, L. St-Jean, J. A. Gross, A. Grimm, N. E. Frattini, P. S. Iyer, A. Krishna, S. Touzard, L. Jiang, A. Blais, S. T. Flammia, and S. M. Girvin, Science Advances 6, 10.1126/sciadv.aay5901 (2020), https://www.science.org/doi/pdf/10.1126/sciadv.aay5901 .
  * Heußen  _et al._ [2023] S. Heußen, L. Postler, M. Rispler, I. Pogorelov, C. D. Marciniak, T. Monz, P. Schindler, and M. Müller, Phys. Rev. A 107, 042422 (2023).
  * Goto [2016] H. Goto, Scientific Reports 6, 19578 (2016).
  * Reichardt [2020] B. W. Reichardt, Quantum Science and Technology 6, 015007 (2020).
  * Eastin and Knill [2009] B. Eastin and E. Knill, Phys. Rev. Lett. 102, 110502 (2009).
  * Vidal and Tarrach [1999] G. Vidal and R. Tarrach, Phys. Rev. A 59, 141 (1999).
  * Heinrich and Gross [2019] M. Heinrich and D. Gross, Quantum 3, 132 (2019).
  * Seddon and Campbell [2019] J. R. Seddon and E. T. Campbell, Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 475, 10.1098/rspa.2019.0251 (2019).
  * Chamberland and Cross [2019] C. Chamberland and A. W. Cross, Quantum 3, 143 (2019).
  * Gottesman [1997] D. Gottesman,  _Stabilizer Codes and Quantum Error Correction_ , PhD thesis, California Institute of Technology (1997).
  * Gupta  _et al._ [2023] R. S. Gupta, N. Sundaresan, T. Alexander, C. J. Wood, S. T. Merkel, M. B. Healy, M. Hillenbrand, T. Jochym-O’Connor, J. R. Wootton, T. J. Yoder, A. W. Cross, M. Takita, and B. J. Brown, Encoding a magic state with beyond break-even fidelity (2023), arXiv:2305.13581 [quant-ph] .
  * Yoder and Kim [2017] T. J. Yoder and I. H. Kim, Quantum 1, 2 (2017).
  * Chao and Reichardt [2018] R. Chao and B. W. Reichardt, Phys. Rev. Lett. 121, 050502 (2018).
  * Robertson  _et al._ [2017] A. Robertson, C. Granade, S. D. Bartlett, and S. T. Flammia, Phys. Rev. Appl. 8, 064004 (2017).
  * McKay  _et al._ [2019] D. C. McKay, S. Sheldon, J. A. Smolin, J. M. Chow, and J. M. Gambetta, Phys. Rev. Lett. 122, 200502 (2019).
  * Cong  _et al._ [2022] I. Cong, H. Levine, A. Keesling, D. Bluvstein, S.-T. Wang, and M. D. Lukin, Phys. Rev. X 12, 021049 (2022).
  * Sahay  _et al._ [2023] K. Sahay, J. Jin, J. Claes, J. D. Thompson, and S. Puri, Phys. Rev. X 13, 041013 (2023).
  * Sørensen and Mølmer [2000] A. Sørensen and K. Mølmer, Phys. Rev. A 62, 022311 (2000).
  * Bermudez  _et al._ [2019] A. Bermudez, X. Xu, M. Gutiérrez, S. C. Benjamin, and M. Müller, Phys. Rev. A 100, 062307 (2019).

##  Appendix A Exploring Pauli Bias

(a)

$\vbox{\hbox{\includegraphics[width=86.72267pt]{figures/figure13.pdf}}}=\vbox{\hbox{\includegraphics[width=45.52824pt]{figures/figure14.pdf}}}$

(b)

$\vbox{\hbox{\includegraphics[width=151.76964pt]{figures/figure15.pdf}}}=\vbox{\hbox{\includegraphics[width=45.52824pt]{figures/figure16.pdf}}}$

Figure 9: In (a) $Z$ noise on a $C_{Z}$ becomes mixed noise
$\mathcal{M}=\\{Z_{1},X_{2},Z_{1}X_{2}\\}$ when used to implement a CNOT. The
final $\mathcal{M}$-bias $\eta_{2}^{\mathcal{M}}$ of the noise will equal the
initial $Z$-bias $\eta_{2}^{Z}$ of the $C_{Z}$ noise. The same applies for
$X$-bias $\eta_{2}^{X}$ in noisy MS-gates [59], as depicted in (b).

We have used two-qubit bias throughout this this work to parameterise physical
noise. Different kinds of bias have been introduced to help identify which
aspects of physical noise drive the bias of logical noise. Despite the
seemingly ad-hoc manner that each bias has been defined, all biases mentioned
have maintained consistent properties that we now explicate.

For all sets of high-rate errors used in this text
$\mathcal{Q}\subset\mathcal{P}_{n}\backslash\\{\mathbb{I}\\}$, any Pauli error
$Q\in\mathcal{Q}$ commutes with all other Pauli errors in $\mathcal{Q}$. The
set is always chosen to have the largest possible cardinality, that is,
$|\mathcal{Q}|=2^{n}-1$ for $n$-qubit noise. We can express such high-rate
sets in terms of $n$ independent commuting generators

$\mathcal{Q}={\langle
Q^{(1)},Q^{(2)},Q^{(3)},\dots,Q^{(n)}\rangle\backslash\\{\mathbb{I}\\}}$ (10)

The corresponding set of low-rate errors $\mathcal{Q}^{C}$ has cardinality
$|\mathcal{Q^{C}}|=4^{n}-2^{n}$, such that $n$-qubit depolarising noise has a
bias value of $2^{-n}$ for any choice of $\mathcal{Q}$.

In the same way that we extend single-qubit bias to two-qubit bias in section
II.2.1, we can straightforwardly generalise single-qubit bias to $n$-qubit
bias

$\eta_{n}^{P}\vcentcolon=\eta_{n}^{\langle
P_{1},P_{2},P_{3},\dots,P_{n}\rangle\backslash\\{\mathbb{I}\\}}$ (11)

$Y$-biased noise is distinct from $X$\- and $Z$-biased noise in the context of
faulty CNOTs. For the latter two, whether the noise occurs before or after the
CNOT has no effect on the extent of bias or the rates of error for the Pauli
noise models we considered. The CNOT permutes errors within $\mathcal{Q}$ and
$\mathcal{Q^{C}}$ but does not exchange errors between the two sets. For
$Y$-biased noise, errors in $\mathcal{Q}$ can become errors in
$\mathcal{Q^{C}}$ when the Pauli noise channel occurs before the CNOT.
Although $Y$-biased noise differs in this regard, simulations that considered
$\eta_{2}^{Y}$ gave comparable results to $\eta_{2}^{X}$ and provided no
substantial additional insight into the characteristics of logical noise.

The mixed-bias $\mathcal{M}=\\{Z_{1},X_{2},Z_{1}X_{2}\\}$ is a notable outlier
among the two-qubit biases presented in this text, and there are various
alternative candidates that could have been chosen for mixed bias. We were
motivated by the following unique features of $\mathcal{M}$: just as with
$\eta_{2}^{X}$ and $\eta_{2}^{Z}$, the extent of $\mathcal{M}$-biased noise is
unchanged if the biased noise channel occurs before or after the CNOT. In
addition, $\mathcal{M}$ is the only high-rate set where all constituent errors
commute with the CNOT operator, making it a fairly natural choice for mixed-
bias in the context of faulty CNOTs. As figure 9 suggests,
$\mathcal{M}$-biased physical noise is related to other sensible kinds of bias
motivated by device noise [56, 57, 58, 60].

##  Appendix B Logical Tomography

Figure 10: Logical circuit structure for our simulations of logical $T$-gates
implemented through magic state injection. The circuit is encoded in the
Steane code. We modify the input stabiliser state and final measurement basis
of the circuit by varying the logical Clifford operators $C_{L}$ and
$C^{\prime}_{L}$, allowing us to perform logical process tomography. The final
measurements are transversal applications of physical $Z$ measurements whose
parity is used to determine the logical measurement outcome.

In order to perform fault-tolerant logical tomography we must ensure that
logical state preparation and logical measurement are implemented fault-
tolerantly, otherwise logical SPAM errors will dominate the noise of the
derived logical process. We also need to perform error correction to ensure
the process itself is fault-tolerant. We discuss and define these specific
circuit components in other parts of the appendix: fault-tolerant state
preparation in appendix C and stabiliser measurements in appendix D. Here we
focus on how the measurement outcomes of our simulations are used to perform
logical tomography.

The logical circuits that we simulate are depicted in figure 10, from which we
derive the full assortment of circuits required to perform tomography by
varying the Clifford operators $C_{L}$ and $C^{\prime}_{L}$. To prepare
initial states $\left|0\right\rangle_{L}$, $\left|1\right\rangle_{L}$,
$\left|+\right\rangle_{L}$ and $\left|+_{Y}\right\rangle_{L}$, $C_{L}$ is
chosen to be $I^{\otimes 7}$, $X^{\otimes 7}$, $H^{\otimes 7}$ and
$(S^{\dagger}H)^{\otimes 7}$ respectively. We also need to measure in the
three Pauli bases, $X$, $Y$ and $Z$, however we incorporate the adaptive
$S_{L}$ correction into $C^{\prime}_{L}$ to keep in mind circumstances where
adaptive control is not possible. In those circumstances six circuits are
required per initial state rather than three. For $X$, $Y$ and $Z$ logical
measurements with logical magic state outcome of 0, $C^{\prime}_{L}$ is chosen
to be $H^{\otimes 7}$, $(HS)^{\otimes 7}$ and $I^{\otimes 7}$ respectively.
For $X$, $Y$ and $Z$ logical measurements with logical magic state outcome of
1, $C^{\prime}_{L}$ is chosen to be $(HS^{\dagger})^{\otimes 7}$, $H^{\otimes
7}$ and $(S^{{\dagger}})^{\otimes 7}$ respectively. Overall this amounts to 12
distinct circuits if adaptive circuits can be performed, increasing to 24 if
they cannot.

$\vbox{\hbox{\includegraphics[width=26.01613pt]{figures/figure18.pdf}}}=\vbox{\hbox{\includegraphics[width=117.07924pt]{figures/figure19.pdf}}}$

Figure 11: Encoding of the $\left|T\right\rangle$ state into the Steane code
[50, 44]. A local single-qubit fault on the unencoded $\left|T\right\rangle$
will be encoded as a logical error.

As discussed in appendix C we initially use post-selection to ensure the
fault-tolerant preparation of logical states. Subsequently we use stabiliser
measurements to perform error correction. We also use the transversal $Z$
measurement of the logical magic state to correct $X$ errors by using the
products of measurement outcomes to simultaneously infer both the logical $Z$
outcome and the $Z$ stabiliser outcomes. The same is not done for the final
tomography measurement, with any further errors detected after correction
being treated as leakage from the logical subspace. Appendix D.2 discusses
these leakage errors in more detail.

The logical probabilities obtained via simulation of each distinct circuit are
then used to derive the logical process matrix by using the generalised
inverse [35].

##  Appendix C State Preparation

$\vbox{\hbox{\includegraphics[width=26.01613pt]{figures/figure20.pdf}}}=\vbox{\hbox{\includegraphics[width=86.72267pt]{figures/figure21.pdf}}}$

Figure 12: Encoding of the $\left|0\right\rangle$ state into the Steane Code
[44]. Without performing any additional error detection or correction, the
prepared logical state may have errors of weight-one or weight-two.

We divide logical state preparation into three components: a non-fault-
tolerant state preparation, a logical state check, and a round of stabiliser
measurements performing error detection. Since stabiliser measurements apply
more broadly than state preparation, we consider them separately in section D.
In this section we identify the critical errors from state preparation that
the later error detection must address.

We will require the final logical state to have no more than a single-qubit
error at first order since we are operating within the Steane code. Without
this requirement subsequent error correction may not be able to recover the
ideal state at first order because the character of the Pauli errors can
change throughout the circuit. We will keep this important constraint in mind
when considering sources of noise throughout this section.

The schemes discussed in this section come from the work of Goto [44] and
Chamberland et al. [50]. Here we consider how the structure of these schemes
matter within the context of our work.

###  C.1 Encoding Circuits

$\vbox{\hbox{\includegraphics[width=26.01613pt]{figures/figure22.pdf}}}=\vbox{\hbox{\includegraphics[width=69.38078pt]{figures/figure23.pdf}}}$

$\vbox{\hbox{\includegraphics[width=26.01613pt]{figures/figure24.pdf}}}=\vbox{\hbox{\includegraphics[width=136.59135pt]{figures/figure25.pdf}}}$

Figure 13: Logical check circuits that detect errors on the prepared logical
state. These circuits are post-selected on +1, projecting the logical qubit
onto the corresponding logical subspace. $0_{m}$ projects the state onto the
+1 eigenspace of $Z_{L}$, while $T_{m}$ projects the state onto the +1
eigenspace of $(X_{L}+Y_{L})/\sqrt{2}$, an operator that stabilises the
logical magic state $\left|T\right\rangle_{L}$.

Encoding circuits are a type of Clifford operator that take a number of
unentangled qubits into the logical space of some desired code. These circuits
are not unique and we do not attempt to improve upon existing encoding schemes
here. We use encoding circuits as found in existing work [44, 50], which we
depict in figures 11 and 12.

Simple encoding circuits are generally not fault-tolerant because the initial
states are unencoded and thus vulnerable to errors. Physical errors on the
initial states may get encoded into logical errors, and at the very least,
local errors often spread and become higher weight errors. One such case
occurs when we prepare magic states using the encoding circuit of figure 11,
where errors on the third qubit can become logical errors. Logical errors
cannot be corrected or detected by code stabiliser checks, demonstrating a
need for other checks in order to prepare logical states fault-tolerantly.

In contrast, the preparation of logical stabiliser states that we use,
depicted in figure 12, does not introduce undetectable logical errors from any
single-qubit sources. Local errors may spread into high-weight errors, but
they remain detectable. Although not as necessary when compared to magic state
preparation, additional logical checks are still useful for mitigating the
problem of high-weight errors, especially when faced with correlated noise.

###  C.2 Logical Checks

Logical check measurements are a requirement for fault-tolerant state
preparation in addition to the usual stabiliser checks. The previous
subsection C.1 indicated why logical checks are necessary, although the
specific problems that the checks need to address depend on the state being
prepared. The checks we review here originate from existing literature [44,
50] and are depicted in figure 13. In this section, we highlight the
differences between these state preparation schemes and detail the main types
of noise that they fail to detect.

The logical check used in the preparation of the $\left|0\right\rangle_{L}$
state must account for high weight $X$ noise. Due to properties of the
$\left|0\right\rangle_{L}$ state, $Z$ noise is not a major concern: logical
$Z$ errors act trivially on the state, also meaning that a weight-two $Z$
error is equivalent to a weight-one $Z$ error. Hence, Goto’s check circuit
does not attempt to detect $Z$ errors, detecting only $X$ errors instead. It
does so with just one additional ancilla post-selected on $+1$.

For the Pauli noise models considered within this work, this check ensures
that the state is prepared with no logical errors at first order; there can be
no more than a single $Z$ error, and the logical check ensures that there is
no more than a single $X$ error. However, this does not ensure that these
errors are localised to a single qubit. This is particularly true when
considering two-qubit errors introduced by CNOTS, however, as figure 14 shows,
even errors that are initially localised to a single-qubit can become
undetected multi-qubit errors. Such weight-two errors are a problem when
performing error correction because the Steane code’s distance is only three,
so we will need to account for them with further stabiliser checks. For our
simulations we follow the state preparation with a round of error detection.

For the magic state logical check, first note that the check circuit in figure
13 is the same as the one provided by Chamberland et al. [50] but performed in
a different basis. In their paper, they prepare the Hadamard eigenstate
$\left|H\right\rangle=\cos(\pi/8)\left|0\right\rangle+\sin(\pi/8)\left|1\right\rangle$
which is injected to implement $Y(\pi/8)$. The $\left|T\right\rangle$ magic
state is equivalent to the Hadamard eigenstate up to Clifford operations
$\left|H\right\rangle=SH\left|T\right\rangle$, likewise, the check circuit
$T_{m}$ is equivalent to their check circuit up to Clifford operations.

Unlike the preparation of $\left|0\right\rangle_{L}$, the preparation of
$\left|T\right\rangle_{L}$ must deal with a more fundamental problem: logical
errors occur at first order. By measuring $(X_{L}+Y_{L})/\sqrt{2}$ with the
check circuit $T_{m}$ we can detect those logical errors and avoid them by
post-selecting on $+1$. However, high-weight errors will still occur on the
prepared state, some of which cannot be corrected. Weight-two $Z$ errors
commute with the check and thus cannot be detected by it. Weight-two $X$ and
$Y$ errors will remain as weight-two errors after post-selecting on $+1$.
Therefore, we must follow the magic state preparation scheme with a round of
error detection.

Figure 14: A fault-tolerant state preparation for logical
$\left|0\right\rangle$ in the Steane Code [44]. Post-selecting the ancilla
measurement on $+1$ ensures that no single fault results in an undetectable
logical error. Without performing any additional error detection or
correction, the prepared logical state may have errors of weight-one or
weight-two. Here a local error $Y_{7}$ spreads to $Z_{5}Y_{7}$. Note that
$Z_{L}=Z_{2}Z_{5}Z_{7}$ and $Z_{5}Y_{7}=Z_{2}X_{7}Z_{L}\sim Z_{2}X_{7}$. By
applying a suitable $Z_{L}$, all emerging weight-two errors may be expressed
as either single-qubit $X$ and $Z$, or single-qubit $Y$ and $Z$.

Both state preparation schemes rely on a single successful logical check to be
fault-tolerant. Therefore, whenever the check’s ancilla has a measurement
error, other errors can go entirely undetected. This means that the state
preparation schemes used here perform no better than second order.

It is for that reason that we do not consider logical tomography of a logical
$T$-gate where errors are being error detected. While the lowest order logical
errors from the transversal gates will be third order due to error detection,
the logical errors of state preparation will be second order. The results of
such a tomography would reflect the limitations of state preparation rather
than the pertinent characteristics of the injection scheme.

$\vbox{\hbox{\includegraphics[width=30.35657pt]{figures/figure27.pdf}}}=\vbox{\hbox{\includegraphics[width=359.90538pt]{figures/figure28.pdf}}}$

Figure 15: A flagged scheme for performing error detection fault-tolerantly on
the Steane code. The CNOTs for each stabiliser measurement are coloured red,
green and blue corresponding to the stabiliser generators depicted in figure
2. This scheme is a modification of the one introduced by Reichardt [45] such
that no weight-two errors over the support of any CNOT will amount to errors
of weight-two or higher on the data qubits without also having a non-trivial
syndrome. This stabiliser measurement scheme is used within this work for
error detection during state preparation, however, the original scheme by
Reichardt is used for stabiliser measurements performing error correction
$EC$.

##  Appendix D Error Correction

Error correction is a crucial component to all fault-tolerant schemes. Even if
a code has transversal gates, these gates must still be followed by a round of
error correction in order to take advantage of the transversality. As seen in
the previous section, these stabiliser measurements are also necessary to
prepare logical states fault-tolerantly.

Here we precisely detail how error correction is implemented within our
simulations, with specific focus on the complications introduced by correlated
noise. This close analysis is particularly motivated by error correction’s
pivotal role in constraining the extent of logical bias.

###  D.1 Correlated Hook Errors

When preparing logical states in the Steane code, we must ensure that any
first order errors that escape detection are localised to a single-qubit. If
that is not the case, the errors may later get corrected into logical errors
because the Steane code’s distance is only three. This is a substantial
challenge when we consider correlated noise, since the weight-two errors
occurring in non-fault-tolerant components must not affect any more than a
single qubit of the final state.

Earlier work [50] has utilised Reichardt’s flagged measurement scheme [45] to
prepare logical states in the Steane code. Using no additional ancilla qubits,
this flagged scheme is able to deal with a type of fault called a hook error
[53, 45, 54]. The flag CNOTs of Reichardt’s scheme ensure that hook errors can
be detected and corrected appropriately. Without using flags, single-qubit
hook errors are able to spread to multiple data qubits undetected.

However as figure 16 demonstrates, there are certain errors that this scheme
fails to tolerate when considering correlated weight-two errors over a single
CNOT. Such errors can occur with a trivial syndrome, allowing weight-two
errors to spread to the logical state undetected. When using this stabiliser
measurement for state preparation, such sources of correlated noise compromise
the fault-tolerant preparation.

Figure 16: Correlated errors in flagged schemes can spread to weight-two
errors on the logical qubit. Depicted here is a section of a flagged
stabiliser measurement scheme by Reichardt [45]. A correlated error introduced
to the ancilla qubits by the flag CNOT spreads undetected to the computational
qubits as a weight-two error $X_{6}Z_{7}$.

This kind of multi-qubit hook error is a problem specific to flagged schemes.
By applying CNOTs between ancilla qubits, we introduce a new way that
correlated noise may arise. High-weight errors may now occur correlated
between multiple ancilla qubits, rather than independently, leading to a new
kind of multi-qubit hook error that can be a problem for fault-tolerance.

In order to account for such errors, we modify this flagged scheme for use in
state preparation. Our modified circuit is depicted in figure 15. Rearranging
only a few CNOTs, we can detect all offending correlated errors from within
the stabiliser measurement such that only single-qubit errors evade error
detection.

By using the circuit in figure 15 in conjunction with the state preparation
components of appendix C, we can prepare logical states with at most single-
qubit errors at first order. We use this specific setup in all our
simulations.

###  D.2 Correlated Errors and Leakage

Figure 17: A single-qubit error can become a high-weight error after
performing error correction. Although it appears like the $Y$ error has
already spread into a high-weight error, $Z_{1}Z_{3}Z_{7}=Z_{5}Z_{R}$, where
$Z_{R}$ is the red $Z$ stabiliser. So effectively only a single error $Z_{5}$
has been introduced. However, the $Y$ error triggers two ancilla measurements
so that after applying the corresponding correction the final error is
$X_{1}Z_{4}Z_{5}=Y_{1}Z_{L}$. Such an error goes undetected by logical $Y$
measurements but acts as a logical error. $Y_{1}Z_{L}$ is still detectable
when performing $X$ and $Z$ syndrome measurements.

Correlated errors are particularly troublesome in low-distance codes because
there is a very strict limit on the number of errors that can be tolerated.
Such issues drive us to integrate error correction into logical tomography
itself, which we will discuss here.

It is fairly easy for weight-two errors that arise within stabiliser
measurements to result in weight-two errors on the data qubits. Setting aside
flag CNOTs, correlated noise on the regular CNOTs of a stabiliser measurement
will introduce one error to a data qubit and one error to an ancilla qubit.
The ancilla error may be detected, prompting a subsequent correction
corresponding to the syndrome. Often the correction will be applied to a
different qubit than the pre-existing data error. Although the initial weight-
two error does not affect two data qubits, it can after error correction. For
our noise models, this would mean that weight-two errors are introduced by
faulty error correction at first order.

Even without high-weight errors, single-qubit errors may cause problems for
logical tomography, as outlined in figure 17. The error in the figure is
initially a local $Y$ error but after error correction it is equivalent to an
error on three separate qubits, anticommuting with logical $Y$, but commuting
with all $Y$ stabilisers. Correlated weight-two errors in error correction
cause similar problems for tomography.

This error is not a logical operator, therefore, we can still detect the error
if we are careful with our measurements. For that reason, we change the
logical basis for tomography before performing error correction, so that such
errors can be detected and discarded as leakage from the logical space.

Customarily, we would follow up the stabiliser measurement with another round
of stabiliser measurements, but then we would not be performing tomography on
a consistent process. Hence, we must incorporate the error correction step
into the logical measurement in order to perform logical tomography. These
types of errors are a problem because of the code’s low-distance, nonetheless,
they are not an obstacle for tomography so long as the circuit is arranged to
detect them, as done here.