Stabilizer subsystem decompositions for single- and multi-mode Gottesman-Kitaev-Preskill codes

The Gottesman-Kitaev-Preskill (GKP) error correcting code encodes a finite dimensional logical space in one or more bosonic modes, and has recently been demonstrated in trapped ions and superconducting microwave cavities. In this work we introduce a new subsystem decomposition for GKP codes that we call the stabilizer subsystem decomposition, analogous to the usual approach to quantum stabilizer codes. The decomposition has the defining property that a partial trace over the non-logical stabilizer subsystem is equivalent to an ideal decoding of the logical state. We describe how to decompose arbitrary states across the subsystem decomposition using a set of transformations that move between the decompositions of different GKP codes. Besides providing a convenient theoretical view on GKP codes, such a decomposition is also of practical use. We use the stabilizer subsystem decomposition to efficiently simulate noise acting on single-mode GKP codes, and in contrast to more conventional Fock basis simulations, we are able to to consider essentially arbitrarily large photon numbers for realistic noise channels such as loss and dephasing.

From a theoretical perspective, bosonic codes can be understood as defining a logical subspace L of the CV Hilbert space H = L ⊕ L * , with the infinite dimensional Hilbert space L * providing the redundancy required for error correction.However, in the case of GKP codes, the non-normalizability of the codewords [10] means that the GKP logical "subspace" is formally not in the CV Hilbert space.
An alternative formulation, which can be applied to any error correcting code, is to consider a decomposition of the Hilbert space such that the logical information in the error correcting code forms a subsystem H = L ⊗ S [16,17].In such a decomposition, the partial trace over the non-logical subsystem corresponds to a decoding map H → L. In Ref. [18], Pantaleoni et al. introduced the concept of a bosonic subsystem decomposition, and defined a subsystem decomposition for single-mode GKP codes based on a modular quadrature.This subsystem decomposition has been used in numerical studies of GKP codes [19][20][21][22].
The subsystem decomposition is, however, not unique and there are good reasons to investigate alternatives.Specifically, the subsystem decomposition of Ref. [18] has lower symmetry than the GKP code itself: the logical subsystem differs if one chooses position or momentum as the "modular quadrature."More recent work [23] has also linked the modular position subsystem decomposition to the Zak basis [24].In all of these cases the decomposition does not represent the logical information one would retrieve by performing noiseless decoding of the GKP code [23].
In this work, we introduce a subsystem decomposition that resolves these issues.In particular, this new decomposition has the desirable property that tracing over the non-logical subsystem S corresponds to a noiseless decoding map for the GKP code.We refer to this decomposition as the GKP stabilizer subsystem decomposition, as different stabilizer eigenstates correspond to orthogonal basis states of the subsystem S. The stabilizer subsystem decomposition for GKP codes is entirely analogous to the stabilizer/destabilizer formalism of qubit codes [25].
The stabilizer subsystem decomposition can be applied to all multi-mode qubit or qudit GKP codes (including the concatenation of GKP and qubit stabilizer codes), and is closely related to the Zak basis [24].For any GKP encoding, we show how to write an arbitrary CV state in the corresponding stabilizer subsystem decomposition from the position wavefunction of the state.We use the subsystem decomposition to provide a description of logical Clifford gates on the subsystem decomposition, and show that an ideal implementation of a logical Clifford gate can propagate errors unless a modified round of decoding is performed immediately after the gate.
One practical challenge with GKP codes is the difficulty of numerically simulating GKP codes using a truncated Fock basis, since both the mean and variance of the photon number distribution of physically realizable arXiv:2210.14919v3[quant-ph] 9 Jan 2024 GKP codestates increases as the codestates approach the infinitely squeezed "ideal" codewords.Logical gates can also increase the photon number of the codestates, providing a further need to find new numerical methods to efficiently store and manipulate GKP states [26].
Using the stabilizer subsystem decomposition we are able to study realistic noise channels such as loss and white-noise dephasing for essentially arbitrary photon numbers.In the case of the single-mode square GKP qubit code our treatment is analytical.We find that GKP codes are far more resilient against pure loss than against dephasing: a square single-mode code state with ten decibels of GKP squeezing achieves an average gate infidelity below 10 −3 for a loss rate up to ∼4%, while it can only tolerate a dephasing rate of ∼0.2% to achieve the same fidelity.In the case of pure-dephasing, i.e. with white-noise dephasing as the only noise channel, there is a threshold value for the GKP squeezing value and dephasing rate for the GKP code to "break even", as the GKP code only performs better than a qubit defined using Fock states |0⟩ and |1⟩ given the GKP squeezing is above 10 dB and simultaneously the dephasing rate is below 0.1%.We also find that for both pure loss and pure dephasing, there is an optimal finite photon number that minimizes the logical error rate, which is much larger for loss than for dephasing at the same rate, qualitatively consistent with the results of [13,27] Our results are organized as follows.Beginning in Section II, we present the stabilizer subsystem decomposition for the single-mode square GKP qubit code.Readers wishing to quickly learn the key concepts in the paper can safely begin by reading only Section II, since it provides a simple explanation of most of the results in the rest of the paper.Then in Section III, we provide an overview of the established formalism of multi-mode GKP lattices and set up the notation we will use in the remainder of the manuscript.In Section IV, we define the stabilizer subsystem decomposition in the general case and show that the partial trace over the stabilizer subsystem corresponds to noiseless decoding.In Section V, we show how to transform the states of the stabilizer subsystem decomposition of one GKP code to any other code, and describe the method to write the subsystem "wavefunction" of a state in terms of its position wavefunction.Finally, we show how to write many practical components of GKP codes conveniently in the stabilizer subsystem decomposition, namely logical Clifford gates (Section VI), approximate GKP codewords, and noise channels such as pure loss, Gaussian displacements and white-noise dephasing (Section VII).Readers focused on applying the stabilizer subsystem decomposition to model noise can safely skip Sections III to VI and go straight to Section VII.We provide concluding remarks in Section VIII.

II. STABILIZER SUBSYSTEM DECOMPOSITION FOR THE SQUARE GKP QUBIT CODE
We begin by constructing the stabilizer subsystem decomposition in the simplest non-trivial case: the singlemode square GKP qubit code.To define the subsystem decomposition in Eqs.(8), (15) and (17), we will make use of the Zak states [24], and provide the intuition for why the stabilizer subsystem decomposition accurately describes the GKP logical information stored in an arbitrary state.Then we will outline the key properties of the decomposition in Section II C, including examples of states and operators decomposed in the subsystem decomposition.In doing so, we foreshadow the numerical techniques for simulating GKP codes that we develop in more detail in Section VII.

A. Preliminaries
The square GKP qubit code encodes a qubit into a single-mode continuous-variable (CV) Hilbert space H, which is described by position and momentum operators that satisfy [q, p] = i.We define the displacement operators for v 1 , v 2 ∈ R, which form an operator basis of L(H), the space of all linear operators acting on H.The displacement operators obey the commutation relation where A, B = ABA −1 B −1 is the group commutator, and the composition rule Ŵ (v 1 , v 2 ) "displaces" the position and momentum operators such that Note that Eqs.(1) and (4) differ by a factor of √ π from the more standard definition D(α) = exp αâ † − α * â .The square GKP qubit code is a stabilizer code with stabilizer group generated by the commuting displacement operators along with their inverses.The logical Pauli group is generated by which anticommute with each other but commute with the stabilizer generators.The ideal codespace is the simultaneous +1-eigenspace of both stabilizer generators, and is spanned by the ideal codestates where |x⟩ q is the x-eigenstate of the position operator q.
A particularly useful set of states for describing GKP codes is the Zak basis [24], and was first applied to GKP codes in Ref. [28].The Zak states are parameterized by two real numbers, k 1 and k 2 , and are given in the position basis by 2πa 2 e iπk1k2 s∈Z e 2iπak2s √ 2π(k 1 + as) q , (8) where a > 0 is a constant.Note that we have rescaled some of the constants in our definition compared to Ref. [24].We can interpret the (rescaled) parameter √ 2πk 1 as the quasi-position of the Zak state in the following sense: since a given Zak state has support on position eigenvalues spaced by √ 2πa, each Zak state is an eigenstate of the modular-position operator q (mod √ 2πa), with eigenvalue √ 2πk 1 .Likewise, it can be shown that √ 2πk 2 represents the quasi-momentum of the Zak state corresponding to the modular-momentum operator p (mod √ 2π/a).The full set of Zak states with k 1 , k 2 ∈ R span H but are not linearly independent, obeying the quasi-periodic boundary conditions As a result, the Zak states only form a non-overcomplete basis of H when k 1 is restricted to an interval of length a and k 2 to an interval of length 1/a.Moreover, the Zak basis is orthonormal, satisfying as long as k 1 and k 2 are restricted as above.
An alternative formulation of the Zak states is to define |0, 0⟩ a as the unique simultaneous +1-eigenstate of the displacements Ŵ (a, 0) and Ŵ (0, 1/a).The remaining Zak states are then given by the property Setting a = √ 2, we observe that the |0, 0⟩ √ 2 Zak state is a simultaneous +1-eigenstate of the GKP operators Ŝ1 and Z, so we can write The remaining a = √ 2 Zak states can be viewed as displaced GKP codestates.

B. Stabilizer Subsystem Decomposition for the GKP Code
To define the stabilizer subsystem decomposition we first define the stabilizer subspaces V k1,k2 , each of which is a simultaneous eigenspace of the stabilizer generators Ŝ1 , Ŝ2 .In particular, we define V k1,k2 as the set of states |ϕ⟩ ∈ H satisfying for With this connection to Zak states we can see that the union of subspaces V k1,k2 for k 1 , k 2 ∈ −2 −3/2 , 2 −3/2 spans the full Hilbert space H.
Since each stabilizer subspace V k1,k2 is twodimensional, we can define a qubit within each subspace labelled by the orthonormal stabilizer states |µ, k 1 , k 2 ⟩, where µ = 0, 1.The naïve way to do so would be to define the 12) and Fig. 1.
However, we want to ensure that the qubit state represents the GKP logical information stored in the state.In particular, we impose the defining property of the stabilizer states that To see the importance of Eq. ( 14), consider performing a round of ideal GKP error correction on the state |ψ, k 1 , k 2 ⟩ as follows.First, we measure the stabilizer generators, which reveals the values of k 1 and k 2 via Eq.(13).Then, we apply the displacement Ŵ (k 1 , k 2 ) † that returns the state to the ideal codespace.With this definition, we ensure that the qubit information |ψ⟩ in the state |ψ, k 1 , k 2 ⟩ is the same as the logical information one would obtain by performing an ideal round of errorcorrection and reading out the resultant ideal codestate.Equivalently, this enforces that the partial trace over the stabilizer subsystem correspond to an ideal GKP decoding map, as we show in Section IV D. Strictly enforcing Eq. ( 14) is, in fact, the key difference between our subsystem decomposition and previous definitions [18].
Enforcing Eq. ( 14) gives the stabilizer states in terms of Zak states The additional e iπk2/ √ 2 phase on the definition of |1, k 1 , k 2 ⟩ arises from the differing geometric phases in the definition of the Zak states Eq. ( 11) and the stabilizer states Eq. ( 14): This phase has two additional consequences.First, it ensures that all the logical Pauli operators act as a tensor product between the logical and stabilizer subsystems, as we will see in Section II C 3. A similar result is described in Ref. [29].Second, the phase ensures that the full symmetry of the square GKP code is preserved in the subsystem decomposition.
It is also interesting to compare Eq. ( 15) with the Zakbasis representation of the modular-position subsystem decomposition [18,23].Once a rescaling of k 1 , k 2 is taken into account, the only difference between the two decompositions is the k 2 -dependent phase (see Appendix A).In this sense the stabilizer subsystem decomposition for the single-mode square GKP qubit code can be thought of as a "rephasing" of the modular-position subsystem decomposition that symmetrizes the treatment of position and momentum.
The states |µ, k 1 , k 2 ⟩ form a basis for µ = 0, 1 and so we can define a subsystem decomposition where L is the logical subsystem and S is the stabilizer subsystem.Similar to results obtained in [18], L is a two-dimensional subsystem while S is isomorphic to the full Hilbert space H by associating the stabilizer subsystem basis states For this reason we call the basis of the stabilizer subsystem |k 1 , k 2 ⟩ the Zak basis of S. We note here for clarity that the stabilizer subsystem decomposition Eq. ( 17) applies to the square GKP code, which is a stabilizer code and not a "subsystem code" in the sense of Ref. [30].
It is worth briefly reiterating why the subsystem decomposition Eq. ( 17) is non-trivial.The key feature of the stabilizer subsystem decomposition is that the state in the logical subsystem is the information one would obtain if one performed a round of ideal quantum error correction and logical read-out.This feature is enforced by Eq. ( 14) and appears as a state-dependent e iπk2/ √ 2 phase when defining the subsystem basis states in terms of Zak states, see Eq. (15).We can use the connection to error correction to justify the use of the stabilizer subsystem decomposition in the analysis of GKP codes, as we will now do in the rest of the manuscript.

C. Properties
Now that we have defined the stabilizer subsystem decomposition for the square GKP code, we outline its key properties.We begin by presenting the quasi-periodic boundary conditions of S in Section II C 1, which provide an intuitive picture of how uncorrectable errors on the oscillator cause logical errors in the logical subsystem L. In Section II C 2, we provide examples of states decomposed into the subsystem decomposition.In particular, the decomposition of approximate GKP codestates follows a simplified version of the general method developed in Section VII for numerical simulations of GKP codestates.Finally in Section II C 3, we decompose examples of operators, including logical Clifford operators, into the subsystem decomposition, and discuss how operators that do not decompose into tensor products can spread errors in the GKP code.

