# Logical Gates and Read-Out of Superconducting Gottesman-Kitaev-Preskill
Qubits

Mackenzie H. Shaw  ARC Centre of Excellence for Engineered Quantum Systems,
School of Physics, The University of Sydney, Sydney, NSW 2006, Australia.
QuTech, Delft University of Technology, P.O. Box 5046, 2600 GA Delft, The
Netherlands  Faculty of EEMCS, Delft University of Technology, Mekelweg 4,
2628 CD Delft, The Netherlands  Andrew C. Doherty  ARC Centre of Excellence
for Engineered Quantum Systems, School of Physics, The University of Sydney,
Sydney, NSW 2006, Australia.  Arne L. Grimsmo  ARC Centre of Excellence for
Engineered Quantum Systems, School of Physics, The University of Sydney,
Sydney, NSW 2006, Australia.  AWS Center for Quantum Computing, Pasadena, CA
91125, USA  California Institute of Technology, Pasadena, CA 91125, USA

###### Abstract

The Gottesman-Kitaev-Preskill (GKP) code is an exciting route to fault-
tolerant quantum computing since Gaussian resources and GKP Pauli-eigenstate
preparation are sufficient to achieve universal quantum computing. In this
work, we provide a practical proposal to perform Clifford gates and state
read-out in GKP codes implemented with active error correction in
superconducting circuits. We present a method of performing Clifford circuits
without physically implementing any single-qubit gates, reducing the potential
for them to spread errors in the system. In superconducting circuits, all the
required two-qubit gates can be implemented with a single piece of hardware.
We analyze the error-spreading properties of GKP Clifford gates and describe
how a modification in the decoder following the implementation of each gate
can reduce the gate infidelity by multiple orders of magnitude. Moreover, we
develop a simple analytical technique to estimate the effect of loss and
dephasing on GKP codes that matches well with numerics. Finally, we consider
the effect of homodyne measurement inefficiencies on logical state read-out
and present a scheme that implements a measurement with a $0.1\%$ error rate
in $630$ ns assuming an efficiency of just $75\%$.

##  I Introduction

To construct a large-scale quantum computer, quantum error correction (QEC) is
required to achieve error rates low enough to run useful algorithms. Bosonic
QEC codes [1, 2, 3, 4] are a promising approach to QEC because they encode
logical information in the formally infinite dimensional Hilbert space of a
quantum harmonic oscillator, allowing for robust logical qubits to be
constructed from a single physical device. Moreover, bosonic codes can be
concatenated with a traditional QEC code such as the surface code [5, 6, 7, 8]
or quantum LDPC codes [9], using the enhanced error tolerance of the bosonic
code to reduce the overhead required to reach a given overall logical error
rate.

Actively pursued examples of bosonic codes include the cat code [2], binomial
code [4], and Gottesman-Kitaev-Preskill (GKP) code [3], with a recent GKP code
experiment surpassing the break-even point by more than a factor of two [10].
GKP codes are also particularly promising since universal quantum computation
can be achieved using only Gaussian resources combined with a supply of either
GKP Pauli-eigenstates [11] or GKP Hadamard-eigenstates [12]. Such GKP Pauli-
eigenstates have been produced in both superconducting microwave cavities [13,
14, 10] and the motional states of trapped ions [15, 16], but currently have
error-rates too high to surpass the threshold of the GKP-surface code or toric
code [5, 7].

Although proposals have been made for realizing GKP one- and two-qubit gates
[17, 18, 19] and practical error-correction schemes [20], more work is
required to develop platform-specific schemes that are fault-tolerant to
errors, convenient to implement experimentally, and combat experimentally-
relevant sources of error. Indeed, due to the low energy of microwave photons,
homodyne detection in microwave circuits is severely limited in practice, with
state-of-the-art experiments achieving efficiencies on the order of 60% to 75%
[21, 22]. A separate but related issue is that multi-mode simulations of GKP
codestates typically use an unrealistic noise model – Gaussian random
displacement channels – that do not accurately capture the performance of GKP
codes against loss [23, 24].

In this work, we introduce three practical proposals to improve the
performance of Clifford gates and state read-out for actively-corrected GKP
qubits implemented in superconducting devices. The first scheme we present
removes the need to physically perform single-qubit Clifford gates, thereby
reducing the number of physical gates (and hence the spread of errors) in a
given circuit. Second, we introduce a general method to counteract the spread
of errors due to Clifford gates using a modified error correction scheme after
each gate. Finally, we improve the effective measurement efficiency of logical
read-out by coupling each high-Q GKP mode to a low-Q read-out ancilla.

We utilize two recently developed techniques to analyze the performance of
each scheme. We analyze GKP Clifford gates using the _stabilizer subsystem
decomposition_ [24]. In particular, the stabilizer subsystem decomposition is
designed such that the partial trace over the stabilizer subsystem corresponds
exactly to an ideal decoding map, making it suitable to calculate gate
fidelities and other quantities of interest. We analyze our measurement scheme
using the methods of Ref. [25], which allows one to solve for the quantum
trajectory evolution of a system with time-independent linear dynamics and
Gaussian measurement noise.

We also introduce a new theoretical technique to analytically estimate the
effect of loss and dephasing on GKP codes. This analytical estimate is the
lowest-order approximation of the gate infidelity error analysis conducted in
Ref. [24] using the stabilizer subsystem decomposition. However, expressions
obtained coincide with those corresponding to a continuous-variable “twirling
approximation” of the relevant quantum channel. As such, the technique can
also be viewed as a justification of the twirling approximation that has
previously been used to analyze approximate GKP codestates [26], and a
generalization to general noise channels.

The work in this paper focuses on only two of the steps – Clifford gates and
state read-out – required to perform fault-tolerant quantum computation using
GKP codes. Therefore our proposals need to be combined with other work done on
GKP state preparation [27, 28, 13, 14, 16, 29], and non-Clifford gates either
implemented directly [19, 30] or via magic state preparation [11]. Moreover,
in the context of a fault-tolerant algorithm one needs either to concatenate a
GKP code with a qubit code [31, 32, 5, 6, 7] or use a “genuine” multi-mode GKP
code [3, 33, 34, 30].

The remainder of this paper is organized as follows. In Section II, we provide
an overview of GKP codes and the notation we will use throughout the
manuscript. In Section III, we describe how to remove single-qubit gates from
a quantum circuit, define the generalized controlled gates which must be
performed instead, and provide superconducting circuits that can implement
these gates in a circuit QED experiment. We move on to quantifying the quality
of logical gates in Section IV, in which we explain how to minimize the spread
of logical errors using a modified decoding scheme. In Section V we introduce
our new analytic approximation technique for loss and dephasing acting on GKP
codes – these results may also be of broader interest to researchers wishing
to characterize noise in GKP codes. Finally, we analyze the effect of
measurement inefficiencies on logical state read-out in Section VI and present
our proposal to use an additional ancilla mode to perform homodyne detection
with an enhanced efficiency. We provide concluding remarks in Section VII.

##  II GKP Codes

We now present a brief overview of the properties of GKP codes [3] and the
notation that we will use in the remainder of this manuscript. GKP codes are a
class of bosonic stabilizer codes in which the codespace is the simultaneous
$+1$-eigenspace of operators acting on a continuous variable (CV) Hilbert
space. The CV system can be described by ladder operators
$[a,a^{{\dagger}}]=1$ or quadrature operators $[q,p]=i$. We denote the number
states as $\ket{n}$, and position and momentum eigenstates as $\ket{x}_{q}$
and $\ket{y}_{p}$, respectively. We also introduce the displacement operator

$T(\bm{\mathbf{v}})=T(v_{1},v_{2})=e^{-iv_{1}p+iv_{2}q}$ (1)

for $\bm{\mathbf{v}}=(v_{1},v_{2})\in\mathbb{R}^{2}$, which obeys

$T(\bm{\mathbf{v}})T(\bm{\mathbf{w}})=e^{-i(v_{1}w_{2}-v_{2}w_{1})/2}T(\bm{\mathbf{v}}+\bm{\mathbf{w}}).$
(2)

This definition of the displacement operator also ensures that
$T(\lambda,0)\ket{x}_{q}=\ket{x+\lambda}_{q}$ and
$T(0,\lambda)\ket{y}_{p}=\ket{y+\lambda}_{p}$.

To define a (single-mode) GKP code, we begin with two real vectors
$\bm{\mathbf{\alpha}}=(\alpha_{1},\alpha_{2})$ and
$\bm{\mathbf{\beta}}=(\beta_{1},\beta_{2})$ that satisfy
$\alpha_{1}\beta_{2}-\beta_{1}\alpha_{2}=\pi$. The stabilizer generators are
then given by $S_{X}=T(2\bm{\mathbf{\alpha}})$ and
$S_{Z}=T(2\bm{\mathbf{\beta}})$, which (together with their inverses) generate
the stabilizer group. The logical Pauli operators are given by
$\bar{X}=T(\bm{\mathbf{\alpha}})$,
$\bar{Y}=T(\bm{\mathbf{\alpha}}+\bm{\mathbf{\beta}})$ and
$\bar{Z}=T(\bm{\mathbf{\beta}})$, where we use bars to indicate logical
operators and states. We define the GKP logical lattice

$\mathcal{L}=\\{m\bm{\mathbf{\alpha}}+n\bm{\mathbf{\beta}}\>|\>m,n\in\mathbb{Z}\\},$
(3)

and the corresponding Voronoi cell

$\mathcal{V}_{\mathcal{L}}=\big{\\{}\bm{\mathbf{v}}\in\mathbb{R}^{2}\>\big{|}\>|\bm{\mathbf{v}}|<|\bm{\mathbf{v}}-\bm{\mathbf{\ell}}|\;\forall\,\bm{\mathbf{\ell}}\in\mathcal{L},\bm{\mathbf{\ell}}\neq\bm{\mathbf{0}}\big{\\}}$
(4)

which contains the set of points closer to the origin than any other point in
$\mathcal{L}$.

The simplest example of a GKP code is the square GKP code, given by
$\bm{\mathbf{\alpha}}_{\text{sq}}=(\sqrt{\pi},0)$ and
$\bm{\mathbf{\beta}}_{\text{sq}}=(0,\sqrt{\pi})$. In this case,
$\bar{X}_{\text{sq}}=e^{-i\sqrt{\pi}p}$ and
$\bar{Z}_{\text{sq}}=e^{i\sqrt{\pi}q}$. General GKP codes can be conveniently
described by introducing the canonically transformed logical quadrature
operators

$\displaystyle\bar{q}$
$\displaystyle=\frac{1}{\sqrt{\pi}}(\beta_{2}q-\beta_{1}p),$
$\displaystyle\bar{p}$
$\displaystyle=\frac{1}{\sqrt{\pi}}(\alpha_{1}p-\alpha_{2}q),$ (5)

such that $\bar{X}=e^{-i\sqrt{\pi}\bar{p}}$ and
$\bar{Z}=e^{i\sqrt{\pi}\bar{q}}$. Of particular interest is the hexagonal GKP
code, given by

$\displaystyle\bm{\mathbf{\alpha}}_{\text{hex}}$
$\displaystyle=\sqrt{\pi}\bigg{(}\frac{\sqrt[4]{3}}{\sqrt{2}},-\frac{1}{\sqrt{2}\sqrt[4]{3}}\bigg{)},$
$\displaystyle\bm{\mathbf{\beta}}_{\text{hex}}$
$\displaystyle=\sqrt{\pi}\bigg{(}0,\frac{\sqrt{2}}{\sqrt[4]{3}}\bigg{)}$ (6)

which has been shown to have the lowest logical error rate out of all single-
mode GKP geometries under a pure loss noise model [35]. Note that we have
chosen a rotated definition of the hexagonal code, such that $\beta_{1}=0$ and
$\bar{q}\propto q$, allowing a convenient representation of the GKP codestates
in the position basis.

To aid our discussion of logical Pauli operators in Sections III and IV, we
introduce the notation

$\displaystyle s_{1}$ $\displaystyle=-\bar{p},$ $\displaystyle s_{2}$
$\displaystyle=\bar{q}-\bar{p},$ $\displaystyle s_{3}$
$\displaystyle=\bar{q}.$ (7)

Using this, we can write the logical Pauli operators as
$\bar{\sigma}_{i}=e^{i\sqrt{\pi}s_{i}}$, where $\sigma_{1,2,3}=X,Y,Z$
respectively. Each quadrature $s_{i}$ can be written in polar coordinates
given by $s_{i}=r_{i}(q\cos\theta_{i}+p\sin\theta_{i})$.

GKP Clifford operators, which map logical Pauli operators to logical Pauli
operators, are given by unitary Gaussian operators $\bar{A}$ acting on the CV
space. Concretely, the GKP Clifford group is generated by the operators

$\displaystyle\bar{H}$ $\displaystyle=e^{i\pi(\bar{q}^{2}+\bar{p}^{2})/4},$
$\displaystyle\bar{S}$ $\displaystyle=e^{i\bar{q}^{2}/2},$
$\displaystyle\bar{C}_{Z}$ $\displaystyle=e^{i\bar{q}\otimes\bar{q}}.$ (8)

In Section IV we will use an equivalent representation of Gaussian operators
as symplectic matrices. In particular, one can describe an arbitrary $n$-mode
Gaussian operator $U$ with a $2n\times 2n$ real symplectic matrix
$\mathcal{S}(U)\in\mathrm{Sp}(2n,\mathbb{R})$ acting on the vector of
quadrature operators
$\bm{\mathbf{\xi}}=(q_{1},\dots,q_{n},p_{1},\dots,p_{n})$, such that
$U^{{\dagger}}\bm{\mathbf{\xi}}U=\mathcal{S}(U)\bm{\mathbf{\xi}}$ (where $U$
and $U^{{\dagger}}$ act component-wise on $\bm{\mathbf{\xi}}$). For example, a
single-mode rotation operator $R(\theta)=e^{i\theta a^{{\dagger}}a}$ can be
described with the symplectic operator

$\mathcal{S}\big{(}R(\theta)\big{)}=\begin{bmatrix}\cos\theta&-\sin\theta\\\
\sin\theta&\cos\theta\end{bmatrix}.$ (9)

In the square GKP code, we have

$\displaystyle\mathcal{S}\big{(}\bar{H}_{\text{sq}}\big{)}$
$\displaystyle=\begin{bmatrix}0&-1\\\ 1&0\end{bmatrix},$ (10a)
$\displaystyle\mathcal{S}\big{(}\bar{S}_{\text{sq}}\big{)}$
$\displaystyle=\begin{bmatrix}1&0\\\ 1&1\end{bmatrix},$ (10b)
$\displaystyle\mathcal{S}\big{(}\bar{C}_{Z,\text{sq}}\big{)}$
$\displaystyle=\begin{bmatrix}1&0&0&0\\\ 0&1&0&0\\\ 0&1&1&0\\\
1&0&0&1\end{bmatrix}.$ (10c)

In general GKP codes, the symplectic matrix corresponding to the Clifford gate
$\bar{A}$ can be found by
$\mathcal{S}\big{(}\bar{A}\big{)}=M^{\vphantom{-1}}_{\mathcal{L}}\mathcal{S}\big{(}\bar{A}_{\text{sq}}\big{)}M_{\mathcal{L}}^{-1}$,
where
$M_{\mathcal{L}}=[\bm{\mathbf{\alpha}},\bm{\mathbf{\beta}}]/\\!\sqrt{\pi}$ is
the change of basis matrix
$\bar{\bm{\mathbf{\xi}}}=M_{\mathcal{L}}^{-1}\bm{\mathbf{\xi}}$ from physical
modes $\bm{\mathbf{\xi}}$ to logical modes
$\bm{\mathbf{\bar{\xi}}}=(\bar{q}_{1},\dots,\bar{q}_{n},\bar{p}_{1},\dots,\bar{p}_{n})$.

The ideal codestates of a general GKP code are the simultaneous
$+1$-eigenstates of the stabilizers $S_{X}$ and $S_{Z}$. However, these ideal
codestates are non-normalizable and hence cannot be realized in any physical
system. To construct normalisable codestates, we use the non-unitary envelope
operator $e^{-\Delta^{2}a^{\dagger}a}$ to define the approximate GKP
codestates $\ket{\bar{\psi}_{\Delta}}\propto
e^{-\Delta^{2}a^{{\dagger}}a}\ket{\bar{\psi}}$. This approximation, however,
introduces errors as the approximate states are not exact $+1$ eigenstates of
the stabilizers. The parameter $\Delta$ characterizes the quality of the
approximate GKP codestates, where the limit $\Delta\rightarrow 0$ approaches
the ideal codestates. We will also commonly quote the average photon number of
the GKP states [35]

$\bar{n}=\frac{1}{2}\big{(}\\!\braket{\bar{0}_{\Delta}}{a^{{\dagger}}a}{\bar{0}_{\Delta}}+\braket{\bar{1}_{\Delta}}{a^{{\dagger}}a}{\bar{1}_{\Delta}}\\!\big{)}\approx\frac{1}{2\Delta^{2}}-\frac{1}{2}$
(11)

and the GKP squeezing parameter
$\Delta_{\mathrm{dB}}=-10\log_{10}(\Delta^{2})$, both of which tend to
infinity as $\Delta\rightarrow 0$.

Approximate GKP codestates have been prepared experimentally in
superconducting resonators with an experimentally-determined squeezing of
$\Delta_{\mathrm{dB}}=9.1$ [14]. GKP-surface code and toric code studies [5,
6, 7] have shown that the surface code threshold can be reached using
codestates with $\Delta_{\mathrm{dB}}=9.9$ assuming that the dominant source
of noise is due solely to the approximate GKP codestates. However, in the
presence of circuit noise, a larger squeezing is required to get under the
surface code threshold. As such, we use $\Delta_{\mathrm{dB}}=12$ as a rough
target for practical quantum computing with GKP codes.

Since the codestates $\ket{\bar{\mu}_{\Delta}}$ are not orthogonal, we can use
the Löwdin orthonormalization procedure [36] to define orthonormalized GKP
codestates $\ket{\bar{\mu}_{\Delta,\text{o}}}$, which form an orthonormal
basis of the subspace spanned by $\\{\ket{\bar{\mu}_{\Delta}}\\}_{\mu=0,1}$.
Note that the difference between $\ket{\bar{\mu}_{\Delta}}$ and
$\ket{\bar{\mu}_{\Delta,\text{o}}}$ is negligible for values of $\Delta$ that
are small enough to be practical.

