Linear-optical approach to encoding qubits into harmonic-oscillator modes via quantum walks
Jun-Yi Wu Shin-Tza Wu





phystw@gmail.com

^1Department of Physics, Tamkang University, New Taipei 251, Taiwan 

^2Center for Advanced Quantum computing, Tamkang University, New Taipei 251, Taiwan


^3Physics Division, National Center for Theoretical Sciences, Taipei 10617, Taiwan

^4Department of Physics, National Chung Cheng University, Chiayi 621, Taiwan




We propose a linear-optical scheme that allows encoding grid-state quantum bits (qubits) into a bosonic mode 
using cat state and post-selection as sources of non-Gaussianity in the encoding. 
As a linear-optical realization of the quantum-walk 
encoding scheme in [Lin et al., Quantum Info. Processing 19, 272 (2020)], we employ the cat state 
as a quantum coin that enables encoding approximate Gottesman-Kitaev-Preskill (GKP) qubits through quantum walk 
of a squeezed vacuum state in phase space. We show that the conditional phase-space displacement necessary 
for the encoding can be realized 
through a Mach-Zehnder interferometer (MZI) assisted with ancillary cat-state input under appropriate parameter regimes. 
By analyzing the fidelity of the MZI-based displacement operation, we identify the region of parameter space over 
which the proposed linear-optical scheme can generate grid-state qubits with high fidelity. 
With adequate parameter setting, our proposal should be accessible to current optical and 
superconducting-circuit platforms 
in preparing grid-state qubits for bosonic modes in the, respectively, optical and microwave domains.  


Linear-optical approach to encoding qubits into harmonic-oscillator modes via quantum walks
    Jun-Yi Wu^1,2,3 and Shin-Tza Wu^4
    April 29, 2024
===========================================================================================






§ INTRODUCTION


Computation and information processing based on quantum-mechanical systems 
have open up new horizons to information sciences. Quantum algorithms and communication 
protocols surpassing their classical counterparts in computational efficiency and communicational 
security, respectively, have been developed based on this new paradigm <cit.>. 
The physical realizations of these ideas, however, have been impeded by the extreme fragility of 
quantum systems against external perturbations. One common remedy to this is to resort to 
techniques of quantum error corrections, which seek to protect logical information by redundantly 
encoding the information into a larger quantum mechanical state-space <cit.>. For instance, 
in computational schemes with an underlying two-dimensional logical basis, one may 
choose to encode logical information using a manifold of two-level systems in a tailored way that can allow 
detecting and correcting the predominant errors of the specific physical system. This approach, however, 
tends to incur heavy resource overheads in the computation and poses challenges to its large-scale 
implementation. Alternately, one may choose to adopt computational schemes that 
employ quantum systems with continuous spectra, usually referred to as continuous-variable (CV) systems, 
and exploit their infinite-dimensional state spaces for the encoding. In the case of 
a bosonic field mode, the logical information can be encoded using eigenstates of its canonical 
coordinates, which are usually compared to the position and momentum of a quantum simple harmonic oscillator 
<cit.>. In the presence of noises, these basis states would be exposed to 
random shifting over phase space that can result in “shift errors" in the logical information. 
In order to tackle such errors, Gottesman, Kitaev, and Preskill (GKP) propose to 
embed quantum bits (qubits) into the bosonic mode in a way that the logical basis states would comprise 
superposition of uniformly spaced position eigenstates with period 2√(π) <cit.>

    |0⟩_L    ≡   ∑_s=-∞^∞|2s√(π) ⟩_x
    = 1/√(2)∑_s=-∞^∞|s√(π) ⟩_p   ,
    
    
    |1⟩_L    ≡   ∑_s=-∞^∞|(2s+1)√(π) ⟩_x
    = 1/√(2)∑_s=-∞^∞(-1)^s |s√(π) ⟩_p ,

where |x⟩_x and |p⟩_p are, respectively, the position
and momentum eigenstates of the bosonic mode. In the position-space representation, 
the codestates |0⟩_L and |1⟩_L are superposition of
delta functions located at, respectively, even and odd multiples of
√(π). For sufficiently small shift errors in the position quadrature, one can 
thus detect and correct them through position measurements. Likewise, 
the momentum-space structures of the conjugate basis states 
{|±⟩_L≡(|0⟩_L±|1⟩_L)/√(2)} enable the
detection and correction of small shift errors in the momentum quadrature. 
In the quantum-mechanical phase space, the Wigner functions of the codestates ideal_GKP 
take the forms of checkerboard, square-lattice structures, which can also be extended to 
more general “grid states", such as codestates with rectangular or hexagonal lattice 
structures in phase space <cit.>. In the present work, however, we will be focusing mainly on 
the square-lattice GKP codestates ideal_GKP. 

Despite the elegance of the GKP scheme, the ideal codestates 
ideal_GKP are unphysical, as their preparation would require infinite 
squeezing, and hence infinite energy. In practice, therefore, it is necessary to approximate
ideal_GKP with finitely squeezed states, such as uniformly
spaced Gaussian spikes modulated by Gaussian envelopes <cit.>. Experimental preparation of 
such approximate codeword states, nonetheless, turn out extremely challenging due to the highly non-Gaussian 
nature of these states. It is after decades of theoretical <cit.> 
and experimental endeavors that approximate GKP codestates have finally been achieved in the past few years 
using trapped-ion <cit.> and superconducting-circuit platforms <cit.>. Moreover, by incorporating 
(dissipative) stabilization mechanisms <cit.> into the error-correction scheme, experimentalists 
are now capable of extending the coherence time of GKP logical qubits significantly <cit.>. 
Notably, GKP encoded qubits have also been found to hold the key to 
large-scale fault-tolerant quantum computing for state-of-the-art architectures based on 
superconducting-circuit <cit.> and optical <cit.> systems. In spite of this, 
nevertheless, in the optical domain (approximate) GKP codestates remain elusive in current optical laboratories. 
It is our goal in this paper to partially bridge this gap by offering an experimentally feasible scheme 
for engineering approximate GKP codeword states in a linear-optical setting that will be accessible to 
present day optical platforms. In particular, we will resort to a quantum walk (QW) approach developed by 
Lin et al. in Ref. <cit.> and supply a linear-optical realization of the scheme. 

