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.


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.
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 (REF )), residual light on neighbouring ions causes undesired rotations of the spectator qubits in the same basis as the target active qubit
\(& R_\mathrm {eff}(\Theta _\mathrm {eff}(t), \phi _\mathrm {F}(t)) = \cos \frac{\Theta _\mathrm {eff}}{2} \mathbb {I}_2 \nonumber \\& - {\rm i}\, \sin \frac{\Theta _\mathrm {eff}}{2} \left( \cos \phi \hat{X}_\mathrm {eff}(t) + \sin \phi \hat{Y}_\mathrm {eff}(t) \right),\) 
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 }}.\) 
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 [1]}. 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}\) 
As discussed in [1]}, 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. [3]} for a detailed discussion).

 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 [4]}. We recall that the procedure followed in [4]} 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 [1]}.
Starting from [7]}, 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 \(\lbrace \Omega _j/\Omega \rbrace _{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}_ya_{\rm COM}{\rm e}^{-{\rm i}\omega _{\rm COM}t}\cos (\delta t)+{\rm H.c.},\) 
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,\) 
which not only involves the active ions \(i\in \lbrace 1,\cdots N\rbrace \) , but also the spectator ions \(j\in \lbrace 1,\cdots M\rbrace \)  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
\(&\left|0_1,\cdots ,0_N\right>\otimes \left|\psi _M^0\right>\rightarrow \left|\Psi _{\rm id}\right>=\left|{\rm GHZ}_N\right>\otimes \left|\psi _M^0\right>,\) 

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}.\) 
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. (REF ), namely
\(H_{\rm int}=2\Omega \tilde{J}_x\cos (\delta t)+{\rm H.c.},\) 
where \(\tilde{J}_x\)  is a collective spin operator like Eq. (REF ), but acting in the orthogonal \(\sigma ^x\) -basis, and also containing the residual driving of the spectator ions.
Generalising the perturbative calculations of [7]}, 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}.\) 
Let us note that these crosstalk error contributions are coherent in nature, and can be undone using refocussing techniques, as discussed in Sec. REF . 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,\) 
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),\) 
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^2t_{\rm g}/T_2,\) 
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 _It_{\rm g}\sum _n\eta _n^2(\bar{n}_n+\textstyle \frac{1}{2})\sum _j\left(\frac{\Omega _j}{\Omega }\right)^{\!\!2}.\) 
Let us recall that one can use an approximate expression for all these sums, which partially simplifies the gate-infidelity expressions [7]}. 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 [4]} as follows
\(\epsilon ^{\rm ct}_{\rm MS}=&\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)\nonumber \\&-2N^2\frac{t_{\rm g}}{T_2}.\) 
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},\) 
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 [4]}. 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 [4]}, considering now both active and spectator ions, the corresponding quantum channel is
\({\varepsilon _{\rm MS}}(\rho )&=(1-p_{\rm MS}-p_{\rm MS}^{\rm ct})\rho \nonumber \\&+\frac{p_{\rm MS}}{N_{\rm MS}}\sum _{i=1}^{N}\sum _{\alpha =1,2,3}\sigma _{i}^\alpha \rho \sigma _{i}^\alpha \nonumber \\&+\frac{p_{\rm MS}}{N_{\rm MS}}\sum _{i_1, i_2}\sum _{\alpha ,\beta }\sigma _{i_1}^\alpha \sigma _{i_2}^\beta \hspace{0.84998pt}\rho \hspace{0.84998pt}\sigma _{i_1}^\alpha \sigma _{i_2}^\beta \nonumber \\&+\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 \nonumber \\&+\frac{p_{\rm MS}}{N_{\rm MS}}\sum _{j_1, j_2}\sum _{\alpha ,\beta }\sigma _{j_1}^\alpha \sigma _{j_2}^\beta \hspace{0.84998pt}\rho \hspace{0.84998pt}\sigma _{j_1}^\alpha \sigma _{j_2}^\beta ,\) 
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
\(\mathcal {F}_{\rm MS}&=1-p_{\rm MS}\frac{N_{\rm MS}-N(N-1)/2}{N_{\rm MS}} \nonumber \\& p_{\rm MS}=\epsilon _{\rm MS}\frac{N_{\rm MS}}{N_{\rm MS}-N(N-1)/2},\) 
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}\Rightarrow p^{\rm ct}_{\rm MS}=\epsilon ^{\rm ct}_{\rm MS}.\) 
As a summary, we note that all of the additional errors resulting from crosstalk in the MS gate, except for Eq. (REF ), yield a negligibly-small contribution. They are either due to the dephasing (REF ), 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 (REF ). Accordingly, the leading source of crosstalk errors will stem from the coherent contribution in Eq. (REF ). 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. [4]}, assessing quantum logic advantage with both approaches by a microscopic description of the errors on the same footing.

