Measurement-free preparation of grid states

Quantum computing potentially offers exponential speed-ups over classical computing for certain tasks. A central, outstanding challenge to making quantum computing practical is to achieve fault tolerance, meaning that computations of any length or size can be realized in the presence of noise. The Gottesman-Kitaev-Preskill code is a promising approach toward fault-tolerant quantum computing, encoding logical qubits into grid states of harmonic oscillators. However, for the code to be fault tolerant, the quality of the grid states has to be extremely high. Approximate grid states have recently been realized experimentally, but their quality is still insufficient for fault tolerance. Current implementable protocols for generating grid states rely on measurements of ancillary qubits combined with either postselection or feed forward. Implementing such measurements take up significant time during which the states decohere, thus limiting their quality. Here, we propose a measurement-free preparation protocol, which deterministically prepares arbitrary logical grid states with a rectangular or hexagonal lattice. The protocol can be readily implemented in trapped-ion or superconducting-circuit platforms to generate high-quality grid states using only a few interactions, even with the noise levels found in current systems.


I. INTRODUCTION
Quantum computing offers exponential speeds-ups in solving certain computational problems, with wideranging consequences for information processing, information security, fundamental physics and chemistry and more.Impressive progress has been achieved towards realising quantum computing, including recent experimental demonstration of a quantum advantage over classical computation [1].However, real devices are subject to noise and imperfections.As computations grow in size and complexity, errors accumulate and eventually destroy any quantum advantage unless mitigated.Achieving fault tolerance, where errors are corrected sufficiently fast to allow scalable computation, is a central challenge to making universal quantum computing practical.
Quantum error correction (QEC) enables large-scale quantum computing in the presence of noise by redundantly encoding logical qubits into a larger Hilbert space.In traditional, discrete-variable QEC many physical qubits make up a single logical qubit.However, in 2001 Gottesman, Kitaev and Preskill (GKP) proposed encoding a logical qubit into the infinite-dimensional Hilbert space spanned by the continuous variables of a single bosonic mode [2].With this encoding, small displacement errors of the bosonic mode can be detected and corrected using only simple Gaussian operations.Furthermore, recent results have shown that the GKP code also performs very well against boson loss [3], in many cases outperforming other bosonic codes designed specifically against loss such as cat codes [4,5] and binomial codes [6,7].In fact, numerical optimization suggests that the hexagonal GKP code might be the optimal loss-resistant code among all bosonic codes [8].Additionally, GKP codes have recently been shown to have applications within continuous-variable QEC [9] and quantum metrology [10].
An ideal GKP code is embedded in an idealized grid state which forms a lattice structure, consisting of an infinite superposition of position eigenstates.Such states require infinite energy and are hence unphysical.Importantly, however, it is possible to use approximate grid states with finite energy, composed of finitely squeezed states to achieve fault tolerance by concatenating the GKP code with discrete-variable error-correcting codes, provided that the grid states are sufficiently quadrature squeezed.In 2014, a conservative threshold for fault tolerance of 20.5 dB squeezing was derived for a measurement-based quantum computing approach [11].Later this threshold was significantly reduced to less than 10 dB squeezing by exploiting the analog information contained in the syndrome measurements [12,13].Other approaches such as concatenating the GKP code with the surface code [14], the toric code [15,16] and Knill's C 4 /C 6 code [17] have recently been proposed.For any of these proposals the squeezing threshold will depend not only on the involved codes, but also on the type and magnitude of the noise and experimental errors of the given system.It is therefore crucial to test the feasibility of these approaches with high-quality grid states experimentally.Additionally, as with any quantum error-correcting code, one would ideally use grid states with squeezing levels well above the threshold to avoid impractical resource overheads associated with the repeated concatenation of the codes.
The preparation of grid states have, however, proven to be highly challenging.Recently, such states were pre-pared for the first time in ground-breaking experiments in the motional state of a trapped ion [18] and in a microwave cavity field coupled to a superconducting circuit [19].The states realised in these experiments clearly exhibit the required grid structure in phase space.However, the quality of the states needs to be improved for implementation with fault tolerant schemes.The main experimental limitation is that during the preparation protocol, the states accumulate noise e.g. from boson dephasing and losses, rendering the produced grid states noisy.
To minimize this noise one has to increase the speed of the preparation protocol.The state-preparation protocols currently implemented in experiment use oscillatorqubit couplings and rely on repeated measurements of the ancilla qubit.These measurements and their associated processing times constitute about half of the total preparation time.Therefore, to improve the quality of the GKP codes, it is crucial to replace the slow measurement-based approach with a faster approach.
In this work, we present a new, measurement-free gridstate preparation protocol, which is significantly faster than known methods, without introducing additional resources.The key interaction of our protocol is the Rabi interaction Hamiltonian between an oscillator and a twolevel system [20,21], which can be effectively simulated in trapped-ion and microwave systems.This interaction is also used in the experiments of Refs.[18,19].Such interactions were recently shown to enable deterministic, non-Gaussian operations by using many weak interactions [22,23].Here, we instead use only a few, but stronger interactions, to generate the highly non-Gaussian grid states.Our work thus provides further demonstration of Rabi interactions as a powerful and versatile non-Gaussian resource in trapped ion and superconducting circuit platforms.
The speed-up obtained with our approach is large enough to prepare grid states with more than 10 dB of effective squeezing in practical systems that are readily available in both trapped-ion and microwave cavity platforms.With a further reduction of noise levels in future experiments, our protocol enables the generation of grid states with squeezing levels well above the fault-tolerance threshold levels, thus facilitating scalable quantum computing.

