betaFeedback

WorksPhysics and Astronomy

Reducing the Cost of Qudit State Preparation by Learning a Sparse Structure for SNAP Gates

Abstract

Preparing quantum states in bosonic qudits with SNAP–Displacement sequences requires both optimizing the gate parameters and deciding which Fock levels should be controlled by each SNAP gate. A fully parameterized ansatz assigns an independent phase to every Fock level in every gate, leading to a number of phases that grows steeply. This constitutes a problem for short to medium term systems as controlling many phases requires complex control pulses which are subject to increased control errors. Previous work reduced this cost by restricting the trainable phases to predefined sparse patterns, such as a diagonal or a grid, which however may not be optimal for a specific target state. In this work, we address this limitation by introducing a method that learns which phases are needed together with their values, using a differentiable mask. A sparsity penalty encourages the removal of unnecessary phases, while temperature annealing gradually turns the masks into binary decisions. We compare the proposed method with fully parameterized and predefined sparse ansatzes on Fourier and Haar-random target states. The evaluation considers both the minimum number of phases required to reach different infidelity thresholds and the overall trade-off between fidelity and phases required, measured through Pareto frontiers and hypervolume. The results show that learning the location of the phases together with their values provides competitive or improved fidelity–resource trade-offs, although the advantage depends on the target state and qudit dimension.

Introduction

Bosonic quantum computing encodes quantum information in superconducting radio-frequency cavities. These cavities can store different numbers of photons, with each photon-number level corresponding to a quantum state called a Fock state. While a qubit uses two levels, conventionally denoted by ∣0⟩|0\rangle and ∣1⟩|1\rangle, a cavity can use many levels. By selecting the first dd Fock states ∣0⟩…∣d−1⟩|0\rangle\ldots|d-1\rangle, a single cavity can implement a dd-level quantum system, or qudit [1, 2, 3]. These dd Fock states form a dd-dimensional Hilbert space, which defines the computational space of the qudit. The potential advantages of encoding quantum information with qudits have been studied in many fields, including quantum simulation and quantum error correction. In particular, access to multiple levels can reduce the number of quantum devices required to represent the same information and, for some tasks, simplify the resulting circuits [4, 5, 6, 7]. While other technologies can also be used to create qudits, radio-frequency cavities offer both a large number of accessible Fock states and long coherence times [1, 8, 9] with current implementations able to control the qudit up to d=20d=20.

Among the universal gate sets proposed for bosonic systems, a widely used one combines cavity displacement operations with Selective Number-dependent Arbitrary Phase (SNAP) gates [1, 10]. Displacements redistribute the population among the Fock levels, while SNAP gates apply independently controlled phases to the Fock levels. Alternating the two gates allows for universal control over the qudit and has been used for both state preparation and unitary synthesis [11, 12, 13, 8]. The gate parameters of a SNAP–Displacement sequence can be obtained through various methods: constructive compilation, numerical optimal control, or variational optimization [11, 13, 12]. Preparing a target state with high fidelity remains a difficult problem. Constructive methods can decompose the preparation into a sequence of gates, but the number of gates can increase rapidly with the qudit dimension and the required fidelity. Variational methods can use shorter sequences, but a fully parameterized ansatz assigns one independent phase to each Fock level in every SNAP gate resulting in BdBd independent phase parameters for BB SNAP gates, which is a steep growth.

Besides increasing the time required to run the ansatz on the quantum device, a large number of phases creates an important drawback for practical applications. Controlling many Fock levels requires to engineer control pulses with several closely spaced frequency components, which can make SNAP gates longer and harder to calibrate [1, 12, 8], increasing the accumulation of control errors. Developing methods to identify the minimum number of phases required to prepare a state with the desired fidelity is therefore an active research area. Previous work addressed this problem by defining sparse SNAP–Displacement ansatzes in which only a subset of the phases can be used, according to heuristic patterns [14]. The Diagonal (adaptive), Diagonal (multiple), and Grid ansatzes were shown to reduce the number of active phases while maintaining high fidelity. However, the locations of the active phases are fixed before training and a pattern may retain phases that are not needed or exclude phases that would be useful for a specific target state.

In this work, we draw on differentiable masking methods from machine learning to overcome this restriction and make the selection of SNAP phases adaptive. The proposed Learnable method starts from the predefined Diagonal (adaptive) ansatz and associates each of the active phases with a trainable mask coefficient. These mask coefficients are optimized jointly with the phase parameters. A regularization term encourages the removal of unnecessary phases, while temperature annealing makes the learned mask progressively closer to a binary selection. The Learnable method therefore learns which phases within the starting ansatz should be retained for a given target state, as well as their optimal values.

We compare the proposed Learnable ansatz with the Full, Diagonal (adaptive), Diagonal (multiple), and Grid ansatzes using the same target states, qudit dimensions, and simulation setting. We first compare the minimum number of SNAP phases required to reach different infidelity thresholds. We then examine the Pareto frontiers to determine where each ansatz provides the best trade-off between infidelity and phase count, and use hypervolume to summarize these frontiers over both the complete explored range and the region satisfying I≤10−3I \le10^{-3}. Overall, Learnable reduces the number of SNAP phases in several configurations and provides its clearest advantage for Fourier-5 at intermediate infidelities, while the results for Haar random states are more mixed.

Background

The state preparation problem consists in finding a sequence of gates that transforms an initial state, typically ∣0⟩\lvert0\rangle, into a target state ∣ψtarget⟩\lvert\psi_{\mathrm{target}}\rangle. The quality of a prepared state ∣ψprep⟩\lvert\psi_{\mathrm{prep}}\rangle is measured through the fidelity F=∣⟨ψtarget∣ψprep⟩∣2F=\lvert\langle\psi_{\mathrm{target}}\vert\psi_{\mathrm{prep}}\rangle\rvert^2, or equivalently through the infidelity I=1−FI=1-F. A generic state of a dd-dimensional qudit is a superposition of its dd Fock states, ∣ψ⟩=∑f=0d−1cf∣f⟩\lvert\psi\rangle=\sum_{f=0}^{d-1}c_f\lvert f\rangle, where cf∈Cc_f\in\mathbb{C} and ∑f=0d−1∣cf∣2=1\sum_{f=0}^{d-1}\lvert c_f\rvert^2=1. In this paper we focus in particular on quantum states defined over a single qudit.

The SNAP–Displacement Protocol

The SNAP–Displacement protocol is a widely used approach for state preparation and unitary synthesis. It alternates displacement and SNAP gates to control the amplitudes and phases of the Fock states [1, 10].

A displacement gate changes the population distribution cc across the Fock levels and is defined as:

D(α)=exp⁡(αa^†−α∗a^),(1)D(\alpha)=\exp\left(\alpha\hat{a}^{\dagger}-\alpha^{*}\hat{a}\right), \tag*{(1)}

where α∈C\alpha\in\mathbb{C} is the displacement parameter. The operator a^\hat{a} is called annihilation operator and removes one photon from the cavity, acting as a^∣f⟩=f∣f−1⟩\hat{a}|f\rangle= \sqrt{f}|f-1\rangle and a^∣0⟩=0\hat{a}|0\rangle= 0, while the operator a^†\hat{a}^{\dagger} is called creation operator and adds one photon a^†∣f⟩=f+1∣f+1⟩\hat{a}^{\dagger}|f\rangle= \sqrt{f+1}|f+1\rangle.

A SNAP gate applies an independent phase to each Fock state:

