# Crosstalk Suppression for Fault-tolerant Quantum Error Correction with
Trapped Ions

Pedro Parrado-Rodríguez  Department of Physics, College of Science, Swansea
University, Singleton Park, Swansea SA2 8PP, United Kingdom  Ciarán Ryan-
Anderson  Department of Physics, College of Science, Swansea University,
Singleton Park, Swansea SA2 8PP, United Kingdom  Honeywell Quantum Solutions,
303 S. Technology Ct., Broomfield, Colorado 80021, USA  Alejandro Bermudez
Departamento de Física Teórica, Universidad Complutense, 28040 Madrid, Spain.
Markus Müller  Institute for Theoretical Nanoelectronics (PGI-2),
Forschungszentrum Jülich, 52428 Jülich, Germany  JARA-Institute for Quantum
Information, RWTH Aachen University, 52056 Aachen, Germany

###### Abstract

Physical qubits in experimental quantum information processors are inevitably
exposed to different sources of noise and imperfections, which lead to errors
that typically accumulate hindering our ability to perform long computations
reliably. Progress towards scalable and robust quantum computation relies on
exploiting quantum error correction (QEC) to actively battle these undesired
effects. In this work, we present a comprehensive study of crosstalk errors in
a quantum-computing architecture based on a single string of ions confined by
a radio-frequency trap, and manipulated by individually-addressed laser beams.
This type of errors affects spectator qubits that, ideally, should remain
unaltered during the application of single- and two-qubit quantum gates
addressed at a different set of active qubits. We microscopically model
crosstalk errors from first principles and present a detailed study showing
the importance of using a coherent vs incoherent error modelling and,
moreover, discuss strategies to actively suppress this crosstalk at the gate
level. Finally, we study the impact of residual crosstalk errors on the
performance of fault-tolerant QEC numerically, identifying the experimental
target values that need to be achieved in near-term trapped-ion experiments to
reach the break-even point for beneficial QEC with low-distance topological
codes.

##  1  Introduction

Quantum computation aims at manipulating delicate entangled states to achieve
functionalities beyond those presented by classical devices. Robust large-
scale quantum computers will likely require quantum error-correction (QEC) to
exploit the wide range of applications offered by a universal quantum
processor [1]. In particular, scalable quantum error correction codes (QECCs)
preserve quantum information by encoding it redundantly in a set of physical
qubits [1] such that, in principle, arbitrary levels of protection can be
achieved by increasing the number of redundant physical qubits while employing
active detection and correction of errors, provided physical noise rates lie
below the critical threshold of the corresponding QECC. Together with a fault-
tolerant methodology [2], which forbids the uncontrolled proliferation of
errors by the specific design of the scalable QEC circuits, this yields one of
the most promising approaches towards large-scale quantum computation.
However, to achieve the required levels of protection, there are experimental
and theoretical challenges that need to be addressed. In particular,
identifying and mitigating noise sources so that minimal QECCs are shown to
outperform their physical/bare counterparts is considered a break-even point
in the road-map for realising QEC for large-scale quantum computers [3, 4].

In several qubit-based quantum processors [5], the implementation of some of
the building blocks of QEC, such as the encoding of information in a QECC and
the detection and correction of errors without altering the encoded
information, has been demonstrated, for example, using trapped ions [6, 7, 8,
9, 10, 11, 12, 13, 14, 15], superconducting circuits [16, 17, 18, 19, 20],
nuclear magnetic resonance [21, 22], or nitrogen-vacancy centres [23, 24].
Recently, and in parallel to these efforts, there has also been much progress
in protecting quantum information in oscillator-based bosonic QEC encodings
(see, e.g. [25, 26] using trapped ions [27, 28, 29] and superconducting setups
[30, 31]).

In this study, we will focus on qubit-based QEC with trapped ions. To date,
trapped-ion experiments have shown high fidelity gates and long coherence
times [32, 33, 34, 35, 36, 37, 38], making them one of the most promising
candidates for the future realisation of large-scale quantum computers. There
are currently two approaches for the scalability of trapped-ion systems for
QEC. The first approach is the single-string ion trap, where all the ions are
placed in modules consisting of a single, linear radio-frequency trap, and
coupled by photonic interconnects [39, 40]. On the other hand, there is a so-
called shuttling-based approach to scalability [41], which utilises
microfabricated traps. In this approach, the ions are moved between storage
and manipulation zones, where they are subjected to single-qubit gates and
fluorescence measurements as needed or otherwise merged with other ions to
implement entangling gates or sympathetic laser cooling. After applying the
desired sequence of operations, the ions can be split and shuttled back to the
storage zones. There they remain as spectators of the operations on other
active ions in the manipulation zones [8, 42, 10, 41, 43, 44, 45]. Our study
is motivated by new experimental capabilities that have recently emerged in
the single-string trapped-ion modules. These new experimental capabilities
include the possibility to perform high-fidelity entangling gates addressed on
specific subsets of ions [46, 47, 48] , leading to effective all-to-all
connectivity for two-qubit entangling gates. These capabilities have motivated
the study of the single-string ion trap scenario as a viable approach to
implementing an operational logical qubit [49, 8]. Informed by these results,
we focus our study on the single string ion traps, which can eventually be
combined with the shuttling-based or photonic-interconnect techniques for
further scalability.

Topological codes [50, 51, 52, 53, 54], a specific class of scalable QECCs,
are currently being studied as one of the main options for future QEC as they
have high error thresholds. Moreover, they are designed such that the physical
qubits only need to be manipulated locally, i.e. requiring interactions
between neighbours. Local errors that stem from such manipulations can then be
efficiently detected and corrected by the QECC. To achieve this scalable
protection, the lattices where the physical qubits reside must be enlarged,
and the fidelity of the operations on the physical qubits needs to be reduced
below the aforementioned threshold. Some experiments have already demonstrated
levels of control on the required regime for small systems (e.g. [34]), but
scaling up the experiments while maintaining the desired degree of precision
remains a challenge. To tackle this, various low-distance QEC codes at the
reach of different state-of-the-art technologies, are being actively
investigated. For such low-distance codes, it is of primary importance to use
fault-tolerant (FT) circuit designs so that errors do not proliferate due to
unsuitable circuit layouts, allowing to exploit the full correcting power of
the QECC. Such fault-tolerant circuit constructions will serve the purpose of
reaching the break-even point of the advantage of QEC in small devices and
provide crucial information that can guide future strategies in progress
towards large-scale quantum computers. The 7-qubit colour code [52], also
known as the Steane code [55], is one of the workhorses for such low-distance
QECCs, and various techniques for an FT syndrome readout have been devised
[56, 57]. Due to present experimental capabilities, there has been intense
recent activity developing resource-efficient FT schemes, such as FT readout
techniques that exploit a single ancilla for certain types of microscopic
noise [58, 59, 60, 61]. Another example is using the so-called flag-based
readout [62, 53, 63, 64], which substantially reduces the number of required
ancillary qubits, encompassing noise models beyond the single-qubit limit.
These FT constructions exploit the full correcting power of the 7-qubit colour
code, which allows for the correction of any single fault in the encoded
logical qubit. In turn, this yields a different scaling of the logical error
rate to the physical error rate, which allows for the existence of pseudo-
thresholds and is crucial for the demonstration of the advantage of QEC with
small-scale devices. Colour codes distinguish themselves from other existing
QECCs because of their capability of a transversal implementation of the
entire group of Clifford gates [52].

Another important aspect for the progress of QEC is to inform the theoretical
descriptions, which typically assess a particular QECC under a specific noise
model, with experimental results such that the noise model can be made as
realistic as possible. In the context of trapped ions, a recent effort along
these lines has been accomplished for the shuttling-based approach [8, 65, 66,
67] as well as for the single-string approach [68, 69, 70]. In this
manuscript, motivated by the recent developments of new addressing optics [46,
48], which allow addressing subsets of ions in strings, we focus on the
single-string approach. Specifically, we present a microscopically-motivated
error model that accounts for imperfections in all the required operations. A
particular focus is placed on crosstalk errors. As described in [71],
crosstalk errors cause undesired dynamics that violate either (or both) of two
principles: spatial locality (i.e. gates should only affect the target qubits)
and independence of local operations (i.e. the effect of a gate should be
independent of other gates being applied to the system). In ion traps,
crosstalk is caused by residual illumination of laser light on neighbouring
ions when applying single- and two-qubit gates. This error source can be
effectively minimised for single-qubit gates [6] using composite pulse
sequences and dynamical decoupling techniques [72] but becomes a more delicate
issue when arising in the context of two-qubit entangling gates. With the use
of carefully constructed pulse sequences, it is possible to suppress unwanted
couplings on multi-qubit coupling operations, as shown in [73, 74]. In this
work, we consider two different models of crosstalk errors caused by this
residual illumination. In the context of fault-tolerant quantum computation
(FTQC), fault-tolerant constructions assume that errors only happen on those
qubits that are involved in the gates. Thus, crosstalk represents an error
source that potentially breaks the fault-tolerant character of FT circuit
constructions, as it can induce error processes affecting groups of physical
qubits that would, otherwise, not interact through the gates. In this way, the
FT design of the circuits is compromised, possibly leading to the
proliferation of errors. Therefore, if crosstalk is not adequately accounted
for, or suppressed, it can have a damaging effect on the performance of the
QEC protocol and break fault tolerance [75, 76, 77, 78, 79, 80].

Generally, one can attempt to mitigate errors in the whole computation at
different levels, such as at the level of gates [77, 81, 82, 83, 84, 85],
circuits [62, 63, 64], full QECCs [53], or even entire algorithms [76, 72].
Recent work [70] has described how to combat crosstalk in ion traps on the
level of QECCs and circuits by choosing the arrangement of qubits in the QECC
circuitry to minimise the fault-tolerant breaking effects of crosstalk, and by
comparing the performance of different QECCs in the compass-code QEC family.
As a complementary approach, we will investigate a technique that suppresses
crosstalk directly at the gate level. Gate-level mitigation of noise can
suppress and change the nature of any remaining effective noise. Thus, one may
want to consider such techniques when evaluating the performance and merits of
different QEC protocols. In particular, we will concentrate on a flag-based
scheme [64] for the distance-three seven-qubit colour code. Our purpose is to
analyse whether the refocussing technique, to be described in detail below,
allows this QEC-operated logical qubit to outperform a physical qubit in the
presence of microscopic errors that include crosstalk. Here, we want to
identify the specific regimes where this QEC advantage becomes possible,
informing future hardware improvements. We will also explore the consequences
of the coherent nature of crosstalk and the extent to which it is possible to
suppress its impact on QEC. We consider near-term noise rates and crosstalk,
building on previous works [67], and extend the noise models towards a more
complete description. It should be noted that although our study focuses on a
trapped-ion quantum processor and the example of the 7-qubit colour code, the
error mitigation technique and analysis discussed here can be adapted to other
quantum processor architectures, or other QECCs and algorithms.

The organisation of this paper is as follows. In Section 2, we present the
ion-trap operation toolbox, examine the error model for the ion trap, and
review the QEC protocol we will be focusing on. Most importantly, we introduce
two error models of crosstalk used throughout the remainder of the paper. In
Section 3, we discuss how unmitigated crosstalk affects the performance of the
QEC protocol. In Section 4, we describe the refocussing technique intended to
suppress crosstalk and derive the form and strength of residual crosstalk
noise after applying the refocussing technique. We then examine how
refocussing improves the performance of the QEC protocol by extensive
numerical simulations. Finally, in Section 5, we briefly discuss further
avenues for crosstalk mitigation and present our conclusions.

##  2 Trapped-ion toolbox for QEC

###  2.1 Static ion-string gate set and noise model

We focus on the single-string ion trap approach and a single ion species,
allowing one to encode qubits in an optical transition that can be operated
with addressed laser light in the visible spectrum. For example, in
${}^{40}{\rm Ca}^{+}$ ions, the $\left|0\right>$ state corresponds to the
ground state $\left|S_{1/2},m_{j}=-1/2\right>$, and the $\left|1\right>$ state
to the metastable excited state $\left|D_{5/2},m_{j}=-1/2\right>$. We now
briefly catalogue the set of physical gates we will utilise for these optical
qubits in a static-string ion trap to implement QEC. References [67, 86]
provide a more detailed review of these gates.

####  2.1.1 Single and two-qubit gates

For single-qubit gates, ions in the string can be individually addressed with
laser beams [87] to apply a rotation

$\displaystyle P_{i}(\theta)=e^{-i\frac{\theta}{2}P_{i}},$ (1)

where $P\in\\{X,Y,Z\\}$ belongs to the set of Pauli matrices, and $\theta$ is
the angle of rotation. The errors in the single-qubit gates stem from
fluctuations in the laser beam’s intensity and phase, which lead to
over/under-rotations and changes in the axis of rotation, respectively [66].
In the present work, we model these errors by a symmetric depolarising
channel, which admits a decomposition in terms of Kraus operators [1], namely

$\displaystyle\rho\to D(\rho)=\sum_{n}K_{n}\rho K_{n}^{\dagger}.$ (2)

For the depolarising channel, the Kraus operators are
$K_{n}\in\\{\sqrt{1-p_{\rm 1q}}\,\,\mathbb{I},\sqrt{p_{\rm
1q}/3}\,X,\sqrt{p_{\rm 1q}/3}\,Y,\sqrt{p_{\rm 1q}/3}\,Z\\}$, where we have
introduced the error rate per single-qubit gate $p_{\rm 1q}$, the value of
which depends on the sources of gate imperfections listed above, and will be
fixed to realistic values as achieved in current experiments, and as detailed
below.

For multi-qubit entangling operations, a popular and widely used two-qubit
entangling gate for optical qubits is known as the Mølmer–Sørensen (MS) gate
[88, 89, 90]. This gate equips the static string with complete qubit
connectivity, as it exploits a common vibrational mode as a quantum data bus,
which can mediate the entangling gate operation between an arbitrary pair (or
larger groups) of qubits that share this common mode, provided that the laser
beams uniformly illuminate this pair (or group) and do not illuminate the
remaining ions. For this work, we concern ourselves only with the MS gate in
the $XX$-basis which, when addressed to the pair of ions with indexes $i,j$
within the static string, can be expressed through the following unitary

$\displaystyle XX_{ij}(\theta)=\exp\left(-i\frac{\theta}{2}X_{i}X_{j}\right),$
(3)

where $X_{i}X_{j}$ is a tensor product of Pauli $X$-type operators on qubits
$i$ and $j$, and $\theta$ is the MS-gate angle. We focus on this version of
the MS gate because the fully-entangling MS gate $XX_{ij}\left(\pi/2\right)$,
together with single-qubit rotations, are sufficient to enact the CNOT gate
(see Fig. 1), which is the two-qubit gate most often used to describe QEC
circuitry [91, 92].

These gates allow the implementation of the universal set of unitaries
$\\{H,S,T,CNOT\\}$ [93] by using combinations of the MS gate and single-qubit
rotations (see Fig.1 for more details). Furthermore, for the static-string
approach with single-ion laser addressing, the system has full two-qubit
connectivity with this gate set. This allows for a better connected system of
qubits, which benefits the performance, reducing the number of gates required
to reproduce a general circuit [49].

The error model for the MS gate finds its sources in the residual spin-phonon
entanglement with the different levels of oscillation of the ion chain, as
well as fluctuations on the intensity and phase of the laser beam and the
global magnetic fields - see [34] for a recent comprehensive analysis. An
effective error model was derived in [67] from microscopic sources and
consists of the stochastic application of Pauli-type errors. The details of
this error model can be found in Appendix B.

Additionally, as discussed below, the MS gate error model includes crosstalk
between the gate ions and the neighbouring ions.

Figure 1: Gate set for the static ion-string approach: By using addressed
single-qubit rotations and the two-qubit entangling MS gate, we have a
universal gate set available. The gate compilation of the CNOT gate using the
MS gate and single-qubit rotations is not unique. For other useful gate
compilations, see [92].

####  2.1.2 Crosstalk errors