Figure 1: The ideal error-correction procedure for the square GKP code,
performed over the Voronoi cell of the square GKP lattice. In this case, the
Voronoi cell is a square centered at the origin with side length $\sqrt{\pi}$.
In green, a random walk of displacement errors results in an overall
displacement error $T(\bm{\mathbf{e}})$ (up to a geometric phase) acting on
the ideal codestate. Since both the components of $\bm{\mathbf{e}}$ are less
than $\sqrt{\pi}/2$, the shortest displacement that returns the state to the
codespace is $T(\bm{\mathbf{d}})=T(-\bm{\mathbf{e}})$. In red, the
displacement error $T(\bm{\mathbf{e}}^{\prime})$ has
$e_{1}^{\prime}>\sqrt{\pi}/2$. This means that the smallest displacement that
returns the state to the codespace is $T(\bm{\mathbf{d}}^{\prime})$, which has
the net result of applying a logical $\bar{X}$ on the state.

Next, we discuss error-correcting the GKP code, beginning with what we refer
to as ideal error-correction, which consists of the following steps:

  1. 1.

First, we measure both stabilizers $S_{X}=e^{-2i(\alpha_{1}p-\alpha_{2}q)}$
and $S_{Z}=e^{2i(\beta_{2}q-\beta_{1}p)}$, with measurement outcomes
$M_{X},M_{Z}$. In ideal error correction, we assume $M_{X}$ and $M_{Z}$ can be
obtained error-free.

  2. 2.

We assign each pair of measurement outcomes with a quasi-position and momentum
$(k_{q},k_{p})$ such that $M_{X}=e^{-2i(\alpha_{1}k_{p}-\alpha_{2}k_{q})}$ and
$M_{Z}=e^{2i(\beta_{2}k_{q}-\beta_{1}k_{p})}$ respectively.

  3. 3.

Finally, a displacement $T(-k_{q},-k_{p})$ is applied that returns the state
to the ideal codespace of the code.

The periodicity of the complex exponential means that the map
$(M_{X},M_{Z})\mapsto(k_{q},k_{p})\in\mathbb{R}^{2}$ is not well-defined; in
particular, adding any integer multiple of $\bm{\mathbf{\alpha}}$ or
$\bm{\mathbf{\beta}}$ to the vector $(k_{q},k_{p})$ results in the same pair
of measurement outcomes. As such, one must specify a primitive cell of the
logical lattice $\mathcal{L}_{\text{log}}$ to serve as the decoding patch
$\mathcal{P}\subset\mathbb{R}^{2}$. Then, we can choose a unique vector
$\bm{\mathbf{k}}=(k_{q},k_{p})\in\mathcal{P}$ for any pair of measurement
outcomes.

In general, the best choice of decoding patch depends on the noise model being
applied to the GKP code. If we consider a noise model defined by a uniform
mean-zero Gaussian random walk of displacement errors, the optimal patch to
decode over is the Voronoi cell $\mathcal{V}_{\mathcal{L}}$ of the GKP logical
lattice $\mathcal{L}$, see Eqs. 3, 4 and 1. This choice ensures that the
displacement $T(-k_{q},-k_{p})$ is the shortest displacement that returns the
state to the codespace, thereby minimizing the chance of a logical error. Note
that throughout this paper, by “optimal patch” we are really referring to a
patch corresponding to a minimum-weight decoder, and further improvements
could be made by considering a maximum-likelihood decoder. The above
description also applies to multi-mode GKP codes by increasing the number of
stabilizers and the dimension of $\bm{\mathbf{k}}$.

In Sections IV and V we will consider different decoding patches, and for
this, we will make use of the following definitions:

  * •

The distance $d$ of a patch $\mathcal{P}$ is twice the length of the shortest
vector on the boundary of the patch $\partial\mathcal{P}$, and

  * •

The degeneracy $a$ of $\mathcal{P}$ is half the number of vectors with length
$d$ on $\partial\mathcal{P}$.

The definition of $d$ is chosen such that any error $T(\bm{\mathbf{e}})$ with
$|\bm{\mathbf{e}}|<d/2$ is correctable. Moreover, the shortest logical Pauli
operator $\bar{P}=T(\bm{\mathbf{\ell}})$ has $|\bm{\mathbf{\ell}}|=d$, while
$a$ corresponds to the number of different equal-length logical Pauli
operators.

##  III Phase-tracked single-qubit Clifford gates

In this section, we outline how to perform arbitrary Clifford circuits in GKP
codes without physically implementing any single-qubit Clifford gates,
reducing the spread of errors in the computation. In this scheme, single-qubit
Clifford gates are tracked in software and absorbed into the two-qubit
Clifford gates in the circuit. Instead, a larger set of two-qubit gates must
be performed. We call these gates generalized controlled gates, and this
procedure is sometimes referred to as the “Clifford frame” [37]. Conveniently,
all the generalized controlled gates can be implemented using a single piece
of superconducting hardware, with each gate differentiated by the phase of a
local oscillator. This is advantageous since it reduces the number of physical
gates that must be implemented, reducing the spread of errors in the circuit
(as discussed in Section IV).

We now step through precisely how the single-qubit Clifford gates need to be
tracked in order to implement a general quantum computation. We start with a
universal quantum computing circuit comprising of state preparation in the
$\ket{0}$ or $\ket{T}=(\ket{0}+e^{i\pi/4}\ket{1})/\sqrt{2}$ states, Pauli
$Z$-measurements, and adaptive Hadamard, phase and controlled-$Z$ gates. One
can rewrite such a circuit instead consisting of state preparation in the
$\ket{0}$ or $\ket{T}$ states, Pauli $X$, $Y$ and $Z$-measurements, and
generalized controlled gates (which must be performed adaptively). For Pauli
matrices $\sigma_{i},\sigma_{j}$ ($i,j\in\\{1,2,3\\}$), we define the
$\sigma_{i}$-controlled-$\sigma_{j}$ gate as

$C_{\sigma_{i}\sigma_{j}}=I\otimes
I-\frac{1}{2}(I-\sigma_{i})\otimes(I-\sigma_{j}).$ (12)

These gates can be interpreted as applying a $\sigma_{j}$ gate to the target
(second) qubit if the control (first) qubit is a $-1$ eigenstate of
$\sigma_{i}$, and otherwise doing nothing. For example the $Z$-controlled-$Z$
gate is simply the controlled-$Z$ gate, and the $Z$-controlled-$X$ gate is the
controlled-NOT gate.

To rewrite a Clifford circuit in terms of generalized controlled gates, we use
the following fact: given a generalized controlled gate
$C_{\sigma_{i}\sigma_{j}}$ and a single-qubit Clifford gate $A$, we have

$C_{\sigma_{i}\sigma_{j}}(A\otimes I)=(A\otimes
B)C_{\sigma_{i^{\prime}}\sigma_{j}}\,,$ (13)

where $\sigma_{i^{\prime}}$ is given by calculating
$A^{{\dagger}}\sigma_{i}A=\pm\sigma_{i^{\prime}}$, and where $B=I$ if the sign
is $+$ and $B=\sigma_{j}$ if the sign is $-$. Eq. 13 can be used to commute
the Hadamard and phase gates past the controlled-$Z$ gates in the original
circuit. Subsequently, the remaining single-qubit Pauli and Clifford gates can
be commuted past the $Z$-measurements, leaving $X$, $Y$ and $Z$ Pauli
measurements (which are discussed in Sec. VI) and removing the single-qubit
Clifford gates entirely from the circuit.

To implement a generalized controlled gate $C_{\sigma_{i}\sigma_{j}}$ between
two GKP modes $a$ and $b$ with a gate time $T$, we must engineer the
Hamiltonian

$\displaystyle H_{\sigma_{i}\sigma_{j}}$
$\displaystyle=-\frac{1}{T}s_{i}\otimes s_{j}$ (14a)
$\displaystyle=-\frac{r_{i}r_{j}}{2T}(e^{-i(\theta_{i}+\theta_{j})}ab+e^{-i(\theta_{i}-\theta_{j})}ab^{\dagger}+\text{h.c.}),$
(14b)

where $s_{1}=-\bar{p},\ s_{2}=\bar{q}-\bar{p},\ s_{3}=\bar{q}$ are the logical
quadrature operators introduced in Eq. 7 and $r_{i},\theta_{i}$ are the polar
coordinates $s_{i}=r_{i}(q\cos\theta_{i}+p\sin\theta_{i})$. We can interpret
the Hamiltonian Eq. 14 as quadrature-quadrature coupling; or, equivalently, as
a phase-coherent superposition of beamsplitter and two-mode squeezing
interactions. For the square GKP code, we have $r_{2}=\sqrt{2}>r_{1}=r_{3}=1$,
so either the Hamiltonian strength or the gate time must be increased for
generalized controlled gates involving $Y$. Alternatively, in systems where
such a simultaneous interaction is not possible, the generalized controlled
gate can be decomposed into a product of beamsplitter and single-mode
squeezing interactions using the Euler decomposition of the symplectic matrix
$\mathcal{S}(\bar{C}_{\sigma_{i}\sigma_{j}})$ [38].

To implement the Hamiltonian Eq. 14 in superconducting circuits we can utilize
either four-wave or three-wave mixing between GKP modes, as depicted in Fig.
2. Example elements that can be used to implement four- and three-wave mixing
include an ancilla transmon or a SNAIL [39] (respectively). In both cases, the
ancillary element is capacitively coupled to each of the microwave resonators
housing the GKP modes. In both cases, two drive tones with frequencies
$(\omega_{a}\pm\omega_{b})/2$ or $\omega_{a}\pm\omega_{b}$ are required (for
four- and three-wave mixing respectively), where $\omega_{a}$ and $\omega_{b}$
are the resonant frequencies of each mode. Finally, to implement each
generalized controlled gate, one can simply change the relative phase between
these two tones. As a consequence, single-qubit Cliffords can be implemented
in software by tracking these relative phases.

In the following paragraphs, we give an intuitive and non-rigorous description
of how to construct the Hamiltonian that results from such a four- or three-
wave mixing circuit, and refer the reader to Ref. [40] for a more thorough
derivation. We begin with a two-mode harmonic oscillator with Hamiltonian
$H=\omega_{a}a^{{\dagger}}a+\omega_{b}b^{{\dagger}}b$. Four-wave mixing can be
understood as adding to the system Hamiltonian any non-rotating terms
consisting of the product of any four of the operators:
$a,a^{\dagger},b,b^{\dagger}$ and drive terms $V_{d}e^{\pm
i(\omega_{d}t+\phi_{d})}$ (where $V_{d}$, $\omega_{d}$ and $\phi_{d}$ are the
strength, frequency, and phase of any of the microwave drive tones). For
example, we consider the term $a$ to be rotating with frequency $-\omega_{a}$
since $a\mapsto ae^{-i\omega_{a}t}$ in the rotating frame.

Using this heuristic, applying a drive with frequency
$\omega_{1}=(\omega_{a}+\omega_{b})/2$ ensures that the term
$V_{1}^{2}e^{2i(\omega_{1}t+\phi_{1})}ab$ (and its Hermitian conjugate) are
non-rotating, thus providing a two-mode squeezing interaction with relative
phase $2\phi_{1}$. This term acts as $V_{1}^{2}e^{2i\phi_{1}}ab+\text{h.c.}$
in the rotating frame, giving half of the interaction required in Eq. 14.
Following similar logic, one can see that the beamsplitter terms in Eq. 14 can
be engineered with a second drive with frequency
$\omega_{2}=(\omega_{a}-\omega_{b})/2$. The phase difference between each of
the applied microwave tones and the oscillator determines the phase on the
beamsplitter and two-mode squeezing terms, thereby specifying which
generalized controlled gate is implemented.

However, four-wave mixing also introduces several unwanted terms into the
Hamiltonian that reduce the gate fidelity. Kerr ($a^{{\dagger}2}a^{2}$,
$b^{{\dagger}2}b^{2}$) and cross-Kerr ($a^{\dagger}ab^{\dagger}b$) terms will
be added to the Hamiltonian even in the absence of microwave drives since
these terms are always non-rotating. Moreover, the presence of the two drives
also adds AC Stark shift terms such as $V_{1}^{2}a^{{\dagger}}a$, which alter
the resonant frequency of each cavity depending on the drive strength.

To avoid these unwanted Kerr, cross-Kerr, and AC Stark shift terms, one can
instead use three-wave mixing, which can be implemented in circuit QED by
replacing the transmon with a SNAIL [39]. Intuitively, three-wave mixing
differs from four-wave mixing by only allowing the addition of non-rotating
terms containing products of three operators each. This avoids the
introduction of Kerr, cross-Kerr and AC stark shift terms, while still
allowing simultaneous beamsplitter and two-mode squeezing interactions when
driven by tones with frequencies are $\omega_{1}=\omega_{a}+\omega_{b}$ and
$\omega_{2}=\omega_{a}-\omega_{b}$.

In summary: we have removed the need to explicitly perform single-qubit
Clifford gates in superconducting GKP circuits. Instead, the single-qubit
Clifford gates are tracked in software and implemented during two-qubit gates
by altering the relative phase between drives in a three- or four-wave mixing
circuit. Such a rewriting is favorable because single-qubit Clifford gates in
general cause errors to spread during a circuit, as we explain in the
following section.

Figure 2: Schematic diagrams of (a) four-wave mixing, and (b) three-wave
mixing between two GKP modes $a$ and $b$ with resonant frequencies
$\omega_{a}$ and $\omega_{b}$. By phase coherently driving the non-linear
coupling element with two microwave drives whose frequencies are given in Eq.
14, one can engineer the Hamiltonian required to perform each generalized
controlled gate by altering the relative phase between the drives and the gate
time. Supplemented with state preparation in the $\ket{0}$ or $\ket{T}$ states
and measurement in any logical Pauli basis, this is sufficient to achieve
universal quantum computing.

##  IV Error-resistant Clifford gates

Figure 3: Average Gate Infidelity
$1-\bar{F}_{A,\mathcal{V}_{\mathcal{L}},\Delta}$ of (a) single-qubit, and (b)
two-qubit GKP Clifford gates $A=I,S,S^{2},C_{Z}$ applied to the square and
hexagonal GKP codes, decoded over the Voronoi cell $\mathcal{V}_{\mathcal{L}}$
of their respective lattices. The average gate infidelity of the $S,S^{2}$ and
$C_{Z}$ gates can be reduced to be the same as that of the identity gate by
instead performing ideal error correction over a modified patch
$\mathcal{P}=\mathcal{S}(\bar{A})\mathcal{V}_{\mathcal{L}}$ immediately
following the application of the gate, where $\mathcal{S}(\bar{A})$ is a
symplectic matrix with unitary representation equal to $\bar{A}$. The plots
labeled opt represent the average gate fidelity of the identity gate
$\bar{F}_{I,\mathcal{V},\Delta}$ and that of Clifford gates with a modified
decoding patch $\bar{F}_{\bar{A},\mathcal{S}(\bar{A})\mathcal{V},\Delta}$.
Note that the square and hexagonal $C_{Z}$ gates have similar average gate
infidelities and are overlapping in (b).

We now move our attention to analyzing the effect Clifford gates have on error
correction. We begin with the unrealistic case of ideal error correction
following the gate, where the only source of noise is from the approximate GKP
codewords. Even in this simple case, GKP Clifford gates in general spread the
errors and reduce the fidelity of the overall operation. However, we present a
modification of the decoding patch that exactly counteracts the spreading of
errors due to the gate, thus reducing the average gate infidelity by up to two
orders of magnitude. Then, we generalize our approach to consider noisy error
correction following the gate. Here, we find that our modification is only
able to partly counteract the spreading of errors, but still provides a
significant improvement compared to the naïve decoding patch. These results
justify our proposal from Section III, since reducing the number of Clifford
gates in a circuit minimizes the spreading of errors.

We will begin by defining the average gate fidelity we will use to quantify
the quality of logical gates. Then, we explain how to find the modified
decoding patch, which corresponds to the Voronoi cell of a deformed lattice.
Our proposed modification is a generalization of the error-protected two-qubit
gates described in Ref. [7] to general Clifford gates and GKP geometries. In
the ideal error-correction case, we provide both numerical and analytical
results for the quality of the logical gates. Then, we describe how to
(approximately) incorporate the effect of non-ideal error correction in a
teleportation-based QEC circuit. These results complement recent work which
analyzed the performance of two-qubit gates when using dissipative error
correction [41].

Given an $n$-mode GKP logical gate $\bar{U}$ that implements the $n$-qubit
gate $U$, we define the logical channel $\mathcal{E}_{U,\mathcal{P},\Delta}$
as an $n$-qubit-to-$n$-qubit channel consisting of the following steps:

  1. 1.

First, we encode the $n$-qubits into orthogonalized approximate GKP codestates
using the encoding operator
$R_{\Delta}=\big{(}\\!\ket{\bar{0}_{\Delta,\mathrm{o}}}\\!\bra{0}+\ket{\bar{1}_{\Delta,\mathrm{o}}}\\!\bra{1}\\!\big{)}^{\otimes
n}$.

  2. 2.

Second, we apply the logical operator $\bar{U}$ to the state.

  3. 3.

Third, we perform a round of ideal error correction (as described in Section
II) over a patch $\mathcal{P}$, which returns the state to the ideal
codespace, represented by the map $\mathcal{C}_{\mathcal{P}}$.

  4. 4.

Finally, the resulting ideal GKP codestate is rewritten as an $n$-qubit state
by the map
$R^{{\dagger}}=\big{(}\\!\ket{0}\\!\bra{\bar{0}}+\ket{1}\\!\bra{\bar{1}}\\!\big{)}^{\otimes
n}$.

Mathematically, we write the logical channel as

$\mathcal{E}_{U,\mathcal{P},\Delta}=\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{J}[\bar{U}R_{\Delta}]$
(15)

where $\mathcal{J}[O]\rho=O\rho O^{{\dagger}}$. Note that our definition Eq.
15 assumes ideal error correction; later in this section we will modify this
definition to account for the effects of non-ideal error correction.

