Realizing modular quadrature measurements via a tunable photon-pressure coupling in circuit-QED

One of the most direct preparations of a Gottesman-Kitaev-Preskill qubit in an oscillator uses a tunable photon-pressure (also called optomechanical) coupling of the form $g \hat{q} a^{\dagger} a$, enabling to imprint the modular value of the position $\hat{q}$ of one oscillator onto the state of an ancilla oscillator. We analyze the practical feasibility of executing such modular quadrature measurements in a parametric circuit-QED realization of this coupling. We provide estimates for the expected GKP squeezing induced by the protocol and discuss the effect of photon loss and other errors on the resulting squeezing.

Bosonic quantum error correction encoding quantum information into oscillator space(s) has gained much experimental interest in the last few years (e. g. [1][2][3][4][5]). A good reason to use a single oscillator instead of multiple qubits to encode quantum information redundantly is that control, manipulation and fabrication of a single oscillator can be easier than that of multiple oscillators or qubits. In other words, bosonic error correction can be a hardware-efficient way [6] of producing novel qubits which hopefully have longer coherence versus gate times than current popular members of the qubit family, such as the transmon qubit in superconducting devices. A promising code encoding a qubit into a single oscillator is the so-called GKP code after the proposal by Gottesman, Kitaev and Preskill in 2001 [7]. This code has the ability to correct small shifts in phase space, but has also been shown to be very competitive, as compared to other code contenders, with respect to photon loss errors [8,9] For an encoded qubit such as the GKP qubit, important aspects of its performance will be determined by the ability to reliably prepare or measure the qubit in the Z and X-basis, perform single-and two-qubit gates on it (CNOT, Hadamard and T gates), as well as execute quantum error correction in a fault-tolerant manner. Theoretical methods and circuits to obtain these components have been discussed, for example, in [7,10,11] and [12].
In particular, as the GKP qubit states are highly non-classical 'grid' states, one can ask about the best method to prepare such states from the vacuum, given a coupling with an ancilla system which is subsequently measured. The original GKP paper [7] briefly suggested that a photon-pressure coupling between the target oscillator, -in which the state is to be prepared-, and an ancilla oscillator would be useful in this respect. Through such an interaction the ancilla oscillator acquires a frequency shift which depends on the quadratureq T = 1 √ 2 (a T + a † T ) of the target oscillator T . Instead of measuring this frequency shift, the aim is then to measure just the effective rotation that it induces on an initial state in the ancilla oscillator after a specific interaction time. Values for q which differ in the ancilla oscillator state being rotated by a full period are thus not distinguished. This means that the interaction can be used to realize modular measurements ofq andp. Such modular quadrature measurements commute when the product of the moduli is a multiple of 2π. It is precisely these modular quadrature measurements which are required to prepare a GKP qubit: they can also be used to stabilize a GKP qubit [4] or perform quantum error correction. Modular quadrature measurements [13] are of fundamental interest since commuting quadrature measurements allow one to measure both quadratures without fundamental Heisenberg uncertainty, with possible application in displacement sensing in the microwave domain [14]. The use of such modular variables directly gives rise to a mixed position-momentum representation of a state in phase space: Zak first formulated this idea, giving a mixed momentum-position state of electrons in solids, see the review [15] and references therein.
In this paper we present a circuit-QED set-up for coupling two (close to harmonic) oscillators via a tunable photonpressure coupling with the aim of realizing a modular quadrature measurement in one of the oscillators, see Section II. This measurement requires a full measurement of the ancilla oscillator state, which in circuit-QED can be obtained by releasing this state, via a lossy oscillator, to a transmission line where the signal gets amplified and finally read-out at room temperature. In Section II C we briefly discuss previous work on such release or 'switch' mechanisms which can be turned on and off to high approximation. Prior to this, we provide an overview of our modular quadrature measurement scheme in Section I B. Other and related means to obtain a photon-pressure coupling in circuit-QED are reviewed in Section II A.
In Section III we estimate the expected performance of the modular quadrature measurement: this is expressed in terms of how 'squeezed' a GKP qubit can be obtained through this measurement. The squeezing effectively captures how much one becomes an eigenstate of the operator which is measured. The aim here is to do a strong modular quadrature measurement, unlike some of the previous work [3,4,11] in which the measurement is built up from a sequence of weak measurements via coupling to ancilla qubits. In the latter approach the strong measurement, -which is effectively a phase estimation or eigenvalue measurement of a unitary displacement operator-, is obtained through ancilla qubit measurements, each contributing at most 1 bit of phase information. The strength of the modular quadrature measurement proposed in this paper will be governed by the number of photons in the ancilla oscillator used to perform the measurement: the more photons are in the ancilla oscillator, the stronger the measurement which is realized. We will compare our new proposal with the sequential qubit measurement scheme [11] using a transmon qubit [4] or Kerr-cat qubit [5,16] in Section IV B, also with respect to error feedback to the target oscillator. As the preparation protocol will inevitably suffer from imperfections, we discuss several noise mechanisms and their effect in Section IV. We end the paper with a conclusion and a discussion, summarizing our findings, in Section V.
The (square) GKP code is defined by two commuting code stabilizers equal to S q = exp(i2 √ πq) and S p = exp(−i2 √ πp). These operators act as shift or displacement operators in phase-space, that is S q |p = |p + 2 √ π and S p |q = |q + 2 √ π . States which have eigenvalue 1 with respect to these operators are thus invariant under these translations in phase space. There are two operators X = exp(−i √ πp) and Z = exp(i √ πq) which both commute with S p and S q , while XZ = −ZX and hence they are the logical Pauli operators, -equal to half-stabilizer shifts-, of the encoded qubit. Note that the operators S p , S q , Z and X only square to the identity in the codespace. Measuring the eigenvalue of a unitary operator such as S q is equivalent to measuring the value for q modulo √ π, as all valueŝ q = q meas + k √ π for k ∈ Z give the same eigenvalue exp(i2 √ πq meas ) for S q . Said differently, a modular quadrature measurement is the measurement of the eigenvalue of a unitary displacement operator.
Since the eigenvalue of a unitary operator is a phase, the phase variance of the post-measurement state captures how precisely the eigenvalue is measured. This phase variance or uncertainty is expressed by effective squeezing parameters, one for the measurement of S p , and one for the measurement of S q . These squeezing parameters can be chosen (see details and relation with Holevo phase and regular quadrature variance in [14]) as To get some intuition, note 0 ≤ |TrS q ρ| ≤ 1 in general, but will be 1 if ρ is an eigenstate with a particular eigenvalue for S q and 0 if it is a uniform superposition of eigenstates, hence |TrS q ρ| expresses the sharpness or concentration of ρ around an S q eigenstate. Classically, the topic of circular statistics is well-established, see e. g. [18]: for a probability distribution P(θ) over an angle θ ∈ [0, 2π), the circular standard deviation is defined as  [7,11]. In this model an approximate GKP state equals where |ψ is perfect GKP code state, i. e. a +1 eigenstate of S p and S q . We will refer to the oscillators as target and ancilla oscillators, with resonance frequencies ω T resp. ω A and ω A ω T . We will use a, a † (resp. b, b † ) as annihilation and creation operators of the ancilla (resp. target oscillator). Targeted values of coupling strengths and oscillator decay rates are summarized in Table I. The aim is to describe a set-up allowing for the measurement of both stabilizers S p , S q and/or the logical shifts X, Z. For example, one can prepare a GKP grid state in the target oscillator from the vacuum by performing a modular measurement of bothp andq, i. e. measure S p and Z in sequence.
The sequence of events to enact a single modular quadrature measurement, say S q , is shown in Fig. 1. We start both oscillators in the vacuum state. First we create a coherent state |α in the ancilla oscillator by driving this oscillator with a short O(10)ns pulse. Now we turn on a strong photon-pressure coupling between target and ancilla oscillator for time t coupl : we discuss this in detail in Section II B. In the rotating frame of both oscillators (ancilla oscillator at ω A and target oscillator at ω T ) we thus turn on the Hamiltonian for some time t coupl . Here, and throughout the rest of this paper we use the convention = 1. We note that the fact that this Hamiltonian is time-independent in the rotating frame of target oscillator is non-trivial: it requires a parametric drive by a classical field, i. e. a pump or a flux-drive to accomplish this. By changing the phase of this classical field we can change the coupling to be proportional to a † ap T enabling to perform a modular measurement ofp (or another rotated quadrature). If the interaction in Eq. (2) is turned on for a time t coupl = √ 2π/g, it implements the following unitary between target and ancilla oscillator where S q T is a stabilizer of the GKP code acting on the target oscillator. From now on, we will drop the subscript T in the stabilizers S q T , S p T and logicals Z T , X T as all these operators always act on the target oscillator. It follows that the coherent state |α in the ancilla oscillator rotates by an amount which depends on the eigenvalue phase of S q . Thus measuring the angle over which the state |α rotates corresponds to measuring the eigenvalues of S q . A coherent state |α naturally has an angle uncertainty which gets larger with smaller amplitude |α|, putting an α-dependent bound on the accuracy with which one can project onto an eigenstate of S q . Clearly, the larger the coherent amplitude is, the better one can resolve its phase and thus the more bits of information one gets about the eigenvalue phase of the measured operator S q [20]. After the photon-pressure interaction is turned off and the oscillators no longer interact, the state of the ancilla oscillator has to be converted to a traveling signal so that the quadratures of the rotated coherent state can be read out via the standard 'heterodyne' measurement chain [21], allowing one to determine the phase of the coherent state. We do not claim any original contribution for such a release mechanism, but discuss known previous work in Section II C.
In Section III A we formally model the effect of the whole measurement protocol: in Fig. 2 we show the effect of the protocol using a coherent state with mean photon numbern = 3. If we integrate the Wigner function of the outgoing state over the p-coordinate, we obtain the probability distribution over q which is clearly peaked, with periodicity 2 √ π.
Note that the support of these peaks lies within the uncertainty of the original vacuum state: The measurement of S q does not enlarge the q-support of the input wave-function, it only applies a modular structure to it. The measurement of S q does enlarge the p-support of the input wave-function as is visible from the Wigner function of the outgoing state. Thus, if we were to follow the measurement of S q by a measurement of S p , we would obtain the signature grid-like Wigner function of an approximate GKP state. Alternatively, we start with a squeezed state (squeezing in p) and only measure S q , see the bottom row in Fig. 2 to obtain a grid-like GKP Wigner function.

