Eq. (4.7). After evolving the chains for time $t$, the recovery map
$\mathcal{R}_{P}^{(4)}$ is applied at the receiver’s site of the four spin
chains. The final state at the receiver’s end after the QEC protocol is
obtained as,

$\rho_{\rm
rec}=\sum_{i,j}R^{(4)}_{j}E^{(4)}_{i}\rho_{\rm{enc}}\left(E^{(4)}_{i}\right)^{\dagger}\left(R^{(4)}_{j}\right)^{\dagger},$

with the Kraus operators $R^{(4)}_{i}$ given by,

$R^{(4)}_{i}=P\small{\left(E^{(4)}_{i}\right)^{\dagger}}\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}.$ (4.14)

As usual, $P\equiv|0_{L}\rangle\langle 0_{L}|+|1_{L}\rangle\langle 1_{L}|$ is
the projector onto the $4$-qubit space described in Eq. (4.3). The fidelity of
the $4$-chain quantum state transfer protocol is then given by,

$F^{2}_{\rm
min}\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4},\mathcal{C}\right)\equiv\min_{a,b}\langle\psi_{\rm enc}|\rho_{\rm
rec}|\psi_{\rm enc}\rangle.,$

where the minimization is over all states in the codespace $\mathcal{C}$. As
before, pretty good transfer is achieved when the worst-case fidelity is high,
that is, $F^{2}_{\rm
min}\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4},\mathcal{C}\right)\geq 1-\epsilon$, for $\epsilon>0$. We now present a
bound on the fidelity of state transfer using our adaptive QEC protocol, in
terms of the transition amplitude $f^{N}_{r,s,}(t)$.

######  Theorem 3.

The fidelity of quantum state transfer from site $s$ to site $r$ under a spin-
conserving Hamiltonian as in Eq. (4.1), using the $4$-qubit code $\mathcal{C}$
and adaptive recovery $\mathcal{R}_{P}^{(4)}$ at time $t$, is given by,

$F_{\rm
min}^{2}\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4},\mathcal{C}\right)\approx 1-\frac{7p^{2}}{4}+O(p^{3}),$ (4.15)

where $p=1-|f_{r,s}^{N}(t)|^{2}$.

###### Proof.

We first rewrite the Kraus operators given in Eq. (4.7), as,

$\displaystyle E_{0}$ $\displaystyle=$ $\displaystyle|0\rangle\langle
0|+|f_{r,s}^{N}(t)|e^{i\Theta}|1\rangle\langle 1|$ $\displaystyle E_{1}$
$\displaystyle=$ $\displaystyle|0\rangle\langle
1|\sqrt{1-|f_{r,s}^{N}(t)|^{2}},$

where, $|f_{r,s}^{N}(t)|$ and $\Theta$ are the absolute value and phase of the
complex-valued transition amplitude $f_{r,s}^{N}(t)$. The state after the
$4$-qubit recovery map is then given by,

$\rho_{\rm
rec}=\left(\small{\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4}}\right)\left(\rho_{\rm enc}\right).$

The composite map
$\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4}\right)$ comprising noise and recovery has Kraus operators of the form,

$\small{P\left(E^{(4)}_{j}\right)^{\dagger}}\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}E^{(4)}_{i}P.$ (4.16)

The key step in obtaining the desired fidelity is to show that the Kraus
operators of the composite map written above are independent of $\Theta$.
First, we write out $\small{\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}}$ in the (standard) computational basis of the $4$-qubit space.

$\displaystyle\small{\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}}=\sum_{i=1}^{16}\mathcal{G}_{i}|i\rangle\langle
i|+e^{-4i\Theta}\mathcal{G}_{17}|0000\rangle\langle 1111|$ $\displaystyle+$
$\displaystyle e^{i4\Theta}\mathcal{G}_{17}|1111\rangle\langle
0000|+\mathcal{G}_{18}(|1100\rangle\langle 0011|+|0011\rangle\langle 1100|),$

where $\\{\mathcal{G}_{i}\\}$ are polynomial functions of the transition
amplitude $|f_{r,s}^{N}(t)|$. The $\Theta$-dependence in this pseudo-inverse
operator occurs only in the span of $\\{|0000\rangle,|1111\rangle\\}$. Since
$\small{\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P)^{-1/2}}$ is sandwiched
between the Kraus operators of the $4$-qubit channel and their adjoints, we
also write down the Kraus operators $\\{E^{(4)}_{i}\\}$ in the computational
basis. Then, an explicit computation reveals that the $\Theta$-dependence gets
conjugated out for each of the Kraus operators in Eq. (4.16). We refer to
Appendix B.1 for the details of this calculation. Furthermore, we also prove a
general theorem that states that
$\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes 4}$ is
independent of $\Theta$ for any choice of the $\mathcal{C}$ $\in$ $\
\mathcal{H}_{2}^{\otimes 4}$ in Appendix B.2.

Hence the final state after noise and recovery $\rho_{\rm rec}$ can be
expressed as a linear sum of terms that are independent of $\Theta$. Since the
parameter $\Theta$ is effectively suppressed, the fidelity after using
$4$-qubit code and the universal recovery in Eq. (4.7), is purely a function
of $p=1-|f_{r,s}^{N}(t)|^{2}$.

The fidelity corresponding to the initial state $|\psi_{\rm
enc}\rangle=a|0_{L}\rangle+b|1_{L}\rangle$ can thus be obtained as,

$\displaystyle
F^{2}(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4},\mathcal{C})$ (4.17) $\displaystyle=$ $\displaystyle
1-p^{2}\left((|a|^{2}-|b|^{2})^{2}-((ba^{*})^{2}+(ab^{*})^{2})+5|a|^{2}|b|^{2}\right)$
$\displaystyle+\,O(p^{3}),$

where $O(p^{3})$ refers to terms of order $p^{3}$ and higher. Parameterizing
$a$ and $b$ as $a=\cos{\frac{\theta}{2}}$,
$b=e^{-i\phi}\sin{\frac{\theta}{2}}$, the fidelity attains its minimum value
at $\\{\theta,\phi\\}=\\{\frac{(2n+1)\pi}{2},\frac{(2n+1)\pi}{2}\\}$
($n=1,2,\ldots$), so that the worst-case fidelity over the $4$-qubit code
$\mathcal{C}$ is given by,

$F_{\rm
min}^{2}\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4},\mathcal{C}\right)\approx 1-\frac{7p^{2}}{4}+O(p^{3}).$

∎

Our result shows that using the adaptive recovery in conjunction with the
approximate code leads to a fidelity that is independent of the phase $\Theta$
of the complex noise parameter $f^{N}_{r,s}(t)$. Thus, to optimize the
fidelity of state transfer between the $s^{\rm th}$ and $r^{\rm th}$ site of a
chain of $N$ spins evolving according to the Hamiltonian in Eq. (4.1), we
simply need to find the time $t$ at which $|f^{N}_{r,s}(t)|^{2}$ is maximized.
Recall that the worst-case fidelity without QEC (using the single chain
protocol) is linear in the parameter $p$, as observed in Eq. (4.9). Thus we
see an $O(p)$ improvement in fidelity with QEC, as expected.

Furthermore, our estimate of the worst-case fidelity implies that so long as
the noise strength $p$ is such that $1-(7/4)p^{2}>1-p$, the adaptive QEC
protocol achieves better fidelity than the single chain protocol without QEC.
This constraints the noise strength $p$ to satisfy $0<p<(4/7)\approx 0.57$.
This in turn implies a threshold for the transition amplitude, namely,
$|f_{r,s}^{N}(t)|^{2}>0.43$, below which our adaptive QEC protocol will not
offer any improvement in the fidelity of state transfer.

###  4.4 Results for the $1$-d Heisenberg Chain

As a simple example to illustrate the performance of the adaptive QEC
protocol, we now consider a special case of the Hamiltonian in Eq. (4.1),
namely, an $N$-length, ideal Heisenberg chain, with
$J_{k}=\tilde{J}_{k}=J/2(J>0)$ and $B_{k}=0$, for all $k$. This is also often
referred to as the $XXX$-chain in the literature. Setting $J=1$ without loss
of generality, we present numerical results on the fidelity of state transfer
from the first ($s=1$) to the $N^{\rm th}$ ($r=N$) site.

Figure 4.2: Worst-case fidelity as a function of chain length $N$.

Fig. 4.2 compares the performance of state transfer protocols with and without
QEC. In particular, it compares the performance of our $4$-chain state
transfer protocol using the $4$-qubit code in [19] as well as a $4$-qubit code
given in Appendix B.3, obtained via our numerical search procedure described
in Chapter 3, with the single-chain (no QEC) protocol [34] and the $5$-chain
protocol proposed in [55]. For each $N$, we plot the fidelity of state
transfer from the $1^{\rm st}$ site to the $N^{\rm th}$ site on a $N$-length
spin chain, after a time $t^{*}$ chosen such that $|f_{N,1}^{N}(t)|$ is
maximum at $t=t^{*}$, for $0<t<4000/J$.

From the plot we see that the QEC-based protocols achieve pretty good state
transfer over longer distances than the single chain protocol. Furthermore,
using approximate QEC it is possible to achieve as high as fidelity as with
the standard $5$-qubit code, using fewer spin chains. Specifically, in the
regime of small noise parameter $p$, it is easy to compute that the worst-case
fidelity obtained using the $5$-qubit code is,

$F^{2}_{\min}\approx 1-\frac{15p^{2}}{8}+O(p^{3}).$ (4.18)

Correspondingly, a $5$-chain protocol performs better than the single chain
protocol when $0<p<(8/15)\approx 0.53$, implying that the transition amplitude
should satisfy $|f_{r,s}^{N}(t)|^{2}>0.47$, which is a higher threshold than
that required by our adaptive QEC protocol.

For the ideal Heisenberg chain, it was recently shown that [47], there always
exists a time $t$ at which $|f_{1,N}^{N}(t)|^{2}>1-\epsilon$ if and only if
the length of the chain is a power of $2$, that is, $N=2^{m}$. In other words,
pretty good state transfer is always possible between the ends of a Heisenberg
spin chain whose length $N$ is of the form $N=2^{m}(m>1)$. We may therefore
consider improving the performance of our QEC-based protocol by repeating the
error correction procedure every $2^{m}$ sites. Specifically, we can achieve
pretty good state transfer over a chain of arbitrary length $L$, by stitching
together smaller chains whose lengths are of the form $N=2^{m}$. At every
stage of the repeated QEC protocol, there are exactly $2^{m}$ interacting
spins and the rest of the spin-spin-interactions are turned off.

Figure 4.3: Worst-case fidelity using repeated QEC

Fig. 4.3 shows an example of the resulting improvement in fidelity when the
QEC protocol is repeated every $8$ sites. For comparison, we plot the worst-
case fidelity obtained by stitching together a sequence of length-$8$ chains,
without QEC. The repeated QEC protocol proceeds as follows. We first implement
our QEC protocol for an $8$-spin chain, evolving for time $t^{*}$ at which
$|f_{8,1}^{8}(t)|$ maximizes. We repeat this procedure some $k$ times, where
$k$ is the largest integer such that $8k<N$ and finally perform QEC for the
remaining $N-7k$ sites for the same waiting time $t^{*}$. Such a repeated QEC
protocol indeed enables pretty good transfer for much longer lengths, as seen
in the plot.

More generally, if $F^{2}_{\rm min}\approx 1-\alpha p^{2}$ is the fidelity of
the single-shot QEC protocol, repeating the procedure $k$ times gives us a
fidelity of $F^{2}_{\min}=1-(p_{\rm{new}})$ , with,

$\displaystyle p_{\rm{new}}=(1-(1-\alpha p^{2})^{k})$

where $p_{\rm{new}}$ is the noise parameter obtained after repeating QEC $k$
times.

###  4.5 Quantum state transfer over a disordered Heisenberg chain

Moving away from an ideal spin chain with a fixed, uniform coupling between
successive spins, we now study state transfer over a disordered $XXX$ chain,
where the spin-spin couplings are randomly drawn from some distribution. It is
well known that the presence of disorder in a $1$-d spin chain leads to the
phenomenon of localization [56] of information close to one end of the chain.
It is therefore a challenging task to identify protocols which achieve perfect
or pretty good transfer over disordered spin chains, overcoming the effects of
localization.

Past work on disordered chains has primarily focused on the $XX$ chain.
Starting with a modulated chain that admits perfect state transfer, both
random magnetic field and random couplings have been studied [51].
Alternately, an unmodulated chain with random couplings at all except the
sender and receiver sites has also been studied [50].

When viewed in the quantum channel picture, the presence of disorder becomes
an additional source of noise. The role of QEC in overcoming the effects of
disorder has been studied both for the $XX$ [53] as well as the Heisenberg
chains [55]. The QEC protocol for a noisy $XX$ chain with random couplings
involves encoding into multiple spins on a single chain using modified CSS
codes [53]. The QEC protocol in [55] encodes into multiple identical,
uncoupled chains using the standard $5$-qubit code, while also requiring
access to multiple spins at the sender and receiver ends of each of the
chains. Furthermore, the protocol based on the $5$-qubit code involves
choosing an encoding based on the phase $\Theta$ of the transition amplitude
(as explained in Sec. 4.3), which in turn is specific to the disorder
realization. This makes the QEC procedure hard to implement in a practical
sense.

Here, we show how the channel-adapted QEC procedure described in Sec. 4.3 can
be used to achieve pretty good state transfer over an $XXX$ chain with random
couplings. As before, we quantify the performance of the state transfer
protocol in terms of the fidelity between the initial and final states. When
the underlying quantum channel is stochastic, as in the case of a disordered
chain, we use the disorder-averaged worst-case fidelity $\langle F^{2}_{\rm
min}\rangle_{\delta}$, to characterize the performance of the state transfer
protocol. We say that pretty good state transfer is achieved by a certain
choice of code $\mathcal{C}$ and recovery $\mathcal{R}_{P}$ when the
corresponding disorder-averaged fidelity $\langle F^{2}_{\rm
min}\rangle_{\delta}\geq 1-\epsilon$, for some $\epsilon>0$.

We consider a disordered Heisenberg chain with couplings $J_{k}$=
$\frac{\overline{J}}{2}(1+\Delta_{k})$, where $\Delta_{k}$ are independent,
identically distributed random variables drawn from a uniform distribution
between $\left[-\delta,\delta\right]$ and $\overline{J}$ is the mean value of
the coupling strength, which we may set to $1$, without loss of generality.
Note that such a Hamiltonian conserves the total spin and hence falls within
the universality class discussed in Sec. 5.2.

Consider a state transfer protocol, where the sender wishes to transmit the
state $|\psi_{\rm in}\rangle=a|0\rangle+b|1\rangle$ from the $s^{\rm th}$ site
to the $r^{th}$ site via the natural dynamics of the chain. As before, the
final state at the receiver’s site, tracing out the other spins can be
realized as the action of a quantum channel $\widetilde{\mathcal{E}}_{AD}$,

$\rho_{\rm out}=\widetilde{\mathcal{E}}_{AD}(\rho_{\rm
in})=\sum_{k}E_{k}\rho_{\rm in}E_{k}^{\dagger},$

with the same Kraus operators $\\{E_{0},E_{1}\\}$ as in Eq. (4.7). The key
difference however is in the nature of the noise parameter $p\equiv
1-|f_{r,s}^{N}(t,\\{\Delta_{k}\\})|^{2}$: in the case of the disordered chain,
the transition amplitude $f_{r,s}^{N}(t,\\{\Delta_{k}\\})$ between site $s$
and $r$ for a chain of length $N$ allowed to evolve for a time $t$, is a
random variable whose value depends on the specific realization of the
disorder variables $\\{\Delta_{k}\\}$. The distribution of
$f_{r,s}^{N}(t,\\{\Delta_{k}\\})$ for given set of $r,s,N,t$ values depends on
the distribution over which the disorder variables $\\{\Delta_{k}\\}$ are
sampled. To illustrate our point, we specifically consider below the case
where the coupling strengths $\\{\Delta_{k}\\}$ are independently sampled from
a uniform distribution.

####  4.5.1 Transition amplitude in the presence of disorder

The Heisenberg Hamiltonian $\mathcal{H}$ with static disorder in the coupling
strengths, has the form,

$\mathcal{H}_{\rm
dis}=-\sum_{k}\frac{\overline{J}(1+\Delta_{k})}{2}(\sigma^{k}_{x}\sigma^{k+1}_{x}+\sigma^{k}_{y}\sigma^{k+1}_{y}+\sigma_{z}^{k}\sigma^{k+1}_{z}).$
(4.19)

Here, the effect of disorder is introduced via the i.i.d. random variables
$\\{\Delta_{i}\\}$ which take values over a uniform distribution between
$\left[-\delta,\delta\right]$. The quantity $\delta$ is called the disorder
strength, and $\overline{J}$ is the mean value of the coupling coefficient. We
may view the disordered Hamiltonian as a sum of the form $\mathcal{H}_{\rm
dis}=\mathcal{H}_{o}+\mathcal{H}_{\delta}$, where $\mathcal{H}_{o}$ denotes
the ideal $XXX$ Hamiltonian studied in the previous section and
$\mathcal{H}_{\delta}$ is given by,

$\mathcal{H}_{\delta}=-\frac{\overline{J}}{2}\sum_{k}\Delta_{k}\overrightarrow{\sigma^{k}}\cdot\overrightarrow{\sigma^{k+1}}.$

$\mathcal{H}_{\delta}$ captures the effect of disorder in the spin chain and
can be treated as a perturbation of the Hamiltonian $\mathcal{H}_{0}$. Since
$[\mathcal{H}_{0},\mathcal{H}_{\delta}]\neq 0$, the transition amplitude maybe
evaluated using the so-called time-ordered expansion, also referred to as the
Dyson-series [119].

Specifically, the transition amplitude between the $r^{\rm th}$ and $s^{\rm
th}$ site for the disordered Hamiltonian $\mathcal{H}_{\rm dis}$ in Eq. (4.19)
is given by (setting $\hbar=1$),