In general, crosstalk noise arises from any gate that unintentionally affects
qubits that should not be involved and should thus remain mere spectators.
Operational crosstalk in optically-manipulated trapped-ion systems stems from
imperfect addressing, such that light intended to be addressed to a specific
set of active qubits also illuminates some spectator qubits, which are the
qubits arranged in the immediate neighbourhood of the active qubits. The
origin of this imperfect addressing is generally given by the finite size of
the laser focusing spot at the position of the ions. In this work, we consider
two different models for crosstalk errors in the MS gate: the entangling
crosstalk model and the Stark-shift crosstalk model. It should be noted that
whereas single-qubit gates also generate crosstalk, this noise can be greatly
suppressed by techniques such as composite sequences [94] or dynamical
decoupling [81] (see Appendix A for a further discussion). The qubit
measurement can also lead to crosstalk, as the measurement process also leads
to the scattering of photons from the measured ions, which can subsequently
interact with the remaining spectator ions in the string. We note that it is
possible to prevent this type of crosstalk by applying spectroscopic
decoupling pulses to nearby spectator ions [6], such that the scattered
photons become off-resonant and the crosstalk is minimised (see Appendix A.5).
Therefore, in the following, we will only focus on crosstalk in MS-gates.

In the entangling crosstalk model, the leading order effect of crosstalk, as
deduced by our microscopic analysis (see Appendix A), is the partial
application of MS operations between the set of gate ions and the set of
neighbouring ions (Fig. 2). For an MS-gate rotation of an arbitrary angle
$\theta$, the leading order noise can be expressed as a unitary that involves
active qubits and neighbouring spectators of the following form

$E(\theta)_{\text{crosstalk}}=\prod_{\begin{subarray}{c}g\in G,\\\
N\in\text{neig}(G)\end{subarray}}\exp\left(-i\;\epsilon_{CT}\frac{\theta}{2}X_{g}X_{N}\right).$
(4)

where $G=\\{i,j\\}$ is the set of gate qubits the ideal MS gate acts on,
$\text{neig}(G)$ is the set of qubits that are neighbours to $i$ and/or $j$
but do not include $i$ or $j$, and $\epsilon_{CT}=\Omega_{n}/\Omega$ depends
on the fraction of the light intensity illuminating the spectator qubits with
respect to the intensity addressed to the active qubits. We do not consider
any effects of crosstalk on next to nearest neighbours, as we assume a
sufficiently narrow Gaussian profile of the laser light. The amplitude of the
electric field away from the ions becomes exponentially suppressed, and
therefore we neglect the effects of crosstalk beyond nearest neighbours. In
particular, $\Omega$ is the Rabi frequency for the two-ion MS gate and
$\Omega_{n}$ is the relative Rabi frequency of the residual light on the
neighbouring ions. For a single gate-neighbour crosstalk pair of a gate qubit
$g$ and a neighbouring qubit $n$, the error channel is $\rho\to D_{\rm
2q}^{\rm ct}(\rho)$, where

$\displaystyle D_{\rm 2q}^{\rm ct}(\rho)$
$\displaystyle=\cos^{2}\left(\tfrac{\theta\epsilon_{CT}}{2}\right)\;\rho$
$\displaystyle+\sin^{2}\left(\tfrac{\theta\epsilon_{CT}}{2}\right)\;X_{g}X_{n}\;\rho\;X_{g}X_{n}$
$\displaystyle+i\frac{1}{2}\sin\left(\theta\epsilon_{n}\right)\;[\rho,\;X_{g}X_{n}].$
(5)

In this expression, we can identify the probability of a single crosstalk-
error event as $p_{c}=\sin^{2}(\epsilon_{CT}\,\theta/2)$, which leads to a
correlated 2-qubit bit-flip error on one of the active qubits and a
neighbouring spectator qubit. It is clear from this perspective that the
entangling crosstalk error model should be carefully considered in the context
of the FT circuit design, as a single MS-gate error can turn into a dangerous
pair of errors if both the active and the spectator ions belong to the set of
physical data qubits.

We can use this probability $p_{c}$ to define a stochastic/incoherent version
of the crosstalk channel described in Eq. (5). That is, the Kraus
decomposition of Eq. (2) for incoherent crosstalk is

$\begin{split}K_{c,0}&=\sqrt{1-p_{c}}\;\mathbb{I},\\\
K_{c,1}&=\sqrt{p_{c}}\;X_{g}X_{n}.\end{split}$ (6)

When an ion lies in between two gate ions, it will receive twice the residual
light from the gate. For that case, the probability of crosstalk is
effectively increased by a factor of 4. Note that we model both incoherent and
coherent crosstalk, as we will compare both models in the simulations. The
coherent nature of crosstalk can have important implications for QEC
performance. On the one hand, it can lead to a coherent build-up of errors. On
the other hand, the coherent nature also offers the possibility to greatly
suppress crosstalk using refocussing schemes, as discussed in the following
sections.

The second crosstalk model we consider is associated with an alternative way
of implementing addressed entangling MS gates. Here, the idea is to apply a
power imbalance between the intensities of the bichromatic light fields
coupling to the red and blue phonon sidebands, respectively. This difference
in intensities leads to an ac-Stark shift, which will differ for active and
spectator ions. By tuning the power imbalance appropriately, the gate qubits
will be subjected to a two-photon resonance and undergo the ideal MS gate
dynamics, as desired, in contrast to the spectator ions that will effectively
be exposed to weak and far off-resonant light. As a consequence, this setting
avoids entangling interactions of spectator qubits with the active ions. The
leading-order effect of the residual crosstalk is an ac-Stark shift on the
spectator ions, resulting in small unwanted, but systematic $Z$-rotations,
which can be accounted for by

$E^{(2)}_{\text{crosstalk}}=\prod_{n\in\text{neig}(G)}\exp\left(-i\;\mu_{n}\frac{\pi}{4}Z_{n}\right),$
(7)

where we use the same notations as in Eq. (4) and introduce $\mu_{n}$ as the
residual ac-Stark shift from the off-resonant sidebands that act on the
spectator ions due to crosstalk. A detailed derivation of this error model can
be found in Appendix A.4.

An incoherent approximation of this second crosstalk noise model, suitable to
be used in stabiliser-based numerical simulations, is given by a single-qubit
dephasing channel with the following Kraus decomposition (2) on each of the
neighbouring spectator qubits

$\begin{split}K_{c,0}&=\sqrt{1-p_{c}}\;\mathbb{I},\\\
K_{c,1}&=\sqrt{p_{c}}\;Z_{n},\end{split}$ (8)

with $p_{c}=\sin^{2}(\mu_{n}\pi/4)$.

Figure 2: Addressed entangling gates in the static ion string approach: a)
Light is focused on the ions $i$ and $j$ encoding the qubits involved in the
2-qubit gate. b) Residual light on ‘neighbour’ ions in the direct spatial
vicinity of the target ‘gate’ ions causes small residual crosstalk between the
gate and neighbouring spectator ions. c) These interactions result in residual
effective two-body interactions between each target (gate) ion and each of the
neighbouring spectator ions (indicated by dashed lines). The form and
quantitative dependence of these crosstalk terms are discussed in the main
text. d) Circuit representation of the MS gate (solid line) and crosstalk
events (dashed lines) resulting from the gate using the entangling error model
for crosstalk, as described in the text.

####  2.1.3 Errors on idling qubits

We consider here trapped-ion qubits encoded in an optical qubit transition, as
e.g. in ${}^{40}{\rm Ca}^{+}$ qubit. When idling, these qubits suffer three
types of noise: dephasing, amplitude damping, and leakage. Dephasing, which
arises, e.g. from ambient fluctuating magnetic fields or laser frequency
drifts, will be modelled as temporally and spatially uncorrelated in this
work. Amplitude damping results from spontaneous decay from the metastable
state $\left|1\right>$ to the ground state $\left|0\right>$. Leakage occurs if
the state $\left|1\right>$ decays instead to the Zeeman sublevel
$\left|\ell\right>=\left|S_{1/2},m_{j}=+1/2\right>$, which lies outside of the
qubit subspace, as opposed to the ground state
$\left|0\right>=\left|S_{1/2},m_{j}=-1/2\right>$. For the experimental system
we study, $T_{1}=1/\Gamma$ is around 1.1 seconds, and the fraction of leakage
with respect to amplitude damping is $\Gamma_{l}=\frac{4}{9}\Gamma_{d}$ [67],
with $\Gamma=\Gamma_{d}+\Gamma_{l}$. While one can fully simulate the
amplitude-damping/leakage channel using the Kraus operators and circuit
identities, as discussed in Ref. [67], for our simulations we approximate both
channels using a Clifford approximation, similar to the model presented in
Ref. [95], which can be efficiently implemented in stabiliser simulations.

To numerically simulate this combination of error channels, we first check
that the state is not in $\left|0\right>$ or $\left|\ell\right>$ already.
Then, we use a random number to sample the probability distribution of a decay
event with $p=1-\exp(-\Gamma\Delta t)$, where $\Delta t$ denotes the time
step, and a second random number, according to the electronic branching ratio,
determines if the qubit decays to the leaked state $\left|\ell\right>$ or to
the ground state $\left|0\right>$. The corresponding Kraus operators (2) for
our approximation are

$\begin{split}K_{0}&=\sqrt{1-p}\,\mathbb{I},\hskip
4.30554ptK_{2}=\sqrt{p}\left|0\right>\left<0\right|,\hskip
4.30554ptK_{3}=\sqrt{p}\left|\ell\right>\left<\ell\right|\\\
K_{4}&=\sqrt{p\tfrac{\Gamma_{d}}{\Gamma}}\left|0\right>\left<1\right|,\hskip
4.30554ptK_{5}=\sqrt{p\tfrac{\Gamma_{l}}{\Gamma}}\left|\ell\right>\left<1\right|.\end{split}$
(9)

While the physical origin of leakage in qubits encoded in an optical
transition can be similar to amplitude damping, special treatment needs to be
made of leaked states as they are no longer in the computation basis. For
leaked states, we follow a similar procedure as outlined in Ref. [96]. In the
simulation, if a qubit leaks, it is projected to the $\left|0\right>$ state
and a classical variable is used to record that the qubit has leaked. If
leaked qubits are exposed to laser fields that aim at realising single-qubit
unitaries, they do not evolve as the laser fields are off-resonant and do not
bring them back to the computational qubit subspace. If a leaked qubit would
take part in an $MS$ gate, neither the $MS$ gate nor the noise associated with
the $MS$ is applied. Furthermore, as discussed in [67], when a non-leaked
qubit takes part in a $MS$ with a leaked qubit, no additional noise is applied
to the non-leaked qubit. Measurement and state preparation operations reset
leaked qubits to the $\left|0\right>$ state since both operations are followed
or realised by optical pumping into $\left|0\right>$. Thus, during measurement
and state preparation, the value of the classical variable used to track
leaked qubits is modified to indicate that qubits undergoing these operations
are no longer leaked.

By a specifically tailored leakage repumping protocol [67] we can reset a
leaked state reset to $\left|0\right>$ while leaving computational states
largely unaffected. However, this process can be itself faulty and lead to
leakage, dephasing and amplitude damping errors, as discussed in detail in
Appendix B. In the QEC protocols we study, we apply this leakage repumping
sequence before each stabiliser measurement round.

####  2.1.4 State initialisation and measurement errors

As for state preparation and measurement, ions are prepared in the state
$\left|0\right>$ and measured in the $Z$-basis. Ions may additionally be re-
prepared in the $\left|0\right>$ state at any arbitrary point during
computation. Faults on these gates are modelled by applying Pauli X errors
after state preparation gates and before the measurement gates. Additionally,
we include that imperfections in the preparation of the $\left|0\right>$ state
can lead to a leakage error.

Operation | Anticipated | Anticipated
---|---|---
| duration | Infidelity
Two-qubit MS gate | 15$\mu$s | $2\cdot 10^{-4}$
One-qubit gate | 1$\mu$s | $1\cdot 10^{-5}$
Measurement | 30$\mu$s | $1\cdot 10^{-4}$
Qubit reset | 10$\mu$s | $1\cdot 10^{-4}$
Re-cooling | 100$\mu$s | $\bar{n}<0.1$
Leakage repumping | 20$\mu$s | $2\cdot 10^{-4}$

Table 1: Extended trapped-ion QEC toolbox. Description of expected near-term
experimental trapped-ion capabilities for a QCCD approach to FT QEC (Values
taken from Ref. [67]). These values correspond to a particular ion trap setup.
Currently, better values for particular gates have already been achieved in
dedicated experiments. For a more detailed review of the current best
fidelities and durations, the reader can consult Table 1 in [4].

###  2.2 Flag-based QEC with colour codes

Let us now briefly summarise a few central properties of the 7-qubit colour
code [52, 55], which are relevant for the QEC protocol studied below. With
this code (see Fig. 3) it is possible to store and manipulate $k=1$ logical
qubit redundantly encoded in entangled states distributed over $n=7$ physical
qubits. The code has a logical distance of $d=3$ and, therefore, one can
detect and correct at least $t=\left\lfloor{\frac{d-1}{2}}\right\rfloor=1$
arbitrary fault (phase and/or bit flip fault) on any of the seven physical
data qubits. The code belongs to the family of CSS codes [97, 55], allowing
one to independently detect and correct bit- and phase-flip faults. These
faults are identified by measuring a set of three weight-four $X$-type and
three $Z$-type parity checks. The measurements indicate parity violations
resulting from the bit and phase flips and are used to deduce the presence of
these faults.

Figure 3: The 7-qubit distance $d=3$ colour code: We encode one logical qubit
in $n=7$ physical qubits. The qubits are represented by the dots in the
vertices, the logical operators $L_{X}$ and $L_{Z}$ act on the edge of the
triangle, and the stabiliser checks $S^{(i)}$ correspond to the plaquettes.
The code can correct up to $t=1$ arbitrary fault on any of the seven physical
data qubits.

Logical states are encoded in the code space, which is defined as the
simultaneous eigenspace of eigenvalue +1 of all six stabiliser generators
listed in Fig. 3. Logical qubits employing larger distance codes, and thus
allowing for the correction of multiple errors, can be constructed by encoding
a logical qubit in larger 2D lattice structures involving more physical qubits
[52].

One of the main features that distinguishes the colour code from other codes,
like, e.g. Kitaev’s surface code [98], is that the colour code permits the
transversal, i.e. bit-wise realisation of the entire Clifford group [52, 1].
This property facilitates a fault-tolerant application of the logical gate
operations, as applying the logical gate through the application of single-
qubit unitaries prevents an uncontrolled propagation of errors through the
circuit. To complete a universal set of logical gate operations, one needs to
complement the Clifford operations with a single non-Clifford gate. A common
option is the $T$-gate [1], which can be implemented in the 7-qubit colour
code by magic-state injection [99] via a teleportation process between the
register of system qubits and an ancilla qubit, through the preparation of a
$T$-state and the growing of a logical qubit [100], or by code-switching
techniques [101, 102, 103].

A challenge of colour codes is that they are not naively fault-tolerant when
using standard parity check circuits in which a single ancilla is used for a
stabiliser measurement. Whereas fault-tolerant stabiliser readout with single
ancilla qubits is possible in surface codes, other codes, including colour
codes, require more sophisticated ancilla constructions. That is, for standard
parity check circuits, some weight-one faults spread to weight-two faults that
lead to a logical error for the 7-qubit colour code, as can be seen in the
example in Fig. 4. To overcome this problem, various schemes have been
developed to make the stabiliser readout fault tolerant [56, 57, 104, 105].
However, these schemes require a substantial resource overhead, as they are
based on the use of multiple qubit ancilla states which need to be prepared
and verified, typically in multi-partite entangled states [56, 57].

In more recent work, it was shown that an FT stabiliser measurement could be
achieved with only one additional ancilla qubit, the so-called flag qubit
(Fig. 4). In a nutshell, the idea is that one ancilla is used for the
stabiliser measurement while a second ancilla acts as a flag to indicate the
possible occurrence of dangerous correlated faults that can lead to logical
errors. In one QEC cycle, the stabilisers are measured sequentially, until one
of the ancilla measurement signals a fault. When this occurs, the six
stabilisers are measured again. Using the information of these measurements
and the flag qubit, it is possible to infer and correct the error, preserving
the FT character.