S(θ⃗)=∑f=0∞eiθf∣f⟩⟨f∣,(2)S(\vec{\theta}) = \sum_{f=0}^{\infty} e^{i\theta_f}|f\rangle\langle f|, \tag*{(2)}

where θ⃗=(θ0,θ1,…)\vec{\theta} = (\theta_0,\theta_1,\ldots) and θf∈R\theta_f \in\mathbb{R} is the phase applied to Fock level ff.

Note that the Hilbert space of the cavity is infinite, while the hardware can directly control only a finite number of Fock levels, which correspond to the dimension dd of the qudit. However, displacement gates can also populate higher levels beyond what the hardware can control, and numerical simulations must take this effect into account to accurately represent the physical state of the cavity. This leakage is typically undesirable because it moves part of the population outside the intended qudit, reducing the preparation fidelity. The simulations therefore include a finite number of additional levels above the first dd, called bumper states, which are not part of the qudit, but allow the simulation to account for population leaking outside it.

The SNAP–Displacement protocol consists of an alternating sequence of BB SNAP gates and B+1B+1 displacement gates, and can be written as:

U(α⃗,Θ)=D(αB)S(θ⃗B−1)D(αB−1)⋯S(θ⃗0)D(α0),(3)U(\vec{\alpha},\Theta) = D(\alpha_B)S(\vec{\theta}_{B-1})D(\alpha_{B-1})\cdots S(\vec{\theta}_0)D(\alpha_0), \tag*{(3)}

where α⃗=(α0,…,αB)\vec{\alpha} = (\alpha_0,\ldots,\alpha_B) contains the displacement parameters. Each vector θ⃗b\vec{\theta}_b contains the phase angles applied by the SNAP gate at block bb, while Θ=[θb,f]∈RB×d\Theta= [\theta_{b,f}] \in\mathbb{R}^{B \times d} collects the phases applied to the first dd Fock levels across the whole protocol. The phases of the bumper states are set to zero. Starting from ∣0⟩|0\rangle, the state prepared by the protocol is ∣ψprep⟩=U(α⃗,Θ)∣0⟩|\psi_{\mathrm{prep}}\rangle= U(\vec{\alpha},\Theta)|0\rangle.

In the fully parameterized ansatz, every entry of Θ\Theta is independently optimized. The protocol therefore contains BdBd SNAP phases and B+1B+1 complex displacement parameters. Since this work studies how to reduce the resources required by SNAP gates, we use the number of active, i.e., non-zero, SNAP phases as the main measure of the resources required.

The parameters of a SNAP–Displacement sequence can be determined through constructive compilation, numerical optimal control, or variational optimization [11, 13, 12]. In this work, we follow the variational approach and optimize the displacement parameters and SNAP phases to maximize the fidelity with the target state.

Predefined Sparse Phase Ansatzes

Previous work proposed reducing the number of SNAP phases by optimizing only those in specific locations [14]. The proposed patterns were motivated by the observation that, starting from ∣0⟩|0\rangle, displacement gates tend to populate higher Fock levels progressively as the protocol advances. Therefore, phases applied to high Fock levels during the first blocks may have little or no effect because those levels have negligible population.

The SNAP phases can be arranged as a matrix Θ=[θb,f]∈RB×d\Theta= [\theta_{b,f}] \in\mathbb{R}^{B \times d}, where the rows correspond to the protocol blocks and the columns to the Fock levels. A fixed binary structural mask Mstruct∈{0,1}B×dM^{\mathrm{struct}} \in\{0,1\}^{B \times d} controls which SNAP phases can be optimized, with the actual unitary used for state preparation being U(α⃗,Θ~)U(\vec{\alpha},\widetilde{\Theta}), with Θ~=Mstruct⊙Θ\widetilde{\Theta} = M^{\mathrm{struct}} \odot\Theta, where ⊙\odot denotes element-wise multiplication. Entries with Mb,fstruct=1M^{\mathrm{struct}}_{b,f}=1 are learnable, while those with Mb,fstruct=0M^{\mathrm{struct}}_{b,f}=0 are fixed to zero.

The following heuristic structures were considered in [14]:

  • Full: all phases are learnable, so that Mb,fstruct=1M^{\mathrm{struct}}_{b,f}=1 for every block and Fock level.

  • Diagonal (adaptive): the learnable phases lie within a band around the diagonal connecting the first and last Fock levels across the protocol. The diagonal follows f=d−1B−1bf = \frac{d-1}{B-1}b, while a width hyperparameter determines the size of the band.

  • Diagonal (multiple): several parallel diagonal bands are used. Their number and width are set as hyperparameters.

  • Grid: diagonal and anti-diagonal bands are combined, producing a grid of learnable phase locations. The number and width of the bands are set as hyperparameters.

These structures reduce the number of learnable phases, but the structural mask is fixed once the heuristic and its hyperparameters have been selected. The gate parameter optimization determines the values of the learnable phases and may set some of them to zero, but it cannot change which entries of Θ\Theta can be optimized. Our Learnable method which we introduce in the next section starts from the structural mask of the Diagonal (adaptive) ansatz and learns which phases within this mask should be retained.

Learnable Phase Locations

The heuristic ansatzes described in § 2.2 determine which SNAP phases are learnable before training. Our goal is to make this selection adaptive, so that the ansatz can retain only the phases that are useful for the target state rather than relying entirely on a predefined pattern. In our proposed Learnable method, we start from the mask defined by the Diagonal (adaptive) structure and introduce a second mask whose values are learned together with the gate parameters.

We refer to the mask defined by the Diagonal (adaptive) heuristic as the structural mask, Mstruct∈{0,1}B×dM^{\mathrm{struct}} \in\{0,1\}^{B \times d}. This mask limits the phase locations considered by the method. A second mask, referred to as the learned mask, Mlearn∈[0,1]B×dM^{\mathrm{learn}} \in[0,1]^{B \times d}, determines which of these phases are retained. The two masks are combined through element-wise multiplication.

Differentiable Learned Mask

A binary mask cannot be optimized directly using gradient-based methods, since changing one of its entries from zero to one is a discrete operation. We therefore use a continuous soft mask during training and convert it into a binary mask only after the optimization is complete. For each entry for which Mb,fstruct=1M^{\mathrm{struct}}_{b,f}=1, we introduce a trainable logit zb,fz_{b,f}, which is an unconstrained real valued parameter that is mapped to the interval [0,1][0,1] through a sigmoid function. The corresponding entry of the learned mask is defined as

Mb,flearn=σ(zb,fτ),(4)M^{\mathrm{learn}}_{b,f} = \sigma\left(\frac{z_{b,f}}{\tau}\right), \tag*{(4)}

where σ\sigma is the sigmoid function and τ>0\tau> 0 is a temperature parameter. Positive values of zb,fz_{b,f} favour retaining the phase, while negative values favour suppressing it. Similarly, the value of Mb,flearnM^{\mathrm{learn}}_{b,f} controls how much of the corresponding phase is retained, with values close to one leaving the phase almost unchanged, and values close to zero suppressing it. The structural and learned masks are combined into the effective mask

Meff=Mstruct⊙Mlearn,(5)M^{\mathrm{eff}} = M^{\mathrm{struct}} \odot M^{\mathrm{learn}}, \tag*{(5)}

The effective protocol is therefore U(α⃗,Θ~)U(\vec{\alpha},\widetilde{\Theta}) where the SNAP phases used are

Θ~=Meff⊙Θ.(6)\widetilde{\Theta} = M^{\mathrm{eff}} \odot\Theta. \tag*{(6)}