To quantify how well the map $\mathcal{E}_{U,\mathcal{P},\Delta}$ executes the
gate $U$, we use the average gate fidelity. The average gate fidelity
$\bar{F}(\mathcal{E},U)$ of a quantum channel $\mathcal{E}$ with a unitary $U$
is defined as [42]

$\bar{F}(\mathcal{E},U)=\int
d\psi\bra{\psi}U^{\dagger}\mathcal{E}(\ket{\psi}\\!\bra{\psi})U\ket{\psi},$
(16)

where the integral is over the uniform (Haar) measure $d\psi$ of state space.
For notational convenience we write
$\bar{F}(\mathcal{E}_{U,\mathcal{P},\Delta},U)=\bar{F}_{U,\mathcal{P},\Delta}$.
Specifically, we can calculate the average gate fidelity
$\bar{F}_{U,\mathcal{P},\Delta}$ of the logical gate $U$ from the entanglement
fidelity of the map
$\mathcal{J}[U^{{\dagger}}]\circ\mathcal{E}_{U,\mathcal{P},\Delta}$ as
detailed in Ref. [43].

To compute $\mathcal{E}_{U,\mathcal{P},\Delta}$ we utilize the GKP stabilizer
subsystem decomposition (SSSD) that we have recently developed [24] (see
Section B.1 for a summary). The GKP SSSD has the property that the ideal
decoding map $\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}$ is
equivalent to taking the partial trace over the “stabilizer subsystem”, which
is a natural operation to perform in this formalism. Using the SSSD for our
analysis has two key advantages. From an analytical perspective, the SSSD
naturally provides a first-order approximation to the gate fidelity that is
convenient to use and agrees well with the numerical results (see Appendix B);
while numerically, calculating the gate fidelity with the SSSD requires fewer
computational resources with increasing GKP codestate quality
($\Delta\rightarrow 0$). This last property contrasts with traditional Fock
space simulations which require higher truncation dimensions as
$\Delta\rightarrow 0$ and thus can only simulate GKP codewords with
sufficiently low average photon number.

Now we present our analytical results. In Appendix B we estimate the average
gate infidelity of the identity gate, $1-\bar{F}_{I,\mathcal{P},\Delta}$.
Intuitively, this captures idling noise when the only source of errors is due
to the use of approximate GKP codestates. The estimate is given by

$1-\bar{F}_{I,\mathcal{P},\Delta}\approx\frac{2^{n}a}{2^{n}+1}\mathrm{erfc}\big{(}d/(2\Delta)\big{)},$
(17)

where $\mathrm{erfc}(x)$ is the complementary error function, and $d$ and $a$
are the distance and degeneracy (respectively) of the patch $\mathcal{P}$ as
defined in Section II. Note also that for large $x$ we also have
$\mathrm{erfc}(x)\approx e^{-x^{2}}\\!/(x\sqrt{\pi})$.

For a given GKP Clifford gate $\bar{A}$, the average gate infidelity will be
larger than or equal to that of the identity gate, depending on how $\bar{A}$
propagates displacement errors. Conveniently, the average gate fidelity of a
GKP Clifford gate $\bar{A}$ can be expressed in the form of Eq. 17 by
inputting the distance and degeneracy of a modified patch that accounts for
this spreading of the errors. Specifically, in Appendix A we show that

$\bar{F}_{A,\mathcal{P},\Delta\vphantom{)^{-1}}}=\bar{F}_{I,\mathcal{S}(\bar{A})^{-1}\mathcal{P},\Delta}$
(18)

for any GKP Clifford gate $\bar{A}$ represented by the symplectic matrix
$\mathcal{S}(\bar{A})$. One can then calculate the distance and degeneracy of
$\mathcal{S}(\bar{A})^{-1}\mathcal{P}$ and substitute these into Eq. 17 to
estimate the average gate fidelity.

If error correction is performed over the Voronoi cell
$\mathcal{P}=\mathcal{V}_{\mathcal{L}}$, then typically the modified patch
$\mathcal{S}(\bar{A})^{-1}\mathcal{P}$ has a shorter distance than
$\mathcal{P}$ and therefore a larger infidelity than the identity gate. Note,
however, that any gates implemented by a rotation – notably the Hadamard gate
$\bar{H}_{\text{sq}}=e^{i\frac{\pi}{2}a^{\dagger}a}$ in the square GKP code,
and the permutation gate
$\bar{H}^{\vphantom{{\dagger}}}_{\text{hex}}\bar{S}^{{\dagger}}_{\text{hex}}=e^{i\frac{\pi}{3}a^{\dagger}a}$
in the hexagonal GKP code – achieve the same average gate fidelity as the
identity gate since they leave Voronoi cells invariant.

Figure 4: Diagram of the transformation of the square GKP Voronoi cell
$\mathcal{V}_{\text{sq}}\mapsto\mathcal{S}(\bar{S}_{\text{sq}})\mathcal{V}_{\text{sq}}$
under a logical phase gate $\bar{S}_{\text{sq}}$ represented by the symplectic
matrix $\mathcal{S}(\bar{S}_{\text{sq}})$ (Eq. 10). If error correction is
subsequently performed over $\mathcal{V}_{\text{sq}}$, then pre-gate
displacement errors lying in the red-shaded regions are mapped to logical
errors by $\bar{S}$. The shortest such displacement is represented by the
arrow. Alternatively, if error correction is performed over the modified patch
$\mathcal{S}(\bar{S}_{\text{sq}})\mathcal{V}_{\text{sq}}$, the pre-image of
this patch is $\mathcal{V}_{\text{sq}}$, maximizing the distance of the patch.

To counteract the effects of the spreading of errors, one can instead use a
modified decoding patch given by

$\mathcal{S}(\bar{A})\mathcal{V}_{\mathcal{L}}=\\{\mathcal{S}(\bar{A})\bm{\mathbf{v}}\>|\>\bm{\mathbf{v}}\in\mathcal{V}_{\mathcal{L}}\\}.$
(19)

In the case of ideal error correction, the modified patch Eq. 19 exactly
counteracts the spreading of errors due to the Clifford gates, since Eq. 18
guarantees that
$\bar{F}_{A,\mathcal{S}(\bar{A})\mathcal{V}_{\mathcal{L}},\Delta}=\bar{F}_{I,\mathcal{V}_{\mathcal{L}},\Delta}$,
see Fig. 4.

We quantify the effect of the modification Eq. 19 both analytically using Eqs.
18 and 17 and numerically using the SSSD. In Table 1, we present the distance
$d$ and degeneracy $a$ of the Voronoi cells of the square and hexagonal GKP
codes, as well as the deformed patches
$\mathcal{S}(\bar{A})^{-1}\mathcal{V}_{\mathcal{L}}$ due to various single-
and two-qubit Clifford gates. The latter deformed patches represent the
performance of the gates if the modification Eq. 19 is not performed, while
the Voronoi cells represent the performance with the modification. In Fig. 3,
we present the corresponding average gate fidelities calculated numerically.
We moreover show in Fig. 11 in Appendix B that the theoretical estimates given
by Eqs. 17 and 1 are in agreement with the numerical results from Fig. 3 for
small enough values of $\Delta$.

Our results show that to achieve a $10^{-2}$ error rate in a $C_{ZZ}$ gate
(even in the absence of gate noise), one would need a squeezing of
$\Delta_{\mathrm{dB}}\approx 7.5$ (for square GKP) with the modification in
Eq. 19, compared to a squeezing of $\Delta_{\mathrm{dB}}\approx 9.8$ without
it. Meanwhile, for fixed $\Delta_{\mathrm{dB}}=12$, the modification improves
the average gate infidelity by roughly two orders of magnitude for both the
square and hexagonal GKP codes.

Moreover, we find that the hexagonal code outperforms the square code for the
identity gate, as expected from the geometry of their respective logical
lattices. However, Clifford gates typically decrease the distance of the
hexagonal code patch more than for square code, making the use of the modified
patch Eq. 19 more important.

Table 1: Ideal Clifford gate patches. Summary of the distances $d$ and degeneracies $a$ of the patches $\mathcal{S}(\bar{A})^{-1}\mathcal{V}_{\mathcal{L}}$ corresponding to the GKP Clifford gates $\bar{A}=\bar{I},\bar{S},\bar{S}^{2},\bar{I}{\otimes}\bar{I},\bar{C}_{ZZ},\bar{C}_{YY}$ for the square and hexagonal GKP codes decoded over their Voronoi cells $\mathcal{V}_{\mathcal{L}}$. The average gate fidelity of each gate is estimated by Eq. 17, but can be improved to the average gate of the identity gate by modifying the patch over which error correction is performed to $\mathcal{P}=\mathcal{S}(\bar{A})\mathcal{V}_{\mathcal{L}}$. Note that using elementary geometry we can obtain exact expressions for these values, which are displayed in Table 3. | Square | Hexagonal
---|---|---
Gate |  $a$ | $d/\sqrt{\pi}$ |  $a$ |  $d/\sqrt{\pi}$
$\bar{I}$ |  2 | 1 |  3 |  $1.075$
$\bar{S}$ |  1 | $0.707$ |  2 |  $0.703$
$\bar{S}^{2}$ |  1 | $0.447$ |  1 |  $0.427$
$\bar{I}\otimes\bar{I}$ |  4 | 1 |  6 |  $1.075$
$\bar{C}_{ZZ}$ |  2 | $0.707$ |  2 |  $0.703$
$\bar{C}_{YY}$ |  4 | $0.577$ |  2 |  $0.703$

Since the modification in Eq. 19 eliminates the errors caused by the spreading
of errors by the gate, the new leading source of error will now be from
performing approximate error correction. This is a significant consideration
because errors can now occur both before and after the gate, causing some
errors to be spread by the gate, and others not. As a result, neither the
original patch $\mathcal{V}_{\mathcal{L}}$ nor the modified patch
$\mathcal{S}(\bar{A})^{-1}\mathcal{V}_{\mathcal{L}}$ optimally correct this
noise, reducing the performance of the gate.

To tackle this issue we define a third correction patch that accounts for the
partially-spread distribution of errors. We derive the required patch by using
an analytical approximate expression analogous to Eq. 17 that incorporates the
use of approximate codestates in the QEC cycle. We show that in general the
spread of errors due to the gate can only be partly corrected even when the
optimal patch is chosen. From this point on, we only provide analytical
formulae due to the good agreement between numerical and analytic results in
the ideal case, as shown in Fig. 11.

Figure 5: Quantum circuits for teleportation-based QEC using approximate GKP
codewords. $\ket{\bar{\emptyset}}$ denotes a qunaught GKP codestate, defined
as the unique $+1$-eigenstate of the operators
$T(\sqrt{2}\bm{\mathbf{\alpha}})$ and $T(\sqrt{2}\bm{\mathbf{\beta}})$. Each
two-mode gate is a 50-50 beamsplitter given by
$e^{i\pi(p_{1}q_{2}-q_{1}p_{2})/4}$. Measurements are of the logical
quadratures $\bar{q},\bar{p}$, as defined in Eq. 5. The left circuit is the
teleportation-based QEC circuit using approximate GKP qunaught states, while
the right circuit consists of an ideal QEC cycle preceded and followed by
Gaussian random displacement channels with $\Sigma=\tanh(\Delta^{2}/2)I$ and
$\Sigma_{\text{QEC}}$ given in Eq. 22. We show in Appendix C that the left and
right circuits are approximately equal.

We begin by redefining the metric that we use to quantify the quality of
logical gates. In particular, we include an additional Gaussian random
displacement channel to (approximately) account for the use of approximate
codestates in the error-correction procedure as we now explain. The new
channel arises from performing a teleportation-based QEC cycle (Fig. 5) with
approximate GKP codestates, as we show in Appendix C. Teleportation-based QEC
is not the only error-correction procedure used for GKP codes; indeed, in
superconducting and trapped ions the current favored stabilization procedure
makes use of an ancillary two-level system instead [28, 16, 10]. However, a
teleportation-based scheme can be used to perform error correction after the
GKP states have been prepared, and is particularly natural if GKP codes are
concatenated with qubit error correcting codes through foliation methods [44].
We here focus on teleportation-based QEC due to the simple model of
approximate error-correction that it provides below.

Explicitly, instead of Eq. 15, we define the logical channel as

$\mathcal{E}_{U,\mathcal{P},\Delta}=\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{G}(\Sigma_{\text{QEC}})\circ\mathcal{J}[\bar{U}R_{\Delta}],$
(20)

where $\mathcal{G}(\Sigma_{\text{QEC}})$ is a Gaussian random displacement
(GRD) channel

$\mathcal{G}(\Sigma)(\rho)\\\
=\frac{1}{\sqrt{\det\Sigma}}\\!\iint\\!\frac{d^{2}\bm{\mathbf{v}}}{(2\pi)^{n}}e^{-\bm{\mathbf{v}}^{T}\Sigma^{-1}\bm{\mathbf{v}}/2}\,T(\bm{\mathbf{v}})\rho
T(\bm{\mathbf{v}})^{{\dagger}},$ (21)

and the covariance matrix $\Sigma_{\text{QEC}}$ is given explicitly by

$\Sigma_{\text{QEC}}=\tanh(\Delta^{2}/2)M_{\mathcal{L}}P_{1}M^{-1}_{\mathcal{L}}M^{-T}_{\mathcal{L}}\\!P_{1}M^{T}_{\mathcal{L}}$
(22)

with $M_{\mathcal{L}}=[\bm{\mathbf{\alpha}},\bm{\mathbf{\beta}}]/\sqrt{\pi}$
and $P_{1}=\mathrm{diag}(-1,1)$. Note that for the square GKP code,
$\Sigma_{\text{QEC}}=\mathrm{tanh}(\Delta^{2}/2)I$, but in general
$\Sigma_{\text{QEC}}$ may not be proportional to the identity matrix. Also,
note that we have assumed that the amount of noise introduced by the
approximate codestates on the data and ancilla qubits is equal – an assumption
that will not hold if additional noise occurs on the data qubit prior to error
correction. Such additional noise could, in principle, be accounted for using
the same tools as below.

With the definition of the logical channel in Eq. 20, we can now calculate the
average gate fidelity $\bar{F}_{U,\mathcal{P},\Delta}$. In Appendix C, we show
that for a Clifford gate $A$, the average gate infidelity is approximated by

$1-\bar{F}_{A,\mathcal{P},\Delta}\approx\frac{2^{n}a_{\text{eff}}}{2^{n}+1}\mathrm{erfc}\big{(}d_{\text{eff}}/(2\sqrt{2}\Delta)\big{)},$
(23)

where $a_{\text{eff}}$ and $d_{\text{eff}}$ are the effective degeneracy and
distance of a modified patch $\mathcal{P}^{\prime}$ that optimally accounts
for the additional noise arising from $\Sigma_{\text{QEC}}$.

Figure 6: Visual representation of the optimal patch and effective distance of
the $\bar{S}_{\text{sq}}$ gate when approximate error-correction is
considered. (a) An approximate GKP state, represented (using the twirling
approximation) as an ideal state that has incurred Gaussian random
displacement error with standard deviation ${\sim}\Delta/\sqrt{2}$. (b) The
logical phase gate $\bar{S}_{\text{sq}}$ is applied, deforming the correction
patch and the spread of the noise. (c) Finally, an additional Gaussian random
displacement channel $\mathcal{G}(\Sigma_{\text{QEC}})$ is applied to
incorporate the effects of approximate error correction. The optimal
correction patch (dashed) can be found by performing a (non-orthogonal)
transformation $B^{-1}$ that reshapes the Gaussian noise to be symmetrical
with standard deviation ${\sim}\Delta$. (d) The optimal patch is the Voronoi
cell of the transformed lattice, $\mathcal{V}_{B^{-1}\mathcal{L}}$.

It is important to note that there is an additional $\sqrt{2}$ factor in Eq.
23 compared to Eq. 17. This factor arises from the approximate codestates used
in the error-correction circuit, and can greatly increase the error rates even
in the best-case scenario where the distance remains unchanged, i.e.
$d_{\text{eff}}$ in Eq. 23 is equal to $d$ in Eq. 17. Indeed, multiplying
$\Delta$ by a factor of $\sqrt{2}$ is equivalent to subtracting
$10\log_{10}(2)\approx 3$ dB from the GKP squeezing $\Delta_{\mathrm{dB}}$ –
or, to be concrete, approximate error correction on a 10 dB codestate performs
roughly the same as ideal error correction on a 7 dB codestate.

In addition to the unavoidable $\sqrt{2}$ factor introduced by approximate
codestates, the effective distance may also alter the error rate, Intuitively,
one can understand the origin of $d_{\text{eff}}$ as follows (see Fig. 6).
First, there is some incoming noise from the approximate GKP codestate, which
we approximate as a GRD channel with a covariance matrix
$\Sigma=\tanh(\Delta^{2}/2)I$ [Fig. 6(a)]. Then, the Clifford gate $\bar{A}$
is applied, spreading the errors and transforming the covariance matrix
$\Sigma\mapsto\mathcal{S}(\bar{A})\Sigma\mathcal{S}(\bar{A})^{T}$ [Fig. 6(b)].
Next, we apply the GRD channel $\mathcal{G}(\Sigma_{\text{QEC}})$ that is
associated with approximate error-correction, so that the overall noise is
given by a GRD channel with covariance matrix
$\Sigma_{\text{tot}}=\mathcal{S}(\bar{A})\Sigma\mathcal{S}(\bar{A})^{T}+\Sigma_{\text{QEC}}$
that we now must decode [Fig. 6(c)].

To understand how best to decode this noise, we define a (non-symplectic)
transformation of phase-space that maps $\Sigma_{\text{tot}}$ to a matrix
proportional to the identity [Fig. 6(d)]. Labeling the transformation matrix
$B^{-1}$, the optimal patch to decode over is then the Voronoi cell
$\mathcal{V}_{B^{-1}\mathcal{L}}$ of the transformed lattice
$B^{-1}\mathcal{L}$, and the effective distance $d_{\text{eff}}$ is the
shortest vector in this lattice. On the physical phase-space [Fig. 6(c)] the
correction patch is then $B\mathcal{V}_{B^{-1}\mathcal{L}}$.