Boundary Conditions
We begin by noting that the stabilizer states |µ, k 1 , k 2 ⟩ obey quasi-periodic boundary conditions given by where here ⊕ denotes addition mod 2. These are analogous to the Zak state boundary conditions Eq. ( 9), except that the boundary conditions also affect the logical information.In particular, Eq. (18a) applies a Pauli X operator to the logical information while Eq.(18b) applies a Pauli Ẑ.
For illustrative purposes, consider a toy error model consisting of a random walk of displacement errors applied to an ideal square GKP codestate | ψ⟩, as depicted in Fig. 1.The logical information in the state remains unchanged as long as the random walk does not cross a boundary, i.e. while the error remains correctable.Once it crosses a boundary, applying Equation (18a) or (18b) causes a logical Pauli operator to be applied to the logical subsystem, corresponding to a logical error on the state, reflecting the fact that the correctable error has now become uncorrectable.The applied logical Pauli operator is identical to the logical error that would be applied if an ideal decoder acted on the displaced codestate.

States
Arbitrary single-mode CV states can be decomposed into the square subsystem decomposition using Equations (8) and (12).For example, ideal GKP codestates |μ⟩ sq = |µ⟩⊗|0, 0⟩ are tensor product states by definition.Position eigenstates |x⟩ q and momentum eigenstates |x⟩ p are also tensor product states given by where we decompose ), and we Intuitively, the position eigenstate |x⟩ q corresponds to a product state with logical subsystem state |0⟩ (|1⟩, respectively) if x rounds to an even (odd) multiple of √ π.
Similarly, the momentum eigenstate |x⟩ p corresponds to a product state with logical subsystem state |+⟩ (|−⟩, respectively) if x rounds to an even (odd) multiple of √ π.
In contrast, approximate codestates are "entangled" across the two subsystems.We define approximate codestates by | ψ∆ ⟩ ∝ e −∆ 2 â † â | ψ⟩ with constant of proportionality such that | ψ∆ ⟩ is normalized, and where e −∆ 2 â † â is the non-unitary envelope operator.To find the analytical form of | ψ∆ ⟩ in the subsystem decomposition, we first utilize the characteristic function of the envelope operator (see Appendix F) With the envelope operator written in this form it is straight-forward to apply it to an ideal codestate |ψ⟩ ⊗ |0, 0⟩ using Eq. ( 14).However, since the integral in Eq. ( 20) is over v 1 , v 2 ∈ R, we must apply the boundary conditions Eq. ( 18) to obtain a valid subsystem decomposition, giving where P (s) = e iπs1s2/2 Xs1 Ẑs2 , the region of integration is v 1 , v 2 ∈ −2 −3/2 , 2 −3/2 , and we have written v = (v 1 , v 2 ).Note that the boundary conditions introduce logical Pauli operators acting on the logical subsystem, reflecting the fact that the envelope operator introduces errors on the ideal codestate.
To quantify the logical information stored in a state, we can apply the partial trace over S, which gives an expression of the form We derive Eq. ( 22) and provide the analytical form of I ∆ s,t in Appendix C due to the length of the equations.
To numerically evaluate Eq. ( 22) we can truncate the infinite sums over s, t ∈ Z 2 , which is justified as long as |I ∆ s,t | → 0 sufficiently fast as |s|, |t| → ∞.Importantly, numerically evaluating Eq. ( 22) also becomes easier as ∆ → 0 since |I ∆ s,t | converges to zero faster as ∆ becomes small, requiring fewer terms in the sum to be included.Intuitively, this is because the characteristic function of the envelope operator Eq. ( 20) decays exponentially away from the origin, and the rate of decay increases as ∆ → 0.
In Fig. 2, we plot the logical state given by Eq. ( 22), where we have quoted ∆ in decibels using the formula ∆ dB = −10log 10 (∆ 2 ).In the limit ∆ → 0, the approximate codestate | ψ∆ ⟩ approaches the ideal GKP codestate | ψ⟩ and its partial trace approaches the pure state |ψ⟩.In the limit ∆ → ∞, e −∆ 2 â † â → |0⟩⟨0|, the projector onto the vacuum state, and as such | ψ∆ ⟩ → |0⟩.In the square code, the logical information stored in the vacuum state is a mixed state which lies outside the stabilizer octahedron, and has been shown to be distillable to a magic state [31].
In fact, as we show in Section VII, the procedure we have just followed to obtain the partial trace of | ψ∆ ⟩ can be generalized to apply quantum channels E to ideal GKP codestates.In particular, one needs to obtain the characteristic function of the map, apply the boundary conditions of the code, and then take the partial trace.The resulting object is an effective logical channel that reflects the change in logical information stored in the state under the action of E.Moreover, the logical channel can be obtained numerically by truncating each of the infinite series that arise from the boundary conditions so long as the characteristic function of the channel tends to zero sufficiently fast.The details and results of this method are discussed in more detail in Section VII.

Operators
We can also decompose arbitrary CV operators into the subsystem decomposition.In order to do so, we first define the stabilizer subsystem operators k1 , k2 , which act on the Zak basis states |k 1 , k 2 ⟩ ∈ S via Since k1 and k2 are simultaneously diagonalizable we also have [ k1 , k2 ] = 0.Moreover, the eigenvalues of k1 , k2 lie in the range (−2 −3/2 , 2 −3/2 ]. From Eq. ( 13), we see that the stabilizer generators are product operators that act trivially on the logical subsystem: The operators √ 2π k1 = q (mod √ π) and √ 2π k2 = p (mod √ π) can also be interpreted as modular quadrature operators.
It is straightforward to show directly that logical Pauli operators decompose to tensor products given by where X, Z are logical Pauli operators acting on H while X, Ẑ are Pauli operators acting on L ∼ = C 2 .Note that the non-trivial action of X, Z on the stabilizer subsystem is necessary for them to satisfy the identities X2 = Ŝ1 , Z2 = Ŝ2 .When a logical Pauli operator is applied to a state, the logical subsystem is transformed exactly by the corresponding Pauli operator, and the distribution of the state in the stabilizer subsystem is unchanged since e − √ 2iπ k2 only multiplies each Zak basis state by a phase.As such, X and Z can be considered as ideal Pauli operators when acting as a gate.
When considered as a measurement operator however, the phase on the stabilizer subsystem can affect the measurement outcome.In particular, the phase ensures that the spectrum of X, Z is indeed the set of modulus 1 complex numbers, consistent with the fact that displacements are unitary but not Hermitian operators.Alternatively, one can define the Hermitian and unitary ideal Pauli measurement operators Xm = X ⊗ Î and Ẑm = Ẑ ⊗ Î.These operators can in theory be measured by performing an ideal round of error correction and then performing a measurement of the original Pauli operators X, Z, since k 1 , k 2 = 0 in the ideal codespace.We note that such a measurement is impossible in practice as the ideal round of error correction requires the preparation of an ideal GKP codeword.It is interesting to note that the measurement operators Xm , Ẑm do not, in general, coincide with "binned quadrature operator" measurements, which we discuss in more detail in Appendix B.
Unlike logical Pauli operators, displacements are not tensor product operators in the subsystem decomposition in general.As an example, consider the displacement Ŵ (2 −3/2 , 0) = e −i √ π p/2 = √ X, which acts on states in the subsystem decomposition as Note that the states with k 1 > 0 have been mapped over the X-boundary [Eq.(18a)], while the remaining k 1 ≤ 0 states have not.√ X is thus an entangling operator across the subsystem decomposition.
For the square code, the Fourier transform operator e iπâ † â/2 is a tensor product operator given by where Ĥ = ( X + Ẑ)/ √ 2 is the Hadamard operator, and ticlockwise by π/2.This reflects the fact that e iπâ † â/2 = H is a logical Hadamard operator on the square GKP code, and demonstrates that the stabilizer subsystem decomposition is symmetric in q and p.
However, logical Clifford gates are not tensor product operators in general.For example, consider the logical phase gate S = e iq 2 /2 , which implements the gate Ŝ = diag (1, i).It is straightforward to show from Eqs. ( 9), (11) and (15) that where µ = 0, 1.Therefore, S acts as an ideal phase gate only on Zak basis states |µ, States lying outside this range incur an additional Z logical error due to the boundary condition Eq. (18b).In particular, we have In Section VI we show that logical Clifford gates by default do not act as tensor product acting on general GKP codes, including two-qubit gates such as the logical controlled-NOT and controlled-Z gates acting on the square GKP code.Indeed, only a few special Clifford gates do in fact decompose as tensor products, such as the Hadamard gate in the square GKP code and the permutation gate Ĥ Ŝ † in the hexagonal GKP code.Intuitively, a Clifford gate will decompose as a tensor product operator only if it does not deform the decoding "primitive cell" of the code, an idea that we discuss more formally in Sections V and VI.
In the remainder of the paper, we generalize the stabilizer subsystem decomposition to general multi-mode GKP codes (Sections III and IV), and describe in more detail the applications of the subsystem decomposition to Clifford gates (Section VI) and the modelling of noise (Section VII).Readers that are only interested in modelling noise can skip Sections III to VI and resume reading at Section VII.

III. GENERAL GKP CODES
Now that we have introduced the stabilizer subsystem decomposition for the square GKP qubit code, we discuss the generalization of the stabilizer subsystem decomposition to general multi-mode GKP qudit codes in the following three sections.In this section, we introduce the notation we will use throughout the rest of the paper, and review the properties of multi-mode GKP codes.Then in Section IV we define the stabilizer subsystem decomposition in general.We provide a method of decomposing arbitrary CV states into a general stabilizer subsystem decomposition in Section V, before moving on to applications of the stabilizer subsystem decomposition in the remainder of the paper.

A. Preliminaries
We start with a discrete-variable system consisting of the tensor product of n finite-dimensional Hilbert spaces each with dimension d j , j = 1, . . ., n, which we write as a single vector d = (d 1 , . . ., d n ).We will allow for d j = 1 for any of the dimensions, which we refer to as a "qunaught" since no logical information can be stored in the system.The Hilbert space of the system, H d = (30b) From now on we will no longer explicitly write (d) to indicate the dimension of the Pauli operators.For a general Pauli operator acting on the whole system H d we use the notation where s ∈ Z 2n , c.f. P (s) as in Eq. ( 21).We allow every component of the vector s = (s 1 , . . ., s 2n ) to be an integer with unrestricted range for later convenience.Because of this, the Pauli operators Pd (s) and Pd (s ′ ) may be identical even if s ̸ = s ′ .Next, consider a CV system consisting of n modes with Hilbert space H.Such a system can be described by n position and momentum operators, which we write in a column vector ξ = [q 1 • • • qn p1 • • • pn ] T .These obey the canonical commutation relations [q j , pj ′ ] = iδ jj ′ .
We define the n-mode displacement operators for v ∈ R 2n , where defines the standard symplectic bilinear form u T Ωv in R 2n .The displacement operators obey the commutation relation c.f. Eqs. ( 1) and (2).Moreover, they "displace" the position and momentum operators such that c.f. Eq. ( 4), where on the left-hand side the displacement operators are acting component-wise on the vector ξ.
We define the n-mode Zak states where a = (a 1 , . . ., a n ) is a list of constants a j > 0. Each Zak state is a simultaneous eigenstate of the displacement operators Ŵ (a j e j ) and Ŵ (e n+j /a j ) for j = 1, . . ., n, where e J ∈ R 2n is the vector with a 1 in the J-th component and 0's elsewhere.Restricting each component k j to an interval of length a j and each component k j+n to an interval of length 1/a j forms a basis of Zak states.We also consider Gaussian unitary operators ÛS that are parameterized by a 2n × 2n real symplectic matrix S with S T ΩS = Ω.The action of a Gaussian unitary on the position and momentum operators is defined as the linear transformation Given a symplectic matrix S, the operator ÛS can be found from the unitary metaplectic representation of S [32,33].Every Gaussian operator ÛS can be written as the product of unitaries generated by Hamiltonians quadratic in ξ.Alternatively, we can interpret S as defining a canonically transformed set of modes Ξ = S −1 ξ such that we can write ÛS Ŵ (v) Û † S = Ŵ (Sv) = exp( √ 2πi ΞT Ωv).

