have access to the environment. This means that the computer is no longer in a
so-called ‘pure’ state but must be described as a statistical mixture of
different pure states. In general, the state of a quantum system (or at least
our knowledge of the quantum state) must be described not by a ray in Hilbert
space but rather by a Hermitian density matrix

$\hat{\rho}=\sum_{j}p_{j}|\psi_{j}\rangle\langle\psi_{j}|,$ (103)

representing a statistical mixture of different states $|\psi_{j}\rangle$ that
occur with probabilities $p_{j}$ obeying

$\sum_{j}p_{j}=1.$ (104)

It is important to note that the $|\psi_{j}\rangle$ are normalized, but _not_
necessarily orthogonal.

Prove that $\mathrm{Tr}\,\hat{\rho}=\sum_{j}p_{j},$ (105) even when the states
$|\psi_{j}\rangle$ are not orthogonal. Prove that $\hat{\rho}$ is positive
semi-definite. That is, show that $\langle\psi|\hat{\rho}|\psi\rangle\geq
0,\forall\,|\psi\rangle.$ (106)

The density matrix gives us all the information needed to compute the
expectation value of any observable. Quantum errors associated with unitary
coupling to unobserved degrees of freedom (i.e., a bath) are non-unitary
‘quantum operations’ [19]. As noted in Sec. 3.2, quantum error correction can
still work in this case. Here we pursue this topic in more detail and
generality. Non-unitary quantum operations create impure states which must be
described by a density matrix. Before we further explore the formalism to
correct such quantum errors we must first learn how they cause the density
matrix to evolve. Because quantum operations are the most general
transformations (unitary or non-unitary) that can be applied to a quantum
system, we will find that both errors and error recovery are quantum
operations.

The density matrix $\hat{\rho}$ is a semi-positive-definite Hermitian matrix
with real non-negative eigenvalues and unit trace. Unitary evolution under the
Hamiltonian and non-unitary dissipative or error processes occurring during
some time interval $\Delta t$ must preserve these properties. Such
transformations of the density matrix are called completely-positive trace-
preserving (CPTP) maps. In the so-called Kraus representation, a CPTP map is
given by

$\hat{\rho}^{\prime}=\hat{\rho}(t+\Delta
t)=\sum_{\ell}\hat{K}^{\phantom{\dagger}}_{\ell}\hat{\rho}(t)\hat{K}^{\dagger}_{\ell}.$
(107)

As we show later in eqn (233), knowledge of the Kraus representation of this
CPTP map for small time intervals gives us the Lindblad master equation.

Working in the interaction picture of the nominal Hamiltonian, the set of
Kraus operators $\mathcal{E}=\\{\hat{K}_{0},\hat{K}_{1},\hat{K}_{2},\ldots\\}$
describe the transformation of the state under various errors resulting from
Hamiltonian parameter deviations from their ideal values or from coupling to a
bath. Even if some (or all) of the Kraus operators are non-unitary, in order
for the trace to be preserved, it must still be true that

$\sum_{\ell}\hat{K}^{\dagger}_{\ell}\hat{K}^{\phantom{\dagger}}_{\ell}=\hat{I},$
(108)

where $\hat{I}$ is the identity. This follows from the invariance of the trace
under cyclic permutations of the operators.

Now consider an arbitrary vector $|\Phi\rangle$ in the Hilbert space and
define a set of ‘daughter’ states via
$|\Phi_{\ell}\rangle=K_{\ell}^{\dagger}|\Phi\rangle$. Then we see that for all
$|\Phi\rangle$

$\sum_{\ell}\langle\Phi|\hat{K}^{\phantom{\dagger}}_{\ell}\hat{\rho}(t)\hat{K}^{\dagger}_{\ell}|\Phi\rangle=\sum_{\ell}\langle\Phi_{\ell}|\hat{\rho}|\Phi_{\ell}\rangle\geq
0.$ (109)

Since this is true for all possible vectors $|\Phi\rangle$, the Kraus map is
thus completely positive as well as trace preserving, as required.

As an example, consider a two-level qubit. Suppose that during the time
interval $\Delta t$ it has probability $p_{z}$ to suffer a phase flip, and
probability $p_{x}$ to suffer a bit flip. (Notice that these are both unitary
errors.) The set of error operators is888We will see shortly that the Kraus
operators are not unique and any transformation among them corresponding to a
unitary ‘rotation’ produces fully equivalent description of the dynamics.

$\displaystyle\hat{K}_{x}$ $\displaystyle=$
$\displaystyle\sqrt{p_{x}}\,\sigma_{x}$ (110) $\displaystyle\hat{K}_{z}$
$\displaystyle=$ $\displaystyle\sqrt{p_{z}}\,\sigma_{z}$ (111)
$\displaystyle\hat{K}_{0}$ $\displaystyle=$
$\displaystyle\sqrt{1-p_{x}-p_{z}}\,\hat{I},$ (112)

where $\hat{K}_{0}$ describes the case of no error and is necessary to include
so that eqn (108) is satisfied. Notice the important fact that

$\langle\hat{K}^{\dagger}_{k}\hat{K}^{\phantom{\dagger}}_{k}\rangle=\mathrm{Tr}\,\left[\hat{K}^{\phantom{\dagger}}_{k}\hat{\rho}(t)\hat{K}^{\dagger}_{k}\right]=p_{k}$
(113)

gives the probability that the $k$th error will occur. Equation (108)
guarantees that the probabilities add up to unity.

As a second example, suppose that during the time interval $dt$ a qubit has
probability

$p^{-}=\gamma dt$ (114)

for the excited state $|e\rangle$ to decay to the ground state $|g\rangle$.
This irreversible decay is an example of a non-unitary error, and is referred
to as the qubit amplitude damping channel [66]. The decay could for example be
the result of spontaneous emission of a photon into a cold bath. Once the
photon leaves, there are no thermal photons available to be absorbed and
reverse the decay. The set of error operators is

$\displaystyle\hat{K}_{-}$ $\displaystyle=$
$\displaystyle\sqrt{p^{-}}\,\sigma^{-}=\sqrt{p^{-}}\,|g\rangle\langle e|$
(115) $\displaystyle\hat{K}_{0}$ $\displaystyle=$
$\displaystyle\sqrt{1-p^{-}}|e\rangle\langle e|+|g\rangle\langle g|.$ (116)

This follows from eqn (108) and the fact that
$\sigma^{+}\sigma^{-}=|e\rangle\langle e|$. Under the action of this error
set, the density matrix $\hat{\rho}$ transforms to

$\hat{\rho}^{\prime}=\\{|e\rangle[(1-p^{-})\rho_{ee}]\langle
e|\\}+\\{|g\rangle[p^{-}\rho_{ee}+\rho_{gg}]\langle
g|\\}+\sqrt{1-p^{-}}\\{|e\rangle\rho_{eg}\langle g|+|g\rangle\rho_{ge}\langle
e|\\}.$ (117)

Notice that we have defined $p^{-}$ as the probability that a downward jump
will occur if the qubit is in the excited state. The actual probability that a
jump will occur is given by

$\bar{p}^{-}=\langle\hat{K}^{\dagger}_{-}\hat{K}^{\phantom{\dagger}}_{-}\rangle=p^{-}\rho_{ee}.$
(118)

If the time interval is short so that the jump probability is small ($p^{-}\ll
1$), then $\sqrt{1-p^{-}}\approx 1-\frac{p^{-}}{2}$ and

$\hat{K}_{0}\approx\hat{I}-\frac{p^{-}}{2}|e\rangle\langle e|.$ (119)

In this limit, eqn (117) yields

$\displaystyle\langle g|\hat{\rho}^{\prime}|e\rangle$ $\displaystyle\approx$
$\displaystyle\left[1-\frac{p^{-}}{2}\right]\langle g|\hat{\rho}|e\rangle$
(120) $\displaystyle\langle e|\hat{\rho}^{\prime}|e\rangle$ $\displaystyle=$
$\displaystyle\left[1-p^{-}\right]\langle e|\hat{\rho}|e\rangle,$ (121)

showing that the off-diagonal elements of the density matrix decay at half the
rate of the diagonal elements, essentially because they represent amplitudes
instead of probabilities. This is the origin of the factor of 2 in the
standard NMR expression for the decay of transverse spin components

$\frac{1}{T_{2}}=\frac{1}{2T_{1}}+\frac{1}{T_{\varphi}},$ (122)

where $1/T_{\varphi}$ is the intrinsic dephasing rate (associated with the
jump operator $\sigma^{z}$ and not included in our example above). Roughly
speaking, the off-diagonal elements decay like amplitudes and the diagonal
elements decay like probabilities (squares of amplitudes).

One important feature of the Kraus representation to keep in mind is that it
is _not_ unique. Suppose that we define new Kraus operators via

$\hat{F}_{j}=\sum_{k}U_{jk}\hat{K}_{k},$ (123)

where $U$ is a unitary transformation. Then it is straightforward to show that

$\sum_{j}\hat{K}^{\phantom{\dagger}}_{j}\hat{\rho}\hat{K}^{\dagger}_{j}=\sum_{j}\hat{F}^{\phantom{\dagger}}_{j}\hat{\rho}\hat{F}^{\dagger}_{j}.$
(124)

This fact will prove useful when we study the Knill-Laflamme conditions which
quantum codes need to satisfy in order to be error correctable.

Construct a pair of Kraus operators that define the qubit reset operation.
Reset is a non-unitary operation that maps every vector in the Hilbert space
to the ground state, $|g\rangle$. Be sure that your result is trace
preserving. Consider the initial state described by a Bloch polarization
vector $\vec{S}$ living either on the surface or in the interior of the Bloch
sphere $\hat{\rho}=\frac{1}{2}\\{\hat{I}+\vec{S}\cdot\vec{\sigma}\\}.$ (125)
Prove that $\langle\vec{\sigma}\rangle=\vec{S}$. Find the new Bloch vector
after application of the error set given in eqns (110-112). Prove eqn (124).
Hint: Be very careful evaluating $\left\\{U\hat{K}\right\\}^{\dagger}$.

###  4.1 Quantum Codes and the Knill-Laflamme Condition

The generic task of quantum error correction is to find two logical codewords
(two orthogonal quantum states forming a logical qubit) $|W_{\sigma}\rangle$,
where $\sigma=\uparrow,\downarrow$, embedded in a large Hilbert space. The
codewords are required to be robust such that if any one of the errors
$\hat{K}_{k}$ in the set of Kraus operators $\mathcal{E}$ occurs, no quantum
information is lost and any quantum superposition of the logical codewords can
be faithfully recovered. (Note that some of the Kraus operators may correspond
to errors on multiple physical qubits within the logical qubit.)

In order for the code to be quantum error correctable, the logical codewords
must satisfy the quantum error correction criteria [19, 67], known also as the
Knill-Laflamme conditions [40, 68]

$\langle
W_{\sigma}|\hat{K}_{\ell}^{\dagger}\hat{K}^{\phantom{\dagger}}_{k}|W_{\sigma^{\prime}}\rangle=\alpha_{\ell
k}\delta_{\sigma{\sigma^{\prime}}},$ (126)

for all $\hat{K}^{\phantom{\dagger}}_{\ell},\hat{K}^{\phantom{\dagger}}_{k}$
in $\mathcal{E}$, where $\alpha_{\ell k}$ are entries of a Hermitian matrix
that is required to be independent of the logical words (i.e., not depend on
$\sigma,\sigma^{\prime}$). This is a general condition that applies to all
possible codes, not just stabilizer codes.

The independence of the entries $\alpha_{\ell k}$ from the logical codewords
and the structure of the non-diagonal entries guarantee that the different
errors are distinguishable and correctable. To understand the Knill-Laflamme
conditions let us first consider the Kronecker delta. This guarantees that the
states

$\displaystyle\hat{K}^{\phantom{\dagger}}_{k}|W_{\uparrow}\rangle$ (127)
$\displaystyle\hat{K}^{\phantom{\dagger}}_{\ell}|W_{\downarrow}\rangle$ (128)

are orthogonal. Without that we would not be able to diagnose whether the
system had been in state $|W_{\downarrow}\rangle$ and suffered error
$\hat{K}^{\phantom{\dagger}}_{k}$ or had been in state $|W_{\uparrow}\rangle$
and suffered error $\hat{K}^{\phantom{\dagger}}_{\ell}$, because the two
scenarios lead to states which are not orthogonal to each other and therefore
not distinguishable. This means that the _distance_ $d$ of the code must be
large enough that $\left\lfloor(d-1)/2\right\rfloor$ exceeds the weight of the
worst (i.e., highest-weight) error in the error set; that is,
$2\,\mathrm{maxweight}(\hat{K}^{\phantom{\dagger}}_{k})\leq(d-1)$.

The fact that the matrix $\alpha$ is not necessarily diagonal, means that we
cannot tell which error occurred. However this problem can be resolved by
using the fact that the Kraus representation is not unique. Applying the
transformation in eqn (123) with an appropriately chosen unitary, we can
diagonalize the Hermitian matrix $\alpha$ to obtain

$\langle
W_{\sigma}|\hat{F}_{\ell}^{\dagger}\hat{F}^{\phantom{\dagger}}_{k}|W_{\sigma^{\prime}}\rangle=\beta_{k}\delta_{\ell
k}\delta_{\sigma{\sigma^{\prime}}},$ (129)

where $\beta_{k}$ is the $k$th (real and positive) eigenvalue of $\alpha$.
Note that

$\displaystyle P_{k}^{\downarrow}$ $\displaystyle=$ $\displaystyle\langle
W_{\downarrow}|\hat{F}_{k}^{\dagger}\hat{F}^{\phantom{\dagger}}_{k}|W_{\downarrow}\rangle$
(130) $\displaystyle P_{k}^{\uparrow}$ $\displaystyle=$ $\displaystyle\langle
W_{\uparrow}|\hat{F}_{k}^{\dagger}\hat{F}^{\phantom{\dagger}}_{k}|W_{\uparrow}\rangle$
(131)

are the probabilities that the $k$th error (in the new error basis
$\hat{F}^{\phantom{\dagger}}_{k}$) will occur for each codeword. The fact that
these probabilities are the same for both codewords

$P_{k}=P_{k}^{\uparrow}=P_{k}^{\downarrow}=\beta_{k},$ (132)

that is, that $\alpha$ and hence $\beta$ is independent of
$\sigma,\sigma^{\prime}$, is essential. Otherwise there would be a quantum
back action that would distort any linear superposition of the two codewords.

We can think of this distortion as resulting from the Bayesian update of our
knowledge of the system state when we see that a particular error has
occurred. If that error is more likely in one codeword than the other, Bayes
rule tells us we have to update our prior probability distribution to put more
weight on that codeword. To see this how this classical language translates
into quantum mechanical back action, consider a general superposition state
within the code space

$|\psi\rangle=\lambda_{\downarrow}|W_{\downarrow}\rangle+\lambda_{\uparrow}|W_{\uparrow}\rangle.$
(133)

If error $\hat{F}^{\phantom{\dagger}}_{k}$ occurs, the resulting normalized
state is

$|\psi_{k}\rangle=\frac{\hat{F}^{\phantom{\dagger}}_{k}|\psi\rangle}{\langle\psi|\hat{F}^{\dagger}_{k}\hat{F}^{\phantom{\dagger}}_{k}|\psi\rangle^{\frac{1}{2}}}.$
(134)

Before proceeding further, we note as a side remark that this means that the
density matrix conditioned on our knowledge (resulting say from some
measurement of the system or the environment) that error $k$ has occurred is

$\hat{\rho}_{k}=|\psi_{k}\rangle\langle\psi_{k}|=\frac{\hat{F}^{\phantom{\dagger}}_{k}|\psi\rangle\langle\psi|\hat{F}^{\dagger}_{k}}{\langle\psi|\hat{F}^{\dagger}_{k}\hat{F}^{\phantom{\dagger}}_{k}|\psi\rangle}.$
(135)

Notice that the normalization factor in the denominator is precisely the
probability $P_{k}$ that error $k$ will occur. Hence if we ensemble average
over all possible errors, weighted by their probability of occurrence, we
obtain the unconditional density matrix

$\hat{\rho}^{\prime}=\sum_{k}P_{k}\hat{\rho}_{k}=\sum_{k}\hat{F}^{\phantom{\dagger}}_{k}\hat{\rho}\hat{F}_{k}^{\dagger}=\sum_{k}\hat{K}^{\phantom{\dagger}}_{k}\hat{\rho}\hat{K}_{k}^{\dagger},$
(136)

in agreement with eqn (107).

Returning to the task at hand and using eqns (129-131), we find