$\displaystyle f^{N}_{r,s}(t,\\{\Delta_{k}\\}\,)$ $\displaystyle=$
$\displaystyle\langle\textbf{r}|e^{-i(\mathcal{H}_{o}+\mathcal{H}_{\delta})t}|\textbf{s}\rangle$
$\displaystyle=$
$\displaystyle\langle\textbf{r}|e^{-i\mathcal{H}_{o}t}\mathcal{T}\left[\exp{\left(-i\int_{0}^{t}e^{i\mathcal{H}_{o}t^{\prime}}\,\mathcal{H_{\delta}}\,e^{-i\mathcal{H}_{o}t^{\prime}}dt^{\prime}\right)}\right]|\textbf{s}\rangle$
$\displaystyle=$ $\displaystyle
f^{N}_{r,s}(t)-i\sum_{k=1}^{N}f^{N}_{r,k}(t)\int_{0}^{t}\langle\textbf{k}|e^{i\mathcal{H}_{o}t^{\prime}}\mathcal{H}_{\delta}e^{-i\mathcal{H}_{o}t^{\prime}}|\textbf{s}\rangle
dt^{\prime}$ $\displaystyle+\;O(H_{\delta}^{2}),$

where $\mathcal{T}$ is the time-ordering operator which has been expanded to
first order in the perturbation in the final equation. As before,
$f^{N}_{r,k}(t)$ denotes the transition amplitude between the $r^{\rm th}$ and
$k^{\rm th}$ sites in the case of an ideal chain of length $N$, without
disorder.

Thus, using the time-ordered expansion, the transition amplitude in the
presence of disorder can be evaluated as a perturbation around the zero-
disorder value $f^{N}_{r,s}(t)$, of the form,

$f^{N}_{r,s}(t,\\{\Delta_{k}\\})=f^{N}_{r,s}(t)+\sum_{i=1}^{N-1}c^{N}_{i}(t)\Delta_{i}+\sum_{i,j=1}^{N-1}d^{N}_{ij}\Delta_{i}\Delta_{j}+\ldots.$
(4.20)

The explicit forms of the complex coefficients $c^{N}_{i}(t)$ are given in Eq.
(LABEL:eq:c-coeff) in Appendix B.4. A similar approach was used in [51] to
study deviations from perfect state transfer due to the presence of disorder
in an $XX$ chain.

Using the form of the transition amplitude stated in Eq. (4.20), we obtain the
distribution of real part of the transition amplitude
$x\equiv\texttt{Re}[f^{N}_{r,s}(t,\\{\Delta_{k}\\})]\,$, up to first order in
the perturbation $H_{\delta}$, as,

$\mathcal{P}^{\delta,N,t}(x)\propto\sum_{j=1}^{2^{N-1}}(-1)^{u_{j}}(q_{j})^{N-2}\,{\rm
Sign}[q_{j}],$ (4.21)

where $u_{j}\in[0,1]$ and the $Sign$ function is defined as

${\rm Sign}(x-a)=\left\\{\begin{array}[]{cc}-1,&x<a,\\\ 0,&x=a,\\\
1,&x>a.\end{array}\right.$

The functions
$q_{j}\left(x,\texttt{Re}[f^{N}_{r,s}(t)],\\{\texttt{Re}[c^{N}_{i}(t)]\\}\right)$
are linear combinations of the form,

$q_{j}\equiv
x-\texttt{Re}[f^{N}_{r,s}(t)]+\delta\sum_{i=1}^{N-1}(-1)^{r_{i}^{j}}\texttt{Re}[c^{N}_{i}(t)],$
(4.22)

where $r_{i}^{j}\in[0,1]\,\forall\,i=1,\ldots,N-1$ and
$\texttt{Re}[c^{N}_{i}(t)]$ denote the real part of the coefficients in Eq.
4.20. Since there are $N-1$ such coefficients for a spin chain of length $N$,
the sum over $i$ ranges from $1$ to $N-1$. There are $2^{N-1}$ distinct linear
combinations of the form $q_{j}$, corresponding to the $2^{N-1}$ distinct
$(N-1)$-bit binary strings parameterized by $r^{j}$, so that the sum over $j$
runs from $1$ to $2^{N-1}$. The form of the distribution is identical for the
imaginary part $\texttt{Im}[f^{N}_{r,s}(t,\\{\Delta_{k}\\})]$, with the real
parts of $\\{c^{N}_{i}(t)\\}$ and $f^{N}_{r,s}(t)$ replaced by their imaginary
parts. We refer to Eqs. (B.54), (B.56) in Appendix B.4 for a detailed
description of the distributions of the real and imaginary parts of the
disordered transition amplitude.

Figure 4.4: Distribution of $\texttt{Re}[f_{8,1}^{8}(t^{*},\\{\Delta_{k}\\})]$
for different disorder realizations, drawn from a uniform distribution with
disorder strength $\delta=0.001$.

The key salient feature we observe from calculating the distribution functions
above is that the limiting distribution in the case of no disorder
($\delta\rightarrow 0$), is indeed a delta distribution peaked around
$f^{N}_{r,s}(t)$. Furthermore, in Appendix B.4 we also explicitly evaluate the
mean and variance of $f^{N}_{r,s}(t,\\{\Delta_{k}\\})$ and show that the mean
is equal to the zero-disorder value of $f^{N}_{r,s}(t)$, up to $O(\delta^{2})$
(see Eq. B.60). The variance goes as $O(\delta^{2})$, as shown in Eq. (B.62),
making it vanishingly small in the limit of small $\delta$. This observation
leads us to propose a modified QEC protocol for state transfer over disordered
$XXX$ chains, using an adaptive recovery $\mathcal{R}_{P}^{\rm avg}$ based on
the disorder-averaged transition amplitude $\langle
f_{r,s}^{N}(t,\\{\Delta_{k}\\})\rangle_{\delta}$.

Figure 4.5: Distribution of $\texttt{Re}[f_{8,1}^{8}(t^{*},\\{\Delta_{k}\\})]$
for different disorder realizations, with disorder strength $\delta=1$.

The analysis presented thus far holds for any pair of sites $(s,r)$ on a spin
chain of length $N$. As an example, we consider the specific case of an
$8$-length chain, with $s=1$ and $r=8$. We plot the distribution of the real
part of the transition amplitude at some fixed time $t^{*}$, for disorder
strengths $\delta=0.001$ and $\delta=1$, in Figs. 4.4 and 4.5 respectively. We
see that when the disorder strength is small enough, the transition amplitude
is indeed distributed like a delta function peaked around the zero-disorder
value. For large values of $\delta$, the distribution spreads out quite a bit
and its mean also shifts closer to zero, giving rise to a very small
transition amplitude. The corresponding figures for
$\texttt{Im}[f_{8,1}^{8}(t^{*},\\{\Delta_{k}\\})]$ are presented in Appendix
B.4.

####  4.5.2 Adaptive QEC for a $1$-d disordered chain

To summarize, the quantum channel for state transfer in the presence of
disorder has the same structure as that of the ideal chain, but with a
stochastic noise parameter $p\equiv 1-|f^{N}_{r,s}(t,\\{\Delta_{k}\\})|^{2}$,
since the transition amplitude $f_{r,s}^{N}(t,\\{\Delta_{k}\\})$ is now a
random variable whose value depends on the random couplings
$\\{\Delta_{k}\\}$. However, as discussed in Sec. 4.5.1, for small enough
disorder strengths, $f_{r,s}^{N}(t,\\{\Delta_{k}\\})$ is peaked sharply around
its mean value, and we may consider the disorder-averaged amplitude $\langle
f_{r,s}^{N}(t,\\{\Delta_{k}\\})\rangle_{\delta}$ as a good estimate of the
noise.

We therefore propose an adaptive QEC procedure for a disordered $XXX$ chain
involving the $4$-qubit code in Eq. (4.3) and a recovery map
$\mathcal{R}_{P}^{\rm avg}$ with the same structure as that used in the case
of the ideal chain, described in Eq. (4.14). However, unlike the ideal case,
the value of the channel parameter used in the recovery is different from the
one in actual noise channel : the recovery map uses the disorder-averaged
amplitude $\langle f_{r,s}^{N}(t,\\{\Delta_{k}\\})\rangle_{\delta}$, and is
therefore independent of the specific disorder realization, whereas the noise
channel has the parameter $f_{r,s}^{N}(t,\\{\Delta_{k}\\})$ which changes with
every realization.

Figure 4.6: Disorder-averaged worst-case fidelity $\langle F^{2}_{\rm
min}\rangle_{\delta}$ obtained using the adaptive recovery
$\mathcal{R}_{P}^{\rm avg}$.

To illustrate the performance of this modified recovery map, we present
numerical results for quantum state transfer from the first site ($s=1$) to
the $8^{\rm th}$ site ($r=8$)on an $8$-spin chain. Fig. 4.6 shows the
disorder-averaged worst-case fidelity $\langle F^{2}_{\rm
min}\rangle_{\delta}$ obtained using the $4$-qubit code and the adaptive
recovery $\mathcal{R}_{P}^{\rm avg}$, for an $8$-spin chain. For disorder
strengths $\delta\leq 0.01$, our adaptive QEC protocol achieves pretty good
transfer, with fidelity-loss $\epsilon<0.2$. Beyond $\delta\geq 0.06$, we
notice that $\langle F_{\min}^{2}\rangle_{\delta}<0.5$ since the effects of
localization are too strong to be counteracted by QEC.

This is further borne out by our detailed analysis of the distribution of the
transition amplitude in the presence of disorder (see Appendix B.4). In
particular, our expressions for the mean and standard deviation of the
transition amplitude indicate that until $\delta\leq 0.01$, the disorder-
averaged value $\langle f_{r,s}^{N}(t,\\{\Delta_{k}\\})\rangle_{\delta}$ is
close to the value of the transition amplitude in the ideal (zero-disorder)
case, and the standard deviation is insignificant compared to the mean.
However, as the disorder strength increases further, the disorder-averaged
value $\langle f_{r,s}^{N}(t,\\{\Delta_{k}\\})\rangle_{\delta}$ starts
dropping and the standard deviation becomes comparable to the average value.
Thus the effective noise parameter of the underlying quantum channel becomes
too strong for the QEC procedure to be effective.

The fact that $\delta=0.06$ is a threshold of sorts can be seen more directly
by studying the variation of the disorder-averaged transition amplitude with
disorder strength. Previous studies on localization in disordered chains have
used such a quantity, namely
$\langle|f_{n,1}^{N}(t,\\{\Delta_{k}\\})|^{2}\rangle_{\delta}$, as an
indicator of the extent of localization [50, 51].

Figure 4.7: $\langle|f_{n,1}^{8}(t)|^{2}\rangle_{\delta}$ for an $8$-spin
chain as a function of the site $n$.

In Fig. 4.7, we plot the disorder-averaged transition amplitude
$\langle|f_{n,1}^{N}(t,\\{\Delta_{k}\\})|^{2}\rangle_{\delta}$ for a fixed
time $t^{*}$ and different disorder strengths $\delta$, as a function of the
receiver site $n$, for the Heisenberg chain in Eq. (4.19). Empirically, we see
that this plot follows an exponential distribution. The curves take the form
$e^{-(\alpha n+\beta)/{\rm Loc}}$, where $\alpha,\beta$ are functions of
disorder strength $\delta$ and ${\rm Loc}$ is the localization length, i.e.
the length at which
$\langle|f_{n,1}^{N}(t,\\{\Delta_{k}\\})|^{2}\rangle_{\delta}$ falls to
$(1/e)$ of its maximum value. This would mean that in Fig. 4.7 for each site
$n$, the disorder averaged transition probability
$\langle|f_{n,1}^{8}(t,\\{\Delta_{k}\\})|^{2}\rangle_{\delta}$ gets suppressed
exponentially depending on the strength of the disorder $\delta$. Therefore,
with increase in disorder strength $\delta$, the localization effects become
more pronounced.

Specifically, when the disorder strength crosses $\delta=0.06$, the square of
the transition amplitude between the ends of the $8$-spin chain falls below
$0.43$ on average. However, we know from the fidelity estimate in Theorem 3
that the adaptive QEC protocol improves fidelity if only if
$|f_{N,1}^{N}(t)|^{2}>0.43$. Thus, for end to end state transfer on an
$8$-length disordered Heisenberg chain, $\delta=0.06$ is indeed a threshold
beyond which the adaptive QEC protocol cannot help in improving fidelity.
Since our analysis of the distribution of the transition amplitude presented
in Sec. 4.5.1 as well as the fidelity expression in Theorem 3 hold for any
$s,r,N$ we can always identify such a threshold for a specific set of values.

###  4.6 Conclusions

We develop a pretty good state transfer protocol based on adaptive quantum
error correction (QEC), for a universal class of Hamiltonians which preserve
the total spin excitations on a linear spin chain. Based on the structure of
the underlying quantum channel, we choose an approximate code and near-
optimal, adaptive recovery map, to solve for the fidelity of state transfer
explicitly. For the specific case of the ideal Heisenberg chain, our protocol
performs as efficiently as perfect-QEC-based protocols. Using repeated QEC on
the chain, we are able to achieve high enough fidelity over longer distances
for an ideal spin chain.

In the case of disordered spin chains the underlying quantum channel is
stochastic. For the case of a disordered $1$-d Heisenberg chain, we study the
distribution of the transition amplitude, which in turn is directly related to
the stochastic noise parameter of the noise channel. By suitably adapting the
recovery procedure, we demonstrate pretty good transfer on average, for low
disorder strengths.

It is an interesting question as to whether such channel-adapted QEC
techniques maybe used to achieve pretty good state transfer for other
universal classes, such as the transverse-field Ising model and the
$XYZ$-chain. It is also an open problem to obtain an efficient circuit
implementation of the adaptive recovery map discussed here.

##  Chapter 5  Achieving fault tolerance against amplitude-damping noise

Achieving fault tolerance against amplitude damping noise

###  5.1 Introduction

A practical quantum computer is prone to noise, both due to the fragile nature
of quantum states but also due to imperfect gate operations. This necessitates
the theory of quantum fault tolerance, which shows that reliable and scaleable
quantum computing is possible even with a noisy quantum memory and noisy
quatum gates, provided the noise rates are below a certain threshold [5, 120].
A fault-tolerant quantum computation proceeds by first encoding the physical
qubits into a quantum error correcting (QEC) code. Subsequently, encoded gate
operations are performed on the encoded qubits in a way that does not let the
errors spread catastrophically. Errors are removed from the system via
periodic syndrome checks performed on ancillary qubits, before they accumulate
to a point where the damage becomes irreparable. The fundmental basis for any
quantum fault tolerance scheme is the threshold theorem, which states that
scalable quantum computation is possible provided the physical error rate per
gate or per time step is below a certain critical value called the _threshold_
[116].

Starting with Shor’s original proposal [7], the early works on quantum fault
tolerance focussed on developing fault-tolerant schemes using general pupose
QEC codes, specifically CSS codes such as polynomial codes [67] and the Steane
$[[7,1,3]]$ code [15]. Subsequently, fault tolerance thresholds have been
estimated incorporating concatenation [9, 59], magic-state distillation [121],
as well as teleportation-based schemes [122]. Typical threshold estimates of
the allowed error rates range between $10^{-6}$ and $10^{-3}$, as seen from
Table 1.1, which contains a summary of various fault tolerance schemes and the
threshold values achieved for specific noise models. More recently, surface
codes have emerged as a very promising candiate for achieving fault-tolerance
[72] with threshold estimates ranging between $0.1\%-10\%$, although the
resource overhead requirements are often as high as $10^{4}$-$10^{7}$ physical
qubits per logical qubit. We refer to [8] for a recent overview of fault-
tolerant schemes using surface codes and colour codes in different dimensions.

The fault tolerance threshold obtained for a given QEC code or a class of
codes depends crucially on the error model under consideration [68]. Most of
the threshold estimates obtained so far have assumed either symmetric
depolarizing noise or erasure noise. However, when the structure of the noise
associated with a given qubit architecture is already known, a fault tolerance
scheme tailored to the specific noise process could be advantageous, both in
terms of less resource requirements as also in improving the threshold. This
is borne out by the fault tolerance prescription developed for _biased_ noise,
in systems where the dephasing noise is known to be dominant [75, 76]. This
prescription was used to obtain a universal scheme for pulsed operations on
flux qubits [70], taking advantage of the high degree of dephasing noise in
the cphase gate, leading to a numerical threshold estimate of $0.5\%$ for the
error rate per gate operation.

Motivated by this example, we address the question of whether it is possible
to develop fault tolerance schemes for channel-adapted codes [22]. QEC codes
adapted to specific noise models are often known to offer a similar level of
protection as the general purpose codes, while using fewer qubits to encode
the information [19, 25]. Furthermore, in today’s era of noisy intermediate-
scale quantum (NISQ) devices [16], there has been growing interest in
identifying shorter QEC codes that are amenable to fault-tolerant circuit
constructions. For example, it has been demonstrated [77, 80] that a family of
fault-tolerant encoding and error-detection circuits can be constructed using
five qubits for the $[[4,2,2]]$ erasure code, using which a criterion to test
experimental fault tolerance may also be derived.

In our work [81], we develop fault-tolerant gadgets for qubits that are
susceptible to amplitude-damping noise. Physically, this corresponds to a
$T_{1}$ relaxation process and is known to be a dominant source of noise in
superconducting qubit systems, for example. Moving away from general purpose
codes, we use the well known $4$-qubit code [19] to develop gadgets that are
fault-tolerant against _local_ , stochastic, amplitude-damping noise. We
analytically estimate the error threshold for the logical cphase, as well as
the memory threshold, using our prescription. Our work thus provides the first
rigorous level-$1$ threshold estimates for fault tolerance against amplitude-
damping noise. Given the _approximate_ nature of the $[[4,1]]$ code used here,
it is not immediately clear as to how our our level-$1$ gadgets maybe
concatenated to obtain fault tolerance at higher levels.

###  5.2 Preliminaries

We follow the basic framework of quantum fault tolerance developed by Aliferis
_et al._ [59], which we briefly review this formalism here for completeness.
In a fault-tolerant quantum computation, ideal operations are simulated by
performing encoded operations on logical qubits. Encoded operations, in turn,
are implemented by composite objects called _gadget_ s which are made of
elementary physical operations such as single- and two-qubit gates (including
identity gates for wait times), state preparation, and measurements. A
_location_ refers to any one of these elementary physical operations. A
location in a gadget is said to be _faulty_ whenever it deviates from the
ideal operation, and can result in errors in the qubits storing the
computational data. The key challenge of is to design the gadgets in such a
way as to minimize the propagation of errors due to the faults within the same
encoded block.

In what follows we refer to the elementary physical operations are called
_unencoded_ gadgets. Our goal is to construct the _encoded_ or logical gadgets
corresponding to the $4$-qubit code, which are resilient to a specific local
stochastic noise model, namely, the amplitude-damping channel defined in Eq.
5.2 below. In our scheme, we use the following unencoded operations to build
the fault-tolerant encoded gadgets.

$\\{\mathcal{P}_{|+\rangle},\mathcal{P}_{|0\rangle}\\}\cup\\{\mathcal{M}_{X},\mathcal{M}_{Z},\textsc{cnot},\textsc{cz},X,Z,S,T,H\\}.$
(5.1)

Here, $\mathcal{P}_{|+\rangle}$ and $\mathcal{P}_{|0\rangle}$ refer to the
eigenstates of single-qubit $X$ and $Z$ Pauli operators respectively,
$\mathcal{M}_{X}$ and $\mathcal{M}_{Z}$ refer to measurements in the $X$ and
$Z$ basis respectively. cnot refers to the two-qubit controlled-not gate, cz
refers to the two-qubit controlled-phase gate and $X,Z,HS$ and $T$ are the
standard single-qubit gates. Note that $|0\rangle$ is the fixed state of the
amplitude-damping channel defined in Eq. 5.2 and is therefore inherently
noiseless. We assume that rest of the gates and measurements in Eq. 5.1 are
susceptible to noise, as described below.

####  5.2.1 Noise model and the $4$-qubit code

Our fault-tolerant construction is based on the assumption that the dominant
noise process affecting the quantum device is amplitude-damping noise on each
physical qubit. This is described by the single-qubit completely-positive and
trace-preserving channel,
$\mathcal{E}_{\mathrm{AD}}(\,\cdot\,)=E_{0}(\,\cdot\,)E_{0}^{\dagger}+E_{1}(\,\cdot\,)E_{1}^{\dagger}$,
with $E_{0}$ and $E_{1}$, the Kraus operators, defined as

$\displaystyle E_{0}$
$\displaystyle\equiv\frac{1}{2}{\left[(1+\\!\sqrt{1-p})I+(1-\\!\sqrt{1-p})Z\right]}$
$\displaystyle=|0\rangle\langle 0|+\sqrt{1-p}|1\rangle\langle 1|,$
$\displaystyle\textrm{and}\quad E_{1}$
$\displaystyle\equiv\frac{1}{2}\sqrt{p}(X+\mathrm{i}Y)=\sqrt{p}|0\rangle\langle
1|,$ (5.2)

where $I$ is the qubit identity, $X,Y$, and $Z$ are the usual Pauli operators,
and $|0\rangle$ and $|1\rangle$ are the eigenbasis of $Z$. In our setting, we
assume that storage errors, gate errors, as well as the measurement errors are
all due $\mathcal{E}_{\mathrm{AD}}$. Specifically, a noisy physical gate
$\mathcal{G}$ is modeled by the ideal gate followed by the noise
$\mathcal{E}_{AD}$ on each qubit. In the case of two-qubit gates such as the
cnot and cz, we assume that a faulty gate implies an ideal gate followed by
amplitude-damping noise acting on _either_ or _both_ of the control and the
data qubits. All three possibilities are assumed to occur with equal
probability and we build a two-qubit gate gadget that is tolerant to all three
faults. A noisy measurement is modeled as an ideal measurement preceded by the
noise $\mathcal{E}_{\mathrm{AD}}$, while a noisy preparation is an ideal
preparation followed by $\mathcal{E}_{\mathrm{AD}}$. Note that the noise acts
on each physical qubit individually, and is assumed to be time- and gate-
independent. One could more generally regard the parameter $p$ as an upper
bound on the level of amplitude damping over time and gate variations. As the
basis of our fault tolerance scheme, we make use of the well-known $4$-qubit
code, originally introduced in [19] tailored to deal with amplitude-damping
noise using four physical qubits. The $[[4,1]]$ code space $\mathcal{C}$ is
the span of

$\displaystyle|0_{L}\rangle$
$\displaystyle\equiv\tfrac{1}{\sqrt{2}}(|0000\rangle+|1111\rangle)$
$\displaystyle\textrm{and}\quad|1_{L}\rangle$
$\displaystyle\equiv\tfrac{1}{\sqrt{2}}(|1100\rangle+|0011\rangle),$ (5.3)

giving an encoded/logical qubit of information. Recall that the $4$-qubit code
given in Eq. 5.2.1 is an _approximate_ code, which does not perfectly satisfy
the perfect QEC conditions [12], but can nonetheless correct for amplitude-
damping noise with high fidelity. It has been noted that the set of $4$-qubit
operators generated by the set $\left\langle XXXX,ZZII,IIZZ\right\rangle$
stabilize the code [123]. We further observe that the $4$-qubit code can also
be constructed by considering a pair of vectors in the $[[4,2,2]]$ code whose
stabilizer generator set is given by $\left\langle XXXX,ZZZZ\right\rangle$
[77]. The logical $\overline{X}$ and $\overline{Z}$ operators for the
$4$-qubit code are identified as

$\overline{X}\equiv XXII;\overline{Z}\equiv ZIIZ,$ (5.4)

up to multiplication by the stabilizer operators, of course.

The action of the $4$-qubit noise channel $\mathcal{E}_{\mathrm{AD}}^{\otimes
4}$ can be discretized in terms of the single-qubit damping error $E_{1}$
$\propto$ $(X+\mathrm{i}Y)$ in Eq. 5.2 and the single-qubit dephasing error
$Z$ contained in $E_{0}$; there is also the no-error case of $I$ in $E_{0}$.
We list here the complete set of errors that the $4$-qubit codespace
$\mathcal{C}$ is subject to, under the action of
$\mathcal{E}_{\mathrm{AD}}^{\otimes 4}$. We first note the action of the
single-qubit damping errors on the codespace $\mathcal{C}$, as,

$\displaystyle(X+\mathrm{i}Y)\otimes I^{\otimes
3}:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|0111\rangle,|0100\rangle\\}\right)$
$\displaystyle I\otimes(X+\mathrm{i}Y)\otimes I^{\otimes
2}:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|1011\rangle,|1000\rangle\\}\right)$
$\displaystyle I^{\otimes 2}\otimes(X+\mathrm{i}Y)\otimes
I:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|1101\rangle,|0001\rangle\\}\right)$
$\displaystyle I^{\otimes
3}\otimes(X+\mathrm{i}Y):\mathcal{C}\rightarrow\mathcal{S}\left(\\{|1110\rangle,|0010\rangle\\}\right),$
(5.5)