B. Multi-mode GKP encodings
We can now introduce multi-mode qudit GKP codes, which encode a discrete variables system H d consisting of k qudits and k − n qunaught states into an n-mode continuous variables system H.To specify the GKP encoding we provide two pieces of information (Σ, d), where Σ is a 2n × 2n real symplectic matrix, and d is a list of dimensions of length n consisting of k elements that are integers greater than or equal to 2 and n − k elements equal to 1. Together, they specify a set of 2n mutually commuting stabilizer generators FIG. 3. A circuit representing the encoding of k qudits into an ideal GKP code described by (Σ, d).On the left-hand side, a state is described in the Hilbert space H d consisting of a tensor product of k qudits and k − n qunaught states.
The qudits are encoded first into the ideal codespace of n independent square GKP codes (each labelled sq), followed by a Gaussian unitary operator ÛΣ.
where (Σ) J is the J-th column of Σ, such that the set of operators ŜJ and Ŝ † J generate the stabilizer group.Note our index convention of using j when the index runs from 1 to n, and J when the index runs from 1 to 2n.Also note that the (mod n) in Eq. ( 38) is needed only due to our definition of d being length n (and not 2n).The codespace is defined by the simultaneous +1-eigenspace of the stabilizer generators.We define the logical Pauli operators where mJ = m J /d J (mod n) .We use the bar in the notation mJ both to denote that the vector mJ is "dual" to the vector m J (in the lattice sense, as will be explained below), and to remind the reader that Ŵ ( mJ ) corresponds to a logical Pauli operator.Note that on the qunaught modes where d j = 1 the logical Pauli operators Zj and Xj coincide with the stabilizers Ŝj and Ŝj+n .As an illustrative example, consider the case of a single qudit with dimension d encoded in a single-mode square GKP code.The parameters for this encoding are Σ sq , (d) , with Σ sq = I 2 , such that the stabilizers and logical Paulis are simply where e 1 = [1, 0] T and e 2 = [0, 1] T .The encoding is called square because of the square lattice generated by One way to understand a general multi-mode GKP encoding defined by arbitrary (Σ, d) is as follows.Since Σ is a symplectic matrix, it defines a new set of canonically transformed modes which we refer to as the logical modes.Written in terms of the logical modes, the stabilizer generators and logical Paulis take the form which we recognize as n independent square-GKP encodings into the logical modes qj , pj .This picture is illustrated in Fig. 3, where k qudits and n−k qunaught states are first encoded into n square-lattice logical GKP modes, before applying a unitary Gaussian transformation ÛΣ .
To clarify the role of the qunaught states, note that the corresponding logical mode is constrained to a unique state that could equivalently be defined as the +1 eigenstate of Z for a square lattice GKP code with arbitrary d.The qunaught modes thus play precisely the same role as stabilizers in conventional qudit stabilizer codes [30], and can be used to provide additional protection against errors.A special case is when ÛΣ can be decomposed into a tensor product of single-mode Gaussian unitaries, followed by a logical Clifford circuit acting on the encoded GKP qudits.This case can be understood as a concatenation of n single-mode GKP codes with a conventional discrete qudit stabilizer code.For example, the GKPsurface code [34,35] belongs to this class, where there are n physical modes and n − 1 logical qunaught modes (corresponding to the surface code stabilizer generators), leaving a single logical GKP mode encoding a qubit with d = 2.

