# Analysing correlated noise on the surface code using adaptive decoding
algorithms

Naomi H. Nickerson  Quantum Optics and Laser Science, Blackett Laboratory,
Imperial College London, Prince Consort Road, London SW7 2AZ, United Kingdom
Benjamin J. Brown  Niels Bohr International Academy, Niels Bohr Institute,
Blegdamsvej 17, 2100 Copenhagen, Denmark  Centre for Engineered Quantum
Systems, School of Physics, University of Sydney, Sydney, New South Wales
2006, Australia

(August 27, 2024)

###### Abstract

Laboratory hardware is rapidly progressing towards a state where quantum
error-correcting codes can be realised. As such, we must learn how to deal
with the complex nature of the noise that may occur in real physical systems.
Single qubit Pauli errors are commonly used to study the behaviour of error-
correcting codes, but in general we might expect the environment to introduce
correlated errors to a system. Given some knowledge of structures that errors
commonly take, it may be possible to adapt the error-correction procedure to
compensate for this noise, but performing full state tomography on a physical
system to analyse this structure quickly becomes impossible as the size
increases beyond a few qubits. Here we develop and test new methods to analyse
blue a particular class of spatially correlated errors by making use of
parametrised families of decoding algorithms. We demonstrate our method
numerically using a diffusive noise model. We show that information can be
learnt about the parameters of the noise model, and additionally that the
logical error rates can be improved. We conclude by discussing how our method
could be utilised in a practical setting blue and propose extensions of our
work to study more general error models.

##  1 Introduction

The success of scalable quantum computation depends on our ability to diagnose
and repair errors incident to the underlying physical qubits [1, 2, 3, 4, 5,
6, 7] of the system. To this end quantum error-correcting codes [8, 9, 10, 11,
12, 13, 14] have been developed to allow us to correct for a finite density of
physical errors that might otherwise irreversibly disturb a quantum
computation. Of particular interest are topological codes [10, 11], which are
experimentally viable due to their local structure and low-weight syndrome
measurement operations [15, 16].

Quantum error-correcting codes are commonly studied with a simple error model
where it is assumed that each physical qubit is subject to some rate of local
noise that is independent of the state of other nearby qubits and its local
environment. Identifying thresholds [11] and finding the resource overheads
[17, 18, 19] of different codes using simple error models can provide a proof
of principle that a code can withstand local noise, and offers a standardised
benchmark to uniformly compare different error-correcting codes with one
another [20, 21]. However, when we consider some realisation of a quantum
error-correcting code, where we take into account physical features of its
underlying hardware [22, 23, 24], an independent noise model is unlikely to be
realistic. Instead, we might anticipate that correlated errors [25, 26, 27,
28, 29, 30, 31] could occur, where the probability of a qubit suffering an
error depends on its neighbouring qubits having also suffered errors.

Correlated noise has been identified in a number of physical systems that
might serve to realise quantum error-correcting codes. For example, external
fields and proximity effects in solid state systems [30, 32] introduce
correlated errors, as do quantum codes that are coupled to a boson environment
[33, 34, 35, 36, 37, 13, 31, 38]. Correlated errors have also been identified
when non-Markovian effects are modelled [26, 39]. It has also been seen that
correlated errors can be introduced by certain schemes of quantum error-
correction. This has been observed, for instance, in Ref. [19]. Correlated
errors also occur when considering syndrome measurements under the circuit-
based noise model [40, 41, 42, 43, 44], and while applying transversal logical
gates to quantum error-correcting codes that are not in their code space [45].
See also recent work. [46].

The aim of this Manuscript is to develop numerical methods to characterise
correlated error models. Specifically, we develop families of decoding
algorithms, each member of which is designed to correct for a particular
correlated error model. We show that we can use a decoder family, which we
will refer to as an adaptive decoder, to analyse a source of noise with some
unknown parameter by comparing the logical error rates of different members of
a decoder family. We perform simulations to demonstrate our methods explicitly
by adapting Edmonds’ minimum-weight perfect matching algorithm [47, 48] to
identify string-like correlated errors introduced to the toric code [10].
Gaining information on the structure of correlations in noise can be used as a
diagnostic tool to minimize the effect of correlations at the hardware level.
It may also be used to improve classical post-processing. We show that we can
use our adaptive scheme to find a decoder with an improved threshold to deal
with the physical error model.

There are a number of methods and results in the literature that look to
determine correlations that may emerge in fault-tolerant quantum hardware. In
Ref. [49] Combes et al. showed that syndrome data can be used to discriminate
between different correlated noise processes acting on small quantum codes
including the classical repetition code and the five-qubit code [50]. Our
results build on this work by examining different codes and we give numerical
evidence that these ideas are applicable to degenerate codes [51]. Moreover,
the use of efficient decoding algorithms that we propose make our diagnostic
techniques scalable to systems of large size. We point out that recently,
during the preparation of the present manuscript Ref. [52] showed that it is
possible to monitor time-dependent parameters of uncorrelated noise models to
improve threshold error rates using methods similar to ours.

Other methods have also been found to determine correlated errors that occur
during the error correction process. In Ref. [42] the authors simulate a
circuit-level error model to directly calculate the likelihood that correlated
errors occur while syndrome data is measured. The information obtained with
this procedure is used to improve decoding schemes. Further, in Ref. [53],
drifts in experimental parameters of a small repetition code are identified
and corrected by measuring changes in the rate at which error-detection events
occur. See also Ref. [54] that recently became available. These works make use
of local syndrome data to determine different parameters in the error model.
In contrast, we make use of a decoding algorithm that uses global syndrome
data to distinguish more generic correlated error models where error events
may correlate over a large number of adjacent qubits.

We also remark on previous work to specialise decoders to account for known
correlated errors. It has been shown [55, 56, 57, 58, 59, 60, 61, 62, 63] that
we can obtain improved thresholds by using a decoder that specifically
accounts for known correlations that occur under depolarising noise. Hutter
and Loss have also identified that specialised decoders can be used to correct
for known correlated errors introduced by a thermal environment [29]. The
present work extends these ideas by demonstrating that we can use learned
knowledge to calibrate a decoder to give improved thresholds without complete
knowledge of the error model a priori.

The remainder of the Manuscript is structured as follows. In Section 2 we
introduce the toric code and develop decoding algorithms for general
correlated errors. In Section 3 we show that the generalised decoders we
present can be used to find signatures that distinguish correlated errors.
Section 4 shows that we can use error model data to obtain improved decoding
schemes. In Sec. 5 we give a discussion on how we might apply our scheme to
the practical development of fault-tolerant quantum hardware. We conclude in
Section 6 by discussing potential directions to develop our methods in order
to diagnose more general forms of correlated error.

##  2 The toric code and error models

We study correlated errors acting on the well-studied toric code model. In
this Section we briefly review the toric code, and introduce the notation we
use to describe correlated error events. We go on to describe the minimum-
weight perfect-matching (MPWM) algorithm that we will use to analyse
correlated errors.

###  2.1 The toric code

Figure 1: The toric code with qubits arranged on the edges of a sqaure lattice
of size $L=7$. (a) A plaquette operator is shown in blue. (b) A star operator
is shown in orange. (c) and (d) show logical operators $\overline{Z}_{1}$ and
$\overline{X}_{1}$, respectively.

The toric code [10] is a quantum error-correcting code of $n=2L^{2}$ qubits,
arranged on the edges on a square lattice of $L\times L$ vertices with
periodic boundary conditions, as shown in Fig. 1. The code space of the toric
code is described by its stabilizer group, $\mathcal{S}$ [64]. The stabilizer
group is an Abelian subgroup of the Pauli group, $\mathcal{P}$, where the code
states of the toric code, $|\psi_{j}\rangle$, are the common $+1$ eigenspace
of all elements $S_{k}\in\mathcal{S}$

$S_{k}|\psi_{j}\rangle=(+1)|\psi_{j}\rangle,\quad\forall j,k.$ (1)

Elements of the stabilizer group are commonly known as stabilizers.

The stabilizer group of the toric code consists of two types of stabilizers,
star operators, $A_{v}$, and plaquette operators, $B_{f}$, defined as follows

$A_{v}=\prod_{\partial j\ni v}{X_{j}},\quad B_{f}=\prod_{j\in\partial
f}{Z_{j}},$ (2)

where $j$ is an index over the qubits and $X_{j}$ and $Z_{j}$ operators are
Pauli-X and Pauli-Z operators acting on qubit $j$. The set $\partial f$ are
the qubits on the boundary of face $f$ and $\partial j$ is the set of vertices
$v$ at either end of the edge that supports qubit $j$. The stabilizer group
consists of one star operator for each vertex, $v$, and one plaquette operator
for each face $f$. Colloquially, a star operator is the product of Pauli-X
operators acting on all the qubits on edges incident to vertex $v$, and a
plaquette operator is the product of Pauli-Z operators acting on all the edges
that bound faces of the lattice, $f$. We show pictures of a plaquette and a
star operator in Figs. 1(a) and (b), respectively.