where $\mathcal{S}(.)$ denotes the span of the corresponding states. The two-
qubit damping errors act as follows.

$\displaystyle(X+\mathrm{i}Y)^{\otimes 2}I^{\otimes
2}:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|0011\rangle,|0000\rangle\\}\right)$
$\displaystyle I^{\otimes 2}(X+\mathrm{i}Y)^{\otimes
2}:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|1100\rangle,|1111\rangle\\}\right)$
$\displaystyle(X+\mathrm{i}Y)\otimes I\otimes(X+\mathrm{i}Y)\otimes
I:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|0101\rangle\\}\right)$
$\displaystyle I\otimes(X+\mathrm{i}Y)^{\otimes 2}\otimes
I:\mathcal{C}\rightarrow\mathcal{S}\left(\\{|1001\rangle\\}\right)$
$\displaystyle I\otimes(X+\mathrm{i}Y)\otimes
I\otimes(X+\mathrm{i}Y):\mathcal{C}\rightarrow\mathcal{S}\\{|1010\rangle\\}$
$\displaystyle(X+\mathrm{i}Y)\otimes I^{\otimes
2}\otimes(X+\mathrm{i}Y):\mathcal{C}\rightarrow\mathcal{S}\left(\\{|0110\rangle\\}\right).$
(5.6)

The three-qubit damping errors $(X+\mathrm{i}Y)^{\otimes 3}\otimes I$ map the
codespace to subspaces that overlap with the single-damping error subspaces.
The $4$-qubit damping error $(X+\mathrm{i}Y)^{\otimes 4}$ maps the codespace
to the state $|0000\rangle$. The error set also comprises single-qubit
dephasing errors of the form,

$Z\otimes I^{\otimes
3}:\mathcal{C}\rightarrow\mathcal{S}\left(\\{{|0000\rangle-|1111\rangle}/{\sqrt{2}},{|0011\rangle-|1100\rangle}/{\sqrt{2}}\\}\right).$
(5.7)

For completeness sake, we note the no-error operator $I^{\otimes
4}:\mathcal{C}\rightarrow\mathcal{C}$ that leaves the codepsace invariant. It
is easy to check that the $4$-qubit code _perfectly_ corrects for single-qubit
damping errors and a partial set of two-qubit damping errors [19]. The set of
syndrome operators that allow us to correct for the no-error case and the
single-qubit damping errors include $(ZZII,IIZZ,ZIII,IIZI)$.

We note that the operator $E_{0}$ in the expansion of amplitude-damping
channel in Eq. 5.2 is more than Identity with an additional back-action term
of $O(p)$, which is a non-CP map of the form given below

$\mathcal{F}_{Z}(\cdot)=Z(\cdot)I+I(\cdot)Z$ (5.8)

Such effects of back-action have been studied in the past using bosing codes
both theoritically and experimentally [124, 125]. In this chapter, we
construct gadgets made of noisy elementary physical gates, tolerant against
faults due to a single damping error. However, Ref. [81] provides a more
extensive treatment by constructing gadgets fault-tolerant against both back-
action errors and single-qubit damping errors arising due to amplitude damping
channel.

####  5.2.2 Principles of fault tolerance

We conclude this section by formalizing the notion of fault-tolerant circuits
and gadgets, in the context of amplitude-damping noise. Specifically, we list
the properties that the error correction unit and the encoded gadgets must
satisfy, in order to lead to logical operations and circuits that are fault-
tolerant against amplitude-damping noise.

  * (Prop 1)

If an error correction unit has no fault, it takes an input with at most one
damping error to an output with no errors.

  * (Prop 2)

If an error correction unit contains at most one fault, it takes an input with
no errors to an output with at most one damping error.

  * (Prop 3)

A preparation unit without any fault propagates an input with upto one single-
qubit damping error to an output with at most one single-qubit damping error.
A preparation unit with at most one fault propagates an incoming state with no
errors to an output with at most one single-qubit damping error.

  * (Prop 4)

A measurement unit with no faults leads to a correctable classical outcome for
an input with at most one damping error. A measurement unit with at most one
fault anywhere leads to a correctable classical outcome for an input state
with no errors.

  * (Prop 5)

An encoded gadget without any fault takes an input with upto a single-qubit
damping error to an output state in each output block with at most one single-
qubit damping error. An encoded gadget with a single damping fault takes an
input with no error and leads to an output with a single-qubit damping error.

In what follows, we first develop fault-tolerant gadgets, which are resilient
to single-qubit damping errors that occur with probability $O(p)$, neglecting
the higher order dephasing and multi-qubit damping errors. Using the $4$-qubit
code, we build the error correction unit, preparation and measurement units as
well as a universal set of enoded gate gadgets. We prove that our gadgets
satisfy the principles of fault tolerance listed above, and finally establish
a pseudothreshold for the memory unit and controlled-phase gadget.

###  5.3 Basic units and encoded gadgets

In this section, we introduce the basic units which constitute the building
blocks of our fault tolerance scheme. We begin by constructing the error
correction unit, comprising the syndrome measurement and recovery circuits,
which corrects single-qubit damping errors in a fault-tolerant manner. We then
obtain a fault-tolerant preparation unit for a two-qubit Bell state, which
eventually helps us to prepare the encoded states $|0\rangle_{L}$ and
$|+\rangle_{L}$. We also construct fault-tolerant measurement units
corresponding to the logical $X$ and $Z$ measurements. We finally construct a
set of basic encoded gates, namely, an encoded $X$ gadget and an encoded cz
gadget. In every case, the physical gates come from the elementary set given
in Eq. (5.1).

####  5.3.1 Error correction unit

The error correction unit, henceforth referred to as the ec unit, is shown in
Fig. 5.1. It comprises two separate sub-units, one a fault-tolerant syndrome-
extraction unit for extracting the syndrome bits corresponding to the set of
correctable errors, the other a recovery unit. We note here that we need a
nontrivial recovery unit to correct for the single damping errors, rather than
a classical Pauli-frame change. This is indeed due to the fact that the single
damping errors of the form $X+\mathrm{i}Y$ do not conjugate past all the
elementary gate operations in Eq. (5.1).

Figure 5.1: Fault-tolerant error correction unit. $\left|{\Psi}\right\rangle$
denotes the four input data qubits, others are ancilla qubits. The circuits in
the box are performed only if the corresponding syndrome bits are triggered
(set to $1$). The recovery unit $\mathcal{R}$ is always performed if either of
the two bits $s,t$ is triggered (see section 5.3.1).

The syndrome extraction procedure is a two-step process, as shown in Fig. 5.1.
$|\Psi\rangle$ denotes the state of the encoded or _data_ qubits. The syndrome
extraction first involves parity measurements, using two ancilla qubits
initialized to $|0\rangle$, on the two pairs of data qubits separately. This
results in two classical bits, denoted as $s$ and $t$ in Fig. 5.1. The parity
measurements correspond to measuring the stabilizers $ZZII$ and $IIZZ$ on the
data qubits, with even(odd) parity registering as the outcome $0(1)$.

If both syndrome bits $s$ and $t$ take the value $0$, we terminate the error
correction circuit. If either of $s$ or $t$ takes the value $1$, we perform
another pair of non-stabilizer-group syndrome measurements, corresponding to
measuring the operators $\\{ZIII,IZII\\}$ or $\\{IIZI,IIIZ\\}$. Specifically,
if $s=1$ and $t=0$, we perform two measurements corresponding to
$\\{ZIII,IZII\\}$, with outcomes denoted as $u$ and $h$. If $s=0$ and $t=1$,
we perform two measurements corresponding to $\\{IIZI,IIIZ\\}$, with outcomes
denoted as $v$ and $g$. Based on these four syndrome bits $s,t,u,h$ (or
$s,t,v,g$), which are collectively denoted as P, we are able to diagnose all
single fault events. Table 5.1 summarizes the mapping between a single
fault/error and the syndrome bits. Note that there are higher-order fault
events that can be detected – for example, $s=1$, $t=1$ corresponds to damping
errors in two data qubits – however, these errors are uncorrectable by the
$4$-qubit code. We decide to end the computation in such cases.

$s$ |  $t$ |  $u$ |  $h$ |  $v$ |  $g$ | Diagnosis
---|---|---|---|---|---|---
0 | 0 | $\times$ | $\times$ | $\times$ | $\times$ | no error or undetected fault
1 | 0 | 0 | 1 | $\times$ | $\times$ | Qubit 1 is damped
1 | 0 | 1 | 0 | $\times$ | $\times$ | Qubit 2 is damped
1 | 0 | 1 | 1 | $\times$ | $\times$ | Fault in one CNOT
0 | 1 | $\times$ | $\times$ | 0 | 1 | Qubit 3 is damped
0 | 1 | $\times$ | $\times$ | 1 | 0 | Qubit 4 is damped
0 | 1 | $\times$ | $\times$ | 1 | 1 | Fault in one CNOT
Table 5.1:  Mapping between syndrome bits and single fault/error events. Other
combinations that do not appear in the table correspond to higher-order fault
events.

The recovery unit, denoted $\mathcal{R}$ in Fig. 5.1, is shown in detail in
Fig. 5.3. We note that the damping errors we wish to correct for, are of the
form $X+\mathrm{i}Y=(I+Z)X$. The recovery unit $\mathcal{R}$ consists of two
sub-units, namely, the $\mathcal{R}_{X}$ unit for correcting the $X$ part, and
the $\mathcal{R}_{Z}$ unit for correcting the $(I+Z)$ part. The unit
$\mathcal{R}_{X}$ applies a local $X$ gate to the damped qubits, as diagnosed
by the syndrome bits. It may not apply any $X$ if the syndrome bits diagnose
no damped qubits, for example, cases $4$ and $7$ in Table 5.1 .

$\mathcal{R}_{Z}$ corrects for the $(I+Z)$ part by measuring the stabilizer
$XXXX$ using an ancilla qubit initialized to $\left|{+}\right\rangle$. The
measurement, with outcome denoted as $c$, projects the encoded state into the
code space, corresponding to the subspace with eigenvalue $+1$ ($c=0$), or to
the subspace with eigenvalue $-1$ ($c=1$). The latter case corresponds to a
$Z$ error and $\mathcal{R}_{Z}$ applies a suitable local $Z$ gate from the set
$\\{ZIII,IZII,IIZI,IIIZ\\}$, to correct for it. For example, if the first data
qubit is damped and $c=1$, $\mathcal{R}_{Z}$ can apply $Z$ to the first data
qubit or to the second data qubit (since $ZZII$ is a stabilizer).

We note that the $\mathcal{R}_{Z}$ unit will be reused in other gadgets with a
slight variations on how the local $Z$ gates are applied at the end.
Therefore, we represent this set of local, single-qubit $Z$ operations by a
generic function $Z(\mathbf{P},c)$ (see Fig. 5.3) that depends on all the
syndrome bits. We will explain the details further in each specific case.

Figure 5.2:  Recovery unit $\mathcal{R}$ consists of two parts,
$\mathcal{R}_{X}$ and $\mathcal{R}_{Z}$. Figure 5.3:  ( Details of each sub-
units. The bar notation denotes the complement of a syndrome bit. $\mathbf{P}$
denotes the set of syndrome bits $\\{s,t,u,h,v,g\\}$. $\mathcal{R}_{X}$
applies an identity if the syndrome bit is unavailable. $\mathcal{R}_{Z}$
measures the stabilizer $XXXX$ and applies a corresponding $Z$ if $c=1$.

The fault-tolerant property of the ec unit in Fig. 5.1 can be intuitively
understood as follows. If there is one error in the input state and no fault
in the ec unit, the syndrome extraction unit will detect the error and the
recovery unit will correct for it. On the other hand, if we allow for one
fault location in the ec unit, it can only occur in the first two parity
measurements. If the fault is detected, it will be corrected by the recovery
unit (fault-free). Otherwise, if the fault is undetected, the recovery unit
will not be triggered and the fault will cause at most one error to the
output, due to the way we construct the parity measurements. A detailed proof
that ec unit is fault tolerant is presented in Appendix C.1.

####  5.3.2 Bell-state preparation

We next demonstrate a fault-tolerant preparation of the two-qubit Bell state
$|\beta_{00}\rangle$,

$|\beta_{00}\rangle=\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle),$ (5.9)