In a recent work [64], a new fault-tolerant scheme is presented that allows
for the parallel flagged measurement of stabilisers (Fig. 6). In this scheme,
each ancilla is used to measure one of the stabilisers, but at the same time
acts as a flag to indicate potentially dangerous faults happening on the other
ancillas, which otherwise could propagate onto several data qubits and cause a
logical error. If a fault is detected, all the stabilisers are measured again
to obtain the necessary information to identify the fault. This method allows
the simultaneous measurement of three stabilisers in parallel. The new flag-
based scheme has the advantage of reducing the number of measurement rounds
since it allows parity-check measurements to be performed in parallel. This
reduces the time to perform a QEC cycle and the time during which idle qubits
undergo decoherence, which is particularly advantageous in platforms with
short coherence times and slow measurements.

Figure 4: Error propagation in the syndrome readout circuit. a) Bit flip error
propagation through a CNOT gate: an X error in the control qubit propagates to
the target qubit, but it does not propagate from the target qubit to the
control qubit. b) Standard stabiliser measurement of $S_{x}^{(3)}$ (green),
where a single ancilla is used to measure the stabiliser. A single fault on
the ancilla can propagate through the CNOTs and result in two X faults on the
data qubits (6 and 7). Such faults that grow due to circuitry and trigger
logical errors are called hook errors. c) Syndrome readout: (left) after
measuring all six stabilisers, only the blue stabiliser (marked with a star)
will be excited by the two faults. (right) The correction corresponding to
that syndrome would be to apply an $X$ operation to qubit 5, which would
complete the logical $L_{X}=X_{5}X_{6}X_{7}$ operator and lead to a
logical-$X$ error. d) Stabiliser readout with a flag qubit: hook errors can be
detected by using an additional ancilla (flag qubit) in the stabiliser
readout. If a flag qubit signals a fault, another round of syndrome readout is
run, and the information obtained by the flag and the syndrome information can
be used to identify and correct the error [58]. Figure 5:  QEC protocol: the
QEC round used to estimate the logical error probability works as follows:
first, we initialize the state using a FT protocol (1) using a single ancilla
as a flag [67]. If the flag is raised, the state is discarded, and we restart
the protocol. Then, we begin the syndrome extraction protocol: (2) parallel
flagged syndrome extraction of the stabilizers $S_{x}^{(1)}$, $S_{z}^{(2)}$
and $S_{z}^{(3)}$ (circuit redrawn from Ref. [64]). If no flag is raised, we
proceed to (3) and measure the stabilizers $S_{z}^{(1)}$, $S_{x}^{(2)}$ and
$S_{x}^{(3)}$ using parallel flagged readout. If any flag was raised during
(2) or (3), we realize a second full round of stabilizer readout without
flags. Using three ancillas, we can measure simultaneously groups of three
stabilizers. Finally, (5) the state is measured. We can apply the recovery
operation corresponding to the syndrome and check if the protocol ended in
success or failure. In the figure, the circuits are shown using CNOT gates.
For the simulations, we compiled the circuits into MS gates to adapt them for
the trapped-ion universal gate set. An example is shown in Fig. 6 for the
circuit in (2).
Figure 6:  Circuits for parallel syndrome extraction: a) Circuit for the
parallel and FT measurement of the stabilisers $S_{x}^{(1)}$, $S_{z}^{(2)}$
and $S_{z}^{(3)}$ via ancillas $a_{1}$, $a_{2}$ and $a_{3}$, respectively, as
shown in b). The circuit, shown in Fig. 5 with CNOTs, has been compiled into
MS gates with the addition of single-qubit gates, shown in c). A similar
circuit can be used to measure fault-tolerantly the stabilizers $S_{z}^{(1)}$,
$S_{x}^{(2)}$ and $S_{x}^{(3)}$ by compiling the circuit with CNOTs shown in
Fig. 5. Using those two circuits, it is possible to measure all 6 stabilizers
with 3 ancillas in only two sets of operations. e) Sketch of the order of the
qubits in the ion string.

Finally, it is important to note that, from a decoding standpoint, the new QEC
protocols do not impose any significant increase in decoder complexity for the
operation of a 7-qubit colour code logical qubit. Essentially, depending on
whether and which ancilla qubits give non-trivial measurements, e.g. a small
set of lookup tables can be used to identify the suitable correction [64].

##  3 The adversity of bare crosstalk on QEC

In this section, we analyse the impact of crosstalk on the performance of the
7-qubit colour code using numerical simulations. We simulate individual rounds
that begin with a fault-tolerant state preparation using a single ancilla
[67], followed by a round of flagged QEC in which we measure the stabilisers
using the flag scheme previously described in Sec. 2. If an error is detected,
we do a second measurement of the stabilisers, without flags. We then apply a
correction based on the information from the stabiliser measurements using a
lookup table. Finally, we measure all the qubits to check if a logical error
has happened, applying a classical round of error correction if needed. We
simulate multiple iterations of this experiment to estimate the logical error
rate of the circuit for each set of error parameters (see Fig. 5).

First, we study the relevance of the coherent versus incoherent modelling of
crosstalk errors. To avoid unnecessary complications, we note that this
question can already be addressed by limiting the error model to crosstalk
errors only. We run state-vector numerical simulations to explore the QEC
protocol’s performance under coherent errors in Eqs. (4) and (7) and compare
the results with those stemming from stabiliser simulations for the incoherent
error model of crosstalk in Eqs. (6) and (8). The results shown in Fig. 7 show
that the logical error rates for the coherent model of crosstalk errors are on
the same order of magnitude but, generally, slightly larger than those
obtained using the incoherent crosstalk model. A linear fit in the low
crosstalk regime, namely for $p_{c}<10^{-4}$, shows that the scaling of the
logical error rate with the crosstalk error rate is linear, as expected, and
that the coherent version of crosstalk is a factor of $3.0\pm 0.3$ larger than
its incoherent counterpart. This indicates that the incoherent approximation
of the crosstalk errors underestimates expected logical error rates,
overestimating the QEC capabilities and leading to better pseudo-thresholds
when the full error model is considered, as discussed below. Once this
comparative analysis has been performed, let us analyse the performance of the
7-qubit colour code, using the flag scheme described previously, under the
full error model that incorporates all other microscopic error sources in
addition to the crosstalk noise. We run simulations for different values of
the crosstalk error rate to identify a critical value of crosstalk errors
below which it is possible to reach the break-even point of “quantum logical
advantage”, namely when the logical error rate is lower than the leading
physical error rate in the typical circuits. As discussed previously for
trapped-ion implementations, the largest physical error rate is the entangling
MS gates. We only consider one ion string ordering, in which ions in positions
2-8 correspond to qubits 1-7 of the Steane code, and ions 1, 9 and 10
correspond to the ancilla qubits (see Fig. 6). Here, we focus on the analysis
of the performance of the logical state $\left|{+}\right>_{\rm
L}=(\left|{0}\right>_{\rm L}+\left|{1}\right>_{\rm L})/\sqrt{2}$, as it is
typically this state which performs worse under the effects of noise and
imperfections. Thus, our simulations are conservative for the eventual goal of
sustaining long-lived logical qubits.

We use the open-source software known as PECOS [106, 107] to perform the
numerical simulations in this work. PECOS is a Python framework for studying,
developing, and evaluating QEC protocols. Concepts such as QEC protocols,
error models, and simulators are decoupled from each other. This allows us to
specify our protocol circuitry and error models separately and choose the most
appropriate simulator. For incoherent numerical studies, we utilised the
stabiliser simulator included with the software; however, for coherent
simulations, we ran state-vector simulations using ProjectQ [108, 109] as a
backend to PECOS. While the coherent simulations provide a more precise
estimate of a quantum system’s behaviour, we want to emphasise the importance
of the stabiliser simulations. These incoherent simulations provide fast
results that allow for a quick evaluation of the behaviour of a given process.
For many practical applications, this allows faster informed decisions and a
better workflow.

The simulation results shown in Figure 8 represent the performance of QEC
under a comprehensive error model that aims to include the relevant noise
sources that affect near term, static-string ion trap devices, as described in
Section 2.1. While the main control parameters are the crosstalk and MS-gate
error rates, the simulation includes other sources of errors with the
following rates: single-qubit errors ($p_{s}=10^{-5}$), state preparation and
measurement errors ($p_{sp}=p_{m}=10^{-4}$), uncorrelated dephasing with
coherence time $T_{2}=2.2s$, amplitude damping and leakage, with a lifetime
$T_{1}=1.1s$ of the metastable qubit state $\left|1\right>$. The floor levels
observed on the logical error rate for low values of the MS-gate error rate
depend on the fixed values of these additional error sources. These values of
the parameters are used in the remaining simulations in the paper.

Figure 7:  Logical error rates for coherent and incoherent crosstalk errors.
Here, we estimate the logical error rate using a limited error model that
includes crosstalk errors only and set all other error sources to zero. We
measure the logical-$X$ (logical-$Z$) error rate by simulating a QEC round on
the state $\left|+\right>_{L}$ ($\left|0\right>_{L}$) (colours blue and red in
the figure, respectively). We compare the results of simulating the crosstalk
errors coherently (using state vector simulations and the crosstalk model on
Eq. 4, solid lines) or incoherently (using Pauli propagation simulations and
the crosstalk error model on Eq. 6, dashed lines). The results show that the
logical error rates for coherent simulations are worse than the incoherent
version by a factor of about 3, but that this difference remains approximately
constant as crosstalk is increased. The error bars for the points are smaller
than the size of the marker.

As can be seen in Fig. 8, we find that for a crosstalk error-rate of
$p_{c}=10^{-6}$, or below, a pseudo-threshold can be obtained when the
entangling MS-gate error lies below $p_{\rm MS}\lesssim 2\cdot 10^{-3}$, a
value that is at reach for current technology. Let us also remark that,
contrary to idealised noise models with a single error parameter, the regime
of quantum logic advantage is contained within a range of physical entangling-
gate error rates. If the MS-gate error is reduced well below the levels of the
other noise sources, it will no longer be possible to demonstrate quantum
logic advantage by comparing the logical error rate with the MS-gate error
rate, as the other sources of noise will be the leading ones. This leads to a
plateau-like levelling out of the logical error rate, similar to the behaviour
observed in Ref. [70]. This clarifies the inherent complexity of having a
single well-defined threshold for realistic multi-parameter noise models,
which justifies the search for other metrics to quantify the benefit of QEC
[8, 67]. Although the required MS-gate error level is realistic for current
state-of-the-art architectures, reducing crosstalk error rates to values on
the order of $10^{-5}$-$10^{-6}$ might be challenging using current optical
addressing techniques. This difficulty motivates using refocussing techniques,
as an additional circuit level technique to further suppress residual
crosstalk. As we will show in the following sections, the application of a
refocussing scheme will allow for a reduction of crosstalk levels by several
orders of magnitude, leading the scheme back to a beneficial QEC regime.
Further reduction of crosstalk to values below $c\simeq 10^{-7}$ does not
improve the results, as its effects become negligible with respect to the
other error sources present in the simulations. Although crosstalk errors
still have the capability to break FT in the Steane code, as a single
crosstalk fault event can lead to a non-correctable error, it stops being the
limiting factor for the performance of QEC in the experimentally relevant
regime.

Figure 8:  Pseudo-threshold as a function of the entangling-gate error rate
for specific crosstalk errors: We show the results, on a log-log scale, for
preparing and sustaining logical $\left|+\right>_{\rm L}$ state. Note that for
low MS-gate errors, the curves flatten. This is because, for each line, only
the MS-gate errors vary and other error rates such as crosstalk, idle, single-
qubit gate, initialisation, and measurement errors are held fixed. From the
results of this plot, we see that if the crosstalk error-rate is at $10^{-6}$
or better, then a pseudo-threshold exists. Furthermore, a pseudo-threshold of
approximately $2.7\times 10^{-3}$ can be obtained. In addition to the MS gate
errors, the simulation includes other sources of errors with the following
rates: single-qubit errors ($p_{s}=10^{-5}$), state preparation and
measurement errors ($p_{sp}=p_{m}=10^{-4}$), uncorrelated dephasing with
coherence time $T_{2}=2.2s$, amplitude damping and leakage, with a lifetime
$T_{1}=1.1s$ of the metastable qubit state $\left|1\right>$. These parameters
are used in the remaining simulations in the paper. The details on these error
models are described in Section 2.1. The floor levels of the logical error
rate observed for low MS-gate error rates stem from the damaging effects of
these additional error sources. The error bars for the points are smaller than
the size of the marker.

##  4 Active suppression of crosstalk for QEC

###  4.1  Refocussing and residual noise

As we have seen in the previous section, crosstalk errors can have a damaging
effect on a logical qubit’s QEC performance. Under the first crosstalk error
model discussed above, the leading order effect is a coherent partial
entangling operation between all combinations of gate qubits and neighbouring
qubits, as described in equation 4. Due to this error’s coherent nature, one
can use composite pulse schemes to refocus these undesired interactions caused
by crosstalk, like the scheme shown in Fig. 9. The scheme we propose for the
compensation of the coherent crosstalk error is a simple refocussing sequence,
similar to the pulse sequences used in [73, 74] to remove unwanted couplings
and generate arbitrary Ising-like interactions. Our refocussing technique
consists of the application of (i) a half-entangling gate (MS/2) between the
pair of active ions $(i,j)\in G$, which corresponds to $XX_{ij}(\theta/2)$ in
Eq. (3) for $\theta=\pi/2$, (ii) a $\pi$-rotation about the $Z$ axis on (all)
the spectator ions(s) $n\in neig\\{G\\}$, which corresponds to $Z_{n}(\theta)$
in Eq. (1) with $\theta=\pi$. (iii) A second half-entangling gate (MS/2) on
the active ions, and (iv) final $\pi$-rotation(s) about the $Z$ axis of the
spectator ion(s). It is straightforward to verify that, if implemented
flawlessly, this composite sequence cancels the crosstalk interaction between
gate and spectator qubits, while it realises the intended MS gate on the gate
qubits.

To obtain an estimate of the remaining, uncompensated errors due to crosstalk
in the refocussing scheme, we consider a simple noise model. In this model,
errors in the single-qubit refocussing pulses suffer stochastic amplitude or
phase fluctuations, resulting in standard depolarising noise. The dynamics of
the imperfections in the $\pi$-pulses used for the refocussing can be written
as

$\dot{\rho}\simeq\sum_{i=1}^{3}\tfrac{1}{3}\expectationvalue{\epsilon_{Z}^{2}}\left(\sigma^{(i)}_{n}\rho{\sigma^{(i)}_{n}}^{\dagger}-\frac{1}{2}\left\\{{\sigma^{(i)}}^{\dagger}\sigma^{(i)}_{n},\rho\right\\}\right)$
(10)

where $\epsilon_{Z}$ is a stochastic variable with probability distribution
$p(\epsilon_{Z})$ and $\sigma^{(i)}$ are the Pauli matrices, and $\rho$
denotes the density operator of the system. This can be associated with a
single-qubit error rate of
$p_{s}=\expectationvalue{\epsilon_{Z}}^{2}=\sigma_{Z}^{2}$, assuming that the
distribution of the errors in the single-qubit $Z$ gates follow a Gaussian
distribution with standard deviation $\sigma_{Z}$, and there are no systematic
errors

$\int d\epsilon_{Z}p(\epsilon_{Z})\epsilon_{Z}=0.$ (11)

We can then obtain the following Kraus decomposition (2) for the noise channel
by integrating the dynamics of the system, and averaging over the stochastic
noise. In particular, we find that the Kraus operators will depend on the
standard deviation that characterises the residual crosstalk error.

One can show that, to leading order, the dynamics of the system of active and
spectator qubits can be described by incoherent dynamics. The leading order
Kraus operators for the residual errors of the entire refocussing sequence are