GKP Qubit Readout
The preparation of a GKP grid state should also be accompanied by a mechanism for measuring the GKP qubit in the Z or X-basis. A useful fault-tolerant Z-measurement is a measurement in which the quadrature q is measured so that finding the quadrature q closer to an even (resp. odd) multiple of √ π leads to inferring the state 0 (resp. 1).
A simple method is to use the photon-pressure coupling and replace S q by the logical operator Z to nondestructively measure Z. If t coupl is turned on for half the time, such that the ancilla oscillator is either not rotated (Z ≈ 1) or rotated by π (Z ≈ −1), then subsequent release and measurement of the state of the ancilla oscillator reveals the eigenvalue of Z. Readout of the Pauli X operator could proceed analogously. Wigner functions of states in target and ancilla oscillator and probability distribution P(β) over measurement results of heterodyne measurement of the ancilla oscillator mode. The initial state of the ancilla oscillator is the coherent state |α = √ 3 . The measurement result is the one with the maximum likelihood with respect to P(β) (marked by yellow cross). Top row: Starting with a vacuum state (∆q = ∆p = 1) in the target mode, a measurement of Sq results in an effective squeezing of the final state of ∆q = 0.18, while ∆p = 1 is unchanged. The final state is most like the GKP |− state for the following reason. We start with a vacuum state -which is closest to the +1 eigenstate of X. Besides, the measurement result gives an eigenvalue of Sq close to +1 so we are in the GKP code space. In order to center the outgoing state we apply an additional unconditional displacement equal to Z −3 which changes the initial eigenvalue +1 of X to −1. Bottom row: the initial state in the target mode is a squeezed vacuum state with ∆q = 3 and ∆p = 1/3. The effective squeezing of the final state ∆p = 1/3 is again unchanged, while ∆q = 0.18 for the outgoing state. The resulting state is squeezed with respect to both quadratures. Now the final state is close to a GKP |− displaced by half a logical, i. e. X −1/2 , for the following reason. Again, we started with a squeezed vacuum state, which is closest to the +1 eigenstate of X and the unconditional displacement is Z −3 , which changes the eigenvalue to −1. However, the measurement result now gives an eigenvalue of Sq close to −1, indicating that the state is shifted out of the code space, by half a logical X.

Why probing the ancilla oscillator's frequency reveals the wrong information
Our scheme is demanding in requiring a high-Q ancilla oscillator (low κ c ) whose state should be measured through a tunable release or switch mechanism (switching to higher κ open ) followed by a circuit-QED heterodyne measurement. The photon-pressure coupling induces a frequency shift in the ancilla oscillator which depends on the quadrature of the target oscillator. We could imagine measuring such a frequency shift by probing the ancilla oscillator with a microwave tone as is done in the standard dispersive measurement in circuit-QED [22], without switching the effective decay rate of the ancilla oscillator from low to high for state release. Here we briefly comment on the fact that this method will not work as we will obtain direct rather than modular information about the target oscillator quadrature q T .
Imagine we would weakly apply a microwave drive to the ancilla oscillator (decay rate κ) at some frequency ω, starting at some initial time t = 0. Also at time t = 0, we have turned on the photon-pressure coupling so that the resulting Hamiltonian of ancilla and target oscillator is H PP = (ω A + gq T )a † a in the rotating frame of the target oscillator at angular frequency ω T . We can thus view the photon-pressure coupling as an effective change in the resonant frequency of the ancilla oscillator, which leads to a phase change of the outgoing field as compared to the incoming field. For simplicity, we take the weak drive to be modeled by a plane-wave input field b in [ω] at frequency ω. The input-output formalism (see e. g. [23,24]) gives the phase of the reflected output field as If we choose ω = ω A , i. e. drive the ancilla oscillator at its resonant frequency, then we see that the phaseshift ϕ(q T , ω A ) goes from −π at large negative q T to π at large positive q T and displays no periodicity in q T since ϕ = 2 arctan(2gq T /κ).
These considerations imply that the modular measurement of q should take place in a very non-steady state regime where the ancilla resonator is first excited to create the state |α and decay of this state should be strongly suppressed during the photon-pressure interaction, as this decay will leak information about q T . We discuss the effect of photon loss in the ancilla oscillator during the interaction in Section IV A.

II. CIRCUIT-QED SETUP
In this section, we discuss how a modular quadrature measurement can be realized. We start with a short review of previous work that realizes a photon-pressure or longitudinal coupling. We then introduce and analyze an electric circuit that achieves strong coupling. Finally, we discuss how the state in the ancilla oscillator can be released into a transmission line for readout.

A. Previous Circuit-QED Work on Photon-Pressure and Longitudinal Coupling
When the a-mode of a photon-pressure coupling of the formqa † a is very anharmonic and is used to represent a qubit, the photon-pressure coupling can be recognized as a longitudinal couplingq(I − Z)/2 with Pauli Z of the qubit. In this incarnation the qubit induces a state-dependent displacement on the target oscillator which can be used for (improved) qubit read-out [25][26][27]. Note that in such settings the roles of ancilla and target are reversed as compared to the setting of the GKP code, i. e. the target oscillator is used for information gathering about the qubit instead of the target oscillator being used to store a GKP state.
In optomechanical systems the couplingqa † a, withq the position of the mechanical oscillator and a the annihilation operator of an optical cavity field, is arrived at naturally. In the rotating frame of these oscillators, this coupling averages out without further time-dependent driving. In a linearized regime where one expands around a driven optical field a = α(t), the coupling can be used to generate an effective beam-splitter interaction with a strength depending on |α| 2 [28,29]. Although there has been a wide range of experimental setups and studies, the so-called single-photon coupling regime, g κ A , κ T , i. e. the bare coupling strength exceeds the photon loss rate of both oscillators has so far not been achieved [28]. The difficulty is that in a traditional optomechanical setting, the loss rate of the optical oscillator is relatively large, while the mechanical oscillator, being low in frequency, is susceptible to thermal excitations. Thus, working with two oscillators both at some middling frequency (GHz range) can resolve this conundrum.
A good candidate to achieve a single-photon coupling at microwave frequencies is the so-called simulated optomechanical coupling, where a SQUID loop is used to couple two oscillators. The coupling of two co-planar waveguide resonators via a SQUID loop has been analyzed by Johansson et al. [30], a lumped element circuit has been implemented by Eichler and Petta [29].
We note that the experimental coupling achieved in [29] is not in the so-called single photon regime, i. e. the photon loss rate of the ancilla oscillator is larger than the coupling strength, κ ≥ g. It will be necessary to be in this regime for our use of this coupling.