In Table 2, we present the effective degeneracy and distance corresponding to
various Clifford gates for the square and hexagonal code, assuming that the
modified patch is optimal as described above. Importantly, note that Table 2
displays the performance of the optimal patch against Clifford gates with
approximate error-correction, while Table 1 displays the performance of the
naïve patch in the ideal error-correction case. To make this point explicit,
consider the performance of the square GKP $\bar{S}$ gate. In the case of
ideal error-correction, the effective distance of the $\bar{S}$ gate can be
improved from 0.707$\sqrt{\pi}$ in the naïve case to $\sqrt{\pi}$ using Eq.
19. In the approximate QEC case, the largest possible effective distance is
0.894$\sqrt{\pi}$ even with an optimally chosen patch.

In general, Clifford gates introduce errors that can only be partly
compensated for when approximate QEC is taken into account. Roughly speaking,
the two-orders-of-magnitude improvement observed in the ideal case becomes
halved to a one-order-of-magnitude improvement in the approximate case.
Concretely, to achieve a $10^{-2}$ $C_{ZZ}$ average gate infidelity requires
codestates with $\Delta_{\text{dB}}\approx 11.0$ dB of squeezing in the square
GKP code. Note that this is roughly $3.5$ dB more squeezing than is required
to achieve this infidelity with ideal QEC, indicating that there are
contributions both from the 3 dB introduced intrinsically by the approximate
codestates and from the decreased effective distance of the correction patch.

With these general comments made, there are still two interesting features of
Table 2 that we point out now. First, the hexagonal GKP code is outperformed
by the square GKP code for the identity gate. This is because just two logical
quadratures are measured in Fig. 5, causing an asymmetry in the noise in
$\Sigma_{\text{QEC}}$ and breaking the 6-fold rotational symmetry of the
hexagonal code. Indeed, the effective degeneracy for the identity gate is 2
for the hexagonal code in Table 2, compared to 3 in Table 1. However, the
logical Hadamard gate spreads the noise in such a way that the asymmetry in
QEC is exactly counteracted, restoring the full effective distance and
degeneracy of the hexagonal code (see Appendix C). Therefore, the hexagonal
code only outperforms the square code if a logical Hadamard gate is physically
implemented before each round of teleportation-based QEC. Note that the
hexagonal logical Hadamard gate $\bar{H}_{\text{hex}}$ is not a rotation, and
single-mode squeezing is required to implement it. Interestingly, the logical
$\bar{S}_{\text{hex}}^{{\dagger}}=e^{-i\bar{q}^{2}/2}$ gate also has this
property – meaning that arbitrary single-qubit Clifford gates can be performed
while preserving the maximum effective distance during each round of QEC.

Taking this into account, the hexagonal code also outperforms the square code
for the $\bar{C}_{ZZ}$ gate. Specifically, we compare the performance of the
between the hexagonal $(\bar{H}\otimes\bar{H})\bar{C}_{ZZ}$ gate and the
square $\bar{C}_{ZZ}$ gate. To achieve a target two-qubit gate infidelity of
$10^{-2}$, the square GKP code requires codestates with
$\Delta_{\text{dB}}=11.0$ while the hexagonal code requires
$\Delta_{\text{dB}}=10.8$. Put differently, codestates with
$\Delta_{\text{dB}}=12$ achieve a gate infidelity of 0.29% in the square code
and 0.20% in the hexagonal code. Note that to obtain these values we have used
a slightly more accurate formula than Eq. 23 that takes into account the
effects of all Voronoi-relevant vectors of the patch $\mathcal{P}^{\prime}$ –
as we explain in Appendix C. To summarize, the hexagonal code modestly
outperforms the square code at the cost of requiring single-mode squeezing
during every round of QEC.

Finally, remarkably, the effective distance of the square $\bar{C}_{YY}$ gate
is exactly $\sqrt{\pi}$ – the same as that of the identity gate. This is
particularly surprising given that this is not true for the $\bar{C}_{ZZ}$
gate, nor for any two-qubit gate of the hexagonal code. In Appendix C we show
that the optimal patch for the $\bar{C}_{YY}$ gate is in fact related to the
Voronoi cell of the $D_{4}$ lattice – the densest lattice-packing in 4D –
giving rise to the very high effective degeneracy of the patch. However, it is
worth noting that $\Delta_{\text{dB}}$ must be reasonably large for the
improved effective distance to decrease the infidelity enough to make up for
the increased effective degeneracy $a_{\text{eff}}=12$ – indeed, the square
$\bar{C}_{YY}$ gate only outperforms the $\bar{C}_{ZZ}$ gate when
$\Delta_{\text{dB}}>13.2$. We also briefly comment that the distance of the
$\bar{C}_{ZZ}$ gate can be increased by applying single-qubit gates
immediately afterward – however the advantages of this are small and only
apply for $\Delta_{\text{dB}}>12.2$ (see Appendix C for more details). In
contrast, each generalized controlled gate performs identically in the
hexagonal code due to the 6-fold rotational symmetry of the code. We leave
further investigations of the consequences of this to future work.

Table 2: Clifford gate patches taking into account approximate error correction. Summary of the effective distances $d_{\text{eff}}$ and degeneracies $a$ of the optimal patches $\mathcal{P}(\bar{A})$ corresponding to various Clifford gates followed by approximate error correction for the square and hexagonal GKP codes. The average gate fidelity of each gate is estimated by Eq. 17, with $d$ replaced by $d_{\text{eff}}$. Note that these values can all be evaluated analytically, as displayed in Table 4. Finally, note that Hadamard gates do not affect the performance of the square GKP code, so that the two-qubit gates $(\bar{H}\otimes\bar{H})\bar{C}_{ZZ}$ and $(\bar{H}\otimes\bar{H})\bar{C}_{YY}$ perform identically to $\bar{C}_{ZZ}$ and $\bar{C}_{YY}$ respectively. Code | Square | Hexagonal
---|---|---
Gate |  $a_{\text{eff}}$ | $d_{\text{eff}}/\sqrt{\pi}$ |  $a_{\text{eff}}$ |  $d_{\text{eff}}/\sqrt{\pi}$
$\bar{I}$ |  2 | 1 |  2 |  $0.931$
$\bar{H}$ |  2 | 1 |  3 |  $1.075$
$\bar{S}$ |  1 | $0.894$ |  1 |  $0.703$
$\bar{S}^{{\dagger}}$ |  1 | $0.894$ |  3 |  $1.075$
$\bar{I}\otimes\bar{I}$ |  4 | 1 |  4 |  $0.931$
$\bar{H}\otimes\bar{H}$ |  4 | 1 |  6 |  $1.075$
$(\bar{H}\otimes\bar{H})\bar{C}_{ZZ}$ |  2 | $0.894$ |  2 |  $0.931$
$(\bar{H}\otimes\bar{H})\bar{C}_{YY}$ |  12 | 1 |  2 |  $0.931$

##  V Analytical Error Estimates for Loss and Dephasing

In the previous section, we developed an analytical formula Eq. 17 that
estimates the average gate fidelity of a Clifford gate acting on approximate
GKP codestates. In this section, we extend these methods to general noise
channels such as loss and dephasing. In particular, we use the GKP SSSD to
formally write down the average gate fidelity of the logical channel that
represents the effect of the noise channel on the GKP code (Sec. VII of Ref.
[24]). Our resulting estimate is essentially the first-order approximation of
that formal expression.

Such an analytical error estimate offers both theoretical and practical
insights. Our analytical error estimate is closely related to the twirling
approximation applied to the noise-plus-envelope channel [26], which has been
previously used to model the envelope operator in simulations of GKP-qubit
code concatenations [5, 6, 7]. As such, our results both justify the twirling
approximation and generalize it to arbitrary noise channels. To demonstrate
this generality, we apply our estimate to the most common noise channels
affecting bosonic modes: loss and dephasing; and we compare our estimates with
numerically obtained error rates. We can use our estimates to, for example,
derive the optimal $\Delta_{\text{dB}}$ that minimizes the error given some
amount of loss and/or dephasing. Importantly, our estimates are only valid
when loss and dephasing are applied to approximate GKP codes. These results
may be of broader interest to those wishing to model realistic noise channels
using random displacements, such as in GKP-qubit code concatenation studies.

We begin once again by defining the metric we use to quantify the error due to
loss and dephasing. Similarly to in Section III, we use the average gate
fidelity Eq. 16 to characterize the performance of the GKP code against noise
as follows. Given a CV noise channel $\mathcal{N}$, we define a logical noise
channel

$\mathcal{N}_{\mathcal{L}}=\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{N}\circ\mathcal{J}[R],$
(24)

where
$R=\big{(}\\!\ket{\bar{0}}\\!\bra{0}+\ket{\bar{1}}\\!\bra{1}\\!\big{)}^{\otimes
n}$ is the ideal encoding map, and $\mathcal{C}_{\mathcal{P}}$ represents a
round of ideal error correction over the patch $\mathcal{P}$. Comparing to the
definition of the logical gate channel $\mathcal{E}_{U,\mathcal{P},\Delta}$ in
Eq. 15 there are two key differences: the logical operator $\bar{U}$ in Eq. 15
is replaced with the noise channel $\mathcal{N}$ in Eq. 24, and the states are
initially encoded in an ideal GKP codestate $\ket{\bar{\psi}}$ in Eq. 24
instead of an approximate GKP codestate $\ket{\bar{\psi}_{\Delta,\text{o}}}$
in Eq. 15. However, this is without loss of generality: to account for
approximate codewords in Eq. 24, we simply include the envelope operator
$e^{-\Delta^{2}a^{\dagger}a}$ in $\mathcal{N}$.

We aim to derive an approximate expression for the average gate infidelity
$\bar{F}$ of the logical noise map $\mathcal{N}_{\mathcal{L}}$. We present the
full derivation in Appendix B using the SSSD [24], and focus on the main
results here. All the expressions below depend on the characteristic function
$c(\bm{\mathbf{u}},\bm{\mathbf{v}})$ of the noise map $\mathcal{N}$, which we
define such that

$\mathcal{N}(\rho)=\iint\\!d^{2}\bm{\mathbf{u}}\,d^{2}\bm{\mathbf{v}}\,c(\bm{\mathbf{u}},\bm{\mathbf{v}})\,T(\bm{\mathbf{u}})\rho
T(\bm{\mathbf{v}})^{{\dagger}},$ (25)

where $u_{1},u_{2},v_{1},v_{2}$ are the components of $\bm{\mathbf{u}}$ and
$\bm{\mathbf{v}}$ respectively. Explicitly, one can obtain the characteristic
function $c$ of a general CV channel from the characteristic functions
$c_{i}(\bm{\mathbf{v}})=\mathrm{tr}\big{(}E_{i}T(\bm{\mathbf{u}})^{{\dagger}}\big{)}/(2\pi)$
of any Kraus operator representation of $\mathcal{N}(\rho)=\sum_{i}E_{i}\rho
E_{i}^{{\dagger}}$ through the equation
$c(\bm{\mathbf{u}},\bm{\mathbf{v}})=\sum_{i}c_{i}(\bm{\mathbf{u}})c_{i}(\bm{\mathbf{v}})^{*}$.
For Gaussian channels, one can also use the formulae presented in Appendix F
of Ref. [24]. The characteristic function also generalizes straightforwardly
to multi-mode channels; however, in this section we focus on the single-mode
case.

We make two assumptions in our derivation, that

  1. 1.

the noise map $\mathcal{N}$ is approximately proportional to a CPTP map, and

  2. 2.

the characteristic function $c$ decays sufficiently quickly as
$|\bm{\mathbf{u}}|,|\bm{\mathbf{v}}|\rightarrow\infty$.

The first assumption would be redundant if $\mathcal{N}$ were trace-
preserving; however, since we incorporate the non-unitary envelope operator
into $\mathcal{N}$, the assumption is valid only when $\Delta$ is small. The
second assumption (which we discuss in more detail in Appendix B) essentially
requires that the noise channel can be written as a superposition of
sufficiently small displacement operators; or, more intuitively, that
$\mathcal{N}$ is “close to the identity channel”, since the characteristic
function of the identity channel is
$\delta^{2}(\bm{\mathbf{u}})\delta^{2}(\bm{\mathbf{v}})$. Importantly, for
this assumption to be valid for loss or dephasing, we must include the
envelope operator (or any other regularizing operator) before the loss or
dephasing channel.

Given the above assumptions, the average gate infidelity of the logical noise
map Eq. 24 is given by

$1-\bar{F}\approx\frac{2}{3}\iint_{\mathrlap{\mathbb{R}^{2}\setminus\mathcal{P}}}\;d^{2}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}})\bigg{/}\\!\\!\iint_{\mathbb{R}^{2}}\\!\\!\\!d^{2}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}})$
(26)

in the single-mode case. Note here that incorporating the envelope operator
(or any other regularizing operator) into $\mathcal{N}$ is necessary since
omitting the envelope operator would make $\mathcal{N}$ trace-preserving and
the denominator would diverge.

Interestingly, since Eq. 26 only depends on the diagonal, “stochastic”
elements of the characteristic function $c(\bm{\mathbf{v}},\bm{\mathbf{v}})$,
the result would be the same as if we had applied the twirling approximation
to the original noise channel. In particular, since the right-hand side of Eq.
26 depends only on the diagonal elements of $c$, and these diagonal elements
are real and non-negative, $\mathcal{N}$ could be replaced by a random
displacement channel $\mathcal{E}_{p}$ over the probability distribution
$p(\bm{\mathbf{v}})\propto c(\bm{\mathbf{v}},\bm{\mathbf{v}})$ given by

$\mathcal{E}_{p}(\rho)=\iint
d^{2}\bm{\mathbf{v}}\,p(\bm{\mathbf{v}})T(\bm{\mathbf{v}})\rho
T(\bm{\mathbf{v}})^{{\dagger}}.$ (27)

Such a channel may be obtained from $\mathcal{N}$ by uniformly twirling
$\mathcal{N}$ over the group of displacement operators, i.e.

$\mathcal{E}_{p}=\iint\frac{d^{2}\bm{\mathbf{v}}}{2\pi}\mathcal{J}[T(\bm{\mathbf{v}})^{{\dagger}}]\circ\mathcal{N}\circ\mathcal{J}[T(\bm{\mathbf{v}})],$
(28)

which we refer to the twirling approximation of $\mathcal{N}$. Note that the
twirling approximation is a less-restrictive approximation than the two
assumptions we made in arriving at Eq. 26; because, for example, in Eq. 26 we
have disregarded displacements that take you outside the patch $\mathcal{P}$
but do not cause a logical error, such as those corresponding to stabilizers.

The twirling approximation was first introduced in Ref. [26] and is commonly
used in studies on concatenated GKP-qubit codes [31, 32, 5, 6, 7] to
approximate the envelope operator $e^{-\Delta^{2}a^{\dagger}a}$ as a random
Gaussian displacement noise channel with variance $\sigma^{2}=\Delta^{2}/2$.
The twirling approximation can also be viewed as a CV generalization of the
qubit Pauli twirling operation that is used to approximate noise models in
qubit QEC code simulations and to prevent the build-up of coherent errors in
experiments [45] – although note that in the CV case the operation written in
Eq. 28 is unphysical as it requires the application of arbitrarily large
displacements. The (CV) twirling approximation of the envelope operator has
been justified theoretically [6] and numerically [20]. Therefore, this work
justifies the twirling approximation using the SSSD and generalizes it to
noise channels of interest that have not been analyzed using the twirling
approximation before.

We can evaluate Eq. 26 in the case when the diagonal elements of the
characteristic function take the form

$c(\bm{\mathbf{v}},\bm{\mathbf{v}})\propto
e^{-|\bm{\mathbf{v}}|^{2}/2\sigma^{2}},$ (29)

i.e. the twirled channel $\mathcal{E}_{p}$ is a Gaussian random displacement
channel with variance $\sigma^{2}$. In this case, the approximations we have
made are valid if $\sigma$ is much smaller than the length of the shortest
logical operator. Then, we have

$1-\bar{F}\approx\frac{2}{3}a\,\mathrm{erfc}\bigg{(}\frac{d}{2\sqrt{2}\sigma}\bigg{)},$
(30)

where $d$ is the distance and $a$ is the degeneracy of the patch
$\mathcal{P}$, as described in Section II.

Eq. 30 can be applied to several cases of interest. First, we consider a noise
map consisting solely of the envelope operator itself, i.e.
$\mathcal{N}=\mathcal{J}[e^{-\Delta^{2}a^{{\dagger}}a}]$. The diagonal
elements of the characteristic function of the envelope operator take the form
of Eq. 29 with variance

$\sigma^{2}=\mathrm{tanh}(\Delta^{2}/2)\approx\Delta^{2}/2.$ (31)

As a sanity check, substituting $\sigma=\Delta/\sqrt{2}$ into Eq. 30 indeed
gives Eq. 17 with $n=1$. In words, this means that for sufficiently small
values of $\Delta$, the logical action of the envelope operator on ideal
codewords is approximately the same as the logical action of a Gaussian random
displacement channel with variance $\sigma^{2}=\Delta^{2}/2$, as has already
been utilized widely in GKP-qubit code concatenation studies.

However, we can also apply our estimate to other maps of interest. For
example, consider the noise map given by the composition of the envelope
operator with a loss of $\gamma$. We define loss as evolution under the master
equation $\dot{\rho}=\kappa\big{(}[a\rho,a^{{\dagger}}]+[a,\rho
a^{{\dagger}}]\big{)}/2$ for some time $t$, where $\gamma=1-e^{-\kappa t}$.
The characteristic function of $\mathcal{N}$ takes the form of Eq. 29 with
variance

$\displaystyle\sigma^{2}$
$\displaystyle=\sqrt{1-\gamma}\,\mathrm{tanh}\bigg{(}\\!\frac{\Delta^{2}}{2}\\!\bigg{)}+\frac{\gamma}{2}+\frac{(1-\sqrt{1-\gamma})^{2}}{2\,\mathrm{tanh}(\Delta^{2})}$
(32a)
$\displaystyle\approx\frac{\Delta^{2}}{2}+\frac{\gamma}{2}+\frac{\gamma^{2}}{8\Delta^{2}}.$
(32b)