The code space of the toric code encodes two logical qubits that are acted
upon by logical operators $\mathcal{L}$, whose elements are $\overline{Z}_{j}$
and $\overline{X}_{j}$ with $j=1,2$. The logical operators are non-
contractible loops of Pauli-Z or Pauli-X operators acting on the primal or
dual edges of the lattice respectively. One pair of these logical operators,
$\overline{X}_{1}$ and $\overline{Z}_{1}$, is shown in Figs. 1(c) and (d).

Quantum error-correcting codes are designed to identify and correct errors
suffered by the code. We consider error operators $E\in\mathcal{P}$. The
procedure for error correction involves measuring the generators of the
stabilizer group. Stabilizers commute with the logical operators of the
stabilizer code, and as such we do not disturb encoded logical information
when stabilizer measurements are made. The outcomes of the stabilizer
measurements can be used to identify the error as the elements of the
stabilizer group $S_{j}$ that do not commute with $E$ will return a $-1$
outcome. We see this with the eigenvalue equation

$S_{k}E|\psi_{j}\rangle=-ES_{k}|\psi_{j}\rangle=(-1)E|\psi_{j}\rangle,\quad\forall
j,k.$ (3)

We refer to elements of the generating set of $\mathcal{S}$ that return $-1$
eigenvalues as defects. The collection of measurement outcomes of the selected
stabilizer generators is known as the error syndrome. In the case of the toric
code that we study here we use the star and plaquette operators in Eqn. 2 to
represent the canonical set of stabilizer generators.

We require a decoder, a classical post-processing algorithm that interprets
syndrome information, to estimate the most likely error that might have
occurred on the lattice. A decoder will subsequently return a correction
operator, $C$, to attempt to reverse error $E$. Specifically, we seek a
decoder such that the value

$\overline{P}=\text{prob}(CE\in\mathcal{S}),$ (4)

is optimised. To do so, the decoder must make use of some knowledge of the
type of errors that commonly occur in the system. In the remainder of this
Section we describe general correlated noise models acting on the toric code,
the syndromes they give rise to, and the decoder we use to interpret the
syndrome information.

###  2.2 Error events

In the previous Subsection we introduced error operators $E\in\mathcal{P}$.
However, we wish to design a decoder which takes into account more information
about the structure of an error operator. Here we make rigorous the concept of
a structured error model by considering an error operator as a series of error
events.

To study the performance of quantum error-correction procedures against
correlated errors we generate random Pauli errors of the form

$E=\prod_{j}e_{j}^{(1-\sigma_{j})/2},$ (5)

where operators $e_{j}\in\mathcal{P}$ describe a set of error events that may
occur through the noise channel. Error event $e_{j}$ occurs with likelihood
$p_{j}$ such that $\sigma_{j}=-1$ with probability $p_{j}$ and $\sigma_{j}=+1$
otherwise.

Typically quantum error-correcting codes are tested using an independent and
identically distributed(i.i.d.) noise model. For instance, the error events of
the bit-flip noise model are single qubit Pauli errors acting on each qubit of
the code i.e. $e_{j}=X_{j}$ for all $j$ that index the qubits of the system.
Each error event in the model occurs with uniform probability $p_{j}=p$ for
all $j$. Alternatively, the depolarising noise model is sometimes considered,
where similarly, error events $e_{j}$ act uniformly on all qubits $j$ of the
system, i.e. $p_{j}=p$, and then error events can take values $X_{j}$, $Y_{j}$
or $Z_{j}$ with uniform probability $1/3$. In our analysis that follows we
will consider more general bit-flip error models with error events that are
supported on multiple qubits. The restriction to bit-flip errors simplifies
the problem of decoding as all of the stabilizer defects are detected by the
plaquette operators.

###  2.3 Decoding with the minimum-weight perfect matching algorithm

Figure 2: Defects on the lattice (left) are mapped onto a graph with weighted
edges (right) where the weights correspond to the probabilities that its
adjacent pair of defects were created by an event that corresponds to errors
along that edge.

In the next Section we generalise the well-studied MWPM decoding algorithm
[11]. For numerical studies we make use of the Blossom-V implementation of
Edmonds MWPM algorithm [47] due to Kolmogorov [48]. This decoding algorithm is
particularly well suited to the diffusive noise model we will introduce in the
next Section.

The algorithm due to Edmonds takes as input a graph with weighted edges and
returns a matching graph, i.e. a graph where each vertex has one and only one
incident edge, such that the sum of the weights of all the edges are minimal.
We denote edges, $e$, by pairs of vertices of the graph such that $e=(u,v)$
where $u$ and $v$ denote vertices of the graph. We also denote by $W(e)$ the
weight assigned to edge $e$.

To apply the MWPM algorithm to the problem of decoding we assign to each
stabilizer defect measured by a plaquette operator a vertex of the matching
graph. Ideally we then construct a complete weighted graph where we weight
each edge with the function

$W(e)=-\log(\text{prob}(e)),$ (6)

where $\text{prob}(e)$ is the probability that the error model introduced an
error event, or a combination of error events, such that defects $u$ and $v$
of edge $e$ occurred. In general evaluating $W(e)$ may be a complex summation
of exponentially many terms. We will typically approximate this value by
calculating only low-order terms of the summation. We summarise the
construction of the complete graph in Fig. 2.

To find a correction operator we apply the Edmonds MWPM algorithm to the
generated graph to find a matching graph where the edges correspond to a
collection of error events that is likely to have caused the error syndrome.
We use this information to find correction operator $C$.

We remark that for the well-studied case of i.i.d. noise we will typically
have $W(e)=-\log(\text{prob}(e))\propto d(u,v)$ where $d(u,v)$ is the
separation of vertices $u$ and $v$ of edge $e$ on the lattice [11]. Throughout
this work we consider the Manhattan distance where

$d(u,v)=d_{x}+d_{y},$ (7)

where $d_{x}$($d_{y}$) is the separation between $u$ and $v$ along the
$x$($y$) direction on the lattice.

We refer to the MWPM decoder where $W(e)\propto d(u,v)$ which is designed to
deal with i.i.d. noise model as the standard decoder. Other work has also
considered introducing an extra logarithmic term to account for degeneracy in
errors that cause defects at vertices $u$ and $v$ [65, 59], but for simplicity
we do not use this extension here. In this work we will generalise the
construction of the MWPM decoder by assigning different functions to $W(e)$
depending on the anticipated correlated noise model.

The MWPM decoder will find a single error that was likely to have caused a
given syndrome with respect to an error model that is determined by $W$. We
expect that our methods can be improved using maximum-likelihood decoding
schemes that identify the most-likely equivalence class of errors that caused
a given syndrome [65, 55, 56, 66]. However, in general, few efficient maximum-
likelihood decoding algorithms are known [66]. Here we assume that identifying
a single error that was likely to cause the syndrome is a good approximation
of maximum-likelihood decoding. This has been demonstrated to be the case for
the independent and identically distributed noise model in Ref. [11, 67].

##  3 Noise characterisation

In this Section we consider how to adapt the MWPM decoding algorithm, such
that it can be parametrised to target different noise models. This
parameterisation allows us to define a family of decoders, which we call an
adaptive decoder. Specifically, we consider a MWPM decoder where edges are
assigned weights by the function $W_{\lambda}(d)$ where $d$ is the distance
between the two defects, and the parameter $\lambda$ denotes different members
of the decoder family. In general, $\lambda$ can represent many variables, but
here, for simplicity, we will consider only integer values. We show that we
can distinguish different noise models by studying logical error rates as a
function of $\lambda$ with an adaptive decoder. We find that, for certain
noise models with unknown parameters, the logical error rates, or thresholds
of different decoders can allow us to deduce the noise parameters.

We first consider a simple example noise model to analytically justify the use
of logical error rates to learn noise parameters. We will then test two
different adaptive decoders, which we will define shortly, to analyse a
diffusive noise model using numerical experiments.

###  3.1 An illustrative example of the diagnostic tools

Figure 3:  Error events of the ballistic noise model for $\xi=3$. The model
introduces error strings along vertical and horizontal lines that introduce
pairs of stabilizer defects that are separated by distance $\xi$. (a) An error
event acting on a horizontal edge marked by a square box. A bit flip is
introduced to the edge in the square box, and the $\xi-1$ horizontal edges
immediately below the edge where the error event occurs. (b) An error event
acting on a vertical edge marked by a square box. The error event introduces a
bit flip on the vertical edge and the $\xi-1$ vertical edges to the immediate
right of the edge where the event occurs.

We first develop some intuition for our diagnostic method using a simple
correlated noise model, that we call the ballistic noise model, by quoting
some results that are shown in Appendix A. We will argue that improved logical
error rates are achieved with a targeted decoder that uses information about
the noise model in the regime where the error rate is small. We use this
example to motivate the simulations we conduct in the remainder of the paper.

In the ballistic error model, error events form ‘straight lines’ of Pauli
errors with a fixed weight, $\xi$. More specifically, the error event
associated to vertical(horizontal) qubit edge $j$ introduces a bit-flip to
edge $j$ and the subsequent $\xi-1$ edges that are located immediately to the
right of edge $j$ (below edge $j$). Each error event occurs on edge $j$ with
uniform probability $p_{j}=p$. We show examples of error events of the
ballistic noise model where $\xi=3$ in Fig. 3.