$\displaystyle K_{0}=$ $\displaystyle\sqrt{1-2p_{s}}\mathbb{I}_{n},$
$\displaystyle K_{3}=$ $\displaystyle\sqrt{2\frac{p_{s}}{3}}X_{n},$ (12)
$\displaystyle K_{1}=$ $\displaystyle\sqrt{\frac{p_{s}}{3}}Z_{n}U_{CT},$
$\displaystyle K_{4}=$ $\displaystyle\sqrt{\frac{p_{s}}{3}}Z_{n},$
$\displaystyle K_{2}=$ $\displaystyle\sqrt{\frac{p_{s}}{3}}Y_{n}U_{CT}$
$\displaystyle K_{5}=$ $\displaystyle\sqrt{\frac{p_{s}}{3}}Y_{n},$

where $U_{CT}=\exp(-i\theta\epsilon_{CT}X_{n}X_{g})$ is the unitary from the
original crosstalk error between the active qubit $g$ and the neighbour qubit
$n$. Here, the operators $K_{3}$ to $K_{6}$ correspond to standard
depolarising error channel. The operators $K_{1}$ and $K_{2}$ correspond to
two-body jump operators describing residual incoherent crosstalk between gate
and spectator ions. Note, however, that crucially the rate at which these
residual errors occur, $p_{CT}^{residual}=p_{s}/3$, is strongly suppressed by
the single-qubit error rate $p_{s}$. From this analysis, we can conclude that
the application of the refocussing scheme is expected to suppress the effects
of the crosstalk noise by a factor of the single-qubit error rate, both for
the coherent and incoherent cases. It therefore provides a powerful means to
reach crosstalk error rates for which this error source starts to have a
negligible influence on the QEC performance of the logical qubit, as our
simulations discussed in the next section show.

Figure 9: Sketch of the crosstalk refocussing scheme:, illustrated for the
compensation of crosstalk with a single neighbouring ion. a) The effect of the
crosstalk are coherent $X_{G}X_{N}$ partial entangling operations between each
of the gate ions and the spectator ion, shown in dashed lines. b) The
refocussing sequence decomposes the total operation of the MS gate into two
steps, with each MS gate corresponding to an MS gate of half the entangling
angle of the target MS gate. Between the two steps, We apply a single-qubit
$Z$ rotation ($\pi$-pulse) to the spectator ion. This will lead to the
cancellation of the coherent crosstalk built up between the gate qubits and
the spectator qubit over the entire sequence, whereas on the two gate qubits
the intended complete entangling operation (MS) is realised. c) As discussed
in the main text, residual errors in the gates employed in the refocussing
sequence are expected to lead to residual, strongly suppressed and now
incoherent residual crosstalk interactions of $X_{G}Y_{N}$ type, as well as
weak single-qubit dephasing on the spectator qubit(s). Also, use notation
$XX_{i}j(\theta/2)$ to be consistent with the introduced in the text.

###  4.2 Performance of flag-based color-code QEC with active suppression of
crosstalk errors

Figure 10: Pseudo-threshold for active suppression of crosstalk:  Here we
determine the pseudo-threshold for the Steane code using parallel measurements
of stabilisers and introducing the refocussing scheme in the simulations. We
overlap the results of the previous simulations, where we do not apply any
crosstalk suppression technique. From the results on this plot, we see that at
least four orders of magnitude reduction in the effect of crosstalk. The
additional sources of noise modelled in the simulations use the same
parameters as described in Fig. 8. The error bars for the points are smaller
than the size of the marker.

We now turn to the study of the performance of the new FT flag-qubit based QEC
protocol for parallel readout of three stabilisers [64] with the refocussing
technique implemented for the MS gates. Here, as discussed in Subsection 2.1,
we use an error model that includes a Pauli channel approximation of the MS
gate error model derived from the microscopic modelling, amplitude damping,
leakage, errors in single-qubit initialisation, gates, and measurements as
well as readout. In the simulations, the anticipated time durations are taken
into account, with errors acting on idling qubits with a rate that scales with
the corresponding duration. Additionally, and most importantly, for this
study, we include coherent crosstalk and apply the active suppression methods
discussed above.

The simulations displayed in Fig. 10 show a clear window in which the QEC-
corrected logical qubit, prepared in a logical $|+\rangle_{L}$ state,
outperforms its physical counterpart and thus leads to quantum logical
advantage. Importantly, we stress that this regime can be reached with a
significant margin for MS gate fidelities of $10^{-3}$. Additionally, and as
expected from the analysis and simulations in Sec. 3, crosstalk error rates on
the order of $10^{-3}$ have a negligible influence on the performance of the
logical qubit given the level of suppression due to refocussing, as suggested
in Sec. 4.1.

These simulations are consistent with the crosstalk suppression results found
in the previous section. Together, these show a clear path towards realising a
functional logical qubit in the regime of beneficial QEC for the static-string
ion-trap approach.

###  4.3 Performance of flag-based color-code QEC with the Stark-shift
crosstalk error model

In this section, we study the effects of crosstalk using the second model
explained in Sec. 2.1, corresponding to the application of a power imbalance
between the intensities of the red and blue sidebands to suppress the
entangling interactions of crosstalk.

We simulate the resulting crosstalk errors both as coherent $Z$ rotations or
as incoherent phase errors on neighbouring ions, with the results shown in
Fig. 11. From the simulations, we see that a pseudo-threshold can be found for
crosstalk values on the order of $10^{-5}$ for coherent crosstalk, and on the
order of $10^{-6}$ for incoherent crosstalk.

A problem for future work concerns the compensation of these new crosstalk
rotations. As it is a systematic $Z$ rotation on the neighbours and does not
create any entanglement, it could be possible to compensate it directly using
single-qubit gates. The question that remains to be answered is if the
fidelity of the single-qubit gates is good enough for this type of
compensation to be beneficial for QEC. It might be that these crosstalk levels
are on the order of magnitude of the single-qubit errors, in which case the
direct compensation of these errors might be worse than crosstalk itself.

Figure 11: Pseudo-threshold for power-imbalanced suppression of crosstalk: A
log-log graph comparison of the logical error-rates for different values of
crosstalk, using the alternative crosstalk model with ac-Stark shifts on the
neighbouring ions. Here we determine the pseudo-threshold for the Steane code
using parallel measurements of stabilisers as we vary MS-gate and crosstalk
error-rates. We show the results for preparing a logical $\left|+\right>$
state. The additional sources of noise modelled in the simulation using the
same parameters as described in Fig. 8. The error bars for the points are
smaller than the size of the marker.

##  5 Conclusion and outlook

In this work, we have presented a thorough analysis of flag-based colour-code
QEC performance in ion traps using the static single-string approach. We have
used detailed and realistic error models that take into account various
microscopic sources of noise, which we believe is crucial to provide a
realistic estimate of the expected performance of near-term trapped-ion
experiments.

In previous works [8, 67], a detailed study of the feasibility of small
topological trapped-ion QEC codes under realistic models of noise has been
presented. These studies focused on mixed-species ion crystals in micro-
fabricated traps, exploiting shuttling and ion crystal reconfigurations for
the implementation of QEC protocols. With the advent of improved laser
focusing techniques for both single and two-qubit gates, it is nowadays
possible to realize these small QEC codes in a static string approach. Note,
however, that the absence of shuttling requires a careful reconsideration of
the error model: the close proximity of spectator ions in the string during
gates addressed at active ions requires a careful consideration of crosstalk
noise, which was not considered previously [8, 67]. As shown by the results of
our numerical simulations, bare crosstalk can compromise the demonstration of
quantum logic advantage, as it places the regime of beneficial QEC within very
small values of the crosstalk error rates, which are out of the scope of
current experimental technologies. As discussed in our work, the coherent
nature of this noise allows us to design a refocusing scheme to actively
suppress crosstalk, ultimately placing the pseudo-thresholds of quantum logic
advantage within reach of near-term trapped-ion experiments. In this way, one
can benefit from the simplicity of the static-string approach, and achieve
quantum logic advantage in analogy to the shuttling-based approach [8, 67].

In conclusion, the overall message from this work on QEC with the refocussing
technique is very positive. As observed in the preceding sections, we have
confirmed, both numerically and analytically, that the refocussing technique
can dramatically suppress crosstalk noise. Therefore, placing us in a position
of very strong confidence that we may meet the goal of realising a complete
trapped-ion logical qubit in the beneficial QEC regime using the static
single-string approach.

Following recent experimental results, we also introduce and study the impact
of a second model for crosstalk noise on QEC performance, in which power
imbalance in the MS gate generates Stark-shifts on the neighbouring ions. The
results from this work indicate that this type of crosstalk has a smaller
impact on QEC performance, and a pseudo-threshold can still be found for the
anticipated experimental values even without applying any refocussing sequence
to compensate for these Stark-shifts.

We have focused our analysis on the 7-qubit colour code, using the parallel
syndrome readout proposed in Ref. [64]. Moving forward, it would be
interesting to expand the study to other codes, namely, the surface code or
higher distance colour codes. Another interesting study would be to combine
the refocussing scheme with other techniques to fight crosstalk, like the
optimisation of the order of the ions to minimise the impact of the crosstalk
events [70]. Further potential improvements can be found by operating a two-
species ion trap. This has the advantage that crosstalk between qubits encoded
in different species is absent (beyond trivial systematic light shifts that
can be compensated), due to the different electronic level structure.

##  6 Acknowledgements

We acknowledge fruitful discussions with colleagues from the eQual and AQTION
collaborations, and Davide Vodola. We thank the anonymous reviewer for useful
comments. We gratefully acknowledge support by the EU Quantum Technology
Flagship grant AQTION 820495. The research is based upon work supported by the
Office of the Director of National Intelligence (ODNI), Intelligence Advanced
Research Projects Activity (IARPA), via the U.S. Army Research Office Grant
No. W911NF-16-1- 0070. The views and conclusions contained herein are those of
the authors and should not be interpreted as necessarily representing the
official policies or endorsements, either expressed or implied, of the ODNI,
IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce
and distribute reprints for Governmental purposes notwithstanding any
copyright annotation thereon. Any opinions, findings, and conclusions or
recommendations expressed in this material are those of the author(s) and do
not necessarily reflect the view of the U.S. Army Research Office. A.B.
acknowledges support from the Ramón y Cajal program RYC-2016-20066, and
CAM/FEDER Project S2018/TCS-4342 (QUITEMAD-CM) and the Plan Nacional
Generación de Conocimiento PGC2018-095862-B-C22. We also acknowledge that
computational resources were provided by Supercomputing Wales.