Note that Eq. 32a is valid whenever $\sigma$ is much smaller than the length
of the shortest logical operator (which is roughly $\sqrt{\pi}$ for most cases
of interest), while the lowest-order approximation Eq. 32b is only valid in
the slightly more specific regime where both $\gamma$ and $\Delta$ are also
small. In Fig. 12 we show that the estimate Eq. 32a agrees well with
numerically-obtained values, with less than 1% relative error when
$\Delta_{\text{dB}}>10$.

Importantly, Eq. 32 takes into account the combined effect of the envelope and
loss operator acting together, represented by the $\gamma^{2}/8\Delta^{2}$
term which becomes larger as $\Delta$ becomes small. This is because loss
affects highly squeezed (small $\Delta$) GKP codestates more than less
squeezed GKP codestates due to the large average photon number of highly
squeezed GKP codestates. For fixed $\gamma$, we can (approximately) find the
optimal level of GKP squeezing by minimizing Eq. 32, giving
$\Delta_{\text{opt}}^{2}=-\ln{\sqrt{1-\gamma}}\approx\gamma/2$. Pleasingly, we
can also write this in terms of the average photon number of the codestate
$\bar{n}\approx 1/(2\Delta^{2})-1/2$, giving $\bar{n}_{\text{opt}}\approx
1/\gamma-1/2$. This tradeoff has already been noted in Ref. [13]. In Appendix
B, we also present a more detailed analysis that also considers other Gaussian
noise channels such as gain and Gaussian random displacements.

Eq. 32 can also be used to incorporate the effects of loss into studies into
GKP-qubit code concatenations without the use of any additional computational
resources. Explicitly, one can model the effect of loss on an approximate GKP
codestate as a Gaussian random displacement channel with variance given by Eq.
32, which is a minor tweak to previous studies that have used a variance of
$\Delta^{2}/2$.

Now we turn to analysing dephasing noise, defined by

$\mathcal{D}_{\sigma_{\text{d}}}(\rho)=\frac{1}{\sqrt{2\pi\sigma_{\text{d}}^{2}}}\int_{\mathbb{R}}\\!d\phi\,e^{-\phi^{2}/2\sigma_{\text{d}}^{2}}e^{i\phi
a^{{\dagger}}a}\rho e^{-i\phi a^{{\dagger}}a}.$ (33)

In particular, we wish to consider the noise map
$\mathcal{N}=\mathcal{D}_{\sigma_{\text{d}}}\circ\mathcal{J}[e^{-\Delta^{2}a^{{\dagger}}a}]$.
Since dephasing is a non-Gaussian channel, we cannot analyse $\mathcal{N}$
using the variance defined in Eq. 29, since the diagonal elements of the
characteristic function take the form

$c(\bm{\mathbf{v}},\bm{\mathbf{v}})=\frac{e^{\Delta^{2}}}{2(2\pi)^{5/2}\sigma_{\text{d}}}\int_{\mathbb{R}}\\!d\phi\,\frac{e^{-\phi^{2}/2\sigma_{\text{d}}^{2}}}{\cosh(\Delta^{2})-\cos(\phi)}\\\
\times\exp\bigg{(}\\!{-}\frac{1}{2}\frac{\sinh(\Delta^{2})}{\cosh(\Delta^{2})-\cos(\phi)}|\bm{\mathbf{v}}|^{2}\\!\bigg{)}.$
(34)

For numerical simulations, it may be possible to sample random displacements
approximately from the probability distribution defined by Eq. 34 (which we
leave for future research); however, for our analytic results we find it more
convenient to work directly from Eq. 33. This allows us to consider unitary
$e^{i\phi a^{{\dagger}}a}$ rotation errors first, which are Gaussian, and then
integrate the resulting average gate fidelity expressions over $\phi$. The
details are shown in Section B.6, and we summarize the key results here.

To understand our results, first consider the situation where the envelope
size $\Delta$ is fixed, and the amount of dephasing $\sigma_{\text{d}}$ is
varied. Unlike loss, which has a linear contribution to infidelity for
arbitrarily small $\gamma$ [as shown in Eqs. 32 and 94], we find that
dephasing does not have a first-order contribution to the infidelity for small
$\sigma_{\text{d}}$. However, when $\sigma_{\text{d}}$ exceeds a critical
amount of dephasing

$\sigma_{\text{d}}^{*}=\sqrt{2}\Delta^{3}/d,$ (35)

we find that dephasing has an exponential impact on the infidelity, comparable
to the effect of loss. More precisely, in the subcritical regime
$\sigma_{\text{d}}\ll\sigma_{\text{d}}^{*}$ we have

$1-\bar{F}\approx\frac{2^{5/2}a\Delta^{4}}{3d^{2}\sqrt{\pi}\sqrt{\sigma_{\text{d}}^{*2}-\sigma^{2}_{\text{d}}}}\exp\bigg{(}\\!{-}\frac{d^{2}}{4\Delta^{2}}\\!\bigg{)},$
(36a) and in the supercritical regime
$\sigma_{\text{d}}\gg\sigma_{\text{d}}^{*}$ we have
$1-\bar{F}\approx\frac{2^{7/4}a\sigma_{\text{d}}}{3\sqrt{\pi
d\Delta(\sigma_{\text{d}}-\sigma_{\text{d}}^{*})}}\exp\bigg{(}\\!{-}\frac{\Delta
d}{\sqrt{2}\sigma_{\text{d}}}\Big{(}1-\frac{\sigma_{\text{d}}^{*}}{2\sigma_{\text{d}}}\Big{)}\\!\bigg{)}.$
(36b)

Importantly, in Eq. 36a, the only dependence of the infidelity on
$\sigma_{\text{d}}$ is in the square root, while in Eq. 36b,
$\sigma_{\text{d}}$ also appears in the exponent. In Section B.6 we generalize
Eq. 36 to include simultaneous loss and dephasing, and also derive an
approximate expression for the infidelity in the critical case when
$\sigma_{\text{d}}=\sigma_{\text{d}}^{*}$. Our results agree reasonably well
with numerics considering the crude nature of our approximations, with the
relative error between numerical and analytical results being less than 20% in
most cases of interest, see Fig. 13.

Now, consider the slightly different situation where $\sigma_{\text{d}}$ is
fixed and we wish to find the envelope size $\Delta$ that minimizes the
infidelity. This can be done approximately by minimizing the exponent of Eq.
36b, giving $\Delta=\sqrt[3]{d\sigma_{\text{d}}}/\sqrt{2}$, which is
equivalent to the condition $\sigma_{\text{d}}=2\sigma_{\text{d}}^{*}$.

Therefore, to quickly assess the impact dephasing will have on a given GKP
codestate, the single most important thing to consider is whether the
dephasing is larger than or less than the critical dephasing
$\sigma_{\text{d}}^{*}$. We show in Appendix B that the critical dephasing
when considering simultaneous loss and dephasing is given by

$\sigma_{\text{d}}^{*}=\frac{\sqrt{2}\Delta^{3}}{d}+\frac{\sqrt{2}\Delta\gamma}{d}+\frac{\gamma^{2}}{2\sqrt{2}d\Delta}.$
(37)

Evaluating $\sigma_{\text{d}}^{*}$ for $\gamma=1\%$, which is on the order of
loss that is observed in current GKP experiments [10], and
$\Delta_{\text{dB}}=10$ and 12 (respectively) gives
$\sigma_{\text{d}}^{*2}=0.077\%$ and $0.022\%$, which are an order of
magnitude smaller than the current amounts of dephasing observed in the same
experiment ($\sigma_{\text{d}}^{2}\approx 0.6\%$). On the other hand, it can
be shown numerically that given $\sigma_{\text{d}}^{2}=0.6\%$ and
$\gamma=1\%$, the optimal envelope size is $\Delta_{\text{dB}}\approx 9.3$,
which is remarkably close to the experimentally optimized envelope size
$\Delta_{\text{dB}}\approx 9.4$ that was used in Ref. [10].

##  VI Logical Pauli Measurements

In order to implement Clifford circuits using only generalized controlled
gates, it is necessary to also perform single-qubit logical measurements of
all three Pauli operators $X,Y,Z$. To perform such read-out at the end of a
computation, the simplest proposal is to use homodyne detection on the GKP
mode. However, the efficiency of homodyne detection in the microwave regime is
low, with state-of-the-art experiments achieving efficiencies on the order of
60% to 75% [21, 22].

Here, we analyze the effect of such inefficient homodyne detection on the
logical readout failure rate of GKP codes. Moreover, we propose two schemes
that can improve the effective efficiency of logical readout, one scheme based
on single-mode squeezing, and the second based on quadrature-quadrature
coupling to a separate read-out mode (which can be implemented with the
circuits shown in Fig. 2). Both of these schemes can be written as an
effective homodyne read-out of the GKP mode with an effective efficiency
$\eta_{\text{eff}}$ depending on the parameters used in the scheme. We show
how to derive $\eta_{\text{eff}}$ in each of these schemes using the theory of
quantum trajectories, and propose experimental parameters that would allow a
high-efficiency fast measurement of the GKP mode.

Recall that we can write a logical Pauli operator as
$\bar{\sigma}_{i}=e^{i\sqrt{\pi}s_{i}}$, where
$s_{i}=-\bar{p},\bar{q}-\bar{p},\bar{q}$ for $i=1,2,3$ respectively [see Eq.
7], and we can write $s_{i}=r_{i}(q\cos\theta_{i}+p\sin\theta_{i})$ in polar
coordinates. To measure $\bar{\sigma}_{i}$, we can measure the rotated
quadrature $q^{\prime}=s_{i}/r_{i}=q\cos\theta_{i}+p\sin\theta_{i}$, round the
result to the nearest multiple of $b=\sqrt{\pi}/r_{i}$ (which we call the bin
size of the measurement), and interpret the result as $+1$ if it is an even
multiple of $b$ and as $-1$ if it is an odd multiple.

As pointed out in Appendix B in Ref. [24], binned measurement operators do not
always ideally read out the logical Pauli operators of the GKP code. In the
square GKP code, this occurs with the read-out of logical
$\bar{Y}=T(\sqrt{\pi},\sqrt{\pi})$. To see this, note that a displacement
error of $T(\sqrt{\pi}/4,-\sqrt{\pi}/4)$ would flip the outcome of a binned
$\bar{Y}$ measurement even though such an error is correctable by a round of
ideal error correction. To perform a ideal Pauli $\bar{Y}$ measurement, we
would need to simultaneously measure one of the stabilizers alongside
$\bar{Y}$, and use minimum-weight decoding to infer the logical outcome.
However, implementing such a scheme in practice requires the use of an
additional GKP approximate codestate that increases the error rate enough that
the scheme has at least as large an error rate as the binned measurement
scheme (see Appendix F).

In the remainder of this section, we will (without loss of generality) only
consider $\bar{Z}$ measurements of general GKP codes rotated such that
$\beta_{1}=0$, as all other Pauli measurements are equivalent up to a re-
scaling of the bin size and rotation of the measurement quadrature. This
convention sets the bin size $b=\sqrt{\pi}/r_{3}=\alpha_{1}$ and measurement
quadrature $q^{\prime}=q$.

An interesting and subtle point is that applying the above binned $\bar{Z}$
measurement to approximate GKP codewords $\ket{\bar{\mu}_{\Delta}}$ is not
equivalent to maximum likelihood decoding of the measurement outcome, in which
a measurement outcome $q=x$ is interpreted as a logical $+1$ outcome if and
only if
$\big{|}\prescript{}{q}{\braket{x}{\bar{0}_{\Delta}}}\big{|}^{2}>\big{|}\prescript{}{q}{\braket{x}{\bar{1}_{\Delta}}}\big{|}^{2}$.
Such a maximum likelihood decoder cannot be exactly represented using a
constant bin size as described above; however, it is well approximated by
setting the bin size to $b=\cosh(\Delta^{2})\alpha_{1}$, where the correction
$\cosh(\Delta^{2})\rightarrow 1$ as $\Delta\rightarrow 0$. We note however
that the differences between using a bin size of $b=\alpha_{1}$,
$b=\cosh(\Delta^{2})\alpha_{1}$, and maximum likelihood decoding, are
negligible for any values of $\Delta$ small enough to be useful in practice.
We will nevertheless use a constant bin size $b=\cosh(\Delta^{2})\alpha_{1}$
in all subsequent results.

Figure 7: The effect of inefficient homodyne measurements on the readout
errors of approximate square GKP codestates. (a) Logical $Z$ measurement error
$\big{(}P(0|1)+P(1|0)\big{)}/2$ of approximate GKP codestates (with average
photon number $\bar{n}$ and squeezing $\Delta_{\mathrm{dB}}$) measured by a
position measurement with efficiency $\eta$. For finite $\eta$, the limiting
measurement error as the GKP codestate approaches the ideal limit
($\bar{n}\rightarrow\infty$) is plotted as a dashed line. (b) The efficiency
required to reach a target logical $Z$ measurement error rate $M$, as a
function of the GKP squeezing/photon number.

Now, we consider inefficient homodyne detection of the position quadrature
$q$, which can be described by the POVM elements

$W_{\eta}(X)=\mathcal{N}\\!\int
dx~{}\ket{x}_{q}\\!\bra{x}\exp\Big{(}-\frac{\eta}{1-\eta}(x-X)^{2}\Big{)},$
(38)

where $X\in\mathbb{R}$ is the recorded outcome of the measurement and
$\mathcal{N}$ is a normalization constant. This POVM already accounts for the
rescaling of the measurement outcome due to loss occurring from the
inefficient measurement. We define the measurement error of the logical
readout as $M_{\text{error}}=\big{(}P(1|0)+P(0|1)\big{)}/2$, where $P(1|0)$ is
the probability of recording a $-1$ measurement outcome given the initial
state was $\ket{\bar{0}_{\Delta}}$. This can be calculated by evaluating the
integral

$P(1|0)=\sum_{t\in\mathbb{Z}}\int_{(2t+\frac{1}{2})b}^{(2t+\frac{3}{2})b}dX~{}\text{tr}\big{(}W_{\eta}(X)\ket{\bar{0}_{\Delta}}\\!\bra{\bar{0}_{\Delta}}\big{)}.$
(39)

To evaluate the integral Eq. 39, we use the following expression for
$\ket{\bar{0}_{\Delta}}$ in the position basis:

$\prescript{}{q}{\braket{x}{\bar{0}_{\Delta}}}\propto\sum_{s\in\mathbb{Z}}e^{2is^{2}\alpha_{1}\alpha_{2}}e^{-\frac{1}{2}(2s\alpha_{1})^{2}\mathrm{tanh}(\Delta^{2})}\\\
\times
e^{-\frac{1}{2}\mathrm{coth}(\Delta^{2})[x-2s\alpha_{1}\mathrm{sech}(\Delta^{2})]^{2}}.$
(40)

Equation 40 holds for general GKP codes, with the only restriction that
$\bm{\mathbf{\alpha}},\bm{\mathbf{\beta}}$ are rotated such that
$\beta_{1}=0$.

After substituting Eq. 40 into Eq. 39 and evaluating the integrals over $X$
and $x$, this gives an exact infinite series for the error probability
$P(1|0)$, which can be evaluated numerically by truncating the infinite series
(see Appendix E). The values obtained using this semi-analytical method are
indistinguishable from those obtained using a direct Fock space simulation,
but the semi-analytic results can be used to probe smaller values of $\Delta$
than would be possible due to the truncation dimension of the numerical
simulation. We plot the measurement error $M_{\text{error}}$ as a function of
$\Delta$ and $\eta$ for the square GKP code in Fig. 7(a), and show the
efficiency $\eta$ required to reach various target measurement error rates in
Fig. 7(b).

Additionally, we derive in Appendix E the following approximation to the
measurement error

$M_{\text{error}}\approx\mathrm{erfc}\bigg{(}\frac{1}{2}\alpha_{1}\Big{(}\Delta^{2}+\frac{1-\eta}{\eta}\Big{)}^{-1/2}\bigg{)},$
(41)

which holds for small $\Delta$. These results demonstrate that
$M_{\text{error}}$ is highly sensitive to the measurement efficiency $\eta$:
even at $\eta=0.7$, which is close to the current state-of-the-art, the
minimum achievable measurement error rate is $M_{\text{error}}\approx 6.7\%$
as $\Delta\rightarrow\infty$. This is consistent with results obtained in Ref.
[20] in their analysis of teleportation error-correction schemes and motivates
the need to improve the effective efficiency of homodyne detection for use in
GKP codes. Concretely, one needs a measurement efficiency of $\eta\approx
0.85$ to reach a measurement error of $1\%$, or $\eta\approx 0.92$ for
$0.1\%$, using a square GKP code with $\Delta_{\text{dB}}\approx 12$.

Figure 8: Two position measurement schemes to improve the effective efficiency
of the measurement. (a) The initial state is subjected to phase-sensitive
amplification, equivalent to an application of the squeezing operator
$S(r)=e^{\frac{r}{2}(a^{2}-a^{{\dagger}2})}$, followed by a position
measurement with efficiency $\eta$. (b) The initial state (stored in cavity
$a$) is coupled to a read-out mode initialized in the vacuum state (stored in
cavity $b$) via the Hamiltonian $H/\hbar=-gq_{1}p_{2}$, which may be
implemented using the circuit QED designs presented in Section III.
Simultaneously, the read-out mode’s position quadrature is measured at a rate
$\kappa$ via homodyne detection with efficiency $\eta$. In both schemes, we
show that the whole scheme is equivalent to a single position measurement with
an effective efficiency $\eta_{\text{eff}}$, which can be greater than the
efficiency of the physical position measurement $\eta$ given the right
parameters.

To achieve such efficiencies, we consider two alternative schemes (illustrated
in Fig. 8) for performing homodyne detection to improve the effective
efficiency of the measurement. In the first scheme, we simply consider
applying a single-mode squeezing operator
$S(r)=\exp\big{(}r(a^{{\dagger}2}-a^{2})/2\big{)}$ (where $r>0$ corresponds to
squeezing the momentum quadrature and $r<0$ corresponds to squeezing the
position quadrature), before performing homodyne detection with efficiency
$\eta$. We quote the amount of squeezing in decibels as
$S_{\text{dB}}=(20\log_{10}e)\,r$. Intuitively, amplifying the position
quadrature should improve the effective efficiency of the measurement by
improving the separation between different position eigenstates. We can write
the effective POVM elements of the squeezing/measurement sequence as
$V_{r,\eta}(X^{\prime})=S^{{\dagger}}(r)W_{\eta}(X^{\prime})S(r)$, where
$X^{\prime}$ is the measurement outcome of the inefficient homodyne
measurement Eq. 38. By defining $X=e^{-r}X^{\prime}$, we obtain
$V_{r,\eta}(X)=W_{\eta_{\text{eff}}}(X)$, where