serves as the input state to multiple fault-tolerant gadgets constructed in
Sec. 5.4.1.

Figure 5.4: Preparation of the Bell state: (top) non-fault-tolerant
preparation of the two-qubit Bell state $|\beta_{00}\rangle$ Figure 5.5:
Preparation of the Bell state:a fault-tolerant version built from two non-
fault-tolerant copies of $|\beta_{00}\rangle$ from the top circuit.

The state $|\beta_{00}\rangle$ is first prepared in a non-fault-tolerant
manner, as shown in Fig. 5.4. We then verify this Bell state using another
copy of $|\beta_{00}\rangle$ prepared in a similar fashion, as shown in Fig.
5.5. When the circuits have no faults, both the $X$ as well as $Z$
measurements outcomes have even parity. However, when there is a single
damping error any where in the circuit, one or both outcomes have odd parity,
as explained in Appendix C.1.2. In the latter case, we reject the final state
and start again, thus ensuring a fault-tolerant preparation of the Bell state
$|\beta_{00}\rangle$.

####  5.3.3 Fault-tolerant $\overline{Z}$ and $\overline{X}$ measurements

Figure 5.6: Measurement of the logical operator $\overline{X}$=$XXII$ on the
encoded information (carried by the bottom $4$ qubits) with the use of two
additional ancilla qubits (top $2$ qubits) fault-tolerantly prepared in
$|\beta_{00}\rangle$.

In this section, we demonstrate fault-tolerant circuits that perform logical
$\overline{X}$ and $\overline{Z}$ measurements corresponding to the $4$-qubit
code. Recall that a measurement unit is said to be fault-tolerant, if the
presence of a single fault in the measurement circuit always leads to a
correctable error in the classical outcome. In other words, distinct faults
lead to distinct classical outcomes, so as to ensure that the faults can be
diagnosed and corrected for, classically.

We first argue that the logical $Z$ – $\overline{Z}=ZIIZ$ – can be realised
simply by performing four local $Z$ measurements on the encoded or data
qubits. In the ideal, no-error scenario, the measurement outcomes (which are
four-bit binary strings) have even parity. Specifically, the strings $0000$
and $1111$ project the data qubits onto the $|0\rangle_{L}$ state, whereas the
strings $0011$ and $1100$ project the data qubits onto $|1\rangle_{L}$. A
single fault in one of the local $Z$ measurements, or a single-damping error
in the data qubits leads to outcomes strings with odd parity. Furthermore,
faults in distinct locations lead to distinct four-bit classical strings, thus
ensuring that the faults can diagnosed and corrected for. In particular, if
the outcome string has more $1$’s, the _correct_ outcome corresponds to a
projection onto the $|0\rangle_{L}$ state, whereas if the outcome string has
more $0$’s the correct outcome corresponds to a projection onto the
$|1\rangle_{L}$ state.

Next, we give a fault-tolerant construction of the logical $X$ —
$\overline{X}=XXII$ — measurement unit, by introducing two additional ancilla
qubits initialized to the Bell pair $|\beta_{00}\rangle$, as shown in Fig.
5.6.Note that in Fig. 5.6 the first two qubits are the ancilla qubits and last
four are the data qubits. We then perform three Bell measurements, one on the
two ancilla qubits, and one each on each pair of data qubits. The Bell
measurements on an _ideal_ encoded state (an encoded state with no error) lead
to outcomes $(0,0)$ or $(1,0)$. Outcome $(0,0)$ indicates a projection onto
$|+\rangle_{L}$, and the outcome $(1,0)$ indicates a projection onto
$|-\rangle_{L}$, thus realising the logical $X$ measurement.

We show that this measurement unit is fault-tolerant, that is, it leads to a
correctable classical outcome even when there is a single fault anywhere in
the circuit. We refer to Appendix C.1.3 for the detailed argument. We merely
note here that a single fault in the circuit would lead to a _faulty_ outcome
($(1,1)$ or $(0,1)$) for one of the Bell measurements. We simply ignore the
faulty outcome and majority voting among the other outcome pairs ($(0,0)$ and
$(1,0)$) decide if the projection is onto $|+\rangle_{L}$ or $|-\rangle_{L}$.

####  5.3.4 Logical $X$ operation

To obtain a universal set of logical gates, as explained in the Sec. 5.4, we
also need a fault-tolerant implementation of the logical $X$ operation. In
standard fault tolerance schemes making use of Pauli-based codes, an operator
like $\overline{X}=XXII$ (or alternatively, $IIXX$, with the two differing by
a stabilizer operator) can be applied simply by performing $X$ on the first
two (or last two) physical qubits, the fault tolerance guaranteed by the
transversal nature of the operation. In the case of the amplitude-damping
code, however, the transversal operation is actually not fault-tolerant, due
to the fact that the damping errors of the form $X+\mathrm{i}Y$ do not
conjugate past the $X$ operator.

Instead, a more elaborate scheme to ensure a fault-tolerant implementation of
$\overline{X}$ is needed. Figure 5.7 gives a fault-tolerant gadget that
accomplishes the $\overline{X}$ operation. As before,
$\left|{\Psi}\right\rangle$ denotes the state of the encoded or data qubits.
The logical $X$ gadget requires six additional ancilla qubits, two of which
are used in the implementation of the logical $X$ operation. The remaining
four ancillas are used for parity checks, similar to the ones used in our ec
unit in Fig. 5.1. Depending on the outcomes of these parity checks, the
logical $X$ gadget is made fault-tolerant by applying a recovery unit
$\mathcal{R}_{Z}$ (similar to the one already shown in Fig. 5.3), or a
modified error correction unit ec’, shown in Fig. 5.8.

Figure 5.7: Fault-tolerant implementation of the logical $X$ operation

Our logical $X$ operation proceeds as follows. If the parity check bits $s$
and $t$ are both trivial, we proceed to the ec’ unit in Fig. 5.8. This unit
first applies a pair of local $X$ gates on the data qubits, thus realising the
logical operation $\overline{X}=IIXX$. In order to take into account faults
that might have occurred in the logical $X$ implementation, the ec’ unit
includes additional parity checks on the last two data qubits, leading to an
application of the ec unit described in Fig. 5.1, conditioned on the syndrome
bits $x,y$.

Figure 5.8: The modified ec unit $EC^{\prime}$ used in the logical $X$ circuit

If either of the bits $s$ or $t$ takes the value $1$, we extract another pair
of syndrome bits $u,h$ and proceed to apply one or both local $X$ gates on the
encoded state $|\Psi\rangle$, as indicated in Fig. 5.7. The presence of any
faults in the gadget is flagged by the syndrome bits $s,t,u,h$, and the
recovery unit $\mathcal{R}_{Z}$ then fixes the state upto a single damping
error, as explained in Sec. 5.3.1 earlier.

####  5.3.5 Logical cphase operation

We next demonstrate a fault-tolerant two-qubit logical operation, which is an
essential ingredient for realising a universal set of logical gates. We first
note that the logical cnot and the cphase gadgets for the $4$-qubit code both
admit transversal constructions However, as noted earlier, transversality does
not automatically translate into fault tolerance in the case of amplitude-
damping errors and the $4$-qubit code. In fact, the transversal cnot is not
fault-tolerant to amplitude-damping noise: a single error caused by the
amplitude-damping noise can propagate through the transversal circuit into an
error that is not correctable by the $4$-qubit code. For example, observe
that, for two physical qubits connected by a physical cnot operation, a
damping error $E_{1}$ [see Eq. (5.2)] on the control qubit propagates into an
$X$ error on the target, while the $E_{1}$ error on the control remains
unchanged (see Fig. 5.9). The $4$-qubit code cannot deal with the propagated
$X$ error. If such a situation occurs in one of the pairs of physical qubits
in the transversal logical cnot gadget, the output of the gadget will not be
correctable. A single fault on one of the qubits can thus result in an
uncorrectable error, violating the requirements of fault tolerance, despite
the transversal structure.

Figure 5.9: a) Propagation of a damping error $E_{1}$ before the control (top)
and b) target (bottom) of a cnot gate.

Unlike the cnot, it turns out that the transversal cphase gadget shown in Fig.
5.10 is fault tolerant against amplitude-damping noise. This is explained in
detail in Appendix C.1.5. The basic idea, however, is easy to understand by
contrasting with the cnot gadget: a damping error at the control (target),
after propagating through a physical cphase gate, propagates as a damping
error at the control (target), as seen in Fig. C.2. However, the damping error
at the control (target) of the cphase, does lead to an additional phase ($Z$)
error in the target (control). This explains the need for the trailing ec and
recovery units in the cphase gadget.

Note that the trailing ec unit in each block in the cphase gadget in Fig. 5.10
conditions the phase recovery unit $\mathcal{R}_{Z}$ in the other block. These
recovery units are identical to the $\mathcal{R}_{Z}$ unit in Fig. 5.3, and
are introduced to correct for the phase errors which may occur in the event of
a single fault before the cphase gadget either in the control or target as
shown in Fig. C.2. The $\mathcal{R}_{Z}$ unit in each block is triggered when
a fault occurs anywhere before the target (control) and applies a local $Z$
recovery operator depending on the outcomes of the syndrome extraction units
of the trailing ec unit in the control (target) block.

###  5.4 Universal logical gate set

In the previous section, we described fault-tolerant constructions of a set of
basic encoded gadgets: an error correction unit that implements correction
with the $4$-qubit code, state preparation of the two-qubit Bell state
$|\beta_{00}\rangle$, the $\overline{X}$ and $\overline{Z}$ measurements, the
logical $X$ operation, as well as the logical cphase operation. We show in
this section how to construct a fault-tolerant universal (encoded) gate set,
tailored for amplitude-damping noise. In particular, we demonstrate the fault-
tolerant implementation of a standard universal gate set comprising the
logical cphase, Hadamard $H$, $S$ (or phase), and $T$ (or $\pi/8$) gates,
where $H$ is the operation
$H\equiv|+\rangle_{L}\langle+|-|-\rangle_{L}\langle-|$,
$S\equiv|0\rangle_{L}\langle 0|+\mathrm{i}|1\rangle_{\langle}1|$, and
$T\equiv|0\rangle_{L}\langle
0|+\mathrm{e}^{\mathrm{i}\pi/4}|1\rangle_{L}\langle 1|$. The fault-tolerant
logical cphase gate is already described in Sec. 5.3.5; here we complete the
discussion with the logical Hadamard, $S$ and $T$ gates.

Figure 5.10: The logical cz gadget.

As was the problem with the cnot gate, the physical $H$, $S$ and $T$ gates are
not noise-structure-preserving: They change an input damping error into an
error not correctable by the $4$-qubit code. We thus do not have tranvsersal
implementations of these logical gates; rather, we need a different approach
for getting fault-tolerant logical gate operations. Below, we make use of the
well-known technique of gate teleportation [122, 5] to construct our fault-
tolerant logical gadgets. The resulting logical gadgets are manifestly fault-
tolerant against amplitude-damping noise as we build the teleportation
circuits using the basic encoded gadgets shown to be fault-tolerant in Sec.
5.3.

####  5.4.1 Preparation units

Armed with the ability to prepare the Bell state fault-tolerantly, as shown in
Sec. 5.3.2, we can obtain fault-tolerant preparations of the logical states
$|0\rangle_{L}$ and $|+\rangle_{L}$. The $|+\rangle_{L}$ state is easy:
$|+\rangle_{L}$ is simply two copies of $|\beta_{00}\rangle$, that is,

$|+\rangle_{L}=|\beta_{00}\rangle\otimes|\beta_{00}\rangle.$

To get the state $|0\rangle_{L}$, we start with a single copy of a fault-
tolerantly prepared $|\beta_{00}\rangle$ and make use of the circuit shown in
Fig. 5.11, with two additional ancillas initialized to $|0\rangle$. Note that
a single fault anywhere in the circuit of Fig. 5.11 is detected by performing
parity measurements, identical to the measurements giving syndromes $s$ and
$t$ shown in Fig. 5.1. The prepared state is accepted only when both the
parity measurements are even.

Figure 5.11: Fault-tolerant preparation of $|0\rangle_{L}$. The input Bell
state $|\beta_{00}\rangle$ is assumed to have been prepared fault-tolerantly
by the preparation circuit of Fig. 5.5.

Finally, we also demonstrate fault-tolerant preparation units for the two-
qubit states $\left|{\Phi_{S}}\right\rangle$ and
$\left|{\Phi_{S}}\right\rangle$, which act as resource states for constructing
the logical $S$ and $T$ gates, respectively.

$\displaystyle\left|{\Phi_{S}}\right\rangle$
$\displaystyle=\frac{1}{\sqrt{2}}{\left(\left|{0}\right\rangle_{L}+\mathrm{i}\left|{1}\right\rangle_{L}\right)}$
(5.10) $\displaystyle\textrm{and }\quad\left|{\Phi_{T}}\right\rangle$
$\displaystyle=\frac{1}{\sqrt{2}}{\left(\left|{0}\right\rangle_{L}+\mathrm{e}^{\mathrm{i}\pi/4}\left|{1}\right\rangle_{L}\right)}.$

The resource states $\left|{\Phi_{S}}\right\rangle$ and
$\left|{\Phi_{T}}\right\rangle$ can be prepared and verified as shown in Fig.
5.13 starting with a fault-tolerant preparation of the states
$|\beta_{S}\rangle$,$|\beta_{T}\rangle$, which are local-unitary equivalents
of the Bell state $|\beta_{00}\rangle$.

$\displaystyle|\beta_{S}\rangle$
$\displaystyle\equiv\frac{1}{\sqrt{2}}{\left(|00\rangle+\mathrm{i}|11\rangle\right)}$
$\displaystyle\textrm{and}\quad|\beta_{T}\rangle$
$\displaystyle\equiv\frac{1}{\sqrt{2}}{\left(|00\rangle+\mathrm{e}^{\mathrm{i}\pi/4}|11\rangle\right)}.$
(5.11)

We construct fault-tolerant preparation units for the states
$|\beta_{S/T}\rangle$ as shown in Fig. 5.12, using a circuit which is similar
to the preparation of $|\beta_{00}\rangle$ in Fig. 5.5. In each case, we
accept the output state only when $X$-measurement outcomes are of even parity
and the $Z$ measurement provides a trivial outcome. Using
$|\beta_{S/T}\rangle$ states we then prepare and verify the resource states
$|\phi_{S/T}\rangle$ in Eq. 5.10 as shown in Fig. 5.13. We accept the prepared
state only when both the $Z$ measurements show trivial outcomes.

Figure 5.12: Fault-tolerant preparation of $|\beta_{S/T}\rangle$ (top) Figure
5.13: Fault-tolerant preparation of $|\phi_{S/T}\rangle$ (bottom)

####  5.4.2 Logical Hadamard

Figure 5.14 gives the construction of our fault-tolerant logical Hadamard. The
teleportation scheme requires the ancillary input of $|+\rangle_{L}$, as well
as the use of the logical cphase gadget , whose fault-tolerant preparation was
described in Sec. 5.3.2.

Figure 5.14: Fault-tolerant logical Hadamard gadget, implemented using a
teleportation scheme. Here, each horizontal qubit line represents 4 physical
qubits, or, equivalently, one logical qubit. $|\Psi\rangle_{L}$ is the state
of the incoming logical qubit on which we want to implement $\overline{H}$.

In Fig. 5.14, a logical cphase gadget is applied to the incoming logical
(data) state $|\Psi\rangle_{L}$ and the ancillary input state $|+\rangle_{L}$.
The data qubits are then measured in the $\overline{X}$ basis, using our
$\overline{X}$ measurement gadget. Depending on the outcome of the $\bar{X}$
measurement, the remaining four qubits (originally ancillas, but now the data
qubits after the teleportation) end up in one of two states:
$\overline{H}|\Psi\rangle_{L}$ or $\overline{X}\overline{H}|\Psi\rangle_{L}$.
In the latter case, we apply a corrective logical $\overline{X}$ gadget to the
outgoing state.

This logical Hadamard gate is fault-tolerant in the following sense: The
gadget in Fig. 5.14 with at most single damping fault teleports an incoming
state with no-error to an output with upto one single-qubit damping error. The
teleportation gadget without any faults, teleports an input with upto one
single-qubit damping error to an output with at most one single-qubit damping
error. This holds simply due to the fact the Hadamard gadget is constructed
from the fault-tolerant basic encoded gadgets described in Sec. 5.3, each
tolerant to a single damping error.

####  5.4.3 Logical $S$ and $T$ gates

We provide the teleportation circuits for the logical $S$ and $T$ gadgets in
Fig. 5.15 and Fig. 5.16 respectively. Like the logical $H$, these circuits are
composed of elementary encoded gadgets described in Sec. 5.3, which can be
realized fault-tolerantly.

Figure 5.15: Logical S gate Figure 5.16: Logical T gate

In both cases, the state $|\Psi\rangle$ denotes the state of the incoming
logical (data) qubits. In both cases, this state is acted upon by the logical
$\overline{H}$ gadget, followed by a logical cphase gate applied to
$\left|{\Psi}\right\rangle_{L}$ and the appropriate ancillary input state
$\left|{\Phi_{S/T}}\right\rangle$. In both cases, the data qubits are measured
in the $\overline{X}$ basis, which teleports the desired state to the ancilla
block, upto a logical operation.

The final step involves a conditional logical operation on the remaining
qubits. In the case of the $\overline{S}$ gadget, this conditional operation
is
$\overline{Y}=\overline{Z}\overline{X}=\overline{H}\overline{X}\overline{H}\overline{X}$,
whereas in the case of the $\overline{T}$ gadget, the conditional logical
operation to be implemented is $\overline{S}\overline{X}$. Once again, the
fault tolerance of the logical $\overline{S}$ and $\overline{T}$ gadgets
follows from the fact that they are composed of basic encoded gadgets which
are all known to be tolerant to single damping errors.

###  5.5 Pseudothreshold calculation

The reliability of a fault tolerance scheme is quantified by its error
threshold, which refers to that critical value of the error rate, $p_{th}$, at
which the fault-tolerant protocol fails to perform any better than its
unencoded version. If $p$ refers to the unencoded error rate, and if the
fault-tolerant procedure can correct upto $t$ errors, then the failure rate of
a fault-tolerant circuit is given by $Cp^{t+1}$, where $C$ refers to the
number of ways in which a unit can have two faults and thus propagate an
output which is not correctable.