In Appendix A we show that for arbitrary $\xi\geq 3$ in the regime where $p$
is very low, otherwise known as the path-counting regime [11, 18], the logical
error rates can be improved by using a targeted decoder. It follows that we
can construct a family of two different decoders to distinguish i.i.d. noise
from the ballistic noise model for fixed $\xi\geq 3$ by comparing the logical
error rates of the two different decoders. The two MWPM decoders of this
family are the following, the first is the standard decoder, where the
matching graph is constructed with edges weighted according to the separation
of stabilizer defects. This decoder seeks the lowest-weight correction
operator. The second decoder in the family is the targeted decoder, which
anticipates the ballistic noise model and assigns weight $a$ to edges where
stabilizer defects are separated by distance $a\xi$, and otherwise assigns
very high weights to edges of the matching graph.

Figure 4:  An error caused by the ballistic noise model in the path-counting
regime. The noise model introduces strings of length $\xi=L/4$. A standard
decoder will have difficulty dealing with this error configuration as there
are two inequivalent correction operators that have the same weight.
Conversely the targeted decoder which is designed to anticipate errors that
introduce defects that are separated by a distance $\xi$ will correct errors
from this error model with high probability.

Consider the ballistic noise model with $\xi=L/4$ in the path-counting regime
where $1/p\gg 4\xi L$. In this example the common error configurations that
will cause either the standard decoder or the targeted decoder to fail are
those where two non-overlapping error events occur on the same row or column.
However, there are far fewer non-overlapping error configurations that will
cause the targeted decoder to fail compared with the standard decoder. We give
an example error configuration in Fig. 4 caused by the ballistic noise model
that will be corrected using the targeted decoder, but will not be corrected
by the standard decoder.

For the case of the error configuration shown in Fig. 4, the standard decoder
will construct a graph that will assign equal probabilities to two
inequivalent correction operators, $C_{1}$ and $C_{2}$, independent of $L$,
where $C_{1}$ repairs the error, $C_{1}E\in\mathcal{S}$, and the other
correction is such that $C_{2}E\not\in\mathcal{S}$. The standard decoder will
struggle to deal with this case as both $C_{1}$ and $C_{2}$ will have weight
$\sim L/2$ and as such, the standard decoder will not be able to identify the
error events that have caused the given syndrome. In contrast, the targeted
decoder that is designed to identify the error events that introduce defects
separated by distance $\xi$, and will assign very low weights to the edges of
the set that correspond to the correct correction operator, and very high
weights to the other edges.

One can count the number of non-overlapping error configurations using Eqn.
(11). There are exactly $L(L-2\xi+1)/2$ error configurations of two error
events where $\xi=L/4$ such that there are are exactly $L/2$ bit flips along a
given row. Each of these error configurations will cause the standard decoder
to fail with probability $1/2$ independent of the size of the system. However,
of these non-overlapping configurations, there are only $6\xi=3L/2$ error
configurations where the targeted decoder will fail with probability $1/2$,
other non-overlapping error configurations of weight $L/2$ will be decoded
successfully by the targeted decoder.

Having shown that there are $\mathcal{O}(L^{2})$ low-weight error
configurations that will cause the standard decoder to fail for the ballistic
noise model, compared with only $\mathcal{O}(L)$ low weight configurations
that will cause the targeted decoder to fail, we can expect to be able to
identify the ballistic noise model by comparing logical error rates of the
noise source with respect to the two different decoding algorithms of the
family by taking system of suitably large size. In general, we show in
Appendix A that $R$, the ratio of the failure probability of the targeted
decoder and the failure probability of the standard decoder in the path
counting regime calculated with respect to the ballistic noise model, vanishes
exponentially with $L$ for constant $\xi\geq 3$. Specifically, we find

$R\leq\frac{\xi+1}{2}\left(\frac{2}{\xi}\right)^{L/2\xi}.$ (8)

To this end we can expect to easily identify the ballistic noise model in the
path counting regime by comparing the logical error rates of the two decoders
of the family.

###  3.2 Diffusive noise

We now consider a diffusive error model where each error event introduces a
continuous random walk of bit-flip errors that extends across a number of
nearby qubits such that two defects appear at its end points. We use this
error model to numerically demonstrate our diagnostic method.

We index error events $e_{f}$ with the faces of the lattice $f$. Event $e_{f}$
will occur with probability $p_{f}=p$ where $p$ is uniform for all faces.
Given event $e_{f}$ occurs, a random walk is generated for a fixed number of
steps, $\xi\ll L$, between adjacent faces of the lattice. At a given step the
walk direction is chosen uniformly from the four adjacent faces. Each edge,
indexed $j$, that is crossed during the walk an integer $w$ times will suffer
error $X_{j}^{w}$. An error event of this kind generates a single error chain,
that is, where only two syndrome defects are created at the initial and final
face of the walk.

Finally, we point out that while we observe the behaviour in the case of odd
and even values of $\xi$ to be qualitatively similar, we do not compare odd
and even values of $\xi$ directly, as we observe there to be a slight
discrepancy in their performance. We clearly see this effect in Fig. 5. We
speculate that this is due the fact that, unlike the odd case, for even $\xi$
there is a non-zero probability that error events are members of the
stabilizer group, and therefore act trivially on the code space.

###  3.3 Evaluating $\xi$ for the diffusive noise model using the single-
weight adaptive decoder

Figure 5:  Threshold error rates as a function of the decoder parameter
$\lambda$ under a diffusive noise model that is characterised by parameter
$\xi$. (a) Solid lines show the results for $\xi=3,5,7$ and $9$. Dashed line
indicates the threshold error rate for the noise model where $\xi=1$. Each
value of $\xi$ shows a unique behavior. Each threshold value is obtained by
repeated simulation of the noisy lattice and decoding process to identify a
crossing point. Two threshold examples for a correlation parameter of $\xi=3$
are shown in (b), corresponding to the points labelled (i) and (ii) in (a).
Each point in these plots represents the aggregated result of at least 20,000
individual simulations.

Here we demonstrate numerically that using adaptive decoding the unknown
parameter $\xi$ of the diffusive noise model can be identified. We use an
adaptive decoder based on the MWPM decoding algorithm that we refer to as the
single-weight adaptive decoder. The weighting function for this decoder
assigns low weights to edges of the matching graph with length $\lambda$, and
to all other edges assigns high weights that scale with the separation of
pairs of stabilizer defects. Specifically, it assigns edge weights with the
function