## References

  * Nielsen and Chuang [2000] M. A. Nielsen and I. L. Chuang.  _Quantum Computation and Quantum Information_.  Cambridge University Press, 2000.  doi: 10.1017/CBO9780511976667.
  * Preskill [1996] John Preskill.  _Fault-Tolerant Quantum Computation_ , page 213.  1996\.  doi: 10.1142/9789812385253_0008.
  * Devoret and Schoelkopf [2013] M. H. Devoret and R. J. Schoelkopf.  Superconducting circuits for quantum information: an outlook.  _Science_ , 339(6124):1169, 2013.  doi: 10.1126/science.1231930.
  * Bruzewicz et al. [2019] Colin D. Bruzewicz, John Chiaverini, Robert McConnell, and Jeremy M. Sage.  Trapped-ion quantum computing: Progress and challenges.  _Applied Physics Reviews_ , 6, 2019.  doi: 10.1063/1.5088164.
  * Ladd et al. [2010] T. D. Ladd, F. Jelezko, R. Laflamme, Y. Nakamura, C. Monroe, and J. L. O’Brien.  Quantum computers.  _Nature_ , 464(7285):45, 2010.  doi: 10.1038/nature08812.
  * 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:302, 2014.  doi: 10.1126/science.1253742.
  * Müller et al. [2016] M. Müller, A. Rivas, E. A. Martínez, D. Nigg, P. Schindler, T. Monz, R. Blatt, and M. A. Martin-Delgado.  Iterative phase optimization of elementary quantum error correcting codes.  _Phys. Rev. X_ , 6:031030, Aug 2016.  doi: 10.1103/PhysRevX.6.031030.
  * Bermudez et al. [2017] A. Bermudez, X. Xu, R. Nigmatullin, J. O’Gorman, V. Negnevitsky, P. Schindler, T. Monz, U. G. Poschinger, C. Hempel, J. Home, F. Schmidt-Kaler, M. Biercuk, R. Blatt, S. Benjamin, and M. Müller.  Assessing the progress of trapped-ion processors towards fault-tolerant quantum computation.  _Phys. Rev. X_ , 7:041061, Dec 2017.  doi: 10.1103/PhysRevX.7.041061.
  * Schindler et al. [2011] Philipp Schindler, Julio T. Barreiro, Thomas Monz, Volckmar Nebendahl, Daniel Nigg, Michael Chwalla, Markus Hennrich, and Rainer Blatt.  Experimental repetitive quantum error correction.  _Science_ , 332(6033):1059, 2011.  doi: 10.1126/science.1203329.
  * Kielpinski et al. [2001] David Kielpinski, Amit Ben-Kish, Joe Britton, Volker Meyer, Mary Rowe, Wayne Itano, David Wineland, Charles Sackett, and Christopher Monroe.  Recent results in trapped-ion quantum computing at nist.  _Quantum Info. Comput._ , 1:113, 12 2001.  doi: 10.26421/qic1.s-12.
  * 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, 2004.  doi: 10.1038/nature03074.
  * Olsacher et al. [2020] Tobias Olsacher, Lukas Postler, Philipp Schindler, Thomas Monz, Peter Zoller, and Lukas M. Sieberer.  Scalable and parallel tweezer gates for quantum computing with long ion strings.  _PRX Quantum_ , 1:020316, Dec 2020.  doi: 10.1103/PRXQuantum.1.020316.
  * Negnevitsky et al. [2018] V. Negnevitsky, M. Marinelli, K. K. Mehta, H. Y. Lo, C. Flühmann, and J. P. Home.  Repeated multi-qubit readout and feedback with a mixed-species trapped-ion register.  _Nature_ , 563:527, 2018.  doi: 10.1038/s41586-018-0668-z.
  * Egan et al. [2020] Laird Egan, Dripto M. Debroy, Crystal Noel, Andrew Risinger, Daiwei Zhu, Debopriyo Biswas, Michael Newman, Muyuan Li, Kenneth R. Brown, Marko Cetina, and Christopher Monroe.  Fault-tolerant operation of a quantum error-correction code, 2020.  URL https://arxiv.org/abs/2009.11482.
  * Zhu et al. [2019] D. Zhu, N. M. Linke, M. Benedetti, K. A. Landsman, N. H. Nguyen, C. H. Alderete, A. Perdomo-Ortiz, N. Korda, A. Garfoot, C. Brecque, L. Egan, O. Perdomo, and C. Monroe.  Training of quantum circuits on a hybrid quantum computer.  _Science Advances_ , 5(10), 2019.  doi: 10.1126/sciadv.aaw9918.
  * Kjaergaard et al. [2020] Morten Kjaergaard, Mollie E. Schwartz, Jochen Braumüller, Philip Krantz, Joel I.-J. Wang, Simon Gustavsson, and William D. Oliver.  Superconducting qubits: Current state of play.  _Annual Review of Condensed Matter Physics_ , 11(1):369, Mar 2020.  doi: 10.1146/annurev-conmatphys-031119-050605.
  * 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, Mar 2015.  doi: 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.  _Phys. Rev. Lett._ , 117:210505, Nov 2016.  doi: 10.1103/PhysRevLett.117.210505.
  * Ofek et al. [2016a] Nissim Ofek, Andrei Petrenko, Reinier Heeres, Philip Reinhold, Zaki Leghtas, Brian Vlastakis, Yehan Liu, Luigi Frunzio, Steven Girvin, Liang Jiang, Mazyar Mirrahimi, M. Devoret, and R. Schoelkopf.  Extending the lifetime of a quantum bit with error correction in superconducting circuits.  _Nature_ , 536:441, 07 2016a.  doi: 10.1038/nature18949.
  * Andersen et al. [2020] Christian Kraglund Andersen, Ants Remm, Stefania Lazar, Sebastian Krinner, Nathan Lacroix, Graham J. Norris, Mihai Gabureac, Christopher Eichler, and Andreas Wallraff.  Repeated quantum error detection in a surface code.  _Nature Physics_ , 16:875, 2020.  doi: 10.1038/s41567-020-0920-y.
  * Zhang et al. [2012] Jingfu Zhang, Raymond Laflamme, and Dieter Suter.  Experimental implementation of encoded logical qubit operations in a perfect quantum error correcting code.  _Phys. Rev. Lett._ , 109:100503, 2012.  doi: 10.1103/PhysRevLett.109.100503.
  * Knill et al. [2001] E. Knill, R. Laflamme, R. Martinez, and C. Negrevergne.  Benchmarking quantum computers: The five-qubit error correction code.  _Phys. Rev. Lett._ , 86(18):5811, 2001.  doi: 10.1103/PhysRevLett.86.5811.
  * Waldherr et al. [2014] G. Waldherr, Y. Wang, S. Zaiser, M. Jamali, T. Schulte-Herbrüggen, H. Abe, T. Ohshima, J. Isoya, J. F. Du, P. Neumann, and et al.  Quantum error correction in a solid-state hybrid spin register.  _Nature_ , 506(7487):204, Feb 2014.  doi: 10.1038/nature12919.
  * Unden et al. [2016] Thomas Unden, Priya Balasubramanian, Daniel Louzon, Yuval Vinkler, Martin B. Plenio, Matthew Markham, Daniel Twitchen, Alastair Stacey, Igor Lovchinsky, Alexander O. Sushkov, Mikhail D. Lukin, Alex Retzker, Boris Naydenov, Liam P. McGuinness, and Fedor Jelezko.  Quantum Metrology Enhanced by Repetitive Quantum Error Correction.  _Physical Review Letters_ , 116:230502, 2016.  doi: 10.1103/PhysRevLett.116.230502.
  * Terhal et al. [2020] B M Terhal, J Conrad, and C Vuillot.  Towards scalable bosonic quantum error correction.  _Quantum Science and Technology_ , 5(4):043001, Jul 2020.  doi: 10.1088/2058-9565/ab98a5.
  * Noh and Chamberland [2020] Kyungjoo Noh and Christopher Chamberland.  Fault-tolerant bosonic quantum error correction with the surface–gottesman-kitaev-preskill code.  _Physical Review A_ , 101(1), Jan 2020.  doi: 10.1103/PhysRevA.101.012316.
  * Flühmann et al. [2019] C. Flühmann, T. L. Nguyen, M. Marinelli, V. Negnevitsky, K. Mehta, and J. P. Home.  Encoding a qubit in a trapped-ion mechanical oscillator.  _Nature_ , 566(7745):513, Feb 2019.  doi: 10.1038/s41586-019-0960-6.
  * de Neeve et al. [2020] Brennan de Neeve, Thanh Long Nguyen, Tanja Behrle, and Jonathan Home.  Error correction of a logical grid state qubit by dissipative pumping, 2020.  URL https://arxiv.org/abs/2010.09681.
  * Flühmann et al. [2018] C. Flühmann, V. Negnevitsky, M. Marinelli, and J. P. Home.  Sequential Modular Position and Momentum Measurements of a Trapped Ion Mechanical Oscillator.  _Physical Review X_ , 8:021001, 2018.  doi: 10.1103/PhysRevX.8.021001.
  * Campagne-Ibarcq et al. [2020] P. Campagne-Ibarcq, A. Eickbusch, S. Touzard, E. Zalys-Geller, N. E. Frattini, V. V. Sivak, P. Reinhold, S. Puri, S. Shankar, R. J. Schoelkopf, L. Frunzio, M. Mirrahimi, and M. H. Devoret.  Quantum error correction of a qubit encoded in grid states of an oscillator.  _Nature_ , 584:368, 2020.  doi: 10.1038/s41586-020-2603-3.
  * Ofek et al. [2016b] Nissim Ofek, Andrei Petrenko, Reinier Heeres, Philip Reinhold, Zaki Leghtas, Brian Vlastakis, Yehan Liu, Luigi Frunzio, S. M. Girvin, L. Jiang, Mazyar Mirrahimi, M. H. Devoret, and R. J. Schoelkopf.  Extending the lifetime of a quantum bit with error correction in superconducting circuits.  _Nature_ , 536:441, 2016b.  doi: 10.1038/nature18949.
  * Erhard et al. [2019] Alexander Erhard, Joel J. Wallman, Lukas Postler, Michael Meth, Roman Stricker, Esteban A. Martinez, Philipp Schindler, Thomas Monz, Joseph Emerson, and Rainer Blatt.  Characterizing large-scale quantum computers via cycle benchmarking.  _Nature Communications_ , 10(1), Nov 2019.  doi: 10.1038/s41467-019-13068-7.
  * Langer [2006] Christopher E Langer.  _High Fidelity Quantum Information Processing with Trapped Ions_.  PhD thesis, University of Colorado at Boulder, 2006.
  * Ballance et al. [2016] C. J. Ballance, T. P. Harty, N. M. Linke, M. A. Sepiol, and D. M. Lucas.  High-fidelity quantum logic gates using trapped-ion hyperfine qubits.  _Physical Review Letters_ , 117(6):060504, Aug 2016.  doi: 10.1103/PhysRevLett.117.060504.
  * Harty et al. [2016] T. P. Harty, M. A. Sepiol, D. T. C. Allcock, C. J. Ballance, J. E. Tarlton, and D. M. Lucas.  High-fidelity trapped-ion quantum logic using near-field microwaves.  _Phys. Rev. Lett._ , 117:140501, Sep 2016.  doi: 10.1103/PhysRevLett.117.140501.
  * Gaebler et al. [2016] J. P. Gaebler, T. R. Tan, Y. Lin, Y. Wan, R. Bowler, A. C. Keith, S. Glancy, K. Coakley, E. Knill, D. Leibfried, and D. J. Wineland.  High-fidelity universal gate set for ${{}^{9}\mathrm{Be}}^{+}$ ion qubits.  _Phys. Rev. Lett._ , 117:060505, Aug 2016.  doi: 10.1103/PhysRevLett.117.060505.
  * Wang et al. [2017] Ye Wang, Mark Um, Junhua Zhang, Shuoming An, Ming Lyu, Jing-Ning Zhang, L.-M. Duan, Dahyun Yum, and Kihwan Kim.  Single-qubit quantum memory exceeding ten-minute coherence time.  _Nature Photonics_ , 11(10):646, Sep 2017.  doi: 10.1038/s41566-017-0007-1.
  * Schäfer et al. [2018] V. M. Schäfer, C. J. Ballance, K. Thirumalai, L. J. Stephenson, T. G. Ballance, A. M. Steane, and D. M. Lucas.  Fast quantum logic gates with trapped-ion qubits.  _Nature_ , 555:75, 2018.  doi: 10.1038/nature25737.
  * Monroe et al. [2014] C. Monroe, R. Raussendorf, A. Ruthven, K. R. Brown, P. Maunz, L.-M. Duan, and J. Kim.  Large-scale modular quantum-computer architecture with atomic memory and photonic interconnects.  _Phys. Rev. A_ , 89:022317, Feb 2014.  doi: 10.1103/PhysRevA.89.022317.
  * Nickerson et al. [2014] Naomi H. Nickerson, Joseph F. Fitzsimons, and Simon C. Benjamin.  Freely scalable quantum technologies using cells of 5-to-50 qubits with very lossy and noisy photonic links.  _Physical Review X_ , 4:041041, 2014.  doi: 10.1103/PhysRevX.4.041041.
  * Kielpinski et al. [2002] D. Kielpinski, C. Monroe, and D. J. Wineland.  Architecture for a large-scale ion-trap quantum computer.  _Nature_ , 417(6890):709, Jun 2002.  doi: 10.1038/nature00784.
  * Vidyut et al. [2020] Kaushal Vidyut, Bjoern Lekitsch, A. Stahl, J. Hilder, Daniel Pijn, C. Schmiegelow, Alejandro Bermudez, M. Müller, Ferdinand Schmidt-Kaler, and U. Poschinger.  Shuttling-based trapped-ion quantum information processing.  _AVS Quantum Science_ , 2:014101, 02 2020.  doi: 10.1116/1.5126186.
  * Pino et al. [2021] J. M. Pino, J. M. Dreiling, C. Figgatt, J. P. Gaebler, S. A. Moses, M. S. Allman, C. H. Baldwin, M. Foss-Feig, D. Hayes, K. Mayer, and et al.  Demonstration of the trapped-ion quantum ccd computer architecture.  _Nature_ , 592(7853):209–213, Apr 2021.  doi: 10.1038/s41586-021-03318-4.
  * Kaufmann et al. [2017] H. Kaufmann, T. Ruster, C. T. Schmiegelow, M. A. Luda, V. Kaushal, J. Schulz, D. Von Lindenfels, F. Schmidt-Kaler, and U. G. Poschinger.  Scalable Creation of Long-Lived Multipartite Entanglement.  _Physical Review Letters_ , 119:150503, 2017.  doi: 10.1103/PhysRevLett.119.150503.
  * Wan et al. [2019] Yong Wan, Daniel Kienzler, Stephen D. Erickson, Karl H. Mayer, Ting Rei Tan, Jenny J. Wu, Hilma M. Vasconcelos, Scott Glancy, Emanuel Knill, David J. Wineland, Andrew C. Wilson, and Dietrich Leibfried.  Quantum gate teleportation between separated qubits in a trapped-ion processor.  _Science_ , 364(6443):875, 2019.  doi: 10.1126/science.aaw9415.
  * Landsman et al. [2019] K. A. Landsman, Y. Wu, P. H. Leung, D. Zhu, N. M. Linke, K. R. Brown, L. Duan, and C. Monroe.  Two-qubit entangling gates within arbitrarily long chains of trapped ions.  _Physical Review A_ , 100(2):022332, Aug 2019\.  doi: 10.1103/PhysRevA.100.022332.
  * Kim [2008] Sangtaek Kim.  _Acousto-Optic Devices for Optical Signal Processing and Quantum Computing_.  PhD thesis, USA, 2008.
  * Schindler [2020] Philipp Schindler.  Private communication, 2020.
  * Linke et al. [2017] Norbert M. Linke, Dmitri Maslov, Martin Roetteler, Shantanu Debnath, Caroline Figgatt, Kevin A. Landsman, Kenneth Wright, and Christopher Monroe.  Experimental comparison of two quantum computing architectures.  _Proceedings of the National Academy of Sciences_ , 114(13):3305, Mar 2017.  doi: 10.1073/pnas.1618020114.
  * Kitaev [2003] A.Yu. Kitaev.  Fault-tolerant quantum computation by anyons.  _Annals of Physics_ , 303(1):2, Jan 2003.  doi: 10.1016/s0003-4916(02)00018-0.
  * Kitaev [1997] A. Yu. Kitaev.  _Quantum Error Correction with Imperfect Gates_ , page 181.  Springer US, Boston, MA, 1997.  doi: 10.1007/978-1-4615-5923-8_19.
  * Bombin and Martin-Delgado [2006] H Bombin and M A Martin-Delgado.  Topological quantum distillation.  _Phys. Rev. Lett._ , 97(18):180501, 2006.  doi: 10.1103/PhysRevLett.97.180501.
  * Lidar and Brun [2013] Daniel A. Lidar and Todd A. Brun.  _Quantum error correction_.  Cambridge University Press, 2013.  doi: 10.1017/CBO9781139034807.
  * Terhal [2015] Barbara M. Terhal.  Quantum error correction for quantum memories.  _Reviews of Modern Physics_ , 87(2):307, Apr 2015\.  doi: 10.1103/revmodphys.87.307.
  * Steane [1996] A M Steane.  Error correcting codes in quantum theory.  _Phys. Rev. Lett._ , 77(5):793, 1996.  doi: 10.1103/PhysRevLett.77.793.
  * DiVincenzo and Shor [1996] David P. DiVincenzo and Peter W. Shor.  Fault-tolerant error correction with efficient quantum codes.  _Phys. Rev. Lett._ , 77:3260, 1996.  doi: 10.1103/PhysRevLett.77.3260.
  * DiVincenzo and Aliferis [2007] David P. DiVincenzo and Panos Aliferis.  Effective Fault-Tolerant Quantum Computation with Slow Measurements.  _Phys. Rev. Lett._ , 98:020501, 2007.  doi: 10.1103/PhysRevLett.98.020501.
  * Li et al. [2017] Muyuan Li, Mauricio Gutiérrez, Stanley E. David, Alonzo Hernandez, and Kenneth R. Brown.  Fault tolerance with bare ancillary qubits for a [[7,1,3]] code.  _Phys. Rev. A_ , 96:032341, Sep 2017.  doi: 10.1103/PhysRevA.96.032341.
  * Chamberland and Beverland [2018] Christopher Chamberland and Michael E. Beverland.  Flag fault-tolerant error correction with arbitrary distance codes.  _Quantum_ , 2:53, Feb 2018.  doi: 10.22331/q-2018-02-08-53.
  * Chamberland and Noh [2020] Christopher Chamberland and Kyungjoo Noh.  Very low overhead fault-tolerant magic state preparation using redundant ancilla encoding and flag qubits.  _npj Quantum Information_ , 6(1), Oct 2020.  doi: 10.1038/s41534-020-00319-5.
  * Chamberland et al. [2020] Christopher Chamberland, Aleksander Kubica, Theodore J Yoder, and Guanyu Zhu.  Triangular color codes on trivalent graphs with flag qubits.  _New Journal of Physics_ , 22(2):023019, Feb 2020\.  doi: 10.1088/1367-2630/ab68fd.
  * Chao and Reichardt [2018] Rui Chao and Ben W. Reichardt.  Quantum Error Correction with only Two Extra Qubits.  _Physical Review Letters_ , 121:050502, 2018.  doi: 10.1103/PhysRevLett.121.050502.
  * Chao and Reichardt [2017] Rui Chao and Ben Reichardt.  Fault-tolerant quantum computation with few qubits.  _npj Quantum Information_ , 4, 05 2017.  doi: 10.1038/s41534-018-0085-z.
  * Reichardt [2020] Ben W Reichardt.  Fault-tolerant quantum error correction for steane’s seven-qubit color code with few or no extra qubits.  _Quantum Science and Technology_ , 6(1):015007, Dec 2020.  doi: 10.1088/2058-9565/abc6f4.
  * Trout et al. [2018] Colin J Trout, Muyuan Li, Mauricio Gutiérrez, Yukai Wu, Sheng-Tao Wang, Luming Duan, and Kenneth R Brown.  Simulating the performance of a distance-3 surface code in a linear ion trap.  _New Journal of Physics_ , 20(4):043038, apr 2018\.  doi: 10.1088/1367-2630/aab341.
  * Gutiérrez et al. [2019] M. Gutiérrez, M. Müller, and A. Bermúdez.  Transversality and lattice surgery: Exploring realistic routes toward coupled logical qubits with trapped-ion quantum processors.  _Phys. Rev. A_ , 99:022330, Feb 2019.  doi: 10.1103/PhysRevA.99.022330.
  * Bermudez et al. [2019] A. Bermudez, X. Xu, M. Gutiérrez, S. C. Benjamin, and M. Müller.  Fault-tolerant protection of near-term trapped-ion topological qubits under realistic noise sources.  _Physical Review A_ , 100:062307, 2019.  doi: 10.1103/PhysRevA.100.062307.
  * Brown and Brown [2019] Natalie C. Brown and Kenneth R. Brown.  Leakage mitigation for quantum error correction using a mixed qubit scheme.  _Phys. Rev. A_ , 100:032325, Sep 2019.  doi: 10.1103/PhysRevA.100.032325.
  * Majumder et al. [2020] Swarnadeep Majumder, Leonardo Andreta de Castro, and Kenneth R. Brown.  Real-time calibration with spectator qubits.  _npj Quantum Information_ , 6(1):19, Feb 2020\.  doi: 10.1038/s41534-020-0251-y.
  * Debroy et al. [2020] Dripto M. Debroy, Muyuan Li, Shilin Huang, and Kenneth R. Brown.  Logical performance of 9 qubit compass codes in ion traps with crosstalk errors.  _Quantum Science and Technology_ , 5(3), 2020.  doi: 10.1088/2058-9565/ab7e80.
  * Sarovar et al. [2020] Mohan Sarovar, Timothy Proctor, Kenneth Rudinger, Kevin Young, Erik Nielsen, and Robin Blume-Kohout.  Detecting crosstalk errors in quantum information processors.  _Quantum_ , 4:321, 2020.  doi: 10.22331/q-2020-09-11-321.
  * Lidar [2014] Daniel A. Lidar.  _Review of Decoherence-Free Subspaces, Noiseless Subsystems, and Dynamical Decoupling_ , page 295.  John Wiley & Sons, Inc., Feb 2014.  doi: 10.1002/9781118742631.
  * Leung et al. [2000] Debbie W. Leung, Isaac L. Chuang, Fumiko Yamaguchi, and Yoshihisa Yamamoto.  Efficient implementation of coupled logic gates for quantum computation.  _Physical Review A_ , 61(4), Mar 2000.  doi: 10.1103/PhysRevA.61.042310.
  * Hayes et al. [2014] David Hayes, Steven T Flammia, and Michael J Biercuk.  Programmable quantum simulation by dynamic hamiltonian engineering.  _New Journal of Physics_ , 16(8):083027, Aug 2014\.  doi: 10.1088/1367-2630/16/8/083027.
  * C. Piltz and Wunderlich [2014] A.F. Varón C. Piltz, T. Sriarunothai and C. Wunderlich.  A trapped-ion-based quantum byte with 10-5 next-neighbour cross-talk.  _Nature Communications_ , 5(1):4679, 2014.  doi: 10.1038/ncomms5679.
  * Murali et al. [2020] Prakash Murali, David C. Mckay, Margaret Martonosi, and Ali Javadi-Abhari.  Software mitigation of crosstalk on noisy intermediate-scale quantum computers.  _Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems_ , page 1001, Mar 2020.  doi: 10.1145/3373376.3378477.
  * Vandersypen and Chuang [2005] L. M. K. Vandersypen and I. L. Chuang.  Nmr techniques for quantum control and computation.  _Reviews of Modern Physics_ , 76(4):1037, Jan 2005\.  doi: 10.1103/revmodphys.76.1037.
  * Reagor et al. [2018] Matthew Reagor, Christopher B. Osborn, Nikolas Tezak, Alexa Staley, Guenevere Prawiroatmodjo, Michael Scheer, Nasser Alidoust, Eyob A. Sete, Nicolas Didier, Marcus P. da Silva, and et al.  Demonstration of universal parametric entangling gates on a multi-qubit lattice.  _Science Advances_ , 4(2):eaao3603, Feb 2018.  doi: 10.1126/sciadv.aao3603.
  * Harper et al. [2020] Robin Harper, Steven T. Flammia, and Joel J. Wallman.  Efficient learning of quantum noise.  _Nature Physics_ , Aug 2020.  doi: 10.1038/s41567-020-0992-8.
  * Aude Craik et al. [2017] D. P. L. Aude Craik, N. M. Linke, M. A. Sepiol, T. P. Harty, J. F. Goodwin, C. J. Ballance, D. N. Stacey, A. M. Steane, D. M. Lucas, and D. T. C. Allcock.  High-fidelity spatial and polarization addressing of ca+43 qubits using near-field microwave control.  _Physical Review A_ , 95(2), Feb 2017.  doi: 10.1103/PhysRevA.95.022337.
  * Viola et al. [1999] Lorenza Viola, Emanuel Knill, and Seth Lloyd.  Dynamical decoupling of open quantum systems.  _Physical Review Letters_ , 82(12):2417, Mar 1999\.  doi: 10.1103/physrevlett.82.2417.
  * Goerz et al. [2015] Michael H. Goerz, K. Birgitta Whaley, and Christiane P. Koch.  Hybrid optimization schemes for quantum control.  _EPJ Quantum Technology_ , 2:21, 2015.  doi: 10.1140/epjqt/s40507-015-0034-0.
  * Mabuchi and Khaneja [2005] Hideo Mabuchi and Navin Khaneja.  Principles and applications of control in quantum systems.  _International Journal of Robust and Nonlinear Control_ , 15:647, 2005.  doi: 10.1002/rnc.1016.
  * Chakrabarti and Rabitz [2007] Raj Chakrabarti and Herschel Rabitz.  Quantum control landscapes.  _International Reviews in Physical Chemistry_ , 26(4):671, 2007.  doi: 10.1080/01442350701633300.
  * Wiseman and Milburn [2009] Howard M. Wiseman and Gerard J. Milburn.  _Quantum Measurement and Control_.  Cambridge University Press, 2009.  doi: 10.1017/CBO9780511813948.
  * Schindler et al. [2013] Philipp Schindler, Daniel Nigg, Thomas Monz, Julio T. Barreiro, Esteban Martinez, Shannon X. Wang, Stephan Quint, Matthias F. Brandl, Volckmar Nebendahl, Christian F. Roos, Michael Chwalla, Markus Hennrich, and Rainer Blatt.  A quantum information processor with trapped ions.  _New Journal of Physics_ , 15, 2013.  doi: 10.1088/1367-2630/15/12/123012.
  * Nägerl et al. [1999] H. C. Nägerl, D. Leibfried, H. Rohde, G. Thalhammer, J. Eschner, F. Schmidt-Kaler, and R. Blatt.  Laser addressing of individual ions in a linear ion trap.  _Phys. Rev. A_ , 60:145, Jul 1999.  doi: 10.1103/PhysRevA.60.145.
  * Mølmer and Sørensen [1999] K. Mølmer and A. Sørensen.  Multiparticle entanglement of hot trapped ions.  _Phys. Rev. Lett._ , 82(9):1835, 1999.  doi: 10.1103/PhysRevLett.82.1835.
  * Sørensen and Mølmer [1999] Anders Sørensen and Klaus Mølmer.  Quantum computation with ions in thermal motion.  _Physical Review Letters_ , 82:1971, 1999.  doi: 10.1103/PhysRevLett.82.1971.
  * Roos [2008] Christian F. Roos.  Ion trap quantum gates with amplitude-modulated laser beams.  _New Journal of Physics_ , 10, 2008.  doi: 10.1088/1367-2630/10/1/013002.
  * Nebendahl [2015] V. Nebendahl.  Optimized quantum error-correction codes for experiments.  _Phys. Rev. A_ , 91:022332, 2015.  doi: 10.1103/PhysRevA.91.022332.
  * Maslov and Roetteler [2018] Dmitri Maslov and Martin Roetteler.  Shorter stabilizer circuits via bruhat decomposition and quantum circuit transformations.  _IEEE Transactions on Information Theory_ , 64(7):4729, Jul 2018.  doi: 10.1109/TIT.2018.2825602.
  * Boykin et al. [1999] P. Oscar Boykin, Tal Mor, Matthew Pulver, Vwani Roychowdhury, and Farrokh Vatan.  On universal and fault-tolerant quantum computing: A novel basis and a new constructive proof of universality for shor’s basis.  In _Proceedings of the 40th Annual Symposium on Foundations of Computer Science_ , FOCS ’99, page 486. IEEE Computer Society, 1999.  doi: 10.1109/SFFCS.1999.814621.
  * Merrill et al. [2014] J. True Merrill, S. Charles Doret, Grahame Vittorini, J. P. Addison, and Kenneth R. Brown.  Transformed composite sequences for improved qubit addressing.  _Phys. Rev. A_ , 90:040301, Oct 2014.  doi: 10.1103/PhysRevA.90.040301.
  * Gutierrez et al. [2013] Mauricio Gutierrez, Lukas Svec, Alexander Vargo, and Kenneth R. Brown.  Approximation of real error channels by Clifford channels and Pauli measurements.  _Phys. Rev. A_ , 87:030302, 2013.  doi: 10.1103/PhysRevA.87.030302.
  * Fowler [2013] Austin G. Fowler.  Coping with qubit leakage in topological codes.  _Phys. Rev. A_ , 88:042308, Oct 2013.  doi: 10.1103/PhysRevA.88.042308.
  * Calderbank and Shor [1996] A. R. Calderbank and P. W. Shor.  Good quantum error-correcting codes exist.  _Phys. Rev. A_ , 54(2):1098, 1996.  doi: 10.1103/PhysRevA.54.1098.
  * Dennis et al. [2002] E. Dennis, A. Kitaev, A. Landahl, and Preskill J.  Topological quantum memory.  _J. Math. Phys._ , 43(9):4452, 2002.  doi: 10.1063/1.1499754.
  * Bravyi and Kitaev [2005] Sergey Bravyi and Alexei Kitaev.  Universal quantum computation with ideal clifford gates and noisy ancillas.  _Phys. Rev. A_ , 71:022316, 2005.  doi: 10.1103/PhysRevA.71.022316.
  * Landahl and Ryan-Anderson [2014] Andrew J. Landahl and Ciaran Ryan-Anderson.  Quantum computing by color-code lattice surgery, 2014.  URL https://arxiv.org/abs/1407.5103.
  * Bravyi and Cross [2015] Sergey Bravyi and Andrew Cross.  Doubled color codes, 2015.  URL https://arxiv.org/abs/1509.03239.
  * Jochym-O’Connor and Bartlett [2016] Tomas Jochym-O’Connor and Stephen D. Bartlett.  Stacked codes: Universal fault-tolerant quantum computation in a two-dimensional layout.  _Phys. Rev. A_ , 93:022323, Feb 2016.  doi: 10.1103/PhysRevA.93.022323.
  * Jones et al. [2016] Cody Jones, Peter Brooks, and Jim Harrington.  Gauge color codes in two dimensions.  _Phys. Rev. A_ , 93:052332, May 2016.  doi: 10.1103/PhysRevA.93.052332.
  * Steane [1997] A. M. Steane.  Active Stabilization, Quantum Computation, and Quantum State Synthesis.  _Phys. Rev. Lett._ , 78:2252, Mar 1997.  doi: 10.1103/PhysRevLett.78.2252.
  * Knill [2005] E. Knill.  Quantum computing with realistically noisy devices.  _Nature_ , 434:39, Mar 2005.  doi: 10.1038/nature03350.
  * Ryan-Anderson [2018a] Ciaran Ryan-Anderson.  Quantum algorithms, architecture, and error correction, 2018a.  URL https://arxiv.org/abs/1812.04735.
  * Ryan-Anderson [2018b] Ciaran Ryan-Anderson.  Pecos: Performance estimator of codes on surfaces.  https://github.com/PECOS-packages/PECOS, 2018b.
  * Steiger et al. [2018] Damian S. Steiger, Thomas Häner, and Matthias Troyer.  ProjectQ: an open source software framework for quantum computing.  _Quantum_ , 2:49, January 2018.  doi: 10.22331/q-2018-01-31-49.
  * Häner et al. [2018] Thomas Häner, Damian S Steiger, Krysta Svore, and Matthias Troyer.  A software methodology for compiling quantum programs.  _Quantum Science and Technology_ , 3(2):020501, feb 2018.  doi: 10.1088/2058-9565/aaa5cc.
  * Sørensen and Mølmer [2000] Anders Sørensen and Klaus Mølmer.  Entanglement and quantum computation with ions in thermal motion.  _Phys. Rev. A_ , 62:022311, Jul 2000.  doi: 10.1103/PhysRevA.62.022311.