The critical error threshold $p_{th}$ is then obtained as $C^{-1}$, for the
$C$ that solves,

$p_{\rm th}=Cp_{\rm th}^{t+1}.$ (5.12)

Since this value in Eq. 5.12 describes the reliability of the scheme at just
one level of encoding, we may think of it as a _pseudo-threshold_. This is a
key departure from the standard notion of a fault tolerance threshold which is
defined for an entire class of codes, by concatenating a given code multiple
times [59].

####  5.5.1 Memory Pseudothreshold

Figure 5.17: Memory unit

We first calculate such a pseudothreshold for a memory unit comprising a pair
of ec gadgets interlaced with identity gates or rests, as shown in the Fig.
5.17. By explicit enumeration of the pairs of faults, referred to as
_malignant_ pairs, that lead to errors of $O(p^{2})$ in the output state, we
obtain,

$p_{\rm th}\approx 2.8\times 10^{-3}.$ (5.13)

We refer to Appendix C.2.2 for the details of the calculation.

####  5.5.2 Computational Pseudothreshold

In order to obtain a computational pseudothreshold, we go beyond our encoded
gadgets to construct _extended_ units, which take into account both incoming
errors as well as all faults occurring within a given gadget. The extended
unit with the maximum number of malignant pairs determines the computational
pseudothreshold. In our case, we have determined by exhaustive check that an
extended cphase unit, shown in Fig. 5.18, is the unit that determines the
error threshold. The extended cphase unit comprises of the encoded
cphasegadget in Fig. 5.10, and ec units appended before each block of the
encoded gadget.

Figure 5.18: Extended cphase unit for computing the pseudothreshold

In order to compute the pseudothreshold of this extended unit, we first
enumerate the number of malignant pairs of damping faults leading to an output
that is not correctable in the extended cz unit, assuming that the incoming
state has no errors. We first label the different blocks that constitute the
extended unit, as follows.

  1. 1.

ec1 \- leading ec in block 1

  2. 2.

ec2 \- leading ec in block 2

  3. 3.

cz gadget

  4. 4.

eca \+ $\mathcal{R}_{Za}$

  5. 5.

ecb \+ $\mathcal{R}_{Zb}$

We can then represent the number of malignant pairs via a matrix whose rows
and columns correspond to each block in Fig. 5.18, with the entries of the
matrix denoting the total malignant pair contributions from the respective
blocks. We merely note the final numbers here and refer to Appendix C.2.3 for
the detailed enumeration of malignant pairs for every pair of blocks.

$\blockarray{cccccccc}&12345\\\ \block{c(ccccccc)}1\ 0\\\ 2\ 740\\\ 3\
30306\\\ 4\ 274240110134\\\ 5\ 240274110224134\\\ $

The total number of malignant pairs of damping errors is simply the sum of the
entries of the matrix. Apart from the pairs of damping errors, we also need to
keep track of the $O(p^{2})$ phase errors, and we argue in Appendix C.2.3 that
there are $52$ malignant fault locations for the phase errors.

The total number of malignant pairs due to damping errors and malignant fault
locations due to $Z$ errors is given by, $A=1880$, leading to a computational
pseudothreshold of

$p_{\rm th}=1/A\approx 5.31\times 10^{-4}.$

###  5.6 Conclusion

We develop a fault-tolerant scheme specific to the amplitude-damping channel,
using the $4$-qubit code. We construct gadgets, namely, the error correction
unit, a universal gate set, and a two-qubit gate which are tolerant against
single-qubit damping errors. Our constructions show that achieving fault
tolerance using channel-adapted codes for nontrivial, non-Pauli noise models
like amplitude-damping channel poses interesting challenges, and often leads
to counter-intuitive results when viewed from the standpoint of the well
established principles of quantum fault tolerance. For instance, although the
logical two-qubit cnot gadget is transversal, it is not tolerant to single
damping errors, thus violating the wisdom gained from standard fault tolerance
schemes for Pauli channels based on stabilizer codes.

The structure of the non-Pauli noise dictates our choice of fault-tolerant
gate gadgets. Thus, the transversal two-qubit cphase gadget and three-qubit
ccz gadget turn out to be a naturally favoured set since they can be made
tolerant against single damping errors. When it comes to single-qubit damping
errors, we do not obtain transversal constructions for the $[[4,1]]$ code;
rather, we have to rely on a teleportation-based scheme to implement the
Hadamard gadget, $S$ and $T$ gadgets that are fault-tolerant.

Finally, we obtain a rigorous estimate on the level-$1$ _pseudo threshold_ for
the memory unit as $2.8\times 10^{-3}$ and cphase-exrec unit of $5.31\times
10^{-4}$, by explicitly enumerating the malignant pairs of faults. We present
an updated, extensive fault-tolerant scheme in Ref. [81] which takes into
account the back-action errors besides single-qubit damping errors. While our
work presents a first step towards achieving fault tolerance against a
specific non-Pauli noise model, the ultimate goal would be to obtain a true
fault tolerance threshold via concatenation or using surface codes. Whether
such a concatenated scheme can be developed entirely using channel-adapted
codes such as the $[[4,1]]$ code, or whether this would require us to
concatenate the $[[4,1]]$ code with a suitable general purpose code remains an
interesting open question. Another immediate question is whether gadgets that
are tolerant to amplitude-damping noise can be constructed using $2$-d Bacon-
shor code [126]. Such a code might lead to a genuine fault tolerance threshold
for amplitude-damping noise.

##  Chapter 6 Summary and Future Scope

Our thesis work entails a study of three interesting aspects centered around
channel-adapted quantum codes, namely,

  * (a)

Construction: we have proposed an efficient numerical way to search for
channel-adapted codes and demonstrated its usefulness in the case of
amplitude-damping noise [32].

  * (b)

Application: we have shown how channel-adapted codes may be used in the
context of the quantum state transfer protocol to obtain better fidelities
over longer spin chains [52].

  * (c)

Fault tolerance: we have developed a fault-tolerant scheme comprising a
universal gate set and error-correction units, based on the $4$-qubit code
adapted to amplitude-damping noise [81].

The work presented in this thesis has several novel aspects and original
results. For instance, the use of the Cartan form for finding good codespaces
(Chapter 3) to protect quantum information is novel and leads to an efficient
numerical procedure to search for quantum codes. Similarly, in Chapter 5, a
new paradigm has been developed for quantum fault tolerance using channel-
adapted quantum error correction, including several novel circuit
constructions.

Our work opens up several directions of research. It would be interesting to
study how the numerical procedure elaborated in Chapter 3 extends to the case
of passive error suppression techniques such as decoherence-free subspaces
(DFS) and noiseless subsystems(NS). Recently, [109] proposed a numerical
procedure to search for the existence of DFS/NS in noise models with and
without perturbations. We note here that it is indeed straightforward to
extend our search procedure to check for the existence of DFS for a given
noise model. For example, motivated by existence of a DFS for correlated
amplitude-damping noise [127] on two qubits, we examined the case of the
$3$-qubit and $4$-qubit correlated amplitude-damping noise channels.
Preliminary results suggest that our unstructured search procedure, where we
make use of a full, unstructured parameterization of the encoding unitary, may
work well and can identify the subspaces corresponding to a DFS for both
cases.

Channel-adapted codes are expected to have a wide variety of applications in
different quantum information processing tasks. We have demonstrated one such
application in the context of quantum state transfer over $1$-d spin chains in
Chapter 4. While our work has focussed on spin-preserving Hamiltonians, our
protocol can still be extended to study more general Hamiltonians based on
realistic implementations. For example, the Josephson junction arrays with a
more general non-spin preserving Hamiltonian [128] gives rise to an arbitrary
noise channel. In such a case our state transfer protocol with channel-adapted
codes could be more useful over the perfect QEC protocols.

The important open problem of achieving fault tolerance using a channel-
adapted code has been studied in Chapter 5. The problem of constructing fault-
tolerant gadget set for a non-Pauli noise model is a counter-intuitive,
challenging task, deviating from the standard fault-tolerant constructions
that deal with Pauli errors and use _perfect_ codes. While we study fault
tolerance using a specific channel-adapted code, namely,the $[[4,1]]$ code
[19], it would be interesting to see if there are other codes tailormade to
specific noise models which maybe used in this regard. For example, an
immediate question is whether gadgets that are tolerant to amplitude-damping
noise can be constructed using the $2$-d Bacon-shor code [126]. Such a code
might allow us to build a universal fault-tolerant scheme, leading to a
genuine fault tolerance threshold for amplitude-damping noise.

##  Appendix A Channel-adapted codes for the amplitude-damping channel

###  A.1 Nelder-Mead search algorithm

The Nelder-Mead algorithm [110, 111] to search for optimal encoding proceeds
through the following steps.

  * 1.

We first create a $m+1$-fold simplex for a $m$ parameter search space, with
each of the vertex initialized to a unitary $U_{i}$ $\in$ $SU(2^{n})$ by
sampling the parameters of the unitary $U_{i}$ from a uniform distribution
over $[0,2\pi]$. We also pick an initial code space $\mathcal{C}_{\rm
initial}$ spanned by $\\{|0_{\rm initial}\rangle,|1_{\rm initial}\rangle\\}$.
At each vertex, we then obtain,

$\displaystyle|0^{i}_{\rm new}\rangle$ $\displaystyle=$ $\displaystyle
U_{i}|0_{\rm initial}\rangle$ $\displaystyle|1^{i}_{\rm new}\rangle$
$\displaystyle=$ $\displaystyle U_{i}|1_{\rm initial}\rangle$

where $\\{|0^{i}_{\rm new}\rangle,|1^{i}_{\rm new}\rangle\\}$ span the code
space $\mathcal{C}_{i}$ at each vertex $i$.

  * 2.

Each iteration of the Nelder-mead algorithm proceeds via the following steps.

    * (i)

Sort : Each vertex $i$ is given by a set of real parameters
$\mathbf{x_{i}}=(a_{i},b_{i},c_{i},\ldots)$, describing the unitary $U_{i}$
$\in$ $SU(2^{n})$ according to the Cartan decomposition given in Sec. 3.3. The
objective function, which is the fidelity-loss function given in Eq. 3.10 is
then evaluated at each vertex $i$ for $\mathbf{x_{i}}$ as
$\eta(\mathbf{x_{i}})$, and then the set $\\{\eta(\mathbf{x_{i}})\\}$ is
sorted such that,

$\eta(\mathbf{x_{1}})<\eta(\mathbf{x_{2}})<\eta(\mathbf{x_{3}})...<\eta(\mathbf{x_{m+1}})$
(A.1)

where $\eta(\mathbf{x_{1}})$ is the minimum value and
$\eta(\mathbf{x_{(m+1)}})$ is the maximum value of the fidelity-loss. The
centroid corresponding to this set of $(m+1)$ vertices after sorting is
obtained as given below,

$\bar{\mathbf{x}}=\frac{\sum_{i=1}^{m}\mathbf{x_{i}}}{m}$ (A.2)

    * (ii)

Reflect : We now obtain $\mathbf{x_{r}}$ as follows,

$\mathbf{x_{r}}=\bar{\mathbf{x}}+\alpha(\bar{\mathbf{x}}-\mathbf{x_{m+1}})$
(A.3)

where the constant, $\alpha$ $\in$ $\mathbb{R}$. If
$\eta(\mathbf{x_{1}})\leq\eta(\mathbf{x_{r}})<\eta(\mathbf{x_{m+1}})$, replace
$\mathbf{x_{m+1}}$ with $\mathbf{x_{r}}$.

    * (iii)

Expand: If $\eta(\mathbf{x}_{r})$ $<$ $\eta(\mathbf{x}_{1})$, then obtain,

$\mathbf{x_{e}}=\bar{\mathbf{x}}+\beta(\mathbf{x_{r}}-\bar{\mathbf{x}})$ (A.4)

where the constant, $\beta$ $\in$ $\mathbb{R}$. If
$\eta(\mathbf{x_{e}})\leq\eta(\mathbf{x_{r}})$, replace $\mathbf{x_{m+1}}$
with $\mathbf{x_{e}}$, otherwise replace $\mathbf{x_{m+1}}$ with
$\mathbf{x_{r}}$.

    * (iv)

Contract: If $\eta(\mathbf{x}_{m})$ $\leq$ $\eta(\mathbf{x}_{r})$ $<$
$\eta(\mathbf{x}_{m+1})$, then obtain,

$\mathbf{x_{c}}=\bar{\mathbf{x}}+\Delta(\mathbf{x_{m+1}}-\bar{\mathbf{x}})$
(A.5)

where the constant, $\Delta$ $\in$ $\mathbb{R}$. If
$\eta(\mathbf{x_{c}})\leq\eta(\mathbf{x_{r}})$, replace $\mathbf{x_{m+1}}$
with $\mathbf{x_{c}}$, otherwise go to step (v).

    * (v)

Shrink: for $2<i<m+1$, replace

$\mathbf{x_{i}}=\mathbf{x_{1}}+\sigma(\mathbf{x_{i}}-\mathbf{x_{1}})$ (A.6)

where the constant, $\sigma$ $\in$ $\mathbb{R}$. We again go to step (i) .

Thus the algorithm proceeds by generating newer simplices at every step and
flows towards the optimum. Also, note that at each step a new $U^{\prime}_{i}$
is generated at $i^{th}$ vertex, giving a new code space $\mathcal{C}^{\prime
i}$ spanned by

$\displaystyle|0^{{}^{\prime}i}_{\rm new}\rangle$ $\displaystyle=$
$\displaystyle U^{\prime}_{i}|0_{\rm initial}\rangle$
$\displaystyle|1^{{}^{\prime}i}_{\rm new}\rangle$ $\displaystyle=$
$\displaystyle U^{\prime}_{i}|1_{\rm initial}\rangle$

The search is terminated once the optimum is attained for the desired accuracy
level.

###  A.2 Structured Codes and Encoding Circuits

Here, we describe simple circuits by means of which a structured encoding of
the form given in Eq. (3.16) can be implemented. Recall that the Cartan
decomposition for such a unitary is given by,

$U=F^{(1)}JF^{(2)},$ (A.7)

where the unitary operators $\\{F^{(1)},{J},F^{(2)}\\}$ are constructed from
elements of an Abelian subgroup of the $n$-fold Pauli group. For the case of
$SU(2^{3})$, these operators are given by [see Eq. (3.14)],

$\displaystyle F^{(1)}$ $\displaystyle=$
$\displaystyle\mathrm{e}^{-\mathrm{i}(c_{1}XXZ+c_{2}YYZ+c_{3}ZZZ)}$
$\displaystyle=$
$\displaystyle\mathrm{e}^{-\mathrm{i}c_{1}XXZ}\mathrm{e}^{-\mathrm{i}c_{2}YYZ}\mathrm{e}^{-\mathrm{i}c_{3}ZZZ}$
$\displaystyle F^{(2)}$ $\displaystyle=$
$\displaystyle\mathrm{e}^{-\mathrm{i}c_{4}XXZ}\mathrm{e}^{-\mathrm{i}c_{5}YYZ}\mathrm{e}^{-\mathrm{i}c_{6}ZZZ}$
$\displaystyle J$ $\displaystyle=$
$\displaystyle\mathrm{e}^{-\mathrm{i}(a_{1}XXX+a_{2}YYX+a_{3}ZZX+a_{4}IIX)}$
(A.8) $\displaystyle=$
$\displaystyle\mathrm{e}^{-\mathrm{i}a_{1}XXX}\mathrm{e}^{-\mathrm{i}a_{2}YYX}\mathrm{e}^{-\mathrm{i}a_{3}ZZX}\mathrm{e}^{-\mathrm{i}a_{4}IIX}.$

Following a simple prescription in [129], we can construct quantum circuits to
implement $F^{(1)},F^{(2)}$ and $J$ by suitably combining the simple circuits
given in Fig. LABEL:fig:circuits. The full encoding unitary $U$ given in Eq.
(A.7) is then composed from the circuits for $F^{(1)}$, $F^{(2)}$ and $J$ as
given in Fig. A.2.

(a)  Figure A.2:  Circuits for (a) $F^{(1(2))}$ and (b) $J$ for $SU(2^{3})$.
Fig. A.2 indicates that the encoding circuits are made up of cnot gates and
single qubit unitaries which are rotations about $z$ axis on the Bloch sphere
by angles $\alpha_{i}$ determined by the search parameters. In other words,
once we obtain the optimal code, we can easily encode into the desired
subspace by only changing the rotation angle about the $z$ axis, while keeping
the rest of the components in the encoding circuit fixed.

###  A.3 Optimal codes for the amplitude-damping channel

We list in Table A.1, A.2 the optimal codes obtained using our numerical
search, for the standard amplitude-damping channel, whose performance has been
described in the plots in Fig. 3.1.