$|\psi_{k}\rangle=\sqrt{\frac{P_{k}^{\downarrow}}{Z}}\lambda_{\downarrow}\left\\{\frac{1}{\sqrt{P_{k}^{\downarrow}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\downarrow}\rangle\right\\}+\sqrt{\frac{P_{k}^{\uparrow}}{Z}}\lambda_{\uparrow}\left\\{\frac{1}{\sqrt{P_{k}^{\uparrow}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\uparrow}\rangle\right\\}.$
(137)

Each state vector in the curly brackets is properly normalized and the two are
orthogonal. The normalization constant is given by

$Z=|\lambda_{\downarrow}|^{2}P_{k}^{\downarrow}+|\lambda_{\uparrow}|^{2}P_{k}^{\uparrow}.$
(138)

If and only if $P_{k}^{\downarrow}=P_{k}^{\uparrow}=P_{k}$, so that the error
probability is the same for the two codewords, do we obtain

$\sqrt{\frac{P_{k}^{\downarrow}}{Z}}=\sqrt{\frac{P_{k}^{\uparrow}}{Z}}=1$
(139)

so that

$|\psi_{k}\rangle=\lambda_{\downarrow}\left\\{\frac{1}{\sqrt{P_{k}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\downarrow}\rangle\right\\}+\lambda_{\uparrow}\left\\{\frac{1}{\sqrt{P_{k}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\uparrow}\rangle\right\\}.$
(140)

If the probability $P_{k}$ had depended on the codeword, the relative
coefficients in this expression would have changed, thereby distorting the
quantum information stored in the (unknown) coefficients
$\lambda_{\uparrow,\downarrow}$. In this case it is impossible to find a
unitary error-recovery operation that is independent of the values of the
unknown coefficients $\lambda_{\uparrow,\downarrow}$.

We can think of the distortion as being created by a partial measurement of
the quantum state by the environment that partially collapses the state
towards the codeword that is more likely to have that error. We can gain
intuition on this by thinking of the extreme case where error
$\hat{F}^{\phantom{\dagger}}_{k}$ can occur only for one of the codewords, say
$|W_{\downarrow}\rangle$. (That is, $\langle
W_{\downarrow}|\hat{F}_{k}^{\dagger}F^{\phantom{\dagger}}_{k}|W_{\downarrow}\rangle=P_{k}^{\downarrow}$,
$\langle
W_{\uparrow}|\hat{F}_{k}^{\dagger}F^{\phantom{\dagger}}_{k}|W_{\uparrow}\rangle=0$.)
Then if that error occurs, the state must collapse completely onto the only
codeword that is allowed to have that error

$|\psi_{k}\rangle=\frac{1}{\sqrt{P_{k}^{\downarrow}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\downarrow}\rangle,$
(141)

thereby destroying any superposition that may have existed.

If the Knill-Laflamme conditions are satisfied, and if we know that error
${\hat{F}}^{\phantom{\dagger}}_{k}$ has occurred, we can apply a particular
unitary operation based on our knowledge of which error occurred to recover
from the error. The unitary must perform the state transfers

$\displaystyle
U^{(k)}\left\\{\frac{1}{\sqrt{P_{k}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\downarrow}\rangle\right\\}$
$\displaystyle=$ $\displaystyle|W_{\downarrow}\rangle$ (142) $\displaystyle
U^{(k)}\left\\{\frac{1}{\sqrt{P_{k}}}\hat{F}^{\phantom{\dagger}}_{k}|W_{\uparrow}\rangle\right\\}$
$\displaystyle=$ $\displaystyle|W_{\uparrow}\rangle.$ (143)

Because the initial error states (in the curly brackets) are orthogonal to
each other and the restored codewords are orthogonal to each other, the angle
between the state vectors is preserved and there must exist a unitary state
transfer operation that works. Such a unitary has the form

$U^{(k)}=\frac{1}{\sqrt{P_{k}}}\left\\{|W_{\downarrow}\rangle\langle
W_{\downarrow}|\hat{F}^{\dagger}_{k}+|W_{\uparrow}\rangle\langle
W_{\uparrow}|\hat{F}^{\dagger}_{k}\right\\}+U^{(k)}_{\mathrm{completion}},$
(144)

where the last term is a matrix which determines how states other than the two
error states are mapped into each other. The details of this (non-unique)
‘unitary completion’ are largely irrelevant because we only apply this unitary
to the two particular error states that result from $F_{k}$ acting on the two
codewords.

We explore the error recovery operation more formally in the next subsection.

Prove that the 3-qubit repetition code satisfies the Knill-Laflamme conditions
for single bit-flip errors $X$, whose Kraus operators are given by eqns
(110-112) (with $p_{z}=0$), but do not satisfy them for amplitude damping
($T_{1}$ decay) errors, whose Kraus operators are given in eqns (115-116).

###  4.2 Error Recovery Operation

In the previous section, we found that if we know which error has occurred, we
can recover from that error by applying a unitary recovery operation that is
particular to that error. In a _non-degenerate_ 999In a _degenerate_ code,
more than one error leads to the same syndrome. However these errors are
equivalent up to multiplication by one of the stabilizers. Hence one can
choose to correct any of the errors in the equivalence class and fully recover
the original state up to a possible overall minus sign due to the stabilizer
multiplication. stabilizer code one can determine which error occurred simply
by measuring the full set of stabilizers. In this section we show that it is
possible to know which error occurred even for non-stabilizer codes. To
formally construct the full error recovery operation based on the Knill-
Laflamme condition, let us define the projector onto the code space

$\hat{P}_{\mathrm{c}}=\sum_{\sigma}|W_{\sigma}\rangle\langle W_{\sigma}|.$
(145)

Because the codewords are orthogonal, this is a proper projector obeying
$P_{\mathrm{c}}^{2}=P_{\mathrm{c}}$. It is convenient to express the Knill-
Laflamme conditions in terms of this projector

$\hat{P}_{\mathrm{c}}\hat{F}_{\ell}^{\dagger}\hat{F}^{\phantom{\dagger}}_{k}\hat{P}_{\mathrm{c}}=\beta_{k}\delta_{\ell
k}\hat{P}_{\mathrm{c}}.$ (146)

Error recovery is also a quantum operation given by

$\mathcal{R}\hat{\rho}^{\prime}=\sum_{\ell}\hat{R}_{\ell}^{\phantom{\dagger}}\hat{\rho}^{\prime}\hat{R}_{\ell}^{\dagger},$
(147)

with

$\hat{R}_{\ell}^{\phantom{\dagger}}=\frac{1}{\sqrt{\beta_{\ell}}}\hat{P}_{\mathrm{c}}\hat{F}_{\ell}^{\dagger}.$
(148)

Substitution of this into eqn (136) yields

$\mathcal{R}\hat{\rho}^{\prime}=\sum_{\ell,k}\frac{1}{\beta_{\ell}}\hat{P}_{\mathrm{c}}\hat{F}_{\ell}^{\dagger}\hat{F}_{k}^{\phantom{\dagger}}\hat{P}_{\mathrm{c}}\hat{\rho}\hat{P}_{\mathrm{c}}\hat{F}_{k}^{\dagger}\hat{F}_{\ell}^{\phantom{\dagger}}\hat{P}_{\mathrm{c}},$
(149)

where we have made the assumption that there are no errors initially so that

$\hat{\rho}=\hat{P}_{\mathrm{c}}\hat{\rho}\hat{P}_{\mathrm{c}}.$ (150)

Applying the Knill-Laflamme condition from eqn (146) yields

$\mathcal{R}\hat{\rho}^{\prime}=\left(\sum_{\ell}\beta_{\ell}\right)\hat{P}_{\mathrm{c}}\hat{\rho}\hat{P}_{\mathrm{c}}=\hat{\rho}.$
(151)

The above result proves that the Knill-Laflamme conditions are sufficient for
a recovery operation to exist. There remains however the question of how we
realize it in practice. For this purpose it is useful to define projectors
onto the error spaces associated with each Kraus operator

$\hat{P}_{m}=\frac{1}{\beta_{m}}\hat{F}^{\phantom{\dagger}}_{m}\hat{P}_{\mathrm{c}}\hat{F}^{\dagger}_{m}.$
(152)

Use eqn (129) to prove that the projectors onto the error subspaces obey
$\hat{P}_{m}\hat{P}_{n}=\hat{P}_{m}\,\delta_{mn}$.

Because the projection operators $\hat{P}_{m}$ are all mutually commuting and
are hermitian, they can be simultaneously measured. Because they are
projectors, their eigenvalues are either $0$ or $1$. Because they project onto
mutually orthogonal subspaces (see Ex. 4.2), no more than one can have a
measured value of $1$ (in order to guarantee $\hat{P}_{m}\hat{P}_{n}=0$ for
$m\neq n$). These projectors span the space of all possible error states,

$\sum_{m}\hat{P}_{m}={\hat{I}}_{\mathcal{E}},$ (153)

where ${\hat{I}}_{\mathcal{E}}$ is (effectively) the identity. That is, it is
the identity within the space of all the errors
$\hat{F}^{\phantom{\dagger}}_{k}$ acting on the codewords. Since
${\hat{I}}_{\mathcal{E}}$ has eigenvalue $1$, then every measurement of the
set $\\{\hat{P}_{m};m=0,1,2,\dots\\}$ will yield exactly one non-zero value.
This non-zero value uniquely flags which error state has occurred. One could
even imagine (ignoring experimental difficulties) measuring the operator

$C=\sum_{m}m\hat{P}_{m}.$ (154)

This returns integer eigenvalues which index the error number.

Once the error label has been determined to be (say) $k$, one applies the
conditional unitary $U^{(k)}$ in eqns (142-143) to the error state in eqn
(140) to recover from the error and obtain the original state in eqn (133)

$|\psi\rangle=U^{(k)}|\psi_{k}\rangle$ (155)

Here however we want to more formally discuss this using the polar
decomposition described in [19]. The polar decomposition of a complex number
into its magnitude and phase

$z=re^{i\theta}=\sqrt{z^{*}z}e^{i\theta}.$ (156)

For an operator, it turns out there is an analogous result

$\hat{R}_{\ell}^{\phantom{\dagger}}=\sqrt{R_{\ell}^{\phantom{\dagger}}R_{\ell}^{\dagger}}\,\hat{U}_{\ell},$
(157)

where $\hat{U}_{\ell}$ is a (not necessarily unique) unitary operator. It is
straightforward to verify that this expression correctly reproduces
$\hat{R}_{\ell}^{\phantom{\dagger}}\hat{R}_{\ell}^{\dagger}$. From eqn (148)
we have that

$R_{\ell}^{\phantom{\dagger}}R_{\ell}^{\dagger}=\frac{1}{\beta_{\ell}}\hat{P}_{\mathrm{c}}\hat{F}_{\ell}^{\phantom{\dagger}}\hat{F}_{\ell}^{\dagger}\hat{P}_{\mathrm{c}}=\hat{P}_{\mathrm{c}}.$
(158)

Thus

$R_{\ell}^{\phantom{\dagger}}=\sqrt{\hat{P}_{\mathrm{c}}\hat{P}_{\mathrm{c}}}\,\hat{U}_{\ell}=\hat{P}_{\mathrm{c}}\hat{U}_{\ell}$
(159)

Now notice that if we reverse the order of the operators we have

$R_{\ell}^{\dagger}R_{\ell}^{\phantom{\dagger}}=\hat{U}_{\ell}^{\dagger}\hat{P}_{\mathrm{c}}\hat{U}_{\ell}^{\phantom{\dagger}},$
(160)

and we also have that the same quantity is the projector onto the $\ell$th
error subspace

$R_{\ell}^{\dagger}R_{\ell}^{\phantom{\dagger}}=\frac{1}{\beta_{\ell}}\hat{F}_{\ell}^{\phantom{\dagger}}\hat{P}_{\mathrm{c}}\hat{F}_{\ell}^{\dagger}=\hat{P}_{\ell}.$
(161)

Combining these results we have

$\hat{U}_{\ell}^{\phantom{\dagger}}\hat{P}_{\ell}\hat{U}_{\ell}^{\dagger}=\hat{P}_{\mathrm{c}},$
(162)

proving that $U_{\ell}^{\phantom{\dagger}}$ is indeed the desired recovery
unitary that maps the error subspace back to the code space.

The above results give a formal constructive proof that quantum error
correction is possible if the code satisfies the Knill-Laflamme conditions.
Nielsen and Chuang [19] give a proof that in addition to being sufficient, the
Knill-Laflamme conditions are also necessary. The recovery operation
constructed here is not necessarily the most convenient from an experimental
point of view. This is particularly true for the case of stabilizer codes
where one only needs to measure $\log_{2}N_{\mathrm{error}}$ stabilizer values
(error syndromes) to identify which of $N_{\mathrm{error}}$ errors has
occurred. In the next subsection we will illustrate this approach for the case
of the quantum repetition code.

###  4.3 Recovery Operation for the Quantum Repetition Code

Recall from our previous discussion that the 3-qubit repetition code can
protect against (single) physical bit flip errors by using a ‘majority rule’
to determine which bit (if any) flipped. Our error model will be that each
qubit can independently flip with probability $p_{x}$. If $p_{x}$ is
sufficiently small, the possibility that two physical qubits flip is small,
and the possibility that all three flip is even smaller. As we saw in the
study of the classical repetition code, these rare events do eventually cause
the code to fail. For simplicity here, we will neglect these low probability
possibilities and take the error set to be the four leading-order Kraus
operators describing no more than 1 bit flip

$\displaystyle\hat{K}_{0}$ $\displaystyle=$
$\displaystyle\sqrt{1-3p_{x}}\,\hat{I}$ (163) $\displaystyle\hat{K}_{j}$
$\displaystyle=$ $\displaystyle\sqrt{p_{x}}\,X_{j}.$ (164)

Here $j=1,2,3$ labels which qubit flipped, and $j=0$ refers to the case where
no spins have flipped. To lowest order in $p_{x}$ the probability of an error
is $3p_{x}$ which is three times worse than for a single qubit. As noted
earlier, our error correction scheme has to overcome this factor of three just
to break even!

Let us check the Knill-Laflamme condition. Using the logical codewords from
eqns (72-73) one can readily verify that for this particular example, the
matrix $\alpha$ in eqn (126) is diagonal and independent of the codewords.

$\alpha=\left(\begin{array}[]{cccc}1-3p_{x}&0&0&0\\\ 0&p_{x}&0&0\\\
0&0&p_{x}&0\\\ 0&0&0&p_{x}\end{array}\right).$ (165)

Hence the Knill-Laflamme conditions are satisfied. This result is true only to
lowest order in $p_{x}$ because we neglected the possibility of two or three
bit flips.

Instead of defining four error subspace projectors as we did above, we will
define projectors onto the $+1$ eigenstates of the stabilizers that were
defined in eqns (76-77)

$\displaystyle\Pi_{1}$ $\displaystyle=$
$\displaystyle\frac{1}{2}\left[1+Z_{1}Z_{2}\right]$ (166)
$\displaystyle\Pi_{2}$ $\displaystyle=$
$\displaystyle\frac{1}{2}\left[1+Z_{2}Z_{3}\right].$ (167)

The recovery operation then consists of four Kraus operators

$\displaystyle R_{0}$ $\displaystyle=$ $\displaystyle\Pi_{1}\Pi_{2}$ (168)
$\displaystyle R_{1}$ $\displaystyle=$ $\displaystyle X_{1}[1-\Pi_{1}]\Pi_{2}$
(169) $\displaystyle R_{2}$ $\displaystyle=$ $\displaystyle
X_{2}[1-\Pi_{1}][1-\Pi_{2}]$ (170) $\displaystyle R_{3}$ $\displaystyle=$
$\displaystyle X_{3}\Pi_{1}[1-\Pi_{2}].$ (171)

Find the matrix $\alpha$ for the 3-qubit repetition code to all orders in
$p_{x}$ and show that beyond linear order it does not satisfy the Knill-
Laflamme conditions. Verify that the four Kraus operators in the above
recovery define a trace-preserving operation.

This section has given a brief introduction to quantum operations and the
Kraus representation of CPTP maps for qubit systems. The Knill-Laflamme
conditions are defined for an ‘exact’ QEC code: they assume a fixed error set
and give the necessary and sufficient conditions under which this error set
can be exactly corrected. This however is not a physically realistic error
model. In general for any physical system (whether bosonic or qubit based),
errors occur continuously in time and so the number of errors that can occur
in a finite time interval is effectively unbounded. However, the probability
of more than a small number of errors occurring in a short time interval
(which physically cannot be less than the time that it takes to run the QEC
protocol) is typically small. The probability that an error can occur that is
outside the correctable error set (e.g., two bit flips in the 3-bit repetition
code) is thus always finite. To summarize, an ‘exact’ QEC code does not
correct all errors, but rather all errors in a fixed set, typically defined to
include errors up to a certain specified order in a small parameter related to
the time delay between error-correction cycles.

With this fact in mind, it turns out that one can slightly relax the Knill-
Laflamme conditions by only requiring that they be satisfied up to a specified
order in the small parameter related to the time delay between error-
correction cycles. This gives us new freedom to find so-called _approximate
QEC codes_ which are still useful, despite not being ‘exact’ [66]. As an
illustration of this concept, we will consider in the next section an
approximate error correction code for qubit amplitude damping. This will be
helpful background for our later study of bosonic codes since the dominant
error for a bosonic system realized with photons (e.g. optical photons in
fibers or microwave photons stored in a superconducting resonator) is
amplitude damping–excitation loss. We extend our study of Kraus operators to
the case of continuous variable systems when we study bosonic quantum error
correction codes.

###  4.4 Four-qubit Amplitude-Damping Code

The qubit amplitude-damping channel defined above in eqns (115-116) can be
perfectly corrected against single-qubit errors using the minimal $N=5$ qubit
code [40, 41, 42], but also admits an interesting 4-qubit code [66] that
approximately satisfies the Knill-Laflamme conditions in eqn (126). The two
logical codewords are

$\displaystyle|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}[|0000\rangle+|1111\rangle$ (172)
$\displaystyle|1_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}[|1100\rangle+|0011\rangle.$ (173)

Note that both codewords have mean excitation number equal to two and so seem
equally likely to suffer an excitation loss. We will encounter this fact again
when we study the simplest ‘binomial code’ for bosonic error correction. In
point of fact, for the qubit case, the excitation loss probabilities are only
approximately equal. To see this, consider the case where the 3rd qubit
(counting from left to right) decays. Using eqns (115-116) the corresponding
4-qubit Kraus operator is

$\hat{E}_{-}^{(3)}=\hat{K}_{0}^{(1)}\hat{K}_{0}^{(2)}\hat{K}_{-}^{(3)}\hat{K}_{0}^{(4)}.$
(174)

Applying this to the codewords gives

$\displaystyle\hat{E}_{-}^{(3)}|0_{\mathrm{L}}\rangle=\frac{1}{\sqrt{2}}\sqrt{(1-p^{-})}^{3}\sqrt{p^{-}}|1101\rangle$
(175)
$\displaystyle\hat{E}_{-}^{(3)}|1_{\mathrm{L}}\rangle=\frac{1}{\sqrt{2}}\sqrt{(1-p^{-})}\sqrt{p^{-}}|0001\rangle$
(176)

The norms of these states are the probability of (only) the 3rd qubit
decaying. We see that the norms are equal only to first order in $p^{-}$. We
also see that the two error words are orthogonal, so that part of the Knill-
Laflamme condition is exactly satisfied. However, the $\alpha$ matrix in eqn
(126) does depend on the codeword if we take into account terms beyond lowest
order in $p^{-}$.

We have so far analyzed the case where it is the 3rd qubit that decays. The
remaining 3 possibilities for single-qubit decay have the same form. All of
the error words are mutually orthogonal and also orthogonal to the original
codewords, so to lowest order in $p^{-}$ the Knill Laflamme conditions are
satisfied.

Consider now the case that none of the qubits decay. Again using eqns
(115-116), this is described by the 4-qubit Kraus operator

$\hat{E}_{0}=\hat{K}_{0}^{(1)}\hat{K}_{0}^{(2)}\hat{K}_{0}^{(3)}\hat{K}_{0}^{(4)},$
(177)

whose action on the codewords is

$\displaystyle\hat{E}_{0}|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left[|0000\rangle+(1-p^{-})^{2}|1111\rangle\right]$
(178) $\displaystyle\hat{E}_{0}|1_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle(1-p^{-})\frac{1}{\sqrt{2}}\left[|1100\rangle+|0011\rangle\right].$
(179)

The norms of these two states are

$\displaystyle\langle
0_{\mathrm{L}}|\hat{E}^{\dagger}_{0}\hat{E}_{0}|0_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle\frac{1}{2}\left[1+(1-p^{-})^{4}\right]$ (180)
$\displaystyle\langle
1_{\mathrm{L}}|\hat{E}^{\dagger}_{0}\hat{E}_{0}|1_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle(1-p^{-})^{2}.$ (181)

Again, these are equal only to lowest order in $p^{-}$.

To understand the recovery unitaries, it is useful to rewrite eqn (178) as

$\hat{E}_{0}|0_{\mathrm{L}}\rangle=\frac{1}{2}[1+(1-p^{-})^{2}]|0_{\mathrm{L}}^{\phantom{\prime}}\rangle+\frac{1}{2}[1-(1-p^{-})^{2}]|0_{\mathrm{L}}^{\prime}\rangle,$
(182)

where

$|0_{\mathrm{L}}^{\prime}\rangle=\frac{1}{\sqrt{2}}\left[|0000\rangle-|1111\rangle\right].$
(183)

Taking out a factor $(1-p^{-})$ to match the one in eqn (179) and expanding
everything else to lowest order in $p^{-}$ yields

$\displaystyle\hat{E}_{0}|0_{\mathrm{L}}\rangle$ $\displaystyle\approx$
$\displaystyle(1-p^{-})\left\\{|0_{\mathrm{L}}\rangle+p^{-}|0_{\mathrm{L}}^{\prime}\rangle\right\\}$
(184) $\displaystyle\approx$
$\displaystyle(1-p^{-})\left\\{\cos\frac{\theta}{2}|0_{\mathrm{L}}\rangle+\sin\frac{\theta}{2}|0_{\mathrm{L}}^{\prime}\rangle\right\\},$
(185)

where $\theta\approx 2p^{-}$. Thus to lowest order in $p^{-}$, the recovery
operation for the non-unitary evolution associated with the ‘no-jump’
operation $\hat{E}_{0}$ is a unitary rotation that maps

$\displaystyle\cos\frac{\theta}{2}|0_{\mathrm{L}}\rangle+\sin\frac{\theta}{2}|0_{\mathrm{L}}^{\prime}\rangle\
$ $\displaystyle\rightarrow$ $\displaystyle|0_{\mathrm{L}}\rangle$ (186)
$\displaystyle|1_{\mathrm{L}}\rangle$ $\displaystyle\rightarrow$
$\displaystyle|1_{\mathrm{L}}\rangle.$ (187)

It is interesting that the code has three stabilizers

$\displaystyle S_{1}$ $\displaystyle=$ $\displaystyle Z_{1}Z_{2}$ (188)
$\displaystyle S_{2}$ $\displaystyle=$ $\displaystyle Z_{3}Z_{4}$ (189)
$\displaystyle S_{3}$ $\displaystyle=$ $\displaystyle X_{1}X_{2}X_{3}X_{4}.$
(190)

Measurement of the three error syndromes thus yields 3 classical bits of
information which should be more than enough to handle the 5 most probable
error states (no decay and four different single-qubit decays). It turns out
however that this code does not exactly satisfy the Knill-Laflamme
conditions–it does so only to lowest order in $p^{-}=\gamma dt$. It is the
first example of an _approximate quantum code_ in which the weaker condition
of satisfying the Knill-Laflamme conditions only to first order widens the
space of available codes, while still allowing error correction (to first
order) [66]. Because the Knill-Laflamme conditions are not satisfied exactly,
we cannot use simple stabilizer measurements as before. Similarly, one cannot
use the fallback procedure of measuring the projectors onto each of the error
states. Leung et al. found a different error decoding scheme which, somewhat
surprisingly, involves measurements of the states of two individual qubits
rather than any of the stabilizers. The recovery procedure leaves small errors
in the state and also fails completely if a certain intermediate measurement
result has the wrong value. However both of these errors are second order in
$p^{-}$ and hence the code corrects first-order errors. The reader is directed
to [66] for the details.

##  5 Topological Quantum Error Correction: Kitaev’s Toric Code and the
Surface Code

The so-called ‘surface code’ [69, 32] and its modern variant the XZZX code
[70, 71] for quantum error correction has received wide theoretical scrutiny
and many experimental efforts are underway to realize it to create
topologically protected logical quantum bits. The surface code concept began
with a concrete and exactly solvable many-body model for a so-called
$\mathbb{Z}_{2}$ spin liquid due to Kitaev[29] and it is this that we will
discuss in this section, closely following the discussion in [31]. The
presentation relies on topological concepts that are extensively discussed in
[31] and readers unfamiliar with these concepts may wish to skip this optional
section on first reading.

Because the different topological sectors of the model are robust against
local perturbations, the states of this model have potential application as an
error-correctable quantum memory for quantum information processing. In this
context, the model and its associated states are known as the Kitaev ‘toric
code.’ We will first treat this as a Hamiltonian problem with an interesting
topological structure in its ground state manifold. In actual applications as
a topological memory, one does not need to realize the Hamiltonian. It is
sufficient to have a set of measurement operations and single-bit Pauli
operations conditioned on the measurement results to drive the system back
into the ground state manifold when errors cause it to escape. It may also be
possible to create a special dissipative bath to autonomously cool the system
back into its ground state without active intervention.

Figure 18: Illustration of the toric code model on a square lattice. Circles
indicate the positions of spin-1/2 particles on the bonds of the lattice; $j$
labels the spin located at the center of the $j$th lattice bond; P labels a
plaquette containing a total of four spins; S labels a ‘star’ also containing
a total of four spins.

Consider a square lattice, and put a spin one-half (i.e., a qubit) in the
center of each bond of the lattice (instead of at each vertex or lattice
site!). For an $L_{x}\times L_{y}$ rectangle, there are $2L_{x}L_{y}$ spins.
We impose periodic boundary conditions, thus forming a torus. We use $s$ to
label the ‘star’ of four bonds emanating from a lattice site (or vertex), $j$
to label an individual bond and its associated spin, and $p$ to label a square
(or plaquette). Both the star and plaquette hold a total of four spins; see
Fig.18. The toric code Hamiltonian takes the form

$H_{\mathrm{tc}}=-\sum_{s}A_{s}-\sum_{p}B_{p},$ (191)

where

$A_{s}=\prod_{j\in s}\sigma^{z}_{j};\hskip 28.45274ptB_{p}=\prod_{j\in
p}\sigma^{x}_{j}.$ (192)

In the above ${j\in s}$ means the bond $j$ has $s$ as an end point, and ${j\in
p}$ means $j$ is one edge of the square $p$. As we will see shortly, each of
the $A_{s}$ and $B_{p}$ can be viewed as a stabilizer of an error correcting
code defined by the ground state manifold of this Hamiltonian.

The Hamiltonian (191) looks quite strange and unphysical, as it involves four-
instead of two-spin couplings, and the spin-rotation symmetry is badly broken.
What is important however is that it is made of (albeit complicated) local
couplings. As we will see, it captures all the universal topological
properties of $\mathbb{Z}_{2}$ spin liquids. To reveal its solvability (which
is by no means obvious), we note that all terms in (191) commute with each
other:

$[A_{s},A_{s^{\prime}}]=[B_{p},B_{p^{\prime}}]=[A_{s},B_{p}]=0.$ (193)

As a result, all eigenstates, including ground states, can be chosen to be
eigenstates of all of the $A_{s}$ and $B_{p}$. Since $A_{s}^{2}=B_{p}^{2}=1$,
they all have eigenvalues $\pm 1$ and we expect (because of the minus signs in
the Hamiltonian) a ground state to have

$A_{s}=B_{p}=1$ (194)

for every $s$ and $p$. Since we have $L_{x}L_{y}$ sites and the same number of
squares, it appears that there are $2L_{x}L_{y}$ constraints in eqn (194),
which is the same as the number of spins in the system. If this were the case
we would have a unique ground state. This is, however, not the case. In fact,
the $A$ and $B$ operators are not all independent; it is easy to show that

$\prod_{s}A_{s}=\prod_{p}B_{p}=1.$ (195)

As a consequence eqn (194) only represents $2L_{x}L_{y}-2$ independent
constraints, two fewer than the number of spins. This results in a $D$-fold
ground state degeneracy with $D=2^{2}=4$. To see that this topological
degeneracy is robust against disorder and does not rely on the translation
symmetry of the Hamiltonian, let us introduce disorder to the Hamiltonian
(191) by considering

$H^{\prime}_{\mathrm{tc}}=-\sum_{s}J_{s}A_{s}-\sum_{p}K_{p}B_{p},$ (196)

where $J_{s}$ and $K_{p}$ are positive but otherwise random coupling
constants. It is easy to see that the ground states still obey eqn (195) and
are thus unchanged, and so is the degeneracy.101010More generic local
perturbations will lift this degeneracy and split the ground states, but the
splitting vanishes exponentially with $L_{x}$ or $L_{y}$, similar to the
situation for fractional quantum Hall liquids [31].

The discussion thus far might leave the reader with the impression that the
Hamiltonian (191) is rather trivial. This is, of course, not the case. The
highly non-trivial nature of the toric code can be appreciated by considering
its ground state wave functions. Let us start with the constraint $A_{s}=1$.
To satisfy this constraint it is most natural to work in the $\sigma^{z}$
basis for all the spins. In the ground state we must have an even number of up
spins among the four in each group. One way to understand this particular
constraint is to view the up spins as background, and focus on the down-spin
bonds; this constraint is equivalent to requiring that all such bonds form
closed loops [see Fig. 19(b)].

Figure 19: A square lattice in which the bonds with up spins are denoted by
thin gray lines and those with down spins are denoted by thick black lines.
(a) The configuration with all spins up. (b) For configurations satisfying
$A_{s}=1$ for all sites $s$, the thick bonds form closed loops. The no-loop
configuration of (a) is a special case here. (c) Hitting one bond with
$\sigma^{x}$ in (a) creates a pair of charges (black dots) on neighboring
sites connected by this bond. (d) Repeated applications of $\sigma^{x}$ can
move the two charges apart, with a string connecting them. In this model the
string costs no energy and is invisible to local observables. The charges
(which do cost energy to create) are thus deconfined and constitute well-
defined quasiparticle excitations of the system. Since the string is not a
closed loop, charges are topological defects of the ground state
configurations depicted in (a).

There are, of course, many such loop configurations. To be in one of the
ground states however, we must also satisfy the other constraint $B_{p}=1$.
One way to ensure this is to start with any loop configuration
$|\mathrm{loop}\rangle$ (which automatically satisfies $A_{s}=1$ for any $s$)
or their arbitrary linear combinations, and then project it to the Hilbert
subspace with $B_{p}=1$:

$|0\rangle=\prod_{p}P_{p}|\mathrm{loop}\rangle,$ (197)

where

$P_{p}=(1+B_{p})/2$ (198)

is the projection operator that projects a state to one with $B_{p}=1$, as
guaranteed by the fact that the possible eigenvalues of $B_{p}$ are $\pm 1$.
It is important to note that the operation of $P_{p}$ does not change the
eigenvalues of $A_{s}$ because $[A_{s},P_{p}]=0$.

Let us consider in some detail what $P_{p}$ does when it hits a particular
loop configuration (or state). The constant term (1/2) of course does nothing.
The other term ($B_{p}/2$) is much more interesting. If none of the four bonds
forming the square $p$ is involved in any existing loops then it creates a
small loop around $p$, because $B_{p}$ flips all four spins in the plaquette.
For similar reasons, if such a small loop already exists, then $B_{p}$
annihilates it. Most interestingly, if a subset of these four bonds are parts
of other loop(s), then $B_{p}$ changes their configurations (by inserting a
‘detour’ into the path). We thus find that the operation $\prod_{p}P_{p}$ will
generate a very complicated superposition of a huge number of loop
configurations with arbitrarily large loops, even if the initial configuration
in $|\mathrm{loop}\rangle$ contains no loops at all [which is the case if we
start with the state in which all spins are up, as in Fig. 19(a)]. Such a
massive superposition creates a long-range entangled and topologically-ordered
state, with properties identical to the $\mathbb{Z}_{2}$ resonating valence
bond (RVB) spin liquid state [31].

What are the possible outcomes of the projection operation in eqn (197)?
Naively, one might think this is sensitive to the initial loop configuration,
which would result in many possible final states. However, our earlier
analysis found there are only four different ground states, indicating many
different initial loop configurations will result in the same ground state
through the operation in (197). Then the natural question is how to
distinguish the different ground states as well as the initial loop
configurations that lead to them. The distinction lies in topologically non-
trivial loops. As discussed before, a torus is not a singly-connected
manifold. As a result, there exist loops that wrap around the torus along
either the x- or y-directions, that cannot shrink to zero (or no loop). Pairs
of such loops, on the other hand, can join through the operation of $B_{p}$
and become a topologically trivial loop. However, this operation does not
change the parity of such non-trivial loops. We thus find that we can assign
two parity quantum numbers to each loop configuration, based on (the parity
of) the number of non-trivial loops wrapping around the x- and y-directions.
Since the operation of $B_{p}$ does not change these topological quantum
numbers, we find eqn (197) generates four possible ground states, depending on
the four possible combinations of these quantum numbers of the initial loop
configuration. It should be clear by now that the four-fold ground state
degeneracy of the toric code has the same topological origin as that of the
RVB spin liquid discussed in [31], and such degeneracy takes the form $D^{g}$
in a genus $g$ lattice with $D=4$.

What about excited states of the Hamiltonian (191)? Due to the property (193),
they are simply states with some of the $A$s or $B$s equal to $-1$ instead of
$+1$. The most elementary excitation is thus a lattice site with $A_{s}=-1$,
or a square with $B_{p}=-1$. These are the two types of quasiparticles of the
system. The first lives on a lattice site, and we will call this excitation
‘charge,’ while the second lives in a plaquette (which is also the smallest
closed loop), and we will call it ‘flux,’ in obvious analogy with
electromagnetism. The big difference here is that the charge and flux can only
take vales 0 or 1, and form (separate) $\mathbb{Z}_{2}$ sets under addition.
(That is charge and flux are only conserved modulo 2.)

At this point it may seem that these elementary charge or flux excitations are
very similar to a single (local) spin flip in a ferromagnet. Again this is not
the case. In fact a single excitation cannot be created by any local
operations. Let us consider a charge excitation first. To create one at site
$s$, it appears that all one needs to do is flip the spin on one of the bonds
connected to $s$ using $\sigma^{x}$. It is easy to convince oneself that this
operation actually creates a pair of charges on neighboring sites $s$ and
$s^{\prime}$, connected by the bond [see Fig. 19(c)]. Additional operations
may separate these two charges, but never eliminate one of them [see Fig.
19(d)]. We thus find charges can only be created in pairs. Exactly the same is
true for flux excitations. Of course, mathematically this property is
guaranteed by the constraints (195).

Physically, the somewhat strange properties discussed above reflect the fact
that these are topological excitations [or defects in the topological order;
see Fig. 19(d)] that are intrinsically non-local. Such non-locality is
reflected by the fact that these excitations can feel the existence of each
other even when they are very far apart. Naively there is no interaction among
them as the energy of the system is independent of their separations. However
as we demonstrate below if one drags a charge around a flux, the system picks
up a non-trivial Berry phase very much like that in the Aharonov-Bohm effect
(hence the names charge and flux!). There is thus a ‘statistical interaction’
between a charge and a flux, which is of topological nature.111111Such
statistical interaction is identical to that between ‘anyons’ [31], except
here charge and flux are _distinct_ instead of identical particles. Distinct
types of particles with statistical interactions are often referred to as
mutual anyons.

Consider a charge on site $s$, and a loop $\mathcal{L}$ that starts and ends
at $s$. We can drag the charge around this loop using the operator
$\prod_{j\in\mathcal{L}}\sigma_{j}^{x}$ (where $j\in\mathcal{L}$ means the
bond $j$ is part of the loop $\mathcal{L}$), resulting in the final state

$|\mathrm{final}\rangle=\prod_{j\in\mathcal{L}}\sigma_{j}^{x}|\mathrm{initial}\rangle.$
(199)

Using the fact

$\prod_{j\in\mathcal{L}}\sigma_{j}^{x}=\prod_{p\in\mathcal{A}}B_{p},$ (200)

where $\mathcal{A}$ is the region enclosed by $\mathcal{L}$, we find

$|\mathrm{final}\rangle=|\mathrm{initial}\rangle$ (201)

when there is an even number of flux excitations (which are equivalent to zero
due to the $\mathbb{Z}_{2}$ nature of the flux) inside the loop, while

$|\mathrm{final}\rangle=-|\mathrm{initial}\rangle$ (202)

when there is an odd number of flux excitations inside the loop, meaning the
charge picks up a -1 Berry phase when circling around the flux (or vice
versa).

Making contact with the RVB spin liquid [31], we can identify the charge
excitation of the toric code as the spinon of the RVB liquid. There also exist
flux-like excitations in the RVB spin liquid, which are more complicated to
visualize in terms of the spin degrees of freedom, and we will not discuss
them further.

The ground state(s) of the Kitaev toric code model have all the defining
universal properties of a $\mathbb{Z}_{2}$ spin liquid. However, one could
argue that the original RVB physics is not easily recognizable in the toric
code Hamiltonian (191) or its ground state (197): There are no fluctuating
singlet bonds, because the toric code Hamiltonian is far from being
rotationally invariant. Recall that originally, the RVB spin liquid was
proposed to describe antiferromagnets with (approximate) rotational invariance
in spin space, and can be pictured as an equal amplitude superposition of all
nearest-neighbor valence bond configurations. Indeed, while Anderson’s
variational RVB wave function was historically the first quantum many-body
wave function with the kind of long-range entanglement that is also present in
the Kitaev toric code, it long remained an open question whether it can
actually appear as the ground state of a local rotationally invariant
Hamiltonian. By now, a number of such local model Hamiltonians are known,
which tend to be more complex than the Kitaev toric code. Of particular
relevance here, is a local parent Hamiltonian for the RVB state on the Kagomé
lattice [72], which is expected to belong to the same $\mathbb{Z}_{2}$ spin
liquid phase as the Kitaev toric code, and many of its defining properties
have been demonstrated explicitly.121212It turns out having a frustrated
lattice is crucial for the (nearest-neighbor) RVB state to represent a gapped
topological phase. The RVB state on non-frustrated bipartite lattices, on the
other hand, has been shown to represent a critical point instead of a stable
phase.

###  5.1 Toric Code as Quantum Memory

The four degenerate ground states of the Kitaev model on the torus mean that
the toric code can be used to store two quantum bits of information. That is,
the set of quantum superpositions of these four ground states span the same
Hilbert space as superposition states of two spin one-half objects (qubits),
$\vec{\sigma}_{1},\vec{\sigma}_{2}$ which we will refer to as the ‘logical
qubits’ created out of the collection of $N$ ‘physical qubits.’ If we have a
square array of $N$ physical qubits and manage to realize the toric code
Hamiltonian and its periodic boundary conditions (a non-trivial task131313The
four-qubit interaction terms of the Hamiltonian are difficult to achieve
directly (since interactions are typically two-body) and one must resort to an
_effective_ Hamiltonian obtained by having each of the four qubits in a star
or plaquette virtually excite an ancilla qubit that has a strongly different
transition frequency. It is possible to avoid the difficulty of realizing
periodic boundary conditions by using the closely related ‘surface code’[69,
32] which has open boundary conditions.) we can use the toric-code logical
qubits as a quantum memory.

The basic idea behind this is that the two logical qubits are ‘topologically
protected.’ That is, small deviations from the ideal Hamiltonian will lead to
virtual production of pairs of ‘charges’ or ‘fluxes’ which will quickly
recombine because of the energy gap. These will have little effect since
moving the state of the system from one logical quantum ground state to
another would require one of the topological defects to travel on a non-
contractible loop winding around the torus before returning to annihilate with
its partner.141414Recall that to go from one (topologically degenerate) ground
state to another in a fractional quantum Hall system requires moving a
Laughlin quasiparticle (a topological defect) around the torus, which is a
non-contractable loop [31]. This requires tunneling a distance $\sim\sqrt{N}$
and is exponentially small. That is, if we do perturbation theory, the small
parameter $\lambda$ is the strength of the deviations from the ideal
Hamiltonian divided by the excitation gap. Processes in which a (virtual)
topological defect winds around the torus appear at order
$\lambda^{\sqrt{N}}$, i.e., the code distance is $\sqrt{N}$.

The good news then is that the qubit states are topologically protected. That
is, the (non-local) logical states and the distinction among them is invisible
to local perturbations that flip or dephase individual physical qubits. The
bad news is that the logical states are sufficiently well protected that it is
difficult for us to change them when we want to carry out a single-qubit
operation (e.g. rotation on the Bloch sphere). It is relatively easy to carry
out a Pauli group operation (see Box 6) on one of the logical qubits (i.e.,
bit flip $\sigma_{1}^{x}$, phase flip $\sigma_{1}^{z}$ or both which yields
$i\sigma_{1}^{y}$). We do this by repeated Pauli operations on a line of
physical spins along a non-contractible loop of the torus as described above.
But what if we want to rotate the qubit through an angle $\theta$ around the
$x$ axis on the Bloch sphere? This requires

$U_{\theta}=e^{i\frac{\theta}{2}\sigma_{1}^{x}}=\cos\frac{\theta}{2}\sigma_{1}^{0}+i\sin\frac{\theta}{2}\sigma_{1}^{x},$
(203)

where $\sigma_{1}^{0}$ is the identity operation. Thus we have to carry out a
quantum superposition of doing nothing and flipping a large number
($\sqrt{N}$) of physical spins. It appears to be difficult to achieve this
superposition of macroscopically distinct operations though proposals to get
around this difficulty using magic state distillation and gate teleportation
exist and are reviewed in Ref. [69].

A second problem is created by the fact that the energy gap for excitations is
finite.151515There exist models in four spatial dimensions in which the
topological defects are confined by a finite string tension (much like quark
confinement in 3+1 space-time dimensions). These could be realized in three
spatial dimensions via non-local Hamiltonians but this would be extremely
challenging to realize experimentally. Even if the physical qubits are in good
thermal equilibrium (something difficult to achieve inside an operating
quantum computer) at low temperature, there will be a finite density of
topological defects. The density will be exponentially small in the gap
divided by the temperature, but it will be finite. Small deviations from the
ideal Hamiltonian will allow these topological defects to travel (either
coherently or diffusively) around the sample producing logical errors.

The only way to beat these thermally-induced errors is to introduce a ‘Maxwell
demon’ to ‘algorithmically cool’ the system by rapidly and repeatedly
measuring all the constraint operators (‘error syndromes’) $A_{s}$ and $B_{p}$
to determine when a thermal fluctuation has produced a local pair of defects.
The demon must then quickly compute what local operations on the physical
qubits it needs to carry out to cause the topological defects to recombine
before they can change one of the topological winding numbers. This version of
quantum error correction will be extremely challenging to achieve, especially
when one considers the fact no Maxwell demon will be perfect–it will introduce
errors of its own when it reads out the error syndromes and tries to correct
them. A very important concept in quantum error correction is that of the
‘break even’ point–that is the point at which the error rate of the physical
qubits is low enough and the Maxwell demon works well enough and quickly
enough that a code using $N$ physical qubits would yield collective logical
qubits with coherence times exceeding that of the best of the individual
physical qubits [38]. At the time of this writing, it appears to be very
challenging [69, 32] for the surface code to achieve breakeven without
considerable technical advances, but substantial efforts are being made and
recent theoretical progress on the XZZX code [70, 71] is encouraging.

Prove eqns (193) and (195). Show that the state (197) satisfies (194). Prove
eqn (200). The toric code has a finite excitation gap. Find a lower bound for
this gap for the Hamiltonian given in eqn (196). Consider how the constraints
in eqn (195) need to be modified when the random couplings $J_{s}$ and $K_{p}$
in eqn (196) are allowed to take negative values, and show that the ground-
state degeneracy remains exactly four. Consider the perturbing effect on the
ground state(s) of the Hamiltonian given in eqn (196) of a transverse magnetic
field applied to a single site $j=J$ via $V=\lambda\sigma_{J}^{x}$. Find the
energy denominator that controls the strength of the perturbation and show
that the effects of the perturbation do not propagate throughout the lattice
but instead remain local. Use this fact to find the _exact_ ground-state
energy of the perturbed Hamiltonian. The locality of the response to a local
perturbation provides a hint that helps explain why generic perturbations on
the exactly soluble model have exponentially small effects in lifting the
degeneracy of the ground state manifold. Suppose that the perturbation
Hamiltonian $V=\lambda\sum_{j}\sigma_{j}^{x}$ acts on all sites of an
$L_{x}\times L_{y}$ lattice. At what order in perturbation theory is the
ground state degeneracy first lifted?

Show that as a flux is dragged around a charge, the system picks up a -1 Berry
phase. Generalize the toric code to the 3D cubic lattice and discuss how the
charge and flux excitations differ from the 2D case. What is the ground state
degeneracy when periodic boundary conditions are imposed in all three
directions?

##  6 Overview of Bosonic Modes

###  6.1 Introduction

In this section we will begin our study of continuous variable quantum
information [73, 74, 75, 47, 76, 77, 78] in which we use the large Hilbert
space of the harmonic oscillator to store and process information and carry
out quantum error correction. To set the stage, let us remind ourselves of
what we have learned so far in our study of two-level qubit systems. We saw
previously that quantum error correction for qubits required creation of
‘logical qubits’ consisting of many ‘physical’ qubits. The quantum information
encoded in the logical qubit lives in a specially designed subspace of the
larger Hilbert space of the many physical qubits. The states in this subspace
are highly entangled states of the physical qubits in order to hide the
information from the environment and thereby protect it. The states outside
the logical subspace are error states and one must design a measurement
protocol whose measurement results (‘error syndromes’) tell us, not about
which of the specific error states outside the logical subspace the system is
in, but only what errors have occurred without revealing any information about
the logical state in which the error has occurred. We saw that if the Knill-
Laflamme conditions are satisfied, we have a guarantee that this is possible.

Having a guarantee that this is possible in principle is not the same thing as
achieving it in practice.161616In theory, theory and practice are the same.
However in practice, they are different. A particular challenge is that the
number of single-physical-qubit errors that can occur (and the rate at which
they occur) scales linearly with $N$, the number of physical qubits comprising
the logical qubit. If the chosen code is capable of correcting (say) all
single-physical-qubit errors, the measurement scheme must determine a large
amount of information, namely which of the $N$ physical qubits suffered the
error and what particular type of error occurred (e.g.
$X,Y,Z,X-iY,X+iY,\ldots$). This requires a lot of additional wiring and
measurement ancillae all of which are imperfect. Furthermore, the code
stabilizers are typically ‘unnatural’ high-weight operators. For the 3-qubit
repetition code, we saw that the stabilizers are only weight two ($Z_{1}Z_{2}$
and $Z_{2}Z_{3}$). However this code only protects against one type of error
(bit flips). The 9-qubit Shor code stabilizers are weight six [19] and
therefore (at present at least) impractical to measure.

With these thoughts in mind, we turn now to the harmonic oscillator. The
physical realization of the oscillator might be a mechanical mode (e.g. the
ion motion in a trapped ion system) or a microwave mode in a superconducting
resonator. In principle we could also use optical modes but, to date, full
quantum control of the state of optical modes has not been achieved. In the
circuit QED microwave regime, ultra-strong coupling to transmon artificial
atoms with huge electric dipole moments (several Cooper pairs moving a
millimeter) yields non-linear optical effects at the level of single photons
which can be exploited to achieve complete quantum control over both the atom
and the photon states.

###  6.2 Pros and Cons of Microwave Bosonic Modes

One immediate advantage of microwave oscillators is that they have extremely
high $Q$ and it is relatively easy to make 3D microwave resonators with
lifetimes of 1-10 milliseconds–1 to 2 orders of magnitude longer than typical
transmon qubit $T_{1}$ lifetimes. Much longer times are possible [79, 80] but
these generally involve using larger cavities which ‘dilute’ the electric
field of a single photon and therefore have weaker coupling to the transmon
ancillae used to control them. Because all of the internal loss of such
resonators is associated with the electromagnetic surface impedance of the
walls, we can think of these resonators as analogous to a Fabry-Pérot cavity
formed between two optical mirrors with reflectivity very slightly less than
unity leading to a large but finite ‘finesse’ that is a measure of the number
of round trips a photon can make between the mirrors before it leaks out. As
the cavity volume is increased by moving the mirrors further apart, the
finesse remains fixed, but it takes a longer time for the photon to travel
between bounces and hence the $Q$ increases, while the dispersive interaction
with the qubit decreases by the same factor.

A nice feature of cryogenic microwave resonators is that their frequency is
determined by their rigid geometry and is extremely stable. Hence their
intrinsic dephasing rate is extremely low. If we think of the 0 and 1 photon
states as forming a qubit, its phase coherence time for superpositions of 0
and 1

$\frac{1}{T_{2}}=\frac{1}{2T_{1}}+\frac{1}{T_{\varphi}},$ (204)

has negligible contribution [81] from $\frac{1}{T_{\varphi}}$.

A corresponding disadvantage of a harmonic oscillator is that its energy
levels are all evenly spaced which prevents universal control using classical
drives. The only effect of a classical drive is to displace the oscillator in
momentum and position forming a coherent state. As will be discussed in Sec.
6.3, without the presence of a non-linear oscillator such as a transmon
ancilla, universal control of the oscillator states is not possible. Thus
while microwave cavities have much longer natural coherence times than
transmons, we still need the transmon as a control ancilla [82, 83] and must
deal with its faults. These can be partially ameliorated by using control
pulses which only virtually excite the transmon so that it mostly remains in
its ground state. However, even when the transmon controller is nominally
idle, it can accidentally change states and the resulting dispersive shift in
cavity frequency (occurring at a random moment in time) will dephase the
cavity. Fault-tolerant protocols to eliminate the dephasing from such events
have however been demonstrated by dressing the controller with off-resonant
drives which eliminate the cavity dispersive shift difference between the 0
and 1 states of the controller [81].

It is a significant advantage of microwave cavities that their error rate is
low and the error model is _highly biased_. The dominant error is photon loss
(due to a combination of unintended internal dissipation and intended coupling
to external signal access ports). Furthermore, unlike the case of an encoding
in $N$ separate qubits, we do not have to figure out which of the $N$ qubits
incurred an error. We have only one physical device, the oscillator, that
incurs errors. We saw earlier that the smallest qubit error correcting code
has $N=5$ qubits and has a total of 16 possible error states (including zero
errors). Even if we assume the noise is highly biased and consists only of
amplitude damping ($\sigma_{-}$ jump operator) the smallest qubit code that
can correct a single damping error still requires $N=4$ qubits and has a total
of 5 possible error states [66]. Remarkably, there exists an analogous
oscillator bosonic code [84, 85] to correct amplitude damping that requires
only 5 states in the oscillator Hilbert space compared the $2^{N}=16$ states
of the corresponding $N=4$ qubit code.

The mean rate of photon loss for a damped oscillator is proportional to the
photon number

$\frac{d\bar{n}}{dt}=-\kappa\bar{n}.$ (205)

As noted above, $\kappa$ is much smaller than the typical energy relaxation
rate $1/T_{1}$ for a transmon and the intrinsic dephasing rate of the cavity
is (so far) completely negligible. We will be able to take advantage of this
error asymmetry in the design of bosonic error correction codes. The topic is
also addressed in the lectures of Mazyar Mirrahimi and the seminar by Shruti
Puri at this school. [Videos available at
https://physinfo.fr/houches2019/program.html.]

One natural advantage of the harmonic oscillator is the large size of its
Hilbert space. It would be very convenient and hardware-efficient to replace
the states of many physical qubits with the states of one oscillator. Let us
see what happens when we do this. $N$ qubits have a Hilbert space dimension
$D_{N}=2^{N}$. We can fit these into levels $0,1,\ldots,D_{N}-1$ of the
oscillator. One simple way to do this would be to use the binary encoding

$|b_{N-1}\ldots
b_{2}b_{1}b_{0}\rangle_{\mathrm{qubits}}\Leftrightarrow|M\rangle_{\mathrm{oscillator}},$
(206)

where $|M\rangle_{\mathrm{oscillator}}$ is the Fock state containing $M$
bosons and $b_{N-1}\ldots b_{2}b_{1}b_{0}$ is the set of 0’s and 1’s that
define the qubit state in the standard ($Z$) basis and whose values form the
binary representation of the number $M$. Thus for N=3 the bit and oscillator
state correspondences would be

$\displaystyle|000\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|0\rangle_{\mathrm{oscillator}},$
$\displaystyle|001\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|1\rangle_{\mathrm{oscillator}},$
$\displaystyle|010\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|2\rangle_{\mathrm{oscillator}},$
$\displaystyle|011\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|3\rangle_{\mathrm{oscillator}},$
$\displaystyle|100\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|4\rangle_{\mathrm{oscillator}},$
$\displaystyle|101\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|5\rangle_{\mathrm{oscillator}},$
$\displaystyle|110\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|6\rangle_{\mathrm{oscillator}},$
$\displaystyle|111\rangle_{\mathrm{qubits}}$ $\displaystyle\Leftrightarrow$
$\displaystyle|7\rangle_{\mathrm{oscillator}}.$ (207)

This seems wonderfully efficient, but there are some problems we must point
out. First, notice that the highest photon number needed in the encoding for
$N$ qubits grows exponentially $D_{N}-1=2^{N}-1$. In the presence of single-
photon energy relaxation rate $\kappa$, the rate of decay from photon Fock
state $M$ to $M-1$ is given by $M\kappa$. Hence the worst-case bosonic state
decay rate becomes exponentially large. This is true for all possible
encodings, not just the binary encoding shown here. Thus, as discussed in
‘Climbing Mount Scalable’ [86], we cannot use the infinite Hilbert space of
the harmonic oscillator to replace an arbitrarily large number of two-level
qubits. Nevertheless, bosonic codes utilizing the lowest few levels of an
oscillator will prove to be quite powerful.

In addition, there is a particular problem with the binary encoding which is
illustrated by the following. The error model for the bosons is to a very good
approximation simply photon loss whose ‘jump operator’ is the photon
destruction operator $a$ that takes $|M\rangle$ to $\sqrt{M-1}|M-1\rangle$.
Notice however in the qubit representation, single photon loss produces
transitions for example like this (in a 5-qubit system)

$|10000\rangle_{\mathrm{qubits}}\rightarrow|01111\rangle_{\mathrm{qubits}}.$
(208)

Thus, in terms of the qubits being represented, the errors produce multiple,
correlated bit flips. Such an error model would seem to make QEC impossible.
One might be able to get around this by replacing the binary encoding with the
Gray code [19, 87] whose neighboring codewords all have Hamming distance one.
However the $\sqrt{M-1}$ matrix elements of the boson destruction operator
become very complex in this representation, so it is not obvious if this is
much better.171717Isaac Chuang, private communication.

Another approach to encoding that has certain distinct advantages is to use
qubit encoding to represent the bosonic oscillator (discretized) coordinate
rather than the boson number [88, 89, 90].

With all these considerations in mind, it seems clear that we should not try
to represent too many physical qubits in a single oscillator and may not want
to choose to represent them by a simple binary or Gray coding or the like.
Furthermore it may be useful to take a ‘continuous-variable’ point of view and
recognize that unlike qubits, harmonic oscillators have continuous coordinates
and momenta. In this regard, one natural source of inspiration are classical
communication codes based on modulating the phase, amplitude and polarization
of light and/or its time-bin structure. Ignoring the polarization, we can
represent the amplitudes of the two quadratures of a carrier wave by a pair of
numbers $(I,Q)$ defined by how the voltage (say) varies in time

$V(t)=I(t)\cos(\omega t)+Q(t)\sin(\omega t),$ (209)

where $\omega$ is the carrier frequency, $I(t)$ is the ‘in-phase’ amplitude
and $Q(t)$ is the ‘quadrature-phase’ amplitude. Confusingly these are both
referred to as quadrature amplitudes and often combined into a 2D vector or
single complex number labeling a point $z=I+iQ$. The simplest classical
example is Phase Shift Keying (PSK) in which the bits $b=0,1$ are encoded in
the phase of the wave via

$I=2b-1,Q=0,$ (210)

as illustrated in the left panel of Fig. 20. The quantum analog of this code
is the two-legged Schrödinger cat code [91]. The middle panel illustrates the
two-qubit quantum amplitude keying code. Here the four states all have the
same amplitude but differing phases. This bears some resemblance to the
quantum four-legged cat code [92, 93, 38] discussed in the lectures by Mazyar
Mirrahimi at this school [https://physinfo.fr/houches2019/program.html]. The
right panel shows the four-bit 16 state quadrature amplitude modulation code
in which the phase space points are distributed on a lattice. This bears some
resemblance to the quantum GKP code [58, 94, 95, 96, 97, 98, 99] discussed in
the lectures by Barbara Terhal at this school
[https://physinfo.fr/houches2019/program.html] and in Sec. 8 of the present
notes.

Figure 20: Phase space representation of different standard classical
encodings for optical communication. Left panel: PSK is phase shift keying.
The two codewords representing one bit differ by a $\pi$ phase shift. Middle
panel: QPSK is quadrature phase shift keying. Every codeword has the same
amplitude, but the four codewords can store two bits of information. Right
panel: QAM is quadrature amplitude modulation. The sixteen codewords carry
four bits of information at the expense of having to resolve both amplitude
and phase of the signal. All three of these codes assign bit values to the
particular points in phase space using the Gray code. In this manner every
point has Hamming distance 1 from each of its neighbors. This minimizes the
number of bit-flip errors if noise causes the receiver to misinterpret the
signal associated with one point with that of one of the neighboring points.

The highly successful Schrödinger cat code [92, 93, 38] takes particular
advantage of the fact that coherent states are eigenstates of the dissipation
jump operator $a$. A coherent state is the closest quantum relative of the
classical quadrature states discussed above and can be created by a classical
drive applied to the oscillator. However a quantum superposition of two or
more coherent states is a ‘non-Gaussian’ state and requires a non-classical
control to create. Before diving into all of this, we need to understand two
topics: universal control of oscillator states and the quantum description of
amplitude damping for a harmonic oscillator. The former will be described in
Sec. 6.3 For the latter, we will derive the Kraus map describing the
dissipation in Sec. 6.4

###  6.3 Gaussian and Non-Gaussian States of Oscillators

The ground state wave function of a harmonic oscillator is of course a
Gaussian function of the coordinate

$\Psi(q)=\frac{1}{\sqrt{2\pi
q_{\mathrm{ZPF}}^{2}}}e^{-\frac{q^{2}}{4q_{\mathrm{ZPF}}^{2}}},$ (211)

where $q_{\mathrm{ZPF}}$ is the RMS position zero-point fluctuation
(uncertainty) in the ground state. In quantum optics, the coordinate of an
electromagnetic oscillator mode is generally taken to be the electric field of
the mode at some particular position, and the ground state fluctuations in the
electric field are referred to as _vacuum noise_ [100]. As usual, the wave
function is also a Gaussian in the momentum representation.

It turns out that under the influence of any single- or multi-mode Hamiltonian
that is quadratic in position and momentum (or equivalently quadratic in the
creation and annhilation operators), Gaussian states evolve into other
Gaussians. This means that it is easy to classically compute and represent the
time-evolution in terms of a few parameters representing the mean values and
covariances of the creation and annhilation operators, $\langle a\rangle$,
$\langle a^{\dagger}a\rangle$, $\langle aa\rangle$, $\langle
a^{\dagger}b^{\dagger}\rangle$, etc. We do not need to keep track of higher-
order correlators, because for Gaussian states, Wick’s theorem guarantees that
they are simple products of lower order correlators. For example (assuming for
simplicity that $\langle a\rangle=\langle b\rangle=0$), Wick’s theorem tells
us that

$\langle a^{\dagger}ab^{\dagger}b\rangle=\langle a^{\dagger}a\rangle\langle
b^{\dagger}b\rangle+\langle a^{\dagger}b^{\dagger}\rangle\langle
ab^{\dagger}\rangle+\langle a^{\dagger}b\rangle\langle ab^{\dagger}\rangle.$
(212)

In condensed matter physics, terms like $\langle aa\rangle$ and $\langle
ab\rangle$ are known as anomalous correlators. In quantum optics they are
described as representing one- and two-mode squeezing.

We can draw an analogy [101] between the simplicity of computing time
evolution under quadratic bosonic Hamiltonians and the Gottesman-Knill theorem
[60, 61], that a quantum computer based on qubits and using

  1. i)

Preparation of qubits in computational basis states,

  2. ii)

Clifford gates (only), and

  3. iii)

Measurements in the computational basis,

is easy to simulate classically. The discussion of this analogy given below is
summarized in Table 4.

As a reminder, the Pauli group is generated by products of qubit $X$ and $Z$
operators, and the Clifford group is the set of operations in the _normalizer_
of the Pauli group–that is the set of unitary operations $C$ that leave the
Pauli group invariant (see Box 6). For example the Hadamard operation is a
member of the Clifford group because

$HZH^{\dagger}=HZH=X;\,\,HXH=Z.$ (213)

The full Clifford group for an arbitrary number of qubits can be generated
using only three types of gates $S=\sqrt{Z}$, $H$, and CNOT. Despite the fact
that Clifford circuits can generate maximally entangled Bell states (see Ex.
6.3), they are easy to simulate classically [61]. Essentially one can define
an $N$-qubit starting (product) state by the list of $N$ one-qubit Pauli
operators which stabilize the state (that is, the state is an eigenvector with
eigenvalue $+1$ for each Pauli operator in the list). One can keep track of
each Clifford operation applied to the state by simply updating the list of
$N$ stabilizers (e.g., conjugating with $H$ takes a $Z$ stabilizer to an $X$
stabilizer, $Z$ takes $X$ to $-X$, $S$ takes $X$ to $Y$, CNOT takes $XI$ to
$XX$, etc.). Even though the $H$ gate creates superpositions of single qubits
and CNOT $H$ can be used to create entangled Bell pairs, one does not have to
keep track of the large number of superpositions generated by Clifford
circuits, but rather simply needs to track the changes in the list of
stabilizers [61]. This ability to efficiently simulate Clifford circuits
classically indicates that they do not represent the full power of quantum
computation. This is presumably due to the fact that the full non-classical
correlations inside Bell states cannot be revealed without making 45 degree
rotations on the Bloch sphere (or rotating the measurement axis by 45
degrees). If we add a $T$ gate which produces such rotations, we can violate
the Bell inequalities and achieve universal quantum computation. At the same
time, the circuits become exponentially hard to simulate classically (because
now you have to keep track of superpositions (i.e., multiple branching) lists
of stabilizers).

Find Clifford circuits that will take a pair of qubits initially in
$|\downarrow\downarrow\rangle$ into each of the 4 maximally entangled Bell
states. $\displaystyle|B_{0}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left[|\uparrow\downarrow\rangle-|\downarrow\uparrow\rangle\right]$
(214) $\displaystyle|B_{1}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left[|\uparrow\downarrow\rangle+|\downarrow\uparrow\rangle\right]$
(215) $\displaystyle|B_{2}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left[|\uparrow\uparrow\rangle-|\downarrow\downarrow\rangle\right]$
(216) $\displaystyle|B_{3}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left[|\uparrow\uparrow\rangle+|\downarrow\downarrow\rangle\right].$
(217)

Because Gaussian operations for bosonic systems are easy to simulate
classically, we do not expect such circuits to yield universal computation.
The analogy goes further because two-mode squeezing produces maximally
entangled states (see Ex. 6.3) just as Clifford circuits produce Bell states.
There is one point however on which continuous variables are not analogous. As
emphasized in Sec. 3.3 for the case of qubits, even though the noise demon has
the power to do non-Clifford operations, we can (under certain assumptions for
the noise model) defeat it and carry out QEC using only Clifford circuits and
measurements. The analogous statement for continuous variables is not true.
There is a no-go theorem stating that Gaussian resources (i.e., Gaussian
operations plus homodyne measurement) are insufficient to do continuous
variable QEC [65]. Table 4 summarizes the overall analogy we have discussed
here.

Table 4: Qubit Clifford Circuits vs. Gaussian Bosonic Circuits. TMS stands for two-mode squeezing. The Weyl-Heisenberg group is the group of (non-commuting) translations in phase space effected via $X(s)$ which translates by $s$ in position and $Z(t)$ which translations by $t$ in momentum. Under non-Gaussian measurements, $|1\rangle\langle 1|$ is the projector onto the Fock state with one photon and $a^{\dagger}a$ stands for photon number resolving detection. Aspect | Qubits | Bosonic Mode
---|---|---
Standard Basis |  $Z$, $\\{0,1\\}$ | $|q\rangle$
Conjugate Basis |  $X$, $|0\rangle\pm|1\rangle$ | $|p\rangle=\int dq\,e^{iqp}|q\rangle$
Basis Transformation | Hadamard | Fourier Transform
Group | Pauli | Weyl-Heisenberg
| {$Z$,$X$} | {$X(s)=e^{is\hat{p}},\,Z(t)=e^{it\hat{q}}$ }
| Clifford | Gaussian Unitaries
| {$Z$,$H$,CNOT} | $\\{e^{i\theta\hat{n}},e^{i\lambda{\hat{q}}^{2}},e^{ig\hat{q}_{1}\hat{q}_{2}}\\}$
Entangled State | Bell: $|00\rangle+|11\rangle$ | EPR (TMS): $\int dq\,|q\rangle_{1}|q\rangle_{2}$
Universal Computation |  $T$ gate | Non-Gaussian unitary: $U_{3}(\chi)=e^{i\chi\hat{q}^{3}/3}$
Clifford Measurements | $Z,X$ | homodyne $\hat{q},\hat{p}$
Non-Clifford Measurements | $\vec{b}\cdot\vec{\sigma}$ | $a^{\dagger}a,aa,|1\rangle\langle 1|,\hat{q}^{2}$

Consider a driven undamped harmonic oscillator with interaction picture
Hamiltonian
$\hat{V}(t)=+i[\epsilon(t)\hat{a}^{\dagger}(t)-\epsilon^{*}(t)\hat{a}(t)].$
(218) Solve the equation of motion for $\hat{a}(t)$. Show from this that the
vacuum state evolves into a coherent state $|\alpha(t)\rangle$ and derive an
expression for $\alpha(t)$. Consider an undamped harmonic oscillator with the
following interaction picture Hamiltonian describing two-photon driving
(single-mode squeezing)
$\hat{V}(t)=+\frac{i}{2}[\epsilon(t)\hat{a}^{\dagger}(t)\hat{a}^{\dagger}(t)-\epsilon^{*}(t)\hat{a}(t)\hat{a}(t)].$
(219) Solve the equation of motion for $\hat{a}(t)$. Hint try a solution of
the form $\left(\begin{array}[]{c}\hat{a}(t)\\\
\hat{a}^{\dagger}(t)\end{array}\right)=\left(\begin{array}[]{cc}\cosh\theta(t)&\sinh\theta(t)\\\
\sinh\theta(t)&\cosh\theta(t)\end{array}\right)\left(\begin{array}[]{c}\hat{a}(0)\\\
\hat{a}^{\dagger}(0)\end{array}\right).$ (220)

Consider the two-mode squeezed state
$|\Psi_{r}\rangle=\frac{1}{\cosh(r)}e^{\tanh(r)\,a^{\dagger}b^{\dagger}}|00\rangle.$
(221) Write the state in the Fock basis and describe qualitatively how it is
entangled. Form the reduced density matrix for the $a$ mode (or equivalently
the $b$ mode) and show it is precisely a thermal state with a Bose-Einstein
distribution of photon numbers. This is the essence of Hawking radiation from
a black hole. If the $b$ mode falls into the black hole and becomes
inaccessible to us, we see a thermal distribution for the $a$ mode.

###  6.4 Kraus Map for the Damped Harmonic Oscillator

In Sec. 4 we studied density matrices for qubits and the Kraus representation
of the CPTP maps for general quantum operations on states (density matrices).
Here we extend this notion to the weakly damped harmonic oscillator. For
simplicity, we will assume that a cold bath provides the damping so that the
oscillator can lose excitations to the bath but never gain them. The coupling
to the bath is of the form

$V=\hbar\lambda a\mathcal{O}_{\mathrm{bath}},$ (222)

and Fermi’s Golden Rule for the decay rate of an oscillator of frequency
$\omega$ from Fock state $|n\rangle$ to Fock state $|n-1\rangle$ gives

$\displaystyle\Gamma_{n}$ $\displaystyle=$
$\displaystyle\lambda^{2}2\pi\langle n|a^{\dagger}a|n\rangle\sum_{f}\langle
i|\mathcal{O}_{\mathrm{bath}}^{\dagger}|f\rangle\langle
f|\mathcal{O}_{\mathrm{bath}}|i\rangle\delta(\omega-\Omega_{if})$ (223)
$\displaystyle=$ $\displaystyle\kappa n,$ (224)

where $i$ and $f$ label the initial and final states of the bath,
$\Omega_{if}$ is the energy difference between the two bath states,

$\kappa=\lambda^{2}S(\omega)$ (225)

and

$S(\omega)=2\pi\sum_{f}\langle
i|\mathcal{O}_{\mathrm{bath}}^{\dagger}|f\rangle\langle
f|\mathcal{O}_{\mathrm{bath}}|i\rangle\delta(\omega-\Omega_{if})$ (226)

is the spectral density of the bath operator at the frequency of the
oscillator. (In some sense the defining characteristic of a bath is that this
spectral density does not depend on the microscopic state $i$ of the bath.)

With this result in hand we see that the Kraus operator corresponding to loss
of a photon during a small time interval $dt$ must be

$\hat{K}_{1}(dt)=\sqrt{\kappa dt}a$ (227)

because this correctly yields the probability of a single photon loss

$P_{1}(dt)=\mathrm{Tr}\left\\{\hat{K}_{1}^{\dagger}\hat{K}_{1}^{\phantom{\dagger}}\hat{\rho}\right\\}=\langle\hat{n}\rangle\,\kappa\,dt.$
(228)

Loss of more than one photon in a very short time interval is unlikely, so we
are left only with a single remaining Kraus operator that describes the zero
loss case and from eqn (108) must obey

$\hat{K}_{0}^{\dagger}(dt)\hat{K}_{0}^{\phantom{\dagger}}(dt)=1-\hat{K}_{1}^{\dagger}(dt)\hat{K}_{1}^{\phantom{\dagger}}(dt)=1-\kappa\,dt\,a^{\dagger}a.$
(229)

To lowest order in $dt$, the unique solution for $\hat{K}_{0}(dt)$ that
approaches the identity for $dt\rightarrow 0$ is

$\hat{K}_{0}^{\phantom{\dagger}}(dt)=\sqrt{1-\kappa a^{\dagger}a\,dt}\approx
1-\frac{\kappa}{2}a^{\dagger}a\,dt.$ (230)

We can now write the evolution equation for the density matrix over the small
time interval $dt$

$\displaystyle\hat{\rho}(t+dt)$ $\displaystyle=$
$\displaystyle\hat{K}_{0}^{\phantom{\dagger}}(dt)\hat{\rho}\hat{K}_{0}^{\dagger}(dt)+\hat{K}_{1}^{\phantom{\dagger}}(dt)\hat{\rho}\hat{K}_{1}^{\dagger}(dt)$
(231) $\displaystyle=$
$\displaystyle\hat{\rho}(t)-\frac{\kappa}{2}\left[a^{\dagger}a\hat{\rho}+\hat{\rho}a^{\dagger}a-2a\hat{\rho}a^{\dagger}\right]$
(232)

We can now convert this into a differential equation

$\frac{d\hat{\rho}}{dt}=\kappa\left[a\hat{\rho}a^{\dagger}-\frac{1}{2}a^{\dagger}a\hat{\rho}-\frac{1}{2}\hat{\rho}a^{\dagger}a\right]\equiv\kappa\mathcal{D}[a])\hat{\rho},$
(233)

where $\mathcal{D}[a]$ is a ‘superoperator’ defined by this equation.

This is the standard Lindblad master equation for the time evolution of the
density matrix. It is clear from the cyclic property of the trace that the
trace of the density matrix is automatically conserved in this dynamics. The
last two terms in the square brackets correspond to time evolution under a
non-Hermitian Hamiltonian

$H=-i\frac{\kappa}{2}a^{\dagger}a$ (234)

describing the damping. Under the influence of this term the probability to be
in a particular photon number state decays away exponentially and the trace of
the density matrix falls continuously. This is repaired by the first term in
square brackets, known as the ‘quantum jump’ term because it has no
interpretation in terms of a Hamiltonian. This term describes the fact that
when the system leaves Fock state $n+1$ it must land in Fock state $n$. This
term compensates the other terms and restores conservation of probability. One
can verify this by using eqn (233) to write out the equation of motion for

$\frac{d}{dt}\hat{\rho}_{n,n}=\frac{d}{dt}\langle
n|\hat{\rho}|n\rangle=\kappa\left[(n+1)\hat{\rho}_{n+1,n+1}-n\hat{\rho}_{n,n}\right].$
(235)

In Boltzmann equation language, the first term on the RHS is the ‘scattering
in’ term and the second is the ‘scattering out’ term.

Strictly speaking, Fermi’s Golden Rule is not valid for time intervals
$dt<W^{-1}$, where $W$ is the inverse frequency bandwidth of the bath spectral
density. Hence the master equation is valid for small $dt$ but not too small.
The time intervals have to be slightly coarse-grained and we have to be a bit
cautious when we interpret eqn (233) as a differential equation. We have made
the Markov approximation for the bath spectral density by assuming that the
bandwidth $W$ is so large that we can make $dt$ so small that the unitary
evolution of the system under the action of $V(t)$ over that interval is
small. Furthermore, we have implicitly assumed that $S(\omega)$ is constant
over the large bandwidth so that its Hilbert transform vanishes. In the
language of many-body physics, this means that the bath only contributes a
frequency-independent and purely imaginary ‘self-energy’ (i.e., damping) to
the oscillator and does not renormalize the oscillator frequency (which would
occur if the self-energy had a real part given by the Kramers-Kronig (Hilbert)
transform of the imaginary part via

$\Sigma(\omega+i\delta)=\int_{-\infty}^{+\infty}\frac{d\omega^{\prime}}{2\pi}\,\frac{S(\omega^{\prime})}{\omega-\omega^{\prime}+i\delta}.$
(236)

The real part of the self-energy $\Sigma$ essentially describes level
repulsion between the states of the system and the bath. If the spectral
density is larger for bath states higher than $\omega$ and lower for bath
states below $\omega$, then the oscillator frequency will be pushed downwards.

Now that we have found the Kraus operators describing the effect of damping on
an oscillator for a small time interval $dt$, a useful next step is to find
Kraus operators corresponding to evolution over a finite time interval. We
will organize them according to the number of photons $\ell$ that are emitted
into bath in the time interval $[0,t]$

$\hat{\rho}(t)=\sum_{\ell=0}^{\infty}{\hat{K}}_{\ell}^{\phantom{\dagger}}(t)\hat{\rho}(0){\hat{K}}_{\ell}^{\dagger}(t).$
(237)

Let us start with the case $\ell=0$. Zero photons will be emitted in the time
interval $[0,t]$ if and only if zero photons are emitted in every small
interval $dt$. Hence

${\hat{K}}_{0}^{\phantom{\dagger}}(t)=[{\hat{K}}_{0}^{\phantom{\dagger}}(dt)]^{t/dt}=e^{-\frac{\kappa}{2}\hat{n}t},$
(238)

where $\hat{n}=a^{\dagger}a$ is the photon number operator.

With this established we can now find the Kraus map for the case where
precisely one photon is emitted in a particular intermediate time window
$[\tau,\tau+d\tau]$

$\displaystyle{\hat{K}}_{0}^{\phantom{\dagger}}(t-\tau){\hat{K}}_{1}^{\phantom{\dagger}}(d\tau){\hat{K}}_{0}^{\phantom{\dagger}}(\tau)\hat{\rho}(0){\hat{K}}_{0}^{\dagger}(\tau){\hat{K}}_{1}^{\dagger}(d\tau){\hat{K}}_{0}^{\dagger}(t-\tau)$
(239) $\displaystyle=$
$\displaystyle\kappa\,d\tau\,e^{-\frac{\kappa}{2}\hat{n}(t-\tau)}ae^{-\frac{\kappa}{2}\hat{n}\tau}\hat{\rho}(0)e^{-\frac{\kappa}{2}\hat{n}\tau}a^{\dagger}e^{-\frac{\kappa}{2}\hat{n}(t-\tau)}$
$\displaystyle=$
$\displaystyle\kappa\,d\tau\,e^{-\kappa\tau}e^{-\frac{\kappa}{2}\hat{n}t}a\hat{\rho}(0)a^{\dagger}e^{-\frac{\kappa}{2}\hat{n}t}$

where in deriving the last equality we have used the simple commutation
relation

$ae^{-\frac{\kappa}{2}\hat{n}\tau}=e^{-\frac{\kappa}{2}(\hat{n}+1)\tau}a.$
(240)

Notice from eqn (239) that the time of the photon loss must be the same for
the operators acting on the left of $\hat{\rho}(0)$ and for adjoint operators
acting on the right of $\hat{\rho}(0)$. If we sum over all possible times at
which the photon loss can occur, we arrive at a rather simple expression for
the action of ${\hat{K}}_{1}^{\phantom{\dagger}}(t)$

$\displaystyle{\hat{K}}_{1}^{\phantom{\dagger}}(t)\hat{\rho}(0){\hat{K}}_{1}^{\dagger}(t)$
$\displaystyle=$
$\displaystyle\kappa\int_{0}^{t}d\tau\,e^{-\kappa\tau}e^{-\frac{\kappa}{2}\hat{n}t}a\hat{\rho}(0)a^{\dagger}e^{-\frac{\kappa}{2}\hat{n}t}$
(241) $\displaystyle=$ $\displaystyle\left[1-e^{-\kappa
t}\right]e^{-\frac{\kappa}{2}\hat{n}t}a\hat{\rho}(0)a^{\dagger}e^{-\frac{\kappa}{2}\hat{n}t}$
(242)

from which we obtain the exact expression for
${\hat{K}}_{1}^{\phantom{\dagger}}(t)$

${\hat{K}}_{1}^{\phantom{\dagger}}(t)=\sqrt{\left[1-e^{-\kappa
t}\right]}e^{-\frac{\kappa}{2}\hat{n}t}a.$ (243)

Remarkably, this expression tells us that it does not really matter at what
point during the time interval the photon was lost. We can commute the
destruction operator through to the right so that the loss appears to be at
the very beginning of the interval and is followed by an interval $t$ with
zero jumps. This is a special property of the harmonic oscillator. In the more
general case, because the frequency of an anharmonic oscillator depends on the
number of quanta in the oscillator, the phase accumulated during the time
interval $[0,t]$ would depend on exactly when the photon was lost. If we do
not have the information on when the event occurred, we have to sum over
(trace out) all those different times and the oscillator will be dephased.

It is now straightforward to extend the above derivation to the general case
of losing $\ell$ photons and obtain [102, 84]

${\hat{K}}_{\ell}^{\phantom{\dagger}}(t)=\sqrt{\frac{\left[1-e^{-\kappa
t}\right]^{\ell}}{\ell!}}e^{-\frac{\kappa}{2}\hat{n}t}a^{\ell}.$ (244)

With eqns (244) and (237), we now have the complete solution of the Lindblad
master equation for the undriven damped harmonic oscillator.

Derive eqn (244) for general $\ell$ via recursion from the result for
$\ell-1$. Explicitly verify that the Kraus operators given in eqn (244)
satisfy the trace-preserving condition given in eqn (108). Hint: evaluate eqn
(108) in the Fock state basis.

We remind the reader that the Kraus representation in eqn (237) is not unique.
We have chosen to organize it according to the number of excitations $\ell$
that are lost, but any unitary rotation amongst the
${\hat{K}}_{\ell}^{\phantom{\dagger}}(t)$ would also be a correct solution of
the master equation. The particular representation we have chosen can be
thought of as representing an experiment in which we measure the number of
photons that have leaked into the environment, and then ignore the measurement
result. A unitary rotation among the corresponding Kraus operators could be
made that corresponds to (say) monitoring the signals leaking out of the
cavity using a homodyne or heterodyne detector (and then again ignoring the
result). Since we don’t know the measurement result, we end up with the same
Lindblad master equation for the oscillator because the master equation is
derived by tracing out (i.e. averaging over) the environment and the partial
trace over the environment is independent of the basis in which it is
performed.

If we actually are monitoring the environment with a particular type of
measurement (photon counting, homodyne, etc.), then we can follow the so-
called ‘quantum trajectory’ of the system conditioned on the sequence of
measurement results (by applying only the Kraus operators corresponding to the
particular measurement results, e.g. the sequence of photons emitted into the
environment at specific times). This gives us the state of the system
conditioned on our knowledge of the measurement results. If we have perfect
measurements that fully determine the state of the environment (in some
basis), then it can no longer be entangled with the oscillator and both the
oscillator and environment are left in known pure states.

In deriving the Lindblad equation, we have implicitly assumed that we are
working in the interaction picture where the only term in the Hamiltonian is
the weak coupling to the bath. If there are external drives or other
Hamiltonian terms acting on the oscillator, then in the interaction picture we
simply need to add the usual commutator term

$\frac{d\hat{\rho}}{dt}=-i[\hat{V}(t),\hat{\rho}(t)]+\kappa\mathcal{D}[a]\hat{\rho}.$
(245)

Notice the very important sign difference for the commutator term relative to
the Heisenberg (or interaction picture) equation of motion of an ordinary
operator. This is because, even though the density matrix is technically an
operator, it is representing the state of the system, not the operators that
act upon that state.

The case of a driven damped oscillator is very important and useful to
understand. We will treat it using the method of displaced frames following
the discussion presented in Ref. [103]. Within the rotating wave
approximation, the interaction picture representation of an external drive at
the resonator frequency whose (envelope amplitude) is $\epsilon(t)$ is given
by

$\hat{V}(t)=\epsilon(t)a^{\dagger}+\epsilon^{*}(t)a.$ (246)

The effect of such an external drive is to displace the oscillator in phase
space, changing its position and momentum. It is therefore useful to perform a
(time-dependent) frame change (displacement transformation) to try to
eliminate the drive. The transformed density matrix is

$\tilde{\rho}(t)=D^{\dagger}(\alpha)\hat{\rho}(t)D(\alpha),$ (247)

where

$D(\alpha)=e^{\alpha a^{\dagger}-\alpha^{*}a}=e^{\alpha
a^{\dagger}}e^{-\alpha^{*}a}e^{-\frac{1}{2}|\alpha|^{2}}$ (248)

is the phase-space displacement operator (discussed further in Sec. 8.1).
Using

$D^{\dagger}(\alpha)aD(\alpha)=a+\alpha,$ (249)

it follows that the time derivative of the transformed density matrix obeys

$\displaystyle\frac{d\tilde{\rho}}{dt}=[\dot{\alpha}^{*}a-\dot{\alpha}a^{\dagger},\tilde{\rho}]-i[\epsilon(t)a^{\dagger}+\epsilon^{*}a,\tilde{\rho}]+\kappa\mathcal{D}[a+\alpha]\tilde{\rho}.$
(250)

We can write the dissipation superoperator term as

$\kappa\mathcal{D}[a+\alpha]\tilde{\rho}=\kappa\mathcal{D}[a]\tilde{\rho}-i[i\frac{\kappa}{2}(\alpha^{*}a-\alpha
a^{\dagger}),\tilde{\rho}],$ (251)

which shows that the displacement $\alpha(t)$ produces a Hermitian driving
term that can be chosen to cancel the external driving term by requiring that
$\alpha(t)$ obey

$-i\dot{\alpha}+\epsilon-i\frac{\kappa}{2}\alpha=0.$ (252)

From this it follows that in the presence of the drive $\epsilon(t)$, the
displaced density matrix $\tilde{\rho}$ obeys the undriven master equation
given in Eq. (233). Ref. [103] provides further details on the driven damped
oscillator and shows that if it suffers from dephasing, this is worsened in
the presence of the drive.

##  7 Quantum Error Correction for Bosonic Modes

###  7.1 Introduction

Now that we have the Kraus representation for the amplitude damping channel of
a harmonic oscillator well in hand, we are ready to begin our study of bosonic
error correcting codes. Mazyar Mirrahimi’s lectures cover Schrödinger cat code
[91, 92, 93, 38] and Barbara Terhal’s lectures address the Gottesman-Kitaev-
Preskill (GKP) code [58, 94, 95, 96, 97, 98, 99]. In this section I will
address a very simple family of codes, the binomial codes [84], also known as
‘kitten’ codes because the codewords are quite small but resemble those of the
Schrödinger cat code. The relative performance of all these codes under
various circumstances is thoroughly reviewed in [85].

Another interesting topic is multi-mode codes which employ bosonic states
entangled between two different resonators (or flying modes). The simplest
member of the family of single-mode kitten codes, bears an interesting
resemblance to an early two-mode code designed for amplitude damping [104]. A
novel two-mode code designed for superconducting circuits (the ‘pair-cat’
code) has been proposed in [105].

###  7.2 Binomial Codes

As discussed previously in Sec. 4.4, the smallest qubit code that can exactly
correct an arbitrary single-qubit error has $N=5$ qubits [40, 41, 42], however
there exists a four-qubit code which can approximately (i.e., to lowest order
in the error rate) correct amplitude damping errors. The four qubits of this
code have a Hilbert space of dimension $2^{4}=16$.

In this section we describe the simplest member of the family of binomial
codes for a single bosonic mode. Like the four-qubit code, it is able to
correct amplitude damping to lowest order in the error rate. However it
requires only 5 states in the oscillator Hilbert space and, unlike the qubit
amplitude damping code, it has a simple recovery operation based on
measurement of only a single stabilizer, the photon number parity. Furthermore
unlike the four-qubit code, the bosonic code has already been demonstrated
experimentally to (very nearly) reach [106] and (more recently) to even exceed
[107] the break-even point for QEC. A CZ entangling gate has been demonstrated
between two logically encoded qubits [108] as well as remote state transfer
[109], a teleported CNOT gate [110] and an exponential SWAP gate [111]. The
two codes are compared in Table 5 where we see that the qubit code is
essentially a ‘unary’181818See
https://en.wikipedia.org/wiki/Unary_numeral_system. representation of the
binomial code.

Table 5: Comparison of qubit and bosonic codes for amplitude damping. For the bosonic binomial (‘kitten’) code, the no-jump Kraus operator is $\hat{K}_{0}=\sqrt{\hat{I}-\kappa\,dt\,\hat{n}}$, where $\hat{n}=a^{\dagger}a$ is the oscillator excitation (boson) number. For the 4-qubit code, $\hat{K}_{0}=\sqrt{\hat{I}-\gamma\,dt\,\hat{n}}$, where $\hat{n}=\sum_{j=1}^{4}\sigma^{+}_{j}\sigma^{-}_{j}$, is the total qubit excitation number. Photon number parity is not the sole stabilizer needed to define the binomial code space, but it is the only one that needs to be measured to do quantum error correction of amplitude damping.  | 4-qubit Code | Bosonic Kitten Code
---|---|---
codeword $|1_{\mathrm{L}}\rangle$ | $\frac{1}{\sqrt{2}}(|0000\rangle+|1111\rangle)$ | $\frac{1}{\sqrt{2}}(|0\rangle+|4\rangle)$
codeword $|0_{\mathrm{L}}\rangle$ | $\frac{1}{\sqrt{2}}(|1100\rangle+|0011\rangle)$ | $|2\rangle$
Mean excitation number $\bar{n}$ | 2 | 2
Hilbert space dimension $D$ | $2^{4}=16$ | $\\{0,1,2,3,4\\}=5$
$N_{\mathrm{error}}$ | $\\{\hat{K}_{0},\sigma_{1}^{-},\sigma_{2}^{-},\sigma_{3}^{-},\sigma_{4}^{-}\\}=5$ | $\\{\hat{K}_{0},a\\}=2$
Stabilizers | $S_{1}=Z_{1}Z_{2},\,S_{2}=Z_{3}Z_{4},\,S_{3}=X_{1}X_{2}X_{3}X_{4}$ | $\hat{\Pi}=(-1)^{a^{\dagger}a}$
Number of Stabilizers $N_{\mathrm{Stab}}$ | 3 | 1
Approximate QEC? | Yes, 1st order in $\gamma t$ | Yes, 1st order in $\kappa t$

The simplest member of the binomial code family consists of the following two
code logical words expressed in the Fock basis

$\displaystyle|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left[|0\rangle+|4\rangle\right],$ (253)
$\displaystyle|1_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle|2\rangle.$ (254)

We see immediately that, like the four-qubit amplitude damping code, there are
on average two excitations in both codewords. Both codewords are +1
eigenstates of photon number parity

$\hat{P}=e^{i\pi a^{\dagger}a},$ (255)

which anticommutes with the loss operator

$\hat{P}a=-a\hat{P}.$ (256)

Thus the parity operator is the stabilizer for the code and tells us whether
or not an error (photon loss) has occurred. Of course, if we wait too long
between error syndrome measurements, two jumps might occur which would not
flip the parity and lead to an unrecognized and unrecoverable error.

Because there is only a single mode instead of four qubits, the Kraus
representation for the amplitude damping is simpler. From eqn (238) and eqn
(243) we have, to lowest order in the amplitude damping rate,

$\displaystyle{\hat{K}}_{0}^{\phantom{\dagger}}(t)$ $\displaystyle=$
$\displaystyle[{\hat{K}}_{0}^{\phantom{\dagger}}(dt)]^{t/dt}=e^{-\frac{\kappa}{2}\hat{n}t}\approx
1-\frac{\kappa t}{2}\hat{n},$ (257)
$\displaystyle{\hat{K}}_{1}^{\phantom{\dagger}}(t)$ $\displaystyle=$
$\displaystyle\sqrt{\left[1-e^{-\kappa
t}\right]}e^{-\frac{\kappa}{2}\hat{n}t}a\approx\sqrt{\kappa t}a.$ (258)

Let us begin our analysis by considering the effect of the jump evolution
$\hat{K}_{1}$ on each codeword

$\displaystyle\hat{K}_{1}(t)|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\sqrt{2\kappa t}|E_{0}\rangle,$ (259)
$\displaystyle\hat{K}_{1}(t)|1_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\sqrt{2\kappa t}|E_{1}\rangle,$ (260)

where the normalized error words are

$\displaystyle|E_{0}\rangle$ $\displaystyle=$ $\displaystyle|3\rangle,$ (261)
$\displaystyle|E_{1}\rangle$ $\displaystyle=$ $\displaystyle|1\rangle.$ (262)

Similarly the effect of the no-jump evolution on each codeword is

$\displaystyle\hat{K}_{0}(t)|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\frac{|0\rangle+(1-2\kappa t)|4\rangle}{\sqrt{2}},$ (263)
$\displaystyle\approx$ $\displaystyle\sqrt{1-2\kappa
t}\left[|0_{\mathrm{L}}\rangle+\kappa t|E_{2}\rangle\right],$ (264)
$\displaystyle\hat{K}_{0}(t)|1_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle(1-\kappa t)|1_{\mathrm{L}}\rangle,$ (265)
$\displaystyle\approx$ $\displaystyle\sqrt{1-2\kappa
t}|1_{\mathrm{L}}\rangle,$ (266)

where the third error state is

$|E_{2}\rangle\equiv\frac{|0\rangle-|4\rangle}{\sqrt{2}}.$ (267)

Combining these results yields

$\displaystyle\langle
0_{\mathrm{L}}|\hat{K}_{0}^{\dagger}(t)K_{0}^{\phantom{\dagger}}(t)|0_{\mathrm{L}}\rangle$
$\displaystyle\approx$ $\displaystyle\frac{1}{2}[1+(1-2\kappa t)^{2}]\approx
1-2\kappa t,$ (268) $\displaystyle\langle
1_{\mathrm{L}}|\hat{K}_{0}^{\dagger}(t)K_{0}^{\phantom{\dagger}}(t)|1_{\mathrm{L}}\rangle$
$\displaystyle\approx$ $\displaystyle(1-\kappa t)^{2}\approx 1-2\kappa t,$
(269) $\displaystyle\langle
0_{\mathrm{L}}|\hat{K}_{0}^{\dagger}(t)K_{0}^{\phantom{\dagger}}(t)|1_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle 0$ (270) $\displaystyle\langle
1_{\mathrm{L}}|\hat{K}_{0}^{\dagger}(t)K_{0}^{\phantom{\dagger}}(t)|0_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle 0$ (271) $\displaystyle\langle
0_{\mathrm{L}}|\hat{K}_{1}^{\dagger}(t)K_{1}^{\phantom{\dagger}}(t)|0_{\mathrm{L}}\rangle$
$\displaystyle\approx$ $\displaystyle 2\kappa t,$ (272) $\displaystyle\langle
1_{\mathrm{L}}|\hat{K}_{1}^{\dagger}(t)K_{1}^{\phantom{\dagger}}(t)|1_{\mathrm{L}}\rangle$
$\displaystyle\approx$ $\displaystyle 2\kappa t.$ (273) $\displaystyle\langle
0_{\mathrm{L}}|\hat{K}_{1}^{\dagger}(t)K_{1}^{\phantom{\dagger}}(t)|1_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle 0$ (274) $\displaystyle\langle
1_{\mathrm{L}}|\hat{K}_{1}^{\dagger}(t)K_{1}^{\phantom{\dagger}}(t)|0_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle 0$ (275)

In addition, parity symmetry guarantees that for any pair of logical states
$\sigma_{\mathrm{L}}^{\phantom{\prime}},\sigma_{\mathrm{L}}^{\prime}$

$\displaystyle\langle\sigma_{\mathrm{L}}^{\prime}|K_{0}^{\dagger}(t)K_{1}^{\phantom{\dagger}}(t)|\sigma_{\mathrm{L}}^{\phantom{\prime}}\rangle$
$\displaystyle=$ $\displaystyle 0,$ (276)
$\displaystyle\langle\sigma_{\mathrm{L}}^{\prime}|K_{1}^{\dagger}(t)K_{0}^{\phantom{\dagger}}(t)|\sigma_{\mathrm{L}}^{\phantom{\prime}}\rangle$
$\displaystyle=$ $\displaystyle 0.$ (277)

Thus eqns (268-277) tell us that the Knill-Laflamme conditions in eqn (126)
are fulfilled to first order in $\kappa t$. Thus an ideal recovery operation
will be able to eliminate errors to first order in $\kappa t$ and thus reduce
to the rate of unrecoverable errors to $\mathcal{O}((\kappa t)^{2})$. The more
frequently we correct the errors (using an ideal recovery operation), the
greater is the QEC gain. This is the essence of so-called ‘approximate quantum
error correction.’

Since this is a stabilizer code, the error correction procedure consists of
frequently measuring the stabilizer (photon number parity) to detect photon
loss. If the parity jumps, we must apply a state transfer operation that maps

$\displaystyle|E_{0}\rangle=|3\rangle\rightarrow|0_{\mathrm{L}}\rangle,$ (278)
$\displaystyle|E_{1}\rangle=|1\rangle\rightarrow|1_{\mathrm{L}}\rangle.$ (279)

Since the two error states are orthogonal and the two codewords are
orthogonal, this can be effected via a unitary operation (that by definition
preserves the inner products of states).

If the parity does not jump, then we must apply a different recovery operation
that maps

$|1_{\mathrm{L}}\rangle\rightarrow|1_{\mathrm{L}}\rangle,$ (280)

and undoes the small rotation undergone by $|0_{\mathrm{L}}\rangle$

$\cos\frac{\theta}{2}|0_{\mathrm{L}}\rangle+\sin\frac{\theta}{2}|E_{2}\rangle\rightarrow|0_{\mathrm{L}}\rangle,$
(281)

where from eqn (264), $\sin\frac{\theta}{2}\approx\kappa t$ and to first
order, $\cos\frac{\theta}{2}\approx 1.$ Clearly, to first-order in $\kappa t$,
this transformation is also unitary. These results establish the unitary
recovery operations to be applied conditioned on the error syndrome
measurement. As mentioned earlier, this QEC procedure was recently
successfully carried out [106, 107], exceeding the break-even condition.
Furthermore, a CZ gate between two logically encoded bosonic qubits has been
demonstrated [108] using this kitten code. In addition, a teleported CNOT gate
[110] and an exponential SWAP gate [111] have been demonstrated. A CNOT gate
has also been realized between two cavities with one of them encoded in the
kitten code [112] and a remote state transfer between cavities has been
demonstrated [109, 113].

One may ask how we define break-even for a continuous variable code. Recall
that for qubit codes, break-even (for memory operations) is defined as the
logical qubit having a lifetime matching that of the best single physical
qubit among those comprising the logical qubit. It is convenient to define
break-even for a bosonic code as the logical lifetime matching that of the
longest-lived uncorrectable encoding of information in the oscillator. For
amplitude damping this is the encoding with the fewest number of photons on
average, namely the $0,1$ Fock state encoding

$\displaystyle|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle|n=0\rangle$ (282) $\displaystyle|1_{\mathrm{L}}\rangle$
$\displaystyle=$ $\displaystyle|n=1\rangle.$ (283)

Clearly this encoding cannot correct photon loss since that maps all states on
the logical Bloch sphere to $|0_{\mathrm{L}}\rangle$. However it has the
fewest photons. Averaging over the logical Bloch sphere, the mean photon
number is only $1/2$, so the average photon loss rate of the Kitten code is
higher by a factor of four. This factor is the overhead incurred by the code
in order to be able to correct errors and is analogous to the overhead we saw
earlier for all qubit codes. Indeed, the four-qubit amplitude damping code
faces exactly the same overhead factor of four to reach break-even.

It is interesting to note that the no-jump evolution does not leave the state
invariant if it is not an eigenstate of the photon number operator. In states
where the photon number is uncertain, the probability amplitude for the
components with large photon number decays, while the probability amplitude
for small photon numbers increases (when the state is normalized). This is
essentially a quantum version of a Bayesian update of our estimate of the
probability distribution of photon numbers based on the new information that
no jump occurred.

Our simple kitten code bears a resemblance to an interesting two-mode bosonic
code developed some time ago by Chuang et al. [104]

$\displaystyle|0_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle\frac{|04\rangle+|40\rangle}{\sqrt{2}},$ (284)
$\displaystyle|1_{\mathrm{L}}\rangle$ $\displaystyle=$
$\displaystyle|22\rangle.$ (285)

This code is more complex to create and manipulate because it involves
entangling two separate modes. Because there are two cavities, we need to
measure the parity of each to monitor for jump events in each one. Another
disadvantage relative to the kitten code is that, since the mean photon number
is twice as large, the rate of photon loss errors is doubled. However a major
advantage of this code is the novel feature that both codewords have precisely
the same total photon number, $n=4$ (as opposed to merely the same _average_
photon number as in the binomial code). Hence, provided both cavities have
exactly the same decay rate, both codewords remain invariant under no-jump
evolution. Since no-jump is the most probable result of any parity
measurement, it is a considerable advantage not to have to apply frequent
corrections for no-jump evolution. We need only apply jump corrections to the
appropriate cavity when there is a parity jump in that cavity.

Experimentally, cavities are typically in the ‘over-coupled’ regime where
their decay rates are determined by intentional coupling to external drive
ports rather than by intrinsic internal losses. These intentional couplings
are manually adjustable but not _in operando_ unless complex piezoelectric
positioning systems are installed to precisely adjust the amount by which the
coupling pin from the drive port extends into the cavity. Hence it may be
necessary to accept that, without special efforts, there will generically be
differences in the decay rates of the cavities. However, it is straightforward
to show that the no-jump dephasing back action scales quadratically with the
difference in decay rates rather than linearly. Thus there can still be
substantial benefits even if the decay rates differ by as much as (say) 30%.

The single-mode kitten code we have described above is able to correct a
single photon loss error. This code is the simplest member of an infinite
family of codes [84] which are capable of correcting an arbitrary specified
number of $\mathcal{L}$ photon loss, $G$ gain and $D$ dephasing errors from
the error set

$\left\\{\hat{I};a,a^{2},\ldots,a^{\mathcal{L}};a^{\dagger},\ldots,(a^{\dagger})^{G};\hat{n},\hat{n}^{2},\ldots,\hat{n}^{D}\right\\}.$
(286)

The logical codewords have the form

$\frac{1}{\sqrt{2^{N}}}\sum_{p=0}^{N+1}\sqrt{\left(\begin{array}[]{c}{N+1}\\\
{p}\end{array}\right)}|p(S+1)\rangle,$ (287)

where the sum is over $p$ even for the $|0_{\mathrm{L}}\rangle$ logical state
and $p$ odd for the $|1_{\mathrm{L}}\rangle$ logical state, the ‘spacing’
$S=\mathcal{L}+G$, and $N=\max\\{\mathcal{L},G,2D\\}$. Because the Fock state
amplitudes are given by square roots of binomial coefficients, these are
referred to as binomial codes. Further details can be found in [84]. To date,
only the smallest binomical ‘kitten’ code $(\mathcal{L}=1,G=0,D=0)$ described
above has been realized experimentally [106, 108, 109, 107].

Analyze the recovery operation for the two-mode code described above, for the
case where the two cavities have different decay rates
$\kappa_{1}\neq\kappa_{2}$. Discuss how one might choose to make the no-jump
corrections less often than the jump corrections for the case
$\kappa_{1}\approx\kappa_{2}$.

##  8 Gottesman-Kitaev-Preskill Bosonic Codes

In 2001, Gottesman, Kitaev and Preskill proposed a novel idea for quantum
error correcting codes based on lattice (‘grid’) states in the phase space of
an oscillator [58, 94, 95, 96]. At the time, physical implementation appeared
to be nearly impossible, but recent dramatic experimental progress has in fact
realized QEC close to the break-even point in both ion traps [99] and circuit
QED systems [98]. Before exploring these codes we will take a short
mathematical detour to understand the geometry of phase space for a quantum
oscillator.

###  8.1 Geometry of Phase Space: Non-Commuting Translations and Boosts

The density distribution $\rho(\vec{r},\vec{p})$ of a gas in phase space plays
an essential role in classical statistical mechanics. Things are trickier in
quantum mechanics because the position and momentum operators do not commute.
This in turn implies that the geometry of quantum phase space is such that
adiabatic transport around a closed loop in phase space induces a geometric
phase proportional to the area of the enclosed loop. To see this, consider a
one-dimensional system with wave function $\psi(x)$. Translation of the
momentum (a ‘boost’) is effected via

$\mathcal{D}_{p}(\Delta_{p})\psi(x)=e^{i\Delta_{p}x/\hbar}\psi(x),$ (288)

while translation of the position is effected via

$\mathcal{D}_{x}(\Delta_{x})\psi(x)=\psi(x-\Delta_{x})=e^{-i\Delta_{x}\hat{p}/\hbar}\psi(x),$
(289)

where $\hat{p}=-i\hbar\frac{d}{dx}$ is the momentum operator (and generator of
displacements).

Now consider a set of translations and boosts which moves the system around
the closed loop in phase space illustrated in Fig. 21. The first translation
by $+\Delta_{x}$ yields

$\mathcal{D}_{x}(+\Delta_{x})\psi(x)=\psi(x-\Delta_{x}).$ (290)

The momentum boost $+\Delta_{p}$ yields

$\mathcal{D}_{p}(+\Delta_{p})\mathcal{D}_{x}(+\Delta_{x})\psi(x)=e^{+i\Delta_{p}x/\hbar}\psi(x-\Delta_{x}).$
(291)

The second translation by $-\Delta_{x}$ yields

$\mathcal{D}_{x}(-\Delta_{x})\mathcal{D}_{p}(+\Delta_{p})\mathcal{D}_{x}(+\Delta_{x})\psi(x)=e^{+i\Delta_{p}(x+\Delta_{x})/\hbar}\psi(x).$
(292)

The final momentum boost by $-\Delta_{p}$ returns the system to its original
state except for a geometric phase which depends only on the (oriented) area
of the loop

$\mathcal{D}_{p}(-\Delta_{p})\mathcal{D}_{x}(-\Delta_{x})\mathcal{D}_{p}(+\Delta_{p})\mathcal{D}_{x}(+\Delta_{x})\psi(x)=e^{+i\Delta_{p}\Delta_{x}/\hbar}\psi(x).$
(293)

Finally we note that general translations along arbitrary directions defined
by the vector $\mathbf{V}=(\Delta_{x},\Delta_{p})$ are effected via the
operator

$\hat{T}(\mathbf{V})=e^{+i(\Delta_{p}\hat{x}-\Delta_{x}\hat{p})/\hbar}=e^{+i\mathbf{R}^{\mathrm{T}}\Omega\,\mathbf{V}/\hbar},$
(294)

where $\mathbf{R}\equiv(\hat{x},\hat{p})$ is a vector whose components are the
position and momentum operators and $\Omega$ is the symplectic form

$\Omega=\left(\begin{array}[]{cc}0&+1\\\ -1&0\end{array}\right).$ (295)

Figure 21: A closed (right-handed) loop in phase space enclosing area
$A=\Delta_{x}\Delta_{p}$ which yields a geometric phase $e^{+iA/\hbar}$.

Using the Feynman disentangling theorem, this can be decomposed into

$\hat{T}(\mathbf{V})=\mathcal{D}_{p}(\Delta_{p})\mathcal{D}_{x}(\Delta_{x})e^{-\frac{i}{2}\Delta_{x}\Delta_{p}/\hbar},$
(296)

from which it follows that if the second half of the square trajectory in Fig.
21 is replaced by a single displacement,
$\mathcal{D}_{-\vec{V}}=\mathcal{D}^{\dagger}_{\vec{V}}$, along the diagonal
from the upper right to lower left corners of the square, the resulting
triangular path has geometric phase
$e^{+\frac{i}{2}\Delta_{x}\Delta_{p}/\hbar}$, consistent with the fact that it
has half the area of the square trajectory.

More generally, a fact which will be useful later is that

$\hat{T}(\mathbf{U})\hat{T}(\mathbf{V})=\hat{T}(\mathbf{V})\hat{T}(\mathbf{U})e^{i\frac{2\pi}{h}\mathbf{V}^{\mathrm{T}}\Omega\mathbf{U}}=\hat{T}(\mathbf{U}+\mathbf{V})e^{i\frac{\pi}{h}\mathbf{V}^{\mathrm{T}}\Omega\mathbf{U}},$
(297)

which implies that two translations commute if and only if their symplectic
norm is an integer multiple of Planck’s constant, $h$

$\frac{1}{h}\mathbf{V}^{\mathrm{T}}\Omega\mathbf{U}\in\mathbb{Z}.$ (298)

Equivalently, the two translations define a parallelogram whose area is an
integer multiple of $h$.

Direct experimental measurement of the geometric phase resulting from closed
trajectories can be obtained by coupling a qubit to an oscillator and
executing conditional displacements which can be realized in both trapped ions
[114, 115, 116, 117, 118, 119, 97, 99] and in circuit QED [98]. These
conditional displacement operators are a generalization of eqn (294) that take
advantage of the fact that the forces driving the oscillator can be made spin
dependent

$\hat{T}_{\mathrm{c}}(\mathbf{V})=\hat{T}(Z\mathbf{V}),$ (299)

where $Z$ is the Pauli spin operator of the ancilla qubit. The protocol begins
by placing the qubit in a superposition state and the oscillator in its ground
state

$|\psi\rangle=\frac{1}{\sqrt{2}}\left\\{|\uparrow\rangle+|\downarrow\rangle\right\\}|0\rangle.$
(300)

Then the oscillator is moved around a clockwise (counterclockwise) loop in
phase space if the spin is up (down). The spin-dependent ‘phase kickback’ from
this unitary rotates the spin around the $z$ axis by an angle given by the
difference in geometric phases of the two phase space loops

$|\psi^{\prime}\rangle=\frac{1}{\sqrt{2}}\left\\{e^{i\theta_{\uparrow}}|\uparrow\rangle+e^{i\theta_{\downarrow}}|\downarrow\rangle\right\\}|0\rangle.$
(301)

Observing the ‘Ramsey interference’ fringes caused by this rotation of the
ancilla qubit through angle $\theta=\theta_{\downarrow}-\theta_{\uparrow}$ is
routinely used by experimentalists to precisely calibrate the relation between
applied electromagnetic drive on the oscillator and the resulting displacement
amplitude [119, 97, 98, 99].

###  8.2 GKP Codes: Lattices in Phase Space

Now that we understand the geometry of phase space through the commutation
relations between different translations, we are ready to study the GKP codes.
The GKP code space of the logical qubit is defined to be the $+1$ eigenspace
of two translations $\hat{S}_{1}=\hat{T}(\mathbf{U})$ and
$\hat{S}_{2}=\hat{T}(\mathbf{V})$ that obey

$\frac{1}{h}\mathbf{V}^{\mathrm{T}}\Omega\mathbf{U}=2,$ (302)

and therefore the code space contains two states. Based on the previous
discussion of codes involving $N$ physical qubits, you might think that since
the oscillator Hilbert space contains an infinite number of states that you
would need an infinite number of stabilizers. This is not the case however.
The multi-qubit Pauli operator stabilizers for qubit codes have eigenvalues
$\pm 1$ and thus provide only 1 bit of information when measured. The
translations used as stabilizers for the bosonic codes have a continuum of
eigenvalues lying on the unit circle in the complex plane. The statement that
the code space has stabilizer eigenvalues precisely equal to $+1$ therefore
represents far more powerful constraints.

To see how the GKP code works, let us specialize to the simplest case of a
square lattice in phase space generated by the two stabilizers (displacements)

$\displaystyle S_{p}$ $\displaystyle=$ $\displaystyle
e^{+i2\sqrt{\pi}\hat{x}},$ (303) $\displaystyle S_{x}$ $\displaystyle=$
$\displaystyle e^{-i2\sqrt{\pi}\hat{p}},$ (304)

where from henceforth we are using dimensionless units with $\hbar=1$. These
stabilizers commute

$S_{p}S_{q}=e^{i4\pi}S_{q}S_{p},$ (305)

and they stabilize the code space spanned by the logical codeword states

$\displaystyle\Psi_{0}(x)$ $\displaystyle=$
$\displaystyle\sum_{n=-\infty}^{+\infty}\delta(x-(2n)\sqrt{\pi}),$ (306)
$\displaystyle\Psi_{1}(x)$ $\displaystyle=$
$\displaystyle\sum_{n=-\infty}^{+\infty}\delta(x-(2n+1)\sqrt{\pi}).$ (307)

These ‘picket fence’ states are infinitely squeezed, unnormalizable, and have
infinite energy. We will ignore these inconvenient truths for the moment but
return to them later. For now, we note that they are also picket fence states
in the momentum basis and their Wigner functions have support on a square
lattice in phase space. Despite the fact that position and momentum do not
commute, the points of the square lattice are sharply defined (infinitely
squeezed in both position _and_ momentum). This does not violate the
Heisenberg principle because both position and momentum remain uncertain
modulo the lattice constants.

Remarkably, within this logical subspace, the logical Pauli operators become
simple phase space translations as illustrated in Fig. 22 where we see that
the ‘unit cell’ has area $4\pi$ (or, restoring the units, $4\pi\hbar=2h$) and
therefore holds two quantum states. Within the logical subspace, the Pauli
$X_{\mathrm{L}}$ and $Z_{\mathrm{L}}$ operators are displacements by half of
the respective lattice constants implying that

$\displaystyle X_{\mathrm{L}}^{2}$ $\displaystyle=$ $\displaystyle
S_{x}=\hat{I},$ (308) $\displaystyle Z_{\mathrm{L}}^{2}$ $\displaystyle=$
$\displaystyle S_{p}=\hat{I},$ (309)

which is consistent with the properties of the Pauli matrices since within the
logical space, $S_{x}$ and $S_{y}$ are each (effectively) the identity.
Similarly

$\displaystyle X_{\mathrm{L}}$ $\displaystyle=$ $\displaystyle
X_{\mathrm{L}}^{\dagger}S_{x}=X^{\dagger},$ (310) $\displaystyle
Z_{\mathrm{L}}$ $\displaystyle=$ $\displaystyle
Z_{\mathrm{L}}^{\dagger}S_{p}=Z^{\dagger},$ (311)

as expected. The area of the four small squares being $\pi$ implies that

$Z_{\mathrm{L}}X_{\mathrm{L}}=-X_{\mathrm{L}}Z_{\mathrm{L}}.$ (312)

Furthermore, the shaded triangle has area $\pi/2$ implying that

$Y_{\mathrm{L}}=Y_{\mathrm{L}}^{\dagger}=e^{i\frac{\pi}{2}}X_{\mathrm{L}}Z_{\mathrm{L}}=iX_{\mathrm{L}}Z_{\mathrm{L}}.$
(313)

Thus, within the logical space, these translations form a precise
representation of the Pauli group. More generally, one of the advantages of
GKP codes is that Clifford group operations correspond to (relatively) simple
Gaussian operations on the bosonic modes (e.g. squeezing) that can be executed
using quadratic Hamiltonians. For example, the CNOT gate corresponds to the
so-called SUM gate

$\mathrm{CNOT}_{12}=e^{-\frac{i}{\hbar}\hat{x}_{1}\hat{p}_{2}},$ (314)

which displaces mode $2$ by an amount equal to the coordinate of mode 1,
$\hat{x}_{2}\rightarrow\hat{x}_{2}+\hat{x}_{1}$. (Additionally,
$\hat{p}_{2}\rightarrow\hat{p}_{2}$, $\hat{x}_{1}\rightarrow\hat{x}_{1}$, and
$\hat{p}_{1}\rightarrow\hat{p}_{1}-\hat{p}_{2}$). Here mode 1 is the control
and mode 2 is the target of the CNOT.

Show that the generator of the CNOT gate, $\hat{x}_{1}\hat{p}_{2}$, is the sum
of beam splitter ($i[a_{1}a_{2}^{\dagger}-a_{2}a_{1}^{\dagger}]$) and two-mode
squeezing ($i[a_{1}^{\dagger}a_{2}^{\dagger}-a_{2}a_{1}]$) terms. A more
challenging exercise is to show that the CNOT gate can be written as a 50:50
beam splitter (with a particular phase) followed by single-mode squeezing (of
a certain strength) in each mode, and then a second 50:50 beam splitter with
the opposite phase.

Figure 22: Unit cell of the square lattice defined by the stabilizers
$S_{x},S_{p}$. The Pauli operators $X_{\mathrm{L}}$ and $Z_{\mathrm{L}}$ are
displacements by half a lattice constant in position and momentum
respectively. The Pauli operator
$Y_{\mathrm{L}}=iX_{\mathrm{L}}Z_{\mathrm{L}}$ is displacement by half the
diagonal. The factor of $i$ in this relation is consistent with the shaded
area being $\pi/2$.

###  8.3 Error Correction with GKP Codes

The GKP codes were originally designed to correct small (i.e., less than half
a lattice constant) displacements of the oscillator in phase space. We have
recently shown that they are also remarkably effective against more realistic
error modes (e.g. amplitude damping) [85]. However analytical understanding is
easier for the case of small displacement errors. Because both the errors and
the stabilizers are displacements, they do not (generically) commute and these