In what follows, we will begin with a brief summary of the QW encoding scheme of 
Ref. <cit.>. We will then demonstrate a linear-optical scheme that is capable of   
preparing approximate GKP states following the QW mechanism. Since the proposed encoding 
mechanism is subject to specified conditions, the codeword states prepared would have 
non-ideal fidelity. We analyze the quality of the codestate through the fidelity of the 
displacement operation that underlies the encoding process, and 
identify the parameter regimes over which the encoding has better performance. 
Finally, we summarize our findings in Sec. <ref> and point out 
possible future directions. For presentational clarity, detailed calculation for the 
fidelity is relegated to the Appendix.




§  QUANTUM-WALK ENCODING AND ITS LINEAR-OPTICAL REALIZATION


In Ref. <cit.> a theoretical framework is proposed to prepare bosonic codeword states with 
grid-like structures, such as the GKP states ideal_GKP, through one-dimensional QW of 
a bosonic mode in phase space. The idea is to generate the codeword structures in phase space through  
conditional displacements of the bosonic mode via QW processes. Crucially, since the phase-space pattern 
of a QW is controlled by its coin-toss transformation <cit.>, the codeword structure of a 
QW encoding would likewise depend essentially on the underlying coin-toss operation <cit.>. 
Suppose the bosonic mode has mode operator â = (x̂ + ip̂)/√(2), where
x̂ and p̂ are the corresponding, respectively, “position" and “momentum" quadrature operators. 
The commutation relation [â,â^†]=1 for the mode operator thus yields that
[x̂,p̂]= i, which amounts to setting ħ=1 here. If the bosonic mode is prepared initially in 
a position-squeezed state, QW of the state will generate coherent superposition of position-squeezed states subsequently. 
Explicitly, in terms of the phase-space displacement operator D̂(α)≡exp{αâ^†-α^*â} and the
squeezing operator Ŝ(ζ)≡exp{-ζ/2â^† 2+ζ^*/2â^2}, 
we will be dealing with superposition of squeezed coherent states <cit.>

    |α, ζ⟩≡D̂(α) Ŝ(ζ) |0⟩

with |0⟩ being the vacuum state of the bosonic mode. It should be noted that, as a consequence of having ħ=1 here, 
when applying the displacement operator D̂(α) with real α to any position eigenstate |x⟩_x 
we would get

    D̂(α) |x⟩_x = |x+√(2) α⟩_x   ,
 
where the displacement in the position eigenstate incurs an additional factor of √(2) <cit.>.