Sophisticated crosstalk noise for two-qubit gates
As the effective error channel (REF ) 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 [1]}. 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 [1]}, 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 [1]}, and the above coherent effect of crosstalk (REF ).
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 \rightarrow 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 (REF ) after retaining only the most-likely operators that stem from the process-tomography numerical reconstruction of the microscopic quantum channel [1]}, namely
\(D_{MS}(\rho ) \rightarrow \left\lbrace  \begin{array}{ll}K_{0} =\sqrt{(1-p)}\quad \mathbb {I}_4\\K_{1} =\sqrt{p \cdot 0.80} \quad X_1X_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_1Z_2\\K_{5} =\sqrt{p \cdot 0.05} \quad Z_1X_2 \end{array} \right\rbrace ,\) 
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_gX_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_gX_n,\) 
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 }}.\) 
As discussed previously for single-qubit crosstalk (REF ), 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_nX_g\)  rotations of angle \(\theta _c = \epsilon _{CT} \theta \)  (Eq. REF ). This angle is fixed for a given crosstalk error rate and remains constant through the simulation.
As discussed in Eq. (REF ) of the main text, in the Clifford approximation, this crosstalk rotation of an angle \(\theta _c\)  corresponds to the application of \(X_gX_n\)  with probability
\(p_c = \sin ^2\frac{\theta _c}{2}.\) 
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.\) 
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}.\) 
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 (REF ) 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.

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 (REF ) 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 , \hspace{4.25pt} \omega _{\rm L,2}=\omega _0-\delta ,\hspace{8.5pt} \delta \approx \omega _{\rm COM},\) 
where \(\omega _0\)  is the transition frequency between the two-qubit states. Additionally, in order to arrive to Eq. (REF ), 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,\) 
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 (REF ) to
\(\omega _{\rm L,1}=&\omega _0+\frac{\Omega _{\rm 1}^2-\Omega _{\rm 2}^2}{2|\delta |}+\delta , \hspace{4.25pt} \nonumber \\ \omega _{\rm L,2}=&\omega _0+\frac{\Omega _{\rm 1}^2-\Omega _{\rm 2}^2}{2|\delta |}-\delta ,\) 
to obtain again a state-dependent dipole force (REF ). 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 (REF ) 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)\) 
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,\) 
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.\) 
Following a similar reasoning as in the above subsection, the presence of these crosstalk ac-Stark shifts and the modified resonance conditions (REF ) 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 (REF ), whereas the spectator qubits evolve coherently under the residual ac-Stark shifts (REF ), 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. (REF ) for the coherent simulations, and as the Kraus map in Eq. (REF ) for the incoherent simulations.

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. REF ). 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 [3]}.
<FIGURE>
Details on the model for other error sources
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 [1]}.
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>\)  [20]}.
The evolution of this system can be described by the Kraus map with the following Kraus operators:
\(\varepsilon _{AD} = \left\lbrace  \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.\) 
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),\) 
and \(\gamma = \gamma _d + \gamma _l\) .
For the ion trap setup, \(T_1 =1/\Gamma = 1.1s\)  for \(^{40}\) Ca\(^{+}\)  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. (REF ).
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.

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. REF , 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>
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 REF ).
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:

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.

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.


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 [21]}, [22]} 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 [23]}, [24]} as a backend to PECOS.
To compute the logical error rates in Figs. REF , REF , and REF , 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. REF  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 wave function the resulting logical error probability. To compute the total logical error probability, we can sum the result of each path, weighted by the probability of that measurement combination:
\(p_{Logical} = \sum _{j}^{2^{12}} \prod _i m_i^{(j)} p_L(\lbrace m_i\rbrace )_j)\) 
Here, \(m_i\)  is the outcome of a measurement in the \(i^{th}\)  measurement, \(\lbrace m_i\rbrace _j\)  is a combination of measurement outcomes (or measurement path) and \(p_L(\lbrace m_i\rbrace )_j)\)  is the logical error probability for the resulting state after path \(j\) . Following this alternative, exhaustive sampling of all measurement outcomes, we can accurately estimate the logical error probability for a given crosstalk value using only \(2^{12}\)  simulations, independently of the crosstalk error amplitude.