B. Circuit Analysis and Approximations
TABLE I. Targeted properties of the two oscillators and strength of the photon-pressure coupling g and error terms. The resonance frequency of the oscillators is dependent on the external flux, it is maximal for xext = π and minimal for xext = 0. All frequencies except the frequency range fmax − fmin are given as mean values, i. e. for xext = π/2. The capacitance CJ of the Josephson junction is not particularly important, as long as it is small compared to the capacitance of the ancilla oscillator CA, which is the case e. g. for the junction designs of the transmon and charge qubits. The photon-pressure coupling strength g is obtained by fixing the resonance frequency, inductance and Josephson energy for the two oscillators, choosing the capacitance accordingly and using Eq. (11). The capacitance of the Josephson junction was neglected, because it is several orders of magnitude smaller than the capacitance of both oscillators. The nonlinear terms (third-order, self-and cross-Kerr) are given as a fraction of the coupling strength g, because they are only relevant while the drive is on. Note that the listed values of the self-and cross-Kerr terms are the maximal values in time (not the echoed-out values). In our modeling it is assumed that all losses on the ancilla oscillator are due to coupling to the transmission line. We denote the closed decay rate of the ancilla oscillator as κc and the open decay rate as κopen, while the decay rate of the target oscillator is denoted as κT . This choice of parameters meets the condition κct coupl |α| 2 1, ensuring low photon loss during the modular quadrature measurements, easily forn ≈ 2 − 4.
To achieve the desired photon-pressure coupling, we start with the electric circuit shown in Fig. 3, neglecting the switchable coupling to the external world. The GKP state will be encoded in the, low-frequency, target oscillator, shown on the very right of the figure. It is coupled via a Josephson junction to an ancilla oscillator shown in the middle. The two oscillators are almost harmonic, with the parameters chosen such that the instantaneous potential of the ancilla oscillator depends on the current state of the target oscillator while the potential of the target oscillator is unchanged. This change of potential changes the resonance frequency depending on the state of the target oscillator, enabling the photonpressure coupling. The concept is similar to the approach used by Johansson et al. , where the effective length of the ancilla slit line resonator depends on the state of the target oscillator [30].
After the interaction between ancilla and target is turned off, we envision that a coupling between transmission line and ancilla oscillator is turned on, enabling fast readout. We note that this electric circuit has also been analyzed (operated in a different regime with very different parameters as compared to those in Table I) in [31], with the aim to control individual Fock states as a qubit.
We envision that this circuit is realized as a superconducting lumped element circuit, using, for example, plate capacitances for getting a large C A and C T , and wire structures made of superconducting material as inductance (similar to the circuit in [29]). The Lagrangian of the circuit in terms of node flux variables and their time-derivatives is Here Φ 0 is the magnetic flux quantum and Φ ext (t) is a classical, time-dependent flux due to an external field. In order to obtain the Hamiltonian and define conjugate charge variables, one inverts the capacitance matrix, arriving at When we quantize this Hamiltonian, we have conjugate-variable commutation relations [Φ i , Q j ] = iδ ij (with i, j = T, A) between the flux and charge variables of the target and ancilla systems. Both flux and charge operators have eigenvalues in R.
In the following we use that the capacitances of both oscillators are much larger than the capacitance of the Josephson junction, i. e. C T , C A C J . Up to first order in C J , the Hamiltonian is then given by: To simplify notation, we define dimensionless conjugate variables for the flux drive. We also define the charging energies E Cm = e 2 2Cm and inductive energies E Lm = 1 4e 2 Lm for m = T, A, where e is the elementary charge, so that with We note that the effect of the time-dependent flux-drive x ext (t) can also be realized with a microwave drive, see details in Appendix B 3. Because we envision inductive and capacitive parameters, see Table I, such that the charging energies x T will be close to the minimum of their respective potentials. Furthermore, because the inductive energies E L A , E L T E J , these minima will be close to zero and we can expand the potential U (x A , x T ) around (x A , x T ) = (0, 0). Note that this expansion is used for different values of x ext (t) for which the minimum of the cos() potential does not occur at x A = 0, x T = 0. We discuss this approximation in more detail in Appendix A. This expansion up to fourth order yields We can already see the desired coupling term, E J sin(x ext (t))x 2 A x T /2. However, there are multiple undesired additional interactions. In addition it is obvious (from the electric circuit itself) that the Hamiltonian acts the same way on target and ancilla oscillator. As will be seen in the following, a suitable choice of parameters addresses both these questions. We first define effective, flux-dependent inductive and capacitive energies for both systems: where the approximation comes about as C J C m for m = A, T . In addition, we define (flux-dependent) frequency, and creation and annihilation operators for the two coupled oscillators: All uncoupled quadratic terms in H in Eq. (4) can be put together to give a term proportional to ω A a † a + ω T b † b, setting the oscillator frequencies.
In order to achieve the desired asymmetric coupling, we assume that ξ A ξ T . Because the inductance of both systems is assumed to be comparable, this implies that ω A ω T , see Table I. In the final step, we also go to the rotating frame of both oscillators (at their frequencies ω m ) and use the rotating wave approximation, i. e. we only keep terms which are inherently time-independent or which are flux-dependent and oscillate with frequency ω T : .
In the second approximation step, we have used ξ A , ξ T 1 (dropping all fourth-order terms in ξ i ) and ξ T ξ A (omitting the ξ 3 T term). The ξ 3 T term comes about by writing x 3 T in terms of annihilation and creation operators, and neglecting the parts rotating at frequency 3ω T . Although the prefactor ξ 3 T is small, this term is still relevant because it will be made resonant by any drive that enables a photon-pressure coupling in the rotating frame. In Section IV D we will explicitly discuss the effect of the ξ 3 T term. Modulo its time-dependence, the first term of this final Hamiltonian is a known displacement that commutes with the photon-pressure coupling, the second is the traditional photon-pressure coupling Hamiltonian ∼ a † a(b † e iωt + be −iωt ) similar to the coupling in [29,30].
If the external flux is set to some constant x ext,0 , only the time-independent terms remain in H RWA and the resulting Hamiltonian is given by We note that there is no photon-pressure coupling between the two modes, the only remaining non-linear terms are The dependence of the Hamiltonian on x ext,0 means that these unwanted interactions can be turned off by setting x ext,0 = π/2 i. e. Φ ext = Φ 0 /4. When the photon-pressure coupling should be on and x ext is changing over time, we do not wish to have these self-Kerr and cross-Kerr terms. We will take a flux drive so that x ext (t) oscillates periodically around π/2 and this then directly leads to the terms proportional to cos(x ext (t)) averaging out, see Appendix B 1 and Fig. 6.
To turn the photon-pressure coupling on, we assume a drive such that sin(x ext (t)) = cos(ω T t). At first glance, such a drive seems to be difficult to achieve, as it would require a steadily increasing flux. However, one can use the symmetry of the sine around π/2 to obtain an oscillating function. The drive is in fact a triangle wave with frequency ω T /2 ∼ 250MHz, an excellent approximation can easily be generated with standard equipment, see details in Appendix B 1. We insert this drive choice in Eq. (9) and drop all terms which remain time-dependent to obtain the desired Hamiltonian so that the photon-pressure coupling strength g = 1 2 E J ξ T ξ 2 A . We note that, besides the photon-pressure coupling, the Hamiltonian contains an additional displacement on the target oscillator. Since the displacement commutes with the coupling, it does not alter its effect and can be seen a systematic error on the target oscillator which can be undone by a counter-displacement.
The Hamiltonian Eq. (11) can be easily adjusted to a photon-pressure coupling with any rotated quadrature by choosing an appropriate offset between external flux and the target oscillator. For example, the choice x ext, where the photon number operator only has non-negative eigenvalues. Therefore, if we view this interaction as an ancilla-oscillator dependent displacement on the target oscillator, all displacements S a † a q T point in the same direction, and the post-measurement state in the target oscillator will be off-center in phase space and contain an unnecessarily high number of photons.
In order to reduce the photon number, one can apply a displacement drive such that the unconditional displacement during the interaction is The idea is the same as for phase estimation when using qubits as ancilla, see [11]. We will use such a counter-displacement in all numerical simulations in this paper.
One thing to observe is that the frequency of the ancilla (and the target) oscillator depends on the flux drive through Eq. (7), hence we are working in a flux-dependent rotating frame which has to be carefully tracked (in order to read out the phase of the ancilla oscillator and do additional counter-displacements on the ancilla oscillator).
In some settings, it might be desirable to use a drive sin(x ext )(t) = 1 − δ + δ cos(ω T t), 0 < δ ≤ 1. It is possible to do so, and a drive with δ < 1 is easier to generate, but this costs some coupling strength, see Appendix B 1 for details. In the main text, we will use the maximal possible coupling strength i. e. δ = 1 unless mentioned otherwise.
The values for resonance frequency, coupling strength and the leading order error terms for a typical setup are given in Table I. In order to maximize the coupling strength, it is beneficial to reduce the Josephson energy while simultaneously increasing the inductances of both circuits in order to keep E J E Lm . Furthermore, it is beneficial to make the inductance of the target oscillator smaller than that of the ancilla oscillator: The ratio between the third order nonlinearity and the photon-pressure coupling strength is proportional to the ratio of the inductances. For a Josephson energy around 10 GHz and an inductance of the ancilla oscillator around 2 nH, a coupling strength g/(2π) well above 10 Mhz can be achieved. Note that the Kerr and cross-Kerr effects on both oscillators might be large during the interaction due the first term in Eq. (9), however they both oscillate in sign and will therefore be echoed out (see Appendix B 1).