##  Appendix A Microscopic error model for crosstalk

This Appendix presents a detailed microscopic description of crosstalk in
single- and two-qubit trapped-ion gates, which arise from residual
illumination of spectator ions residing in the active ions’ direct spatial
vicinity for the corresponding gate. We now discuss the microscopic modelling
of crosstalk, based on the underlying laser-ion coupling generating the gates,
which provides us with a detailed understanding of the crosstalk error
channels, both in their form and how their strength is related to the relevant
experimental parameters.

###  A.1 Coherent crosstalk in single-qubit gates

The effect of crosstalk in single-qubit gates can be modelled as follows: for
resonant rotations ($X$ or $Y$-gates, or any rotation in the equatorial plane
of the single-qubit Bloch sphere (1)), residual light on neighbouring ions
causes undesired rotations of the spectator qubits in the same basis as the
target active qubit

$\displaystyle
R_{\mathrm{eff}}(\Theta_{\mathrm{eff}}(t),\phi_{\mathrm{F}}(t))=\cos\frac{\Theta_{\mathrm{eff}}}{2}\mathbb{I}_{2}$
$\displaystyle-{\rm
i}\,\sin\frac{\Theta_{\mathrm{eff}}}{2}\left(\cos\phi\hat{X}_{\mathrm{eff}}(t)+\sin\phi\hat{Y}_{\mathrm{eff}}(t)\right),$
(13)

where we have introduced an effective rotation angle determined by the
residual attenuated intensity

$\Theta_{\mathrm{eff}}(t)=\Theta\cdot\sqrt{\frac{I_{\mathrm{r}}(t)}{\langle
I(t)\rangle}}.$ (14)

This angle fluctuates around a fraction of the target value $\Theta$, which is
selected by fixing the pulse duration and average intensity of the laser beams
$\langle I(t)\rangle$ seen by the active qubit, due to the fluctuations of the
residual intensity $I_{\rm r}(t)$ seen by the spectator, which can be
reconstructed from the experimentally measured power spectral density [67]. We
note that laser phase fluctuations $\phi+\phi_{\mathrm{F}}(t)$ occur at a much
slower timescale, and will lead to gates in a rotated basis that slightly
drifts from the target value $\phi$ as the quantum circuit proceeds, yielding

$\begin{split}\hat{X}_{\mathrm{eff}}(t)=\cos\phi_{\mathrm{F}}(t)X+\sin\phi_{\mathrm{F}}(t)Y\\\
\hat{Y}_{\mathrm{eff}}(t)=\sin\phi_{\mathrm{F}}(t)X+\cos\phi_{\mathrm{F}}(t)Y.\end{split}$
(15)

As discussed in [67], these fluctuations can be reconstructed from the power
spectral density from a laser phase lock and Ramsey measurement. Note that
crosstalk in single-qubit $Z$-rotations is quadratically smaller than that for
$X$ or $Y$ rotations, since $Z$ rotations are implemented by AC Stark shifts,
for which the effective rotation angle $\Theta_{\mathrm{eff}}$ is directly
proportional to the residual intensity.

Let us emphasise that there are well-established techniques to strongly
suppress coherent crosstalk errors in single-qubit gates, such as various
dynamical decoupling sequences. One of the most simple composite pulse
sequences to achieve “addressing error correction" has been used routinely in
ion traps, including, e.g., in the first colour code implementation
experiments (see the supplementary information of Ref. [6] for a detailed
discussion).

###  A.2  Crosstalk error channel for multi-qubit gates

In this part of the Appendix, we introduce the effective entangling crosstalk
error model for $N$-qubit MS gates, generalising [8]. We recall that the
procedure followed in [8] was to relate an analytical expression of the MS-
gate fidelity for the target GHZ-type state $\mathcal{F}=1-\epsilon_{\rm MS}$,
including various sources of errors in the experiment, to the error rate
$p_{\rm MS}$ of an effective multi-qubit quantum channel (e.g. depolarising
channel). In this way, one gathers intuition about the contribution of
physical error sources to the error rate of standard quantum channels
typically used in a QEC context, which can then serve to develop more
sophisticated models [67].

Starting from [110], we have built a microscopic model that accounts for
crosstalk an MS gate and can incorporate the crosstalk contribution
$\epsilon_{\rm ct}$ to $\epsilon_{\rm MS}$, which will affect the spectator
ions that will undergo dynamics resulting from residual couplings due the
bichromatic laser beams realising the MS gate. The various sources of error on
the spectator ions can be grouped into two main types:

(a) Coherent error contributions: In an ideal situation, with no errors from
dephasing, thermal phonon populations, or laser intensity fluctuations, an
imperfect focusing of the MS-gate beams will affect the spectator ions due to
two main sources. If the $N$-ion MS gate acts on the $\sigma^{y}$-basis with
Rabi frequency $\Omega$, it will couple to $M$ spectator ions with a residual
relative Rabi frequency $\\{\Omega_{j}/\Omega\\}_{j=1}^{M}$. The ideal
bichromatic laser-ion interaction leads to a state-dependent force on the
centre of mass (COM) mode