Encoding | $|0_{L}\rangle$ | $|1_{L}\rangle$
---|---|---
3-qubit unstructured |  $\begin{pmatrix}-0.426+0.235\mathrm{i}\\\ 0.040-0.415\mathrm{i}\\\ 0.014+0.084\mathrm{i}\\\ -0.312+0.323\mathrm{i}\\\ 0.021+0.278\mathrm{i}\\\ 0.089+0.167\mathrm{i}\\\ -0.303+0.038\mathrm{i}\\\ -0.403+0.108\mathrm{i}\\\ \end{pmatrix}$ |  $\begin{pmatrix}0.275+0.103\mathrm{i}\\\ 0.248+0.191\mathrm{i}\\\ 0.116-0.116\mathrm{i}\\\ 0.008-0.194\mathrm{i}\\\ 0.429+0.266\mathrm{i}\\\ -0.066-0.269\mathrm{i}\\\ -0.086+0.305\mathrm{i}\\\ -0.488-0.285\mathrm{i}\\\ \end{pmatrix}$
4-qubit unstructured | $\begin{pmatrix}0.448+0.236\mathrm{i}\\\ -0.066+0.134\mathrm{i}\\\ -0.052+0.003\mathrm{i}\\\ -0.044-0.027\mathrm{i}\\\ -0.037+0.058\mathrm{i}\\\ 0.313+0.048\mathrm{i}\\\ -0.338-0.057\mathrm{i}\\\ 0.001-0.060\\\ 0.006-0.114\mathrm{i}\\\ -0.310-0.088\mathrm{i}\\\ -0.356-0.073\mathrm{i}\\\ 0.020-0.004\mathrm{i}\\\ 0.059-0.004\mathrm{i}\\\ 0.041-0.002\mathrm{i}\\\ -0.038+0.040\\\ 0.412+0.250\end{pmatrix}$ | $\begin{pmatrix}0.379-0.350\\\ -0.012+0.001\mathrm{i}\\\ -0.040+0.042\mathrm{i}\\\ 0.027-0.038\mathrm{i}\\\ 0.038-0.024\mathrm{i}\\\ -0.170+0.292\mathrm{i}\\\ 0.191-0.321\mathrm{i}\\\ 0.027-0.053\mathrm{i}\\\ 0.031-0.041\mathrm{i}\\\ 0.200-0.276\mathrm{i}\\\ 0.210-0.290\\\ 0.027+0.077\mathrm{i}\\\ -0.014+0.033\mathrm{i}\\\ 0.098+0.013\mathrm{i}\\\ 0.022+0.026\mathrm{i}\\\ 0.356-0.276\mathrm{i}\end{pmatrix}$
Table A.1:  Optimal unstructured codes for amplitude-damping channel plotted in Fig. 3.1. Encoding | $|0_{L}\rangle$ | $|1_{L}\rangle$
---|---|---
3-qubit structured |  $\begin{pmatrix}-0.013+0.076\mathrm{i}\\\ -0.587+0.370\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0.026+0.052\mathrm{i}\\\ 0.385+0.601\mathrm{i}\\\ \end{pmatrix}$ |  $\begin{pmatrix}0\\\ 0\\\ -0.152+0.056\mathrm{i}\\\ -0.330-0.177\mathrm{i}\\\ 0.491+0.763\mathrm{i}\\\ -0.044-0.095\mathrm{i}\\\ 0\\\ 0\\\ \end{pmatrix}$
4-qubit structured | $\begin{pmatrix}0.580-0.352\mathrm{i}\\\ 0.026-0.210\\\ 0.027+0.040\\\ -0.001+0.042\mathrm{i}\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ -0.014+0.030\\\ -0.056+0.025\mathrm{i}\\\ 0.134-0.166\mathrm{i}\\\ 0.048+0.662\mathrm{i}\end{pmatrix}$ | $\begin{pmatrix}0\\\ 0\\\ 0\\\ 0\\\ 0.186+0.028\mathrm{i}\\\ -0.353+0.178\mathrm{i}\\\ -0.434-0.017\mathrm{i}\\\ -0.099+0.059\mathrm{i}\\\ -0.191+0.123\mathrm{i}\\\ 0.071-0.511\mathrm{i}\\\ -0.346+0.379\mathrm{i}\\\ 0.051+0.157\mathrm{i}\\\ 0\\\ 0\\\ 0\\\ 0\end{pmatrix}$
Table A.2:  Optimal structured codes for amplitude-damping channel plotted in
Fig. 3.1.

##  Appendix B Channel-adapted recovery for state transfer over $1$-d spin
chains

###  B.1 Effect of the noise channel $\widetilde{\mathcal{E}}_{AD}$ on the
$4$-qubit code

We note the following structure for the Kraus operators of the $4$-qubit
channel, by expanding them in the $4$-qubit computational basis. First, we
note that the only Kraus operator diagonal in the computational basis is
$E_{0}^{\otimes 4}$, with diagonal entry $e^{ij\Theta}|f_{r,s}^{N}(t)|^{j}$,
corresponding to those basis vectors with $j$ $1$’s in them. All the other
operators are off-diagonal matrices with support on some subset of
computational basis states. For example, a three-qubit error operator
(involving $E_{1}$ in three of the four qubits) is of the form,

$E_{0}\otimes E_{1}^{\otimes
3}=(1-|f^{N}_{r,s}(t)|^{2})^{3/2}|0000\rangle\langle
0111|+e^{i\Theta}|f^{N}_{r,s}(t)|(1-|f^{N}_{r,s}(t)|^{2})^{3/2}|1000\rangle\langle
1111|.$ (B.1)

The remaining three-qubit errors are of the same form, with the strings
$\\{0111,1000\\}$ replaced by their permutations. Similarly, an operator which
has $E_{1}$ errors on two of the qubits is a linear combination of the form,

$\displaystyle E_{0}^{\otimes 2}\otimes E_{1}^{\otimes 2}$ $\displaystyle=$
$\displaystyle(1-|f^{N}_{r,s}(t)|^{2})|0000\rangle\langle
0011|+e^{2i\Theta}|f^{N}_{r,s}(t)|^{2}(1-|f^{N}_{r,s}(t)|^{2})|1100\rangle\langle
1111|$ (B.2)
$\displaystyle+e^{i\Theta}|f^{N}_{r,s}(t)|(1-|f^{N}_{r,s}(t)|^{2})\left(|0100\rangle\langle
0111|+|1000\rangle\langle 1011|\right).$

Other two-qubit error operators are realized by replacing the strings
$\\{0011,1100,0100,1000\\}$ with permutations thereof. A single-qubit error
operator, with $E_{1}$ error on only one of the qubits has the form,

$\displaystyle E_{0}^{\otimes 3}\otimes E_{1}$ $\displaystyle=$
$\displaystyle\sqrt{1-|f^{N}_{r,s}(t)|^{2}}|0000\rangle\langle 0001|+$ (B.3)
$\displaystyle
e^{i\Theta}|f^{N}_{r,s}(t)|\sqrt{1-|f^{N}_{r,s}(t)|^{2}}(|0010\rangle\langle
0011|+|0100\rangle\langle 0101|+|1000\rangle\langle 1001|)$ $\displaystyle+$
$\displaystyle
e^{2i\Theta}|f^{N}_{r,s}(t)|^{2}\sqrt{1-|f^{N}_{r,s}(t)|^{2}}\left(|1100\rangle\langle
1101|+|0110\rangle\langle 0111|+|1010\rangle\langle 1011|\right)$
$\displaystyle+e^{3i\Theta}|f^{N}_{r,s}(t)|^{3}\sqrt{1-|f^{N}_{r,s}(t)|^{2}}|1110\rangle\langle
1111|.$

Finally, the four-qubit error operator $E_{1}^{\otimes 4}$ is of the form,

$E_{1}^{\otimes 4}=(1-|f^{N}_{r,s}(t)|^{2})^{2}|0000\rangle\langle 1111|.$
(B.4)

We next explicitly write out the operator
$\small{\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P)}$ in the computational
basis of the $4$-qubit space.

$\displaystyle\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P)=$
$\displaystyle\left[\begin{array}[]{*{16}c}\mathcal{Q}_{1}&0&0&0&0&0&0&0&0&0&0&0&0&0&0&e^{-4i\Theta}\,\mathcal{Q}_{17}\\\
0&\mathcal{Q}_{2}&0&0&0&0&0&0&0&0&0&0&0&0&0&0\\\
0&0&\mathcal{Q}_{3}&0&0&0&0&0&0&0&0&0&0&0&0&0\\\
0&0&0&\mathcal{Q}_{4}&0&0&0&0&0&0&0&0&\mathcal{Q}_{18}&0&0&0\\\
0&0&0&0&\mathcal{Q}_{5}&0&0&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&\mathcal{Q}_{6}&0&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&\mathcal{Q}_{7}&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&\mathcal{Q}_{8}&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&\mathcal{Q}_{9}&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&\mathcal{Q}_{10}&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&\mathcal{Q}_{11}&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&0&\mathcal{Q}_{12}&0&0&0&0\\\
0&0&0&\mathcal{Q}_{18}&0&0&0&0&0&0&0&0&\mathcal{Q}_{13}&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&0&0&0&\mathcal{Q}_{14}&0&0\\\
0&0&0&0&0&0&0&0&0&0&0&0&0&0&\mathcal{Q}_{15}&0\\\
e^{4i\Theta}\,\mathcal{Q}_{17}&0&0&0&0&0&0&0&0&0&0&0&0&0&0&\mathcal{Q}_{16}\\\
\end{array}\right],$ (B.21)

with $\\{\mathcal{Q}_{i}\\}$ denoting polynomial functions of the transition
amplitude $|f^{N}_{r,s}(t)|$. In terms of the rank-$1$ projectors onto the
computational basis states, we may write
$\small{\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P)}$ as,

$\displaystyle\small{\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)}=\sum_{i=1}^{16}\mathcal{Q}_{i}|i\rangle\langle
i|+e^{-4i\Theta}\mathcal{Q}_{17}|0000\rangle\langle 1111|$
$\displaystyle+e^{i4\Theta}\mathcal{Q}_{17}|1111\rangle\langle
0000|+\mathcal{Q}_{18}(|1100\rangle\langle 0011|+|0011\rangle\langle 1100|),$
(B.22)

wherein
$|i\rangle\in\\{|0000\rangle,\ldots,|0100\rangle,\ldots,|1111\rangle\\}$
denote the computational basis states of the $4$-qubit space.

Similarly, we can also express the pseudo-inverse
$\small{\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P)^{-1/2}}$ in the $4$-qubit
computational basis, as follows.

$\displaystyle\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P)^{-1/2}=$
$\displaystyle{\scriptstyle\left[\begin{array}[]{*{16}c}\mathcal{G}_{1}&0&0&0&0&0&0&0&0&0&0&0&0&0&0&e^{-4i\Theta}\,\mathcal{G}_{17}\\\
0&\mathcal{G}_{2}&0&0&0&0&0&0&0&0&0&0&0&0&0&0\\\
0&0&\mathcal{G}_{3}&0&0&0&0&0&0&0&0&0&0&0&0&0\\\
0&0&0&\mathcal{G}_{4}&0&0&0&0&0&0&0&0&\mathcal{G}_{18}&0&0&0\\\
0&0&0&0&\mathcal{G}_{5}&0&0&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&\mathcal{G}_{6}&0&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&\mathcal{G}_{7}&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&\mathcal{G}_{8}&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&\mathcal{G}_{9}&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&\mathcal{G}_{10}&0&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&\mathcal{G}_{11}&0&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&0&\mathcal{G}_{12}&0&0&0&0\\\
0&0&0&\mathcal{G}_{18}&0&0&0&0&0&0&0&0&\mathcal{G}_{13}&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&0&0&0&\mathcal{G}_{14}&0&0\\\
0&0&0&0&0&0&0&0&0&0&0&0&0&0&\mathcal{G}_{15}&0\\\
e^{4i\Theta}\,\mathcal{G}_{17}&0&0&0&0&0&0&0&0&0&0&0&0&0&0&\mathcal{G}_{16}\\\
\end{array}\right],}$ (B.39)

with $\\{\mathcal{G}_{i}\\}$ denoting a set of polynomials in
$|f^{N}_{r,s}(t)|$. In terms of the rank-$1$ projectors onto the computational
basis states, we have,

$\displaystyle\small{\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}}=\sum_{i=1}^{16}\mathcal{G}_{i}|i\rangle\langle
i|+e^{-4i\Theta}\mathcal{G}_{17}|0000\rangle\langle 1111|$
$\displaystyle+e^{i4\Theta}\mathcal{G}_{17}|1111\rangle\langle
0000|+\mathcal{G}_{18}(|1100\rangle\langle 0011|+|0011\rangle\langle 1100|).$
(B.40)

Upon sandwiching the operator in Eq. (B.40) between the different error
operators of the four-qubit noise channel (as described in Eqs. (B.1), (B.2),
(B.3), (B.4)) and their adjoints, it is easy to see that the phases cancel out
everywhere. In other words, the Kraus operators of the composite channel
comprising noise and recovery are all independent of the phase $\Theta$ of the
transition amplitude.

###  B.2 $\Theta$-cancellation in
$\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4}\right)$

######  Theorem 4.

The composite map
$\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4}\right)$ with the Kraus operators given in Eq. 4.16 is independent of
$\Theta$, for any choice of the code space $\mathcal{C}$ in a $4$-qubit
Hilbert space.

###### Proof.

In order to prove this theorem we need to show that the Kraus operators of the
composite map
$\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4}\right)$
=$\\{\small{P\left(E^{(4)}_{j}\right)^{\dagger}}\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}E^{(4)}_{i}P\\}$ given in Eq. 4.16 are independent of $\Theta$,
where $\\{E_{i}^{(4)}\\}$ are the Kraus operators of the map
$\widetilde{\mathcal{E}}_{AD}^{\otimes 4}$ and are realized as four-fold
tensor products of $E_{0}$, $E_{1}$ given in Eq. 4.7. In other words, it is
enough to show that
$\small{\left(E^{(4)}_{j}\right)^{\dagger}}\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}E^{(4)}_{i}$ $\forall$ $\\{i,j\\}$ is independent of $\Theta$,
since the projection $P$ on the code space has no dependence on $\Theta$.

Recall from Eq. 4.7 that the Kraus operators $\\{E_{0},E_{1}\\}$ of the
single-qubit noisy channel $\widetilde{\mathcal{E}}_{AD}$ are of the form,

$\displaystyle E_{0}$ $\displaystyle=$ $\displaystyle|0\rangle\langle
0|+f_{r,s}^{N}(t)|1\rangle\langle 1|$ $\displaystyle E_{1}$ $\displaystyle=$
$\displaystyle|0\rangle\langle 1|\sqrt{1-|f_{r,s}^{N}(t)|^{2}}$ (B.41)

where $f_{r,s}^{N}(t)$=$|f_{r,s}^{N}(t)|e^{i\Theta}$. The action of these
Kraus operators in Eq. 4.7 and their adjoint on the standard basis, i.e the
eigenbasis of Pauli Z operator, can be given as,

$\displaystyle E_{0}^{\dagger}|0\rangle$ $\displaystyle=$
$\displaystyle|0\rangle$ $\displaystyle E_{0}^{\dagger}|1\rangle$
$\displaystyle=$ $\displaystyle|f_{r,s}^{N}(t)|e^{-i\Theta}|1\rangle$
$\displaystyle E_{1}^{\dagger}|0\rangle$ $\displaystyle=$
$\displaystyle\sqrt{1-|f_{r,s}^{N}(t)|^{2}}|1\rangle$ $\displaystyle
E_{1}^{\dagger}|1\rangle$ $\displaystyle=0$ (B.42)

Similarly,

$\displaystyle\langle 0|E_{0}$ $\displaystyle=$ $\displaystyle\langle 0|$
$\displaystyle\langle 1|E_{0}$ $\displaystyle=$
$\displaystyle|f_{r,s}^{N}(t)|e^{i\Theta}\langle 1|$ $\displaystyle\langle
0|E_{1}$ $\displaystyle=$ $\displaystyle\sqrt{1-|f_{r,s}^{N}(t)|^{2}}\langle
1|$ $\displaystyle\langle 1|E_{1}$ $\displaystyle=0$ (B.43)

Observe that operators of the form $\\{E_{i}^{(4)\dagger}PE_{j}^{(4)}\\}$, can
always be expanded as a matrix with real entries, in the basis,

$\displaystyle\\{e^{i(a+b+c+d)\Theta}|a\ b\ c\ d\rangle\langle m\ n\ q\
r|e^{-i(m+n+q+r)\Theta}\\}$ $\displaystyle=\\{|0000\rangle\langle
0000|,|0000\rangle\langle 0001|e^{-i\Theta},|0000\rangle\langle
0010|e^{-i\Theta},\ldots,|1111\rangle\langle 1111|\\}$

where $\\{a,b,c,d,m,n,q,r\\}\in\\{0,1\\}$, irrespective of the choice for the
codespace $\mathcal{C}$. This choice of the operator basis is particularly due
to the way the $\\{E_{i}^{(4)}\\}$ act on the standard basis
$\\{|0000\rangle,|0001\rangle,\ldots,|1111\rangle\\}$. Hence, we can always
represent $(\widetilde{\mathcal{E}}_{AD}^{\otimes 4}(P))^{-1/2}$ in the same
operator basis. Note that
$E_{i}^{(4)\dagger}(\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P))^{-1/2}E_{j}^{(4)}$ can then be expanded in terms of the following
elements,

$E_{i}^{(4)\dagger}e^{i(a+b+c+d)\Theta}|a\ b\ c\ d\rangle\langle m\ n\ q\
r|e^{-i(m+n+q+r)\Theta}E_{j}^{(4)}$ (B.44)

Based on the set of Eqs. B.2, B.2, carefully observe that the Kraus operators
$\\{E_{i}^{(4)}\\}$ that contribute to Eq. B.44 are those that tend to cancel
the appropriate $\Theta$ contribution coming from the basis elements in Eq.
B.2, thereby leaving the term
$E_{i}^{(4)\dagger}(\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P))^{-1/2}E_{j}^{(4)}$ independent of $\Theta$.

Here is an example which illustrates the $\Theta$ cancellation. Consider the
case where $a=0,b=0,c=1,d=1,m=0,n=1,q=1,r=1$ in Eq. B.44 as given below.

$E_{i}^{(4)\dagger}e^{i2\Theta}|0011\rangle\langle
0111|e^{-i3\Theta}E_{j}^{(4)}$ (B.45)

We should necessarily have the combinations of the following form, in order to
contribute to Eq. B.45.

$\left(\\_\ \ \otimes\\_\ \ \otimes E_{0}^{\dagger}\otimes
E_{0}^{\dagger}\right)(e^{i2\Theta}0011\rangle\langle
0111|e^{-i3\Theta})\left(\\_\ \ \otimes E_{0}\otimes E_{0}\otimes
E_{0}\right).$ (B.46)

The blank spaces in Eq. B.46 can be filled with either $E_{0}$ or $E_{1}$,
which would act on $|0\rangle$ and hence will not lead to a new
$\Theta$-dependant factor, as can be seen in Eq. B.2, B.2. Therefore Eq. B.46
is independent of $\Theta$. The same argument holds for each operator element
in Eq. B.44, thereby leaving
$\\{\small{\left(E^{(4)}_{j}\right)^{\dagger}}\widetilde{\mathcal{E}}_{AD}^{\otimes
4}(P)^{-1/2}E^{(4)}_{i}\\}$ and hence
$\left(\mathcal{R}_{P}^{(4)}\circ\widetilde{\mathcal{E}}_{AD}^{\otimes
4}\right)$ independent of $\Theta$. ∎

###  B.3 $4$-qubit numerical structured code