C. GKP lattices and primitive cell decoding
A useful way of understanding multi-mode GKP codes is with lattice theory, which was first applied to GKP codes in Refs.[10,36] and revisited recently in Refs.[37,38].We define the GKP lattice which we say is generated by the vectors m J .Λ has the property that Ŵ (ℓ) is a stabilizer (up to a ±1 phase) for every ℓ ∈ Λ.The symplectic dual lattice of Λ is defined by Λ is generated by the dual vectors mJ and has the property that Ŵ l is a (possibly trivial) logical Pauli operator for every l ∈ Λ.For example, the single-mode square qudit code defined in Eq. ( 40) has GKP stabilizer lattice Conversely, if one starts with a lattice Λ which defines a GKP code, one can always find the corresponding pair (Σ, d).For the lattice Λ to define a GKP code, it must be full-rank and symplectic, i.e. ℓ T Ωℓ ′ ∈ Z, ∀ ℓ, ℓ ′ ∈ Λ.For consistency with previous literature [10,[36][37][38], we define the lattice generator matrix M whose rows are m T J .There is freedom in the choice of matrix M (or, equivalently, the generators m J ) for the lattice Λ; in particular, left-multiplication of any integral unimodular matrix N transforms M → N M via row operations that preserve the lattice.Each choice of M corresponds to a different choice of stabilizer generators, but not all of these choices of stabilizer generator can be expressed in terms of logical modes ξ as in Eq. ( 41).To solve this issue, one can always use Gaussian elimination to find a generator M written in standard form such that M T = ΣD 1/2 for a symplectic matrix Σ and diagonal matrix D = diag(d, d), which provide the parameters in our original description (Σ, d).We note that the standard form of M , and equivalently the choice of Σ, is not unique for a given lattice Λ.However, specifying Σ fixes the choice of stabilizer generators ŜJ and the labelling of each logical Pauli operator.
The lattice perspective of GKP codes also provides a convenient description of GKP decoding in terms of primitive cells of the dual lattice.We define a primitive cell P of the dual lattice Λ as any subset P ⊂ R 2n satisfying the property that any vector v ∈ R 2n can be uniquely written as where l ∈ Λ and {v} P ∈ P.
To perform an ideal round of GKP error correction, one first measures the eigenvalues of each stabilizer generator Ŵ (m J ), giving a complex measurement outcome.By introducing a vector v ∈ R 2n , we can write the set of measurement outcomes as exp(2iπv T Ωm J ) for each stabilizer.However, the choice of v is unique only up to the addition of vectors in the dual lattice.As such, to uniquely assign a displacement that returns the state to the codespace, one must choose a primitive cell P of Λ, such that v can be written uniquely as v = l + {v} P for l ∈ Λ and {v} P ∈ P.
The choice of P defines a decoder, in which we pick the unique vector v = {v} P ∈ P that reproduces the syndrome e 2iπv T Ωm J and perform the correction Ŵ (v) † , returning the state to the ideal codespace.The canonical choice of P is given by the Voronoi cell V( Λ) of the dual lattice, which contains the set of points closer to the origin than any other point in the lattice.However, other choices of P can be made, for example, to account for the effects of logical Clifford gates (Section VI) and maximum likelihood decoding [37].

IV. STABILIZER SUBSYSTEM DECOMPOSITION
In this section, we describe how to construct the stabilizer subsystem decomposition for arbitrary multi-mode GKP codes.We do this by first defining the stabilizer states |µ, k⟩ (Σ,d) , which are labelled by two variables µ ∈ n j=1 Z dj (a dit-string label) and k ∈ R 2n , where the former represents logical information and the latter the stabilizer eigenvalues.The stabilizer states span the Hilbert space H, but are not linearly independent, so we limit the range of k to a subset of R 2n such that the resulting states form a linearly independent basis.We can then define a subsystem decomposition between the logical L and stabilizer S labels.Finally, we outline two key features of the decomposition: the decomposition of stabilizers and logical Paulis as tensor product operators, and the correspondence of the partial trace to a noiseless primitive cell decoding of the GKP code.A practical example of the general framework is provided in Appendix D.

A. Stabilizer States
We begin by stepping through the definition of the stabilizer states.For any pair of parameters (Σ, d), we define the state |0 n , 0 2n ⟩ (Σ,d) as the simultaneous +1eigenstate of the stabilizer group and each logical Pauli Ẑ operator Zj for j = 1, . . ., n, which corresponds to the ideal GKP state encoding the codeword |0⟩ ⊗n .
We call the states |µ, k⟩ (Σ,d) stabilizer states due to the property: where we recall that ŜJ = Ŵ (m J ) is a stabilizer generator of the code [Eq.(38)].In other words, the subspace is the simultaneous eigenspace of the stabilizers ŜJ with eigenvalues exp 2iπk T Ωm J respectively.The stabilizer states span the Hilbert space but are not linearly independent, obeying the quasi-periodic boundary conditions: where the addition µ + e j in Eq. ( 51a) is taken mod d j on each of its components.Comparing to Eq. ( 30), one can interpret Eq. (51a) as applying a logical X to the qudit label µ and a k-dependent phase to the stabilizer label upon application of the boundary condition, while Eq.(51b) applies a logical Ẑ to µ along with a k-dependent phase.

B. The Subsystem Decomposition
To obtain a non-overcomplete basis of H from the stabilizer states, we must restrict k to a primitive cell P of Λ [defined in Eq. ( 45)], such that the set of states |µ, k⟩ (Σ,d) for k ∈ P forms a (linearly independent) basis of H.We shall justify this claim in Section V D by making a direct connection to Zak states, which have already been shown to form a basis over a given primitive cell [24].From this we construct a subsystem decomposition where G = (Σ, d, P) represents the three parameters required to specify the decomposition.We define the tensor product such that for k ∈ P. Note that this definition implicitly defines a Zak basis {|k⟩ S | k ∈ P} of S. We may also define the stabilizer states Eq. ( 47) to be normalized such that We call L the logical subsystem, which is isomorphic to the discrete-variable Hilbert space H d .We call S the stabilizer subsystem, which is isomorphic to the full Hilbert space H via the correspondence where D = diag(d, d).The right-hand side of Eq. ( 55) is a Zak state with a = (1, . . ., 1), and the set We can make a connection here to the stabilizerdestabilizer formalism of discrete-variable codes [25].The set of destabilizers of the decomposition G is given by D G = { Ŵ (v) | v ∈ P}, which represent the "lowest weight" displacements that give rise to a given error syndrome.The full set of displacement operators { Ŵ (v) | v ∈ R 2n } is generated by the destabilizers D G and logical operators Ŵ ( mJ ) via the equation v = l + {v} P .The set of displacement operators in turn forms an operator basis for L(H), the space of linear operators on H.This is analogous to how qubit stabilizers, destabilizers and logical operators generate the Pauli group, which in turn forms a basis for the space of linear operators acting on the n-qubit Hilbert space.
The square single-mode GKP qubit code (discussed extensively in Section II has parameters As a second example, the hexagonal single-mode GKP qubit code has parameters where V hex is illustrated in Fig. 4(d).The hexagonal code has the property that both Λ and Λ are hexagonal lattices in R 2 .The Voronoi cell V hex is hexagonal in shape and has boundaries corresponding to all three Pauli operators.As we will discuss in Section V, there are two differences between the hexagonal and square GKP codes: the generators of the lattice Σ and the Voronoi cells V, both of which need to be taken into account when comparing the properties of the codes.

C. Stabilizers and Logical Paulis
Next, we wish to discuss the decomposition of stabilizers and logical Pauli operators in the stabilizer subsystem decomposition.Before doing so, we must introduce operators that act on each of the subsystems.For the logical subsystem L this is straightforward since it is isomorphic to a discrete-variable Hilbert space.For the stabilizer subsystem S, one could use the isomorphism with the corresponding CV Hilbert space H to define, for example, ladder operators âj,S , â † j,S for each mode of S. Instead, we will find it more useful to instead consider S as a subsystem of H, and use operators on H that act trivially on L to define the desired operators, analogous to our definition of k1 and k2 in the single-mode square case (see Section II C 3).
The first such operator that we wish to define is a vector-valued operator k, that has action on the full Hilbert space: where k = (k 1 , . . ., k 2n ), and the right-hand side may be viewed as a vector with components k J (|ψ⟩ ⊗ G |k⟩).By definition, k acts trivially on L and thus can be viewed as an operator acting solely on S. k can be interpreted as a modular quadrature operator k = ξ/ √ 2π P , where we recall that {v} P is the remainder of v in the primitive cell P such that v = l + {v} P for some l ∈ Λ.
From the stabilizer eigenvalue equation [Eq.( 49)], we can decompose the stabilizer generators as Physically, the eigenvalues of k, which lie within the primitive cell P, can be measured simply by measuring the set of stabilizer generators [10,39].
For the logical Pauli operators we have where Xj , Zj represent the logical Pauli operators acting on H, while Xj , Ẑj represent the finite-dimensional Pauli operators acting on L. The fact that each logical Pauli operator can be written as a tensor product of operators acting on L and S ensures that it perfectly applies the corresponding gate to the logical information of any given state.Alternatively, it is also possible to write the stabilizers and logical operators in terms of the logical modes ξ = (q 1 , . . ., qn , p1 , . . ., pn ) that we introduced in Equation (41).We define the modular quadrature operators of the logical modes k = ( k1 , . . ., k2n ) as where we have written x = a⌊x⌉ a + {x} a for x ∈ R such that ⌊x⌉ a ∈ Z and {x} a ∈ (−a/2, a/2].From Equation (42) we see that the eigenstates of each stabilizer generator Ŝj (respectively, Ŝj+n ) are eigenstates of pj (q j ) mod 2π/d j , and are thus also the eigenstates of kj+n ( kj ).The operator k acts trivially on L because every basis state |ψ⟩⊗ G |k⟩ is an eigenstate of the stabilizers regardless of its logical state.Since the stabilizer generators are simultaneously diagonalizable, we also have kJ , kJ ′ = 0. Finally, we can relate the operators k and k to each other via the equation This equation can be used to rewrite Eqs. ( 59) and (60) in terms of k, giving D. The Partial Trace The central feature of using the stabilizer subsystem decomposition is the property that the partial trace over the stabilizer subsystem tr S corresponds to an ideal decoding map over a primitive cell P, which we now show.
We consider an ideal decoding map composed of a round of ideal error correction over P, followed by a read-out of the logical information in the resultant ideal codestate.This ideal decoding map can be described in the subsystem decomposition in three steps: 1. First, there is a measurement of k with some measurement outcome v ∈ P, which projects the initial state into the k = v eigenspace via the projection operator |v⟩ S ⟨v| (up to normalization).
2. To return the state to the k = 0 eigenspace (the ideal codespace), we apply the displacement Ŵ (v) † .
Considering these three steps together and averaging over the possible measurement outcomes results in a quantum channel H → L described by the Kraus operators S ⟨v| v ∈ P , where S ⟨v| is an operator that maps H → L. Thus, the post-decoding state of an arbitrary density operator ρ, unconditional on the stabilizer measurement outcomes, can be found by taking the partial trace over the S subsystem ˆP d 2n v S ⟨v|ρ|v⟩ S = tr S (ρ).
Equivalently, if one performs a round of ideal errorcorrection over P and averages over the outcomes, one obtains the ideal GKP codestate tr S (ρ) ⊗ G |0⟩⟨0|.The partial trace can in some sense be considered an "ideal" measure of the logical information in a state ρ.Indeed, the ideal decoding procedure is not implementable physically since the measurement of the stabilizer generators requires the use of a non-normalizable ideal GKP codestate.We leave it to future work to describe approximate error-correction in the stabilizer subsystem decomposition.
In some contexts, it is also useful to consider the state ρv ∝ S ⟨v|ρ|v⟩ S , which is the decoded state conditioned on the measurement outcome v (not averaged over them), because some stabilizer outcomes can result in decoded states ρv with less noise than others.Such considerations have previously been explored in qubit codes [40] and in GKP magic state distillation [31].
We remark that this ideal GKP decoding map is not equivalent to a decoding map defined by logical state tomography with binned measurement operators.Indeed, we show in Appendix B that the logical state tomography with binned measurement operators (binned-LST) decoding map is not completely positive, and is more susceptible to logical errors than the ideal decoding map.
V. TRANSFORMATIONS OF ⊗G Next, we turn our attention to transformations of the subsystem decomposition ⊗ G .In particular, we are interested in describing transformations that map basis states in one subsystem decomposition to basis states of another: |ψ⟩ ⊗ G |k⟩ → |ψ ′ ⟩ ⊗ G ′ |k ′ ⟩.We wish to do this for three reasons.First, these transformations provide a recipe to decompose arbitrary CV states in the ⊗ G subsystem decomposition (Section V E).Second, the transformations provide useful tools to analyze logical Clifford gates (Section VI) and the relationship between different GKP codes.Finally, the transformations allow us to make explicit the relationship between the subsystem decompositions and the Zak basis states [Eq.(36)] of H (Section V D).To do this, we introduce three transformations-cell transformations, Gaussian transformations, and dimension transformationsthat allow one to relate any two arbitrary stabilizer subsystem decompositions G and G ′ over n modes to each other.An example of each transformation is depicted in Fig. 4, which we will refer to throughout the section.

A. Cell transformations
The first transformation we consider is a primitive cell transformation (Σ, d, P) → (Σ, d, P ′ ), which can be achieved by applying the boundary conditions Eq. ( 51) to each basis state in P (as described below).Cell transformations are important to consider because different primitive cells correspond to different decoders with different error-correction properties.As such, the same state decomposed across two subsystem decompositions differing only by their primitive cell can encode different information in their logical subsystems.
In order to describe the cell transformation G = (Σ, d, P) → G ′ = (Σ, d, P ′ ), we start by noting from the definition of a primitive cell [Eq.(45)] that any vector k ∈ P can be uniquely written where l ∈ Λ and {k} P ′ ∈ P ′ .Therefore, to write any basis state |ψ⟩ ⊗ G |k⟩ as a basis state of ⊗ G ′ , we can simply apply the boundary conditions associated with the dual lattice vector l, resulting in the equation where we have written l = 2n J=1 s J mJ and Pd (s) is an n-qudit Pauli operator defined in Equation (31).Importantly, k − l = {k} P ′ is in the new primitive cell P ′ of the subsystem decomposition ⊗ G ′ .Note that this transformation applies a k-dependent Pauli operator to the logical subsystem, reflecting the fact that the new decoder defined by P ′ results in different logical information stored in a subsystem basis state.It is also convenient to consider the subsets Pl ⊆ P for l ∈ Λ, defined as the set of points k that are mapped by Equation (65) to P ′ with the dual lattice vector l.For example, in Fig. 4(c) and (d), we show the cell transformation of a rhombus primitive cell P = Σ hex V sq to a hexagonal primitive cell P ′ = V hex , while the remaining parameters Σ = Σ hex and d = (2) remain fixed.To perform this transformation, the initial rhombus cell P is split into regions Pl ⊂ P, each of which will be shifted by the dual lattice vector l to form the new hexagonal cell P ′ .In particular, the yellow, green, blue and red regions are shifted by + m1 , − m1 , + m2 and − m2 respectively; while the unshaded region is "shifted" by the zero vector 0 ∈ Λ.The basis vectors in each state are transformed by the boundary conditions Eq. (66), which apply a Pauli operator to the logical subsystem and a phase to the stabilizer subsystem.In general, each region can be found by performing the decomposition Eq. (65) to each vector k ∈ P.

B. Gaussian transformations
Next, we consider Gaussian transformations of the basis states.Applying a Gaussian unitary operator ÛS to each basis state in the subsystem decomposition transforms G → S(G) = (SΣ, d, SP) such that Unlike the cell transformation, a Gaussian transformation affects both the generators of the lattice Σ → SΣ and the cell P → SP.As such, to obtain a transformation that only alters the lattice generators in Σ, one must combine a Gaussian transformation with a cell transformation that restores the original cell P.This is particularly relevant in the special case where S = ΣN Σ −1 for some symplectic integral matrix N , in which case ÛS is the Gaussian unitary operator that implements the logical Clifford gate with action ÛS Pd (s) Û † S = Pd (N s).Here, the transformation not only applies a logical Clifford gate but also alters the primitive cell, which we discuss in more detail in Section VI.
We can now describe the full set of transformations required to transform the single-mode square GKP code G sq [Eq.( 56)] to the single-mode hexagonal GKP code G hex [Eq.( 57)], depicted in Fig. 4(a), (c) and (d).First, we perform a Gaussian transformation ÛΣ hex , resulting in the intermediate subsystem decomposition Σ hex G sq [Fig.4(c)].Then, we perform a cell transformation from the rhombus primitive cell Σ hex V sq to the hexagonal primitive cell V hex .When comparing the properties of the square and hexagonal GKP codes it is important to consider both of these transformations, as both of them alter the properties of the decomposition.

C. Dimension transformations
Finally, we describe how to transform the dimension, d, of the subsystem decomposition.Central to this description is the single-mode unfolding operation R j (defined below), which transforms the dimension of the j-th mode d j → 1, creating a qunaught mode.While there are many possible transformations that map a given mode from a qudit mode to a qunaught mode, we choose to describe the unfolding operation R j (defined below) due to its simple action on the basis states of ⊗ G .The net effect of this operation is to take the logical information in the j-th mode and instead label it in the stabilizer mode, thus increasing the size of the primitive cell [see Fig. 4(b)].The unfolding operation is therefore a generalization of the relationship between the single-mode square GKP qubit code and the Zak basis as shown in Fig. 1.The "inverse" of the unfolding operation is a d-fold folding operation F j (d), which turns a qunaught mode back into a qudit mode with dimension d.Arbitrary dimension transformations d → d ′ can then be described as unfolding and folding operations on each of the modes (although in some cases it is necessary to perform a cell transformation following the unfolding operation in order for the folding operation to be well-defined).
Intuitively, the unfolding operation R j consists of demoting the logical Zj = Ŵ ( mj+n ) operator on the j-th mode to a stabilizer of the new code, and removing the corresponding Xj = Ŵ ( mj ) from the logical Pauli group.Since Ŵ ( mj+n ) is now in the stabilizer group, states related by a displacement Ŵ ( mj ) which previously had identical support in the stabilizer subsystem are now distinct.As a result, R j "unfolds" (or copies) the cell P d j times along the vector mj , with the new patch given by R j (P) = dj −1 a=0 (P + a mj ).Concretely, the action of R 1 (acting on the first mode for simplicity) on states in the subsystem decomposition is given by where ⊕ represents the direct sum of two dit-strings µ 1 ∈ Z d1 and µ ∈ n j=2 Z dj , k ∈ P, and R 1 (G) is determined below.Note that the 0 label in the right-hand side of Eq. ( 68) is redundant since it represents a qunaught degree of freedom.The corresponding folding operation F 1 (d 1 ) can be found by inverting Equation (68).
Finally, we must consider how R j transforms the parameters G of the subsystem decomposition.In terms of lattice generators, R j transforms m j+n → m j+n /d j (which adds Zj to the stabilizer group), and correspondingly mj → d j mj (which removes Xj from the logical Pauli group), while all other lattice and dual lattice generators are unchanged.It is straight-forward to show that the equivalent transformation of the parameters is given by where A j (λ) is a diagonal matrix with λ and λ −1 on the j-th and (j + n)-th positions respectively and ones elsewhere, and In Section V D we will also make use of the all-mode un- which results in a trivial subsystem decomposition R(G) with dimension vector 1 n .
As an example consider the unfolding of the square GKP code G sq , shown in Fig. 4(a) and (b).The unfolded square GKP code R(G sq ) is a qunaught code with trivial logical subsystem L ∼ = C, such that each point in the unfolded primitive cell R(V sq ) represents a single basis state of the full Hilbert space H. R(V sq ) has double the area of V sq .The left half of R(V sq ) corresponds to states in G sq with a |0⟩ logical state, while the right half corresponds to |1⟩.In general, a basis state |ψ⟩⊗ sq |k⟩ of G sq is a superposition of two basis states |k⟩ and |k + e 1 / √ 2⟩ of the unfolded decomposition R(G sq ) (where we have omitted the redundant logical information |0⟩ in the notation).By comparison to Fig. 1, one can see that the basis states of R(G sq ) correspond to Zak states as we will now discuss.

D. Zak states
We can now make explicit the connection between states in a stabilizer subsystem decomposition G and Zak states [24], which are known to be closely related to GKP codes [23,29].
Since the n-mode Zak states |k⟩ a [Eq.(36)] are simultaneous eigenstates of the displacement operators Ŵ (a j e j ) and Ŵ (e j+n /a j ), we can identify them with the stabilizer states of an n-mode qunaught rectangular GKP code where Σ Z,a = diag a 1 , . . ., a n , 1/a 1 , . . ., 1/a n and holds for all k ∈ R 2n .We can obtain a Zak basis by restricting for j = 1, . . ., n.The Zak basis coincides with the Zak basis states of a trivial stabilizer subsystem decomposition that we call the Zak subsystem decomposition, where P Z,a is defined by Eq. ( 71).As foreshadowed in Section V C, applying an all-mode unfolding operation R to a square qudit GKP code G sq,d results in a Zak subsystem decomposition Z √ d , where With this connection, we can now apply any of the transformations discussed above in Sections V A to V C to relate arbitrary GKP stabilizer subsystem decompositions to a Zak basis Z √ d .Starting from an arbitrary G = (Σ, d, P), we can apply three transformations to result in a decomposition described by Z √ d : 1. First we apply a Gaussian transformation Σ −1 , resulting in the decomposition 2. Then, we apply a cell transformation Σ −1 P → V sq,d , where V sq,d is the Voronoi cell of the square GKP code with dimension vector d.
3. Finally, we apply an all-mode unfolding operation R, which results in the Zak subsystem decomposition Z √ d .
Since the transformations described in Sections V A to V C preserve the linear independence and completeness of the states in each subsystem decomposition, and the Zak states form a basis of H when restricted to the primitive cell P Z, √ d , we can confirm that the restriction of k to a primitive cell P of the dual lattice Λ does indeed result in a basis |µ, k⟩ µ ∈ n j=1 Z dj , k ∈ P of the full Hilbert space H.

E. Wavefunctions in the subsystem decomposition
The relationship between basis states of an arbitrary subsystem decomposition and the Zak basis also provides a practical method of decomposing arbitrary states |ϕ⟩ ∈ H into an arbitrary stabilizer subsystem decomposition ⊗ G .In particular, we wish to calculate the overlap for all µ ∈ n j=1 Z dj and k ∈ P. To perform this calculation we work with stabilizer states |µ, k⟩ (Σ,d) as defined in Eq. (47).We can write the stabilizer state |µ, k⟩ (Σ,d) as a Zak state: = ÛΣ e iπ l(µ) where l(µ) = n j=1 µ j mj .Note that mj for j ≤ n represents the logical Xj operator, such that Ŵ l(µ) = n j=1 Xµj j .In Eq. ( 74), we have applied the Gaussian transformation ÛΣ [Eq.( 67)]; and in Eq. (75), we have applied the all-mode unfolding operation R defined by Eq. ( 68).
Since we are working with stabilizer states and not with a subsystem decomposition, we do not need to explicitly apply a cell transformation.Instead, the primitive cell of the original decomposition G is incorporated implicitly into the calculation by only calculating overlaps where k ∈ P. Indeed, when k runs over P and µ runs over all possible ditstrings, the "unfolded" vector Σ −1 k + l(µ) [Eq.( 75)] runs over a primitive cell that is related by a cell transformation to our previous choice of Zak primitive cell P Z, √ d .Finally, we can use the position-representation of the n-mode Zak states given by Eqs. ( 8) and (36) to write the overlap Eq. ( 73) as a sum of overlaps Therefore, any state for which one can calculate the overlap Eq. ( 76) can be decomposed into any subsystem decomposition G.We relegate the full equation relating the overlap Eq. ( 73) with Eq. ( 76) to Appendix E due to its length.

VI. LOGICAL CLIFFORD GATES
We now move on to analyzing logical Clifford gates in the stabilizer subsystem decomposition.To simplify our discussion we only consider GKP codes that encode k qubits in n modes, i.e. the dimension vector d consists of k 2's followed by n−k 1's.One appealing feature of GKP codes is that Gaussian operators, which are often easy to implement experimentally, are sufficient to generate the logical Clifford group.Given a k-qubit Clifford operator Â, we can always write Â Pd (s) Â † = Pd (N A s), where N A is an integral symplectic matrix that acts trivially on the components of s corresponding to the n − k qunaught states, and Pd (s) is a Pauli operator defined in Eq. ( 31).Equivalently, N A is the symplectic representation of the Gaussian operator Āsq that applies the logical Â gate on the square GKP k-qubit code.For a general GKP kqubit code, a logical implementation of the Clifford gate Â is given by Ā = ÛS A with S A = ΣN A Σ −1 , such that Ā Pd (s) Ā † = Pd (N A s).We note that the logical implementation Ā (and, equivalently, the symplectic matrices S A and N A ) is not unique for a given Clifford gate Â.
We begin our analysis by considering the action of Ā on stabilizer states, given by where A(ψ) is the qubit label representing the state |A(ψ)⟩ = Â |ψ⟩, c.f. Eq. ( 28).Since the state |ψ, k⟩ (Σ,d) can be interpreted as an ideal GKP codestate that has incurred a displacement error Ŵ (k) | ψ⟩, we can see that the logical Clifford gate maps the error k to S A k.The Clifford gate can therefore cause a logical error if the initial error is correctable (i.e.k ∈ P) but the final error is not (S A k / ∈ P).However, one can exactly counteract this effect if one simply performs a round of error correction over a modified patch S A P immediately after the application of the gate, an idea which was first introduced in Ref. [41] and generalized in Ref. [42].
An interesting alternative viewpoint is to consider Ā as a Gaussian transformation of the stabilizer subsystem decomposition G → S A (G) = (ΣN A , d, S A P) via Eq.(67).Here, the right multiplication of Σ by the integral symplectic matrix N A can be viewed as a column operation that relabels the generators of the GKP lattice and dual lattice (equivalent to a row operation N T A acting on the generator matrix M ) while leaving the lattice invariant.The relabelling occurs in such a way that the Clifford operator Â is applied to the logical Pauli labels of the dual lattice Λ, i.e.
However, to write the right-hand side of Eq. ( 78) in terms of the original subsystem decomposition G, one must perform a cell transformation S A P → P via Eq.(66), which in general applies a Pauli operator to the logical subsystem.
In practical terms, the logical information in the original subsystem decomposition G after applying Ā corresponds to performing a round of error correction over the original primitive cell P after the gate (and thus incurring additional errors as described above).In contrast, the logical information in the modified subsystem decomposition (Σ, d, S A P) after applying Ā corresponds to performing error correction over the modified primitive cell S A P. In this case, no cell transformation is performed after Eq. ( 78) and so no logical errors are introduced.
In Section II C 3 we already discussed the examples of the logical Hadamard [Eq.(27)] and logical phase [Eq.( 29)] gates for the single-mode square GKP code.In particular, we saw that the logical Hadamard gate Hsq is a tensor product operator in the subsystem decomposition, while the logical phase gate Ssq is not.This is a consequence of how the corresponding symplectic matrices for the Hadamard S H V sq = V sq , so no cell transformation is required following Eq.(78), and hence H decomposes as a tensor product operator.For the phase gate, we have S (sq) S V sq ̸ = V sq , and the required cell transformation S (sq) S V sq → V sq ensures that Ssq cannot be written as a tensor product operator.
As a further example, consider the logical controlled-Z gate.Since this is a two-qubit gate, we consider it acting on two copies of the square GKP code, which is described by the parameters The controlled-Z gate is described by CZ,sq = exp(iq ⊗ q).(80c) Since S (sq) sq , the controlled-Z gate cannot be written as a tensor product operator.
We can perform a similar analysis for the hexagonal GKP code [Eq.( 57)].Consider the logical permutation gate Rhex = Hhex S † hex , which has (hex) R is a π/3 anticlockwise rotation, we have S (hex) R V hex = V hex , so Rhex is a tensor product operator across G hex .However, the logical Hadamard, phase, controlled-NOT and controlled-Z gates all do not preserve the hexagonal Voronoi cell and are not tensor product operators in G sq .
Our formalism also allows for other logical gate proposals such as those using gauge fixing techniques [38,43], which could be used to implement code deformation and lattice surgery schemes.In particular, consider the projection into the +1-eigenspace of an arbitrary logical Pauli operator P .In the stabilizer subsystem decomposition this consists of demoting the logical Pauli operator to a stabilizer via an appropriate unfolding operation, followed by a round of error correction to project into the +1-eigenspace.In symbols, this corresponds to the sequence R 1 • S A , where Â is a Clifford operator such that Â P Â † = Ẑ ⊗ Î⊗(n−1) .We leave it to future work to apply this formalism to practical problems involving GKP gauge fixing.

VII. NUMERICAL MODELING OF NOISE
One appealing feature of subsystem decompositions is that the partial trace operation provides a straightforward method of extracting qudit-level information from CV states.Here, we apply the stabilizer subsystem decomposition partial trace to model noise sources such as loss and dephasing in GKP codes.In particular, we are interested in obtaining the qudit-to-qudit logical map corresponding to applying a given noise map N on approximate GKP codewords.We develop a general method for calculating the logical noise map from N using the partial trace in Section VII A, from which the average gate fidelity can be directly calculated.Excitingly, our method becomes more accurate the closer the state is to an ideal GKP codeword, allowing us to calculate logical noise maps for states with essentially arbitrarily large photon numbers (Appendix H).We then apply the method to calculate the average gate fidelity of the pure loss (Section VII C), Gaussian random displacement (Section VII D) and white-noise dephasing (Section VII E) noise channels acting on single-mode square GKP approximate codestates.We find that in the regime of small loss and high-quality approximate codestates, pure loss outperforms the Gaussian random displacement channel obtained by post-composing pure loss with a quantum-limited amplification noise channel, consistent with Ref. [27].Finally, we show that the square GKP code is far more vulnerable to dephasing than pure loss; indeed, when comparing the average gate infidelity of the GKP codes with a trivial {|0⟩ , |1⟩} Fock space encoding, we find that a squeezing of at least 12 dB and a dephasing rate below σ 2 = 10 −3 (defined below) is necessary to break-even.

A. Description of Method
In this subsection we present the methods we use to determine the logical noise channel N L corresponding to a CV noise channel N .We develop the method for a general GKP stabilizer subsystem decomposition G = (Σ, d, P), although in the remainder of the section (Sections VII B to VII E) we will only consider the square single-mode GKP code G sq = (I 2 , (2), V sq ) [Eq. ( 56)].
We start by defining the logical noise map N L as where N is an arbitrary CV noise map.One can understand N L as composed of three steps: 1. an ideal encoding map ρ → ρ = ρ⊗ G |0⟩⟨0|, followed by 2. the CV noise map N , and finally 3. an ideal decoding map over the primitive cell P, which is equivalent to the partial trace over S (as described in Section IV D).
Importantly, we have defined N as acting on ideal codestates ρ.In practice though, we are typically interested in noise channels acting on non-ideal codestates ρ since the ideal codestates are non-normalizable.However, we can always define a map C that maps the ideal codestates |μ⟩ to the non-ideal codestates |μ⟩.Then, the map N ′ = N • C can be used in place of N in Eq. ( 82) to define the corresponding logical noise map acting on the approximate codestates.
To find the logical map N L from N , we first need to write N in terms of displacement operators in its characteristic function [44] In general, the characteristic function c(u, v) can be obtained either from the Liouville superoperator representation of N or from a Kraus decomposition, as described in Appendix F. Alternatively, we derive the characteristic function of an arbitrary Gaussian CPTP map in Appendix F, giving us many of the characteristic functions used below.Finally, the characteristic function c(u, v) of a composition of maps N = N 2 • N 1 can be written in terms of the characteristic functions of the maps N i with the equation: where c i (u, v) is the characteristic function of N i .Equation (84) can be used, for instance, to calculate the characteristic function of the map N • C, where C is the nonideal codestate map from the previous paragraph.
To calculate the logical noise map, we first apply N to an ideal codestate via the equation where we have omitted the (Σ, d) label of the stabilizer states to save space.We can see Eq. (85) holds from the definition of stabilizer states as displaced ideal codestates [Eq.(47)].Moreover, Eq. (85) can be applied to an arbitrary ideal encoded density matrix ρ ⊗ G |0⟩⟨0| using the linearity of N .
The use of stabilizer states on the right-hand side of Eq. ( 85) is necessary due to the domain of integration R 2n .Therefore, to write Eq. (85) in terms of the subsystem decomposition ⊗ G , we must apply the boundary conditions Eq. ( 51), giving where Pd (s) is a Pauli operator defined in Eq. ( 31), and (87) with l(s) = 2n J=1 s J mJ .Note that applying the boundary conditions has introduced logical Pauli operators on the logical subsystem, altering the logical information stored in the state.
Finally, we obtain the logical noise map by taking the partial trace over the stabilizer subsystem, giving In order to evaluate the logical noise map Eq. ( 88) in practice, we need to truncate the infinite series over s, t.This truncation is possible if the modulus of the characteristic function |c(u, v)| goes to 0 sufficiently fast as |u|, |v| → ∞.Indeed, in some cases this property does not hold, for example in the unphysical scenario of applying pure loss to an ideal codestate, and in these cases our method cannot be applied in practice.However, in all the other examples we consider, |c(u, v)| decays to 0 exponentially as |u|, |v| → ∞, and we find that a truncation of each component of s, t to −1, 0, 1 is sufficient to achieve accurate results in almost all regimes of interest, as discussed in more detail later in this section.In the case of the square GKP code, the integrals in Eq. ( 88) can often be analytically evaluated due to the Cartesian product structure of the square Voronoi cell V sq [Eq.( 56)].However, for subsystem decompositions with more complicated primitive cells P, the integrals must be evaluated numerically.In this work we only consider square GKP codes for simplicity.
With the logical noise map, one can then directly extract quantities such as the average gate fidelity, which is defined as [45] F(E) = ˆdψ ⟨ψ|E(|ψ⟩⟨ψ|)|ψ⟩ (89) for a quantum channel E acting on a discrete-variable Hilbert space H d , where the integral is over the uniform measure dψ in state space.In practice this is most easily calculated via the entanglement fidelity where |M E⟩ ∈ H d ⊗ H d is a maximally entangled state, and I is the identity quantum channel acting on L(H d ).
Then, we can use the relationship [45] F We note that in order to calculate the average gate fidelity, the logical noise map (and, equivalently, the noise map itself) must be CPTP.
Here we comment that the methods described above reflect the logical information one would obtain using ideal error correction, which is not possible in practice since it requires the use of ideal codestates.While we do not quantitatively model the more realistic case of error correction with approximate codestates, we briefly discuss the qualitative effect that this would have on our subsequent results.For small enough ∆, one can approximately model the use of approximate codestates and inefficient homodyne detection in a teleportation-based error correction scheme as applying a Gaussian random displacement channel immediately before and after a round of ideal error correction, see for example Appendix F of Ref. [46].To approximately model the effect of approximate error correction, we can simply post-compose the noise map N considered above with the an appropriate Gaussian random displacement channel.Such a modification would reduce the fidelity of the resulting logical channel and introduce more errors.However, the qualitative features described below, such as the presence of a global minimum in the infidelity, should not be affected since the stochastic displacement errors only add decoherently to the noise map N .
To summarize, if one wishes to calculate the logical noise map corresponding to applying a noise map N on some non-ideal GKP codewords, one can follow the following steps: 1. First, determine the map C that maps ideal codestates to non-ideal codestates.
2. Then, calculate the characteristic function of the combined map N • C [Appendix F and Eq. ( 84)].
These are the steps that we follow for the square GKP code in the remainder of this section.We start by looking at non-ideal codestates defined by the envelope operator in Section VII B, and follow this by applying the loss (Section VII C), Gaussian random displacement (Section V B) and white-noise dephasing (Section VII E) noise channels to the codestates.

B. Envelope Operator
We define approximate GKP codewords as where ∆ quantifies the quality of the approximate codewords, and the constant of proportionality is defined such that | ψ∆ ⟩ is normalized.∆ is also commonly quoted in decibels as ∆ dB = −10 log 10 (∆ 2 ).We call the nonunitary operator e −∆ 2 â † â the envelope operator, and we define the envelope map as where Since the envelope operator is non-unitary, the envelope map E is not trace-preserving.Moreover, the map that takes ideal codestates to normalized approximate codestates is not linear.To solve these problems, we apply an orthonormalization procedure (described in Appendix G) to the approximate codewords | ψ∆ ⟩ → | ψ∆,o ⟩ such that the orthonormalized encoding map E ∆ o is CPTP.The orthonormalization has a vanishingly small effect on the approximate codestates themselves as ∆ → 0. Conveniently, we can calculate the orthonormalized CPTP logical noise map E ∆ L,o from the non-trace-preserving logical noise map E ∆ L after we have applied the steps in Section VII A.
The envelope map has characteristic function (Appendix F) where we have omitted the constant of proportionality since the codewords are going to be orthonormalized anyway.Importantly, since the characteristic function Eq. ( 93) decreases exponentially as |u|, |v| → ∞, we can truncate the sum in Eq. ( 88) to numerically obtain the logical envelope map E ∆ L .Moreover, each integral in Eq. ( 88) can be evaluated analytically for the square GKP code (see Appendix C).Then, we apply the orthonormalization procedure in Appendix G to obtain a CPTP map E ∆ L,o .Finally, we can calculate the average gate fidelity of E ∆ L,o using Eqs.( 90) and ( 91).This average gate fidelity is plotted in the γ = 0 curve of Fig. 5(a).Since c ∆ E (u, v) becomes sharper around the origin as ∆ → 0, this method becomes more accurate and less computationally expensive as the approximation becomes more ideal.Indeed, our technique easily enables the simulation of highly squeezed states, and in principle there is no limit to the squeezing one could simulate (see Appendix H).Our result is similar in spirit to those of Ref. [47], where it is shown that circuits that are efficiently simulatable by classical computers with ideal | 0⟩ states as input states are universal for quantum computing with approximate states as input, and the resourcefulness of the approximate states increases as ∆ increases.
Let us briefly comment on the accuracy of the truncation of the infinite sum Eq. (88).To do this, we take the largest value of ∆ that we used in our simulations (∆ ≈ 0.94, n ≈ 0.56, ∆ dB ≈ 3.1) and compare the average gate infidelity across different levels of truncation.In particular, we truncate the absolute value of each component of s, t to be less than or equal to some integer s max .We find that the relative error between the calculated average gate infidelities for s max = 1 and 2 is only 7 × 10 −4 , and the relative error between s max = 2 and 3 is only 4 × 10 −9 .Moreover, these relative errors should only decrease as ∆ becomes smaller and the codestates become more ideal.These results show that the sum Eq. ( 88) converges extremely rapidly even for large ∆, allowing s max to be set to 1 for all our remaining calculations.

C. Pure Loss
We define loss from the Kraus operators with characteristic function (Appendix F) (96) Here, γ = 1 − e −κt represents the amount of loss applied to a system evolving under the master equation for some time t, where D[â]ρ = âρâ † − 1 2 {â † â, ρ} is the Lindblad dissipator and {A, B} = AB + BA is the anticommutator.
Simulating loss acting directly on ideal GKP codestates using our method is not possible since the modulus |c γ L (u, v)| is constant for u = v, even as |u| → ∞.Instead, we simulate loss acting on approximate codestates by considering a composition of maps L γ •E ∆ , whose characteristic function can be determined from Eq. ( 84).Again, we calculate the logical map by truncating the infinite series Eq. ( 88), and we must orthonormalize the codewords using Appendix G, resulting in the orthonormalized logical map (L γ • E ∆ ) L,o .
We plot the average gate fidelity of (L γ • E ∆ ) L,o for the square GKP code in Fig. 5, and compare it to the average gate fidelity of loss acting on the trivial Fock encoding, {|0⟩ , |1⟩}, which represents the break-even point of the code.We find that for any fixed loss rate γ, there is an optimal ∆ that maximizes the average gate fidelity.One can understand this intuitively by noting that loss has a larger effect on states with a large photon number.Since the average photon number of an approximate GKP codestate is given approximately by ⟨â † â⟩ ≈ 1/(2∆ 2 ) − 1/2 [48], as the GKP codestate becomes more ideal, the noise due to E ∆ decreases while the noise due to L γ increases, giving rise to a cross-over point which represents the optimal ∆ that protects against the loss.As previously mentioned, we expect that these results would hold qualitatively (if not quantitatively) in the more realistic case of error-correction with approximate codestates.
Based on experimental parameters used in a recent paper that produced GKP Pauli eigenstates [15], we can obtain a rough, order-of-magnitude estimate of the loss rates we might expect in near-term GKP experiments.Given a cavity lifetime T 1,c ∼ 600 µs, and an errorcorrection cycle time of 6 µs, we can estimate the amount of loss we can expect during an error correction cycle to be on the order of γ ∼ 1%.At this loss rate, GKP is scaled such that the Gaussian displacement channel is equivalent to loss followed by a quantum-limited amplification via Eq.( 100).(a) The average gate infidelities plotted as a function of ∆, where n ≈ 1/(2∆ 2 ) − 1/2 is the average photon number of the approximate GKP encoded maximally mixed state.The γ = 0 curve represents the errors solely resulting from the approximate GKP codestates.(b) Average gate fidelity of the loss channel as a function of γ ≈ κt, which represents the loss of logical information as approximate GKP codestates evolve in time under loss.This is compared to the loss of logical information stored in a trivial Fock encoding {|0⟩ , |1⟩} under the same loss channel.
codes perform very well, and the optimal ∆ is far beyond what is experimentally feasible.Encouragingly, the square GKP code still outperforms the trivial encoding even for much larger amounts of loss.

D. Gaussian Displacements
Next, we consider a Gaussian random displacement noise model G σ defined by its characteristic function Here, σ 2 = κ G t represents the variance of random displacements applied to a system evolving under the master equation for some time t.The Gaussian random-displacement channel G σ is equivalent to a loss channel L γ followed by a quantum-limited amplification channel [49] where the quantum-limited amplification channel A g (ρ) is equivalent to the state ρ evolving under the master equation for some time t, where g = e κ A t .Using the same method as for loss, we calculate the orthonormalized logical noise map for the Gaussian random-displacement channel acting on approximate GKP codewords, and plot the average gate fidelity in Fig. 5(a).To compare loss to Gaussian randomdisplacements, we use the relationship σ 2 = γ/(1 − γ) from Eq. (100).For equivalent values of σ and γ, G σ introduces more noise into the system than L γ in the region of small ∆ dB and γ.However, the infidelity of G σ becomes smaller than that of L γ at large values of ∆ dB or γ, reflecting the fact that c σ G (u, v) tends to 0 as |u|, |v| → ∞ even when acting on ideal codestates.
We again comment briefly on the accuracy of the truncation of Eq. (88).The data point with the highest infidelity in Fig. 5 corresponds to a Gaussian random displacement channel with variance σ 2 = 0.1/(1 − 0.1) ≈ 0.11 applied to a GKP codestate with very large ∆ (∆ ≈ 0.94, n ≈ 0.56, ∆ dB ≈ 3.1).Considering different truncations s max as in Eq. (94), we find that the relative error in the average gate infidelities for this ∆ and σ 2 between s max = 1 and 2 is 2 × 10 −3 , and between s max = 2 and 3 is 2 × 10 −7 , indicating that our truncation is still valid even for the channel with the largest infidelity.
The consequences of our results for correcting GKP codes against loss are interesting.In particular, in the regime of large γ and large ∆ dB , it is better to apply a quantum-limited amplification channel before performing a standard round of GKP error-correction, as discussed in Ref. [49].The fact that this scheme outperforms pure loss followed by standard error-correction is not necessarily surprising, since the amplification is designed with knowledge of the noise model acting on the system, while standard error-correction is not.However, loss without amplification does outperform loss followed by amplification in the small γ and small ∆ dB regime that is likely to be experimentally-relevant.This result is consistent with the results of Ref. [27].

E. White-noise Dephasing
Finally, we conclude our numerical analysis by considering a white-noise dephasing channel, defined by its continuous Kraus decomposition and with characteristic function (Appendix F) (103) This time, σ 2 = κ ϕ t represents the amount of dephasing applied to a system evolving under the master equation for some time t.The term "white-noise" refers to the Gaussian distribution of the Kraus operators Eq. ( 102), which is a simplification of general dephasing errors that can occur in an experiment.Although our results should give a general indication of the performance of GKP codes against dephasing, typical experiments observe dephasing with non-Gaussian, or colored, distributions.Again, we calculate the orthonormalized logical noise channel (D σ • E ∆ ) L,o as a function of both ∆ and σ.In the case of dephasing however, our result is not purely analytical as we perform the integral over ϕ arising from Eq. (103) numerically.The average gate fidelity of the logical noise channel is plotted in Fig. 6, and compared to pure dephasing applied to the trivial Fock encoding {|0⟩ , |1⟩}.For any given σ, we again find an optimal ∆ which corrects against the dephasing, which we also expect to hold qualitatively in the case of approximate error-correction.This can be understood intuitively by noting that dephasing applies rotations to a state in phase space.As ∆ → 0, the approximate GKP codestate becomes more widely distributed in phase space and is thus more vulnerable to the effects of dephasing.
Comparing our results to the experimental data in Ref. [15], we have T ϕ ≈ 1 ms.At this rate, dephasing acting over a time of 6 µs results in σ 2 ≈ 0.6%, although this may be reduced if error correction can be performed faster in the future.In contrast to loss, this amount of dephasing severely affects GKP codestates, underperforming the trivial encoding for all values of ∆.Indeed, for a GKP squeezing of ∆ dB = 10, one needs to be performing error correction on a timescale of approximately 2 µs to achieve an average gate infidelity of 10 −3 even with state-of-the-art dephasing rates.Moreover, to break-even against a pure dephasing channel, one needs to be operating with a squeezing of greater than ∆ dB = 10 and a dephasing rate less than 0.1%.

VIII. CONCLUSION
We began the paper by constructing the stabilizer subsystem decomposition for the single-mode square GKP qubit code in Section II, and discussing its key properties.In Section III we introduced multi-mode GKP codes by describing the parameters (Σ, d) that specify the lattice generators of a given GKP code.Then in Section IV, we introduced the stabilizer subsystem decomposition H = L ⊗ G S of the CV Hilbert space into a logical and stabilizer subspace in the general case.We showed that the partial trace tr S corresponds to ideal decoding over the patch P, justifying our use of the stabilizer subsystem decomposition over previously-developed alternatives.We explored the properties of the subsystem decomposition, and used three transformations (cell, Gaussian and dimension transformations) to connect states in the stabilizer subsystem decomposition to Zak states (Section V) and to describe logical Clifford gates in our formalism (Section VI).Finally, in Section VII we introduced a general method to calculate the logical effect of various noise operators on GKP codes, which we then used to analyze the envelope operator, pure loss channels, and Gaussian displacement channels in regimes that are unreachable by Fock space simulations.
In Sections VI and VII we provided a number of exciting applications of the stabilizer subsystem decomposition to implement logical gates and analyze the effects of noise.However, there is significantly more work that must be done to provide analysis that is useful for experiments.In particular, one could incorporate other techniques from fault-tolerant literature, such as gate teleportation, subsystem codes [30] and gauge fixing [43], into the GKP setting using our formalism.Furthermore, analysing more realistic noise sources such as colored dephasing, Kerr non-linearities, and approximate error correction is required to model the dominant sources of errors in current experiments.In particular, analysing the dissipative GKP error-correction schemes used in Ref. [12,50] in terms of the subsystem decomposition may provide insights into how the schemes work.We add that our formalism may allow for more accurate simulations of concatenated GKP codes using the logical action of noise channels and logical gates defined by the stabilizer decomposition.
Finally, we note that our simulation methods rely on the integration of characteristic functions over a cell P. In this work, we were able to produce our results by evaluating these integrals analytically over the single-mode square GKP Voronoi cell.However, higher-dimensional integrals over non-rectangular and/or multi-mode patches cannot be evaluated analytically and thus require numerical integration which may not scale favourably.As such, there is still work that can be done to optimize the numerical integration methods for multimode GKP codes.CV state stabilizer partial trace Mod-q partial trace π⟩ q in the square single-mode stabilizer and modularposition subsystem decompositions.The stabilizer subsystem decomposition gives the same result for both states, while the modular-position subsystem decomposition gives different results, revealing an asymmetry in superpositions of left and right displacements of the position eigenstates.
are chosen to reveal an asymmetry between left and right displacements in position in the modular-position subsystem decomposition, since the partial trace results in a pure final state |+⟩⟨+| for |ϕ + ⟩ but the maximally mixed state ρ = Î/2 for |ϕ − ⟩.In contrast, the stabilizer subsystem decomposition gives the same logical state for both CV states.Now we turn our attention to the Zak basis representation of each decomposition.Recall our definition of a = √ 2 Zak states forms a basis.Next, recall the Zak representation of the G sq decomposition: In recent work [23], a similar equation was developed for the modular-position subsystem decomposition.Here we provide a similar derivation using our notation in order to directly compare the two decompositions.One can see from the definition in Eq. (A2) that for any gauge mode state |ϕ⟩ we have Next, consider the "left half" of the Zak basis states |k 1 , k 2 ⟩ √ 2 for which k 1 ≤ 2 −3/2 .These states have support only on position eigenstates |x⟩ q with µ = 0 in Eq. (A1), and thus can be decomposed into a state |0⟩⊗ Q |ϕ⟩.We can then choose a Zak basis where the last ⊗ is across the stabilizer subsystem decomposition.Now, we can apply Eq. (A3) to find which differs from the equivalent equation for the stabilizer subsystem decomposition Eq. (15 ′ ) only by a e − √ 2iπk2 phase.This in turn can be viewed as applying a k 2 -dependent Z-axis rotation of the logical Bloch sphere, thus altering the properties of the partial trace operation.It is because of this phase that the stabilizer subsystem decomposition can be seen as a "rephasing" of the modular-position subsystem decomposition which symmetrizes the treatment of the position and momentum quadratures.This result is consistent with recent work done in Ref. [23].In this appendix we discuss the subsystem decomposition of binned quadrature measurements (Appendix B 1), and the relationship between ideal decoding (as defined in Section III C) and logical state tomography using binned quadrature measurements (binned-LST), a procedure we define in Appendix B 2. We show that binned quadrature measurements do not correspond to measurements of the logical subsystem Pauli operators; and, moreover, that binned quadrature measurement operators do not decompose as tensor products in the stabilizer subsystem.Then, we show that binned-LST corresponds to a decoding procedure that is more prone to errors, and defines a map that is not CPTP.Throughout this appendix we will only consider single-mode qubit codes so that G = (Σ, (2), P) and the logical Pauli operators are given by q , (B1) in terms of the logical modes ξ = Σ −1 ξ [see Eqs. ( 41) and ( 42)].

Binned Quadrature Measurements
We begin by defining a binned operator B( Û ) for any unitary operator Û as follows.Given the spectral decomposition of the unitary operator with θ λ ∈ (−π/2, 3π/2], we define the binned operator where where In words, the binned operator B( Û ) shares the same eigenstates {|λ⟩} as Û , but the complex eigenvalues of Û are rounded to +1 if their real part is positive and −1 if their real part is negative.Note that B( Û ) is both unitary and Hermitian for any unitary Û .We define binned quadrature measurements as follows.For a binned Pauli X measurement: 1. First, measure the logical quadrature p.
2. Then, round the result to the nearest multiple of √ π.
3. If the rounded result is even, assign a +1 measurement outcome to the X measurement; and if it is odd, assign a −1 measurement outcome.
Binned Ȳ and Z measurements are similarly defined by replacing p with (q − p) and q, respectively.With this definition, a binned quadrature measurement for X is equivalent to a measurement of the Hermitian operator B( X), and likewise for Ȳ and Z.Now consider the action of B( X) on a subsystem basis state |ψ⟩ ⊗ G |k⟩. From Eq. ( 60), X acts on the stabilizer states as Since X has eigenvalues ±1, the action of B( X) on the state is determined by whether the real part of e 2iπ k T Ω m1 is positive or negative.In particular, we can write the action of B( X) as where {x} 1 ∈ (−1/2, 1/2] is the remainder of x modulo 1.Similar results can be obtained for B( Ȳ ) and B( Z) by replacing m1 with ( m1 + m2 ) and m2 , respectively.The significance of Eq. (B5) is that the remainder {k T Ω m1 } 1 [or the equivalent remainders for B( Ȳ ) and B( Z)] is not always between −1/4 and 1/4, even when k is in the Voronoi cell of the dual lattice.As an example, consider the square GKP code G sq = (I 2 , (2), V sq ) [Eq. ( 56)].Then, the symplectic products that determine the binned logical operators simplify to Alternatively, one can understand this result as a consequence of the logical phase gate Ssq not being a tensor product operator.Since Ssq maps −p → q − p, we have B( Ȳsq ) = Ssq B( Xsq ) S † sq .From Eq. ( 29) and using B( Xsq ) = X ⊗ Î, one can quickly show that B( Ȳsq ) is not a tensor product operator in the subsystem decomposition, in agreement with our direct calculation above.
Repeating the calculations in Eq. (B5) for the hexagonal GKP code reveals that none of the binned operators B( Xhex ), B( Ȳhex ), B( Zhex ) are product operators, and there are regions of the Voronoi cell in which each of them act as negative Pauli operators, as shown in Fig. 7(b).

Logical State Tomography with Binned
Quadrature Measurements A natural way to define a decoder is to use the binned quadrature measurements to define a logical state tomography decoder that we label binned-LST.For a CV state ρ ∈ L(H), the binned-LST decoder is defined by the map B7) which is identical to the logical state one would obtain by running a tomography experiment on the CV state using the binned Pauli measurements.
Since the binned measurement operators are not tensor product operators in the subsystem decomposition, Eq. (B7) is not equivalent to taking the partial trace over the stabilizer subsystem.Instead, the partial trace itself can be recovered by replacing the binned measurement operators B( P ) with ideal measurement operators Pm = P ⊗ G Î for P = X, Y, Z.
There are two consequences of this discrepancy between the binned-LST and subsystem decomposition decoders.First, for the square GKP code, if one starts in an ideal codestate |ψ⟩ ⊗ |0⟩, the (non-unique) shortest displacement that alters the binned-LST decoded state is Ŵmin = Ŵ [−1, 1] T /(4 √ 2) with length 1/4, see Fig. 7(a).In contrast the shortest displacement that causes an error in the subsystem decomposition has length 1/(2 √ 2).This reduction in distance is not unique for the square code and is also the case for the hexagonal code, as shown in Fig. 7(b).
Second, the logical error caused by Ŵmin to the binned-LST decoded state is given by X → X, Ŷ → − Ŷ , Ẑ → Ẑ.In terms of density matrices, this is a transpose map, a well-known example of a positive but not completely positive map.Recall that a map N is positive if it maps positive operators to positive operators, and is completely positive if I ⊗ N is positive where I is the identity map (acting on a Hilbert space of any dimension).
To see an example of a positive density operator being mapped to a negative operator under the binned-LST decoding map we must therefore consider an initial state in a composite Hilbert space, which we choose for simplicity to be between a qubit space and a CV space C 2 ⊗ H.We consider the initial Bell-like state where is in the shaded region of Fig. 7(a), and the unlabelled tensor product ⊗ is the tensor product between the C 2 qubit space and the CV space H while the labelled tensor product ⊗ G is the tensor product between the square GKP logical subsystem C 2 and stabilizer subsystem S of the CV space H.The initial density operator can be equivalently written as where we have represented the qubit state and the logical state of the CV mode together in the matrix.Next, we perform binned-LST on the CV space while leaving the qubit state invariant.Since the binned-LST decoder maps the CV Hilbert space H to a qubit space C 2 , the initial density matrix |ϕ⟩⟨ϕ| ∈ L(C 2 ⊗ H) is mapped to a 2-qubit operator Ô ∈ L(C 4 ).Since v 0 is in the shaded region of Fig. 7(a), performing logical tomography maps Ŷ → − Ŷ on the logical subsystem of H, while leaving the remaining logical subsystem Pauli operators and qubit Pauli operators invariant.This is equivalent to taking the transpose of each 2 × 2 block of the matrix in Eq. (B9).The final operator has a −1 eigenvector [0, 1, −1, 0] T , and thus Ô is not positive and cannot represent a physical state.Since the tensor product of binned-LST with the identity map has mapped a positive density operator |ϕ⟩⟨ϕ| to a nonpositive operator Ô, binned-LST is not a completelypositive map.We note that this example is in essence the same as the well-known example that demonstrates the transpose map is not completely-positive.
To conclude this section, we note that the binned-LST map can be tweaked to be made CPTP by replacing the binned Pauli operators B( P ) with ideal Pauli measurement operators Pm = P ⊗ G Î.These operators can be measured by applying a round of ideal errorcorrection (which guarantees k = 0) followed by a standard binned Pauli measurement.Logical state tomography using these operators would, by definition, be equivalent to the partial trace operation over the stabilizer subsystem.However, we note that such ideal measurements are not possible in practice since they involve the preparation of an ideal GKP codestate to perform ideal error correction.
Appendix C: Analytical formula for the partial trace of approximate square GKP state In this appendix we write the explicit analytical formula for the partial trace of a square approximate GKP codestate | ψ∆ ⟩ ∝ e −∆ 2 â † â | ψ⟩, as discussed in Section II.We start with the square subsystem decomposition of the approximate codestate where where we have written Then, the partial trace is given by where the coefficients I s,t are where (C5) We use this expression to produce Fig. 2, which shows the location of the partial trace approximate codestate on the Bloch sphere, by truncating the sum in Eq. ( 22) to s 1 , s 2 , t 1 , t 2 = −2, −1, 0, 1, 2. We also note that similar analytical expressions can be obtained for the logical noise channels considered in Sections VII B to VII D, although these expressions are best obtained using a symbolic package such as Mathematica.

Appendix D: Example: n-mode repetition code
For illustrative purposes, in this appendix we present the stabilizer subsystem decomposition of the n-mode rectangular GKP-repetition qubit code (which we simply refer to as the GKP-repetition code).We describe the structure of the GKP lattice Λ rep and dual lattice Λrep , and their relationship to the parameters (Σ rep , d rep ).We focus on the 3-mode GKP-repetition code since each of the lattices and primitive cells is a direct sum of two 3D lattices in the position and momentum quadratures, allowing for convenient visualization.We present the Voronoi cell of Λrep , and describe the cell transformation between the Voronoi cell of the GKP-repetition code and the primitive cell that corresponds to a "concatenated" decoder, and find that the Voronoi cell has an improved distance compared to the concatenated decoding cell.Moreover, the GKP-repetition code can be tuned such that the distance in position and in momentum is the same, symmetrizing the effect of noise on the code.Although we are not suggesting that quantum computing with the GKP-repetition code is an optimal strategy (see Ref. [36,38] for other multi-mode GKP codes), it does provide a neat illustration of how the bosonic nature of multi-mode GKP codes can be leveraged to enhance GKP-qubit code concatenations.
The GKP-repetition code is defined as follows.We start with the single-mode rectangular GKP qubit code G rect , which has stabilizer generators Ŝ1 = Ŵ ( √ 2α, 0) and Ŝ2 = Ŵ (0, √ 2/α), and parameters for α > 0.Then, we obtain the GKP-repetition code by taking n copies of the G rep,α and promoting the operators Zj Zj+1 to stabilizers, where we have written Zj for the logical Z operator of the j-th mode.The GKP-repetition code logical operators are given in terms of the rectangular GKP logical operators by Xrep = X1 X2 . . .Xn and Zrep = Z1 .There are many ways to obtain the parameters (Σ rep , d rep ) of the GKP-repetition code, but one convenient way is via the encoding circuit in Fig. 8. Here, we have set n = 3 for convenience, although our results generalize to arbitrary n.In this circuit, we start with a square GKP qubit codestate | ψ⟩ sq in the first mode, and square GKP qubit zero states | 0⟩ sq on the second and third modes.The square GKP zero states can equivalently be seen as qunaught states of a rectangular α = √ 2 GKP qunaught code.Next, we apply the Gaussian operator to each mode, where S rect is the symplectic matrix corresponding to Ûrect .After applying Eq. (D2), each state is encoded in a rectangular GKP qubit codestate given by α.Finally, we apply logical controlled-NOT gates between first and second and the first and third modes, where each logical controlled-NOT is a Gaussian unitary given by By comparison with Fig. 3, we can take the product of the symplectic matrices in the encoding circuit from the initial square states, Eq. (D2) and Eq.(D3) to obtain The block-diagonal form of Σ rep represents the fact that the GKP-repetition code is "CSS" in the sense that each stabilizer generator translates either position quadratures or momentum quadratures, but not both.Since the GKP-repetition code encodes a single qubit, we have d rep = (2, 1, 1), which coincides with the dimensions of the initial encoded states in Fig. 8.The GKP lattice and dual lattice generators are given by where (Σ rep ) J is the J-th column of Σ rep .Note that from Eq. ( 39) we have while the remaining displacements of dual lattice generators Ŵ ( m2 ) = Ŵ ( m3 ) = Ŵ ( m5 ) = Ŵ ( m6 ) all represent logical identity gates (i.e.stabilizers) since the qunaught Pauli operators trivially equal X (1) = Z (1) = [1] by Eq. ( 30).Since the 3-mode repetition code is CSS, we can illustrate the GKP lattice Λ rep = Λ q ⊕ Λ p and dual lattice Λrep = Λq ⊕ Λp in the position and momentum sectors as 3D lattices as shown in Fig. 9. Λ q is a cubic lattice with spacing √ 2α, coinciding with the single-mode rectangular GKP Ŝ1 stabilizers.Λ p is a face-centered cubic lattice with spacing √ 2/α, where the cubic lattice points correspond to single-mode rectangular GKP Ŝ2 stabilizers while the face-centered lattice points correspond to stabilizers of the type Zj Zj ′ .For the dual lattice, Λp is a cubic lattice with spacing 1/( √ 2α) since the GKPrepetition code logical Zrep can be implemented with a single-mode rectangular Zj on any of the modes.Finally, Λq is a body-centered cubic lattice with spacing

√
2α where the body-centered lattice points correspond to logical X operators.
The Voronoi cell V rep of the dual lattice Λrep also has a CSS structure and can be split into Voronoi cells V q of Λq and V p of Λp .Since Λp is a cubic lattice, V p is a cube with side-length 1/( √ 2α), and thus the shortest displacement that causes a logical error has length 1/(2 √ 2α).As a result, the GKP-repetition code offers no additional protection against shifts in momentum compared to the single-mode rectangular GKP code.
In contrast, the Voronoi cell V q of the body-centered cubic lattice is a truncated octahedron, as illustrated in Fig. 10(a) and (b).V q has boundaries corresponding to both logical X errors (for each hexagonal face) and logical Î operators (for each square face).The shortest displacement that causes a logical X error has length √ 3α/(2 √ 2), an improvement over the single-mode rectangular GKP code by a factor of √ 3. It is therefore natural to choose α = 3 −1/4 (α = n −1/4 in general) to equalize the logical distance in momentum and in position.This can be interpreted as choosing α to bias the noise of the single- mode rectangular GKP code to compensate for the fact that the repetition code provides additional protection only against shifts in position.
It is interesting to compare the Voronoi cell V q to the primitive cell P concat corresponding to a "concatenated" error-correction procedure which we define as follows: 1. First, perform a round of error-correction on each single-mode rectangular GKP codestate.
2. Then, measure the repetition code stabilizers Z1 Z2 and Z1 Z3 , which take values ±1 since each singlemode GKP state is in the codespace.
3. Finally, perform the correction X † 1 , X † 2 or X † 3 based on the syndrome from the repetition code stabilizers, returning the state to the GKP-repetition codespace.
The corresponding primitive cell is identical to V p in the momentum sector, while in the position sector it is given by P concat , see Fig. 10(c).The shortest displacement outside of P concat has length α/(2 √ 2); however, this displacement does not correspond to a logical error since it crosses a Î boundary.Indeed, using Eq.(66) we can perform a cell transformation P concat → P ′ [Fig.10(d)] along each of the Î-boundaries such that the cell transformation does not affect the logical subsystem.The shortest displacement outside of P ′ has length α/2 and this time corresponds to a logical X error.This is a factor of 3/2 shorter than the corresponding distance of the Voronoi cell V q (in general, this factor is 2n/(n + 1) for any odd n).One could perform a second cell transformation P ′ → V q , but this would require translations along X-boundaries, altering the information in the logical subsystem.(F15) The remaining exponent can be shown to be 0 again from the definition of Eq. (F8b).Thus, we have shown Eq. (F9), and proven that the characteristic function of ÛS is given by Eq. (F8).■ It is worth noting at this point a subtlety regarding the phase of the unitary operator ÛS .The definition of ÛS in Eq. ( 37) only defines ÛS up to an overall phase e iθ .Consequently, our expression Eq. (F8) for the characteristic function of ÛS only applies for the representative of ÛS with Arg tr( ÛS ) = 0. Nevertheless, this is typically of little consequence, since the overall phase of the unitary operator does not affect the state of the system.
As an example, consider the single mode rotation operator ÛR(θ) = −i exp iθ â † â + 1/2 , (F16a) with θ ∈ (0, 2π).Note that the phase of ÛR(θ) is chosen such that Arg tr( ÛR(θ) ) = 0, which can be verified by inserting a coherent state resolution of the identity.Applying Eq. (F8) gives  In the case where (S − I) is not invertible, one can instead find a product of two symplectic matrices S 1 S 2 = S for which S 1 − I and S 2 − I are both invertible and find the characteristic functions of the Gaussian unitary operators ÛS1 and ÛS2 separately.Then, one can use Eq.(84) to find the characteristic function of the overall unitary operator ÛS .However in these specific cases it may be easier to calculate the trace tr ÛS Ŵ (v) † directly.Intuitively, 0-eigenvalues of S − I correspond to δ functions in the corresponding characteristic function.For example, in the extreme case S = I we trivially have tr Î Ŵ (v) † = δ 2n (v).

Gaussian Channels
The proof and result from Appendix F 1 can be extended naturally to obtain the characteristic function of Gaussian channels, as we discuss below.Before doing so, we define a Gaussian channel N in the context of Gaussian quantum computing [51].
First, a Gaussian state ρ is any state whose characteristic function takes the form c µ,V (v) = exp − πv T ΩV Ω T v − iπ(Ωµ) T v , (F21) â † â | 1∆⟩ /2.When we orthonormalize the codestates as described in Appendix G, the state infidelity is lower than the non-orthonormalized codestates, although this difference is only noticeable for very low average photon number n ≤ 1.5, ∆ dB ≤ 6.Note also that the infidelity for the |1⟩ state is larger than that for the |0⟩ state because the bosonic states | ψ∆⟩ tend to the vacuum state as n → 0, which, after the partial trace is applied, has a lower overlap with the qubit state |1⟩ than |0⟩.
GKP qubit code.In particular, we are interested in a logical noise channel in which the approximate codestates are defined by the envelope operator e −∆ 2 â † â, i.e.Since e −∆ 2 â † â is non-unitary, the overall logical noise channel is completely positive (CP) but not tracepreserving (TP).However, in order to define a valid quantum channel, one can orthogonalize the approximate codewords e −∆ 2 â † â | 0⟩ and e −∆ This orthogonalization procedure is equivalent to the Löwdin orthogonalization [53], which orthogonalizes the codewords symmetrically.Conveniently, the inner products ⟨μ| e −2∆ 2 â † â |ν⟩ that define the orthonormalization can be obtained solely from the logical envelope channel E ∆ L (i.e. the map in Eq. (G1) with N 2 set to the identity) via since tracing over the stabilizer subsystem followed by the logical subsystem is equivalent to the total trace over the entire mode.
To apply this to the original problem of defining a CPTP logical noise map, we use the orthonormalization matrix C(∆) given in Eq. (G3) such that | ψ∆,o ⟩ = e −∆ 2 â † âC (∆) | ψ⟩.Thus, we can define a CPTP map N L,o = N L •J [C(∆)].This resulting CPTP logical noise map N L,o is identical to the non-trace-preserving map N L but with the codewords orthonormalized, as required.
Since we use this orthonormalization procedure to define the CPTP logical noise channel N L,o , it is important to consider the effect this has on our results.In Fig. 11, we present the state fidelity ⟨ψ| tr S | ψ∆,(o) ⟩⟨ ψ∆,(o) | |ψ⟩ between the decoded approximate codestates with the logical states they represent.The orthonormalized approximate codestates are orthonormalized via the above procedure, while the non-orthonormalized states are simply normalized by dividing by ⟨ ψ∆ | ψ∆ ⟩ 2 .Importantly, the effect of the orthonormalization procedure is negligible for any states with average photon number greater than roughly 1.5 (or ∆ dB > 6), demonstrating that our procedure does not significantly affect our results in the regime of interest.In Fig. 11 we only show |ψ⟩ = |0⟩ , |1⟩, but similar results can also be obtained for other logical states.
Appendix H: Envelope operator simulations as ∆ → 0 In this appendix we briefly discuss the utility of our simulations in the ideal limit ∆ → 0. In particular, our simulations of the envelope operator, loss, and Gaussian displacements for the square GKP code are all analytic.As long as the error rate is sufficiently low, one can truncate each of the sums in Eq. (88) to s i , t i = −1, 0, 1 to retain only the leading order sources of error.Then, the simulations can be run for arbitrarily squeezed states by simply evaluating each analytic expression for the integral and adding the relevant terms to the superoperator E ∆ .Following this, we again use Appendix G to calculate E ∆ o from E ∆ , and then we can directly extract the average gate infidelity.The run-time of this procedure is limited only by the analytic evaluation of the expressions for the superoperator with large enough precision to reach the extremely low infidelities.is the average photon number of the approximate GKP encoded maximally mixed state.This demonstrates that our methods can be applied easily to approximate GKP codestates with comically large average photon number.
As a proof of principle, in Fig. 12 we present the average gate infidelities of an approximate GKP codestate with no other noise, and an approximate GKP codestate with a loss-rate of γ = 0.1 %, up to an average GKP photon number of ∼ 600 (∆ ≈ 0.029, ∆ dB ≈ 30.8).At this level of squeezing, Fock space simulations would require a truncation dimension which excludes at most ∼ 10 −400 of the total support of the state so that the leading source of error in the simulation is due to the approximate GKP codestate.Moreover, the variance in the photon number distribution of the approximate GKP codestate is also roughly 600, rendering Fock space simulations completely infeasible.While the γ = 0 curve has a well-known approximate analytic expression which tends to being exact as ∆ → 0, it is less clear how one would determine a similar analytic expression for the infidelity associated with γ = 0.1 %, particularly in the region around n ≈ 600 as the curve reaches the optimal ∆.Although such photon numbers are unlikely to ever be experimentally realized, Fig. 12 demonstrates the efficiency and numerical stability of our simulations when applied to square GKP codewords with arbitrary amounts of squeezing.

FIG. 1 . 2 .
FIG. 1. Diagrams representing (a) the stabilizer subsystem for the single-mode square GKP qubit code, (b) the Zak basis with a = √ 2. In subplot (a), each point represents the twodimensional stabilizer subspace V k 1 ,k 2 ; while in (b) each point represents a single Zak state |k1, k2⟩ √ 2 .Applying a random walk of displacement operators to an ideal GKP codestate |ψ⟩ L ⊗ |0, 0⟩ does not affect the logical subsystem until the state reaches one of the quasi-periodic boundaries of the cell; for example causing an X error as shown in (a).The corresponding path is traced out twice in (b) since each basis state |ψ⟩ ⊗ |k1, k2⟩ of the square GKP code consists of superpositions of states |k1, k2⟩ √ 2 and |k1 + 1/ √ 2, k2⟩ √ 2 in the Zak basis.

FIG. 4 .
FIG. 4. (Color) Primitive cell diagrams for (a) the single-mode square GKP qubit code Gsq [Eq.(56)], (b) the Zak basis Z √ 2 [Eq.(72)], (c) the square code transformed by the hexagonal Gaussian transformation Σ hex Gsq, and (d) the single-mode hexagonal GKP qubit code G hex [Eq.(57)].Subplots (a) and (b) are related by an unfolding operation R; (a) and (c) are related by a Gaussian transformation Σ hex ; and (c) and (d) are related by a cell transformation P = Σ hex Vsq → P ′ = V hex , which is performed by shifting each of the coloured regions Pl by the dual lattice vector l to form P ′ .In subplots (a), (c) and (d), each point on the plot represents the two-dimensional simultaneous eigenspace of the GKP stabilizers; while in (b) each point represents a single state.
Voronoi cell V sq .For the Hadamard gate, we have S (sq)

FIG. 5 .
FIG. 5. (Color)Average gate infidelities of the logical noise channels corresponding to loss acting on approximate singlemode square GKP qubit codestates (L γ • E ∆ )L,o, and random Gaussian displacements acting on approximate GKP codestates(G σ • E ∆ )L,o, where σ 2 = γ/(1 − γ)is scaled such that the Gaussian displacement channel is equivalent to loss followed by a quantum-limited amplification via Eq.(100).(a) The average gate infidelities plotted as a function of ∆, where n ≈ 1/(2∆ 2 ) − 1/2 is the average photon number of the approximate GKP encoded maximally mixed state.The γ = 0 curve represents the errors solely resulting from the approximate GKP codestates.(b) Average gate fidelity of the loss channel as a function of γ ≈ κt, which represents the loss of logical information as approximate GKP codestates evolve in time under loss.This is compared to the loss of logical information stored in a trivial Fock encoding {|0⟩ , |1⟩} under the same loss channel.

FIG. 6 .
FIG.6.(Color) Average gate infidelities of the logical noise channels corresponding to dephasing acting on approximate single-mode square GKP qubit codestates(D σ • E ∆ )L,o.(a)The average gate infidelities plotted as a function of ∆, where n ≈ 1/(2∆ 2 ) − 1/2 is the average photon number of the approximate GKP encoded maximally mixed state.(b) Average gate infidelities as a function of σ 2 = κ ϕ t, which represents the loss of logical information as approximate GKP codestates evolve in time under dephasing.This is compared to the loss of logical information stored in a trivial Fock encoding {|0⟩ , |1⟩} under the same pure dephasing channel.

FIG. 9 .
FIG. 9. (Color) The GKP-repetition code lattice Λrep = Λq ⊕ Λp and dual lattice Λrep = Λq ⊕ Λp.In (a) and (c), each dimension represents a position operator on each mode, while in (b) and (d) each dimension represents a momentum operator.We have shown a cell of side-length √ 2α [for (a) and (c)] or √ 2/α [for (b) and (d)], since the lattices extend to infinity in all directions.The lattice generators mJ and dual lattice generators mJ are shown in yellow; m5, m6, m5 and m6 have been displaced from the origin for display purposes.Λq and Λp are cubic lattices, while Λp is a face-centered cubic lattice and Λq is a body-centered cubic lattice.

FIG. 10 .
FIG. 10. (Color) Primitive cells of the position sector of the dual lattice, Λq.(a) The Voronoi cell Vq of the bodycentered cubic lattice is a truncated octahedron.In the stabilizer subsystem decomposition, each face is associated with either an Î-boundary or a X-boundary; as shown in (b) these correspond to the square and hexagonal faces respectively.(c) The primitive cell Pconcat corresponding to a "concatenated" decoder.(d) After performing a cell transformation that only acts along Î-boundaries, the symmetric primitive cell P ′ is obtained.The subsystem decompositions associated with Pconcat and P contain identical logical information.The shortest displacement leading to a logical error is longer for the Voronoi cell Vq than Pconcat or P ′ .

FIG. 12 .
FIG.12.(Color) Average gate infidelity of the logical noise channel (L γ • E ∆ )L,o corresponding to loss applied to approximate single-mode square GKP qubit codestates.We show two different values of loss given by γ = 0, 0.1 %, and show the plot as a function of ∆, where n ≈ 1 2∆ 2 − 1 2 is the average photon number of the approximate GKP encoded maximally mixed state.This demonstrates that our methods can be applied easily to approximate GKP codestates with comically large average photon number.
2, and we've written |v⟩ = |v 1 , v 2 ⟩.We calculate the partial trace by first writing the density operator Encoding circuit for the 3-mode GKP-repetition code.The first mode is zed in a square GKP qubit state | ψ⟩ sq , while the second and third modes are ed in the square GKP 0 state | 0⟩ sq .Then, each square GKP state is squeezed via esulting in a rectangular GKP state.Finally, the rectangular GKP codestates are d in a repetition code via two logical controlled-NOT gates, resulting in a 3-mode epetition codestate.2FIG. 8. Encoding circuit for the 3-mode GKP-repetition code.The first mode is initialized in a square GKP qubit state | ψ⟩ sq , while the second and third modes are initialized in the square GKP 0 state | 0⟩ sq .Then, each square GKP state is squeezed via Ûrect, resulting in a rectangular GKP state.Finally, the rectangular GKP codestates are encoded in a repetition code via two logical controlled-NOT gates, resulting in a 3-mode GKP-repetition codestate.