As pointed out above, in the QW approach to bosonic grid-code generation, the codeword pattern is determined  
in accordance with the coin operation for the QW. Throughout this work, we shall adopt a two-state quantum coin 
(thus a “coin qubit"), so that each step of the QW is conditioned on the coin configurations {|R⟩,|L⟩}, 
corresponding to rightward (R) and leftward (L) displacements by one single step length. 
To prepare an approximate GKP state with a binomial profile, it is found in Ref. <cit.> that 
the corresponding coin operation can be chosen

    Ĉ = |D⟩⟨ D|   ,

where 

    |D⟩≡ (|R⟩ + |L⟩)/√(2)

is the “diagonal" coin-state. The
corresponding “walk operator" would then take the following form in the state space of
(coin)⊗(bosonic mode)

    Ŵ = T̂(α_d) (Ĉ⊗Î)   .

Here α_d is the step length of the QW, Î is the identity operator of the bosonic mode, 
and T̂ is a translation operator whose action is conditioned on the coin configuration

    T̂(α_d) = |R⟩⟨ R| ⊗D̂(+α_d) 
    + |L⟩⟨ L| ⊗D̂(-α_d)    .

For instance, to encode the bosonic mode into an approximate GKP logical-zero state, one may 
start by preparing the mode in a position-squeezed vacuum state along with a coin qubit initialized in 
the |R⟩ state. As demonstrated in Ref. <cit.>, after even steps of QW with step length 
α_d = √(π/2) in phase space, the coin transformation C_D would enable approximate GKP 
logical-zero states to be encoded into the bosonic mode, with a codestate fidelity depending on 
the level of squeezing and the number of QW steps <cit.>. In this work, 
we propose to achieve such encoding by means of a linear-optical setup that consists mainly 
of a Mach-Zehnder interferometer (MZI) as illustrated in Fig. <ref>(a). As we will show below, 
under appropriate parameter regime the MZI-device will enact the targeted QW encoding when aided with 
certain non-Gaussian resource state and post-selection.





To begin with, let us consider inputting a coherent state |α⟩ into port 1 and a position-squeezed vacuum state 
|ζ⟩ into port 2 of the MZI. Here the MZI parameters are chosen to induce the following input-output 
relations among the mode operators of its input and output modes 

    (
      [ â_1'; â_2' ])
    = 
    (
      [  sinϕ/2  cosϕ/2;  cosϕ/2 -sinϕ/2 ])
    (
      [ â_1; â_2 ])   ,

where the mode indices and the phase angle ϕ are indicated in Fig. <ref>(a).
For small phase difference ϕ in the MZI and weakly squeezed input state, one can show that the MZI enacts 
the map <cit.>

    |α⟩_1 |ζ⟩_2  MZID̂_1'(α_ϕ) |ζ⟩_1'|α⟩_2'≡ |α_ϕ,ζ⟩_1'|α⟩_2'  ,

where α_ϕ≡αϕ/2 and the subscripts indicate the corresponding input/output modes; thus 
D̂_1'(β) is the displacement operator for output mode 1' with displacement β. Namely, 
from MZI_map1, in the limit of small ϕ and |ζ| the MZI would swap the coherent state |α⟩ from mode 1 to 
mode 2', while mapping the squeezed state |ζ⟩ from mode 2 to a squeezed coherent state |α_ϕ,ζ⟩ 
in mode 1'. The MZI thus executes a phase-space displacement of mode 2 by an amount dependent on the mode 1 input, which is then 
followed by a SWAP operation. As we will now show, by replacing the input of mode 1 
with designated state, one would be able to realize conditional displacements that are crucial to the QW encoding.  
 

Let us now replace the input to port 1 of the MZI with the cat state

    | cat⟩≡1/√(N_α)(|+α⟩ + |-α⟩)   ,

where N_α≡ 2 (1+e^-2|α|^2) is a normalization factor. In a “coherent-state logic" approach to 
quantum information processing that 
treats |±α⟩ as the logical basis states <cit.>, the cat state cat plays the role of a 
“diagonal state" similar to D_state. In the same limit of small phase difference ϕ as above, 
the MZI would now lead to the mapping

    | cat⟩_1 |ζ⟩_2  MZI1/√(N_α)(|+α_ϕ,ζ⟩_1'|+α⟩_2' + |-α_ϕ,ζ⟩_1'|-α⟩_2')   .

With the aid of the cat-state input, the MZI realizes here a controlled-displacement operation conditioned on the 
coherent-state “logical configurations" |±α⟩. That is, upon being transferred to mode 1' through the MZI, 
the squeezed vacuum state |ζ⟩ 
would acquire phase-space displacements ±α_ϕ conditioned on mode 2' being in the |±α⟩ states.  
Comparing the MZI transformation MZI_map2 with the translation operator T̂ in T_op, we see that 
mode 2 here plays the role of the bosonic mode undergoing QWs, while mode 1 serves as the “quantum coin" in 
the QW-encoding scheme. More precisely, from the perspective of the “coherent-state logic" approach, for any given value 
of α one can express the displacement operation involved in MZI_map1 as a “hybrid" controlled-displacement 
gate over the joint space of the “coherent-state coin qubit" and the bosonic mode

    Ĉ_D(α) ≡ |+α⟩_1⟨+α| ⊗D̂_2(+α_ϕ) + 
    |-α⟩_1⟨ -α| ⊗D̂_2(-α_ϕ)   ,

which bears close resemblance with T_op. Here, however, since the “coin" basis states {|±α⟩} are not 
orthogonal, the gate CD_eff serves only as an approximate realization of T̂ in T_op when acting on 
the “coin space" of {|±α⟩} with fixed α. Nevertheless, since this non-orthogonality would be 
negligible for the values of α that will concern us, and that, more importantly, our results below will not hinge on 
identifying the MZI-based controlled displacement with the operator CD_eff, the non-orthogonal “coin states" here will 
not be an issue for what follows.


To complete the first run of the QW encoding, we note that the output modes 1' and 2' in 
MZI_map2 are entangled. In view of the fact that both |±α⟩ states have the same amplitude over 
even photon-number states, i.e.,

    ⟨ 2k | ±α⟩ = e^-|α|^2/2α^2k/√((2k)!)      ,
 
one can thus project the output mode 2' from MZI_map2 to the even number states  
{|n=2k⟩; k=0, 1, 2, …} and cast mode 1' to the state

    |Ψ_1 ⟩≡ |+α_ϕ,ζ⟩ + |-α_ϕ,ζ⟩  ,

where we have left out the normalization factor and the mode index for brevity. This completes one single step of the QW and 
furnishes a one-run encoding that prepares the bosonic mode in a “squeezed cat-state", 
which has two Gaussian spikes centering at x=±√(2) α_ϕ in phase space 
(mind the extra factor of √(2) here, as noted after Eq. sqrt2 above; see also <cit.>). Comparing the state 
Psi_1 with the ideal GKP codewords ideal_GKP, we see that it provides a lowest-order approximation to the 
GKP logical state |1_L⟩ provided appropriate values of α_ϕ and squeezing parameter ζ are chosen <cit.>. 
We point out that the projection of mode 2' onto even photon-number states can be achieved through photon-number resolving 
detection, or in a more sophisticated manner, via photon-number “parity measurements" that projects the mode onto the 
cat state cat, which is comprised only of even photon-number states <cit.>. In the latter case, 
since the detection of cat state at detector “D" in Fig. <ref>(b) signals a success event for post-selection, the present encoding 
mechanism can thus also be taken a protocol using the cat state cat as a “catalysis" for the encoding (cf. Ref. <cit.>). 
In the following, we shall simply refer to the post-selection procedure as “parity measurement", irrespective of how it is 
carried out.


To proceed further with the QW encoding, we take the one-run encoded state Psi_1 as the new input to port 2 
together with a fresh cat state cat input to port 1 of the MZI. One can establish that the output from 
the MZI would then yield

    | cat⟩_1 |Ψ_1⟩_2  MZI1/√(N_α) 
    [      ( |+2α_ϕ,ζ⟩_1'+|0,ζ⟩_1' )   |+α⟩_2'
        + ( |0,ζ⟩_1'+|-2α_ϕ,ζ⟩_1' ) |-α⟩_2'    ]   .

The same “parity measurement" over mode 2' as in the preceding run would then generate in mode 1' the two-run 
encoded state 

    |Ψ_2 ⟩≡ |+2α_ϕ,ζ⟩ + 2 |0,ζ⟩ + |-2α_ϕ,ζ⟩  ,

where again we have omitted the normalization factor for simplicity. As previously, comparing Psi_2 with the ideal GKP 
codestates ideal_GKP, we see that |Ψ_2⟩ furnishes an approximate GKP basis state |0_L⟩ 
for proper values of the parameters α_ϕ and ζ. In the same way, by directing the 
two-run encoded state |Ψ_2⟩ into port 2 and supplying another fresh cat state to port 1 of the MZI, 
the same procedure as above would lead to the next run encoded state |Ψ_3⟩. Repeating this 
procedure for N runs, up to normalization factor, one can arrive at the N-run QW-encoded state

    |Ψ_N⟩≡∑_m=0^N 
    (
    [ N; m ])
    |(2m-N)α_ϕ,ζ⟩  .

As one can verify by comparing Psi_N with ideal_GKP, |Ψ_N⟩ can be taken an approximate GKP logical state 
|0_L⟩ for even values of N, and |1_L⟩ for odd values of N when suitable values of 
α_ϕ and ζ are adopted <cit.>. As noted below Eq. T_op previously, the QW-step length, thus the 
parameter α_ϕ=αϕ/2, appropriate for the GKP codeword states ideal_GKP is α_d=√(π/2). For the 
squeezing parameter ζ, as shown in Ref. <cit.>, for large values of N the phase-space distribution of the 
codeword state Psi_N would tend to approximate GKP states with Gaussian spikes of widths Δ_x=e^-ζ 
in the position quadrature and Δ_p=1/√(Nπ) in the momentum quadrature. In order to achieve 
approximate square-lattice GKP codewords that can cope with shift errors symmetric in 
position and momentum quadratures, one must have Δ_x=Δ_p. 
For the N-run QW codestate Psi_N, it is thus necessary to have a squeezing parameter such that 
e^+ζ=√(Nπ). To demonstrate, we show in Fig. <ref> the Wigner functions for the first few runs of
the QW codestates Psi_N that intend to approximate the GKP logical basis state |1⟩_L. We note that these 
codeword states are prepared based on the MZI map MZI_map1, which holds only approximately under the 
assumption of small MZI phase ϕ. In practice, therefore, the present linear-optical scheme can only prepare 
the codeword states Psi_N with non-ideal fidelity. It is thus  
crucial to identify the parameter regimes over which the MZI operation MZI_map1 would be more reliable, and the 
codeword state Psi_N can be prepared with high fidelity. We shall now turn to this discussion. 



The key assumption behind the MZI map MZI_map1 that enables the phase-space controlled-displacement in the 
QW encoding is that the phase difference ϕ between the two arms of the interferometer has to be small <cit.>. 
Since the MZI map MZI_map1 is the basic operation that underlies the proposed linear-optical scheme, to assess 
the quality of the codestates generated from this scheme, a suitable metric can be provided through 
the fidelity of the MZI map MZI_map1. Now that for given codestate Psi_N, the parameters 
α, ϕ, and ζ would stay fixed throughout the encoding process, the corresponding MZI-map fidelity can 
therefore be captured by comparing the approximate output state in MZI_map1 with reference to the corresponding 
exact output state for the specific MZI input |α⟩_1|ζ⟩_2. 
The details of this calculation is shown in Appendix <ref>, and Fig. <ref> illustrates 
some typical results for the fidelity of the MZI map MZI_map1. Anticipating the befitting 
parameter regime for the MZI map, and also aiming to simplify the calculation, we focus on the regime 
|ϕ|≲ 1 in finding the fidelity, which allows us to arrive at an analytic expression in Eq. fid_eq 
for the result. In Fig. <ref>, we plot the fidelity of the MZI map versus the 
coherent-state amplitude α and the MZI phase ϕ for squeezed vacuum states with squeezing levels 
that correspond to different runs of the QW encoding. The red solid curve in each panel of 
Fig. <ref> depicts the sets of α and ϕ 
that would combine to yield phase-space displacements for preparing square-lattice GKP qubits, i.e., 
αϕ/2=√(π/2), which we shall refer to as the “GKP line" below for convenience. Notice that in 
Fig. <ref>, since the fidelity fid_eq is even in ϕ, we plot the results only for positive ϕ. 
Also, since the result fid_eq is obtained perturbatively for |ϕ|≲ 1, each plot in Fig. <ref> 
covers only up to ϕ=0.8.





As noted earlier, for an N-run QW encoding the squeezing parameter appropriate for 
codewords that aim to protect against symmetric shift errors is given by ζ=1/2ln(Nπ), which is the 
value we use in plotting the MZI-map fidelity for each N in Fig. <ref>. It is seen 
that for the lowest squeezing level ∼ 4.97 dB [N=1; Fig. <ref>(a)] the fidelity for the GKP line 
(red solid curve in the plot) stays above 90% for the entire parameter regime we are covering. With increasing 
squeezing levels [N=3, 5, 7; Fig. <ref>(b)-(d)], however, the contours of the fidelity migrate towards the 
α-axis, and the GKP line crosses into an expanding domain of parameters with fidelity lower than 90%. 
This is consistent with what was noted above Eq. MZI_map1 that the MZI map would work better for small squeezing. 
However, as is clear from the results shown in Fig. <ref>, the fidelity depends only weakly on 
the squeezing parameter: as long as ϕ is sufficiently small, the fidelity can still stay above 95% 
even for the highest squeezing we are considering. While the MZI-map fidelity considered 
here is not directly the “codestate fidelity", as a measure for the performance of the basic operation 
underlying the present encoding scheme, it provides a means for approximately assessing the quality of the codestate prepared 
in the proposed scheme. Since preparing an N-run QW codeword state Psi_N would require operating the MZI map N times, 
an estimate for the corresponding codestate fidelity is therefore

    (
          [  ]) 
    ∼(
          [  ])^N   .

Thus, for instance, with a 90% MZI-map fidelity, a three-run QW codeword state prepared using the present linear-optical scheme 
would have a codestate fidelity ∼ (0.9)^3 ∼ 73%. And with 99% MZI-map fidelity, a three-run QW codestate 
can be prepared with a codestate fidelity ∼ 97%, which would require ancillary cat states with amplitude α∼ 10 
according to Fig. <ref>(b). In general, since the MZI map MZI_map1 is a better approximation at small ϕ, 
for finite displacement, as is clear from Fig. <ref>, it is favorable to have ancillary cat states 
with large amplitudes. In superconducting-circuit systems, it has recently been reported that cat states with 
amplitude α∼ 16 in the microwave domain can be generated experimentally <cit.>. It is therefore 
possible to prepare approximate square-lattice GKP codestates utilizing 
the present linear-optical QW scheme. In the optical domain, however, currently the “large" cat states accessible to experiments 
have been limited to amplitudes α∼ 2. This poses a challenge to preparing approximate square-lattice GKP states 
in the optical domain following the present prescription. Before the arrival of optical cat states with amplitudes 
α≳ 10 in the laboratories, in the optical domain the proposed linear-optical scheme 
can be applied to prepare, for instance, grid codes with non-square lattices that can cope with 
“biased" shift errors, which have noises in one quadrature worse than the other <cit.>. 
Alternatively, one can also attempt to generate grid states with stabilizers generating lattices with smaller 
lattice constants, thus higher lattice packing in phase space, such as hexagonal GKP codeword states <cit.>, 
provided the present linear-optical scheme can be modified to construct such codestates.   
 

In addition to non-ideal codestate fidelity, another limitation of the present encoding scheme is its non-deterministic nature. 
As explicated previously, for each run of the proposed linear-optical QW encoding the parity measurement that 
projects the “coin states" |±α⟩ onto the cat state cat can be achieved through 
post-selecting even photon-number states or implementing the more sophisticated photon-number parity measurement 
at the ancillary output port of the MZI <cit.>. As one can show, whichever option is chosen for 
the parity measurement the post-selection rate would always be 1/2. Preparing the N-run codeword state Psi_N through 
the QW encoding scheme would, therefore, have a success rate of 1/2^N. 
This is, however, inherent in the non-unitary QW process behind the encoding scheme due to the projective 
coin-operation C_D of the QW <cit.>. To overcome this difficulty, it is thus necessary to develop 
unitary QW processes that can generate approximate square-lattice GKP codeword states. 
Alternatively, one can also choose to incorporate adaptive corrections into the QW encoding scheme. For instance, 
for each run of the QW encoding, whenever the post-selection detects an odd-parity outcome, one can “correct" 
the output mode of the MZI immediately, so that the desired codestate can always be generated irrespective of 
the post-selection results. Similarly, one can also attempt with a scheme that leaves the correction until 
the final output by using the data of parity measurements during the encoding process <cit.>.
Despite being non-deterministic, nevertheless, the present QW encoding scheme should still work sufficiently well for 
codestates with small numbers of runs. For instance, in the recent experiments of Ref. <cit.> 
the square-lattice GKP qubits in the error corrections correspond to our three-run and four-run QW codeword states. 
For such states, the codeword generation rates from the proposed linear-optical scheme would be, respectively, 
1/2^3=12.5% and 1/2^4=6.25%, which should still be realistic experimentally.    





§ CONCLUSION AND DISCUSSIONS



In summary, we have proposed in this paper a linear-optical scheme for preparing 
approximate square-lattice GKP states through the QW encoding of Ref. <cit.>. 
Based on an MZI device, the encoding scheme takes advantage of cat-state ancillary mode 
to enact conditional displacements of a bosonic mode in phase space. With the aid of 
post-selection on the ancillary mode, the bosonic mode initially prepared in 
a squeezed vacuum state is subsequently encoded into the designated grid state 
through QW in phase space. 
Since the MZI-based conditional displacement works only approximately, 
we analyze the fidelity of the underlying basic operation and pinpoint the adequate 
parameter regimes over which high-quality grid states can be generated from 
the proposed encoding scheme. Although our encoding scheme has been proposed mainly for 
generating optical grid states, it is equally applicable to, for instance, preparing gird states 
in the microwave domain using superconducting-circuit systems. 
 

We point out that, strictly speaking, the present linear-optical scheme is not a direct implementation 
for the QW-encoding scheme originally proposed in Ref. <cit.>. On the one hand, the “coin qubit" 
in the present scheme is played by the “coherent-state qubit" in the space of {|±α⟩} 
for given α. Since the “basis states" {|±α⟩} are orthogonal only approximately, 
the conditional displacement operator CD_eff is also an approximate realization of the QW translation 
operator T_op. At the same time, in the present linear-optical scheme the “coin-toss" operation C_D 
is replaced with offline prepared cat-state input, which serves to provide non-Gaussianity for grid-state encoding. 
On the other hand, in the present scheme we did not seek implementation for the initial-state preparation of 
the original QW-encoding proposal, which aims to generate encoded qubits with arbitrary logical states through 
QW procedures <cit.>. In fact, once encoded qubits in the logical basis states are available, one can 
prepare arbitrary encoded logical qubits by applying single-qubit logical gates <cit.>.  
 
 
Finally, as already shown in Ref. <cit.>, by changing the coin-toss operation, the QW encoding can lead to grid states 
with different phase-space structures. In the present linear-optical realization of the QW encoding, by modifying 
the ancillary resource state or its sequence, it should be possible to encode the bosonic mode into different grid states, 
such as hexagonal GKP states. We leave these lines of investigation for our future work. 


This research is supported by the National Science and Technology Council of Taiwan through grants 
MOST 111-2119-M-008-002, NSTC 111-2627-M-008-001, 112-2119-M-008-007, 113-2119-M-008-010, 
and also NSTC 110-2112-M-032-005-MY3, 111-2923-M-032-002-MY5, and 112-2112-M-032-008-MY3 for JYW, 
and MOST 111-2112-M-194-005, NSTC 112-2112-M-194-004 for STW. This work is also supported partly by 
the National Center for Theoretical Sciences, Taiwan.





§ FIDELITY OF THE MZI MAP MZI_MAP1


We demonstrate in this appendix the calculation for the fidelity of the MZI map MZI_map1. To this end, 
we will derive first an operator-ordering theorem that will be
essential to this calculation, and then proceed to finding the MZI-map fidelity utilizing a coherent-state representation. 
For the fidelity, let us consider an operation that displaces the squeezed vacuum state |ζ⟩ 
with the aid of an ancillary coherent state with amplitude α through the MZI. Starting with the MZI input 
state |α⟩|ζ⟩, we have in accordance with the input-output relation io_reln 
the following output state

    |Ψ_ out⟩≡      D̂(αsinϕ/2,αcosϕ/2)  
          exp[-ζ/2(cosϕ/2 â^†_1-sinϕ/2 â^†_2)^2
    +ζ^*/2(cosϕ/2 â_1-sinϕ/2 â_2)^2] |00⟩  ,
  
where D̂(α_1,α_2)≡D̂_1(α_1)⊗D̂_2(α_2) is the two-mode phase-space 
displacement operator. 
Notice that in psi_out and what follows, for brevity, we omit the prime symbol over the mode indices 1 and 2. 
In the limit of |ϕ|≪ 1 and weak squeezing, one can show that the output state psi_out would be approximately 
<cit.> 

    |Ψ_ displ⟩≡D̂(αϕ/2,α) 
    exp(-ζ/2â^†_1^2+ζ^*/2â_1^2) |00⟩ 
    = D̂_1(αϕ/2)|ζ⟩_1|α⟩_2   ,
 
which is the output state of the MZI map MZI_map1. To quantify the fidelity of approximating the 
actual output state psi_out with psi_displ, we compute the overlap between this pair of states 
and define

    F≡|⟨Ψ_ displ|Ψ_ out⟩|   .

To evaluate F explicitly, it is necessary to invoke operator-ordering theorems that can reduce the 
exponential operators in psi_out into manageable form <cit.>. Let us derive first 
an operator-ordering theorem that will facilitate the fidelity calculation significantly afterwards. 



 §.§ Operator-ordering theorem


For real squeezing parameter ζ in psi_out, the operator-ordering theorem that we shall need in 
evaluating the fidelity fidelity will involve the following set of (Hermitian) operators

    Â_1 ≡ i (a1^2 - â^†_1^2)  ,   Â_2 ≡ i (a2^2 - â^†_2^2)   ,   B̂≡ i (a1^†a2 - a1a2^†)  ,   Ĉ≡ i (a1a2 - a1^†a2^†)  .

From [â_j,â_k] =0 and [â_j,â_k^†]=δ_jk for j,k=1,2, one can establish the following commutation relations 
among the set of operators ABC

    [A1,A2] = 0   ,    [A1,B̂] = 2i Ĉ  ,    [A1,Ĉ] = 2i B̂ ,
    
          [B̂,Ĉ] = 2i Â  ,    [A2,B̂] = -2i Ĉ  ,    [A2,Ĉ] = -2i B̂ ,

where we have denoted 

    Â≡A1-A2/2  .

Utilizing ABC_CR, one can further show that we have 

    [Â,B̂] = 2i Ĉ  ,    [Â,Ĉ] = 2i B̂  ,    [B̂,Ĉ] = 2i Â ,
    
          [A1+A2/2,Â] = 0   ,   [A1+A2/2,B̂] = 0   ,   [A1+A2/2,Ĉ] = 0   .

Namely, the set of operators Â, B̂, and Ĉ satisfies the SU(1,1) algebra except for factors of 2 <cit.>, 
and (A1+A2)/2 commutes with each of these operators. This allows us to express the ζ-dependent exponential operator 
in psi_out in the form (mind that ζ is real here)

    exp( -iζ/2A1+A2/2) exp[ -iζ/2(cosϕ Â - sinϕ Ĉ)]  .

For the second term of exp_decomp, we shall derive the following operator-ordering theorem 

    f̂(θ) ≡ e^θ(λ_1 Â + λ_2 Ĉ)
    = e^p(θ)Â  e^r(θ)Ĉ e^q(θ)B̂  ,

where λ_1, λ_2 are given parameters, and p(θ), q(θ), and r(θ) are unknown functions of θ that 
satisfy the boundary conditions

    p(0) = q(0) = r(0) = 0   .

We point out that despite Â, B̂, Ĉ forming an SU(1,1)-like structure, 
the operator-ordering theorems usually found for the SU(1,1) algebra <cit.> turn out less favorable 
in our case. Instead, due to the fact that we have here

    B̂|00⟩ = i (a1^†a2 - a1a2^†) |00⟩ = 0   ,

it is the operator-ordering theorem in the form of OOTh that will simplify our calculation significantly. Following standard procedures <cit.>, one can show that OOTh enforces the simultaneous differential equations among p(θ), q(θ), and r(θ)

    { [               r'                = λ_2 cos( 2p )  ,;   i q' cos( 2r )                = λ_2 sin( 2p )  ,;   i q' sin( 2r )                =      p' - λ_1  . ].

It turns out that it is challenging to solve pqr_DE in closed form. Since we are concerned mainly with 
small values of ϕ, it is legitimate to take λ_2=sinϕ≃ϕ a small parameter in pqr_DE 
and solve for p, q, r perturbatively. This yields

    { [                                      p                                      =                    λ_1 θ + O(λ_2^2)  ,;                                      q                                      = iλ_2/2λ_1 [cos(2λ_1θ)-1] + O(λ_2^2)  ,;                                      r                                      =       λ_2/2λ_1sin(2λ_1θ) + O(λ_2^2)  . ].

Recovering the original physical parameters, i.e.,

    θ = - iζ/2  ,   λ_1 = cosϕ  ,   λ_2 = sinϕ  ,
 
we get from pqr0 that for small ϕ

    { [                            p                            ≃                 - iζ/2cosϕ ,;                            q                            ≃ - i/2tanϕ [cosh(ζcosϕ)-1]  ,;                            r                            ≃      i/2tanϕ sinh(ζcosϕ)   . ].

As we shall find below, the operator-ordering theorem OOTh along with the solutions pqr for p, q, r 
will allow us to calculate the MZI-map fidelity fidelity explicitly in the small ϕ regime. 




 §.§ Coherent-state representation


From psi_out and psi_displ, one can write the MZI-map fidelity fidelity utilizing 
the operator-ordering theorem OOTh, anticipating ⟨Ψ_ displ|Ψ_ out⟩ 
to be real positive, 

    F    =   ⟨Ψ_ displ|Ψ_ out⟩
       ≃   ⟨ 00|
    e^-ζ/2(a1^2-a1^†^2)D̂^†(α_s,α_c)
    e^-ζ_c/2(a1^†^2-a1^2) e^-ζ_s/2(a2^†^2-a2^2)
       ×   e^+1/2tanϕsinh(ζcosϕ)(a1^†a2^†-a1a2)
    e^+1/2tanϕ [cosh(ζcosϕ)-1] (a1^†a2-a1a2^†)
    |00 ⟩  .

Here and in the following, we denote for brevity

    α_c ≡α( 1 - cosϕ/2)  ,
      α_s ≡α(ϕ/2 - sinϕ/2)  ,
      ζ_c ≡ζcos^2ϕ/2  ,
      ζ_s ≡ζsin^2ϕ/2  .

To evaluate f explicitly, one can invoke B00 and at the same time express the single-mode and two-mode squeezing operators 
in normal-ordered forms <cit.>. One can then evaluate the resulting formula using a coherent-state representation by first 
applying the completeness relation for the coherent-state basis {|β⟩} judiciously, i.e., <cit.>

    ∫d^2β/π |β⟩⟨β| = Î  .
 
This calculation leads to

    F ≃μ ζ_s  
    e^-e^ζ/2ζ_s(α_s^2  e^+ζ_c+α_c^2  e^-ζ_c)
    ×∫d^2β_1/π∫d^2β_2/π       e^-|β_1|^2 e^-1/2(tanhζ_s  β_1^2 - 2α_s   e^ζ ζ_s  β_1 )
       ×    e^tanhμ β_1^* β_2^*
       ×    e^-|β_2|^2 e^+1/2(tanhζ_s  β_2^2 + 2α_c   e^ζζ_s  β_2 )  ,

where we have denoted 

    μ≡1/2tanϕsinh(ζcosϕ)  .

To find the integrals in CS_intg, it is helpful to use the following identity

    ∫d^2β/π  e^-|β|^2 f(β)  e^aβ^* = f(a)   ,
 
where a is a constant and f(β) is an analytic function of β. We note that after carrying out 
the β_1- (or β_2-) integral in CS_intg utilizing CS_id, one would have in the 
remaining β_2- (likewise, β_1-) integral an exponent that contains 
β_2^*^2 (or β_1^*^2), which makes the integral hard to be evaluated in closed form. 
Nevertheless, one can show that such term would be of order ϕ^4, and hence can be left out safely 
for small ϕ. The remaining expression can then be evaluated efficiently again using CS_id. 
One can thus arrive at the following expression for the MZI-map fidelity for small phase difference ϕ 
in the MZI

    F ≃       μ ζ_s  exp{-e^ζ/2ζ_s  (α_s^2  e^ζ_c + α_c^2  e^-ζ_c) }
       ×   exp{-α_c/2^2ζ_c tanhμ  (α_c tanhζ_s tanhμ -2 α_s  e^ζ) }  ,

which is the formula we use in preparing the plots in Fig. <ref>.


99

Ni00
M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum
Information (Cambridge University Press, Cambridge, 2000).

Li13
D. A. Lidar and T. A. Brun (eds.) Quantum Error Correction (Cambridge
University Press, Cambridge, 2013).

Br03
S. L. Braunstein and A. K. Pati (eds.) Quantum Information with
Continuous Variables (Kluwer, Dordrecht, 2003).

Br05
S. L. Braunstein and P. van Loock, Rev. Mod. Phys. 77, 513 (2005).

Go01
D. Gottesman, A. Kitaev, and J. Preskill, Phys. Rev. A 64, 012310 (2001).

Tr02
B. C. Travaglione and G. J. Milburn, 
Phys. Rev. A 66, 052322 (2002).

Pi04
S. Pirandola, S. Mancini, D. Vitali, and P. Tombesi, 
Europhys. Lett. 68, 323 (2004).

Va10
H. M. Vasconcelos, L. Sanz, and S. Glancy, 
Opt. Lett. 35, 3261 (2010).

Et14
J. Etesse, R. Blandino, B. Kanseri, and R. Tualle-Brouri, 
New J. Phys. 16, 053001 (2014).

Te16
B. M. Terhal and D. Weigand, 
Phys. Rev. A 93, 012315 (2016).

Mo17
K. R. Motes, B. Q. Baragiola, A. Gilchrist, and N. C. Menicucci, 
Phys. Rev. A 95, 053819 (2017).

We18
D. J. Weigand and B. M. Terhal, 
Phys. Rev. A 97, 022341 (2018).

Ea19
M. Eaton, R. Nehra, and O. Pfister, 
New J. Phys. 21, 113034 (2019).

Li20
C.-Y. Lin, W.-C. Su, and S.-T. Wu, Quantum Inf. Processing 19, 272 (2020).

Fl19
C. Flühmann, T. L. Nguyen, M. Marinelli, V. Negnevitsky, K. Mehta, and J. P. Home, 
Nature 566, 513 (2019).

Ca20
P. Campagne-Ibarcq, A. Eickbusch, S. Touzard, E. Zalys-Geller, N. E. Frattini, V. V. Sivak, 
P. Reinhold, S. Puri, S. Shankar, R. J. Schoelkopf, L. Frunzio, M. Mirrahimi, and M. H. Devoret, 
Nature 584, 368 (2020).

Ro20
B. Royer, S. Singh, and S. M. Girvin, 
Phys. Rev. Lett. 125, 260509 (2020).

Ne22
B. de Neeve, T.-L. Nguyen, T. Behrle, and J. P. Home,
Nat. Phys. 18, 296 (2022).

Si23
V. V. Sivak, A. Eickbusch, B. Royer, S. Singh, I. Tsioutsios, S. Ganjam, A. Miano, B. L. Brock, 
A. Z. Ding, L. Frunzio, S. M. Girvin, R. J. Schoelkopf, and M. H. Devoret, 
Nature 616, 50 (2023).

Te20
B. M. Terhal, J. Conrad, and C. Vuillot, 
Quantum Sci. Technol. 5, 043001 (2020).

Bo21
J. Eli Bourassa, R. N. Alexander, M. Vasmer, A. Patil, I. Tzitrin, T. Matsuura, D. Su, B. Q. Baragiola, 
S. Guha, G. Dauphinais, K. K. Sabapathy, N. C. Menicucci, and I. Dhand, 
Quantum 5, 392 (2021).

Ke03
J. Kempe, Contemp. Phys. 44, 307 (2003).

Ma14
K. Manouchehri and J. Wang, Physical Implementation of Quantum Walks 
(Springer-Verlag, Berlin, 2014).

Ba97
S. M. Barnett and P. M. Radmore, Methods in Theoretical Quantum Optics 
(Oxford University Press, Oxford, 1997).

note_sqrt2 
This extra factor of √(2) can also be traced back to our convention of taking the Hermitian 
part of the mode operator â to be x̂/√(2), which is commonly done in the GKP literatures.

note_sqz
Although the condition of a “weakly squeezed" state |ζ⟩ can be stated more 
precisely by requiring that |ζ| ≲ 1, it turns out that the approximate map 
MZI_map1 works fine even when |ζ| is slightly greater than 1 
provided ϕ is sufficiently small (see the fidelity analysis later). We therefore choose to 
impose the “weakly squeezed" condition in a less stringent manner.  

Wu19
J.-Y. Wu, N. Toda, and H. F. Hofmann, Phys. Rev. A 100, 013814 (2019).

Je02
H. Jeong and M. S. Kim,
Phys. Rev. A 65, 042305 (2002).

Ra03
T. C. Ralph, A. Gilchrist, G. J. Milburn, W. J. Munro, and S. Glancy,
Phys. Rev. A 68, 042319 (2003).

Ge05 
C. C. Gerry, A. Benmoussa, and R. A. Campos, 
Phys. Rev. A 72, 053818 (2005).

Ha06
S. Haroche and J.-M. Raimond, Exploring the Quantum–Atoms, Cavities,
and Photons (Oxford University Press, Oxford, 2006).

Ha07 
S. Haroche, M. Brune, and J.-M. Raimond, 
J. Mod. Optics 54, 2101 (2007).

Pl10 
W. N. Plick, P. M. Anisimov, J. P. Dowling, H. Lee, and G. S. Agarwal,
New J. Phys. 12, 113025 (2010).

Su14
L. Sun, A. Petrenko, Z. Leghtas, B. Vlastakis, G. Kirchmair, K. M. Sliwa, A. Narla, 
M. Hatridge, S. Shankar, J. Blumoff, L. Frunzio, M. Mirrahimi, M. H. Devoret, and R. J. Schoelkopf, 
Nature 511, 444 (2014).

Mi23
O. Milul, B. Guttel, U. Goldblatt, S. Hazanov, L. M. Joshi, D. Chausovsky, 
N. Kahn, E. Çiftyürek, F. Lafont, and S. Rosenblum, 
Phys. Rev. X Quantum 4, 030336 (2023).

Al18
V. V. Albert, K. Noh, K. Duivenvoorden, D. J. Young, R. T. Brierley, P. Reinhold, 
C. Vuillot,L. Li, C. Shen, S. M. Girvin, B. M. Terhal, and L. Jiang, 
Phys. Rev. A 97, 032346 (2018).

No19
K. Noh, V. V. Albert, and L. Jiang, 
IEEE Trans. Inf. Theory 65, 2563 (2019).


Pu01
R. R. Puri, Mathematical Methods of Quantum Optics 
(Springer-Verlag, Berlin, 2001).

Zi05
J. Zinn-Justin, Path Integrals in Quantum Mechanics 
(Oxford University Press, Oxford, 2005).