C. Release of Ancilla Oscillator State
In order to meet both the demands of fast read-out and low photon loss, it is desirable to be able to effectively turn the ancilla oscillator decay rate from low to high. There are a few ways to achieve this, for example with a tunable inductive coupling [32], a frequency tunable oscillator [33] a pump-tunable beam splitter to a lossy oscillator [34] or a parametric coupler [35]. Note that most of these references work towards catch and release schemes, hence if the tunable coupling is simply used for readout the achieved fidelities can be expected to be larger. In particular, the Q-switch scheme in [34] in which a pump is used to temporally frequency-match the ancilla oscillator with a lossy oscillator seems attractive. In this work, the ratio between the closed and open decay rates is about 1000: the authors increase the effective life-time of an oscillator from about 0.5ms to 0.5µs, with efficiency exceeding 98%. The paper reports that the coherence and phase of oscillator states with up to 5 photons can be well resolved.
In the protocol presented here, it is also possible to use the fact that the ancilla oscillator has a tunable frequency. If a lossy fixed-frequency oscillator is placed between transmission line and ancilla qubit, the ancilla can be brought into resonance with it, increasing the decay rate. Note that this idea is as in [33], but reversing the roles of the frequency-tunable and fixed-frequency oscillator. The lossy oscillator needs to be off-resonance, effectively acting as Purcell filter, except during readout. An advantage of this approach is that it does not require any further circuit elements. As an example, consider an ancilla oscillator with properties as in Table I. In this case, the resonance frequency is between f (x ext = 0) = 9.75 GHz and f (x ext = π) = 10.25 GHz. If the lossy resonator has resonance frequency 9.75 GHz and we want lossy oscillator and ancilla oscillator to be separated by at least 250 MHz, we require that π/2 ≤ x ext ≤ π. This can be achieved by modifying the drive during the interaction, see Appendix B 1. After the interaction time, we set the flux to x ext = 0 in order to bring the ancilla oscillator into resonance with the lossy oscillator.

III. MODELING THE MODULAR QUADRATURE MEASUREMENT
In this section we derive the effective squeezing after the protocol, averaged over all possible measurement outcomes, as a function of the number of photons in the ancilla oscillator. Our measurement model could be made more precise by including a description of the release mechanism discussed in Section II C, but this does not change the main idea as long as the coherent state is heterodyne-measured at the end. In Appendix C we look at another aspect of the actual measurement as it is performed in the circuit-QED lab, namely the measurement outcome is only obtained as a time-integrated process on outgoing radiation which is leaking out of the lossy oscillator (which is in turn coupled to oscillator A via the switch discussed in Section II C). We verify that using the correct time-integration filter leads to no additional noise resulting in the same effective squeezing due to the measurement.

A. Effective Squeezing
We will analyze a measurement of the S q stabilizer using the photon-pressure interaction U PP in Eq. (3). A similar measurement of S p will commute with the measurement of S q and will have identical features. We drop the label T fromq T acting on the target oscillator from now on.
After the photon-pressure interaction with the target oscillator the goal is to measure the Husimi Q-function Q(β) = 1 π β| ρ |β of the ancilla oscillator in single-shot fashion [36]. Such a "heterodyne" measurement of an oscillator can be modeled as a projective measurement in the overcomplete basis of coherent states [37, p.24]. The resulting coherent amplitude β has a real (β) (∝ "I") and imaginary part (β) (∝ "Q") and will leave some target oscillator state ρ β . Using this measurement outcome β = |β| exp(iϕ), one infers that the eigenvalue of S q is exp(iϕ). The uncertainty in this phase is captured by the phase variance which relates directly to the effective squeezing of S q .
We assume that the initial state of the ancilla oscillator is a coherent state |α with α ∈ R. If we would apply a heterodyne measurement directly to a coherent state |α , we expect that its outcome β ∈ C will be concentrated around α. In our scenario, when we apply such measurement after the interaction U PP , we obtain a measurement operator M β ≡ M β (α) corresponding to measurement result β as We can evaluate the measurement operator explicitly, using that β| α = exp(− 1 2 |α − β| 2 ) exp( 1 2 (β * α − βα * )), giving When we apply this to an initial input state ρ in in the target oscillator, the output state will be ρ β = 1 P(β) M β ρ in M † β . The probability for outcome β with initial state ρ in = R 2 dq dq ρ in (q, q ) |q q | as input is given by showing that β is concentrated around the rotated α. Figure 2 shows this probability P vac (β), starting withn = |α| 2 = 3 and ρ in the vacuum state. It also shows the Wigner function of the resulting state ρ β for which P vac (β) is maximal. Using the definition ϕ ≡ arg(β), an alternative way of writing M β is defining the concentration parameter This leads to Because the measurement outcome is random, we are interested in the mean effective squeezing of the final state ρ β , averaged over all possible outcomes β. This is hard to compute in the general case, although it can easily be evaluated numerically, see Fig. 4. Analytically, even for a vacuum state input, the computation of the mean effective squeezing ∆ q = dβ ∆ q (ρ β ) is non-trivial. For this reason, we consider the mean or average sharpness which equals |TrS q ρ β | averaged over different outcomes β, that is, we focus on estimating It should be observed that dβ |TrS q ρ β | = | dβ TrS q ρ β | = |TrS q ρ in | as TrS q ρ β is complex. Since S q commutes with M β we have At b ≥ 2, one can use the convenient Villain approximation exp(b cos(x)) ≈ n∈Z exp(b) exp(− b 2 (x − 2πn) 2 ) [38]. For large K |β| , the dominant contribution comes from small values of |n|: for K |β| ≥ 2 one can restrict the sum to n = 0, ±1, ±2 with −π ≤ ϕ ≤ π.
If we assume that the outcomes of β are concentrated around values where the Villain approximation holds (which is reasonable since we know that P(β) is concentrated around |β| = α from Eq. (14)), then one can apply this approximation and evaluate the resulting Gaussian integral to get Here ϑ 3 (z, q) = n∈Z q n 2 e 2inz is the theta function and |β| c is a lower cut-off to allow for the Villain approximation. The lower cut-off |β| c is chosen such that firstly P(|β| < |β| c ) 1, and secondly |αβ| c ≥ 1 to allow for the Villain approximation with K |β| ≥ 2. We take |β| c = 1/|α| so that forn ≥ 5 the probability for such |β| c is low (suppressed by exp(−(5 − 1/ √ 5) 2 ≈ 0.04). The function ϑ 3 (z, q) is oscillatory with n, but contributions beyond n = 0, ±1, ±2 are negligible. Inserting the mean sharpness with its approximation in Eq. (20) in the expression for ∆ q , we obtain the red curve in Fig. 4. (1)) obtained using a coherent state |α withn = |α| 2 photons to measure Sq on a vacuum input state. In more detail, we generate a β and ρ β and calculate ∆q(ρ β ), the error bars indicate the standard deviation over different measurement results β. Blue: Mean effective squeezing estimate according to Eq. (20), using the Villain approximation to evaluate the expectation value for the sharpness on a vacuum state. Green: A simple approximate expression for the mean effective squeezing is ∆q ≈ 1/ 4π|α| 2 . Yellow: A lower bound on the green curve which replaces the average value |β| by |β| 2 . Overall, the mean squeezing parameter goes down as 1/ √n wheren is the average number of photons in the ancilla state used to implement the modular q-measurement.
We can also consider the eigenvalue phase of S q of the output state ρ β , i.e.
When ρ in (q, q) is a uniform distribution, i. e. there is no prior bias forq (or S q ), the integral over q results in exp(iϕ), confirming that the best choice for inferring the eigenvalue of S q is indeed exp(iϕ). If we have prior information on the input state to the measurement, e. g. it is the vacuum state, then one can use Eq. (21) as the outcome of the measurement.
As a sanity check we examine |TrS p | (or |TrX| ) after the modular q-measurement. First of all, note that the expectation dβ TrS p ρ β is unchanged, since S p commutes with the S q -measurement, so dβ Tr S p ρ β = Tr S p ρ in . Thus for the output state, the squeezing of S p (or X) is unchanged as expected. In addition, if we consider the mean sharpness we can also see it is preserved when we start with the vacuum state: The second equality in the equation above follows from the fact that ψ| S p M † β M β |ψ for any state |ψ whose wave function is nonnegative in the q-basis, i.e. ψ(q) ≥ 0, so we can omit the absolute value and use dβ M † β M β = I. One should observe that the preservation of the mean sharpness does not automatically follow from the commutation of S p with M β or M † β .