$H_{\rm int}=-\frac{2\Omega\eta}{\sqrt{N+M}}\tilde{J}_{y}a_{\rm COM}{\rm
e}^{-{\rm i}\omega_{\rm COM}t}\cos(\delta t)+{\rm H.c.},$ (16)

where we have introduced the Lamb-Dicke parameter $\eta$, and the opposite
detunings $\pm\delta$ of the bichromatic beams with respect to the blue- and
red-sideband transitions, each of which creates $a_{\rm COM}^{\dagger}$ or
annihilates $a_{\rm COM}$ a vibrational excitation on the COM mode
$\omega_{\rm COM}$ during the excitation of the internal state. Additionally,
we have introduced the collective spin operator

$\tilde{J}_{y}=\frac{1}{2}\sum_{i=1}^{N}\sigma_{i}^{y}+\frac{1}{2}\sum_{j=1}^{M}\frac{\Omega_{j}}{\Omega}\sigma_{j}^{y},$
(17)

which not only involves the active ions $i\in\\{1,\cdots N\\}$, but also the
spectator ions $j\in\\{1,\cdots M\\}$ with residual light coupling. The ideal
MS gate, after closing the phase-space trajectory, will induce a
$\tilde{J}_{y}^{2}$ spin-spin interaction that also involves the spectator
qubits. The dynamics will thus depart from the target fully-entangling MS-gate
operation

$\displaystyle\left|0_{1},\cdots,0_{N}\right>\otimes\left|\psi_{M}^{0}\right>\to\left|\Psi_{\rm
id}\right>=\left|{\rm GHZ}_{N}\right>\otimes\left|\psi_{M}^{0}\right>,$ (18)

which should prepare a GHZ-type state for the active ions $\left|{\rm
GHZ}_{N}\right>=\frac{1}{\sqrt{2}}\left(\left|0_{1},\cdots,0_{N}\right>-{\rm
i}({\rm i})^{N}\left|1_{1},\cdots,1_{N}\right>\right)$, and leave the
spectator qubits unaltered, e.g. in the initial state
$\left|\psi_{M}^{0}\right>=\left|0_{1},\cdots,0_{M}\right>$. Assuming that the
crosstalk is small $\Omega_{j}\ll\Omega$, it is straightforward to evaluate
how the MS gate will modify the spectator state $\left|\psi_{M}^{0}\right>$,
leading to $\mathcal{F}_{\rm ct}=1-\epsilon_{\rm ct}^{\rm MS}$, where

$\epsilon_{\rm ct}^{\rm
MS}=\frac{\pi^{2}}{4}N\sum_{j=1}^{M}\left(\frac{\Omega_{j}}{\Omega}\right)^{\\!\\!2}.$
(19)

Let us note that this crosstalk error occurs even in the absence of other
error sources (i.e. for an ideal MS gate). We now introduce and discuss, one
by one, these additional errors. The first one results from an off-resonant
carrier excitation that appears in conjunction with the above state-dependent
force of Eq. (16), namely

$H_{\rm int}=2\Omega\tilde{J}_{x}\cos(\delta t)+{\rm H.c.},$ (20)

where $\tilde{J}_{x}$ is a collective spin operator like Eq. (17), but acting
in the orthogonal $\sigma^{x}$-basis, and also containing the residual driving
of the spectator ions. Generalising the perturbative calculations of [110],
one finds that the above crosstalk error gets an additional contribution

$\epsilon_{\rm ct}^{\rm
off}=\frac{1}{2}\left(\frac{\Omega}{\delta}\right)^{2}\sum_{j=1}^{M}\left(\frac{\Omega_{j}}{\Omega}\right)^{\\!\\!2}.$
(21)

Let us note that these crosstalk error contributions are coherent in nature,
and can be undone using refocussing techniques, as discussed in Sec. 4.1. In
the following, we will discuss crosstalk errors involving dephasing noise and
thermal phonons, leading additionally to incoherent error sources that cannot
be compensated by refocussing.

(b) Incoherent error contributions: The previous error sources assume that the
laser-ion interaction only couples to the COM mode via the state-dependent
linear term. However, in practice, there are additional terms that make the
coupling deviate from this idealised limit and contribute to the error. For
instance, there will be Debye-Waller factors that make the state-dependent
force fluctuate depending on the thermal occupation of all the vibrational
modes. We then find that the infidelity due to these error source is

$\epsilon_{\rm ct}^{\rm DW}=\frac{\pi
N}{4}\sum_{n=1}^{N+M}\sum_{j=1}^{M}\left(\frac{\Omega_{j}}{\Omega}\frac{\eta^{2}_{n}}{N+M}\right)^{\\!2}(2\bar{n}_{n}+1)^{2},$
(22)

where we sum over all vibrational modes with thermal occupations $\bar{n}_{n}$
and Lamb-Dicke parameters $\eta_{n}$.

In addition to the Debye-Waller factors, the phase-space trajectories may not
close (especially for spectator modes), contributing to an incoherent error
source due to residual spin-motion entanglement. This then leads to the
following contribution to the MS-gate infidelity

$\epsilon_{\rm ct}^{\rm
loops}=\sum_{j=1}^{M}\sum_{n=2}^{N+M}\left(\frac{\Omega_{j}}{\omega_{n}}\right)^{\\!2}\left(\eta_{n}\mathcal{M}_{j,n}\right)^{2}(2\bar{n}_{n}+1),$
(23)

where $\omega_{n}$ ($\mathcal{M}_{j,n}$) stand for the eigen-frequencies
(eigen-vectors) of the remaining collective vibrational modes.

Finally, there will be another incoherent contribution stemming from the
dephasing and laser-intensity noise. The dephasing, to leading order, does not
depend on the residual intensity of the MS laser beams and contributes with

$\epsilon_{\rm ct}^{\rm deph}=2N^{2}t_{\rm g}/T_{2},$ (24)

where we have assumed that the phase noise acts collectively on the qubit
register, and the coherence time is much longer than the gate time $T_{2}\gg
t_{\rm g}$. For the laser-intensity fluctuations, characterised by a rate
$\Gamma_{I}$, we find that the spectator ions with residual illumination
suffer a crosstalk error contribution of

$\epsilon_{\rm ct}^{\rm int}=\gamma_{I}t_{\rm
g}\sum_{n}\eta_{n}^{2}(\bar{n}_{n}+\textstyle\frac{1}{2})\sum_{j}\left(\frac{\Omega_{j}}{\Omega}\right)^{\\!\\!2}.$
(25)

Let us recall that one can use an approximate expression for all these sums,
which partially simplifies the gate-infidelity expressions [110]. In any case,
it is easy to realise that the total crosstalk contribution to the MS-gate
infidelity, obtained by adding all of the above terms, can be expressed in
terms of the infidelity $\epsilon_{\rm MS}$ of the MS-gate without crosstalk
[8] as follows

$\displaystyle\epsilon^{\rm ct}_{\rm MS}=$
$\displaystyle\sum_{j=1}^{M}\left(\frac{\Omega_{j}}{\Omega}\right)^{\\!\\!2}\left(\epsilon_{\rm
MS}+\frac{\pi^{2}}{4}N+2N^{2}\frac{t_{\rm g}}{T_{2}}\right)$
$\displaystyle-2N^{2}\frac{t_{\rm g}}{T_{2}}.$ (26)

Therefore, except for the dephasing contribution, which is independent of the
residual intensity, the crosstalk contribution to the infidelity is reduced by
a small factor

$\chi=\sum_{j=1}^{M}\left(\frac{\Omega_{j}}{\Omega}\right)^{\\!2},$ (27)

due to the residual illumination of the spectator ions, which will be $\chi\ll
1$ for sufficiently-good addressing capabilities. This simple expression shows
that the crosstalk contribution of each source of error, from off-resonant
carrier to thermal phonon populations, has the same relative weight as
discussed at length for the MS gate without crosstalk [8]. All these
contributions can then be used to extract the error rate $p^{\rm ct}_{\rm MS}$
that should be fed into a particular channel, such as a depolarising channel
taking into account the crosstalk. For instance, if we restrict to a
depolarising channel combining single-qubit and two-qubit operations [8],
considering now both active and spectator ions, the corresponding quantum
channel is

$\displaystyle{\varepsilon_{\rm MS}}(\rho)$ $\displaystyle=(1-p_{\rm
MS}-p_{\rm MS}^{\rm ct})\rho$ $\displaystyle+\frac{p_{\rm MS}}{N_{\rm
MS}}\sum_{i=1}^{N}\sum_{\alpha=1,2,3}\sigma_{i}^{\alpha}\rho\sigma_{i}^{\alpha}$
$\displaystyle+\frac{p_{\rm MS}}{N_{\rm
MS}}\sum_{i_{1},i_{2}}\sum_{\alpha,\beta}\sigma_{i_{1}}^{\alpha}\sigma_{i_{2}}^{\beta}\hskip
0.86108pt\rho\hskip 0.86108pt\sigma_{i_{1}}^{\alpha}\sigma_{i_{2}}^{\beta}$
$\displaystyle+\frac{p_{\rm MS}^{\rm ct}}{N_{\rm
ct}}\sum_{j=1}^{M}\sum_{\alpha=1,2,3}\sigma_{j}^{\alpha}\rho\sigma_{j}^{\alpha}$
$\displaystyle+\frac{p_{\rm MS}}{N_{\rm
MS}}\sum_{j_{1},j_{2}}\sum_{\alpha,\beta}\sigma_{j_{1}}^{\alpha}\sigma_{j_{2}}^{\beta}\hskip
0.86108pt\rho\hskip 0.86108pt\sigma_{j_{1}}^{\alpha}\sigma_{j_{2}}^{\beta},$
(28)

where $N_{\rm MS}=15N(N-1)/2+3N$ are all possible single- and two-qubit errors
in the MS gate with $N$ active qubits, while $N_{\rm
ct}=15(N+M)(N+M-1)/2+3(N+M)$ are all possible single- and two-qubit errors in
the MS gate with $N$ active qubits and $M$ spectator qubits. The final
ingredient to relate the MS gate error rates for active $p_{\rm MS}$ and
spectator $p_{\rm MS}^{\rm ct}$ qubits is to calculate the fidelity using the
above quantum channel. One finds

$\displaystyle\mathcal{F}_{\rm MS}$ $\displaystyle=1-p_{\rm MS}\frac{N_{\rm
MS}-N(N-1)/2}{N_{\rm MS}}$ $\displaystyle p_{\rm MS}=\epsilon_{\rm
MS}\frac{N_{\rm MS}}{N_{\rm MS}-N(N-1)/2},$ (29)

which takes into account that, from all the possible $N_{\rm MS}$ single- and
two-qubit errors, the $\sigma_{i_{1}}^{z}\sigma_{i_{2}}^{z}$ errors do not
affect the target GHZ state. For the spectator ions, all the possible $N_{\rm
ct}$ errors perturb the target state, such that

$\mathcal{F}_{\rm ct}=1-p^{\rm ct}_{\rm MS}\implies p^{\rm ct}_{\rm
MS}=\epsilon^{\rm ct}_{\rm MS}.$ (30)

As a summary, we note that all of the additional errors resulting from
crosstalk in the MS gate, except for Eq. (19), yield a negligibly-small
contribution. They are either due to the dephasing (24), which is often
negligible for the short duration of the MS gate, or they are proportional to
the already-small error rate of the MS-gate weighted by the additional small
pre-factor (27). Accordingly, the leading source of crosstalk errors will stem
from the coherent contribution in Eq. (19). The present error model is useful
to make a quantitative comparison of the shuttling-based versus static-string
performance of the QEC protocols discussed in Ref. [8], assessing quantum
logic advantage with both approaches by a microscopic description of the
errors on the same footing.

###  A.3 Sophisticated crosstalk noise for two-qubit gates

As the effective error channel (A.2) shows, entangling gates involving many
qubits can break the fault-tolerance design principle, as an error in one of
the data qubits could potentially propagate to other data qubits. To minimise
this effect, we restrict the set of entangling gates in the circuits to two-
qubit MS gates. For this type of gates, the complete qubit and phonon degrees
of freedom of the two-ion system can be efficiently simulated using numerical
methods that include various sources of noise [67]. This has the advantage
that, rather than relying on analytical calculations for the state infidelity
fed onto phenomenological quantum channels, it becomes possible to extract the
exact quantum channel by numerically averaging over the stochastic noise
processes. As shown in [67], the main lesson is that the realistic channel for
a noisy 2-qubit MS gate has more structure than the highly-symmetric
depolarising channel. Unfortunately, generalising these exact numerical
simulations to include crosstalk rapidly exceeds the computing capabilities,
as each spectator ion adds one extra qubit and three additional vibrational
modes. In this part of the Appendix, however, we show how the lesson learned
from the previous calculations can be used to build a realistic and
sophisticated crosstalk error model for imperfect 2-qubit MS gates.

The crucial point is that, as emphasised at the end of the last subsection,
the leading-order contribution of crosstalk comes from the extra unitary
involving spectator qubits. This occurs due to crosstalk even for a perfect MS
gate, which would not be subjected to off-resonant carriers, intensity and
phase fluctuations, or Debye-Waller factors and residual qubit-phonon
entanglement for the additional vibrational modes. Hence, to leading order,
one may combine the microscopic error channel of the imperfect MS gate for the
active qubits [67], and the above coherent effect of crosstalk (32).

The noisy MS gate on the active qubits can be represented by the ideal
unitary, followed by a structured microscopic error channel different from
depolarising noise. In particular, $\rho\to D_{MS}(U_{MS}\rho
U_{MS}^{\dagger})$, where $U_{MS}=\frac{1}{\sqrt{2}}(\mathbb{I}_{4}-{\rm
i}X_{i_{1}}X_{i_{2}})$ is the ideal MS gate between the pair of active ions
$i_{1},i_{2}\in G$; whereas $D_{MS}(\rho)$ admits a Kraus decomposition (2)
after retaining only the most-likely operators that stem from the process-
tomography numerical reconstruction of the microscopic quantum channel [67],
namely

$D_{MS}(\rho)\to\left\\{\begin{array}[]{ll}K_{0}=\sqrt{(1-p)}\quad\mathbb{I}_{4}\\\
K_{1}=\sqrt{p\cdot 0.80}\quad X_{1}X_{2}\\\ K_{2}=\sqrt{p\cdot 0.05}\quad
Y_{1}\\\ K_{3}=\sqrt{p\cdot 0.05}\quad Y_{2}\\\ K_{4}=\sqrt{p\cdot 0.05}\quad
X_{1}Z_{2}\\\ K_{5}=\sqrt{p\cdot 0.05}\quad Z_{1}X_{2}\end{array}\right\\},$
(31)

where $p$ is the MS gate error rate, which is one of the control variables in
the simulations.

Finally, for the spectator ions, the leading-order contribution stems from the
coherent application of the MS-gate unitary due to residual light. To build a
coherent model for this error source, we consider that the residual couplings
only have visible effects on the spectator qubits that are immediate
neighbours of the active qubit pair (see the discussion in the main text).
Accordingly, the leading-order coherent crosstalk can be modelled by applying
a $X_{g}X_{n}$ rotation of angle $\theta_{c}$ onto every ion from the active
qubit pair $g\in G$ and an neighbouring spectator ion $n\in N$. This leads to
the unitary

$R_{\rm ct}(\theta)=\cos\frac{\theta_{c}(t)}{2}\mathbb{I}_{4}-{\rm
i}\sin\frac{\theta_{c}(t)}{2}X_{g}X_{n},$ (32)

This angle $\theta_{c}(t)$ is given by the fraction of the laser intensity
that illuminates the neighbouring ion, and the angle $\Theta$ of the ideal MS
gate, e.g. $\Theta=\pi/2$ for a fully-entangling MS gate, leading to

$\theta_{c}(t)=\Theta\cdot\sqrt{\frac{I_{\rm r}(t)}{\langle I(t)\rangle}}.$
(33)