$\eta_{\text{eff}}=\big{(}1+e^{-2r}(\eta^{-1}-1)\big{)}^{-1}.$ (42)

Using this, we can calculate the amount of amplification required to increase
the effective efficiency of the measurement; for example, if the physical
efficiency is $\eta=0.7$, we can achieve $\eta_{\text{eff}}=0.85$ (or a 1%
measurement error for $\Delta_{\text{dB}}=12$ dB) with a squeezing of
$S_{\text{dB}}\approx 4$ dB, and $\eta_{\text{eff}}=0.92$ (0.1% error) with
$S_{\text{dB}}\approx 7$ dB.

Although such levels of amplification are achievable, this scheme requires the
GKP mode itself to be directly released into the measurement sequence, which
either requires a change in the quality factor of the GKP mode itself, or
requires coupling to a second readout mode. To combat this issue we consider a
second scheme in Fig. 8(b). We consider a high Q GKP mode with loss rate
$\gamma$ coupled to a low Q read-out mode via a Hamiltonian $H=-gq_{1}p_{2}$
(where 1 refers to the GKP mode and 2 to the read-out mode). Such a
Hamiltonian can be engineered using the circuits discussed in Section III and
is identical to the Hamiltonian for a controlled-NOT between two square GKP
qubits. Homodyne detection is performed on the position quadrature of the
read-out mode with efficiency $\eta$, which we consider to be occurring at a
rate $\kappa$ simultaneously with the coupling. To analyze this system we
consider short timescales $t\ll 1/\gamma$ and neglect the effect of loss
occurring on the GKP mode. In this regime, the quantity of interest is the
time required to perform the measurement to a desired efficiency. Here, we use
quantum trajectories to solve exactly for the POVM of the system using the
method of Ref. [25]. We relegate the details of the derivation of the POVM to
Appendix G so that we can focus on the results of our analysis here.

The experimentally observed measurement outcome is given by the observed
photocurrent $I(t)$ of the detector (see Appendix G for details). We find that
the resulting POVM depends not on the entire measurement record from time $0$
to $t$, but only on one integral of the observed photocurrent

$X=-\sqrt{\kappa/(8g^{2}\tau^{2}\eta)}\int_{0}^{t}dt^{\prime}\,(1-e^{-\kappa
t^{\prime}/2})I(t^{\prime}),$ (43)

where $\tau=t-(1-e^{-\kappa t/2})(3-e^{-\kappa t/2})/\kappa$. Given the
initial state of the ancilla mode $\rho_{b}$, we can write a single-mode POVM
element corresponding to a measurement outcome $X$ as

$T_{g,\kappa,\eta,t}(X)=\mathcal{N}\\!\int\\!dx\,\ket{x}_{q_{1}}\\!\\!\bra{x}\int\\!d\tilde{x}\,{\vphantom{\ket{x}}}_{q_{2}}\\!\\!\braket{\tilde{x}}{\rho_{b}}{\tilde{x}}_{q_{2}}\\\
\times\exp\bigg{\\{}-\frac{1}{C}\Big{[}X-x-\frac{1}{2g\tau}\big{(}1-e^{-\kappa
t/2}\big{)}^{2}\tilde{x}\Big{]}^{2}\bigg{\\}},$ (44)

where $\mathcal{N}$ is a normalization constant, and

$C=\frac{\kappa\tau-\eta(1-e^{-\kappa t/2})^{4}}{4g^{2}\tau^{2}\eta}.$ (45)

We see now from Eq. 44 that $X$ indeed represents the estimate of the position
of the state. Substituting $\rho_{b}=\ket{0}\\!\bra{0}$ for the initial state
of the ancilla results in a POVM that corresponds to an inefficient homodyne
measurement [Eq. 38] with effective efficiency

$\eta_{\text{eff}}=\frac{4g^{2}\tau\eta}{4g^{2}\tau\eta+\kappa}.$ (46)

Figure 9: (main) Effective measurement inefficiency $1-\eta_{\text{eff}}$ of
the two-mode measurement scheme, as a function of the coupling strength
$g/(2\pi$ MHz) and measurement time $t$, for a fixed physical efficiency
$\eta=0.75$. The two-mode measurement scheme consists of coupling the GKP mode
to an ancilla initiated in the vacuum state via the Hamiltonian
$H=-gq_{1}p_{2}$, and performing homodyne detection for some finite time $t$
on the ancilla mode at a rate $\kappa$ and efficiency $\eta$. $\kappa$ is
optimized to maximize the effective measurement efficiency. The right axis
shows the corresponding logical measurement error of a GKP state with
$\Delta_{\text{dB}}=12$ when measured with homodyne detection of efficiency
$\eta_{\text{eff}}$. (inset) The optimal measurement rate
$\kappa_{\text{opt}}/(2\pi$ MHz) as a function of the measurement time $t$.

We analyze Eq. 46 as follows. First, we optimize the measurement rate $\kappa$
to maximize the effective measurement efficiency for fixed $g,t,\eta$, noting
that $\tau$ depends on $\kappa$. Interestingly, due to the QND nature of the
measurement and the lack of noise on the GKP code, we find that the resulting
$\kappa_{\text{opt}}$ depends only on the measurement time $t$ and is given
approximately by $\kappa_{\text{opt}}/2\pi\approx 3.79/t$ (see inset to Fig.
9). The dependence of $\eta_{\text{eff}}$ on $\kappa$ is very weak near
$\kappa_{\text{opt}}$, so a fine-tuning of $\kappa$ is not required to achieve
competitive effective efficiencies. Next, we fix the physical efficiency of
the measurement at $\eta=0.75$ and plot $\eta_{\text{eff}}$ as a function of
$t$ and $g$ in Fig. 9. Figure 9 demonstrates that for a coupling strength of
$g=10\times 2\pi$ MHz, one can achieve $\eta_{\text{eff}}=0.85$ (1% read-out
error for $\Delta_{\text{dB}}=12$ dB) in a measurement time $t\approx 0.45\
\mu$s, and $\eta_{\text{eff}}=0.92$ (0.1% error) after $t\approx 0.63\ \mu$s.

We are interested in the required measurement time to achieve a given
effective efficiency (and hence logical measurement error rate) for two
reasons. First, if the measurement time is too long, loss on the GKP mode will
become significant. Second, it is desirable for readout to be conducted on a
time scale comparable to that of other superconducting architectures, such as
those based on transmon qubits. In transmon qubits, logical readout typically
takes on the order of hundreds of nanoseconds [46], which is on the same order
of magnitude as our estimates for the time for our measurement scheme.
Stronger coupling strengths would help reduce the measurement time required in
our scheme.

Using Eqs. 44 and 46, one can determine the effect of changing other
parameters such as the physical efficiency $\eta$ and the initial state of the
ancilla mode $\rho_{b}$ on the effective efficiency $\eta_{\text{eff}}$. The
effective efficiency has only a weak dependence on the physical efficiency;
for example, increasing the physical efficiency of the measurement from
$\eta=0.5$ to $\eta=1$ only results in a roughly 30% decrease in the required
measurement time to reach a given effective efficiency, independent of the
choice of $g$ or target effective efficiency. For the ancilla initial state
$\rho_{b}$, one would expect that starting with a vacuum state squeezed along
the position quadrature would improve the effective efficiency, as it reduces
the additional noise added to the signal from the position quadrature of the
GKP mode. In the infinite squeezing limit we substitute the $0$-position
eigenstate $\rho_{b}=\ket{0}_{q_{2}}\\!\bra{0}$ into Eq. 44, giving an
effective efficiency $\eta_{\text{eff}}=1/(C+1)$. However, this only results
in a decrease of no more than 20% in the required measurement time to reach a
given $\eta_{\text{eff}}$, for $0.5<\eta<0.75$ and any choice of $g$ and
$\eta_{\text{eff}}$. As such, the coupling strength $g$ is the most important
factor (along with the GKP mode squeezing $\Delta$) in reducing the logical
measurement error in GKP modes using this scheme.

As a final comment, we note that as $t\rightarrow\infty$, the state of the GKP
mode is projected onto the $X$-position eigenstate, as shown in Section G.4.
It may then be easier to generate a new GKP codestate from this position
eigenstate (or highly squeezed state in the finite $t$ regime) than if the
final state of the oscillator was the vacuum state.

##  VII Discussion and Conclusions

In this work, we have given concrete proposals to implement GKP Clifford gates
and read-out in superconducting circuits. We began in Section III by
presenting our scheme for performing Clifford circuits using generalized
controlled gates implemented by four- or three-wave mixing circuits, where
single-qubit Clifford gates are accounted for by updating the phase of a local
oscillator in the implementation of each two-qubit gate. Next, in Section IV
we presented an average gate fidelity metric for quantifying the quality of
Clifford gates and analyzed the performance of ideal logical gates when
subjected to errors due to approximate GKP codestates. In Section V we
presented a general method to analytically approximate the effect of loss and
dephasing on GKP codes using the stabilizer subsystem decomposition [24].
Finally in Section VI, we considered the effects of homodyne detection
inefficiencies on the rate of logical measurement errors. We proposed a scheme
that can achieve feasible error rates even with a low measurement efficiency
and analyzed the system using quantum trajectories [25].

While our analysis of the performance of GKP Clifford gates gave significant
insight into how to mitigate the spreading of errors due to the logical gates,
we did not consider the effects of non-ideal gate execution. One could use the
theoretical analysis conducted in Ref. [40] to determine the leading sources
of error in the implementation of a given generalized controlled gate. Then,
one could include these effects to produce an estimate of the average gate
fidelity of each generalized controlled gate in the presence of realistic
noise sources. We leave such an analysis to future work.

To perform logical read-out of GKP codestates, we presented a scheme utilizing
quadrature-quadrature coupling to an ancilla mode to implement fast, high-
fidelity logical read-out. However, this scheme requires the use of a low-Q
read-out ancilla prepared in the vacuum state, increasing the overhead
required for computation with GKP codes. Moreover, the performance of our
scheme is highly sensitive to the strength $g$ of the quadrature-quadrature
coupling between the GKP and ancilla modes, but the values of $g$ that are
feasible in GKP experiments remain to be seen. Additionally, the high-Q GKP
mode and low-Q readout ancilla must be coupled with a device with a large on-
off ratio to prevent unwanted leakage from the GKP mode to the ancilla. These
factors must be considered when assessing the viability of our scheme for
specific experimental platforms.

##  VIII Acknowledgements

This work was supported by the Australian Research Council Centre of
Excellence for Engineered Quantum Systems (EQUS, CE170100009). During this
project, MHS has been supported by an Australian Government Research Training
Program (RTP) Scholarship and also by QuTech NWO funding 2020-2024 – Part I
“Fundamental Research”, project number 601.QT.001-1, financed by the Dutch
Research Council (NWO).

## References

  * Chuang  _et al._ [1997] I. L. Chuang, D. W. Leung, and Y. Yamamoto, Physical Review A 56, 1114 (1997).
  * Cochrane  _et al._ [1999] P. T. Cochrane, G. J. Milburn, and W. J. Munro, Physical Review A 59, 2631 (1999).
  * Gottesman  _et al._ [2001] D. Gottesman, A. Kitaev, and J. Preskill, Phys. Rev. A 64 (2001).
  * Michael  _et al._ [2016] M. H. Michael, M. Silveri, R. Brierley, V. V. Albert, J. Salmilehto, L. Jiang, and S. M. Girvin, Physical Review X 6, 031006 (2016).
  * Vuillot  _et al._ [2019] C. Vuillot, H. Asasi, Y. Wang, L. P. Pryadko, and B. M. Terhal, Physical Review A 99, 032344 (2019).
  * Noh and Chamberland [2020] K. Noh and C. Chamberland, Physical Review A 101, 012316 (2020).
  * Noh  _et al._ [2022] K. Noh, C. Chamberland, and F. G. Brandão, PRX Quantum 3, 010315 (2022).
  * Hopfmueller  _et al._ [2024] F. Hopfmueller, M. Tremblay, P. St-Jean, B. Royer, and M.-A. Lemonde, arXiv preprint arXiv:2402.09333 (2024).
  * Raveendran  _et al._ [2022] N. Raveendran, N. Rengaswamy, F. Rozpędek, A. Raina, L. Jiang, and B. Vasić, Quantum 6, 767 (2022).
  * Sivak  _et al._ [2023] V. Sivak, A. Eickbusch, B. Royer, S. Singh, I. Tsioutsios, S. Ganjam, A. Miano, B. Brock, A. Ding, L. Frunzio, _et al._ , Nature 616, 50 (2023).
  * Baragiola  _et al._ [2019] B. Q. Baragiola, G. Pantaleoni, R. N. Alexander, A. Karanjai, and N. C. Menicucci, Physical Review Letters 123, 200502 (2019).
  * Yamasaki  _et al._ [2020] H. Yamasaki, T. Matsuura, and M. Koashi, Physical Review Research 2, 023270 (2020).
  * Campagne-Ibarcq  _et al._ [2020] P. Campagne-Ibarcq, A. Eickbusch, S. Touzard, E. Zalys-Geller, N. Frattini, V. Sivak, P. Reinhold, S. Puri, S. Shankar, R. Schoelkopf, _et al._ , Nature 584, 368 (2020).
  * Eickbusch  _et al._ [2022] A. Eickbusch, V. Sivak, A. Z. Ding, S. S. Elder, S. R. Jha, J. Venkatraman, B. Royer, S. M. Girvin, R. J. Schoelkopf, and M. H. Devoret, Nature Physics 18, 1464 (2022).
  * Flühmann  _et al._ [2019] C. Flühmann, T. L. Nguyen, M. Marinelli, V. Negnevitsky, K. Mehta, and J. P. Home, Nature 566, 513 (2019).
  * De Neeve  _et al._ [2022] B. De Neeve, T.-L. Nguyen, T. Behrle, and J. P. Home, Nature Physics 18, 296 (2022).
  * Tzitrin  _et al._ [2020] I. Tzitrin, J. E. Bourassa, N. C. Menicucci, and K. K. Sabapathy, Physical Review A 101, 032315 (2020).
  * Grimsmo and Puri [2021] A. L. Grimsmo and S. Puri, PRX Quantum 2, 020101 (2021).
  * Hastrup  _et al._ [2021] J. Hastrup, M. V. Larsen, J. S. Neergaard-Nielsen, N. C. Menicucci, and U. L. Andersen, Physical Review A 103, 032409 (2021).
  * Hillmann  _et al._ [2022] T. Hillmann, F. Quijandría, A. L. Grimsmo, and G. Ferrini, PRX Quantum 3, 020334 (2022).
  * Macklin  _et al._ [2015] C. Macklin, K. O’Brien, D. Hover, M. Schwartz, V. Bolkhovsky, X. Zhang, W. Oliver, and I. Siddiqi, Science 350, 307 (2015).
  * Touzard  _et al._ [2019] S. Touzard, A. Kou, N. Frattini, V. Sivak, S. Puri, A. Grimm, L. Frunzio, S. Shankar, and M. Devoret, Physical review letters 122, 080502 (2019).
  * Hastrup and Andersen [2023] J. Hastrup and U. L. Andersen, Physical Review A 108, 052413 (2023).
  * Shaw  _et al._ [2024] M. H. Shaw, A. C. Doherty, and A. L. Grimsmo, PRX Quantum 5, 010331 (2024).
  * Warszawski  _et al._ [2020] P. Warszawski, H. M. Wiseman, and A. C. Doherty, Physical Review A 102, 042210 (2020).
  * Menicucci [2014] N. C. Menicucci, Physical review letters 112, 120504 (2014).
  * Terhal and Weigand [2016] B. Terhal and D. Weigand, Physical Review A 93, 012315 (2016).
  * Royer  _et al._ [2020] B. Royer, S. Singh, and S. Girvin, Physical Review Letters 125, 260509 (2020).
  * Kolesnikow  _et al._ [2023] X. C. Kolesnikow, R. W. Bomantara, A. C. Doherty, and A. L. Grimsmo, arXiv preprint arXiv:2303.03541 (2023).
  * Royer  _et al._ [2022] B. Royer, S. Singh, and S. Girvin, PRX Quantum 3, 010335 (2022).
  * Fukui  _et al._ [2018] K. Fukui, A. Tomita, A. Okamoto, and K. Fujii, Physical review X 8, 021054 (2018).
  * Fukui [2023] K. Fukui, Physical Review A 107, 052414 (2023).
  * Harrington [2004] J. W. Harrington,  _Analysis of quantum error-correcting codes: symplectic lattice codes and toric codes_ , Ph.D. thesis (2004).
  * Conrad  _et al._ [2022] J. Conrad, J. Eisert, and F. Arzani, Quantum 6, 648 (2022).
  * Albert  _et al._ [2018] V. V. Albert, K. Noh, K. Duivenvoorden, D. J. Young, R. Brierley, P. Reinhold, C. Vuillot, L. Li, C. Shen, S. Girvin, _et al._ , Physical Review A 97, 032346 (2018).
  * Löwdin [1950] P.-O. Löwdin, The Journal of Chemical Physics 18, 365 (1950).
  * Chamberland  _et al._ [2018] C. Chamberland, P. Iyer, and D. Poulin, Quantum 2, 43 (2018).
  * Dutta  _et al._ [1995] B. Dutta, N. Mukunda, R. Simon, _et al._ , Pramana 45, 471 (1995).
  * Frattini  _et al._ [2017] N. Frattini, U. Vool, S. Shankar, A. Narla, K. Sliwa, and M. Devoret, Applied Physics Letters 110, 222603 (2017).
  * Zhang  _et al._ [2019] Y. Zhang, B. J. Lester, Y. Y. Gao, L. Jiang, R. Schoelkopf, and S. Girvin, Physical Review A 99, 012314 (2019).
  * Rojkov  _et al._ [2023] I. Rojkov, P. M. Röggla, M. Wagener, M. Fontboté-Schmidt, S. Welte, J. Home, and F. Reiter, arXiv preprint arXiv:2305.05262 (2023).
  * Nielsen and Chuang [2002] M. A. Nielsen and I. Chuang, Quantum computation and quantum information (2002).
  * Nielsen [2002] M. A. Nielsen, Physics Letters A 303, 249 (2002).
  * Bolt  _et al._ [2016] A. Bolt, G. Duclos-Cianci, D. Poulin, and T. M. Stace, Phys. Rev. Lett. 117, 070501 (2016).
  * Cai and Benjamin [2019] Z. Cai and S. C. Benjamin, Scientific reports 9, 11281 (2019).
  * Acharya  _et al._ [2023] R. Acharya, I. Aleiner, R. Allen, T. I. Andersen, M. Ansmann, F. Arute, K. Arya, A. Asfaw, J. Atalaya, R. Babbush, _et al._ , Nature 614, 676 (2023).
  * Agrell  _et al._ [2002] E. Agrell, T. Eriksson, A. Vardy, and K. Zeger, IEEE transactions on information theory 48, 2201 (2002).
  * Eisert and Wolf [2005] J. Eisert and M. M. Wolf, arXiv preprint quant-ph/0505151 (2005).
  * Noh  _et al._ [2018] K. Noh, V. V. Albert, and L. Jiang, IEEE Transactions on Information Theory 65, 2563 (2018).
  * Walshe  _et al._ [2020] B. W. Walshe, B. Q. Baragiola, R. N. Alexander, and N. C. Menicucci, Physical Review A 102, 062411 (2020).
  * Rozpędek  _et al._ [2023] F. Rozpędek, K. P. Seshadreesan, P. Polakos, L. Jiang, and S. Guha, Physical Review Research 5, 043056 (2023).
  * Matsos  _et al._ [2023] V. Matsos, C. Valahu, T. Navickas, A. Rao, M. Millican, M. Biercuk, and T. Tan, arXiv preprint arXiv:2310.15546 (2023).
  * Wiseman [1996] H. Wiseman, Quantum and Semiclassical Optics: Journal of the European Optical Society Part B 8, 205 (1996).
  * Wiseman and Milburn [2009] H. M. Wiseman and G. J. Milburn,  _Quantum measurement and control_ (Cambridge university press, 2009).