$W_{\lambda}(d)=\left\\{\begin{array}[]{ll}d&d=\lambda,\\\
d\Delta&\text{otherwise},\end{array}\right.$ (9)

where $d$ is the Manhattan distance between two defects, with $\Delta\gg L$.
The weighting function for the single-weight adaptive decoder is shown in the
inset of Fig. 5(a). We will see that the logical failure rate of the single-
weight decoder depends on the choice of $\lambda$ relative to $\xi$.

We numerically simulate this scenario for integer values of $\lambda$ between
1 and 10 and values of $\xi=1,3,5,7,9$. To obtain the threshold error rate we
plot the logical error rate $P_{\text{fail}}$ as a function of $p$ for at
least three large system sizes. To minimise the effects of simulating finite
size systems we study systems where $L\gg\sqrt{\xi}$ given that we expect
random walks to typically achieve walks of length $\sim\sqrt{\xi}$. The value
of $p$ for which $P_{\text{fail}}$ coincides for all $L$ determines
$p_{\text{th}}$. We find the crossing point by fitting the data to the
function $P_{\text{fail}}=A_{0}+A_{1}x+A_{2}x^{2}$ where
$x=(p-p_{\text{th}})L^{1/\mu}$ and $A_{j}$, $p_{\text{th}}$ and $\mu$ are
constants to be evaluated. We show an example threshold plot for $\xi=3$ using
the single-weight adaptive decoder with $\lambda=2,\,3$ in Fig. 5(b).

We remark on the clear trend in Fig. 5(a) where the threshold presented as a
function of $p$ tend to decay quickly with $\xi$. This decay is partly due to
the fact that the weight of the error increases with $\xi$ even while $p$
remains constant. A comparison of the effective single qubit error rates are
shown In fact, given good knowledge of the value of $\xi$ the threshold
remains relatively high even in the presence of the spatial correlations. We
discuss this further in Sec. 4.

Figure 6:  Estimating $\xi$ values using signature plots in Fig. 5(a). (a)
Estimates of $\lambda^{*}$ are shown. The orange points show the discrete
values of $\lambda$ for which the adaptive decoder has the greatest threshold
error rate. A continuous estimation is made by fitting a parabola to the data
points of the signature plot with odd $\lambda$ close to the peak $\lambda$
value (red data points). This fitting is shown in (b). We observe that
$\lambda^{*}$ grows with $\xi$ with the trend $\lambda^{*}\sim
1.3\cdot\xi^{0.39}$. We show the fitting with the dotted blue line in (a).

Having calculated the threshold for each error model using a range of decoders
from the family, we go on to estimate the value of $\xi$ by plotting
$p_{\text{th}}$ as a function of $\lambda$ for each noise model, as shown in
Fig. 5(a). We observe that each value of $\xi$ generates a distinct plot as
$\lambda$ is varied. We can therefore regard this as a signature of a given
noise model, as such, we refer to this plot as a signature plot. We now
investigate how we can use the signature plot to estimate the unknown
parameter of the noise model, $\xi$ and determine other features of the noise
model.

Studying Fig. 5(a) we first remark on the discrepancy between the data
obtained for even and odd values of $\lambda$. We have considered only odd
length error chains, which means single error events will never introduce
defects separated by an even distance. As such, a decoder with even $\lambda$
will predominantly be correcting for second order error events, which we would
expect to have a poor performance. This effect is indeed observed in the data.
When the value of $\lambda$ is odd, even when it does not match $\xi$ the
decoder is preferentially correcting for first-order error events. It is
interesting to see that this feature of the noise model, namely that the noise
model only introduces error strings of odd length, can be readily identified
from the signature plot.

In Fig. 6 we plot estimates for the value of $\lambda$ for which the threshold
error rate is maximal. We denote this value $\lambda^{*}$. We determine
$\lambda^{*}$ using two rudimentary methods. First of all we estimate
$\lambda^{*}$ as the discrete value of $\lambda$ for which the threshold is
maximal. We show these discrete data points in orange in the Figure. Notably,
for the relatively small values of $\xi$ we study, we observe that
$\lambda^{*}$ increases with $\xi$ in one discrete step. This observation
indicates that $\lambda^{*}$ is sensitive to changes in the value of $\xi$.

Ideally, we would like to determine $\xi$ precisely using the signature plot.
However, using the method for estimating $\lambda^{*}$ we have suggested so
far, it is difficult to resolve $\xi$ from $\lambda^{*}$ as there are error
models with different values of $\xi$ that return the same value
$\lambda^{*}$. To deal with this we refine the estimate of $\lambda^{*}$ by
using more data points from the signature plot. In the Fig. 6(b) we fit a
quadratic curve to the odd $\lambda$ data points close to $\lambda^{*}$, which
are shown in Fig. 5. The maximal values of the quadratic fittings are shown in
Fig. 6(a) with red data points. We observe that the maximal values increase
like $\lambda^{*}\sim 1.3\cdot\xi^{0.39}$ which is plotted in blue against the
acquired data points. We might expect a relationship
$\lambda^{*}\sim\sqrt{\xi}$ that represents the average distance covered by an
error event that performs a uniform random walk. We speculate that this
discrepancy in the fitting is due to microscopic details and small size
effects. Nonetheless, our numerical results show that the value of
$\lambda^{*}$, which is found using the signature plot, estimates the unknown
parameter $\xi$ precisely.

###  3.4 Estimating $\xi$ using the Gaussian decoder

Figure 7:  (a) Logical error rates as a function of the decoder parameter
$\lambda$ are shown for values of $\xi=$3,11,31 and 41 under a diffusive noise
model. The inset shows a schematic of the decoder weighting function. For each
value of $\xi$ we see a peak in the logical error rate at approximately
$\lambda\sim\sqrt{\xi}$. (b) Estimation of the optimal decoder parameter
$\lambda^{*}$. We identify the discrete value of $\lambda$ for which the
logical error rate is maximal (orange data points), and make a continuous
estimation by fitting a quadratic function around the peak (red data points).
We observe that $\lambda^{*}\sim\sqrt{\xi}$ as we expect from a diffusive
noise model where each error event will typically introduce a pair of
stabilizer defects that are separated by distance $\sqrt{\xi}$.

One might argue that the adaptive decoder we used in the previous section uses
too much knowledge of the error model to be applicable in any real system,
since we use the fact that the random walk is of a fixed length. In this
section we show that a similar result is achieved with a more ‘general
purpose’ adaptive decoder, which could apply to many more possible noise
models. We call this the Gaussian decoder, as it assigns weights to the edges
of the matching graph according to a Gaussian function based on the separation
of two defects

$W_{\lambda}(d)=d\left(10^{4}-9999\,e^{-\frac{(d-\mu)^{2}}{2\sigma^{2}}}\right)$
(10)

where $d$ is the separation of the two defects measured via the Manhattan
distance on the lattice, $\mu=\lambda$ and $\sigma=\lambda/2$. A schematic of
the weighting function of the Gaussian adaptive decoder is shown in the inset
of Fig. 7. The decoder is designed to assign bias to identify common error
events that cause defects that are separated by a distance that is on average
$d\sim\lambda$ which we expect from the diffusive noise model. Errors that are
not consistent with a diffusive random walk are assigned probabilities that
are proportional to their separation as we would using the standard decoder.

In the previous section we produced signature plots by computing the threshold
error rate for each decoder parameter $\lambda$, and then using the result to
estimate the correlation length $\xi$. In practice it will be simpler to use
logical failure rates directly, rather than thresholds, as they can be
computed for a single code of fixed size, and a single value of physical error
rate. As such, for this case, we use logical error rates instead of threshold
error rates to find a signature plot.

At the top of Fig. 7(a) we generate a signature plot using the logical failure
rate of the adaptive decoder as a function of $\lambda$ for different odd
values of $\xi$ ranging from $\xi=3$ to $\xi=51$, for a lattice size of
$L=100$ such that $\sqrt{\xi}\ll L$. Only the odd values of $\lambda$ are
shown. We see that, as in the previous Subsection, the peak logical success
rate varies with $\xi$. In Fig. 7(b) we aim to estimate $\xi$ using the
signature plot. Two different estimates of $\lambda^{*}$ are shown, a discrete
estimation by choosing the value of $\lambda$ for which the logical success
rate is the greatest, and an estimate based on a quadratic fit around the peak
values. We observe a trend $\lambda^{*}\sim\sqrt{\xi}$ as we might expect from
the diffusive noise model.

We finally remark that we chose a fixed relationship between $\mu$ and
$\sigma$ in our weighting function, but more generally the functional form can
be parametrized by more variables to explore a wider space of functions. This
may be an interesting route for further work. Using our choice of adaptive
decoder the results we have presented show that the logical failure rate of
the decoder is sensitive to our choice of $\lambda$, and that we can use this
information to improve the failure rates of our decoding scheme.

##  4 Improved decoding schemes

In the previous subsection we demonstrated that we can establish features of
noise models by use of an adaptive decoder, and we showed this explicitly for
the case of the diffusive noise model. Being able to gain a knowledge of the
noise acting on underlying hardware is a valuable tool for improving the
performance of quantum error-correcting codes. Particularly in the regime
where the system is too large to allow for tomography. Information about the
error processes involved may make it easier to identify the source of the
noise, and it may be possible to improve the decoding algorithm to account for
these known errors in classical post-processing. In this Section we show that
we can use signature plot data to improve decoding algorithms to increase both
threshold error rates and logical success rates.

We will focus on the data obtained in Subsec. 3.3 to design better decoding
algorithms. Our aim is to use signature plots to design a decoder that
performs better than the best decoder we had already identified by sweeping
the parameter $\lambda$. We propose a specialised decoder, that identifies the
two highest peaks on the signature plot, and uses a weighting function that
assigns very low weight two both of these values of $\lambda$, and high values
elsewhere, otherwise the function assigns a large weight that scales with the
separation of the defects.

We compare the specialised decoder with both the standard decoder, and the
fixed-weight decoder which has been calibrated with $\lambda=\lambda^{*}$
where we use the discrete value of $\lambda^{*}$ found in the previous
section, i.e. the orange points shown in Fig. 6(a). Fig. 8 compares the
thresholds of the different decoders. We find that the specialised decoder
outperforms the other decoders for sufficiently high $\xi$. The calibrated
fixed-weight decoder also outperforms the standard decoder for larger values
of $\xi$, but does not perform as well as the specialised decoder.
Importantly, our results show that updating the weighting function using
information from the signature plot improves the logical failure rates of the
surface code.

Figure 8: The threshold under diffusive noise for varying values of $\xi$ for
the standard decoder, the fixed weight decoder with $\lambda=\lambda^{*}$ and
a specialised decoder where we assign a very low weight to more than one value
of the $\lambda$. The threshold is shown as a function of the correlation
parameter $\xi$, for the three approaches to decoding. We see that for
$\xi>3$, with an appropriate choice of a non-monotonic weighting function we
obtain improved threshold error rates, thus indicating that we can design
better decoders using the data available in the signature plot. The thresholds
in the effective single qubit error rate are shown in the solid lines. The
dashed blue line gives a comparison to the event error rate.

We remark that the specialised decoder we have suggested here is by no means
optimal, we have only demonstrated that even using a very simple method for
using information from the signature plot the decoder can be improved. We
expect that more sophisticated techniques will allow further improvements in
the threshold, but we leave a thorough exploration of the decoder performance
that can be achieved using signature plots to future work.

It is common to think about noise only as a rate of Pauli errors on single
qubits, and it is useful to consider how the correlations in the noise affect
this effective single qubit error threshold. Fig. 8 shows the thresholds in
the single qubit error rate, which is defined as the probability with which
any individual qubit has suffered a Pauli error at the end of the round of
noise application. The effective single qubit error thresholds for the
standard decoder (solid blue line) can be compared with the error event
thresholds (dashed blue line). The latter decreases rapidly, since a smaller
number of events introduces more single qubit Pauli errors. However, we see
that even with the standard decoder, the effective error threshold decreases
only gradually as correlations increase. We also plot the effective error
threshold using the fixed weight decoder, and specialised decoder, as
described in the previous sections. Here, we see a more gradual decline in the
threshold.

It is often believed that any correlations in the noise model are highly
destructive, and should be avoided. While this may sometimes be the case, for
example with very long range correlations in which a single error event spans
the code, the effect on the threshold depends strongly on the exact structure
of the correlations. These results show that for a diffusive noise model
resulting in spatial correlations much smaller than the code distance, the
threshold is not strongly affected, and using a targeted decoding strategy the
loss of logical error rate can be reduced.

##  5 Practical considerations

It is worth noting the practicality of the scheme we have discussed for
analysis of a real experimental setup. Given that some hardware has been
developed to implement an error correcting code, we can perform the following
operations: prepare the code in a known logical state, perform stabilizer
measurements, and measure out the logical qubit with the intention of
implementing the identity gate. We can repeat this process many times to build
up a large data set of measurement outcomes. A decoder can analyse the
measurement outcomes to determine if a logical error occurred. We can then
perform the analysis we have described in classical post-processing on this
data set, using a large suite of decoders targeted at errors over a large
space of possible noise models. The fact that this analysis is a classical and
offline makes it a very low cost way of studying the performance of a logical
qubit. Furthermore, since no direct interaction is needed with the physical
device, there need be no requirement that the decoder is fast, in the sense
that it can keep up with the operating speed of the physical qubits. Given
that we would expect to apply our method offline, we remark that this may be a
practical use case for slow decoders with high thresholds, or other useful
properties, even if such decoders are impractical for online decoding.

The results of such an analysis, giving some characterization of the noise
model, could then be used in multiple ways to improve a device. For example,
adjustments at the hardware level may be possible to minimize sources of
noise, and as we have shown, we can also improve the classical processing
accompanying the error correcting code to account for the known structure of
the noise.

##  6 Conclusions

To summarise, we have developed diagnostic tools to analyse an unknown
parameter of a correlated error model acting on the toric code. Our method
generalises the MWPM algorithm to define a parametrised family of decoders. We
go on to compare the logical error rates of the family of decoders to
hypothesise the types of correlated errors a code suffers. We have shown that
a code can tolerate a higher error rate if we calibrate a decoder under the
error events that commonly occur, and furthermore that an increased threshold
can be found for certain spatially correlated noise models. We also discussed
how our scheme could be implemented in a practical setting.

In this work we have studied only a simple noise model, but we expect that
other correlated error models where string-like errors are drawn from some
distribution, such as thermal noise, will display a similar behaviour. Beyond
spatial correlations, the methods we have proposed can be more broadly applied
to other experimentally relevant models of correlated noise, as long as an
appropriate family of decoders could be found to characterize the error. For
example, errors correlated between X and Z bases, higher probabilities of
error in certain physical locations, and temporal error correlations, perhaps
due to malfunctions in measurement apparatus [68, 69, 70, 71], are all sources
of concern. Many known decoders exist which could potentially be adapted to
handle these types of correlations [55, 56, 72, 73, 74, 75, 76, 63]. As a
first step, it will be interesting to extend the ideas we have presented here
to identify multiple unknown parameters of an error model to enable us to use
decoding algorithms to identify features of more realistic noise models.

Beyond the toric code, similar techniques to those we have demonstrated could
potentially be used to probe string-like correlated errors in other error-
correction procedures that use adaptations of the MWPM algorithm [77, 78, 79].
This readily extends to decoders for the toric code in the setting where
measurements are not ideal [80]. Moreover, it will be interesting to study
local correlated error events that introduce many stabilizer defects. We
expect the Metropolis-based decoders presented in Refs. [56, 72], neural
network decoders [81], tensor-network approximants of maximum likelihood
decoders [66, 76] or perhaps minimum-weight matching decoders that are
supplemented by belief propagation [57, 58, 59] may be suitable for this
purpose, but we leave this for future work.

As hardware rapidly progresses towards the first implementations of small
error correcting codes, it is important to consider practical methods for
analysing and optimising the performance of these systems. The methods we have
proposed here offer a simple way of studying and correcting for correlated
errors with offline classical post processing. With further development, we
hope these methods will prove a useful tool for evaluating the performance of
the first generation of fault-tolerant quantum processors.

## Acknowledgements

The authors thank S. Benjamin, H. Bombín, D. Browne, J. Combes, M. Kastoryano,
D. Poulin and J. Wootton for helpful and encouraging discussions. We are also
grateful to C. Chubb comments on an earlier draft of the manuscript. We
acknoweldge the use of the Imperial College Research Computing Service, DOI:
10.14469/hpc/2232. NHN is supported by the Engineering and Physical Sciences
Research Council. BJB is supported by the Villum Foundation, the University of
Sydney Fellowship Programme and the Australian Research Council via the Centre
of Excellence in Engineered Quantum Systems(EQUS) project number CE170100009.

##  Appendix A Logical Error Rates for the ballistic error model in the path-
counting regime

Here we show that a targeted decoder will have better logical error rates in
the path-counting regime for the ballistic noise model for $\xi\geq 3$. For
simplicity we assume only lattice sizes $L=k\xi$ for even integers $k$.

In the path-counting regime the errors that will most frequently cause the
decoder to fail are where $k/2=L/2\xi$ errors align along the same row or
column of the lattice in a suitable configuration. The standard decoder will
fail with probability independent of the size of the system if all of these
$k/2$ error events occur in a configuration where no errors overlap. However,
as discussed in the main text, we can design a targeted decoder that makes use
of value $\xi$ to improve logical failure rates.

There are $N_{\text{st.}}$ configurations of $k/2$ non-overlapping error
events that will cause the standard decoder to fail where

$N_{\text{st.}}=\frac{2\xi}{\xi+1}\frac{(k(\xi+1)/2)!}{(k/2)!(k\xi/2)!}.$ (11)

In the case of the targeted decoder however there are only $N_{\text{sp.}}$
error configurations that will cause logical failure with high probability.
This is because the targeted decoder is designed such that in the path-
counting regime the decoder will fail if and only if all stabilizer defects of
a given error configuration are separated from each other by distances that
are all factors of $\xi$. There are only

$N_{\text{sp.}}=\frac{\xi k!}{(k/2)!(k/2)!},$ (12)

of such configurations. We can use the expressions given in Eqn. (11) and Eqn.
(12) to bound the ratio

$R=\frac{N_{\text{sp.}}}{N_{\text{st.}}}\leq\frac{\xi+1}{2}\left(\frac{2}{\xi}\right)^{L/2\xi},$
(13)

which is proportional to the ratio of the decoder failure probabilities for
the targeted decoder and the standard decoder for the ballistic noise model.
Clearly, for small $\xi\geq 3$ the logical failure probability for the
targeted decoder is exponentially smaller than the logical failure probability
of the standard decoder when dealing with ballistic noise.

The remainder of this Appendix will prove Eqn (11). We consider two families
of functions, the first, $N_{l}(t)$, denotes the number of configurations that
$t$ error events of fixed length $\xi$ can be aligned on a ring of $l$ sites
such that none of the $t$ error events overlap. The second, $M_{l}(t)$, is the
number of configurations that $t$ error events of size $\xi$ can be arranged
along a line of $l$ sites with open boundary conditions such that none of the
error events overlap.

We have that

$N_{\text{st.}}=N_{l=L}(k/2),\quad N_{l}(0)=1.$ (14)

We show Eqn. (11) recursively by finding a relationship between $N_{l}(t)$ and
$N_{l}(t-1)$. To do so, we derive some facts relating the function $N_{l}(t)$
to $M_{l}(t)$. Specifically, we have that

$N_{l}(t)=\frac{l}{t}M_{l-\xi}(t-1).$ (15)

We find $N_{l}(t)$ of Eqn. (15) by first considering a single error event of
size $\xi$ that can be placed on any of the $l$ possible positions along a
one-dimensional lattice with periodic boundary conditions. The remaining $t-1$
non-overlapping error events can be placed on the vacant $l-\xi$ lattice sites
that are not occupied by the first error event. We thus count
$lM_{l-\xi}(t-1)$ different non-overlapping configurations. With this
expression, each error configuration counted by $N_{l}(t)$ is counted $t$
times. The right-hand side of the expression thus includes an additional
factor of $1/t$ to account for the degeneracy. We also require the
relationship

$M_{l}(t)=N_{l}(t)-(\xi-1)M_{l-\xi}(t-1).$ (16)

This expression is found by realising that the number of configurations
included in $N_{l}(t)$ that are not included in $M_{l}(t)$ are those where a
single error event crosses one particular fixed point of the ring of $l$
sites. There are $\xi-1$ positions that one error event may lie to cross this
particular fixed point, and the remaining $t-1$ non-overlapping error events
may lie in any of $M_{l-\xi}(t-1)$ configurations. We substitute Eqn. (16)
into Eqn. (15) to find

$M_{l}(t)=\left(1-\frac{t(\xi-1)}{l}\right)N_{l}(t).$ (17)

We finally combine Eqn. (15) and Eqn. (17) to obtain

$N_{l}(t)=\frac{l}{t}\left(1-\frac{(t-1)(\xi-1)}{l-\xi}\right)N_{l-\xi}(t-1).$
(18)

We recursively apply Eqn. (18) to Eqn. (14) to obtain the result of Eqn. (11).

## References

  * Chiaverini et al. [2004] J. Chiaverini, D. Leibfried, T. Schaetz, M. D. Barrett, R. B. Blakestad, J. Britton, W. M. Itano, J. D. Jost, E. Knill, C. Langer, R. Ozeri, and D. J. Wineland.  Realization of quantum error correction.  _Nature_ , 432:602 EP –, 12 2004.  URL http://dx.doi.org/10.1038/nature03074.
  * Reed et al. [2012] M. D. Reed, L. DiCarlo, S. E. Nigg, L. Sun, L. Frunzio, S. M. Girvin, and R. J. Schoelkopf.  Realization of three-qubit quantum error correction with superconducting circuits.  _Nature_ , 482:382 EP –, 02 2012.  URL http://dx.doi.org/10.1038/nature10786.
  * Barends et al. [2014] R. Barends, J. Kelly, A. Megrant, A. Veitia, D. Sank, E. Jeffrey, T. C. White, J. Mutus, A. G. Fowler, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, A. Dunsworth, C. Neill, P. O’Malley, P. Roushan, A. Vainsencher, J. Wenner, A. N. Korotkov, A. N. Cleland, and John M. Martinis.  Superconducting quantum circuits at the surface code threshold for fault tolerance.  _Nature_ , 508:500 EP –, 04 2014.  URL http://dx.doi.org/10.1038/nature13171.
  * Nigg et al. [2014] D. Nigg, M. Müller, E. A. Martinez, P. Schindler, M. Hennrich, T. Monz, M. A. Martin-Delgado, and R. Blatt.  Quantum computations on a topologically encoded qubit.  _Science_ , 345(6194):302–305, 2014.  doi: 10.1126/science.1253742.  URL http://science.sciencemag.org/content/345/6194/302.
  * Córcoles et al. [2015] A. D. Córcoles, Easwar Magesan, Srikanth J. Srinivasan, Andrew W. Cross, M. Steffen, Jay M. Gambetta, and Jerry M. Chow.  Demonstration of a quantum error detection code using a square lattice of four superconducting qubits.  _Nature Communications_ , 6:6979 EP –, 04 2015.  URL http://dx.doi.org/10.1038/ncomms7979.
  * Kelly et al. [2015] J. Kelly, R. Barends, A. G. Fowler, A. Megrant, E. Jeffrey, T. C. White, D. Sank, J. Y. Mutus, B. Campbell, Yu Chen, Z. Chen, B. Chiaro, A. Dunsworth, I. C. Hoi, C. Neill, P. J. J. O’Malley, C. Quintana, P. Roushan, A. Vainsencher, J. Wenner, A. N. Cleland, and John M. Martinis.  State preservation by repetitive error detection in a superconducting quantum circuit.  _Nature_ , 519:66 EP –, 03 2015.  URL http://dx.doi.org/10.1038/nature14270.
  * Takita et al. [2016] Maika Takita, A. D. Córcoles, Easwar Magesan, Baleegh Abdo, Markus Brink, Andrew Cross, Jerry M. Chow, and Jay M. Gambetta.  Demonstration of weight-four parity measurements in the surface code architecture.  _Physical Review Letters_ , 117(21):210505–, 11 2016.  doi: 10.1103/PhysRevLett.117.210505.  URL https://link.aps.org/doi/10.1103/PhysRevLett.117.210505.
  * Shor [1995] Peter W. Shor.  Scheme for reducing decoherence in quantum computer memory.  _Physical Review A_ , 52(4):R2493–R2496, 10 1995\.  doi: 10.1103/PhysRevA.52.R2493.  URL https://link.aps.org/doi/10.1103/PhysRevA.52.R2493.
  * Steane [1996] A. M. Steane.  Error correcting codes in quantum theory.  _Physical Review Letters_ , 77(5):793–797, 07 1996.  doi: 10.1103/PhysRevLett.77.793.  URL https://link.aps.org/doi/10.1103/PhysRevLett.77.793.
  * Kitaev [2003] A. Yu. Kitaev.  Fault-tolerant quantum computation by anyons.  _Annals of Physics_ , 303:2, 2003.  doi: 10.1016/S0003-4916(02)00018-0.  URL https://doi.org/10.1016/S0003-4916(02)00018-0.
  * Dennis et al. [2002] Eric Dennis, Alexei Kitaev, Andrew Landahl, and John Preskill.  Topological quantum memory.  _Journal of Mathematical Physics_ , 43(9):4452–4505, 2018/10/10 2002.  doi: 10.1063/1.1499754.  URL https://doi.org/10.1063/1.1499754.
  * Terhal [2015] Barbara M. Terhal.  Quantum error correction for quantum memories.  _Reviews of Modern Physics_ , 87(2):307–346, 04 2015.  doi: 10.1103/RevModPhys.87.307.  URL https://link.aps.org/doi/10.1103/RevModPhys.87.307.
  * Brown et al. [2016a] Benjamin J. Brown, Daniel Loss, Jiannis K. Pachos, Chris N. Self, and James R. Wootton.  Quantum memories at finite temperature.  _Reviews of Modern Physics_ , 88(4):045005–, 11 2016a.  doi: 10.1103/RevModPhys.88.045005.  URL https://link.aps.org/doi/10.1103/RevModPhys.88.045005.
  * Campbell et al. [2017] Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot.  Roads towards fault-tolerant universal quantum computation.  _Nature_ , 549:172 EP –, 09 2017.  URL http://dx.doi.org/10.1038/nature23460.
  * DiVincenzo [2009] David P. DiVincenzo.  Fault-tolerant architectures for superconducting qubits.  _Phys. Scr._ , T137:014020, 2009.  URL https://doi.org/10.1088/0031-8949/2009/T137/014020.
  * Wosnitzka et al. [2016] Martin Wosnitzka, Fabio L. Pedrocchi, and David P. DiVincenzo.  Methodology for bus layout for topological quantum error correcting codes.  _EPJ Quantum Technology_ , 3(1):4, 2016.  doi: 10.1140/epjqt/s40507-016-0042-8.  URL https://doi.org/10.1140/epjqt/s40507-016-0042-8.
  * Bravyi and Vargo [2013] Sergey Bravyi and Alexander Vargo.  Simulation of rare events in quantum error correction.  _Physical Review A_ , 88(6):062308–, 12 2013\.  doi: 10.1103/PhysRevA.88.062308.  URL https://link.aps.org/doi/10.1103/PhysRevA.88.062308.
  * Watson and Barrett [2014] Fern H. E. Watson and Sean D. Barrett.  Logical error rate scaling of the toric code.  _New J. Phys._ , 16:093045, 2014.  URL https://doi.org/10.1088/1367-2630/16/9/093045.
  * Brown et al. [2016b] Benjamin J. Brown, Naomi H. Nickerson, and Dan E. Browne.  Fault-tolerant error correction with the gauge color code.  _Nature Communications_ , 7:12302 EP –, 07 2016b.  URL http://dx.doi.org/10.1038/ncomms12302.
  * Landahl et al. [2011] Andrew J. Landahl, Jonas T. Anderson, and Patrick R. Rice.  Fault-tolerant quantum computing with color codes.  _arXiv:1108.5738_ , 2011.  URL https://arxiv.org/abs/1108.5738.
  * Katzgraber and Andrist [2013] H. G. Katzgraber and R. S. Andrist.  Stability of topologically-protected quantum computing proposals as seen through spin glasses.  _J. Phys.: Conf. Ser._ , 473:012019, 2013.  URL https://doi.org/10.1088/1742-6596/473/1/012019.
  * Darmawan and Poulin [2017] Andrew S. Darmawan and David Poulin.  Tensor-network simulations of the surface code under realistic noise.  _Physical Review Letters_ , 119(4):040502–, 07 2017.  doi: 10.1103/PhysRevLett.119.040502.  URL https://link.aps.org/doi/10.1103/PhysRevLett.119.040502.
  * Bravyi et al. [2018] Sergey Bravyi, Matthias Englbrecht, Robert König, and Nolan Peard.  Correcting coherent errors with surface codes.  _npj Quantum Information_ , 4:55, 2018.  doi: 10.1038/s41534-018-0106-y.  URL https://doi.org/10.1038/s41534-018-0106-y.
  * Iyer and Poulin [2017] Pavithran S. Iyer and David Poulin.  A small quantum computer is needed to optimize fault-tolerant protocols.  _arXiv:1711.04736_ , 2017.  URL https://arxiv.org/abs/1711.04736.
  * Aharonov et al. [2006] Dorit Aharonov, Alexei Kitaev, and John Preskill.  Fault-tolerant quantum computation with long-range correlated noise.  _Physical Review Letters_ , 96(5):050504–, 02 2006.  doi: 10.1103/PhysRevLett.96.050504.  URL https://link.aps.org/doi/10.1103/PhysRevLett.96.050504.
  * Ng and Preskill [2009] Hui Khoon Ng and John Preskill.  Fault-tolerant quantum computation versus gaussian noise.  _Physical Review A_ , 79(3):032318–, 03 2009\.  doi: 10.1103/PhysRevA.79.032318.  URL https://link.aps.org/doi/10.1103/PhysRevA.79.032318.
  * Preskill [2013] John Preskill.  Sufficient condition on noise correlations for scalable quantum computing.  _Quant. Inf. Comp._ , 13:181, 2013.  URL https://doi.org/10.26421/QIC13.3-4.
  * Jouzdani et al. [2014] Pejman Jouzdani, E. Novais, I. S. Tupitsyn, and Eduardo R. Mucciolo.  Fidelity threshold of the surface code beyond single-qubit error models.  _Physical Review A_ , 90(4):042315–, 10 2014\.  doi: 10.1103/PhysRevA.90.042315.  URL https://link.aps.org/doi/10.1103/PhysRevA.90.042315.
  * Hutter and Loss [2014] Adrian Hutter and Daniel Loss.  Breakdown of surface-code error correction due to coupling to a bosonic bath.  _Physical Review A_ , 89(4):042334–, 04 2014\.  doi: 10.1103/PhysRevA.89.042334.  URL https://link.aps.org/doi/10.1103/PhysRevA.89.042334.
  * Fowler and Martinis [2014] Austin G. Fowler and John M. Martinis.  Quantifying the effects of local many-qubit errors and nonlocal two-qubit errors on the surface code.  _Physical Review A_ , 89(3):032316–, 03 2014\.  doi: 10.1103/PhysRevA.89.032316.  URL https://link.aps.org/doi/10.1103/PhysRevA.89.032316.
  * Novais et al. [2017] E. Novais, A. J. Stanforth, and Eduardo R. Mucciolo.  Surface code fidelity at finite temperatures.  _Physical Review A_ , 95(4):042339–, 04 2017\.  doi: 10.1103/PhysRevA.95.042339.  URL https://link.aps.org/doi/10.1103/PhysRevA.95.042339.
  * O’Gorman et al. [2016] Joe O’Gorman, Naomi H Nickerson, Philipp Ross, John JL Morton, and Simon C Benjamin.  A silicon-based surface code quantum computer.  _Npj Quantum Information_ , 2:15019 EP –, 02 2016.  URL https://doi.org/10.1038/npjqi.2015.19.
  * Alicki et al. [2009] R Alicki, M Fannes, and M Horodecki.  On thermalization in kitaev’s 2d model.  _Journal of Physics A: Mathematical and Theoretical_ , 42(6):065303, 2009.  doi: 10.1088/1751-8113/42/6/065303.  URL https://doi.org/10.1088/1751-8113/42/6/065303.
  * Chesi et al. [2010] Stefano Chesi, Beat Röthlisberger, and Daniel Loss.  Self-correcting quantum memory in a thermal environment.  _Physical Review A_ , 82(2):022305–, 08 2010\.  doi: 10.1103/PhysRevA.82.022305.  URL https://link.aps.org/doi/10.1103/PhysRevA.82.022305.
  * Novais and Mucciolo [2013] E. Novais and Eduardo R. Mucciolo.  Surface code threshold in the presence of correlated errors.  _Physical Review Letters_ , 110(1):010502–, 01 2013.  doi: 10.1103/PhysRevLett.110.010502.  URL https://link.aps.org/doi/10.1103/PhysRevLett.110.010502.
  * Jouzdani et al. [2013] P. Jouzdani, E. Novais, and E. R. Mucciolo.  Fidelity of the surface code in the presence of a bosonic bath.  _Physical Review A_ , 88(1):012336–, 07 2013\.  doi: 10.1103/PhysRevA.88.012336.  URL https://link.aps.org/doi/10.1103/PhysRevA.88.012336.
  * Freeman et al. [2014] C. Daniel Freeman, C. M. Herdman, D. J. Gorman, and K. B. Whaley.  Relaxation dynamics of the toric code in contact with a thermal reservoir: Finite-size scaling in a low-temperature regime.  _Physical Review B_ , 90(13):134302–, 10 2014\.  doi: 10.1103/PhysRevB.90.134302.  URL https://link.aps.org/doi/10.1103/PhysRevB.90.134302.
  * López-Delgado et al. [2017] D. A. López-Delgado, E. Novais, E. R. Mucciolo, and A. O. Caldeira.  Long-time efficacy of the surface code in the presence of a super-ohmic environment.  _Physical Review A_ , 95(6):062328–, 06 2017\.  doi: 10.1103/PhysRevA.95.062328.  URL https://link.aps.org/doi/10.1103/PhysRevA.95.062328.
  * McCutcheon et al. [2014] Dara P. S. McCutcheon, Netanel H. Lindner, and Terry Rudolph.  Error distributions on large entangled states with non-markovian dynamics.  _Physical Review Letters_ , 113(26):260503–, 12 2014.  doi: 10.1103/PhysRevLett.113.260503.  URL https://link.aps.org/doi/10.1103/PhysRevLett.113.260503.
  * Raussendorf et al. [2006] R. Raussendorf, J. Harrington, and K. Goyal.  A fault-tolerant one-way quantum computer.  _Annals of Physics_ , 321(9):2242–2270, 2006\.  doi: 10.1016/j.aop.2006.01.012.  URL https://doi.org/10.1016/j.aop.2006.01.012.
  * Fowler et al. [2009] Austin G. Fowler, Ashley M. Stephens, and Peter Groszkowski.  High-threshold universal quantum computation on the surface code.  _Physical Review A_ , 80(5):052312–, 11 2009\.  doi: 10.1103/PhysRevA.80.052312.  URL https://link.aps.org/doi/10.1103/PhysRevA.80.052312.
  * Fowler et al. [2012] Austin G. Fowler, Adam C. Whiteside, Angus L. McInnes, and Alimohammad Rabbani.  Topological code autotune.  _Physical Review X_ , 2(4):041003–, 10 2012.  doi: 10.1103/PhysRevX.2.041003.  URL https://link.aps.org/doi/10.1103/PhysRevX.2.041003.
  * Nickerson et al. [2013] Naomi H. Nickerson, Ying Li, and Simon C. Benjamin.  Topological quantum computing with a very noisy network and local error rates approaching one percent.  _Nature Communications_ , 4:1756 EP –, 04 2013.  URL https://doi.org/10.1038/ncomms2773.
  * Tomita and Svore [2014] Yu Tomita and Krysta M. Svore.  Low-distance surface codes under realistic quantum noise.  _Physical Review A_ , 90(6):062320–, 12 2014\.  doi: 10.1103/PhysRevA.90.062320.  URL https://link.aps.org/doi/10.1103/PhysRevA.90.062320.
  * Bravyi and Cross [2015] Sergey Bravyi and Andrew Cross.  Doubled color codes.  _arXiv:1509.03239_ , 2015.  URL https://arxiv.org/abs/1509.03239.
  * Chubb and Flammia [2018] Christopher T. Chubb and Steven T. Flammia.  Statistical mechanical models for quantum codes with correlated noise.  _arXiv:1809.10704_ , 2018.  URL https://arxiv.org/abs/1809.10704.
  * Edmonds [1965] Jack Edmonds.  Paths, trees and flowers.  _Canad. J. Math._ , 17:449, 1965.  URL https://doi.org/10.4153/CJM-1965-045-4.
  * Kolmogorov [2009] Vladimir Kolmogorov.  Blossom v: a new implementation of a minimum cost perfect matching algorithm.  _Mathematical Programming Computation_ , 1(1):43–67, 2009.  doi: 10.1007/s12532-009-0002-8.  URL https://doi.org/10.1007/s12532-009-0002-8.
  * Combes et al. [2014] Joshua Combes, Christopher Ferrie, Chris Cesare, Markus Tiersch, Gerard J. Milburn, Hans J. Briegel, and Carlton M. Caves.  In-situ characterization of quantum devices with error correction.  _arXiv:1405.5656_ , 2014.  URL https://arxiv.org/abs/1405.5656.
  * DiVincenzo and Shor [1996] David P. DiVincenzo and Peter W. Shor.  Fault-tolerant error correction with efficient quantum codes.  _Physical Review Letters_ , 77(15):3260–3263, 10 1996.  doi: 10.1103/PhysRevLett.77.3260.  URL https://link.aps.org/doi/10.1103/PhysRevLett.77.3260.
  * DiVincenzo et al. [1998] David P. DiVincenzo, Peter W. Shor, and John A. Smolin.  Quantum-channel capacity of very noisy channels.  _Physical Review A_ , 57(2):830–839, 02 1998\.  doi: 10.1103/PhysRevA.57.830.  URL https://link.aps.org/doi/10.1103/PhysRevA.57.830.
  * Huo and Li [2017] Ming-Xia Huo and Ying Li.  Learning time-dependent noise to reduce logical errors: real time error rate estimation in quantum error correction.  _New Journal of Physics_ , 19:123032, 2017.  doi: 10.1088/1367-2630/aa916e.  URL https://doi.org/10.1088/1367-2630/aa916e.
  * Kelly et al. [2016] J. Kelly, R. Barends, A. G. Fowler, A. Megrant, E. Jeffrey, T. C. White, D. Sank, J. Y. Mutus, B. Campbell, Yu Chen, Z. Chen, B. Chiaro, A. Dunsworth, E. Lucero, M. Neeley, C. Neill, P. J. J. O’Malley, C. Quintana, P. Roushan, A. Vainsencher, J. Wenner, and John M. Martinis.  Scalable in situ qubit calibration during repetitive error detection.  _Physical Review A_ , 94(3):032321–, 09 2016\.  doi: 10.1103/PhysRevA.94.032321.  URL https://link.aps.org/doi/10.1103/PhysRevA.94.032321.
  * Spitz et al. [2018] S. T. Spitz, B. Tarasinkski, C. W. J. Beenakker, and T. E. O’Brien.  Adaptive weight estimator for quantum error correction in a time-dependent environment.  _Adv. Quant. Tech._ , 1:1800012, 2018.  URL https://doi.org/10.1002/qute.201800012.
  * Duclos-Cianci and Poulin [2010] Guillaume Duclos-Cianci and David Poulin.  Fast decoders for topological quantum codes.  _Physical Review Letters_ , 104(5):050504–, 02 2010.  doi: 10.1103/PhysRevLett.104.050504.  URL https://link.aps.org/doi/10.1103/PhysRevLett.104.050504.
  * Wootton and Loss [2012] James R. Wootton and Daniel Loss.  High threshold error correction for the surface code.  _Physical Review Letters_ , 109(16):160503–, 10 2012.  doi: 10.1103/PhysRevLett.109.160503.  URL https://link.aps.org/doi/10.1103/PhysRevLett.109.160503.
  * Fowler [2013] Austin G. Fowler.  Optimal complexity correction of correlated errors in the surface code.  _arXiv:1310.0863_ , 2013.
  * Delfosse and Tillich [2014] N. Delfosse and J. Tillich.  A decoding algorithm for css codes using the x/z correlations.  In _2014 IEEE International Symposium on Information Theory_ , pages 1071–1075, 2014.  ISBN 2157-8117.  doi: 10.1109/ISIT.2014.6874997.
  * Criger and Ashraf [2017] Ben Criger and Imran Ashraf.  Multi-path summation for deocding2D topological codes.  _Quantum_ , 2:102, 2017.  doi: 10.22331/q-2018-10-19-102.  URL https://doi.org/10.22331/q-2018-10-19-102.
  * Varsamopoulos et al. [2017] Savvas Varsamopoulos, Ben Criger, and Koen Bertels.  Decoding small surface codes with feedforward neural networks.  _Quantum Science and Technology_ , 3(1):015004, 2017.  doi: 10.1088/2058-9565/aa955a.  URL http://dx.doi.org/10.1088/2058-9565/aa955a.
  * Krastanov and Jiang [2017] Stefan Krastanov and Liang Jiang.  Deep neural network probabilistic decoder for stabilizer codes.  _Scientific Reports_ , 7(1):11003, 2017.  doi: 10.1038/s41598-017-11266-1.  URL https://doi.org/10.1038/s41598-017-11266-1.
  * Baireuther et al. [2018] P. Baireuther, T. E. O’Brien, B. Tarasinkski, and C. W. J. Beenakker.  Machine-learning-assisted correction of correlated qubit errors in a topological code.  _Quantum_ , 2:48, 2018.  doi: 10.22331/q-2018-01-29-48.  URL https://doi.org/10.22331/q-2018-01-29-48.
  * Maskara et al. [2018] Mishad Maskara, Aleksander Kubica, and Tomas Jochym-O’Connor.  Advantages of versatile neural-network decoding for topological codes.  _arXiv:1802.08680_ , 2018.
  * Gottesman [1997] Daniel Gottesman.  _Stabilizer Codes and Quantum Error Correction_.  PhD thesis, California Institute of Technology, 1997.
  * Stace and Barrett [2010] Thomas M. Stace and Sean D. Barrett.  Error correction and degeneracy in surface codes suffering loss.  _Physical Review A_ , 81(2):022317–, 02 2010\.  doi: 10.1103/PhysRevA.81.022317.  URL https://link.aps.org/doi/10.1103/PhysRevA.81.022317.
  * Bravyi et al. [2014] Sergey Bravyi, Martin Suchara, and Alexander Vargo.  Efficient algorithms for maximum likelihood decoding in the surface code.  _Physical Review A_ , 90(3):032326–, 09 2014\.  doi: 10.1103/PhysRevA.90.032326.  URL https://link.aps.org/doi/10.1103/PhysRevA.90.032326.
  * Nishimori [1986] H. Nishimori.  Geometry-induced phase transition in the $\pm j$ Ising model.  _J. Phys. Soc. Jpn._ , 55:3305, 1986.  doi: 10.1143/JPSJ.55.3305.  URL https://doi.org/10.1143/JPSJ.55.3305.
  * Bombín [2016] Héctor Bombín.  Resilience to time-correlated noise in quantum computation.  _Physical Review X_ , 6(4):041034–, 11 2016.  doi: 10.1103/PhysRevX.6.041034.  URL https://link.aps.org/doi/10.1103/PhysRevX.6.041034.
  * Bombín [2015] Héctor Bombín.  Single-shot fault-tolerant quantum error correction.  _Phys. Rev. X_ , 5:031043, 2015.  doi: 10.1103/PhysRevX.5.031043.  URL https://doi.org/10.1103/PhysRevX.5.031043.
  * Nagayama et al. [2017] Shota Nagayama, Austin G Fowler, Dominic Horsman, Simon J Devitt, and Rodney Van Meter.  Surface code error correction on a defective lattice.  _New Journal of Physics_ , 19(2):023050, 2017\.  doi: 10.1088/1367-2630/aa5918.  URL http://dx.doi.org/10.1088/1367-2630/aa5918.
  * Auger et al. [2017] James M. Auger, Hussain Anwar, Mercedes Gimeno-Segovia, Thomas M. Stace, and Dan E. Browne.  Fault-tolerance thresholds for the surface code with fabrication errors.  _Physical Review A_ , 96(4):042316–, 10 2017\.  doi: 10.1103/PhysRevA.96.042316.  URL https://link.aps.org/doi/10.1103/PhysRevA.96.042316.
  * Hutter et al. [2014] Adrian Hutter, James R. Wootton, and Daniel Loss.  Efficient markov chain monte carlo algorithm for the surface code.  _Physical Review A_ , 89(2):022326–, 02 2014\.  doi: 10.1103/PhysRevA.89.022326.  URL https://link.aps.org/doi/10.1103/PhysRevA.89.022326.
  * Anwar et al. [2014] Hussain Anwar, Benjamin J Brown, Earl T Campbell, and Dan E Browne.  Fast decoders for qudit topological codes.  _New Journal of Physics_ , 16(6):063038, 2014\.  doi: 10.1088/1367-2630/16/6/063038.  URL http://dx.doi.org/10.1088/1367-2630/16/6/063038.
  * Hutter et al. [2015] Adrian Hutter, Daniel Loss, and James R Wootton.  Improved hdrg decoders for qudit and non-abelian quantum error correction.  _New Journal of Physics_ , 17(3):035017, 2015\.  doi: 10.1088/1367-2630/17/3/035017.  URL http://dx.doi.org/10.1088/1367-2630/17/3/035017.
  * Delfosse and Nickerson [2017] Nicolas Delfosse and Naomi H. Nickerson.  Almost-linear time decoding algorithm for topological codes.  _arXiv:1709.06218_ , 2017.
  * Tuckett et al. [2018] David K. Tuckett, Stephen D. Bartlett, and Steven T. Flammia.  Ultrahigh error threshold for surface codes with biased noise.  _Physical Review Letters_ , 120(5):050505–, 01 2018.  doi: 10.1103/PhysRevLett.120.050505.  URL https://link.aps.org/doi/10.1103/PhysRevLett.120.050505.
  * Wang et al. [2010] David S. Wang, Austin G. Fowler, Charles D. Hill, and Lloyd C. L. Hollenberg.  Graphical algorithms and threshold error rates for the 2D color code.  _Quant. Inf. Comp._ , 10:0780, 2010.  doi: 10.26421/QIC10.9-10.  URL https://doi.org/10.26421/QIC10.9-10.
  * Delfosse [2014] Nicolas Delfosse.  Decoding color codes by projection onto surface codes.  _Physical Review A_ , 89(1):012317–, 01 2014\.  doi: 10.1103/PhysRevA.89.012317.  URL https://link.aps.org/doi/10.1103/PhysRevA.89.012317.
  * Stephens [2014] Ashley M. Stephens.  Efficient fault-tolerant decoding of topological color codes.  _arXiv:1402.3037_ , 2014.
  * Wang et al. [2003] Chenyang Wang, Jim Harrington, and John Preskill.  Confinement-higgs transition in a disordered gauge theory and the accuracy threshold for quantum memory.  _Annals of Physics_ , 303(1):31–58, 2003.  doi: https://doi.org/10.1016/S0003-4916(02)00019-2.  URL http://www.sciencedirect.com/science/article/pii/S0003491602000192.
  * Torlai and Melko [2017] Giacomo Torlai and Roger G. Melko.  Neural decoder for topological codes.  _Physical Review Letters_ , 119(3):030501–, 07 2017.  doi: 10.1103/PhysRevLett.119.030501.  URL https://link.aps.org/doi/10.1103/PhysRevLett.119.030501.