B. Measurement Squeezing Strength
If the initial state in the target oscillator is arbitrary, it is not possible to analytically evaluate the mean sharpness in Eq. (19). Moreover, we are interested in a quality measure of the measurement protocol which is independent of the initial state. To address this, we can use that the parameter K |β| has a very simple relation to the effective squeezing. If we assume a uniform distribution as initial state, then the final state of the protocol will be of the form |ψ β ∝ dq M β |q . Using Eq. (15) we see that the outgoing wave function has probability distribution P(q) ∝ M † β M β , proportional to a von-Mises probability density P V M (x) with angle variable x = 2 √ πq mod 2π with mean ϕ and concentration K |β| . The variance of the von-Mises distribution is given by 1/K |β| for large K |β| . If we convert this to an effective squeezing in q, it gives ∆ q ≈ 1/(2πK |β| ). Thus, computing the expected value for |β|, giving K |β| = 2α |β| , gives a measure of how effectively squeezed the outgoing state will be. Not surprisingly, one can show, see the mathematical details in the following paragraph, that |β| ≈ |α| so that ∆ q ≈ 1/ 4π|α| 2 . Since |β| ≤ |β| 2 , we can also use a squeezing lower bound which reads 1/(4π|α| 1 + |α| 2 ) using that |β| 2 = 1 + |α| 2 (see below). Fig. 4 shows that these state-independent bounds are in good agreement with numerics as well as our analytical approximation when the input state is the vacuum state.
To estimate f (|β|) where f (x) is some function, we note the following useful property which we prove as a lemma: Lemma III.1. The input state in the target cavity ρ in does not influence the expectation of any function f (|β|) where β is the outcome of measuring in the ancilla mode in an overcomplete coherent basis.
Proof. For a general input state ρ in we have We can use the Jacobi-Anger expansion exp(iz cos(θ)) = n∈Z i n J n (z)e inθ = J 0 (z) + 2 ∞ n=1 i n J n (z) cos(nθ), where J n (z) is the Bessel function of the first kind and using J −n (z) = (−1) n J n (z). The modified Bessel function of the first kind I n (z) is defined as I n (z) = i −n J n (iz) and it follows that exp(b cos(x)) = n∈Z I n (b) exp(inx) where I n (b) is the modified Bessel function of the first kind of order n. We can then use Eq. (17) The integral over ϕ leads to n = 0 being the only surviving term in n∈Z , thus removing all dependence on ρ in in the integral over q. Hence independent of ρ in .
As expected, these statistics are identical to that of a direct overcomplete measurement in the coherent basis applied to a state |α , i. e. without any coupling to a target oscillator. The only dependence on ρ in is found in the phase ϕ. In conclusion, the amplitude of the measurement result |β| correlates with the accuracy of the measurement, the phase gets more precisely resolved the larger the measured coherent state is. Thus, the expectation value |β| gives an indirect, but easily accessible way to estimate the effective squeezing by the measurement.

IV. NOISE AND IMPERFECTIONS
As compared to a perfect heterodyne measurement of the rotated coherent state in the ancilla oscillator, there will be several sources of loss and imperfections in the modular quadrature measurement. In the sections below, we discuss the effect of photon loss on the ancilla and target oscillators as a change in the effective squeezing parameters. Importantly, photon loss on the ancilla oscillator during the photon-pressure coupling is an immediate cause for feedback dephasing errors, similar as when preparing a grid state via coupling to a transmon ancilla qubit [11]. Loss in read-out in the heterodyne measurement state simply reduces the effective α that is used in the protocol, diminishing the strength of the measurement.
After the discussions on photon loss, we investigate the leading nonlinear term acting on the target oscillator in Section IV D. As the nonlinear term only acts during the interaction of the target and ancilla oscillators, it acts as an additional unitary operation. We discuss and numerically simulate its effect as a change of the effective squeezing parameters.
Finally, we investigate the effect of flux noise during the interaction, as the coupling Hamiltonian between the target and ancilla oscillators depends on an external flux. A small, quasi-static flux offset has the effect that the measured quadrature is slightly rotated, i. e. a flux offset means that the photon-pressure Hamiltonian is changed tõ H PP ∼ a † a(cos( )q ± i sin( )p). We will see that the parametric drive already provides a first order correction to this type of noise because the sign in the modified HamiltonianH PP changes with frequency ω T , which is large compared to 1/t coupl .

A. Photon Loss in Ancilla Oscillator during Photon Pressure Interaction
Imagine that prior to the heterodyne measurement to measure S q , but during the action of the photon-pressure coupling U PP , photon loss occurs from the ancilla resonator at rate κ c . This error will feedback to the target oscillator as a dephasing error in the |q basis and such a dephasing error will affect ∆ p . In addition, photon loss affects the quality of the S q measurement itself by effectively reducing the amplitude of the coherent state which is used in the measurement.
We assume that we are in the targeted regime, in which there is at most a single photon loss error in a time t coupl , or κ c t coupl α 2 1. Let γ = κ c t coupl . The no-photon loss operator E 0 = I − γn/2 ≈ exp(−γn/2) commutes with the evolution of H PP , but the single-photon loss operator E 1 = √ γ a does not. Hence the state of ancilla and target oscillator at time t is When we apply the heterodyne measurement to the ancilla oscillator and obtain outcome β, we thus apply to ρ in the transformation The last term can be viewed as applying, with probability ∼ α 2 γ, a mixture of shift errors with an average shift of strength √ 2gt coupl /2 = √ π. This dephasing feedback error tends to localize the q-quadrature, hence affecting the extent to which the state can be an eigenstate of S p or X. The average feedback shift error upon photon loss is a logical shift Z, immediately leading to the loss of the logical information. We can explicitly look at the effect of such photon loss when ρ in = |vac vac|. Since the expression for TrS q ρ β for any input state ρ in only involves diagonal terms |q q|, the dephasing in the q-basis due to photon loss has no effect. This means that we can view such loss as occurring after the interaction, simply leading to |α → |α exp(−γ/2) . This loss affects the measurement quality in the same way as any readout loss, see Section IV C. We can consider the effect of the feedback error on ∆ p as follows.
After the S q measurement with outcome β we consider the expected eigenvalue sharpness of S p (or, similarly X) For this we need to evaluate The commutation relation exp(iuq) exp(−i2 √ πp) = exp(−i2 √ πp) exp(iuq) exp(i2 √ πu) can be used to do the averaging integral over t which leads to the contribution from the single-photon loss term to be zero. This essentially means that upon the loss of an actual photon the eigenvalue phase of S p is fully randomized. The expected value for X, i. e. dβ|Xρ β | suffers similarly, i. e. upon the actual loss of a photon the eigenvalue of X gets fully randomized. The randomization leads to where the last equality follows immediately when the wavefunction of ρ in is real in the q-basis (as is the case for a vacuum state). One can also observe that | dβS p ρ β | = (1 − α 2 γ)|TrS p ρ in , since due to the photon loss S p no longer commutes with the S q measurement.
As conclusion, we have the following. Imagine that we started the modular measurement of q with a state with squeezing parameter ∆ p < 1. After the measurement we obtain an enhanced∆ p ≈ α 2 γ π + ∆ 2 p , showing how the feedback error negatively affects the squeezing in p.