We present here the codewords of the $4$-qubit code obtained via our numerical
search procedure described in Chapter 3, for the amplitude-damping channel
that arises in the context of state transfer over the $1$-d Heisenberg chain.
The performance of the corresponding state transfer protocol is shown in Fig.
4.2.

$|0\rangle_{L}$=$\begin{pmatrix}0.2618-0.6116\mathrm{i}\\\
0.0000-0.0740\mathrm{i}\\\ -0.3098+0.0389\mathrm{i}\\\
0.0000+0.0786\mathrm{i}\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\ 0\\\
0.0960-0.0112\mathrm{i}\\\ -0.0000+0.1473\mathrm{i}\\\
0.2209-0.0093\mathrm{i}\\\ 0.0000+0.6069\mathrm{i}\\\ \end{pmatrix}$
$|1\rangle_{L}$=$\begin{pmatrix}0\\\ 0\\\ 0\\\ 0\\\ 0.0000-0.1827\mathrm{i}\\\
0.5116-0.2553\mathrm{i}\\\ -0.0000-0.3948\mathrm{i}\\\
-0.2770-0.1778\mathrm{i}\\\ -0.0000+0.1036\mathrm{i}\\\
0.1211-0.4826\mathrm{i}\\\ 0.0000+0.3189\mathrm{i}\\\
0.1153+0.0473\mathrm{i}\\\ 0\\\ 0\\\ 0\\\ 0\\\ \end{pmatrix}$

###  B.4 Distribution of the transition amplitude for a disordered $XXX$ chain

Here we derive the distribution of the transition amplitude
$f^{N}_{r,s}(t,\\{\Delta_{k}\\})$ for the disordered $XXX$ chain described in
Eq. (4.19), as a function of time $t$ and disorder strength $\delta$. Recall
that the transition amplitude between the $r^{\rm th}$ and $s^{\rm th}$ site
for the disordered Hamiltonian $\mathcal{H}_{\rm dis}$ is given by,

$f^{N}_{r,s}(t,\\{\Delta_{k}\\})=\langle\textbf{r}|e^{-i(\mathcal{H}_{o}+\mathcal{H}_{\delta})t}|\textbf{s}\rangle=\langle\textbf{r}|e^{-i\mathcal{H}_{o}t}\mathcal{T}\left[\exp{\left(-i\int_{0}^{t}e^{i\mathcal{H}_{o}t^{\prime}}\,\mathcal{H_{\delta}}\,e^{-i\mathcal{H}_{o}t^{\prime}}dt^{\prime}\right)}\right]|\textbf{s}\rangle,$
(B.47)

where $\mathcal{T}$ denotes the time-ordering operator. We first expand the
time-ordered perturbation series in Eq. (B.47) as follows,

$\displaystyle f^{N}_{r,s}(t,\\{\Delta_{k}\\})$ $\displaystyle=$
$\displaystyle\sum_{k=1}^{N}\langle\textbf{r}|e^{-i\mathcal{H}_{o}t}|\textbf{k}\rangle\langle\textbf{k}|\mathcal{T}\left[e^{(-i\int_{0}^{t}e^{i\mathcal{H}_{o}t^{\prime}}\mathcal{H_{\delta}}e^{-i\mathcal{H}_{o}t^{\prime}}dt^{\prime})}\right]|\textbf{s}\rangle$
(B.48) $\displaystyle=$
$\displaystyle\sum_{k=1}^{N}f^{N}_{r,k}(t)\langle\textbf{k}|\,I-iO(\mathcal{H}_{\delta})+\frac{i^{2}}{2!}O(\mathcal{H}_{\delta}^{2})+\ldots\,|\textbf{s}\rangle$

where,
$f^{N}_{r,k}(t)=\langle\textbf{r}|e^{-i\mathcal{H}_{o}t}|\textbf{k}\rangle$ is
the transition amplitude in the absence of disorder. Expanding the first order
term ($O(\mathcal{H}_{\delta})$) as a time-ordered form, we have,

$\displaystyle\langle\textbf{k}|O(\mathcal{H}_{\delta})|\textbf{s}\rangle$
$\displaystyle=$
$\displaystyle\int_{0}^{t}\langle\textbf{k}|e^{i\mathcal{H}_{o}t^{\prime}}\mathcal{H}_{\delta}e^{-i\mathcal{H}_{o}t^{\prime}}|\textbf{s}\rangle
dt^{\prime}$ (B.49) $\displaystyle=$
$\displaystyle\sum_{l,m=1}^{N}\int_{0}^{t}\langle\textbf{k}|e^{i\mathcal{H}_{o}t^{\prime}}|\textbf{l}\rangle\langle\textbf{l}|\mathcal{H}_{\delta}|\textbf{m}\rangle\langle\textbf{m}|e^{-i\mathcal{H}_{o}t^{\prime}}|\textbf{s}\rangle
dt^{\prime}$

where,

$\langle\textbf{l}|\mathcal{H}_{\delta}|\textbf{m}\rangle=\frac{\overline{J}}{2}\left(\sum_{i=1}^{N-1}(u_{i}^{l}\Delta_{i})\delta_{lm}-2\Delta_{l}\delta_{m(l+1)}-2\Delta_{l-1}\delta_{m(l-1)}\right),$
(B.50)

with the coefficients $u^{l}_{i}\in\\{\pm 1\\}$. For example,
$\mathcal{H}_{\delta}$ for a $4$-qubit spin chain is a tridiagonal matrix of
the form,

$\mathcal{H}_{\delta}=\frac{\overline{J}}{2}\left(\begin{array}[]{cccc}-\Delta_{1}-\Delta_{2}+\Delta_{3}&-2\Delta_{3}&0&0\\\
-2\Delta_{3}&-\Delta_{1}+\Delta_{2}+\Delta_{3}&-2\Delta_{2}&0\\\
0&-2\Delta_{2}&\Delta_{1}+\Delta_{2}-\Delta_{3}&-2\Delta_{1}\\\
0&0&-2\Delta_{1}&\Delta_{1}-\Delta_{2}-\Delta_{3}\\\ \end{array}\right).$

Substituting the form of $\mathcal{H}_{\delta}$ in Eq. (B.50) to the first
order term in Eq. (B.48), and setting $\overline{J}=1$ throughout, we get,

$\displaystyle f^{N}_{r,s}(t,\\{\Delta_{k}\\})=f_{r,s}^{N}(t)$
$\displaystyle-$
$\displaystyle\frac{i}{2}\int_{0}^{t}\sum_{l,k=1}^{N}f^{N}_{r,k}(t)(f^{N}_{k,l}(t^{\prime}))^{*}f^{N}_{l,s}(t^{\prime})(\sum_{i=1}^{N-1}u_{i}^{l}\Delta_{i})dt^{\prime}$
$\displaystyle-$
$\displaystyle\frac{i}{2}\int_{0}^{t}\sum_{l=1}^{N-1}\sum_{k=1}^{N}f^{N}_{r,k}(t)(f^{N}_{k,l}(t^{\prime}))^{*}f^{N}_{l+1,s}(t^{\prime})(-2\Delta_{l})dt^{\prime}$
$\displaystyle-$
$\displaystyle\frac{i}{2}\int_{0}^{t}\sum_{l=1}^{N-1}\sum_{k=1}^{N}f^{N}_{r,k}(t)(f^{N}_{k,l+1}(t^{\prime}))^{*}f^{N}_{l,s}(t^{\prime})(-2\Delta_{l})dt^{\prime}.$

Thus, up to first order in perturbation, $f^{N}_{r,s}(t,\\{\Delta_{k}\\})$ is
simply a linear combination of the random variables $\\{\Delta_{k}\\}$, of the
form,

$f^{N}_{r,s}(t,\\{\Delta_{k}\\})=f^{N}_{r,s}(t)+\sum_{i=1}^{N-1}c^{N}_{i}(t)\Delta_{i},$
(B.51)

where $\\{c^{N}_{i}(t)\\}$ are complex coefficients given by,

$\displaystyle c^{N}_{i}(t)$ $\displaystyle=$
$\displaystyle-\frac{i}{2}\sum_{k=1}^{N}f^{N}_{r,k}(t)\left[\int_{0}^{t}\sum_{l=1}^{N}u_{i}^{l}(f^{N}_{k,l}(t^{\prime}))^{*}f^{N}_{l,s}(t^{\prime})dt^{\prime}\right]$
$\displaystyle-$
$\displaystyle\frac{i}{2}\sum_{k=1}^{N}f^{N}_{r,k}(t)\left[2\int_{0}^{t}(f^{N}_{k,i}(t^{\prime}))^{*}f^{N}_{i+1,s}(t^{\prime})dt^{\prime}-2\int_{0}^{t}(f^{N}_{k,i+1}(t^{\prime}))^{*}f^{N}_{i,s}(t^{\prime})dt^{\prime}\right].$

We first note that in the limit of large $N$, the distribution of
$f^{N}_{r,s}(t)$ tends towards a normal distribution. This is a direct
consequence of the central limit theorem, since $\\{\Delta_{i}\\}$ are i.i.d
random variables. In what follows, we will obtain the exact form of the
distribution of $f^{N}_{r,s}(t,\\{\Delta_{k}\\})$, specifically, the real and
imaginary parts of $f^{N}_{r,s}(t,\\{\Delta_{k}\\})$ in terms of $N,t$ and
$\delta$.

Since the $\\{\Delta_{i}\\}$ are randomly drawn from a uniform distribution
between $\left[-\delta,\delta\right]$, the joint probability density
$P\left(\Delta_{1},\Delta_{2},\ldots,\Delta_{N}\right)$ is given by,

$P\left(\,\Delta_{1},\Delta_{2},\ldots,\Delta_{N-1}\,\right)=\left\\{\begin{array}[]{cc}\frac{1}{(2\delta)^{N-1}},&-\delta\leq\Delta_{i}\leq\delta,\;\forall
i=1,2,\ldots,N-1.\\\ 0,&{\rm otherwise}.\end{array}\right.$ (B.53)

Let $x\equiv\texttt{Re}[f^{N}_{r,s}(t,\\{\Delta_{k}\\})]$ and
$y\equiv\texttt{Im}[f^{N}_{r,s}(t,\\{\Delta_{k}\\})]$ denote the real and
imaginary parts of the transition amplitude in Eq. (B.51). Then, we may obtain
the distribution of $x$ and $y$ as follows:

$\displaystyle\mathcal{P}^{\delta,t,N}(x)$ $\displaystyle=$
$\displaystyle\int_{\Delta_{1}=-\delta}^{\delta}\ldots\int_{\Delta_{N-1}=-\delta}^{\delta}\left(\prod_{i=1}^{N-1}d\Delta_{i}\right)P(\Delta_{1},\Delta_{2},\ldots,\Delta_{N-1})\,$
$\displaystyle\delta\left(x-(\,\texttt{Re}[f^{N}_{r,s}(t)]+\sum_{i=1}^{N-1}\texttt{Re}[c^{N}_{i}(t)]\Delta_{i})\right),$
$\displaystyle\mathcal{P}^{\delta,t,N}(y)$ $\displaystyle=$
$\displaystyle\int_{\Delta_{1}=-\delta}^{\delta}\ldots\int_{\Delta_{N-1}=-\delta}^{\delta}\left(\prod_{i=1}^{N-1}d\Delta_{i}\right)P(\Delta_{1},\Delta_{2},\ldots,\Delta_{N-1})\,$
$\displaystyle\delta\left(y-(\,\texttt{Im}[f^{N}_{r,s}(t)]+\sum_{i=1}^{N-1}\texttt{Im}[c^{N}_{i}(t)]\Delta_{i})\right).$

Replacing the Dirac delta functions with their Fourier transforms, and then
integrating out the $\\{\Delta_{k}\\}$ variables, we get,

$\displaystyle\mathcal{P}^{\delta,t,N}(x)$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2\pi}(2\delta)^{N-1}}\int_{\Delta_{1}=-\delta}^{\delta}\ldots\int_{\Delta_{N-1}=-\delta}^{\delta}\int_{k=-\infty}^{\infty}\prod_{i=1}^{N-1}d\Delta_{i}dk$
$\displaystyle\exp{\left(-ik\left(x-\left[\,\texttt{Re}[f^{N}_{r,s}(t)]+\sum_{i=1}^{N-1}\texttt{Re}[c^{N}_{i}(t)]\Delta_{i}\right]\right)\right)}$
$\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2\pi}(2\delta)^{N-1}}\int_{k=-\infty}^{\infty}dk\exp{\left(-ik(\,x-\texttt{Re}[f^{N}_{r,s}(t)]\,)\right)}$
$\displaystyle\prod_{i=1}^{N-1}\frac{2\sin\left(k\delta\,\texttt{Re}[c^{N}_{i}(t)]\right)}{k\,\texttt{Re}[c^{N}_{i}(t)]}$
$\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2\pi}(2\delta)^{N-1}}\int_{k=-\infty}^{\infty}dk\exp{\left(-ik(\,x-\texttt{Re}[f^{N}_{r,s}(t)]\,)\right)}$
$\displaystyle\prod_{i=1}^{N-1}\frac{e^{i\left(k\delta\,\texttt{Re}[c^{N}_{i}(t)]\right)}-e^{-i\left(k\delta\,\texttt{Re}[c^{N}_{i}(t)]\right)}}{ik\,\texttt{Re}[c^{N}_{i}(t)]}$
$\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2\pi}(2\delta)^{N-1}}\int_{k=-\infty}^{\infty}dk\exp{\left(-ik(\,x-\texttt{Re}[f^{N}_{r,s}(t)]\,)\right)}$
$\displaystyle\frac{\sum_{j=1}^{2^{N-1}}(-1)^{\alpha_{j}}e^{i(k\,\delta\sum_{i=1}^{N-1}(-1)^{r_{i}^{j}}\texttt{Re}[c^{N}_{i}(t)])}}{(ik)^{N-1}\,\prod_{i=1}^{N-1}\texttt{Re}[c^{N}_{i}(t)]},$

where, $\alpha_{j},r_{i}^{j}\in[0,1],\;\forall i,j$. Simplifying further, we
get,

$\displaystyle\mathcal{P}^{\delta,t,N}(x)$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2\pi}(2\delta)^{N-1}\prod_{i=1}^{N-1}\texttt{Re}[c^{N}_{i}(t)]}$
(B.54)
$\displaystyle\int_{k=-\infty}^{\infty}dk\frac{\sum_{j=1}^{2^{N-1}}(-1)^{\alpha_{j}}\exp{\left(-ik(\,x-\texttt{Re}[f^{N}_{r,s}(t)]+\delta\sum_{i=1}^{N-1}(-1)^{r^{j}_{i}}\texttt{Re}[c^{N}_{i}(t)])\right)}}{{(ik)}^{N-1}}$
$\displaystyle=$
$\displaystyle\left(\frac{1}{(2\delta)^{N-1}}\right)\left(\frac{1}{\prod_{i=1}^{N-1}\texttt{Re}[c^{N}_{i}(t)]}\right)\sum_{j=1}^{2^{N-1}}(-1)^{u_{j}}(q_{j})^{N-2}\,{\rm
Sign}[q_{j}],$

where $u_{j}\in[0,1]$, and
$q_{j}(x,\texttt{Re}[f^{N}_{r,s}(t)],\\{\texttt{Re}[c^{N}_{i}(t)]\\})$ are
linear combinations of the form,

$q_{j}\equiv
x-\texttt{Re}[f^{N}_{r,s}(t)]+\delta\sum_{i=1}^{N-1}(-1)^{r_{i}^{j}}\texttt{Re}[c^{N}_{i}(t)],\;r_{i}^{j}\in[0,1],\;\forall
i=1,\ldots,N-1.$ (B.55)

We may evaluate the distribution of the imaginary part of the transition
amplitude in a similar fashion, to get,

$\mathcal{P}^{\delta,t,N}(y)=\left(\frac{1}{(2\delta)^{N-1}}\right)\left(\frac{1}{\prod_{i=1}^{N-1}\texttt{Im}[c^{N}_{i}(t)]}\right)\sum_{i=1}^{2^{N-1}}(-1)^{u_{j}}(\tilde{q}_{j})^{N-2}\,{\rm
Sign}[\tilde{q}_{j}],$ (B.56)

where the
$\tilde{q}_{j}(x,\texttt{Im}[f^{N}_{r,s}(t)],\\{\texttt{Im}[c^{N}_{i}(t)]\\})$
are linear combinations of the form,

$\tilde{q}_{j}\equiv
y-\texttt{Im}[f^{N}_{r,s}(t)]+\delta\sum_{i=1}^{N-1}(-1)^{r_{i}^{j}}\texttt{Im}[c^{N}_{i}(t)],\;r_{i}^{j}\in[0,1],\;\forall
i=1,\ldots,N-1.$ (B.57)

We see from Eq. (B.4) that the limiting distribution in the case of no
disorder ($\delta\rightarrow 0$), is indeed a delta distribution peaked around
$\texttt{Re}[f^{N}_{r,s}(t)]$:

$\lim_{\delta\rightarrow
0}\mathcal{P}^{\delta,t,N}(x)=\frac{1}{\sqrt{2\pi}}\int_{k=-\infty}^{\infty}dk\exp{\left(-ik(\,x-\texttt{Re}[f^{N}_{r,s}(t)]\,)\right)}=\delta\left(x-\texttt{Re}[f^{N}_{r,s}(t)]\right).$
(B.58)

Figure B.1: Distribution of $\texttt{Im}[f_{8,1}^{8}(t^{*},\\{\Delta_{k}\\})]$
over different disorder realizations drawn from a uniform distribution with
disorder strengths $\delta=0.001$ and $\delta=1$, respectively.

Finally, we compute the disorder-averaged value of the transition amplitude
upto $O(\mathcal{H}_{\delta}^{2})$. We first modify the expression in Eq.
(B.51) to include the second-order perturbation terms:

$f^{N}_{r,s}(t,\\{\Delta_{k}\\})=f_{r,s}^{N}(t)+\sum_{i=1}^{N-1}c^{N}_{i}(t)\Delta_{i}+\sum_{i,j=1}^{N-1}d^{N}_{ij}\Delta_{i}\Delta_{j}+\ldots,$
(B.59)

where $\\{d^{N}_{ij}\\}$ are complex coefficients which are convolutions of
the zero-disorder transition amplitude, similar to $\\{c^{N}_{i}(t)\\}$. Next,
using the fact that the random couplings $\\{\Delta_{i}\\}$ are drawn from a
uniform distribution, we obtain,