II. GRID STATES
In this section we review the basic structure of grid states and the figures of merit used in this article.For a more extensive review, see e.g.Ref. [24].
Bosonic modes of harmonic oscillators are associated with the creation and annihilation operators â and â † and the corresponding dimensionless quadrature operators X = 1 ( By choosing Im(αβ * ) = 2π we ensure that the stabilizers commute, which enables the existence of simultaneous eigenstates.Furthermore we can define logical operators , and ŶL = D α + β 2 , (3) which commute with the stabilizers and anti-commute with each other.The logical GKP qubit states, |0 GKP and |1 GKP , are then defined as the ±1 eigenstates of ẐL .These satisfy the expected logic XL |0 GKP = |1 GKP and XL |1 GKP = |0 GKP .
The relative directions and magnitude of α and β determine the lattice of the corresponding grid states.For example, rectangular grid states are generated by α = i2π/β * .Further choosing β = √ 2π yields the square grid states for which the code space is symmetric with respect to X and P .Alternatively, choosing α = i 4 √ 3 π and β = e −i π 3 α yields the hexagonal grid states.In the following we will consider only the square grid, returning to the case of rectangular and hexagonals grid in Section III C. The (unnormalizable) ideal square grid states can be written as: where |X = 0 denotes the eigenstate of X with eigenvalue 0 and Z denotes the set of integers.The ideal grid states are thus infinite superpositions of equidistant position eigenstates and their Wigner functions are an infinite grid of 2-dimensional delta-functions (see Fig. 2(b)).
Ideal grid states can be approximated by finite-energy states in several ways.The most commonly used representation for deriving fault tolerance thresholds is a superposition of finitely squeezed states of width e −r under a Gaussian envelope of width κ −1 : where Ŝr = e − 1 2 r(â 2 −â †2 ) is the squeezing operator (not to be confused with the stabilizers Ŝx and Ŝz ).The squeezing parameter r and envelope κ characterises the quality of the states in the X-and P -quadratures respectively and in the limit (e −r , κ) → (0, 0) the approximate states converge to the exact states of equation (4).For κ = e −r the states can correct noise equally well in X and P .
However, physical grid states will never exactly be of the form given in equation (5).First, physical states are not pure and are generally described by a density matrix ρ.Secondly, the exact Gaussian envelope can be difficult to obtain and most preparation protocols yield a finite sum of squeezed states.Therefore, the parameters r and κ are not well-defined for practically realizable states.Instead, more generic figures of merit, the effective squeezing parameters, have been suggested in Ref. [10].They quantify the effective degree of squeezing in each quadrature of the peaks constituting the grid state and are defined as: where the effective squeezing levels in units of dB are given by ∆ dB = −10 log 10 (∆ 2 ).The expectation values in these definitions are exactly the expectation values of the stabilizers Ŝz and Ŝx for square GKP states.High quality grid states should therefore have | Ŝz/x | ≈ 1, in which case ∆ X/P → ∞ dB.These definitions also have the nice property that for squeezed states they reproduce the squeezing parameter, i.e. ∆ X ( Ŝr |vac ) = e −r and ∆ P ( Ŝr |vac ) = e r .Furthermore, for approximate square lattice grid states of Eq. ( 5) we extract the parameters ∆ X (| 0 GKP ) = e −r and ∆ P (| 0 GKP ) ≈ κ.The last approximation is very accurate for e −r , κ > 10 dB.Thus, if the state resembles a grid state consisting of a grid of squeezed peaks in phase-space, the effective squeezing parameters approximately quantify the squeezing of these peaks in each quadrature direction.
However, it is important to note that the effective squeezing is not directly related to the fault-tolerance thresholds.Most GKP-based fault-tolerance thresholds are derived based on the specific, approximate states given in Eq. ( 5) and refer to r and κ.Any other state can therefore in general not be guaranteed to enable fault tolerant computations, even when the effective squeezing parameters are both above these thresholds.Moreover, the effective squeezing parameters say nothing about the logic state of the GKP qubit, e.g. a mixed code state might be strongly squeezed, but might not necessarily be useful for quantum computing.
Nevertheless, it is reasonable to assume that states with a high degree of effective squeezing can be used for fault tolerance if they otherwise closely resemble the approximate pure grid states of Eq. ( 5), e.g. in terms of their fidelity with the approximate states.In the further analysis we therefore compliment the effective squeezing parameters with the fidelity to verify the appropriateness of using the effective squeezing parameters as quantifiers of the protocol performance.Moreover, we also verify that the produced states have the expected grid structure in terms of their Wigner function.Another alternative figure of merit is the effective shift error [25] which is discussed and calculated in Appendix A.

III. PREPARATION PROTOCOL
Several proposals exist for the preparation of approximate grid states [2,19,[26][27][28][29][30][31][32].The original GKP paper [2] includes a proposal based on an radiation-pressure-like interaction between two bosonic modes under the Hamiltonian X1 â † 2 â2 in the quantum non-linear regime.However, experimental realization of the required strongly nonlinear coupling has proven highly challenging and has not yet been achieved.
In [26], a preparation protocol based on the Rabi interaction Hamiltonian P σx (where σx is the Pauli-x matrix), between the bosonic mode and a two-level system was proposed.Such an interaction can be realized in trapped ions [33] and microwave cavities [19].This protocol, however, has three main drawbacks: First it is probabilistic, with a success probability inversely proportional to the mean photon number of the generated state.Secondly, the output states have a box-shaped envelope rather than the Gaussian envelope of equation ( 5).This means that the effective squeezing parameters are suboptimal given the number steps required to prepare the states.Hence, excessively large states need to be generated to obtain useful effective squeezing.Finally, the protocol requires qubit measurements, which in realistic systems will constitute a significant contribution to the total preparation time during which the state decoheres.
The two first issues were solved by Terhal and Weigand in Ref. [27]: By adding a single measurement-based feedforward displacement operation as well as suitable qubit rotations, the protocol is made deterministic.Furthermore, by using a different strength of the Rabi interactions, the envelope of the output state is made nearly Gaussian, making the protocol much more efficient.However, their protocol still relies on qubit measurements, which limits the quality of the states that can be realistically generated in the laboratory today.
Our protocol addresses all the above mentioned problems by adding additional short Rabi interactions of the form X σy , which effectively act as "deterministic measurements" by disentangling the bosonic mode and the qubit and further enables us to shape the envelope of the state.This interaction can be obtained from the P σx Hamiltonian by simple rotations of the qubit and the bosonic mode, Similarly, both interaction types can be obtained from the more commonly considered Rabi Hamiltonian X σx .Fig. 1(a) shows a circuit diagram of the protocol.It consist of N groups of interactions, each consisting of 3 gates: • a preparation gate, Ûk = e iu k X σy .
• a displacement gate, Vk = e iv k P σx .
• a disentangling gate, Ŵk = e iw k X σy .These interactions can be interpreted as either conditional displacements of the bosonic mode or conditional rotations of the qubit, as illustrated in Fig. 1(b).Since the preparation and disentangling gates are of the same type, i.e.X σy , the preparation gate of round k can be combined with the disentangling gate of round k − 1 into a single gate.The interaction strengths of the displacement and disentangling gates are given by while the interaction strengths of the preparation gates, u k , are found numerically (see Appendix B).In the first round the optimal preparation gate strength is u 1 = 0 i.e.Û1 = 1 so Û1 is thus ignored in Fig. 1(a).The input state is a squeezed vacuum state Ŝr |vac and the output state is an approximation to the state |1 GKP , which can subsequently be transformed into an arbitrary grid state, as will be discussed later.Note that all gates commute with D(i Therefore, ∆ X is left invariant under the protocol, i.e. the effective squeezing of the output state in the X-quadrature is ∆ X = e −r .The effect of the protocol is thus to create a superposition of 2 N squeezed states and thereby improve ∆ P .The effect of each gate is illustrated in Fig. 1(c) for the case of N = 3, but the procedure can be extended for arbitrary N .

A. Infinitely squeezed input states
To illustrate the functionality of the gates, we first consider an infinitely squeezed input state, |X = 0 .For brevity we will use the notation |X = x 0 = |x 0 x in the following.The first operation is the displacement gate V1 which creates an entangled boson-qubit state: where |± = (|0 ± |1 )/ √ 2. The disentangling gate then rotates the qubit to erase the entanglement: (10) We have thus created a superposition between two squeezed states.The second round splits each of these peaks in two, creating a total of four peaks: The coefficients are controlled by the preparation gate and are given by a 1 = sin(π/4 + 2 N −1 √ πu 2 ) and b 1 = cos(π/4 + 2 N −1 √ πu 2 ).The third round creates 8 peaks and so on for a total of 2 N peaks after N rounds.Thus, the resulting state is where the coefficients c k can be optimized by tuning the strengths of the preparation gates (see Appendix B).For these infinitely squeezed input states we can obtain ∆ P = {6.6,11.6, 16.6, 20.6} dB, for N = {1, 2, 3, 4}, and ∆ X = ∞ dB as ∆ X is determined solely by the initial squeezing of the input state.

B. Finitely squeezed input states
For a finitely squeezed input state the protocol outlined above is not exact, and in particular the disentangling operation is not exact.Thus, after tracing out the qubit the resulting state is mixed, but the effect on ∆ P of the output state is very small.This can be seen in Fig. 2(a) which shows ∆ P as a function of the input squeezing.Since ∆ X = e −r is preserved during the protocol, high effective squeezing can be obtained simultaneously in both quadratures even with finitely squeezed input states.
Note that, as seen from Fig. 2, even with vacuum input a significant amount of effective squeezing can be obtained.By applying the protocol twice, once in each quadrature direction, we can therefore generate grid-like states with high degrees of effective squeezing in both quadratures.However, a careful analysis (presented in Appendix C) shows that these states are not well-defined pure states in the GKP basis, and therefore, seemingly, unsuitable for GKP-based computations.
In Fig. 2(b) (left) we present the Wigner functions of the generated states for N = 2 and N = 3 with input squeezing of 11.5 dB and 16.6 dB respectively, in which case equal effective squeezing in X and P is obtained.For comparison, we also plot the Wigner functions of the corresponding target approximate grid states given by equation ( 5) with the same amount of squeezing (right plots in Fig. 2(b)).For N = 2 we observe very small differences in the edges of the states which are caused by the cut-off in the number of squeezed states in the superposition of the generated state.Despite these differences, the resulting fidelity is already 93.5%.For N = 3 the differences becomes much less pronounced and the fidelity increases to 99.3%.Thus, very few rounds of operations are required to make grid states with high effective squeezing and near unity fidelity to the commonly considered approximate grid states of equation (5).

C. Preparation of arbitrary logical states
The state generated so far is the logical |1 state of the square GKP code.It is, however, important to be able to generate an arbitrary logical grid state, i.e. of the form c 0 |0 GKP + c 1 |1 GKP .In particular, magic states, such as |H = cos(π/8)|0 GKP + sin(π/8)|1 GKP are highly important as they serve as resources for performing non-Clifford operations via gate teleportation.
Furthermore, non-square rectangular grid stateswhich are equivalent to squeezed square grid states-are also a useful resource, as they remove the need for inline squeezing using a newly developed modified Glancy and Knill error recovery scheme [34].In the following we thus discuss how to generate the arbitrary logical grid state with both rectangular and hexagonal lattices.
We first note that rectangular lattices map onto square lattices simply by scaling the quadratures, i.e.X → C X and P → C −1 P where C is the scale factor.These scalings can consequently be straightforwardly implemented by appropriate scaling of the interaction parameters, i.e. u → Cu, v → C −1 v and w → Cw.To generate hexagonal states we utilize the fact that the hexagonal logical |1 state is identical to the logical |1 state of the rectangular lattice with α = i 4 The circuit diagram shown in Fig. 3(a) shows how to map the logical |1 state into arbitrary logic states using three Rabi-interactions û, v and ŵ.The idea is to proceed with the scheme for generating the logical |1 state, but exploiting the linearity of the protocol and the fact that the effect of the displacement gate depends on the state of the qubit.Therefore, by initializing the qubit in the state c 0 |− − c 1 |+ , we effectively transfer the coefficients of the qubit onto the grid state.The additional two, unconditional, displacement operations ensure that the resulting state is on the lattice.The first operation D(α/4) can be effectively implemented during the preparation protocol by inverting the sign of w N , while the second unconditional operation D(β/4) simply shifts the lattice for all states and can therefore be virtually implemented by a shift of reference frame.The strength of the first conditional operation u , and the qubit-dependence φ of the preparation gate û depends on the target logical state and are found by numerical optimization (σ φ = cos(φ)σ x + sin(φ)σ y represents a generalized Pauli operator in the x-z plane).The gate û is not crucial for the scheme, but only improves the quality of the output states by allowing a degree of control over the envelope of the output state.The strength of the disentangling gate ŵ is w = −π/( √ 2Re(β)).Fig. 3(b) and (c) show the Wigner functions of various logical states with square and hexagonal lattices respectively, numerically generated using this protocol, showing clear, well-defined grid structures.

IV. EFFECTS OF NOISE
We now consider the effect of relevant noise sources on our protocol.To include noise effects in our model, we consider each gate as being implemented with a specific Hamiltonian for a set duration, e.g. the gate e ic X σy is implemented via the Hamiltonian Ĥ = 1 T X σy within the time t = cT .To simulate the added noise, we use a master equation approach in which noise is included in the Lindblad terms L: where ρ is the density matrix of the composite bosonqubit system.We consider four common noise channels: Effective squeezing in X and P for a square grid state as a function of noise rate for different noise sources during the preparation protocol.γ is the noise rate and T is the time required to implement e i X σy and e i P σx .
• Boson loss: L = √ γâ • Boson dephasing: L = √ γ(ââ † + â † â) • Qubit dephasing: L = √ γ σz The effect of these noise sources on the effective squeezing of the output states is shown by the solid lines in Fig. 4. For each noise source we consider N = 2 and N = 3 rounds with 11.5 dB and 16.6 dB squeezed input states respectively.It is clear that our protocol is sensitive to all types of noise.By increasing N we also increase the implementation time of the protocol, thus increasing the effect of noise.Therefore, there exists an optimal number of rounds that depends on the magnitude and type of noise.E.g. for large noise contributions, two rounds (N = 2) of the scheme produces states with higher effective squeezing degrees than three rounds (N = 3), and this is simply a result of the extended time over which noise can accumulate.This clearly illustrates the importance of a fast preparation protocol.
Even though the quality of the generated states is limited by qubit and bosonic errors, the effect of qubit errors can be significantly suppressed by adding a few qubit measurements, after each of the disentangling gates Ŵ .In the noiseless case, the qubit should be in a known state, disentangled from the bosonic mode at these points, as illustrated in the rightmost windows of Fig. 1(c).Therefore, if we measure the qubit in a different state, we know that an error has occurred, and the realization should be discarded and the protocol restarted.The result of such a postselection strategy is shown by the dashed lines in Fig. 4, demonstrating that we can improve the effective squeezing of the output state by several dB.Bosonic errors, on the other hand, are largely unaffected by the postselection strategy.Thus, when these errors are dominating the only way to improve the output states is to increase the interaction speed or reduce the rate of the noise.For the calculation of Fig. 4 we assumed instantaneous measurements to isolate the effect of qubit projections.In real systems the measurements will take time, during which noise accumulates thus resulting in lower effective squeezing parameters.However, compared to the measurementbased schemes, e.g.phase-estimation [27], we require exponentially fewer measurements and therefore still attain a significant speed-up.
Using realistic noise parameters and operation speeds from recent experiments with trapped ions [18] and microwave cavities [19], we find that grid states with effective squeezing parameters above 10 dB in both quadrature can be realistically generated in both platforms using input states squeezed by 11 dB (see Appendix D).Squeezing levels of 12.6 dB in trapped ions [35] and 10 dB in microwave cavities [36] have been experimentally generated.

V. CONCLUSION
In conclusion, we have presented a measurement-free protocol to deterministically prepare GKP states using only few interactions of the type X σy and P σx , which are readily available in trapped-ion and microwave-cavity platforms.Our protocol requires no measurements, resulting in a speed-up over previous methods, which enables the generation of grid states with high effective squeezing levels.Furthermore, by adding a few measurements we can partly detect qubit errors, thus making the protocol robust against qubit noise.Although the exact requirements for general CV states (i.e.states not exactly on the form of Eq. ( 5)) to enable fault-tolerance with the GKP encoding are yet unknown, it seems reasonable that states generated using this protocol suffices, due to their high fidelity with the commonly considered approximate grid states of Eq. ( 5).
Finally, our protocol exemplifies the versatility of sequential applications of non-commuting Rabi Hamiltonians, e.g.P σx and X σy , demonstrating that highly non-Gaussian states can be deterministically engineered with only a few of these interactions.The full power of such repeated combination of Rabi interactions remains still relatively unexplored, but we expect that many other interesting applications are possible using this technique.The preparation gates are used to shape the envelope of the prepared grid state in order to optimize the quality of the states.For infinite input squeezing, the coefficients of Eq. ( 12) for N ∈ 2, 3, 4 are: • N = 3: and c m = c 2 N −m+1 for m > 2 N −1 .Using these expressions one can tune the interaction strengths, u k , to optimize the quality of the prepared grid state with respect to any desired figure of merit (FOM).In general, for the finite sum of 2 N infinitely squeezed states as given by Eq. ( 12), the expectation value of D( √ 2π) used to calculate ∆ P (Eq.( 6)) is given by and the grid-state-basis wavefunction ρ uv,uv used to calculate P √ π/6 error (Eq.(A3)) is given by Table I shows the calculated optimal interaction strengths and obtained FOMs when optimizing P √ π/6 error and ∆ P respectively.For comparison, we also compute the FOMs for the unconstrained optimal distribution, i.e. when freely optimizing over all possible coefficients c k .We see, that even though we have only N degrees of freedom to tune 2 N − 1 independent variables, we can obtain practically optimal FOMs.The only notable difference is for N = 4 when optimizing error , for which the optimal distribution is two orders of magnitude better than what can be obtained in our scheme.However, for practical purposes, the quality of the generated states will be limited by external noise sources, and therefore the optimal number of rounds will likely be limited to N = 3 (see Appendix D).
We also list the values of the FOMs corresponding to a flat distribution, i.e.where all c k 's are equal.Such a distribution is obtained in our scheme by removing the preparation gates.For N ≥ 3 we see a significant improvement by tuning the peaks compared to the flat distribution.
For comparison, the technique of adaptive phase estimation [27] also prepares a finite superposition of squeezed states.For M = 7 rounds of phase estimation, 8 peaks are obtained corresponding to N = 3 in our scheme.The quality of the states obtained depends on measurement results, but the best-case scenario for M = 7 has P error = 2.3 × 10 −3 and ∆ P = 16.6 for N = 3 of our protocol.Our protocol thus outperforms adaptive phase estimation for any measurement outcome.However, the phase estimation protocol has the advantage of generating one peak at a time, and therefore the number of rounds can be better tuned to optimize the output state given the noise of the particular system.Yet, we believe that the main advantage of our protocol is the lack of measurements, which ultimately significantly speeds up the protocol, resulting in less accumulated noise.Additionally, for trapped-ion systems, qubit measurements can disturb the bosonic mode depending on the outcome, thus requiring postselection even with the phase estimation protocol.Therefore phase estimation does not scale well in this system, as the success probability decreases exponentially with the number of rounds.
We generally note that P error is a much more sensitive FOM compared to ∆ P .For example, for N = 4 the effective shift error can be improved by several orders of magnitude by tuning the coefficients, whereas the effective squeezing is "only" improved by less than 5 dB, i.e. less than an order of magnitude.Note also, that for N = 3 the difference in ∆ P when optimizing ∆ P compared to P √ π/6 error is only 0.4 dB, where the difference in P error is approximately a factor 3. This shows that states with similar effective squeezing can have significantly different effective shift errors.Since the effective shift error is more directly related to the error-correcting properties of the GKP states, care should therefore be taken when comparing only effective squeezing parameters.
For the results presented in the main text of this paper we have chosen u k 's to optimize P √ π/6 error .For finite squeezing we have found no noticeable improvement in the FOMs by further tuning the u k 's to take into account the finite squeezing, and we have therefore used the values of u k listed in Table I for all simulations.

APPENDIX C: NO INITIAL SQUEEZING
In Fig. 2 we showed that high effective squeezing can be generated without any initial squeezing in the bosonic mode.This raises the question whether the protocol can be used to generate grid states directly from vacuum.In particular, one can start from vacuum and apply the protocol twice, once in each quadrature direction, to generate high effective squeezing in both quadratures simultaneously.The Wigner functions of the states generated with this approach are shown for N = 2 and N = 3 in the insets of Fig. 6.The states have a clear grid-like structure, but it is not immediately clear if they represent useful GKP logic states, i.e. if they approach the form c 0 |0 GKP + c 1 |1 GKP for some coefficients c 0 and c 1 .
To examine this, we calculate the expectation value of the rotated Pauli operators (C1) If the generated state approaches a logical GKP state we should have | ÛL | → 1 for some (c 0 , c 1 ).Fig. 6 shows the maximum value of | ÛL | as a function of N .We observe that | ÛL | does not appear to converge to 1, showing that the states do not represent useful GKP logic states.Still, The generated states do have high effective squeezing in both quadratures, so they would be a useful resource for detecting displacements [10].TABLE I. Optimal interaction strengths u k , and resulting effective shift errors and effective squeezing for N = 1, 2, 3, 4. The optimal distribution is calculated by optimizing over all c k in Eq. ( 12) and the flat distribution is given by equal c k 's, which is obtained by removing the "preparation gate" in our protocol.

APPENDIX D: REALISTIC NOISE PARAMETERS
Grid states were generated for the first time very recently in the motional state of a trapped ion [18] and in a microwave cavity field coupled to a superconducting circuit [19].These experiments obtained effective squeezing parameters of ∆ X = 5.5 dB and ∆ P = 7.3 dB, and ∆ X , ∆ P ∈ [7.4; 9.5] respectively.To benchmark our pro-FIG.7. Effective squeezing and effective shift error as function of input squeezing as simulated using the master equation ( 13), using the noise types and strengths associated with recent experiments using trapped ions [18] and microwave cavities [19], as listed in Table II.
tocol, we simulate it with the Lindblad master equation, Eq. 13, using the parameters given in these experiments, as listed in Table II.The calculated FOMs as a function of input squeezing are shown in Fig. 7.In both platforms we can obtain more than 10 dB effective squeezing in both quadratures simultaneously with > 11 dB input squeezing.For the trapped ion platform the optimal number of rounds is with N = 2.For the microwave cavity platform both N = 2 and N = 3 allows for more than 10 dB output effective squeezing for sufficient input squeezing, with N = 3 reaching 12 dB using the measure-  [19] and trapped ions [18].The interaction timescale, T , is the time required to perform the operations e i X σy or e i P σx .

FIG. 1 .
FIG. 1.(a) Circuit diagram of the measurement-free grid state generation protocol.The bosonic mode interacts with the qubit through a sequence of Rabi gates with interaction Hamiltonians of the form P σx and X σy to produce an approximate GKP 1 logic state without measurements.(b) The Rabi gates can be viewed either as conditional displacements on the bosonic mode depending on the qubit state or conditional rotations of the qubit depending on the bosonic state.(c) Illustration of the protocol for N = 3 for an infinitely squeezed input state.The ket above each peak in the wave function represents the state of the qubit entangled with the given peak.The displacement gates V split each peak in two, creating an entangled state.The disentangling gates Ŵ then rotate the qubit depending on the boson state to remove the entanglement.The preparation gates Û rotate the qubit before the displacement gates to control the envelope of the resulting state.

FIG. 2 .
FIG. 2. (a) Effective squeezing in the P quadrature, ∆P , as a function of squeezing in the X quadrature of the input state after N rounds.∆X is invariant under the protocol.The dashed line is ∆P = ∆X = e −r .(b) Left: Wigner functions of the generated states for N = 2 and N = 3 with 11.5 dB and 16.6 dB input squeezing respectively.The plotted states are marked with (i) and (ii) in (a).Right: Wigner functions of the target approximate GKP states given by equation (5).

FIG. 3 .
FIG. 3. (a) Circuit diagram for preparing arbitrary logical GKP states.(b) Wigner functions for various logical square grid states numerically generated using our scheme with N = 3 and 16.6 dB input squeezing.(c) Wigner functions for various logical hexagonal grid states generated using N = 3 and 15 dB input squeezing.The arrows in the top plot of (b) and (c) show the directions and magnitude of the stabilizer displacements Ŝz and Ŝx.

√ 3 π
and β = √ 3π.We can thus also initialize the logical |1 state of the hexagonal lattice.

FIG. 5 .
FIG. 5. Effective shift error as a function of input squeezing.Dashed lines show the limits for infinite squeezing.The black dotted line shows the effective shift error for the approximate GKP states given by equation (5).

FIG. 6 .
FIG. 6. Maximum expectation value over all rotated Paulioperators in the GKP-logical subspace for states generated without initial squeezing.The states are generated by applying the protocol of Fig. 1(a) twice with a π/2 rotation of the bosonic mode in between.As N increases the expectation value does not converge to 1, showing that these states do not represent pure GKP logical states.The insets show the Wigner functions of the generated state for N = 2 and N = 3.

TABLE II .
Interaction timescale and relevant noise types and rates in recent experiments with microwave cavities