B. Comparison with Sequential-Qubit Phase Estimation Measurement and Photon Loss on Target Oscillator
Previous work has analyzed how to measure the eigenvalue of S q (or S p ) via coupling the target oscillator with a sequence of qubits, using a qubit-controlled displacement interaction, followed by qubit measurement. In this scheme, each qubit measurement (via a read-out oscillator) provides at most 1 bit of information. For this sequential qubit read-out, one can use a tunable longitudinal interaction between transmon qubit and storage cavity of the form √ 2g I−Z 2q . This form of the coupling implies that the interaction time t coupl is the same value as in the photonpressure protocol with a large coherent state. If the ancilla oscillator is harmonic, one can use the vacuum state |0 and Fock state |1 as the two qubit states. Hence, the longitudinal interaction is merely the photon-pressure coupling applied to these Fock states. However, the input state of this sequential scheme and the subsequent measurement of the qubits cannot be directly mapped onto the photon-pressure scheme using a coherent state.
To compare the sequential qubit scheme with the proposed modular quadrature measurement, we have to separately discuss the two dominant sources of error, photon loss on the ancilla oscillator and photon loss on the target oscillator. With respect to photon loss on the ancilla oscillator: an important possible advantage of the photon-pressure scheme proposed is that a single oscillator-measurement is used instead of a sequence of qubit measurements, making it possible that the photon-pressure scheme is much faster. This would lead to lower photon loss error rate on the target oscillator (as it is waiting while the ancillary system is being measured). To compare times, in [34] the release and measurement take time O(1)µs while in the same set-up the high-fidelity single transmon qubit measurement took a similar amount of time. If we use a coherent state withn = 3, Fig. 4 shows that one can obtain ∆ q ≈ 0.18 assuming no losses. Data from [14] show that one needs at least M = 12 rounds to get to ∆ q = 0.2. Also, in [4] a grid state was stabilized after about 20 rounds of qubit measurements of duration 600 ns (including losses) to σ = 0.16 which corresponds to ∆ = 0.22 here.
With respect to photon loss on the ancilla qubit or oscillator, one can make the following observations. First, note that in the sequential execution of a protocol using ancilla qubits, arguments can be made that the squeezing parameter ∆ q will decrease as 1/ √ M where M is the number of rounds in phase estimation protocol [11,14]. Then, similar as in the photon-pressure protocol, for each qubit measurement, there is a probability γ = κ c t coupl for amplitude damping (i. e. photon loss) and hence a feedback error which fully randomizes the eigenvalue of S p or X. Hence after M such rounds the probability for a Z error scales as ∼ γM ∼ γ/∆ 2 . In our proposed strong measurement scheme, the error probability is γn ∼ γ/∆ 2 , showing that both schemes effectively have the same tradeoff in having a higher logical Z error probability when targeting a smaller ∆. It is thus a matter for whatn one has κ c t coupln 1 which determines whether a strong measurement withn > 1 is most effective.
In this context, it should also be noted that it is not the aim for a GKP state preparation protocol to necessarily prepare the highest possible ∆. Photon loss on the target oscillator during the protocol and during measurement of the ancillary system will lead to drift and diffusion of the coordinates of the Wigner function W (q, p): a GKP state with smaller ∆ has more photons, incurring a larger error probability due to photon loss. Based on the interplay between these two mechanisms, Appendix S4.1 in [4] suggests that σ = 1 2 κcT 2 , with T the total duration of the S p and S q measurement protocol, is a target value for squeezing (in our convention corresponding to ∆ = 1 2 √ κ c T ). A shorter cycle time T can thus allow for a smaller ∆, leading to a GKP qubit with a lower logical error rate.
We can compare our scheme with the proposed fault-tolerant syndrome detector of a GKP qubit in [16]. In that paper, it is proposed that a Kerr-cat qubit with |0 ≈ |α and |1 ≈ |−α , is used for sequentially extracting bits of phase information of S q instead of a transmon ancilla qubit as in [4]. The advantage of using a Kerr-cat qubit is that unlike the transmon qubit or the scheme proposed here, there is little feedback error since the X-error rate on the Kerr-cat qubit is purposefully low, with photon loss leading only to Z-errors which do not feedback. Note also that in [16] the required coupling between the Kerr-cat qubit and the target (GKP) oscillator is not directly a photon-pressure coupling but a tunable beamsplitter interaction ∼ a † b + ab † .

C. Readout Loss
After the interaction of the target and the ancilla oscillator -during the release and heterodyne measurement of the state of the ancilla oscillator-one expects losses, and possibly thermalization, due to coupling to extraneous modes in the co-planar or co-axial waveguide, circulators or the amplifier, affecting the total coherent amplitude of the ancilla oscillator state to be read out. Since these losses result from various (partially unknown) sources, it is most reasonable to model these processes as a phenomenological loss process mapping the coherent amplitude α onto α eff < α, i.e. U loss |α A |0 env → |cos(θ)α A |sin(θ)α env with cos 2 (θ)α 2 = α 2 eff where |γ env is some environment mode. We thus assume that these losses do not further influence the phase of the state α. The cumulative effect of losses is not expected to be small, for example in [34] η eff = (α eff /α) 2 ≈ 0.43. The effect of these losses is that some of the information about S q ends up in the environment and is not observed, leading to noise. We can simply modify the analysis in Section III A by inserting U loss after U PP of Eq. (3) and prior to the heterodyne measurement action with outcome β, tracing over the environment mode. We get where S q and S q are understood to be phases not operators. Let us again analyze the two possible effects of loss. First, for the diagonal elements of ρ in in the |q -basis, the effect of the measurement is to apply the measurement operator M β (α eff ). Since the expected value for ∆ q only depends on the diagonal elements q| ρ in |q , this results in a higher expected value for ∆ q simply due to α → α eff : it is as if one executes the S q -measurement with a smaller coherent state with amplitude α eff . Secondly, is there additional dephasing effect in the q-basis? Note that the measurement with subsequent loss in the ancilla oscillator still commutes with the operator X or S p , similar as the ideal measurement that we examined previously. This directly means that |TrS p dβ ρ β | = |TrS p ρ in | and the same for X, i. e. the average state has the same sharpness. We can also examine the sharpness averaged over different outcomes, that is, dβ |TrXρ β |.Using that q| X |q = q| q + √ π = δ(q −q − √ π) and αS q √ 1 − η eff |αS q √ 1 − η eff δ(q −q − √ π) = 1, the latter expressing the commutation of S q with X (or S p ) we can write whenever q| ρ in |q − √ π ≥ 0. Similarly, when q| ρ in |q − 2 √ π ≥ 0, the mean sharpness dβ|TrS p ρ β | = TrS p ρ in , is also unchanged by the S q -measurement. These conditions are clearly fulfilled for the vacuum state. The upshot of these considerations is that loss further down in the measurement chain only changes the effective strength of the coherent state that is used: when losses are such that η eff = 50% and we usen = 4, we effectively get the squeezing due ton = 2, but no other extra noise.  In this section we examine what happens when we include a leading-order correction in the Hamiltonian obtained from the circuit analysis from Section II B. The most important term neglected in the circuit analysis is ∝ ξ 3 T b † e iω T t + be −iω T t 3 as this term is partially made resonant by the drive x ext (t). In this section we will see that it is crucial that any device fulfills ξ 2 T /ξ 2 A 1 because this ratio sets the strength of the unwanted unitary operation due to the leading-order correction.

