Robust preparation of Wigner-negative states with optimized SNAP-displacement sequences

Hosting non-classical states of light in three-dimensional microwave cavities has emerged as a promising paradigm for continuous-variable quantum information processing. Here we experimentally demonstrate high-fidelity generation of a range of Wigner-negative states useful for quantum computation, such as Schr\"{o}dinger-cat states, binomial states, Gottesman-Kitaev-Preskill (GKP) states, as well as cubic phase states. The latter states have been long sought after in quantum optics and were never achieved experimentally before. To do so, we use a sequence of interleaved selective number-dependent arbitrary phase (SNAP) gates and displacements. We optimize the state preparation in two steps. First we use a gradient-descent algorithm to optimize the parameters of the SNAP and displacement gates. Then we optimize the envelope of the pulses implementing the SNAP gates. Our results show that this way of creating highly non-classical states in a harmonic oscillator is robust to fluctuations of the system parameters such as the qubit frequency and the dispersive shift.


I. INTRODUCTION
A promising approach to realize a quantum computer is to encode the quantum information into bosonic modes [1,2]. This approach has several advantages compared to a quantum computer based on two-level systems [3]. First, the information is redundantly encoded in the infinite-dimensional Hilbert space of a harmonic oscillator. Choosing the encoding wisely, paired with a single dominant error channel, single-photon loss, makes quantum error correction possible in a hardware-efficient way [4][5][6]. Moreover, non-Clifford gates can be implemented more efficiently on this platform [2,7,8].
The basic building blocks of the bosonic quantum computer are nonclassical states generated in a harmonic oscillator. The nonclassicality of the states is conveniently characterised by the negativity of their Wigner function, which is a necessary resource for quantum computational advantage [9,10]. One way to generate these states is to resonantly exchange excitations between a frequencytunable ancillary qubit and the oscillator [11][12][13]. This approach works well for states containing up to a few photons, thanks to fast swaps enabled by resonant interaction, but does not scale well beyond that, since one needs to climb the Fock-state ladder in a sequential manner to reach higher photon numbers. * kudra@chalmers.se † Present address: Quantum Machines Unit, Okinawa Institute of Science and Technology Graduate University, Onna-son, Okinawa 904-0495, Japan. ‡ per.delsing@chalmers.se § simoneg@chalmers.se Another approach is to use optimal control pulses in a system comprising a fixed-frequency qubit and an oscillator in the strong dispersive regime [14]. This approach works well, yielding high-fidelity states, because it addresses all the relevant transitions at once. However, it relies on very accurate estimation of the parameters of the model Hamiltonian, and fine-tuning of the drive parameters. In addition, it works like a "black box" in which the system dynamics at intermediate times cannot be used to gain insight into the mechanisms that limit the fidelity of the state preparation. By contrast, a gate based approach using displacement and selective number-dependent arbitrary phase (SNAP) gates [15,16] offers a more transparent alternative. Not only are these two gates enough for universal control of the harmonic oscillator [16], but they can also, in theory, be applied in an efficient way to greatly reduce the number of required gates [17]. A potential downside is that the standard implementation of the SNAP gates limits the achievable fidelity of the target states, because the duration of the pulses must be significantly longer than the inverse of the dispersive interaction between the qubit and the oscillator [15], which makes these gates slow and as a result more prone to decoherence effects.
In this work, we experimentally demonstrate highfidelity generation of a variety of Wigner-negative states in a microwave cavity by applying up to three blocks of interleaved displacement and SNAP gates. We show that states used in error-correction protocols, such as the Fock, binomial [6,18], and cat states [5,19], can be prepared with fidelities between 0.93 and 0.99. We also show that complex quantum states enabling universal continuous-variable quantum computing when supplied to Gaussian circuits, such as the Gottesman-Kitaev-Preskill (GKP) state [7,[20][21][22] and the cubic phase Pulse sequence used to prepare and characterize the states. C, Q and R stand for cavity, qubit and readout resonator respectively. Dα i are the displacement and S( θi) are the SNAP gates. R y π/2 are cavity-state-independent π/2 pulses. They are separated in time by 1/2χ, where χ is the dispersive shift between the qubit and the cavity. M is the measurement pulse. (b) The two steps of optimization that we perform to find the desired displacement and SNAP gates. (c) Drawing of the stub geometry cavity coupled to the transmon qubit. (d) Close-up of the chip containing the stripline readout resonator and the transmon qubit. state [7,[23][24][25], can be generated. In particular, the cubic phase state has to our knowledge not been implemented before [26,27]. In contrast to previous work [14,15], we optimize the pulse sequences with a twostep approach. First we optimize the parameters that define the applied SNAP and displacement gates using a variation of an algorithm proposed by Fösel et al. [17]. Then we numerically optimize the envelope of individual SNAP pulses to decrease the pulse length by about a factor of 8, which results in a fivefold decrease in infidelity. Moreover, we show that optimizing the SNAP pulses makes these gates more robust to fluctuations or erroneous estimation of system parameters such dispersive shift and the qubit frequency, compared to SNAP gates based on pulses with a comb-like structure in frequency domain [15].

II. METHODS
The experiments are conducted on a circuit quantum electrodynamics platform. The system consists of a three-dimensional (3D) cavity storage resonator, a pla-nar stripline readout resonator, and a superconducting transmon qubit (in the following text qubit) [28]. A 3D cavity in a coaxial λ/4 stub geometry [29] is machined into a block of high-purity aluminum. The cavity is first chemically etched to remove surface damage from the machining and then subsequently annealed [30]. The field distribution of the RF mode of the cavity is presented in Kudra et al. [30]. A single-junction transmon qubit and the micro-strip readout resonator are fabricated on a silicon chip, which is then inserted into the 3D cavity [ Fig. 1(c)-(d)]. It is measured inside a dilution refrigerator with a base temperature below 10 mK.
The device is controlled with two input lines: one for driving the cavity and one for driving the readout resonator and the qubit. The measurement and control pulses are generated and read out with the microwave transceiver platform Vivace [31]. Pulsed waveforms are sampled at a 2 GSa/s rate and up-converted to microwave frequencies by mixing them with continuous-wave carrier tones. The signals are sent to the device through a series of attenuators and filters. The readout signal is amplified by a chain having a Josephson travelling-wave amplifier [32] as the first amplifier, down-converted to an intermediate frequency, and acquired in the time domain at a sampling rate of 2 GSa/s by Vivace.
The relevant part of the qubit-storage cavity system is described by the Hamiltonian [15] Here ω c and ω q are the resonance frequencies of the cavity and the transmon qubit, respectively, K c is the Kerr nonlinearity of the cavity, χ is the dispersive shift between the cavity and the transmon qubit, χ ′ is a photonnumber-dependent correction to the dispersive shift, a † (a) is the creation (annihilation) operator of the cavity field, and, similarly, b † (b) is the raising (lowering) operator of the qubit. When doing optimization or simulation we only consider the lowest two energy levels of the qubit. The Hamiltonian parameters and the coherence properties of the system are listed in Appendix A.
To prepare an arbitrary state in the cavity, one can apply an interleaved sequence of n + 1 displacement operations and n SNAP gates [ Fig. 1(a)]. To implement this sequence, we introduce a two-step optimization routine [ Fig. 1(b)]. The first optimization step takes the target state as an input and computes the amplitudes of the displacement gates (α 1 ,α 2 ,...,α n+1 ) and phases of the SNAP gates ( θ 1 , θ 2 ,..., θ n ), for a fixed number of n SNAP gates (see Appendix D for more details). The ith SNAP gate can be mathematically described as [15,16]: and amounts to simultaneously applying the phase θ i,j to the jth Fock state, with j = 0, 1, . . . , m. In this work we have used n = 2, 3 and m between 5 and 17, depending on which state is being prepared (see Table I). For every state we prepared we try this step of the optimization for all n smaller than the one chosen in this work. The coherent errors for smaller n reduce the fidelity of the states. The incoherent errors further degrade the fidelity of the states when increasing the n beyond the n chosen in this work. In the second step, we calculate the optimal pulse envelopes to implement the required SNAP gates S( θ i ), based on the measured parameters of the Hamiltonian in Eq. (1), using the optimization tool Boulder Opal [33]. The tool solves for the unitary dynamics of the system in the presence of a driving term of the form is the complex control amplitude to be optimized. In Appendix H, we show how the method scales by simulating the fidelity of the Fock states |1 −|10 created by SNAPs and displacements. SNAP gates have been previously implemented by applying a superposition of m pulses centred at frequencies ω q +jχ, with the jth pulse rotating the qubit conditioned on the cavity being in Fock state j [15]. However, using that approach, the minimum duration of the SNAP gate is many times longer than 1/χ, limited by the requirement that each pulse should condition the dynamics on a single Fock state. In our approach, the optimal control pulses reduce the duration of the SNAP gates by about 8 times, from 4 µs down to 500 ns. At the same time, optimal control pulses correct for the phases acquired during the gate duration that result from the small Kerr nonlinearity of the cavity mode, K c . Details of the calibration of the Hamiltonian parameters and the cavity and qubit Rabi rates are given in Appendix A. We realize displacement operations, D(α), by resonantly driving the cavity with pulses with a sine-squared envelope, and a total duration of 50 ns, and a calibrated amplitude proportional to α.
Following the state preparation sequence, we perform direct Wigner tomography of the prepared state [15]. To do so, we apply a displacement of varying complex amplitude α followed by a Ramsey measurement at fixed time delay 1/2χ, which returns the photon parity of the cavity mode as the outcome of the qubit measurement. The Wigner function is then obtained as: with Π being the parity operator. We reconstruct the density matrix of the target state from the Wigner function using a recently developed neural-network-based approach [34,35] which reconstructs the most likely density matrix of the state based on the measured Wigner tomography data.

III. RESULTS
To showcase our ability to prepare arbitrary states of the cavity using displacement-SNAP gates, we pre- pare Wigner-negative states belonging to different classes of quantum states. We prepare the Fock state |2 , the binomial state (|0 + |4 )/ √ 2, and the cat state The fidelities of the prepared states are listed in Table I along with the number of applied displacement and SNAP gates, and compared to theoretical fidelities. The latter are obtained by numerically solving a master equation (see Appendix C) which takes into account the measured Hamiltonian parameters [Eq. (1)], the applied SNAP and displacement gates, and the average measured decoherence and dephasing of both the qubit and the cavity. The fidelities of the states with two photons on average (Fock, binomial, and cat) exceed 0.99 in the ideal case and they are limited by the coherence parameters of our system (to about 0.97). The fidelity of the Fock state |2 exceeds the predicted fidelity by 0.02, while the experimentally obtained binomial state has fidelity 0.03 lower than theoretical prediction. We can ascribe about ±0.01 of discrepancies to fluctuations in the coherence time of the qubit [36]. Further, we estimate the reconstruction uncertainty to be 0.01 by bootstrapping. The GKP state, which has 4 photons on average, was created by three SNAP gates that add phases to all Fock states up to Fock number 17. The corresponding displacement-SNAP sequence would create a GKP state with fidelity 0.99 in the ideal case, but with loss in our system that number drops to 0.93. This is in good agreement with  Table I. The parameters of each SNAP and displacement gate are given in Table A2. the experimentally obtained 0.94. The cubic phase state created by three SNAPs and three displacements has fidelity 0.97 to the targeted cubic phase state with cubicity γ = −0.106 and a squeezing parameter ζ = 0.5 (see Appx. E and Fig. 2) in the ideal case. After taking loss into account, the simulated fidelity is 0.92. The achieved experimental fidelity is 0.87, when taking first 10 Fock states into account. We justify taking this cutoff by the fact that more than 0.999 of the Fock state population of state created by the SNAPs and displacements is within the first 10 Fock states. The Wigner functions of the reconstructed state, and further discussion is given in Appendix F.
An advantage of the SNAP-displacement approach to state preparation is that the contribution of each individual step of the sequence to the final fidelity can be independently analyzed by taking a Wigner tomography of intermediate states after each step. This would po- tentially allow us to identify weak links in the sequence and optimize the gates individually. Such a series of "Wigner snapshots" taken after each step of the sequence to prepare the binomial state (|0 + |4 )/ √ 2 is presented in Fig. 3. The fidelities of intermediate states monotonically decrease as the sequence progresses (see Table I). SNAP gates, being 10 times longer than the displacement gates, are responsible for most of the infidelity.
We also probe the sensitivity of the state preparation sequence to different calibration parameters that are fed to our pulse optimizer (Fig. 4). To do so, we prepare the two-photon Fock state with three displacements and two SNAPs [same as Fig. 2(a)], and measure the Wigner function at the origin, W (0), as a proxy for its preparation fidelity. This state has even parity; hence the value of the Wigner function at the origin has the maximum value the Wigner function can take (2/π). Thus a lower value of the Wigner function must be associated with a decrease in fidelity, as confirmed by simulations. To probe the sensitivity to the dispersive shift χ, we vary its value fed to the optimizer by ±0.07 around its nominal value. For each value, we generate a new pulse sequence, execute it, and measure W (0) [ Fig. 4(a)]. In addition, we explore variations in the carrier frequency of the SNAP pulses f SNAP [ Fig. 4(b)], the amplitude of the displace-FIG. 5. Simulated fidelities for optimized and "standard" SNAP gates vs the same calibration parameters as in Fig. 4. The distance between the dashed lines represents the parameter span where the fidelity is within 1 % of the maximum. Optimized SNAP gates are identical to those in Fig. 4, while "standard" SNAP gates are a superposition of 4 µs long pulses centered at photon-number-dependent qubit frequencies [15]. Fig. 4(c)], and the amplitude of the SNAP pulses A SNAP [ Fig. 4(d)]. The theory lines plotted in red in Fig. 4 are obtained by simulating an open system given by the qubit and the cavity with the measured average decay and dephasing rates. The only fitting parameter is the offset in the x-axis. The offsets tell us how far from the optimal calibration point our applied pulses are. The displacement amplitude offset is -0.03 and the rest are less than 0.01. The theory lines capture well the parabolic decrease in W (0) as the pulse parameters deviate from the optimum; however, they deviate from the experimental data by a constant factor in Fig. 4(b) and (d). We attribute these deviations to fluctuations in the coherence parameters.
Further, we compare the sensitivity of "standard" and optimized SNAP gates. To do this, we simulate how the state preparation fidelity of Fock state |2 depends on the parameters χ, A disp , f SN AP and A SN AP (like in Fig. 4), for both our optimized and standard SNAP gates (Fig. 5). We define a standard SNAP gate S(θ 0 , θ 1 , ..., θ m ) as a sum of m pulses at frequencies ω q − iχ, i ∈ {0, 1, ..., m}, where m is the maximum Fock level the SNAP gate adds phase to. At each of the frequencies, two consecutive π pulses (2 µs long) with axes of rotation θ i apart are sent [15]. The distance between the dotted lines represents the parameter range which is within 1 % of the maximum fidelity. The fidelity of the state made by the standard SNAPs is 5 times more sensitive to calibration of dispersive shift χ [ Fig. 5(a)] and 7 times more sensitive to fluctuations in qubit frequency [ Fig. 5(b)]. This robustness to fluctuations in qubit frequency and dispersive shift is a feature of the optimized SNAP pulses. The displacement amplitude can be about ±0.06 from the optimal value for both the optimized and standard SNAP pulses [ Fig. 5(c)]. The displacement pulses are identical for both state preparation cases, so we would expect them to have similar sensitivity to amplitude of the displacement pulses. Finally, the amplitude of the SNAP pulses can vary ±0.05 for optimized SNAP pulses and ±0.07 for standard SNAP pulses [ Fig. 5(d)]. An important thing to note here is that the fidelity close to the maximum has a parabolic dependence on all of the calibration parameters. This allows us to independently further fine-tune these parameters.

IV. DISCUSSION
We have shown that only a few optimized SNAP and displacement gates provide a well-controlled method for generating a range of complex, highly nonclassical states relevant for quantum computation. We tested the performance of this state preparation scheme by generating Fock, binomial, cat, GKP, and cubic phase states, achieving the first experimental implementation of the latter. While binomial, cat and GKP states find their natural application in fault-tolerant quantum computation [37,38], the cubic phase state increases the fidelity in continuous-variable teleportation [39], can be used to implement a T-gate on encoded GKP states [40,41], and promotes the set of Gaussian operations to arbitrary Hamiltonian evolution yielding CV universality [23,40] and enabling the study of CV-NISQs algorithms [24].
Further, we showed that the optimized SNAP gates have parabolic dependence in fidelity with respect to perturbations of relevant calibration parameters close to the maximum fidelity. Furthermore, this preparation scheme is robust to fluctuations in both displacement amplitude (∆A disp /A disp = ±0.06) and in the amplitude (∆A SNAP /A SNAP = ±0.05) and frequency (∆f SNAP /∆χ = ±0.04) of the SNAP drive. Compared to the SNAP gates in Ref. [15], the optimized SNAP gates are about 8 times shorter, 5 times less sensitive to the calibration of dispersive shift χ, and 7 times less sensitive to fluctuations of qubit frequency. To shed light on the origin of this robustness, it would be interesting to compare the optimizer we used (Boulder Opal from QC-TRL [33]) against GRAPE [14] to create both optimized SNAPs and optimal control pulses in order to see how robust they are to variations in Hamiltonian parameters. Another possibility is to explore whether the optimized SNAP gates could be made path independent by using the third level of the transmon qubit [42,43] and posing additional constraints on the optimizer.
The methods presented here are also suited for initializing the states of interacting harmonic modes, as well as potentially applying logical gates on the logical states [17]. The 8 times shorter SNAP gate time brings the implementation of the quantum simulations with bosonic systems closer to realization [44]. Improving the coherence time of the qubit is one obvious way to improve the fidelity of all of the created states. Our results are relevant for any implementation of continuous-variable quantum computing with qubit-oscillator systems in the strong dispersive regime, including 3D microwave cavities [29,45], superconducting resonators [46], and acoustic resonators coupled to superconducting qubits [47][48][49][50].

We would like to thank Mats Myremark and Lars
Jönsson for machining the cavity, Gustav Grännsjö and Johan Blomberg for their help with the Vivace driver. We would further like to thank Andre Carvalho and Viktor Perunicic from Q-CTRL for their help with the optimization and simulation software Boulder Opal. The simulations and visualization of the quantum states were performed using QuTiP [51,52], NumPy [53], and Matplotlib [54]. The automatic differentiation tools Tensor-Flow [55] and Jax [56] were used in state reconstruction and optimization. This work was supported by the Knut and Alice Wallenberg foundation via the Wallenberg Centre for Quantum Technology (WACQT) and by the Swedish Research Council. M. Kervinen acknowledges support from the Emil Aaltonen Foundation. The chips were fabricated in Chalmers Myfab cleanroom. We acknowledge IARPA and Lincoln Labs for providing the TWPA used in this experiment.   The system parameters are listed in Table A1. The different parameters such as the dispersive shift χ, the correction to the dispersive shift χ ′ , and the Kerr nonlinearity of the cavity are measured following the calibration experiments in Ref. [57]. Besides the Hamiltonian parameters from Eq. (1), the pulse optimization is constrained by the maximum Rabi rate, the sampling frequency, and the cut-off for the digital low-pass filter function. The low-pass cut-off is 40-80 MHz depending on the target state which ensures the drive can be implemented on our hardware without exciting unwanted transitions. Since the anharmonicity of the qubit α q is much larger than the filter cut-off, we need to take only two qubit levels into account in Eq. (1). The conversion between the SNAP pulse amplitudes in frequency units and the control voltages output by the microwave platform Vivace is calibrated through standard Rabi frequency measurement. The maximum Rabi rate is ensured to be under 30 MHz to be below the maximum output amplitude of our instrument and to avoid any non-linear effects of strong driving. Finally, the sampling frequency was chosen to be 1 GSa/s (i.e., 500 points for a 500 ns pulse).

Appendix B: Wigner-function reconstruction
In order to obtain the density matrix and to estimate fidelity of the target state, we reconstruct the density matrix from the Wigner tomography measurement using a recently developed neural-network-based approach [34,35], which reconstructs the density matrix that most faithfully reproduces the Wigner tomography of the state. The fidelity is then given by where ρ and σ are the density matrices for the target and the reconstruction. For the reconstructed density matrix, we use a Hilbert space size of 32. We measure the Wigner function by using an unconditional π/2-pulse followed by a waiting time 1/(2χ) and finally either π/2 or a −π/2 pulse for every Wigner point W (α). We subtract the two readout amplitudes to get the Wigner amplitude A(α). In addition, we measure the readout amplitudes for the same sequences without the waiting time 1/(2χ) for the center of the Wigner function to get an amplitude B. The scaled Wigner function we report is (α)/B. This whole procedure is similar to the one detailed in Ref [45]. It is designed to compensate for the loss of contrast in the Wigner function when measuring at large Fock states. However, in our experimental device we had a small readout linewidth of ≈ 50kHz which further amplified the sensitivity to amplitude variations of the readout signal. This might explain the remaining discrepancies in the fidelities between the theoretically and the experimentally generated states.

Appendix C: Master-equation simulations
To obtain the theoretical fidelities of our target states, we simulate the system dynamics using a master equation with the known decoherence sources, and the applied pulse waveforms. The Lindblad master equation is defined as where T 1q and T φ are the decay and the dephasing of the qubit, respectively, whereas T 1c is the decay of the cavity mode. D is the Lindblad superoperator: which describes the decoherent procesess in the system evolution.
Appendix D: Optimization using gradient descent The parameters of the displacement and SNAP gates that are used to create the states in the main text are given in Table A2. We obtain these parameters by using gradient-based optimization of the cost function: where Ψ(α i , ..., θ j , ...) represents a variational state. This variational state is prepared by applying displacements and SNAP gates to the vacuum state. We use the fidelity F (Ψ 1 , Ψ 2 ) between the two states to construct our loss function. The LASSO regularization [58] term λ i,m |θ i m | is used to keep the SNAP parameters sparse. In Ref. [17], the authors demonstrated that only 3 to 4 SNAP gates were sufficient for relevant experimental implementation -an improvement from the ∼ 50 gates in previous approaches. In our work, we fix the number of SNAP-displacement operations and then use gradient descent to minimize Eq. (D1) starting from a random set of displacement and SNAP parameters. Our approach differs from that of Ref. [17] in that we directly optimize the displacement and SNAP parameters using gradientdescent by assuming a fixed length for the gate sequence. However the method in Ref. [17] uses a two step process where in the first step, a heuristic is used to determine a reasonable length for the gate sequence and find an approximate initialization for the parameters. In the next step, the parameters are fine tuned with gradient-based optimization.
Since in our experiment, we can only apply a limited number of gates, we fixed the length of the sequence directly and only optimize the parameters akin to the fine-tuning step of Ref. [17]. We observed that using appropriate hyperparameters and regularization of the loss function, we can directly obtain the gate parameters starting from a random initialization.
The cubic phase state is defined as where q = (a + a † ) is defined using the ladder operators a, a † and S(ζ) is the single-mode squeezing operator We use a cubicity γ = −0.106 and a squeezing parameter ζ = 0.5 to generate our cubic phase state. An additional displacement of β = 1.5i is applied to move the state in order to capture more features in the Wigner function plot.
Appendix F: Reconstructing the cubic phase state The cubic phase state that we targeted [ Fig. A1(a)] has a total occupation probability of 0.97 in the first 10 Fock states. When truncated to the first 10 Fock states [ Fig. A1(b)], the Wigner function loses a few of In order to find a fair length of the standard SNAP [15,16] to compare with the optimized SNAP, we perform a simulation that does not take loss into account and where we assume all the Hamiltonian parameters we measured are exact. We simulate the fidelity of the state S( θ 1 )|α 1 , where α 1 = 1.39 and θ 1 = (2.049, −0.654, 1.130, −1.106, 0, 0, ...) are the parameters of the first displacement and SNAP gates in the sequence of making the Fock state |2 . Results for both the sin 2 and square envelopes of the standard SNAP, as well as the optimized SNAP that was used to create the Fock state |2 in the main text (Figs. 2 and 4), are summarized in Fig. A2. The infidelity of the state created with the standard SNAP (no matter the envelope), which is 4000 ns long, is 0.015. This is comparable to the decoherence error in our system that we have during the 500 ns duration of the optimized SNAP. This is how we chose the 4000 ns standard SNAP to compare with in the main text (Fig. 5). The optimized SNAP induces four orders of magnitude smaller coherent error compared to the 4000 ns standard SNAP provided that the Hamiltonian parameters we measure are exact. We simulated preparation of Fock states from |1 to |10 using two displacements and one SNAP [ Fig. A3(a)] and using three displacements and two SNAPs [ Fig. A3(b)]. We simulated the fidelity after the first optimization step (finding the parameters of displacements and SNAPs), after the second optimization step (optimizing SNAP envelopes), and finally took loss into account.
Using only one SNAP gate, the fidelity of the Fock states goes from 0.98 for |1 down to 0.63 for |10 (af-ter both the first and second optimization steps). The fidelity is limited by the first optimization step, where one SNAP gate is not enough to achieve better fidelities. Taking loss into account, the fidelities drop by 0.02. In order to create higher Fock states, the SNAP gate has to address more and higher Fock states. The maximum Fock number that the SNAP addresses to create |1 to |10 is [0, 10,11,10,11,12,15,15,16,17].
Using two SNAP gates, the fidelity of the Fock states |1 to |7 is more than 0.999 after the first optimization step (we limit the optimizer to stop if it reaches fidelity 0.999 for all states). Fock states |8 to |10 have fidelities of 0.998 after the first optimization step. The fidelity after the second optimization step in this case drops by less than 0.001 for |1 ; the drop increases to 0.04 for |10 . The SNAP gates influence more Fock states (the maximum Fock number that the SNAP gates address to create |1 to |10 is [6,8,9,13,15,16,17,20,20,21]). The second optimization step introduces more and more coherent errors in the SNAP gates that create higher Fock states. Taking loss into account, the fidelities drop by around 0.05. This means |1 has a fidelity of 0.95 and |10 has fidelity 0.88.
The simulation time for the first simulation step is longer for larger Fock states, but it is at most a few minutes on a standard desktop computer. The second optimization step is run in the Q-CTRL remote server, and the simulation time spans from a few minutes for low Fock states up to an hour for |10 .