##  Appendix A Relating the Fidelity of Clifford Gates to that of the Identity
Gate

In this appendix, we derive the equation

$\bar{F}_{A,\mathcal{P},\Delta}=\bar{F}_{I,\mathcal{S}(\bar{A})^{-1}\mathcal{P},\Delta}\,,$
(47)

which equates the average gate fidelity of a GKP Clifford gate $\bar{A}$
decoded ideally over a patch $\mathcal{P}$ with the average gate fidelity of
the identity gate decoded ideally over the modified patch
$\mathcal{S}(\bar{A})^{-1}\mathcal{P}$.

To begin, recall the definition of the average gate fidelity

$\bar{F}(\mathcal{E},U)=\int
d\psi\bra{\psi}U^{\dagger}\mathcal{E}(\ket{\psi}\\!\bra{\psi})U\ket{\psi},$
(48)

from which it can be trivially seen that
$\bar{F}(\mathcal{E},U)=\bar{F}(\mathcal{J}[U^{{\dagger}}]\circ\mathcal{E},I)$.
Recall also our definition of the $n$-qubit to $n$-qubit channel

$\mathcal{E}_{U,\mathcal{P},\Delta}=\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{J}[\bar{U}R_{\Delta}],$
(49)

where we defined
$\bar{F}_{U,\mathcal{P},\Delta}=\bar{F}(\mathcal{E}_{U,\mathcal{P},\Delta},U)$
for shorthand. From Eq. 16 we can write this equivalently as
$\bar{F}(\mathcal{J}[U^{{\dagger}}]\circ\mathcal{E}_{U,\mathcal{P},\Delta},I)$.

Next, for a GKP Clifford gate $\bar{A}$, we claim that

$\mathcal{J}[\bar{A}^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{J}[\bar{A}]=\mathcal{C}_{\mathcal{S}(\bar{A})^{-1}\mathcal{P}}.$
(50)

On an intuitive level we can understand this as follows. From Section II, the
decoder $\mathcal{C}_{\mathcal{P}}$ works by first measuring the stabilizer
generators. This projects the state into a displaced ideal GKP codestate
$T(\bm{\mathbf{v}})\ket{\bar{\psi}}$, where $\bm{\mathbf{v}}$ is revealed up
to addition by a logical lattice vector
$m\bm{\mathbf{\alpha}}+n\bm{\mathbf{\beta}}$ for some $m,n\in\mathbb{Z}$.
Then, we choose the unique vector $\bm{\mathbf{k}}$ that lies within the patch
$\mathcal{P}$ and satisfies
$\bm{\mathbf{k}}=\bm{\mathbf{v}}+m\bm{\mathbf{\alpha}}+n\bm{\mathbf{\beta}}$.
Finally, we return the state to the codespace using
$T(\bm{\mathbf{k}})^{{\dagger}}$.

Now consider
$\mathcal{J}[\bar{A}^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{J}[\bar{A}]$
as a single decoding step. Since the GKP Clifford gate $\bar{A}$ preserves the
stabilizer group the information that is revealed about the state is the same,
i.e. we obtain $\bm{\mathbf{v}}$ up to a logical lattice vector. However, the
correction we apply is now
$\bar{A}^{{\dagger}}T(\bm{\mathbf{k}})^{{\dagger}}\bar{A}=T(S(\bar{A})^{-1}\bm{\mathbf{k}})=T(\bm{\mathbf{k}}^{\prime})$,
where $\bm{\mathbf{k}}^{\prime}$ is now the unique vector that lies within the
patch $\mathcal{S}(\bar{A})^{-1}\mathcal{P}$ and satisfies
$\bm{\mathbf{k}}^{\prime}=\bm{\mathbf{v}}+m\bm{\mathbf{\alpha}}+n\bm{\mathbf{\beta}}$
(for $m,n\in\mathbb{Z}$). This operation we identify as simply being
$\mathcal{C}_{\mathcal{S}(\bar{A})^{-1}\mathcal{P}}$, proving Eq. 50. Note
that Eq. 50 also follows from Eq. (77) of Ref. [24].

Finally, we have that

$\bar{A}R=RA,$ (51)

since $\bar{A}$ acts perfectly on the logical codespace. Putting this all
together, we can write

$\displaystyle\bar{F}_{A,\mathcal{P},\Delta}$
$\displaystyle=\bar{F}(\mathcal{J}[A^{{\dagger}}]\circ\mathcal{E}_{A,\mathcal{P},\Delta},I)$
(52a)
$\displaystyle=\bar{F}(\mathcal{J}[A^{{\dagger}}R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{J}[\bar{A}R_{\Delta}],I)$
(52b)
$\displaystyle=\bar{F}(\mathcal{J}[R^{{\dagger}}\bar{A}^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{J}[\bar{A}R_{\Delta}],I)$
(52c)
$\displaystyle=\bar{F}(\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{S}(\bar{A})^{-1}\mathcal{P}}\circ\mathcal{J}[R_{\Delta}],I)$
(52d) $\displaystyle=\bar{F}_{I,\mathcal{S}(\bar{A})^{-1}\mathcal{P},\Delta},$
(52e)

proving Eq. 18.

##  Appendix B Derivation of Average Gate Fidelity Estimates under Ideal
Decoding

In this appendix, we present the derivation of the average gate fidelity
estimates we used in Section IV for GKP Clifford gates and in Section V for
general noise maps under the assumption of ideal decoding. Our first task will
be to derive a general formula [Eq. 26] for the average gate infidelity of a
CV noise map $\mathcal{N}$ using the stabilizer subsystem decomposition [24],
assuming that $\mathcal{N}$ has a characteristic function that is sufficiently
“close to the identity” (as we will explain in more detail later). Then,
assuming that the noise map is Gaussian and symmetric in phase-space, we show
that the average gate fidelity can be expressed using just three variables:
the degeneracy $a$ and distance $d$ of the patch $\mathcal{P}$, and the
variance $\sigma^{2}$ of the diagonal elements of the characteristic function
of the noise map [Eq. 30]. We use this formula to analyze a wide range of
relevant noise maps acting on approximate GKP codestates. When the only noise
comes from approximate GKP codestates, we obtain Eq. 17, which was used in
Section IV. However, we can also apply the formula to loss [Eq. 32], Gaussian
random displacements, and gain. Finally, we extend our results to dephasing,
which is a non-Gaussian channel, and derive the approximate expressions for
the average gate fidelity in Eq. 36.

Throughout this appendix, we will make frequent use of the entanglement
fidelity $F_{e}$ of a (finite-dimensional) channel $\mathcal{E}$, defined as

$F_{e}=\braket{ME}{(\mathcal{I}\otimes\mathcal{E})(\ket{ME}\\!\bra{ME})}{ME},$
(53)

where $\ket{ME}$ is a maximally entangled state across two copies of the
finite-dimensional Hilbert space, and $\mathcal{I}$ is the identity channel.
$F_{e}$ is related to the average gate fidelity Eq. 16 by the relationship
[43]

$\bar{F}=\frac{dF_{e}+1}{d+1},$ (54)

where $d$ is the dimension of the Hilbert space. For clarity, we will also
define both the GKP stabilizer lattice

$\mathcal{L}_{\text{stab}}=\\{2m\bm{\mathbf{\alpha}}+2n\bm{\mathbf{\beta}}\>|\>m,n\in\mathbb{Z}\\},$
(55)

and the GKP logical lattice

$\mathcal{L}_{\text{log}}=\\{m\bm{\mathbf{\alpha}}+n\bm{\mathbf{\beta}}\>|\>m,n\in\mathbb{Z}\\},$
(56)

the latter of which coincides with the definition of $\mathcal{L}$ in Section
II. Note that $\mathcal{L}_{\text{stab}}\subset\mathcal{L}_{\text{log}}$,
since we can think of each stabilizer as implementing a logical identity gate.

###  B.1 Stabilizer Subsystem Decomposition

We begin by summarizing the properties of the GKP stabilizer subsystem
decomposition (SSSD) that we will use in the rest of this appendix. We refer
the reader to Ref. [24], particularly sections II and VII, for a more thorough
introduction.

The SSSD decomposes the CV Hilbert space $\mathcal{H}$ into a tensor product
of two Hilbert spaces $\mathcal{L}$ (the logical subsystem) and $\mathcal{S}$
(the stabilizer subsystem) as follows. First, consider an ideal GKP codestate
$\ket{\bar{\psi}}$ that has been displaced by a vector $\bm{\mathbf{v}}$, and
label it

$\ket{\psi,\bm{\mathbf{v}}}=T(\bm{\mathbf{v}})\ket{\bar{\psi}}.$ (57)

One can show that for any patch $\mathcal{P}$ that is a primitive cell of the
logical lattice $\mathcal{L}_{\text{log}}$, the set

$\big{\\{}\\!\ket{\mu,\bm{\mathbf{v}}}\big{|}\;\mu\in\\{0,1\\},\bm{\mathbf{v}}\in\mathcal{P}\big{\\}}$
(58)

forms a basis of $\mathcal{H}$. Therefore, we can replace the comma in Eq. 57
with a tensor product, which defines the decomposition

$\displaystyle\mathcal{H}$ $\displaystyle=\mathcal{L}\otimes\mathcal{S},$
$\displaystyle\ket{\psi,\bm{\mathbf{v}}}=\ket{\psi}\otimes\ket{\bm{\mathbf{v}}},$
(59)

for $\bm{\mathbf{v}}\in\mathcal{P}$.

The stabilizer subsystem $\mathcal{S}$ encodes the possible stabilizer
measurement outcomes of a state, and is isomorphic to the full Hilbert space
$\mathcal{H}$, analogous to how if you split the real number line in two, you
are left with two real number lines. $\mathcal{S}$ has a quasi-periodic
structure, such that when an ideal codestate is displaced across a boundary of
$\mathcal{P}$, a logical Pauli operator is applied to the logical subsystem.
The logical subsystem $\mathcal{L}$ is isomorphic to $\mathbb{C}^{2}$ and
represents the logical GKP information stored in the CV state. In particular,
the partial trace of a CV state over the stabilizer subsystem $\mathcal{S}$ is
equivalent to performing a round of ideal decoding over the patch
$\mathcal{P}$ and “forgetting” the stabilizer measurement outcomes.

Recall that given a CV noise channel $\mathcal{N}$, we define the logical
noise channel (which maps qubit density matrices to qubit density matrices) as

$\mathcal{N}_{\text{log}}=\mathcal{J}[R^{{\dagger}}]\circ\mathcal{C}_{\mathcal{P}}\circ\mathcal{N}\circ\mathcal{J}[R],$
(60)

where $R=\ket{\bar{0}}\\!\bra{0}+\ket{\bar{1}}\\!\bra{1}$. The logical noise
channel can be written in terms of the SSSD as

$\mathcal{N}_{\text{log}}(\rho)=\mathrm{tr}_{\mathcal{S}}\big{(}\mathcal{N}(\rho\otimes\ket{\bm{\mathbf{0}}}\\!\bra{\bm{\mathbf{0}}})\big{)}.$
(61)

In Section VII.A of Ref. [24] we show that, in the single-mode case,

$\mathcal{N}_{\text{log}}(\rho)=\;\;\sum_{\mathclap{m_{1},m_{2},n_{1},n_{2}\in\mathbb{Z}}}\;\;(i^{m_{1}m_{2}}X^{m_{1}}Z^{m_{2}})\,\rho\,(i^{n_{1}n_{2}}X^{n_{1}}Z^{n_{2}})\\\
{\times}\bigg{(}\\!\int_{\mathcal{P}}\\!\\!d^{2}\bm{\mathbf{v}}\,e^{i\bm{\mathbf{v}}^{T}\Omega\left(\vphantom{2^{2}}(m_{1}-n_{1})\bm{\mathbf{\alpha}}+(m_{2}-n_{2})\bm{\mathbf{\beta}}\right)/2}\\\
\times
c\big{(}\bm{\mathbf{v}}+m_{1}\bm{\mathbf{\alpha}}+m_{2}\bm{\mathbf{\beta}},\bm{\mathbf{v}}+n_{1}\bm{\mathbf{\alpha}}+n_{2}\bm{\mathbf{\beta}}\big{)}\\!\bigg{)},$
(62)

where

$\Omega=\begin{bmatrix}0&1\\\ -1&0\end{bmatrix}$ (63)

and $c(\bm{\mathbf{u}},\bm{\mathbf{v}})$ is the characteristic function of
$\mathcal{N}$ as defined in Eq. 25. Intuitively, one can obtain Eq. 62 from
Eq. 61 by first writing $\mathcal{N}(\rho)$ in terms of displacements applied
to the ideal codestate, then applying the quasi-periodic boundary conditions
of the subsystem decomposition, and then taking the partial trace over
$\mathcal{S}$.

The results obtained above generalize straightforwardly to multi-mode GKP
codes as we now show (for more details about multi-mode GKP codes we refer the
reader to Refs. [3, 33, 34, 30], and Sections III and IV of Ref. [24] for the
multi-mode SSSD). In the present paper, the details of the multi-mode
construction are not important, and we simply include the multi-mode case to
demonstrate the generality of our results. To set this up, we define $n$-mode
displacement operators by

$T(\bm{\mathbf{v}})=\bigotimes_{j=1}^{n}T(v_{j},v_{j+n})$ (64)

for $\bm{\mathbf{v}}\in\mathbb{R}^{2n}$. As such, the characteristic function
$c(\bm{\mathbf{u}},\bm{\mathbf{v}})$ of a CV noise channel $\mathcal{N}$ takes
vectors with length $2n$ as input. Then, suppose we have $k$ qubits in our
multi-mode GKP code with logical lattice $\mathcal{L}_{\text{log}}$. Let the
generators of this lattice $\\{\bm{\mathbf{\ell}}_{i}\\}_{i=1}^{2n}$ be
structured such that
$T(\bm{\mathbf{\ell}}_{1}),\dots,T(\bm{\mathbf{\ell}}_{k})$ represent the $k$
logical $X$ operators and
$T(\bm{\mathbf{\ell}}_{n+1}),\dots,T(\bm{\mathbf{\ell}}_{n+k})$ represent the
$k$ logical $Z$ operators of the code. Then, we can write the logical noise
channel $\mathcal{N}_{\text{log}}$ corresponding to a CV noise channel
$\mathcal{N}$ as

$\mathcal{N}_{\text{log}}(\rho)=\;\sum_{\mathclap{\bm{\mathbf{m}},\bm{\mathbf{n}}\in\mathbb{Z}^{2n}}}\;P(\bm{\mathbf{m}})\rho
P(\bm{\mathbf{n}})\\\
{\times}\bigg{(}\\!\int_{\mathcal{P}}\\!\\!d^{2n}\bm{\mathbf{v}}\,c\big{(}\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{\bm{\mathbf{m}}},\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{\bm{\mathbf{n}}}\big{)}e^{i\bm{\mathbf{v}}^{T}\Omega(\bm{\mathbf{\ell}}_{\bm{\mathbf{m}}}-\bm{\mathbf{\ell}}_{\bm{\mathbf{n}}})/2}\\!\bigg{)},$
(65)

where we defined the $k$-qubit Pauli operators

$P(\bm{\mathbf{m}})=\bigotimes_{j=1}^{k}i^{m_{i}m_{i+n}}X^{m_{i}}Z^{m_{i+n}}$
(66)

and the matrix

$\Omega=\begin{bmatrix}0_{n}&I_{n}\\\ -I_{n}&0_{n}\end{bmatrix}$ (67)

in block form. Eq. 65 is a straightforward generalization of Eq. 62. Eq. 65
will be the starting point of the rest of our derivations.

###  B.2 Approximating the Entanglement Infidelity

Now we are ready to derive Eq. 26. Given a (trace-preserving) quantum channel
$\mathcal{E}$, we define the $\chi$ matrix of $\mathcal{E}$ as

$\mathcal{E}(\rho)=\sum_{P,P^{\prime}}\chi_{P,P^{\prime}}P\rho P^{\prime},$
(68)

where the sum is over all $n$-qubit Pauli operators. Then, the entanglement
fidelity of the channel is given by

$F_{e}=\chi_{I,I}.$ (69)

Now suppose that we only have access to a non-normalized map
$\tilde{\mathcal{E}}=N\mathcal{E}$ with $\chi$ matrix components
$\tilde{\chi}_{P,P^{\prime}}$, where $N$ is some positive real constant and
$\mathcal{E}$ is trace-preserving. We can still obtain the entanglement
fidelity of $\mathcal{E}$ from $\tilde{\chi}$ using the equation

$\displaystyle F_{e}$
$\displaystyle=\tilde{\chi}_{I,I}\bigg{/}\sum_{P}\tilde{\chi}_{P,P}.$ (70)

In the context of GKP codes, we are interested in finding the entanglement
fidelity (and, hence, the average gate fidelity) of the logical noise channel
associated with the envelope operator $e^{-\Delta^{2}a^{{\dagger}}a}$ followed
by a (trace-preserving) error channel $\mathcal{E}$. We call the composition
of the two maps the noise map
$\mathcal{N}(\rho)=\mathcal{E}(e^{-\Delta^{2}a^{\dagger}a}\rho
e^{-\Delta^{2}a^{{\dagger}}a})$, which is not trace-preserving since the
envelope operator is non-unitary. Importantly, the entanglement fidelity is
not well defined for non-trace-preserving maps, so we instead consider an
“orthonormalized” channel $\mathcal{N}_{\text{o}}$, see Appendix G of Ref.
[24] for one way of defining $\mathcal{N}_{\text{o}}$ from $\mathcal{N}$.
Fortunately, for small $\Delta$, the norm of the approximate encoded state
$\text{tr}(e^{-2\Delta^{2}a^{\dagger}a}\bar{\rho})$ is approximately
independent of the qubit state $\rho$. So, we approximate $\mathcal{N}$ to be
proportional to $\mathcal{N}_{\text{o}}$ with constant of proportionality $N$.
The logical channel $\mathcal{N}_{\text{log},\text{o}}$ associated with
$\mathcal{N}_{\text{o}}$ via Eq. 65 is trace-preserving and has a well-defined
entanglement fidelity $F_{e}$. We can then approximately obtain $F_{e}$ from
the non-trace-preserving logical map $\mathcal{N}_{\text{log}}$ associated
with $\mathcal{N}$ using Eq. 70.

Next, consider any non-normalized CV map $\mathcal{N}$ that is “sufficiently
close to the identity map”. We take this to mean that the characteristic
function $c(\bm{\mathbf{u}},\bm{\mathbf{v}})$ decays sufficiently quickly to 0
as $|\bm{\mathbf{u}}|$ and $|\bm{\mathbf{v}}|$ increase; note that the
characteristic function of the identity map is
$c(\bm{\mathbf{u}},\bm{\mathbf{v}})=\delta^{2n}(\bm{\mathbf{u}})\delta^{2n}(\bm{\mathbf{v}})$.
In particular, we will assume that whenever there is an integral of
$c(\bm{\mathbf{u}},\bm{\mathbf{v}})$, we can ignore any terms where either
$\bm{\mathbf{u}}$ or $\bm{\mathbf{v}}$ lie outside the Voronoi cell
$\mathcal{V}_{\text{stab}}$ of the stabilizer lattice
$\mathcal{L}_{\text{stab}}$.

From Eq. 65, we can write the entanglement infidelity exactly as

$\displaystyle 1{-}F_{e}$ $\displaystyle=\sum_{P\neq
I}\tilde{\chi}_{P,P}\bigg{/}\sum_{P}\tilde{\chi}_{P,P},$ (71a)
$\displaystyle\tilde{\chi}_{P,P}$
$\displaystyle=\\!\\!\sum_{\bm{\mathbf{s}},\bm{\mathbf{t}}\in\mathcal{L}_{\text{stab}}}\\!\\!\\!\\!\bigg{(}\\!\int_{\mathcal{P}}\\!d^{2n}\bm{\mathbf{v}}\,e^{i(\bm{\mathbf{v}}+\bm{\mathbf{\ell}}_{P})^{T}\Omega(\bm{\mathbf{s}}{-}\bm{\mathbf{t}})}$
$\displaystyle\hskip 64.01869pt\times
c(\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{P}{+}\bm{\mathbf{s}},\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{P}{+}\bm{\mathbf{t}})\\!\bigg{)},$
(71b)

where we denote $\bm{\mathbf{\ell}}_{P}$ as any representative of
$\mathcal{L}_{\text{log}}$ such that $T(\bm{\mathbf{\ell}}_{P})$ applies a
logical $P$ to the GKP code; in the single-mode case we simply have
$\bm{\mathbf{\ell}}_{P}=\bm{\mathbf{0}},\bm{\mathbf{\alpha}},\bm{\mathbf{\alpha}}+\bm{\mathbf{\beta}},\bm{\mathbf{\beta}}$
respectively for $P=I,X,Y,Z$.

One could of course numerically evaluate $1-F_{e}$ by using the exact
expression Eq. 71 and truncating the sums over
$\bm{\mathbf{s}},\bm{\mathbf{t}}$ to some finite number; however here we wish
to arrive at a simpler, more intuitive expression for the infidelity. To do
this, note that $c(\bm{\mathbf{v}},\bm{\mathbf{v}}+\bm{\mathbf{s}})$ can be
ignored for any non-zero $\bm{\mathbf{s}}$ since $\bm{\mathbf{v}}$ and
$\bm{\mathbf{v}}+\bm{\mathbf{s}}$ can’t be both in the Voronoi cell
$\mathcal{V}_{\text{stab}}$ of the stabilizer lattice
$\mathcal{L}_{\text{stab}}$. So, we can approximate Eq. 71b as

$\tilde{\chi}_{P,P}\approx\\!\\!\sum_{\bm{\mathbf{s}}\in\mathcal{L}_{\text{stab}}}\\!\int_{\mathcal{P}}\\!d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{P}{+}\bm{\mathbf{s}},\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{P}{+}\bm{\mathbf{s}}),$
(72)

and the denominator of Eq. 71a as

$\sum_{P}\tilde{\chi}_{P,P}\approx\int_{\mathbb{R}^{2n}}\\!d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}}).$
(73)