D. Third-order Nonlinearity
We start with the original Hamiltonian in the rotating frame Eq. (8), but also keep the terms in the sin() part which oscillate with frequency 3ω T for now: Next, we use the properties of the drive x ext (t) discussed in Appendix B 1, i. e. we drop all terms proportional to cos(x ext (t)) and use sin(x ext (t)) = cos(ω T t): If we expand the product b † e iω T t + be −iω T t 3 , we see that all terms except b 3 e −3iω T t and (b † ) 3 e 3iω T t oscillate with frequency ω T , compare Eq. (9). If we now use cos(ω T ) = 1 2 (e iω T t + e −iω T t ) and drop all time dependent terms in the Hamiltonian, we haveH This Hamiltonian acts for a fixed time t coupl = 2 If we also drop the unconditional displacement, the target and ancilla oscillators are coupled by the modified unitary operator we can rewrite and approximate this unitary as where we have neglected the commutators ∝ 2 and used that [q, . We observe two effects. First, the incorrect unitary induces a systematic (third-order) error of strength ∼ on the target oscillator, independent of the ancilla oscillator, hence not affecting the outcome of the S q measurement itself. This systematic error does however cause a deformation of the Wigner function of a GKP code state. Namely, if one applies to an approximate GKP state a unitary of the form exp(iδq 3 ) with some parameter δ it will not change its squeezing ∆ q , but it does lead to enhanced ∆ p . Also, if we apply to a GKP state a unitary of the form it negatively affects the squeezing ∆ q as V does not commute with S q . Both effects are more pronounced the more photons the GKP state has. Secondly, we observe that Section IV D contains an additional coupling between target and ancilla oscillator of the form exp(δa † a((b † ) 2 − b 2 )) [39]. We can see this as squeezing induced by the ancilla oscillator on the target oscillator which gets stronger the more photons the ancilla oscillator contains. Alternatively, the heterodyne measurement statistics will be slightly altered by the presence of this additional term. This photon-number dependent squeezing limits the number of photons that can be used in the ancilla oscillator. To alleviate this issue and ensure that the effective squeezing ∆ q is unchanged, one could apply a modified, two-tone drive such that sin(x ext (t)) ≈ cos(3ω T ) + cos(ω T ), which has the effect of making b 3 and (b † ) 3 terms resonant again.
Note that the terms b 3 and (b † ) 3 are the only ones in the coupling Hamiltonian Eq. (34) oscillating at frequency 3ω T , the next highest order affected by the modified drive it is the fifth order of the expansion. With the modified drive, the unitary time evolution only depends on q: This corrected unitary transformation will then not affect the measurement statistics of S q as the additional term commutes withq. The effective squeezing ∆ q of the measured state will be unchanged as compared to using U PP . The effective squeezing ∆ p is still affected by the exp(iδq 3 ) deformation. The deformation can be seen as a displacement that has a quadratic dependence on theq quadrature, leading to a 'parabola' of displacements acting on the final state of the target oscillator, see Fig. 5.
The upshot is that with additional drive engineering one can mitigate the effect of the third-order non-linearity. The numerics in Fig. 5 show that for sufficiently small corrections the effect on the squeezing parameters is moderate.

E. Flux Noise
Because an external flux drive is used to enable the coupling, the setup will be susceptible to flux noise. (Quasi)-static flux noise acts as a constant offset on the drive in Eq. (B1). Thus, with a constant flux offset , i. e.x ext (t) = x ext,± (t)+ with x ext,± (t) chosen as in Eq. (B1) and maximal coupling strength (δ = 1), the interaction Hamiltonian (in the rotating frame) is given bỹ where the sign ± depends on the chosen drive and k = ω T t 2π indicates the number of periods ω t /(2π) that has passed by the time 0 < t < t coupl . This Hamiltonian is still of the photon-pressure type, but it no longer couples theq quadrature to the number of photons in the ancilla oscillator, but a slightly rotated quadrature. However, we can also see that this rotation is time-dependent due to its dependence on k and changes direction with frequency ω T . This means that the drive Eq. (B1) already provides some protection against such static flux noise. In the case where a drive with reduced amplitude δ < 1 (see Appendix B 1) is used, the situation is more complicated. We discuss flux noise for δ < 1 in Appendix B 2.
Another effect of flux noise is the following. The resonance frequency of both oscillators also depends on the external flux drive x ext (t), see Section II B and Table I. In the presence of static flux noise, it means that the rotating frame will be slightly out of sync with respect to the true resonance frequency of the oscillators, leading to inaccuracy in the phase of the oscillator state. Typically, flux noise is small compared to Φ 0 (which is the amplitude of the flux drive x ext (t)), suggesting that the difference between the expected and true resonance frequencies can be neglected.

V. DISCUSSION AND ACKNOWLEDGEMENTS
In this paper we have proposed to use a simple coherent state ancilla to get more than 1 bit of information about the eigenvalue of a unitary displacement operator, effectively realizing a modular quadrature measurement. These measurements can be used to prepare or read out a GKP code state. We have presented and analyzed an electric circuit which generates a strong photon-pressure coupling needed to imprint the eigenvalue information onto the coherent state of the ancilla oscillator. The photon-pressure coupling Hamiltonian realized by this circuit is very versatile, with a simple modification of the flux drive, it can also be used to enable a beam-splitter between the target and ancilla oscillators [28,29].
As we have seen a large coherent amplitude α makes for possibly higher-precision stabilizer measurement, but in the presence of photon loss or unwanted nonlinearities, α should be chosen moderately. Our results and numerics show that circuit parameters can be chosen which demonstrate good performance at |α| 2 ≈ 3.
Our work was supported by ERC grant EQEC No. 682726. We thank Alexandre Blais, Daniel Bothner, Alessandro Ciani, Jonathan Conrad, Ines Corveira Rodrigues, David DiVincenzo and Wolfgang Pfaff for feedback and discussions.

Appendix A: Expansion of The Circuit Hamiltonian
During the circuit analysis in Section II B, we expand the potential part of the circuit Hamiltonian Eq. (5) around the approximate minimum x A = x T = 0 of the potential term. In this section, we discuss this approximation in more detail as this point is not exactly the minimum of the potential.
Although the minimum of Eq. (5) is not soluble analytically, we can find an upper bound on the errors made. We do this by investigating the maximal possible shift in the position of the minimum as a function of x ext (t). First, we expand the potential exactly using the addition formula of the cosine: Because E J < E L T , E L A , we can see that the potential always has a unique minimum, and because the cosine is an even function, the location of that minimum only depends on the sine part of the equation. Therefore, the maximal shift of the position of the minimum away from x T = x A = 0 occurs at x ext (t) = ±π/2.
If we set x ext = π/2 and expand the potential to first order around x A = x T = 0, we have Thus, for x ext (t) = ±π/2, the minimum of the potential term Eq. (5) is located around By defining we can absorb this correction into the external flux drive x ext (t) where the minimum of the potential is now to first order given by x A = x T = 0. Because the sine is monotone between 0 and π/2, we know that the location of the true minimum of the potential is also monotone between 0 < x ext (t) < π/2. From the structure of Eq. (A1) we can also see that the shift of the minimum for x T is also always opposite to that of x A and that the sign of this minimum changes for −π/2 < x ext (t) < 0.
is the true location of the minimum of U (x A , x T ) and the sign of depends on the sign of sin(x ext (t)). The expansion around x A = x T = 0 made in Section II B is therefore similar to the effect of oscillating flux noise. Furthermore, just like for flux noise, there is an echo effect reducing any contributions from this offset because the offset changes sign with frequency ∼ ω T .
In summary, the problem that arises is that the external drive changes the potential for both variables, which follow the change of minimum, with some delay. Due to this delay, the instantaneous potential is not quite what we expect, but the error is small, as it scales as E J /EL 1. Note that this effect is deterministic, so it could be counteracted by a change in the external drive. range for maximal coupling strength, δ = 1) yields a triangular wave which rolls off with the inverse harmonic number squared: x ext, Although the Fourier series of the drive does not have such a simple solution for δ < 1, it can be well approximated numerically, using x ext,± (t) = π/2 ± ∞ n=0 b n sin ((2n + 1)ω T t/2). The amplitude |b n | of the Fourier series of the drive is shown in Fig. 7. As can be seen there, the roll off is fast, such that two harmonics are in many cases a sufficient approximation. In addition, the period 4π ω T of this drive is rather long, as the resonance frequency ω T is typically in the regime ∼ 500 MHz, see Table I. Due to the requirement that the resonance frequency of the ancilla oscillator should not exceed ∼ 10 GHz, while there needs to be a separation of scales ω A ω T and ω T should not be too small to avoid thermal excitations, this frequency range is not expected to change much for different setups. As an estimate for the most complex case with δ = 1, the total error for a standard arbitrary waveform generator with 2.4 Gsamples/sec without any corrections to the signal is expected to be around 0.5%. Using either drive from Eq. (B1), neglecting all terms rotating with frequency ω T or above, the effective Hamiltonian from Eq. (9) yields the desired interaction: with the coupling strength g = δ 2 E J ξ T ξ 2 A .

Flux Noise with Reduced Drive Amplitude
We have discussed flux noise for the case with maximal coupling strength (δ = 1) in Section IV E of the main text. Following the discussion there, we now discuss flux noise in the case where the drive strength is reduced (δ < 1). In this case the prefactor in the coupling Hamiltonian is given by sin(x ext,± (t) + ) = (1 − δ + δ cos(ω T t)) cos( ) ± (−1) Again, there is some built-in correction for the additional phase, the term ∝ sin( ) will approximately cancel over multiple periods (recall that the ideal drive is with zero flux off-set = 0). However, there is an additional effect that the amplitude of the drive also changes over time, and the change of amplitude is on resonance with the change of the phase, i. e. the rotation of the measured quadrature no longer completely cancels. In order to alleviate this issue, one could use a similar strategy as the CZ gate used for transmon qubits [40], using the fact that the equation sin(x ext,± (t)) = 1 − δ + δ cos(ω T t) has two alternating solutions, x ext,+ and x ext,− see Eq. (B1). Because the undesired term due to flux noise for the two drives always has opposite sign, see Eq. (B3), it is possible to restore the echo effect by alternating between the two drives. Although this transition is not smooth (see Fig. 6), it is continuous for all choices of δ. Furthermore, the quick roll off with high harmonics is preserved, the most complex drive that could be obtained with the strategy is a triangle wave at frequency ω T , see Fig. 6.