$\displaystyle\langle f^{N}_{r,s}(t,\\{\Delta_{k}\\})\rangle_{\delta}$
$\displaystyle=$
$\displaystyle\frac{1}{(2\delta)^{N-1}}\int_{-\delta}^{\delta}\left(f^{N}_{r,s}(t)+\sum_{i=1}^{N-1}c^{N}_{i}(t)\Delta_{i}+\sum_{l,m=1}^{N-1}d^{N}_{lm}(t)\Delta_{l}\Delta_{m}+\ldots\right)\prod_{i=1}^{N-1}d\Delta_{i}$
(B.60) $\displaystyle=$ $\displaystyle
f^{N}_{r,s}(t)+\frac{\delta^{2}}{3}\sum_{i}d^{N}_{ii}(t)+O(\delta^{4}).$

The second moment of $f^{N}_{r,s}(t,\\{\Delta_{k}\\})$,

$\displaystyle\left\langle\,(f^{N}_{r,s}(t,\\{\Delta_{k}\\}))^{2}\,\right\rangle_{\delta}$
$\displaystyle=$
$\displaystyle\frac{1}{(2\delta)^{N-1}}\int_{-\delta}^{\delta}\left(f^{N}_{r,s}(t)+\sum_{i=1}^{N-1}c^{N}_{i}(t)\Delta_{i}+\sum_{l,m=1}^{N-1}d^{N}_{lm}(t)\Delta_{l}\Delta_{m})+\ldots\right)^{2}$
(B.61) $\displaystyle\prod_{i=1}^{N-1}d\Delta_{i}$ $\displaystyle=$
$\displaystyle(f^{N}_{r,s}(t))^{2}+\frac{\delta^{2}}{3}\left(2f^{N}_{r,s}(t)\sum_{l=1}^{N-1}d^{N}_{ll}(t)+\sum_{j=1}^{N-1}(c^{N}_{j}(t))^{2}\right)$
$\displaystyle+\frac{\delta^{4}}{5}\sum_{l=1}^{N-1}(d^{N}_{ll}(t))^{2}+\frac{\delta^{4}}{9}\sum_{l\neq
m=1}^{N-1}(d^{N}_{lm}(t))^{2}+O(\delta^{6}).$

We can now calculate the variance from Eq B.60 and Eq B.61 as follows:

$\displaystyle{\rm Var}[f^{N}_{r,s}(t,\\{\Delta_{k}\\})]$ $\displaystyle=$
$\displaystyle\langle\,(f^{N}_{r,s}(t,\\{\Delta_{k}\\}))^{2}\,\rangle_{\delta}-\langle
f^{N}_{r,s}(t,\\{\Delta_{k}\\})\rangle^{2}_{\delta}$ (B.62) $\displaystyle=$
$\displaystyle\frac{\delta^{2}}{3}\sum_{j=1}^{N-1}(c^{N}_{j}(t))^{2}+$
$\displaystyle\delta^{4}\left(\frac{1}{5}\sum_{l=1}^{N-1}(d^{N}_{ll}(t))^{2}+\frac{1}{9}\sum_{l\neq
m=1}^{N-1}(d^{N}_{lm}(t))^{2}-\frac{1}{9}\left(\sum_{l=1}^{N-1}d^{N}_{ll}(t)\right)^{2}\right)$
$\displaystyle+O(\delta^{6}).$

To summarize, from Eq. (B.60) we see that as $\delta\rightarrow 0$, $\langle
f^{N}_{r,s}(t,\\{\Delta_{k}\\})\rangle_{\delta}$ approaches the zero-disorder
value $f^{N}_{r,s}(t)$. As expected, the variance given in Eq. (B.62) vanishes
in this limit. However as the disorder strength $\delta$ increases, $\langle
f^{N}_{r,s}(t,\\{\Delta_{k}\\})\rangle_{\delta}$ deviates from the no-disorder
case, and the variance also starts growing since terms of $O(\delta^{2})$
become increasingly significant now.

##  Appendix C Threshold calculation using $[[4,1]]$ code

###  C.1 Fault tolerance proofs

Here, we present the detailed proofs of the fault tolerance of the various
basic encoded gadgets presented in Sec. 5.3 of the main text.

####  C.1.1 ec unit

######  Lemma 5 (Properties of the ideal ec unit).

If the ec unit described in Fig. 5.1 has no fault, it takes an input with at
most one damping error to an output with no errors.

###### Proof.

Our error-correction gadget in Fig. 5.1 has been designed such that the no-
damping error and the single-qubit damping errors point to a unique syndrome
bit string $\\{s,t,u,h\\}$ or $\\{s,t,v,g\\}$, as tabulated in Tab. 5.1.

Finally, the recovery unit $\mathcal{R}$ in Fig. 5.3 maps the input state back
to a state in the code subspace. Thus our error correction unit without any
fault maps an input with upto single-qubit damping errors into the codespace
perfectly. ∎

We next show that a faulty ec unit does not lead to any errors beyond the
single-qubit damping errors.

######  Lemma 6 (Properties of a faulty ec unit).

If the ec unit in Fig. 5.1 contains at most one fault, it takes an input state
with no errors to a state with at most a single damping error.

Figure C.1: A faulty parity measurement unit, where the faults are marked in
red for the data qubits and blue for the ancilla qubits

###### Proof.

Our ec unit consists of a syndrome measurement unit followed by a recovery
unit as given in Fig. 5.1. Unless atleast one of the syndrome bits $s$ or $t$
record an odd parity, the subsequent units are not triggered. Consider a
single fault in the parity measurement part of the syndrome extraction unit
given in Fig. C.1.

  * •

A faulty cnot in the control at location $1$ in Fig. C.1 will take an incoming
state without any error to an output with single-qubit damping error as given
below.

$a|0\rangle_{L}+b|1\rangle_{L}\rightarrow a|0111\rangle+b|0100\rangle$ (C.1)

where $\\{|0\rangle_{L},|1\rangle_{L}\\}\in\mathcal{C}$, and
$|a|^{2}+|b|^{2}=1$. However, one may not correct for this error because
syndrome bit $s=0$ in this case.

  * •

A faulty cnot in the target at location $2$ in Fig. C.1 will take an incoming
state without any error to an output with partial superposition as given below

$a|0\rangle_{L}+b|1\rangle_{L}\rightarrow a|1111\rangle+b|1100\rangle$ (C.2)

In this case one obtains an odd parity outcome where $s=1$, following which
one obtains $u=1$, $h=1$. Finally, one passes the state through the recovery
unit $\mathcal{R}$ in Fig. 5.3 to rebuild the superposition.

  * •

A faulty cnot both in the control (location $1$) and target (location $2$)
will take an incoming state without any error to an output with single-qubit
damping error as given below.

$a|0\rangle_{L}+b|1\rangle_{L}\rightarrow a|0111\rangle+b|0100\rangle.$ (C.3)

In this case we have $s=1$, therefore subsequent units are triggered recording
an outcome $u=0$, $h=1$. One then passes through the recovery to correct for
the error. Note that we extract additional syndrome bits $h,g$ in order to
distinguish between the two instances of a faulty cnot in Fig. C.1: (a) one
with the fault both on control (location $1$) and target (location $2$),
leading to a damping error at the output and (b) a faulty cnot at the target
(location $2$) in Fig. C.1, leading to a state with partial superposition on
the codespace.

  * •

A faulty $Z$ measurement on the ancilla will not introduce any error to the
already error-free incoming state. This is because the ancilla qubit would
already be in $|0\rangle$ just before the $Z$ measurement for an error-free
incoming state.

We note that similarly, the other faulty locations in Fig. C.1 will lead to at
most one single damping error at the output. For an incoming state without any
error, the parity check units in Fig. 5.1 and the recovery unit in Fig. 5.3
are triggered only when there is atleast one fault in the parity measurement
unit in Fig. C.1. Therefore, the ec unit with a single fault propagates at
most single damping error at the output for an incoming state without any
error.

∎

####  C.1.2 Bell-state preparation unit

######  Lemma 7 (Properties of the Bell-state preparation unit).

If the preparation unit in Fig. 5.5 has no faults, it propagates an input with
upto one single-qubit damping error to an output with at most one single-qubit
damping error. A faulty unit in Fig. 5.5, with at most single damping fault
propagates an incoming state with no error to an output with at most one
single-qubit damping error.

###### Proof.

We now explain how the circuits in Fig. 5.4 and Fig. 5.5 lead to a fault-
tolerant preparation of the Bell state $|\beta_{00}\rangle$.

  * •

If any of the Hadamard gates turns out to be faulty while preparing two copies
of the Bell state $|\beta_{00}\rangle$ in Fig. 5.4, we obtain an odd parity
outcome in the $X$ measurements in the verifier, in which case we reject the
prepared state.

  * •

A fault in any other location in the verifier in Fig. 5.5 will show up as an
odd parity outcome during the $Z$ measurement, in which case we reject the
prepared Bell state.

  * •

When there are no faults at all, both $X$ measurements as well as $Z$
measurements show an even parity outcome, in which case we accept the prepared
Bell state.

∎

####  C.1.3 Logical $X$ measurement

We next prove that the $\overline{X}$ measurement unit satisfies the following
fault tolerance properties.

######  Lemma 8 (Properties of the $\overline{X}$ measurement unit).

If the $\overline{X}$ measurement unit in Fig. 5.6 has no faults, it leads to
a correctable classical outcome when it measures an incoming state with at
most one single-qubit damping error. When a faulty $\overline{X}$ measurement
unit, with at most a single damping fault measures an incoming state with no
error, it leads to a classical outcome that is correctable.

###### Proof.

Note that after the action of the two cnots between the ancilla qubits at the
top and the four (data) qubits in Fig. 5.6, the joint state of the system is
given by,

$\displaystyle|\beta_{00}^{d}\rangle^{\otimes 3}(a|\beta_{00}^{\rm
anc}\rangle^{\otimes 2}+b|\beta_{10}^{\rm anc}\rangle^{\otimes 2})$
$\displaystyle+|\beta_{10}^{d}\rangle^{\otimes 3}(a|\beta_{00}^{\rm
anc}\rangle^{\otimes 2}-b|\beta_{10}^{\rm anc}\rangle^{\otimes 2}).$ (C.4)

Amongst the three copies of Bell pairs, one copy refers to the state of the
ancilla qubits at the top and the other two refer to the state of the
remaining four data qubits. We now discuss all possible single fault scenarios
below.

  * •

When there is no fault anywhere, the ($X$, $Z$) measurements in Fig. 5.6 lead
to (a) three copies of the outcome $(0,0)$ while projecting the four data
qubits onto the state $a|+\rangle_{L}+b|-\rangle_{L}$, or, (b) three copies of
$(1,0)$, in which case the data qubits are projected onto the state
$a|+\rangle_{L}-b|-\rangle_{L}$. Thus, in the ideal case, our circuit in Fig.
5.6 realises a logical $\overline{X}$ measurement. Note that the measurement
outcomes $0$ and $1$ correspond to $+1$ and $-1$ eigenstates, respectively, of
the measurement operators in Fig. 5.6.

  * •

Observe that whenever there is a fault anywhere within the unit in Fig. 5.6,
or an error in the incoming state, the ($X$, $Z$) measurements at the end in
Fig. 5.6 will lead to outcomes of the form $(0,1)$, $(1,0)$ or $(1,1)$. This
is due to the realisation of a different Bell pair, namely,
$|\beta_{01}\rangle$ or $|\beta_{11}\rangle$, as a result of the fault.
However, we note that this can still be detected and corrected.

Thus the measurement of logical operator $\overline{X}$ in Fig. 5.6 is
tolerant upto single-qubit damping errors thereby satisfying the desired
properties. ∎

####  C.1.4 Logical $X$ operation

######  Lemma 9 (Properties of the $\overline{X}$ gadget).

A logical $\overline{X}$ gadget without any faults, propagates an input with
at most one single-qubit damping error to an output with at most one single-
qubit damping error. A logical $\overline{X}$ gadget with at most a single
damping fault propagates an incoming state with no error to an output with at
most one single-qubit damping error.

###### Proof.

We demonstrate how the logical $X$ gadget described in Fig. 5.7 is tolerant
against single-qubit damping errors. We need six ancillas initialized to
$|0\rangle$ to establish the action of the logical $X$ operation on the
incoming encoded state $|\Psi\rangle$. The joint state of the system, which is
any arbitrary single qubit state in the codespace $|\psi\rangle$ and two
ancillas initialized to $|0\rangle$ is given by

$\displaystyle|\psi\rangle|00\rangle=(a|0\rangle_{L}+b|1\rangle_{L})|00\rangle$

where $a,b$ define any arbitrary single qubit state, satisfying
$|a|^{2}+|b|^{2}=1$ and $\\{|0\rangle_{L},|1\rangle_{L}\\}$ $\in$
$\mathcal{C}$. Note that the first four qubits represent the data qubits and
the last two qubits represent the ancillas. The joint state of the data qubits
$|\Psi\rangle$ and the ancillas after the action of two cnots is given by

$\displaystyle a(|0000\rangle{|00\rangle}+|1111\rangle{|11\rangle})$
$\displaystyle+b(|0011\rangle{|11\rangle}+|1100\rangle{|00\rangle})/\sqrt{2}$

A single fault at this stage can be detected by the parity check bits $s,t$
and corrected by the recovery unit $\mathcal{R}_{Z}$ in Fig. 5.7.
Specifically, we may consider the following faulty cases that may occur until
this stage:

  * •

A faulty cnot (at both control and target) leads to

$a|1101\rangle|01\rangle+b|0001\rangle|01\rangle$

  * •

A faulty cnot (at control) leads to

$a|1101\rangle|11\rangle+b|0001\rangle|11\rangle$

  * •

A faulty cnot (at target) leads to

$a|1111\rangle|01\rangle+b|0011\rangle|01\rangle$

  * •

An incoming state with an error

$(a|1101\rangle+b|0001\rangle)|01\rangle$

The parity measurements on the last two data qubits (leading to outcome $s$)
and on the two ancilla qubits (leading to parity check bit $t$) trigger
another pair of parity checks, denoted by the bits $u$ and $h$, as shown in
Fig. 5.7. Depending on the outcomes $s,t,u,h$, we apply local $X$ gates to
correct the system state and then pass through the recovery unit
$\mathcal{R}_{Z}$ (described earlier in Sec. 5.3.1) to obtain the state
$a|1\rangle_{L}+b|0\rangle_{L}$.

In case there is no fault detected by the $s,t$ parity checks, we proceed to
the ec’ unit in Fig. 5.8. This unit applies four local $X$ gates (two each on
the data qubits and the ancilla qubits) to implement the logical
$\overline{X}$ operation. This is followed by another parity check unit, whose
outcomes $x,y$ trigger an ec unit, thus ensuring that that the data qubits are
finally in the state $a|1\rangle_{L}+b|0\rangle_{L}$.

Thus the logical $\overline{X}$ gadget is tolerant upto single-qubit damping
errors, thereby satisfying the desired fault tolerance properties. ∎

####  C.1.5 Logical cphase operation

######  Lemma 10 (Properties of the cphase gadget).

If the cphase gadget in Fig. 5.10 does not have any faults, it propagates an
input with upto one single-qubit damping error to an output with at most one
single-qubit damping error. A faulty cphase gadget in Fig. 5.10, with at most
one single damping fault, propagates an incoming state with no errors to an
output with upto one single-qubit damping error.

###### Proof.

Consider the case of a damping error propagating through a two-qubit cphase
gate, as shown in Fig. C.2.

Figure C.2: a) Propagation of a damping error $E_{1}$ before the control (top)
and b) target (bottom) of a cphase gate.

Note that in Fig. C.2, an incoming damping error right before the control as
well as target propagates as a damping error $E_{1}$ and a phase error $Z$,
both of which are correctable by the ec unit, as explained in Sec. 5.3.1.
Furthermore, the additional $Z$ error in one of the blocks due to a damping
error in the other block can be corrected by the $\mathcal{R}_{Z}$ units at
the of the cphase gadget. Hence, our transversal cphase gadget satisfies the
desired fault tolerance properties. ∎

###  C.2 Pseudothreshold Calculation

We describe here the details of our pseudothreshold calculation, for the
memory unit and the extended cz unit. We assume that the inputs to the units
do not have any errors and explicitly count the total number of malignant
faults of $O(p^{2})$ which will cause a given unit to fail. These malignant
faults include phase faults $Z$ and two-qubit damping errors.

####  C.2.1 Total number of locations within a EC unit

We first count the total number of locations within our ec-unit, which is
redrawn here for clarity.

Figure C.3: ec unit with parity measurements (red box to the left, we call
this part $1$), the rest of the unit involving remaining syndrome extraction
and recovery unit $\mathcal{R}$ (blue box to the right, call this part $2$)

There are $10$ cnots, $4$ $Z$ measurements, $1$ $X$ measurement, $1$
preparation of $\left|{+}\right\rangle$, $1$ $X$, $1$ $Z$, and $24$ rest
locations adding to a total of $42$ locations. There are $14$ locations in
part $1$ and $28$ locations in part $2$.

Note that the syndrome extraction unit in part $2$ could apply to any pair of
qubits depending on the outcome $s$ and $t$. Similarly the $Z$ gate in part
$2$ could be applied to any of the four data qubits depending on the syndrome
bits and the outcome $c$, although we present a specific case of damping and
$Z$ application in Fig. C.3. We explain our calculation with one specific case
of damping as depicted in Fig. C.3 since the threshold calculation does not
change with the other cases of damping. Furthermore, counting of fault
locations is easier to explain with a specific case of damping.

####  C.2.2 Memory Pseudothreshold

We now calculate the pseudothreshold for the memory unit in Fig. 5.17. We
first count the malignant fault pairs due to two damping faults (assuming a
no-error input to the memory unit) leading to an output that is uncorrectable.
This could happen in one of three possible ways: (1) two damping faults could
occur within the ec units, (2) both faults could occur within the resting
qubits, or, (3) one fault in the ec unit and one fault in the resting qubits.
We now enumerate the number of malignant pairs in each of the three cases.

  1. 1.

Malignant pairs within a ec unit: We count the total number of malignant pairs
within a ec block. There are totally $14$ locations in the parity measurements
part of a ec unit in Fig. C.3. Fault pairs in the same data qubit lines are
not malignant because this will not lead to more than a single damping error
at the output. Therefore we have $3\times 4=12$ such benign pairs, where there