We can also use Eq. 72 to write the numerator of Eq. 71a as

$\displaystyle\sum_{P\neq I}\tilde{\chi}_{P,P}$
$\displaystyle\approx\sum_{P\neq
I}\,\sum_{\bm{\mathbf{s}}\in\mathcal{L}_{\text{stab}}}\\!\int_{\mathcal{P}}\\!d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{P}{+}\bm{\mathbf{s}},\bm{\mathbf{v}}{+}\bm{\mathbf{\ell}}_{P}{+}\bm{\mathbf{s}}),$
(74a)
$\displaystyle\approx\int_{\mathrlap{\mathbb{R}^{2n}\setminus\mathcal{P}}}\;\;d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}}),$
(74b)

where to go from Eq. 74a to Eq. 74b, we have added the sum

$\sum_{\begin{subarray}{c}\bm{\mathbf{s}}\in\mathcal{L}_{\text{stab}}\\\
\bm{\mathbf{s}}\neq\bm{\mathbf{0}}\end{subarray}}\\!\\!\\!c(\bm{\mathbf{v}}+\bm{\mathbf{s}},\bm{\mathbf{v}}+\bm{\mathbf{s}})$
(75)

which is small since $\bm{\mathbf{v}}+\bm{\mathbf{s}}$ lies outside
$\mathcal{V}_{\text{stab}}$ for any $\bm{\mathbf{v}}\in\mathcal{P}$ 111We note
here that strictly speaking this statement relies on $\mathcal{P}$ (which is
an arbitrary primitive cell of $\mathcal{L}_{\text{log}}$) being contained
entirely within $\mathcal{V}_{\text{stab}}$ (the Voronoi cell of
$\mathcal{L}_{\text{stab}}$), which is true for most cases of interest..

Therefore, to calculate the entanglement fidelity we now simply need to
determine the ratio

$1-F_{e}\approx\int_{\mathrlap{\mathbb{R}^{2n}\setminus\mathcal{P}}}\;d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}})\bigg{/}\\!\\!\int_{\mathbb{R}^{2n}}\\!\\!\\!d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}}),$
(76)

where $\setminus$ denotes the “set-minus” symbol. Alternatively, we can
trivially convert this to the average gate infidelity using Eq. 54, giving

$1-\bar{F}\approx\frac{2^{n}}{2^{n}+1}\int_{\mathrlap{\mathbb{R}^{2n}\setminus\mathcal{P}}}\;d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}})\bigg{/}\\!\\!\int_{\mathbb{R}^{2n}}\\!\\!\\!d^{2n}\bm{\mathbf{v}}\,c(\bm{\mathbf{v}},\bm{\mathbf{v}}),$
(77)

where the prefactor is $2/3$ when $n=1$.

###  B.3 Gaussian Characteristic Functions

To continue our analysis, we assume that the diagonal elements of the
characteristic function take the form

$c(\bm{\mathbf{v}},\bm{\mathbf{v}})\propto
e^{-|\bm{\mathbf{v}}|^{2}/2\sigma^{2}},$ (78)

where we call $\sigma^{2}$ the “variance” of the noise map. Then, for small
$\sigma$, we can apply Eq. 76 to obtain

$1-F_{e}\approx\sigma^{-2n}\\!\int_{\mathbb{R}^{2n}\setminus\mathcal{P}}\\!\frac{d^{2n}\bm{\mathbf{v}}}{(2\pi)^{n}}e^{-|\bm{\mathbf{v}}|^{2}/2\sigma^{2}}.$
(79)

Figure 10: Diagram representing the regions of integration in Eq. 80. There
are six local shortest vectors $\bm{\mathbf{w}}_{1},\dots,\bm{\mathbf{w}}_{6}$
on the boundary $\partial\mathcal{P}$ which each have length
$d_{1}/2,\dots,d_{6}/2$. Due to the $\pi$-rotational symmetry of
$\mathcal{P}$, the vectors $\bm{\mathbf{w}}_{i}$ come in pairs of vectors of
equal length. The approximation of the integral over
$\mathbb{R}^{2n}\setminus\mathcal{P}$ as a sum of integrals in Eq. 80
overcounts the red shaded regions in the figure.

To approximate the integral over $\mathbb{R}^{2n}\setminus\mathcal{P}$ in Eq.
79, we must now consider the geometry of the patch $\mathcal{P}$ and its
boundary $\partial\mathcal{P}$, as depicted in Fig. 10. Consider the length of
each vector $\bm{\mathbf{v}}\in\partial\mathcal{P}$ as one travels around the
boundary $\partial\mathcal{P}$. Label each local minimum in the length of
$\bm{\mathbf{v}}$ as $d_{i}/2$, and the corresponding vector
$\bm{\mathbf{w}}_{i}$. We will call $\\{d_{i}\\}$ the set of local distances
of the patch. Then, the integral Eq. 79 is upper bounded by

$\displaystyle\frac{1}{(2\pi\sigma^{2})^{n}}\\!\\!\int_{\mathrlap{\mathbb{R}^{2n}\setminus\mathcal{P}}}\;\;d^{2n}\bm{\mathbf{v}}\,e^{-|\bm{\mathbf{v}}|^{2}/2\sigma^{2}}$
$\displaystyle<\frac{1}{(2\pi\sigma^{2})^{n}}\sum_{i}\int_{d_{i}/2}^{\infty}\\!\\!dv_{1}e^{-v_{1}^{2}/2\sigma^{2}}\\!\\!\int_{\mathrlap{\mathbb{R}^{2n-1}}}\;\;d^{2n-1}\bm{\mathbf{v}}\,e^{-|\bm{\mathbf{v}}|^{2}/2\sigma^{2}}$
(80)
$\displaystyle=\frac{1}{2}\sum_{i}\mathrm{erfc}\big{(}d_{i}/(2\sqrt{2}\sigma)\big{)},$
(81)

where $\mathrm{erfc}(x)$ is the complementary error function.

One can understand Eq. 80 as follows. The region of integration
$\mathbb{R}^{2n}\setminus\mathcal{P}$ can be written as the union of regions
$\mathcal{R}_{i}=\\{\bm{\mathbf{v}}\in\mathbb{R}^{2n}\mid\bm{\mathbf{v}}^{T}\bm{\mathbf{w}}_{i}>(d_{i}/2)^{2}\\}$.
Each integral in the right-hand side of Eq. 80 is simply an integral of
$e^{-|\bm{\mathbf{v}}|^{2}/2\sigma^{2}}$ over the region $\mathcal{R}_{i}$
where we have performed an orthogonal change of variables such that the
component $v_{1}$ points in the direction of $\bm{\mathbf{w}}_{i}$. Therefore,
the sum of the integrals over each region $\mathcal{R}_{i}$ is greater than
the integral over $\mathbb{R}^{2n}\setminus\mathcal{P}$ as it overcounts any
region of $\mathbb{R}^{2n}$ that is in the intersection of at least two
regions $\mathcal{R}_{i}\cap\mathcal{R}_{j}$ (see Fig. 10). However, the
intersection of these regions is further away from the origin than
$\partial\mathcal{P}$ and their contribution to the integral is exponentially
suppressed. As such, the upper bound in Eq. 80 becomes approximately equal to
the desired integral as $\sigma\rightarrow 0$.

As $\sigma\rightarrow 0$ we can make additional approximations to the sum in
Eq. 81. In particular, we can neglect all the terms in the sum except for when
$d_{i}$ is minimal. We define the distance of the patch

$d=\min_{i}(d_{i})=2\min_{\bm{\mathbf{v}}\in\partial\mathcal{P}}|\bm{\mathbf{v}}|,$
(82)

where the factor of 2 ensures that when $\mathcal{P}$ is the Voronoi cell, the
distance of the patch coincides with the length of the shortest (non-zero)
displacement in the logical Pauli group. We define the degeneracy $a$ of the
patch as half the number of vectors $\bm{\mathbf{v}}\in\partial\mathcal{P}$
with length $d$. Assuming the patch is centered at the origin, $a$ is an
integer. With these definitions, we finally arrive at our entanglement
infidelity estimate

$1-F_{e}\approx a\,\mathrm{erfc}\big{(}d/(2\sqrt{2}\sigma)\big{)},$ (83)

or, equivalently,

$1-\bar{F}\approx\frac{2^{n}a}{2^{n}+1}\mathrm{erfc}\big{(}d/(2\sqrt{2}\sigma)\big{)}.$
(84)

From Eq. 83 we see that three terms contribute to the infidelity of the
logical noise map. First is the variance $\sigma$ of the noise map, which we
calculate for various noise maps of interest below. Since $\mathrm{erfc}$ is a
monotonically decreasing function, reducing $\sigma$ always decreases the
infidelity of the noise map. The other two terms are the distance $d$ and
degeneracy $a$ of the patch $\mathcal{P}$. The distance of the patch is
maximized (and hence the infidelity minimized) when $\mathcal{P}$ is the
Voronoi cell of the GKP lattice, in which case it is equal to the length of
the shortest non-trivial logical Pauli operator of the code. Voronoi cells
typically exhibit more symmetry than arbitrary patches and consequently can
have degeneracies greater than 1.

Finally, a brief note of caution. In some cases, the approximation of Eq. 81
as Eq. 83 is not very good because the distance $d$ is not much smaller than
the next smallest local distance $d_{i}$. While Eq. 83 will still hold
asymptotically, it may only provide a good approximation for very small
$\sigma$. In these cases, it is best to simply use Eq. 81 to estimate the
infidelity. Moreover, Eq. 81 has the advantage that it is always an upper-
bound on the integral Eq. 79. If the patch $\mathcal{P}$ is the Voronoi cell
of some lattice $\mathcal{L}$, then finding the set of local distances
$\\{d_{i}\\}$ amounts to finding the lengths of all the Voronoi-relevant
vectors of $\mathcal{L}$, for instance using the algorithms presented in Ref.
[47].

###  B.4 Envelope Operator

We spend the rest of this appendix using Eq. 83 to calculate the entanglement
infidelities of various noise maps of interest. To start, we consider the
errors arising only from the approximate codewords themselves; i.e. we choose
the noise map $\mathcal{N}(\rho)=e^{-\Delta^{2}a^{{\dagger}}a}\rho
e^{-\Delta^{2}a^{{\dagger}}a}$. The characteristic function is given by

$c(\bm{\mathbf{u}},\bm{\mathbf{v}})\propto\mathrm{exp}\bigg{(}\\!{-}\frac{1}{4}\coth(\Delta^{2}/2)\big{(}|\bm{\mathbf{u}}|^{2}+|\bm{\mathbf{v}}|^{2}\big{)}\\!\bigg{)},$
(85)

where the constant of proportionality is irrelevant since it is canceled in
the ratio Eq. 76. The diagonal elements $c(\bm{\mathbf{v}},\bm{\mathbf{v}})$
therefore take the form of Eq. 29 with variance
$\sigma^{2}=\mathrm{tanh}(\Delta^{2}/2)\approx\Delta^{2}/2$. As such we can
immediately apply this to Eq. 83 to obtain the entanglement infidelity of the
trace-preserving logical map $\mathcal{N}_{\text{log},\text{o}}$ as

$1-F_{e}\approx a\,\mathrm{erfc}(d/2\Delta),$ (86)

which directly gives Eq. 17.

Figure 11: Comparison between the theoretical estimated average gate fidelity
from Eq. 17 and the numerically calculated average gate fidelity from Fig. 3,
under the assumption of ideal error-correction. Estimated and numerical
average gate infidelity $1-\bar{F}_{A,\mathcal{V}_{\mathcal{L}},\Delta}$ of
(a) single-qubit, and (b) two-qubit Clifford gates $A=I,S,S^{2},C_{Z}$ applied
to the square and hexagonal GKP codes, decoded over the Voronoi cell
$\mathcal{V}_{\mathcal{L}}$ of their respective lattices. Note that for the
hexagonal $C_{ZZ}$ plots in (b) and (d), a limited number of data points are
included due to the time taken to run the simulations.

Eq. 86 is a useful equation to test the validity of our approximations over
various patch geometries. In Fig. 11 we compare the estimated average gate
infidelities from Eq. 86 with the numerical average gate infidelities as