Use of a Microwave Drive
In most experimental settings, it is preferable to use a microwave drive instead of a time-dependent flux. Here, we show how such a microwave drive can be used, employing a similar method as Touzard et al. in [25].
Consider again the Hamiltonian from Eq. (4), with the potential from Eq. (5) and a classical field y ext (t)e iω d t capacitively coupled to the ancilla oscillator. Here, the phase e iω d t indicates the lowest frequency term of the external drive, see Appendix B 1 for details. The system Hamiltonian is then given by where the flux x ext has been set to a constant value of π/2. If we express this in terms of annihilation and creation operators, and collect all uncoupled quadratic terms into the harmonic part of the Hamiltonian, we have Here, we use a notation analogous to Touzard et al. [25] andc os indicates that the second order terms ξ 2 2 /2 of the cosine have already been absorbed in the harmonic part of the Hamiltonian. Using the substitution a = a + 1 4ω A ξ A y ext (t)e iω d t , we get The potential is again of the same form as Eq. (5) (if we were to write H CC in terms of x m , p m again), where the microwave drive (y ext (t)e iω d t )/(2ω A ) takes the role of the flux drive x ext (t). Note that there are two additional displacements, one acting on the target oscillator (b † , b) and one on the ancilla oscillator (a † , a). The drive on the target oscillator is an off-resonant, known, unconditional drive and can be corrected by a counterdrive. If we go to a rotating frame and use the rotating wave approximation, the drive on the ancilla oscillator will vanish because it is very far off resonant (see Appendix B 1). Note that this step means that a microwave drive can only be used to obtain an oscillating drive, in order to obtain a constant offset, it is still necessary to use a (constant) flux drive, hence why we set x ext = π/2 in the beginning. The term ∝ ã † −ã b † − b corresponds to the term p A p T in Eq. (4) and will cancel in the rotating frame because the resonance frequencies of the two oscillators are very different.

Appendix C: Heterodyne measurement via Release of Coherent Oscillator State into a Transmission Line
Here we model the gradual release of the cavity state into a mobile wave packet traveling over a 1D transmission line or waveguide by an effective model. Our goal is to verify that the integration of a heterodyne measurement signal on small coherent states released over time can effectively give the same measurement operator as the direct heterodyne measurement of Section III A. This is not immediately obvious. Given a long enough measurement time t meas , even if all photons in the oscillator are eventually measured to determine the angle, there are two combining features which could make such a measurement fundamentally more noisy than a direct heterodyne measurement and hence leading to less effective squeezing. Firstly, the instantaneous measurement is applied to a small coherent state, i. e. the one that arrives during a small interval in time, which has large angle uncertainty. Secondly, the overall output of the measurement is only a weighted integration of the heterodyne signal obtained from each small coherent state, i. e. we assume that we gain no knowledge of the individual trajectory of outcomes, but only integrate (using a filter) their values in time, see Eq. (C1) below (although one could go beyond this and look at full trajectories, see [41,42]). Note that in this effective model we do not include additional losses nor the amplification step in the measurement chain as we discuss their effect in Section IV C. Naturally, due to the sequence of amplifiers and bringing the signal up to room temperature electronics, the actual states which are measured are not small coherent states, but classical voltage signals, but their quantum fluctuations are frozen in as classical noise.
In our analysis we also do not include a spurious photon-pressure coupling (and hence a possible rotation) to the target oscillator during the release of the state in the ancilla oscillator. Naturally, if the oscillator state is further rotated while it is also being released, then this is likely to lead to additional noise in the measurement as the to-be-measured-phase is changing in each of the weak measurements in sequence.
Our model is that of a sequence of N beamsplitter interactions of strength δt × κ open of the ancilla oscillator with individual 'measure' modes j = 0, 1, . . . , J − 1 which are each initialized in a vacuum state. For a non-tunable fixed set-up, the decay rate κ open is determined by the capacitive coupling between ancilla oscillator and transmission line and enters a more complete Hamiltonian description of such an interaction, see e. g. Appendix A in [24]. When one uses a Q-switch as in [34], one can use an effective decay rate κ open = 4g 2 /κ out when g κ out where g is the strength of the beam-splitter coupling to the lossy oscillator and κ out is the decay rate of the lossy oscillator (set by its coupling strength to some transmission line/co-planar wave guide/co-axial cable hosting 1D continuous traveling modes).
The idea is that one has a beam-splitter interaction between oscillator mode and transmission line mode localized at a point in space: this interaction puts some of the coherent amplitude in this spatial mode which due to the transmission-line Hamiltonian propagates away at (speed of light) velocity v, returning the local spatial mode to the vacuum, see Appendix E, Section 2 pp. 73-77 in [43] for this perspective of the interaction of a (cavity) oscillator with the bath modes on the transmission line. Hence the measure mode j will model the state that one can measure at time t = jδt at a fixed spatial point on the transmission line where the detector sits: a new measure mode is arriving at the detector after each time-step δt. We will take the continuum limit δt → 0 and J → ∞ in our expressions while keeping the total measurement time t meas = δtJ finite. Note that we could include thermal noise in this model by having each measure mode initialized in a thermal state instead of a vacuum state. We will assume that each measure mode j undergoes a complete heterodyne measurement, providing an outcome β j . In addition, we omit any time-dependence of the ancilla oscillator or the measure modes, i. e. our expressions assume that we work in a rotating frame at the ancilla oscillator frequency.
The outcome of the measurement is an estimate of the time-integrated (dimensionless) quadratures I out and Q out which we define as where f (t) = exp(−κ open t/2). Here β(t) is the continuum limit of the outputs β j , detailed below. To make contact with the usual input-output formalism in which we have an outgoing field b out (t) = √ κ open a(t) for the cavity field a [43] (represented here by the ancilla oscillator), we observe that the expected value I out = tmeas 0 dt q out (t) where q out (t) = 1 √ 2 (b out (t) + b out (t)) (and similarly Q out = tmeas 0 dt p out (t) ). The superoperator represented by this measurement is thus given as S Qout,Iout (ρ in ) = 1 where the integral goes over all β leading to integrated signal Q out and I out . Based on I out and Q out , the measurement estimates the eigenvalue exp(iϕ) of S q as ϕ out = arctan(Q out /I out ). If we were to use a Q-switch and a lossy oscillator, the temporal profile of the outgoing field would not be the exponentially-decaying function f (t) as the ancilla oscillator first has to build up some amplitude in the lossy oscillator before leaking out of it, and one could use such a compensated time-filter as in Eq. (S6) of [34]. Now let us consider the details of this measurement. Our expressions will depend on κ open t meas which we assume to be large, capturing the fact that we measure until the coherent state has entirely leaked out of the ancilla oscillator. Each beamsplitter interaction B applies a simple transformation on a coherent state |β in the ancilla oscillator and a measure mode j: As the measure modes j = 0, . . . , J − 1 do not couple, the total measurement operator on the measure modes is simply a product over all modes. The measurement operator equals (using β| α = exp(−(|α| 2 + |β| 2 )/2) exp(β * α)): using K |βj | = 2α j |β j |. Not surprisingly, we see that the measurement operator has the same form as in Eq. (15). If we take the continuum limit, we note that theq-dependent part in M β does not explicitly depend on the measurement results β, but on a time-integrated average over the results as follows. We have which can be simplified, using e.g. Thus when t meas is long enough so that the entire state has leaked out, we can upper bound the expected K eff ≤ 2|α| 1 + |α| 2 , resulting in a lower bound on ∆ q equal to 1/ 4π|α| 1 + |α| 2 . For long enough t meas this is identical to our result for the direct measurement, which we have shown is closely related to the actual amount of squeezing in Fig. 4.

Appendix D: Details of Numerical Simulations
The numerical simulations were implemented using the Qutip Python package. In the numerics, we apply a counterdisplacement drive Z −n , wheren is the mean photon number of the initial state of the ancilla oscillator, in order to minimize the photon number of the state in the target oscillator. The time-evolution operator of the interaction between target and oscillator is then U PP Z −n , see the end of Section II B.
All simulations model a direct, perfect heterodyne measurement by projecting the ancilla oscillator onto a coherent state. The measurement result is chosen by sampling from the Husimi-Q function, using 200 randomly chosen samples unless mentioned otherwise. Because this model of measurement is very strong, the photon numbers of the post measurement state may be very large, with some events exceeding 100 photons, see Fig. 8 on the left. Note that for GKP states, the distribution of the photon number is very wide, with the standard deviation equal to the expected photon number. Therefore, the Hilbert spaces of the target and ancilla oscillators were approximated using 500 and 20 Fock states, respectively.
To estimate the accuracy of the simulations, we use that the effective squeezing ∆ p of the vacuum state should stay constant in the case of a noiseless protocol. The results are shown in Fig. 8 on the right. As shown there, errors are negligible up to an initial ancilla state withn = 3.5 photons, and the relative error forn = 4 photons is still below 1% in most cases. For these reasons, and because the effective squeezing achieved with |α = 2 as initial ancilla state is already very strong, we restrict the simulations ton = 1, . . . , 4.  Fig. 4). For every α, a total of 200 samples was simulated. The orange line indicates the median, the box indicates the 25 and 75 percentiles, the whiskers the 5 and 95 percentiles, events above or below these thresholds are shown individually. For some events, the final state of the target oscillator has a mean photon number exceeding 100, therefore a large Hilbert space is required to faithfully represent those states. From analytical considerations, we know that ∆p = 1 should be constant, independent of the measurement results. As can be seen, errors are negligible up ton = 3.5, forn = 4, the relative error for most events is still below 1%.