As discussed previously for single-qubit crosstalk (14), the residual
intensity fluctuations could be inferred from experimental measures, or
modelled stochastically. Moreover, one could also consider how the phase
fluctuations give rise to slow drifts of the basis where the MS-gate is
applied, which can also be estimated from experimental measurements. In this
work, we will model the effects of crosstalk in coherent simulations as
coherent $X_{n}X_{g}$ rotations of angle $\theta_{c}=\epsilon_{CT}\theta$ (Eq.
4). This angle is fixed for a given crosstalk error rate and remains constant
through the simulation.

As discussed in Eq. (5) of the main text, in the Clifford approximation, this
crosstalk rotation of an angle $\theta_{c}$ corresponds to the application of
$X_{g}X_{n}$ with probability

$p_{c}=\sin^{2}\frac{\theta_{c}}{2}.$ (34)

Note that when the spectator ion is located between two active ions subjected
to the MS gate, it will receive residual radiation from both addressed beams.
This will double the residual amplitude of the field on the ion, and thus
quadruple the corresponding intensity, changing the angle of crosstalk to
twice the previous value

$\theta_{c}^{\prime}=\Theta\cdot\sqrt{\frac{4I_{\rm r}(t)}{\langle
I(t)\rangle}}=2\theta_{C}.$ (35)

Assuming that this crosstalk rotation angle is small, the effect on the
probability of crosstalk will be a factor of 4, namely

$p_{c}^{\prime}=\sin^{2}\left(\frac{\theta_{c}^{\prime}}{2}\right)=4p_{c}(1-p_{c})\approx
4p_{c}.$ (36)

In the numerical simulations, we use the parameter $p_{c}$ to analyse the
behaviour of crosstalk. From that parameter we obtain the angle of crosstalk
as $\theta_{c}=2\arcsin\sqrt{p_{c}}$. If an ion is between two gate ions, we
can use equation (36) to obtain the probability $p_{c}$ of those crosstalk
events in the incoherent simulations, or we can multiply by 2 the angle of the
crosstalk rotations in the wave-function simulations.

###  A.4 Crosstalk noise for power-imbalanced two-qubit gates

Let us now describe the second, Stark-shift crosstalk error model that arises
from the following microscopic procedure to minimise the effect of crosstalk.
As discussed previously, the state-dependent dipole force (16) underlying the
MS gate is obtained by combining a pair of bi-chromatic laser beams with
opposite detunings that drive the red- and blue-sidebands of the centre-of-
mass mode $\omega_{\rm COM}$ of the ion crystal

$\omega_{\rm L,1}=\omega_{0}+\delta,\hskip 4.30554pt\omega_{\rm
L,2}=\omega_{0}-\delta,\hskip 8.61108pt\delta\approx\omega_{\rm COM},$ (37)

where $\omega_{0}$ is the transition frequency between the two-qubit states.
Additionally, in order to arrive to Eq. (16), both laser beams have the same
intensity, leading to $\Omega_{1}=\Omega_{2}=:\Omega$. In case the intensities
of the red- and blue-sidebands differ, one would obtain an additional
differential ac-Stark shift

$H_{\rm ac}=\sum_{i=1}^{N}\frac{\Omega_{\rm 1}^{2}-\Omega_{\rm
2}^{2}}{4|\delta|}\sigma_{i}^{z}+\sum_{j=1}^{M}\frac{\Omega_{\rm
1,j}^{2}-\Omega_{\rm 2,j}^{2}}{4|\delta|}\sigma_{j}^{z},$ (38)

which would differ for active and spectator ions since they are subjected to
different laser intensities and thus
$\Omega_{1}\gg\Omega_{1,j},\Omega_{2}\gg\Omega_{2,j}$. To cope with these
shifts, one may modify the resonance conditions (37) to

$\displaystyle\omega_{\rm L,1}=$ $\displaystyle\omega_{0}+\frac{\Omega_{\rm
1}^{2}-\Omega_{\rm 2}^{2}}{2|\delta|}+\delta,\hskip 4.30554pt$
$\displaystyle\omega_{\rm L,2}=$ $\displaystyle\omega_{0}+\frac{\Omega_{\rm
1}^{2}-\Omega_{\rm 2}^{2}}{2|\delta|}-\delta,$ (39)

to obtain again a state-dependent dipole force (16). However, note, that the
spectator ions suffer a much smaller ac-Stark shift as they only see a small
fraction of the laser light. Accordingly, their corresponding blue- and red-
sidebands will no longer be nearly-resonant. As a consequence, the collective
spin operator (17) becomes

$\tilde{J}_{y}(t)=\frac{1}{2}\sum_{i=1}^{N}\sigma_{i}^{y}+\frac{{\rm
i}}{2}\sum_{j=1}^{M}\frac{\Omega_{j}}{\Omega}\left(-\sigma_{j}^{+}{\rm
e}^{{\rm i}\Delta t}+\sigma_{j}^{-}{\rm e}^{-{\rm i}\Delta t}\right)$ (40)

such that the contribution that depends on the spectator qubits rotates
rapidly with a frequency $\Delta$ that scales with the difference of laser
intensities seen by the active and spectator ions. Making sure that the power
imbalance has the correct order of magnitude, these spectator terms will be
far off-resonant, such that the MS gate will not entangle the spectator ions.

According to this discussion, we can restrict the collective operator to the
active qubits

$\tilde{J}_{y}(t)=\frac{1}{2}\sum_{i=1}^{N}\sigma_{i}^{y},$ (41)

and model the effect on the off-resonant spectator ions via the residual ac-
Stark shift

$H_{\rm ac}=\sum_{j=1}^{M}\frac{\Omega_{\rm 1,j}^{2}-\Omega_{\rm
2,j}^{2}}{4|\delta|}\sigma_{j}^{z}.$ (42)

Following a similar reasoning as in the above subsection, the presence of
these crosstalk ac-Stark shifts and the modified resonance conditions (39) can
lead to additional error sources in the MS gate, e.g. intensity fluctuations
can now lead to residual qubit-phonon entanglement. However, all these
crosstalk effects will be proportional to the already-small MS-gate error via
an additional small parameter that scales with $(\omega_{j}\Omega)^{2}\ll 1$.
Hence, to leading order, we can again consider the imperfect MS gate on the
pair of active qubits (31), whereas the spectator qubits evolve coherently
under the residual ac-Stark shifts (42), the strength of which may vary due to
intensity fluctuations. Note that these systematic AC Stark shifts can be
determined and experimentally compensated for by, e.g., adjusting the phases
of all subsequent gates on the spectator ions.

On our numerical simulations, we fix the crosstalk error rate to be constant
through the circuit simulation. We model these errors as in Eq. (7) for the
coherent simulations, and as the Kraus map in Eq. (8) for the incoherent
simulations.

###  A.5 Crosstalk noise from scattered photons during the measurements

During the measurement of an ion, we use a laser resonant with a transition
that drives the $\left|0\right>$ state to a metastable state. If the ion was
in the $\left|0\right>$ state, it will scatter photons from that transition in
all directions, allowing us to detect it and differentiate the state from the
dark $\left|1\right>$ state. The scattered photons from a measured
$\left|0\right>$ state can reach other ions in the ion string, potentially
disturbing their quantum state. To avoid this problem, it is possible to apply
spectroscopic decoupling pulses on the neighboring ions. During this process,
the population in the $\left|0\right>$ state is temporarily displaced to a
different stable state from the ion energy levels using coherent pulses (See
Fig. 12). In this way, the information stored in the qubit will not be
affected by scattered photons from other measured ions. Therefore, we can
neglect any effects from measurement crosstalk in our simulations. Further
information on the topic can be found in [6].

Figure 12:  Qubit measurement and spectroscopic decoupling. a) During the
measurement, a laser drives a transition from the $\left|0\right>$ state to a
metastable state with a fast decay. If the $\left|0\right>$ state is measured,
the ion scatters photons in all directions, potentially affecting the
neighboring ions. b) To avoid this crosstalk noise, spectroscopic decoupling
pulses can shift the population in the $\left|0\right>$ state to a different
energy level without a resonant transition at the frequency of the scattered
photons. The original state can be recovered with another pulse sequence,
preserving the original superposition. c) Sketch of the ion string.

##  Appendix B Details on the model for other error sources

###  B.1 Leakage and amplitude damping

The leakage process is a non-unital error channel that describes decay from
the excited state to a leaked state outside of the computational basis. This
noise changes the gates and measurements applied to the qubit [67].

For single-qubit gates, the lasers will only cause an off-resonant ac-Stark
shift if the qubit is in the $\left|L\right>$ state. As there is no coherence
between the $\left|L\right>$ state and the states in the computational basis,
the effects of the single-qubit gates can be neglected.

For the two-qubit MS gate, we can consider two cases. If both of the qubits
have leaked, the lasers will be highly off-resonant, and this will lead to ac-
Stark shifts on the leaked qubits that can be neglected as in the single-qubit
gate case. If only one of the qubits has leaked, the lasers will still be
near-resonant with the sidebands of the unleaked qubit and its state will
evolve realising a trajectory in phase space. During this trajectory, the spin
of the qubit is entangled with the motional modes of the ion string, but the
timing of the gate guarantees that the phase-space trajectory will be closed
at the end of the pulse. To leading order, the evolution of this unleaked
qubit is equivalent to the identity operator.

As for the measurements, the result will be confused with the ground state
$\left|0\right>$, as the fluorescent measurement is not able to distinguish
between $\left|0\right>$ and $\left|L\right>$ [86].

The evolution of this system can be described by the Kraus map with the
following Kraus operators:

$\varepsilon_{AD}=\left\\{\begin{array}[]{ll}E_{A0}=\left|0\right>\left<0\right|+\left|L\right>\left<L\right|+\sqrt{1-\gamma}\left|1\right>\left<1\right|\\\
E_{A1}=\sqrt{\gamma_{d}}\left|0\right>\left<1\right|\\\
E_{A2}=\sqrt{\gamma_{l}}\left|L\right>\left<1\right|\end{array}\right.$ (43)

where

$\gamma_{d}=\frac{\Gamma_{d}}{\Gamma}\left(1-e^{-\Gamma
t}\right),\quad\gamma_{l}=\frac{\Gamma_{l}}{\Gamma}\left(1-e^{-\Gamma
t}\right),$ (44)

and $\gamma=\gamma_{d}+\gamma_{l}$.

For the ion trap setup, $T_{1}=1/\Gamma=1.1s$ for 40Ca+ ions, and
$\frac{\Gamma_{l}}{\Gamma_{d}}=\frac{4}{9}$. In the numerical simulations, we
use a Clifford approximation for this channel, as described in Eq. (9).

These effects can be a problem, as they will change the effect of the circuit
and affect the measurement results. In a QEC cycle in which we measure the
stabilisers to obtain the syndrome, it can lead to an incorrect result that
will affect the correction applied to the state.

To correct it, we need to apply first a leakage repumping sequence, in which
we reset the qubit to the computational basis, and then we can apply a round
of QEC.

###  B.2 Leakage repumping

When a leakage error happens, and a qubit decays out of the code space to the
leaked state, this transition is not detected. Therefore, we need to correct
possible leakage errors that might occur on the qubits without measuring them,
in a way that will to lowest order not affect the state of the qubit if there
has not been any leakage event.

Using the leakage repumping sequence described in Fig. 13, we can bring the
population in the leaked state back to the code space, while protecting the
population and coherences in the code space if there was no leakage. This is
achieved by first spectroscopically decoupling (hiding) the population in the
excited state by swapping it to the leaked state. Then, we apply a pulse that
would bring any population in the leaked state (that is now occupying the
excited state) to a metastable state that will rapidly decay to either the
leaked state or the ground state. Finally, the last pulse will bring the
population in the leaked state, where the initial population in
$\left|1\right>$ was hidden, back to the excited state.

The total effect of this pulse sequence is equivalent to identity if the qubit
was not leaked, as both the population and coherences remain protected. If the
qubit had leaked, however, then it will be effectively reinitialised to either
the ground or the excited state. In that case, the next round of QEC is
expected to be able to correct that error.

Figure 13: Leakage repumping sequence: a) initial state, where the initial
populations are represented by the coloured circles. b) We apply a $\pi$ pulse
between the states $\left|1\right>$ and $\left|L\right>$, swapping the
populations. c) We apply a pulse between the $\left|1\right>$ state and a
metastable state, that will rapidly decay to either $\left|L\right>$ or
$\left|0\right>$. d) A final $\pi$ pulse swaps the population in
$\left|L\right>$ to $\left|1\right>$.

###  B.3 Leakage repumping errors.

The leakage repumping sequence relies on single-qubit pulses that are
susceptible to errors. We can do a simple estimate of the errors that can
happen during the process and the final result on the qubit by checking the
effects of single errors in the pulses. To this end, we begin in a state that
is either on the leaked state $\left|L\right>$ or in the computational
subspace. Then, we assume an error in one of the three single-qubit gates
involved in the sequence, which are events that will appear with probability
$p_{sg}$.

Let us follow the case in which the initial state was in the $\left|L\right>$
state (red circle in figure 13). If an error happened on the first gate, some
of the population in the leaked state might remain leaked during the rest of
the process. Following the evolution of that population, we can see that the
following pulses will still bring the population back to the code space. In
this case, that error event does not lead to an error, and the leakage
repumping sequence works. If an error happens on the second gate, some
population in the $\left|1\right>$ state will remain there, and the last pulse
will bring that population to the $\left|L\right>$ leaked state. This process
will happen with probability $p_{sg}$ and is equivalent to leakage. We obtain
the same result if the error happens in the last pulse of the sequence, in
which the population in the $\left|L\right>$ leaked state will remain leaked.

Let us examine now the case in which the initial state was in the
computational subspace. If the error occurs in the first pulse, some of the
population that was initially in the $\left|1\right>$ state will end up being
reassigned at random with probability $\frac{1}{2}$ to either $\left|0\right>$
or $\left|1\right>$ in the second pulse. This event will occur with
probability $p_{sg}$, and we consider the result as dephasing (as the decay
will destroy the coherences in the state) with probability $p_{sg}/2$ or
amplitude damping with $p_{sg}/2$. If we place the error in the second pulse,
there will be no consequences as the initial population in the leaked state
was zero. However, an error in the last pulse can lead to leakage with
probability $p_{sg}$.

This can be summarised in:

  1. 1.

If the qubit was leaked: we have a probability of twice the single gate error
probability $2p_{sg}$ to bring the qubit back to the leaked state.

  2. 2.

If the qubit was not leaked: then, with probability $p_{sg}$ it can end in the
leaked state, with $p_{sg}/2$ it can suffer amplitude damping and with
$p_{sg}/2$ it can suffer dephasing.

##  Appendix C Details on the numerical simulations.

In the numerical simulations used to generate the plots shown in the paper, we
used both coherent and incoherent simulations, as indicated on each figure. As
stated in the main text, we use the open-source software PECOS [106, 107] as
the platform to run the simulations. Incoherent simulations are implemented
using the stabiliser simulator included in PECOS, while the coherent
simulations are implemented using the state-vector simulator from ProjectQ
[108, 109] as a backend to PECOS.

To compute the logical error rates in Figs. 8, 10, and 11, we use standard
Monte Carlo sampling: we generate an error configuration according to the
error model, and run the QEC round to obtain a final result of successful
recovery or failure event. The repetition of this process allows us to obtain
an estimate of the logical error probability for a given set of error
parameters.

To obtain the error bar of each estimate, we use the error from the binomial
distribution $err=\sqrt{p_{log}(1-p_{log})/n}$. The dependence of the error on
the logical error rate $p_{log}$ implies that a larger number of samples is
required for the low $p_{log}$ regime. Therefore, we use a different number of
samples for each point in the figures, ranging from $10^{5}$ to $10^{7}$
samples per point, until the error bars are smaller than the markers used in
the plots.

The error model from the simulations of Fig. 7 contains only crosstalk events.
For the coherent simulations, this implies the application of additional
coherent rotations after every MS gate. These events are not random, but a
systematic error. Therefore, the only stochastic process in this simulation is
the process of measuring, where the wave function is partially collapsed.
Since the total number measurement events for the worst case scenario is only
12 (measuring the 6 stabilisers twice), it is possible to simulate
individually each measurement outcome path and compute analytically from the