If Mb,fstruct=0M^{\mathrm{struct}}_{b,f}=0, the corresponding phase remains fixed to zero. If Mb,fstruct=1M^{\mathrm{struct}}_{b,f}=1, its contribution is controlled by the learned mask.

Since the soft-mask values depend continuously on the logits, the logits can be optimized together with the gate parameters using gradient-based methods. The logits are initialized to zb,f=6z_{b,f}=6. With the initial temperature τstart=1\tau_{\mathrm{start}}=1, this gives learned-mask values close to one, so the optimization starts from almost the complete structural mask.

During training, the temperature is reduced according to a geometric annealing schedule. At training step tt, the temperature is

τt=τstart(τendτstart)qt,qt=min⁡(1,tNanneal),(7)\tau_t = \tau_{\mathrm{start}} \left(\frac{\tau_{\mathrm{end}}}{\tau_{\mathrm{start}}}\right)^{q_t}, \qquad q_t = \min\left(1,\frac{t}{N_{\mathrm{anneal}}}\right), \tag*{(7)}

where NannealN_{\mathrm{anneal}} is the number of steps over which annealing is performed. In our experiments, the temperature decreases from τstart=1\tau_{\mathrm{start}} = 1 to τend=0.05\tau_{\mathrm{end}} = 0.05 over 10 000 training steps and remains fixed afterward. At the beginning of training, the higher temperature gives a smoother dependence of the mask on the logits. As the temperature decreases, the sigmoid becomes steeper and the mask values move closer to zero or one. This avoids making sharp decisions before the phase and displacement parameters have had time to adapt. Annealing sharpens the mask values, while the joint objective introduced in § 3.2 determines whether retaining or suppressing each phase is preferred.

At the end of training, the learned soft mask is converted into a binary hard mask using a threshold γ\gamma:

Mb,fbin={1,Mb,flearn≥γ,0,Mb,flearn<γ.(8)M^{\mathrm{bin}}_{b,f} = \begin{cases} 1, & M^{\mathrm{learn}}_{b,f} \ge\gamma,\\ 0, & M^{\mathrm{learn}}_{b,f} < \gamma. \end{cases} \tag*{(8)}

In our experiments, we use γ=10−3\gamma= 10^{-3}. The final binary effective mask is

Meff,bin=Mstruct⊙Mbin∈{0,1}B×d.(9)M^{\mathrm{eff},\mathrm{bin}} = M^{\mathrm{struct}} \odot M^{\mathrm{bin}} \in\{0,1\}^{B \times d}. \tag*{(9)}

The entries for which Mb,feff,bin=1M^{\mathrm{eff},\mathrm{bin}}_{b,f} = 1 identify the phases retained by the final mask. In order to mitigate the risk that the mask hardening process pushes the gate parameters in a suboptimal region, a short fine tuning phase of 200 steps is carried out using a learning rate reduced by a factor of ten. The final gate parameters are those used to compute the fidelity between the prepared state and the target one.

The differentiable mask defines how phases can be retained or suppressed, but it does not by itself determine which choice is preferred. This is controlled by the joint optimization objective, which balances the fidelity of the prepared state with the number of the retained mask entries.

Joint Parameter Optimization

The displacement parameters, SNAP phases, and learned mask logits are optimized jointly. Following [14], the gate parameters are obtained from unconstrained real-valued variables, which can be updated using gradient-based optimization. Each displacement gate is associated to a complex valued parameter αb\alpha_b which is represented in polar coordinates using two real parameters rb,sb∈Rr_b, s_b \in\mathbb{R}

αb=βbeiφb,βb=ReLU⁡(rb),φb=πtanh⁡(sb).(10)\alpha_b = \beta_b e^{i\varphi_b}, \qquad\beta_b = \operatorname{ReLU}(r_b), \qquad\varphi_b = \pi\tanh(s_b). \tag*{(10)}

This mapping ensures that the displacement magnitude is non-negative and that its phase lies in [−π,π][-\pi,\pi]. Similarly, each SNAP phase selected by the structural mask is obtained from an unconstrained parameter tb,f∈Rt_{b,f} \in\mathbb{R} as

θb,f=πtanh⁡(tb,f),(11)\theta_{b,f} = \pi\tanh(t_{b,f}), \tag*{(11)}

which restricts the phase to [−π,π][-\pi,\pi]. The logits zb,fz_{b,f} introduced in § 3.1 are optimized together with these gate parameters.

The displacement parameters, SNAP phases, and mask logits are optimized by maximizing the fidelity of the prepared state while penalizing large gate parameters and the number of phases retained by the mask. The complete objective is

J=F(α⃗,θ⃗)−Rgate−Rmask.(12)\mathcal{J} = F\left(\vec{\alpha},\vec{\theta}\right) - R_{\mathrm{gate}} - R_{\mathrm{mask}}. \tag*{(12)}

The first regularization term is applied to the gate parameters:

Rgate=λ1(∥α⃗∥1+∥θ⃗∥1)+λ2(∥α⃗∥22+∥θ⃗∥22).(13)R_{\mathrm{gate}} = \lambda_1 \left(\lVert\vec{\alpha}\rVert_1 + \lVert\vec{\theta}\rVert_1\right) + \lambda_2 \left(\lVert\vec{\alpha}\rVert_2^2 + \lVert\vec{\theta}\rVert_2^2\right). \tag*{(13)}

The ℓ1\ell_1 term encourages some gate parameters to become zero, while the ℓ2\ell_2 term limits large phase values and displacement amplitudes. We aim to set as many SNAP phase angles as possible to zero, as well as limiting large displacements because they can increase leakage to higher Fock levels and sensitivity to photon loss, which is a dominant noise mechanism in bosonic cavities. The weights λ1\lambda_1 and λ2\lambda_2 control the gate regularization. In the experiments for our Learnable method both are set to zero, so sparsity is controlled only through the learned mask. For the other baseline ansatzes, their values are instead searched with hyperparameter optimization as described in § 4.5. Note that the regularization is applied to the gate parameters, rather than to the unconstrained variables from which they are computed (see Eq. (10) and 11), because only the gate parameters represent the physical operations that need to be performed.

The second regularization term controls the learned mask:

Rmask=λmask∑b,fMb,feff+λent∑b,fH(Mb,feff),(14)R_{\mathrm{mask}} = \lambda_{\mathrm{mask}} \sum_{b,f} M^{\mathrm{eff}}_{b,f} + \lambda_{\mathrm{ent}} \sum_{b,f} H\left(M^{\mathrm{eff}}_{b,f}\right), \tag*{(14)}

where H(m)=−mlog⁡m−(1−m)log⁡(1−m)H(m) = -m \log m - (1-m)\log(1-m) is the binary entropy, using the convention 0log⁡0=00 \log0 = 0, so that H(0)=H(1)=0H(0) = H(1) = 0.

Since the effective mask is continuous during training, the sum ∑b,fMb,feff\sum_{b,f} M^{\mathrm{eff}}_{b,f} provides a differentiable approximation of the number of phases retained by the mask. Minimizing this term favours mask values close to zero, while the fidelity term prevents phases that are needed for state preparation from being removed. The weight λmask\lambda_{\mathrm{mask}} therefore controls the trade-off between fidelity and the number of retained phases. The entropy term has a different role. Binary entropy is zero when a mask value is zero or one and is largest when it is equal to 0.5. Penalizing this term therefore discourages intermediate values that do not favor retention or suppression. Together, the two mask terms encourage unnecessary phases to move towards zero and useful phases to remain close to one. The temperature schedule introduced in § 3.1 makes this separation progressively sharper. Note that the mask regularization and the ℓ1\ell_1 gate regularization act on different aspects of the ansatz. The mask regularization determines whether a phase remains learnable in the final ansatz, whereas the ℓ1\ell_1 term acts on the numerical value of a phase and may set it to zero even when it is retained by the mask.

The unconstrained displacement variables, SNAP phase variables, and mask logits are updated jointly using Adam. The regularization weights λ1\lambda_1, λ2\lambda_2, λmask\lambda_{\mathrm{mask}}, and λent\lambda_{\mathrm{ent}} remain fixed during an individual training run and are selected through the hyperparameter optimization procedure described in § 4.4 and 4.5.

After training, the hard effective mask from Equation (9) is applied. Entries equal to one identify the phases retained by the mask, while entries equal to zero fix the corresponding phases to zero. The gate parameters are then optimized for a further 200 steps, as described in § 4.3. Greedy refinement and structural compression are subsequently applied as described in § 4.4.

Methodology

Experimental Setting

We evaluate our proposed Learnable method on the same target states considered by [14]: Fourier-5 and Haar random states defined for qudit dimensions d∈{8,16,32}d \in\{8, 16, 32\}. The SNAP–Displacement protocol starts from the vacuum state ∣0⟩\lvert0\rangle. The Fourier-5 states are obtained by applying the dd-dimensional Quantum Fourier Transform to the Fock state ∣5⟩\lvert5\rangle. The resulting state has equal amplitudes over the dd Fock levels and phases that vary regularly across them. The Haar random target states are complex pure states sampled according to the Haar measure.

Although the target states are defined over the first dd Fock levels, as we previously explained displacement operations can populate levels higher than dd. The numerical simulations are performed in an extended Hilbert space containing nbumper=max⁡(64,2d)n_{\mathrm{bumper}} = \max(64, 2d) bumper states in addition to the dd levels of the qudit. The total dimension used in the simulations is d~=d+nbumper\tilde{d} = d + n_{\mathrm{bumper}}. The target state is represented in the extended Hilbert space by assigning zero amplitude to all bumper states. Fidelity is evaluated over the complete space, so population leaking to the bumper states reduces the overlap with the target state.

We perform all simulations in double precision. The number of phases required by each method is evaluated at the target infidelity thresholds 10−110^{-1}, 10−210^{-2}, 10−310^{-3}, 10−410^{-4}, and 10−510^{-5}.

Evaluation Protocol

Our goal is to determine whether the Learnable ansatz can reach a given prepared state fidelity using fewer SNAP phases than the heuristic ansatzes, and whether this advantage remains consistent across a wide range of infidelity thresholds. The first stage is to identify the optimal hyperparameter configuration, as we describe in § 4.4 and § 4.5. Since a small number of random initializations can produce large outliers with very poor fidelity, we repeat the training over many random initializations and define the infidelity II of each configuration as the mean infidelity over the 75% of repetitions with the highest fidelity. Similarly, the number of phases associated to that hyperparameter configuration is the mean across the selected repetitions. These value are used throughout the analysis. We first compare the ansatzes at a set of target infidelities. For each target state, qudit dimension, and threshold ϵ\epsilon, we consider all hyperparameter configurations satisfying I≤ϵI \le\epsilon and report the minimum number of SNAP phases among them. This analysis directly measures the number of phases required to reach a given preparation accuracy.

A reduction in the number of phases does not necessarily produce the same reduction in the physical duration of the ansatz, since the duration also depends on how the phases are distributed among the SNAP gates. We therefore report its estimated duration. Following Bornman et al. [15], the duration of a SNAP gate in block bb is estimated as

TSb≈10p(θb) μs,(15)T_{S_b} \approx10\sqrt{p(\theta_b)}\ \mu\mathrm{s}, \tag*{(15)}

where p(θb)p(\theta_b) is the number of non-zero phase angles in that SNAP gate. The duration of a Displacement gate is much smaller and can be safely ignored. The ansatz duration is computed by adding the duration of all the SNAP gates in the ansatz. The duration associated to a hyperparameter configuration is the mean duration of the selected repetitions.

The analysis at fixed infidelity thresholds provides a direct comparison between ansatzes but only at those predefined thresholds. To provide a more complete picture, we also examine the Pareto frontiers. Each configuration is represented by a point (p,I)(p,I), where pp is the number of SNAP phases and II is the aggregated infidelity. Both quantities should be minimized, so points closer to the lower-left region represent better trade-offs. A point belongs to the Pareto frontier when no other evaluated configuration has both a lower phase count and a lower infidelity, with at least one strict improvement. The frontier contains the configurations for which improving one objective requires worsening the other. It therefore shows the regions in which each ansatz provides the best balance between accuracy and phase count.

While the Pareto frontiers show where these differences occur and are useful for visualization, comparing several frontiers across target states and qudit dimensions is not straightforward. We use the hypervolume indicator (HV) to summarize each frontier through a single value [16, 17]. To compute the HV, a reference point is selected whose infidelity and number of phases are individually worse than those of all the evaluated configurations. Each point on the frontier defines a rectangular region extending towards this reference point, and the hypervolume is the area covered by the union of these regions. A larger hypervolume indicates a better trade-off, since it corresponds to lower infidelities, fewer phases, or both. For readability, the hypervolume values reported in the tables are multiplied by 100.

We compute the hypervolume in two settings. The first includes the complete range of infidelities explored during the experiments and is directly comparable with [14]. The second includes only configurations satisfying I≤10−3I \le10^{-3} and focuses on the region where the Pareto frontiers show the main advantage of the Learnable ansatz. The normalization and reference point are computed independently @references Аҟәа for the two settings. Their absolute hypervolume values are therefore not compared across settings; comparisons are made only between ansatzes within the same setting and qudit dimension. To quantify uncertainty, the reference point for each setting is computed using all repetitions and is then kept fixed during bootstrap resampling. For each hyperparameter configuration, the independent repetitions are sampled with replacement, and the mean infidelity is recomputed using the 75% of repetitions with the highest fidelity. The Pareto frontier and its hypervolume are then recomputed. We repeat this procedure 1000 times and report the mean hypervolume and its 95% confidence interval.

Training Protocol

For each ansatz and hyperparameter configuration, the gate parameters are optimized through gradient ascent using Adam. In the Learnable ansatz, the mask logits are optimized jointly with the displacement parameters and SNAP phases according to the objective defined in § 3.2. The learning rate and regularization weights remain fixed within each training run. Their values are either fixed as part of the experimental setting or selected through the hyperparameter optimization procedures described in § 4.4 and § 4.5.

Each training run is limited to 10410^{4} optimization steps. Early stopping is applied when the best fidelity does not improve by at least 10−610^{-6} for 10310^{3} consecutive steps. Reaching the target infidelity does not terminate the training run, since the threshold is used by the outer hyperparameter optimization to evaluate the final configuration. Since the optimization is sensitive to the initial gate parameters, each configuration is trained from multiple independent random initializations, also referred to as multistart training. Each baseline configuration is evaluated using 100 initializations, following [14], while each Learnable configuration is evaluated using 10 initializations.

During each repetition, the parameter configuration achieving the highest fidelity is retained. For the Learnable ansatz, the temperature of the soft mask is updated at each optimization step using the schedule defined in Equation (7). After training, the soft mask is converted into the hard effective mask defined in Equation (9). The retained gate parameters are then optimized for a further 200 steps using a learning rate reduced by a factor of ten, and the fidelity is recomputed using the resulting ansatz.

Hyperparameter Optimization

In a near term setting, the fidelity that can be achieved in practice is limited not only by the expressivity of the ansatz, but also by noise and other experimental imperfections. Increasing the number of phases to improve the fidelity beyond the range relevant to the application may therefore be counterproductive and result in a longer and more complex ansatz which is more subject to noise and control errors. We assume that this range is known and represent it through a target infidelity ϵ\epsilon. The aim of the hyperparameter optimization is then to identify a sparse ansatz whose final infidelity satisfies I≤ϵI \le\epsilon. In our experiments ϵ∈{10−5,10−4,10−3}\epsilon\in\{10^{-5}, 10^{-4}, 10^{-3}\}.

A separate hyperparameter optimization is performed for each target state, qudit dimension, and value of ϵ\epsilon. The hyperparameters of the Learnable ansatz are selected sequentially, and each configuration considered during the search is evaluated using the training protocol described in § 4.3. The procedure assumes that increasing the width ww of the structural mask generally improves fidelity, while increasing λmask\lambda_{\mathrm{mask}} generally removes more phases at the cost of fidelity. These relations are not guaranteed because every configuration requires a separate non-convex optimization. The search works as follows. First, we fix the number of blocks to B=dB = d in all experiments, so it is not included in the search. The remaining hyperparameters are selected in two stages:

  1. select the width ww of the structural mask;

  2. select the mask regularization weight λmask\lambda_{\mathrm{mask}}.

During the first stage, the learned mask is disabled. Starting from w=1w = 1, the width is increased until a value satisfying I≤ϵI \le\epsilon is found, or the maximum width of 10 is reached. The interval between the largest tested width that does not satisfy the threshold and the smallest width that satisfies it is then refined through two binary search steps. The smallest tested width satisfying the target infidelity is selected.

During the second stage, the selected width is kept fixed and the learned mask is enabled. We do not apply regularization directly to the gate parameters, while the entropy regularization weight is fixed to λent=0.1\lambda_{\mathrm{ent}} = 0.1. The mask regularization weight is the only regularization coefficient selected by this search. The search first evaluates λmask=0\lambda_{\mathrm{mask}} = 0, for which the learned mask is disabled and only the structural mask is used. Positive values are then tested starting from 10−510^{-5} and increasing by a factor of 10 until the target infidelity is no longer satisfied or the maximum value of 1 is reached. The interval between the largest accepted value and the first rejected value is refined through four binary search steps. A final comparison is performed between the selected value and values 2% above and below it. The largest tested value satisfying I≤ϵI \le\epsilon is selected.

The gate parameters obtained from the width search are used to initialize each configuration evaluated during the search for λmask\lambda_{\mathrm{mask}}. Each tested value of λmask\lambda_{\mathrm{mask}} therefore starts from the same gate parameters rather than from the result obtained for the preceding value.

After selecting ww and λmask\lambda_{\mathrm{mask}}, the pipeline includes two final refinement steps. First, greedy refinement attempts to remove the remaining phases one at a time, accepting a removal only when the resulting ansatz still satisfies I≤ϵI \le\epsilon. Accepted removals are retained during the subsequent tests. Second, structural compression removes any SNAP gate whose phase vector is entirely zero and combines its two adjacent displacement gates into a single displacement. Figure 1 summarizes the complete procedure. The block search shown in the figure is omitted in our experiments, since we fix B=dB = d.

Overview of the optimization pipeline for the Learnable ansatz

Figure 1. Overview of the optimization pipeline for the Learnable ansatz. In the experiments reported in this work, the number of blocks is fixed to B=dB = d, so the block search shown in the first stage is omitted. The remaining stages include width selection, learned-mask optimization, greedy refinement, and structural compression.

Each hyperparameter optimization run is allocated a maximum wall time of four days. If the optimization does not complete within this limit, the search is terminated and the analysis uses all configurations completed before the interruption. This limitation mainly affects the experiments with d=32d = 32, for both the Fourier-5 and Haar random states.

Unlike the baseline optimization described in § 4.5, which uses different scalarization weights to explore the trade-off between fidelity and phase count, the sequential procedure searches directly for a sparse configuration satisfying a specified infidelity threshold. This keeps the search focused on the accuracy range relevant to the application.

Baseline Hyperparameter Optimization

All baseline architectures (Full, Diagonal (adaptive), Diagonal (multiple), and Grid) are optimized following the optimization protocol used in Ferrari Dacrema et al. [14], combining a scalarized loss and a Tree-structured Parzen Estimator (TPE) which is allowed to explore 50 cases.

The hyperparameter optimization of the baselines includes two sets of hyperparameters. The first controls the learning process, including the learning rate and the regularization weights λ1\lambda_1 and λ2\lambda_2. The second defines the structure of the ansatz and includes, for example, the number of blocks BB, the diagonal width ww, the number of diagonals mdiagm_{\mathrm{diag}}, and the number of anti-diagonals mantim_{\mathrm{anti}}, depending on the baseline architecture.

These hyperparameters, particularly those controlling the ansatz structure, affect both the fidelity of the prepared state and the required resources, such as the number of blocks and non-zero SNAP phases. To balance these competing objectives, [14] formulated a multi-objective optimization problem that maximizes the fidelity while minimizing the number of non-zero SNAP phases. Following a standard scalarization approach [18], the two objectives are combined into a single scalar objective used to evaluate each hyperparameter configuration hh:

Lh(α⃗h,Θh,β)=F(α⃗h,Θh)−βp(Θh)2d−2,(16)L_h(\vec{\alpha}_h, \Theta_h, \beta) = F(\vec{\alpha}_h, \Theta_h) - \beta\frac{p(\Theta_h)}{2^d - 2}, \tag*{(16)}

where F(α⃗h,Θh)F(\vec{\alpha}_h, \Theta_h) is the fidelity obtained after optimizing the gate parameters for a given hyperparameter configuration hh, p(Θh)p(\Theta_h) denotes the number of non-zero SNAP phase angles, and β\beta is a penalty coefficient controlling the trade-off between preparation fidelity and resource requirements. Its value is fixed before each hyperparameter optimization run and is not selected by TPE. The normalization factor 2d−22d - 2 corresponds to the number of real degrees of freedom of a pure quantum state of dimension dd, excluding normalization and global phase, allowing a consistent interpretation of β\beta across different qudit dimensions.

Note that the same paper [14] also introduced a second scalarized loss penalizing the duration of the ansatz and observed that the duration is a much more difficult quantity to minimize. For this reason, in this study we focus on penalizing the number of phases.

Different values of β\beta produce different operating points, ranging from high-fidelity solutions requiring many non-zero SNAP phases to sparser solutions with lower resource requirements. We therefore perform a separate hyperparameter optimization for each value

β∈{0,10−6,10−5,10−4,10−3,10−2,10−1}.\beta\in\{0, 10^{-6}, 10^{-5}, 10^{-4}, 10^{-3}, 10^{-2}, 10^{-1}\}.

For each value of β\beta, the Tree-structured Parzen Estimator (TPE) explores at most 50 hyperparameter configurations. Using the same scalarization weights as [14] allows for a direct comparison between our Learnable method and the architectures they proposed.

Results and Discussion

We evaluate the trade-off between preparation fidelity and the number of retained SNAP phases through three complementary analyses. First, for each target infidelity, we identify the ansatz requiring the minimum number of phases. Second, we compare the Pareto frontiers to examine the trade-off over the complete set of hyperparameter configurations explored. Third, we use hypervolume to summarize this trade-off both over the complete infidelity range and within the region satisfying I≤10−3I \le10^{-3}, where the Pareto frontiers indicate Learnable is the most effective.

Number of SNAP Phases per Target Infidelity

This first analysis compares the number of SNAP phases required by each ansatz to reach a given target infidelity. For each target state, qudit dimension, and threshold ϵ\epsilon, we consider all evaluated configurations satisfying I≤ϵI \le\epsilon and report the minimum number of SNAP phases. Lower values indicate that the same state preparation fidelity is reached using fewer phases, indicating the method exhibits a better trade-off.

As shown in Tables 1 and Table 2, Learnable requires fewer SNAP phases than all the baselines in 7 of the 15 Fourier-5 configurations. Its improvements are most consistent at d=16d = 16, where it performs best at three of the five infidelity thresholds. For the Haar random state, Learnable obtains 5 strict improvements and 2 ties. In this case, the strongest results are obtained at d=8d = 8, where it requires the fewest phases at four of the five thresholds, while the results become more mixed as dd increases.

dInfidelity ≤Full PhasesFull T [μ\mus]Diagonal (adaptive) PhasesDiagonal (adaptive) T [μ\mus]Diagonal (multiple) PhasesDiagonal (multiple) T [μ\mus]Grid PhasesGrid T [μ\mus]Learnable PhasesLearnable T [μ\mus]
810−110^{-1}1656660758856880
810−210^{-2}248516981592151001187
810−310^{-3}3211319104191062212015107
810−410^{-4}3211324117241282613216111
810−510^{-5}4014134142341544516434164
1610−110^{-1}328016131211342010616161
1610−210^{-2}4812030155371483516932223
1610−310^{-3}6416044161571825424142256
1610−410^{-4}8020066243701866918551283
1610−510^{-5}11228098296--108275--
3210−110^{-1}9617036274492403821272452
3210−210^{-2}9617064210961928527576473
3210−310^{-3}12822696238129251127225121614
3210−410^{-4}160283142393197370161308153701
3210−510^{-5}4487936731428--320593--

Table 2. Table 2 Comparison of the minimum number of non-zero phases required to reach different infidelity thresholds for the Haar random target state.

For the Fourier-5 state, see Table 1, Learnable is particularly effective for the larger qudit dimensions and the more demanding reachable thresholds. At d=32d = 32, it requires 81 phases for I≤10−3I \le10^{-3} and 153 phases for I≤10−4I \le10^{-4}, compared with 152 and 348 phases, respectively, for the best baseline. These values correspond to reductions of approximately 47% and 56%. A similar trend is observed at d=16d = 16, where Learnable reduces the phase count from 54 to 30 at I≤10−3I \le10^{-3} and from 72 to 50 at I≤10−4I \le10^{-4}.

For the Haar random state, see Table 2, the improvements are more moderate and depend more strongly on the qudit dimension. At d=8d = 8, Learnable achieves the lowest phase count for thresholds between 10−210^{-2} and 10−410^{-4}; in particular, it requires 16 phases at I≤10−4I \le10^{-4}, compared with 24 for the best baseline. At d=16d = 16 and the same threshold, the phase count decreases from 66 to 51. Conversely, Learnable is less competitive at d=32d = 32, where it does not achieve the minimum phase count at any of the reported thresholds. For example, at I≤10−4I \le10^{-4}, Learnable requires 153 phases, while the best baseline requires 142. Learnable also does not reach I≤10−5I \le10^{-5} for d=16d = 16 and d=32d = 32 within the allotted computational budget of four days and the hyperparameter optimization is terminated before its completion.

The ansatz durations reported in the same tables show that a lower phase count can often be obtained without increasing the duration substantially. For the Fourier-5 state at d=16d = 16 and I≤10−3I \le10^{-3}, Learnable reduces the number of phases from 54 to 30, while its duration of 214 μs\mu\mathrm{s} remains within 10% of the shortest baseline duration of 195 μs\mu\mathrm{s}. For the Haar random state at d=8d = 8 and I≤10−4I \le10^{-4}, Learnable uses 16 phases and has a duration of 111 μs\mu\mathrm{s}, compared with 24 phases and 117 μs\mu\mathrm{s} for the best baseline. The behavior is particularly favorable for the Fourier-5 state at d=32d = 32. At I≤10−3I \le10^{-3}, Learnable achieves both the lowest phase count and the shortest duration, requiring 81 phases and 495 μs\mu\mathrm{s}. At I≤10−4I \le10^{-4}, it requires 153 phases and 701 μs\mu\mathrm{s}, compared with 348 phases and 911 μs\mu\mathrm{s} for the best baseline in terms of phase count. However, fewer phases do not always imply a shorter ansatz. For the Haar random state at d=16d = 16 and I≤10−4I \le10^{-4}, Learnable reduces the phase count from 66 to 51, but its duration increases from the best baseline value of 185 μs\mu\mathrm{s} to 283 μs\mu\mathrm{s}. The least favorable case is observed for the Haar random state at d=32d = 32 and I≤10−4I \le10^{-4}, where Learnable minimizes neither the phase count nor the duration, requiring 153 phases and 701 μs\mu\mathrm{s}, compared with 142 phases and a minimum baseline duration of 283 μs\mu\mathrm{s}. This confirms that the ansatz duration depends not only on the total number of active phases, but also on their distribution across the SNAP gates and circuit blocks.

Pareto Frontiers

The previous analysis considers a set of fixed infidelity thresholds. To examine the complete trade-off between preparation accuracy and the number of SNAP phases, we also compare the Pareto frontiers obtained by the different ansatzes. A configuration belongs to the Pareto frontier when no other evaluated configuration achieves both a lower infidelity and a lower number of phases.

Figure 2 and Figure 3 show the Pareto frontiers for the Fourier-5 and Haar random states at d=16d = 16 and d=32d = 32. For Fourier-5, Learnable provides a clear advantage at intermediate infidelities, approximately between 10−210^{-2} and 10−410^{-4}, where it reaches similar or lower infidelities using fewer SNAP phases. It should be noted that this corresponds broadly to the target infidelities used for the hyperparameter

Pareto frontier for Fourier-5 target state at $d = 16$

(a)

Pareto frontier for Fourier-5 target state at $d = 32$

(b)

Figure 2. Pareto frontiers comparing the trade-off between infidelity and the number of SNAP phases for the Fourier-5 target state.

Pareto frontier for Haar random target state at $d = 16$

(a)

Pareto frontier for Haar random target state at $d = 32$

(b)

Figure 3. Pareto frontiers comparing the trade-off between infidelity and the number of SNAP phases for the Haar random target state.

dInfidelity ≤Full PhasesFull T [μ\mus]Diagonal (adaptive) PhasesDiagonal (adaptive) T [μ\mus]Diagonal (multiple) PhasesDiagonal (multiple) T [μ\mus]Grid PhasesGrid T [μ\mus]Learnable PhasesLearnable T [μ\mus]
810−110^{-1}828220440110660
810−210^{-2}1656107710601076770
810−310^{-3}2485168815921687880
810−410^{-4}3211322114191062011321127
810−510^{-5}4014128128221152813934164
1610−110^{-1}164044022032414135
1610−210^{-2}4812016143211492615514135
1610−310^{-3}8020054220762145519530214
1610−410^{-4}8020072253872287725550277
1610−510^{-5}128320110346------
3210−110^{-1}64113101031077126832323
3210−210^{-2}9617034242443063520455379
3210−310^{-3}28851015259121381419575281495
3210−410^{-4}54496334891166314355551304153701
3210−510^{-5}----------

caption: tbl:1 Comparison of the minimum number of non-zero phases required to reach different infidelity thresholds for the Fourier-5 target state.

:::

optimization of Learnable. This behavior is visible at both dimensions and is particularly pronounced at d=32d = 32. For the Haar random state, the advantage is smaller, Learnable is competitive at d=16d = 16, while at d=32d = 32 the frontiers largely overlap and no ansatz performs consistently better over the complete range. In general, the differences are less marked at the lowest and highest infidelities. This indicates that Learnable is most effective in the intermediate infidelity region. Its reduced advantage at very low infidelities may be due to the increased difficulty of jointly optimizing the gate parameters and the learned mask when higher accuracy is required.

Hypervolume Analysis

While the Pareto frontiers show where the differences between the ansatzes occur, their comparison becomes less immediate when several target states and qudit dimensions are considered. We therefore use hypervolume to summarize the overall trade-off between infidelity and the number of SNAP phases. Within the same analysis and qudit dimension, a larger hypervolume indicates a better trade-off.

Following Ferrari Dacrema et al. [14], we first compute the hypervolume over the complete range of infidelities explored during the experiments. Since the Pareto frontiers show that Learnable is most competitive in the intermediate region, we also perform a second analysis including only configurations satisfying I≤10−3I \le10^{-3}. The two hypervolumes are computed independently, and their absolute values should therefore not be compared across the two analyses. Comparisons are made only between ansatzes within the same qudit dimension and panel. Table 3 and Table 4 report the mean hypervolume and the corresponding 95% confidence intervals obtained from 1000 bootstrap samples.

ddFullDiagonal (adaptive)Diagonal (multiple)GridLearnable
851.9 [51.5, 52.3]57.5 [56.9, 58.0]54.1 [53.3, 54.9]57.0 [56.4, 57.6]54.6 [52.6, 56.9]
1640.2 [39.8, 40.7]46.6 [46.1, 47.2]43.3 [42.6, 44.2]44.9 [44.3, 45.7]44.8 [43.3, 46.6]
3227.4 [27.0, 27.9]35.2 [34.6, 35.9]32.9 [32.4, 33.5]32.3 [31.8, 32.9]34.8 [33.1, 36.3]
(a) Complete explored infidelity range.
ddFullDiagonal (adaptive)Diagonal (multiple)GridLearnable
864.9 [64.4, 65.6]68.4 [67.7, 69.2]65.2 [64.2, 66.4]66.4 [65.7, 67.2]69.9 [66.7, 72.8]
1646.6 [46.0, 47.2]48.9 [48.2, 49.7]41.4 [40.5, 42.6]46.2 [45.4, 47.2]55.0 [53.0, 57.5]
3226.8 [26.3, 27.4]32.8 [32.1, 33.7]27.1 [26.4, 27.9]27.8 [27.2, 28.7]41.7 [39.1, 43.6]
(b) Configurations satisfying I≤10−3I \le10^{-3}.

Table 3. Bootstrap hypervolume for the Fourier-5 target state, computed using 1000 bootstrap samples. The two analyses are computed independently, so their absolute hypervolume values are not directly comparable. Values should be compared across ansatzes within the same row and panel.

ddFullDiagonal (adaptive)Diagonal (multiple)GridLearnable
849.1 [48.4, 50.0]53.9 [53.2, 54.7]52.3 [51.2, 53.4]53.1 [51.9, 54.1]53.1 [49.8, 55.5]
1641.1 [40.6, 41.7]45.3 [44.6, 46.0]42.5 [41.6, 43.6]44.1 [43.5, 44.8]44.0 [41.9, 46.7]
3232.6 [32.2, 33.0]36.2 [35.8, 36.8]33.7 [32.9, 34.6]35.3 [34.5, 36.1]32.1 [30.2, 33.8]
(a) Complete explored infidelity range.
ddFullDiagonal (adaptive)Diagonal (multiple)GridLearnable
867.7 [66.6, 68.9]72.9 [71.9, 74.1]70.5 [68.8, 72.2]70.8 [69.1, 72.2]73.1 [67.5, 76.2]
1656.9 [56.1, 57.7]59.7 [58.7, 60.8]54.9 [53.6, 56.6]57.6 [56.6, 58.6]58.3 [55.2, 62.5]
3245.0 [44.5, 45.6]46.7 [46.0, 47.5]42.5 [41.5, 43.8]45.0 [43.9, 46.2]41.6 [38.8, 44.3]
(b) Configurations satisfying I≤10−3I \le10^{-3}.

Table 4. Bootstrap hypervolume for the Haar random target state, computed using 1000 bootstrap samples. The two analyses are computed independently, so their absolute hypervolume values are not directly comparable. Values should be compared across ansatzes within the same row and panel.

Over the complete range, Diagonal (adaptive) obtains the highest mean hypervolume for both target states and all the considered dimensions. For Fourier-5, Learnable remains close to Diagonal (adaptive) at d=16d = 16 and d=32d = 32, with overlapping confidence intervals, but does not improve on its mean hypervolume. For the Haar random state, the intervals also overlap at d=8d = 8 and d=16d = 16. At d=32d = 32, however, Learnable obtains a clearly lower value, with 32.1 [30.2, 33.8] compared with 36.2 [35.8, 36.8] for Diagonal (adaptive).

The restricted analysis gives a different result for Fourier-5. Learnable obtains the highest mean hypervolume at all three dimensions. At d=8d = 8, its confidence interval overlaps those of the comparison ansatzes, so the small difference in the mean does not indicate a clear advantage. The improvement is more marked at d=16d = 16, where Learnable obtains 55.0 [53.0, 57.5] compared with 48.9 [48.2, 49.7] for Diagonal (adaptive), and at d=32d = 32, where it obtains 41.7 [39.1, 43.6] compared with 32.8 [32.1, 33.7]. In both cases, the confidence intervals do not overlap. For the Haar random state, restricting the analysis does not produce the same consistent improvement. At d=8d = 8, Learnable has a slightly higher mean than Diagonal (adaptive), 73.1 compared with 72.9, but their confidence intervals overlap substantially. At d=16d = 16, Diagonal (adaptive) has the higher mean, although the intervals again overlap. At d=32d = 32, Diagonal (adaptive) remains clearly better, obtaining 46.7 [46.0, 47.5] compared with 41.6 [38.8, 44.3] for Learnable.

Overall, the two analyses show that Learnable is most competitive in the accuracy region where the Pareto frontiers indicate its main advantage. Although Diagonal (adaptive) performs better over the complete infidelity range, restricting the analysis to I≤10−3I \le10^{-3} reveals clear improvements for Fourier-5, particularly at d=16d = 16 and d=32d = 32. The results for the Haar random state are more mixed, indicating that the benefit of learning the mask depends on the target state.

Conclusions

This work investigates how learning based methods can be used to select the SNAP phases required for bosonic state preparation. Building on the heuristic sparse ansatzes introduced by Ferrari Dacrema et al. [14], we extended the Diagonal (adaptive) ansatz with a differentiable mask that is optimized together with the gate parameters. The method starts from the phases allowed by the Diagonal (adaptive) structure and learns which of them should be retained.

We evaluated the proposed Learnable ansatz on Fourier-5 and Haar random target states for qudit dimensions up to d=32d = 32. The comparison considered the minimum number of phases required to reach different target infidelities, the corresponding Pareto frontiers, and the hypervolume over both the complete explored range and the region satisfying I≤10−3I \le10^{-3}.

The results show that Learnable can reduce the number of SNAP phases required to reach a given infidelity. The improvements are clearest for Fourier-5, particularly at d=16d = 16 and d=32d = 32, where the method provides a better trade-off in the intermediate infidelity region. This is also reflected in the restricted hypervolume analysis, where Learnable obtains the highest mean hypervolume for Fourier-5 at all considered dimensions. For the Haar random state, the results are more mixed: Learnable remains competitive and improves several individual configurations, but Diagonal (adaptive) performs better in some dimensions and regions of the frontier.

Overall, the results indicate that learning which phases to retain can improve predefined sparse ansatzes, although the benefit depends on the target state and on the range of infidelities considered. The current method can only remove phases from the initial Diagonal (adaptive) structure. Future work may therefore consider learning phase locations over a broader initial structure, different mask architectures and studying its behavior under realistic noise and hardware constraints.

Acknowledgments

We acknowledge that the scholarship of Marco Pennazio has been funded by ABB S.p.A. We acknowledge ISCRA for awarding this project access to the LEONARDO supercomputer, owned by the EuroHPC Joint Undertaking, hosted by CINECA (Italy).

Declaration on Generative AI

During the preparation of this work, the authors used GPT-5.6 Sol in order to paraphrase and reword, as well as for grammar and spelling checks. After using these tools, the authors reviewed and edited the content as needed and take full responsibility for the publication’s content.

References

  1. [1]R. W. Heeres, B. Vlastakis, E. Holland, S. Krastanov, V. V. Albert, L. Frunzio, L. Jiang, R. J. Schoelkopf, Cavity state manipulation using photon-number selective phase gates, Phys. Rev. Lett. 115 (2015) 137002. URL: https://link.aps.org/doi/10.1103/PhysRevLett.115.137002. doi:10.1103/PhysRevLett.115.137002.DOI
  2. [2]S. Krastanov, V. V. Albert, C. Shen, C.-L. Zou, R. W. Heeres, B. Vlastakis, R. J. Schoelkopf, L. Jiang, Universal control of an oscillator with dispersive coupling to a qubit, Phys. Rev. A 92 (2015) 040303. URL: https://link.aps.org/doi/10.1103/PhysRevA.92.040303. doi:10.1103/PhysRevA.92.040303.DOI
  3. [3]S. Chakram, K. He, A. V. Dixit, A. E. Oriani, R. K. Naik, N. Leung, H. Kwon, W.-L. Ma, L. Jiang, D. I. Schuster, Multimode photon blockade, Nature Physics 18 (2022) 879–884. doi:10.1038/s41567-022-01630-y.DOI
  4. [4]Y. Wang, Z. Hu, B. C. Sanders, S. Kais, Qudits and high-dimensional quantum computing, Frontiers in Physics Volume 8 - 2020 (2020). URL: https://www.frontiersin.org/journals/physics/articles/10.3389/fphy.2020.589504. doi:10.3389/fphy.2020.589504.DOI
  5. [5]B. Royer, S. Singh, S. Girvin, Encoding qubits in multimode grid states, PRX Quantum 3 (2022) 010335. doi:10.1103/PRXQuantum.3.010335.DOI
  6. [6]Y. Xu, Y. Wang, E.-J. Kuo, V. V. Albert, Qubit-oscillator concatenated codes: Decoding formalism and code comparison, PRX Quantum 4 (2023) 020342. doi:10.1103/PRXQuantum.4.020342.DOI
  7. [7]E. O. Kiktenko, A. S. Nikolaeva, A. K. Fedorov, Colloquium: Qudits for decomposing multiqubit gates and realizing quantum algorithms, Rev. Mod. Phys. 97 (2025) 021003. URL: https://link.aps.org/doi/10.1103/RevModPhys.97.021003. doi:10.1103/RevModPhys.97.021003.DOI
  8. [8]T. Roy, T. Kim, A. Romanenko, A. Grassellino, Qudit-based quantum computing with srf cavities at fermilab, volume LATTICE2023, Fermi National Accelerator Laboratory (FNAL), Batavia, IL (United States), 2024. URL: https://www.osti.gov/biblio/2318671. doi:10.22323/1.453.0127.DOI
  9. [9]L. Kravzman, C. U. Lei, S. Ganjam, J. Teoh, L. Frunzio, R. J. Schoelkopf, Superconducting quantum memory with a suspended coaxial resonator, Applied Physics Letters 124 (2024). doi:10.1063/5.0203906.
  10. [10]R. W. Heeres, P. Reinhold, N. Ofek, L. Frunzio, L. Jiang, M. H. Devoret, R. J. Schoelkopf, Implementing a universal gate set on a logical qubit encoded in an oscillator, Nature Communications 8 (2017) 94. URL: https://doi.org/10.1038/s41467-017-00045-1. doi:10.1038/s41467-017-00045-1.
  11. [11]T. Fösel, S. Krastanov, F. Marquardt, L. Jiang, Efficient cavity control with snap gates, arXiv preprint arXiv:2004.14256 (2020).arxiv.org/abs/2004.14256
  12. [12]M. Kudra, M. Kervinen, I. Strandberg, S. Ahmed, M. Scigliuzzo, A. Osman, D. P. Lozano, M. O. Tholén, R. Borgani, D. B. Haviland, G. Ferrini, J. Bylander, A. F. Kockum, F. Quijandría, P. Delsing, S. Gasparinetti, Robust preparation of wigner-negative states with optimized snap-displacement sequences, PRX Quantum 3 (2022) 030301. URL: https://link.aps.org/doi/10.1103/PRXQuantum.3.030301. doi:10.1103/PRXQuantum.3.030301.DOI
  13. [13]J. Job, Efficient, direct compilation of su (n) operations into snap & displacement gates, arXiv preprint arXiv:2307.11900 (2023).arxiv.org/abs/2307.11900
  14. [14]M. Ferrari Dacrema, D. M. Kürkçüoğlu, A. Li, T. Roy, S. ZorzettI, Sparse phase ansatzes for resource-efficient qudit state preparation via the SNAP-displacement protocol (2026). arXiv:2603.12203.arxiv.org/abs/2603.12203
  15. [15]N. Bornmann, T. Roy, J. A. Job, N. Anand, G. N. Perdue, S. ZorzettI, M. S. Alam, Benchmarking the performance of a high-q cavity qudit using random unitaries, Quantum Science and Technology 10 (2025) 025062.
  16. [16]A. P. Guerreiro, C. M. Fonseca, L. Paquete, The hypervolume indicator: Computational problems and algorithms, ACM Comput. Surv. 54 (2021). URL: https://doi.org/10.1145/3453474. doi:10.1145/3453474.
  17. [17]A. Auger, J. Bader, D. Brockhoff, E. Zitzler, Hypervolume-based multiobjective optimization: Theoretical foundations and practical implications, Theoretical Computer Science 425 (2012) 75–103. URL: https://www.sciencedirect.com/science/article/pii/S0304397511002428. doi:https://doi.org/10.1016/j.tcs.2011.03.012, theoretical Foundations of Evolutionary Computation.
  18. [18]C. Bazgan, S. Ruzika, C. Thielen, D. Vanderpooten, The power of the weighted sum scalarization for approximating multiobjective optimization problems, Theory of Computing Systems 66 (2022) 395–415. URL: https://doi.org/10.1007/s00224-021-10066-5. doi:10.1007/s00224-021-10066-5.

Paper details

vlnc:W_z4feqwwr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

GPT-5.6 Sol (bare)

View statement
Looking for related papers…
Contents