WorksPhysics and Astronomy
Steering the Fidelity in State Preparation on Noisy Bosonic Systems with Risk-Seeking Optimization
Abstract
In order to execute quantum algorithms on bosonic quantum computers, it is necessary to encode their inputs into a desired target quantum state, with a process called state preparation. In real settings, state preparation methods operate in stochastic scenarios, where the prepared state is represented as a mixed state, that is a probabilistic ensemble of pure states. Therefore, existing state preparation methods optimize a variational ansatz by averaging over all possible sequences of photon loss events contained in the prepared ensemble, yielding an output state which approximates the desired target with a certain average fidelity. Such an approach, however, does not take into account directly the distribution of fidelities across states in the ensemble. In this work, we aim to maximize the fidelity of only a subset of pure states sampled from the prepared ensemble, at the cost of reducing the average fidelity overall. This trade-off is relevant when the goal is to obtain high-fidelity states with a certain probability, rather than maximizing the average fidelity of the prepared ensemble. We borrow and adapt objective functions from risk-sensitive optimization, a framework that optimizes specific characteristics of a distribution rather than only its expectation, and that has been successfully applied in Reinforcement Learning. In the considered experimental settings, our results show that the infidelities of some pure states in the prepared ensemble can be reduced by up to four orders of magnitude when using risk-seeking objectives, compared to those achieved using the standard optimization of the average fidelity. Furthermore, we show that it is possible to control the trade-off between the probability of obtaining high-fidelity states and the lowest infidelity threshold reached, providing the flexibility to select the operating point that best suits a certain application.
Introduction
Quantum computing has been attracting a lot of interest for its potential to provide speed-ups in tackling specific classes of problems hard to solve with classical computers. While qubits extend classical bits to the quantum domain, qudits further generalize them to multi-level quantum systems, exploiting the intrinsic non-binary nature of quantum mechanics. In this context, several quantum algorithms require that the state of the input qudits is initialized to their input data, with a process called state preparation. In bosonic quantum computers, a particular family of devices which work on qudits, the SNAP-Displacement (SD) protocol [1, 2, 3, 4], allows one to prepare arbitrary target states through variational optimization of a parametric ansatz, named SD-ansatz. When working in noisy and realistic conditions, however, state preparation must take into account the stochasticity introduced by noise. In bosonic systems, the dominant source of noise is the photon loss that occurs inside a physical cavity, which is modeled using one of multiple equivalent Kraus representations [5, 6]. Consequently, the evolution of a quantum state in noisy conditions is non-deterministic and is not described by a single pure state, but rather by a mixed state, defined as a probabilistic ensemble of outcomes, each associated to a specific sequence of photon loss events. Such a mixed state is described by a density matrix, that can be expressed as the expectation over all the possible sequences of photon loss events, called quantum trajectories [7, 8, 9, 10, 11, 12, 13, 14], each one representing a pure state. In the presence of noise, the typical way to optimize the gate parameters of ansatzes, such as those of the SD protocol, is to maximize the fidelity between this output density matrix and the target state, rather than between two pure states [15, 16]. Given the definition of the density matrix, such an objective is equivalent to maximizing the expected fidelity across all quantum trajectories, which we refer to as average fidelity. This means that the parameters of the SD-ansatz are optimized to maximize, on average, the fidelity over all possible trajectories. As a result, multiple trajectories are aggregated into a single expectation value, leaving no direct control on the distribution of the fidelity across the individual noise trajectories. While the overparametrization of the SD protocol [3] can be exploited to address this issue partially, there is still a degradation in the average fidelity compared to the noiseless case [16], which strongly points to the presence of some intrinsic interference structure between noise trajectories. This raises the question of whether the optimization objective can instead be designed to shape the fidelity distribution over quantum trajectories, rather than only its expectation. Our goal is to increase the probability of generating high-fidelity quantum trajectories, even at the expense of the average fidelity of the density matrix of the output mixed state. In Reinforcement Learning (RL) [17, 18, 19, 20, 21], Finance [22, 23, 24] and Optimal Control [25, 26, 27, 28, 29, 30], such a trade-off is addressed through risk-sensitive optimization [22], a family of methods that optimize specific properties of a reward distribution rather than only its expectation. In this work, we adapt this framework to noisy quantum state preparation by adopting a risk-seeking optimization strategy. More specifically, we explicitly account for sequences of photon loss events by sampling photon-counting quantum trajectories, according to the probabilities defined by the corresponding Kraus operators. This allows us to employ trajectory-wise objective functions that directly shape the fidelity distribution. In particular, we investigate the application of the entropic risk measure [17, 21] to the SNAP-Displacement protocol. Our results show that this risk-seeking formulation enables higher-fidelity state preparation while giving a controllable trade-off between reaching a target infidelity threshold and the probability of doing so.
Background
In this section, we briefly describe how the SNAP-Displacement (SD) protocol works, the structure of the SD-ansatz, and how the noise model is applied in this context. Then, we discuss the risk-sensitive optimization framework, and we touch upon techniques for gradient estimation in stochastic settings.
SNAP-Displacement Protocol
Qudit states are vectors that live in a multidimensional Hilbert space , called Fock space. The basis of this space is the set of orthogonal quantum states that physically correspond to any positive integer number of photons inside a cavity. We call such states Fock states and denote them as , for . A pure qudit state is then an -normalized superposition of Fock states. In bosonic quantum computing, universal control over qudit states [2] can be achieved by the combined action of Displacement operators and Selective Number-dependent Arbitrary Phase (SNAP) operators [1, 2].
Displacements apply a shift to the amplitudes of the qudit state, controlled by the complex parameter , generally resulting in a new superposition of Fock states. Mathematically, a Displacement gate is defined as:
where is the displacement parameter and are the annihilation and creation quantum operators respectively. A SNAP operation, instead, represents the simultaneous application of multiple phases , with for all , one for each Fock state in the Fock basis, to the superposition of a qudit state. Mathematically, a SNAP gate is defined as
In the SD protocol [3], a parametric SD-ansatz is built as an alternating sequence of Displacement gates and SNAP gates . The pairs of consecutive gates form the SD-blocks of the ansatz, each with its own time duration . In a noiseless scenario, the whole SD-ansatz of SD-blocks can be written as in Equation (3), where and are sets of parameters optimized with variational strategies:
In practice, current bosonic quantum devices can control only a finite number of Fock states, corresponding to photon numbers from to . We therefore restrict the controllable space to , referring to transitions to Fock states outside this space as leakage. In our simulations, we include additional non-controllable Fock states, referred to as bumper states, which allow us to account for part of this leakage.
Noise Model
In noisy settings, the effect of quantum noise can be modeled as a quantum channel, represented in terms of a set of Kraus operators [5, 6] . If the quantum state is represented by its density matrix , its evolution under the noise channel is obtained by applying all the Kraus operators to and summing over the corresponding outcomes. The resulting density matrix describes a mixed state that accounts for all possible noise realizations. Formally, the evolution of due to such a quantum channel is given by:
There are infinite equivalent representations of Kraus operators that can be used to model a quantum channel [5, 8]. In our setting, we model photon loss using its photon-counting Kraus representation, where each Kraus operator directly corresponds to a specified amount of photons lost inside a physical cavity. As described for example in [16], photon-counting Kraus operators are defined as:
in which is the survival probability of every single photon after an elapsed time equal to for a cavity having decoherence time , and is the particle number operator that counts how many particles are present in the system. The strength of the photon-loss channel is determined by the cavity decoherence time : smaller values of correspond to stronger photon-loss effects. Since we apply the channel after every SD-block, the elapsed time amounts to the total duration of the SD-block. However, representing the state of the qudit with a density matrix hides the internal probability distribution of the individual noise trajectories, which we instead aim to leverage. For this reason, we use an equivalent formulation [7]: we sample individual noise trajectories, in which the qudit state evolves in time as a pure state. This can be done by sampling and applying one Kraus operator to the pure state being propagated after each SD-block. Suppose that after block the quantum state is the pure state : then, the stochasticity of noise can also be modeled as the random application of one Kraus operator to . In particular, the probability of sampling the Kraus operator is given by
which, in our case, corresponds to the probability of losing exactly photons. Applying the Kraus operator results in an unnormalized pure state; therefore, we normalize it to get the sampled state following the photon loss event:
We define a quantum trajectory as the sequence of pure states obtained by applying the sequence of SD-blocks, each followed by a single photon loss event, modeled by the corresponding Kraus operator. Specifically, starting from the initial state, after each SD-block a Kraus operator is sampled according to the probability distribution arising in Equation (6), yielding the next pure state in the trajectory. We also refer to quantum trajectories as noise trajectories, to emphasize their dependence on stochastic photon-loss events. We define the final state produced by a quantum trajectory as : although it is unnecessary since it is a pure state, we can also introduce its density matrix as . By doing this, the expectation over all trajectories of the density matrix of the sampled pure state results in the density matrix of the prepared mixed state [10]:
In this work, we use noise trajectories to define trajectory-wise objective functions and optimize them. When a suitable measurement or heralding mechanism is in place, each single trajectory can then also be associated to an experimental outcome.
Risk-Sensitive Optimization
In stochastic optimization, objective functions are commonly defined as expectations over the possible outcomes of the underlying random process. This provides a natural criterion for optimizing the average behavior across different realizations. However, optimizing the expected value may not be sufficient when specific regions of the outcome distribution are of particular interest. For example, in settings such as Reinforcement Learning and Finance, the optimization objective may be designed to penalize unfavorable outcomes more strongly in order to limit potentially large losses [22]. Risk-sensitive optimization provides a way to account for the distribution of the objective values beyond its expectation. Rather than treating all realizations solely through their contribution to the expected value, risk-sensitive objectives can focus on different regions of the distribution. Risk-averse optimization focuses on unfavorable realizations, whereas risk-seeking optimization favors more desirable ones.
An example of risk-sensitive objective is the entropic risk measure [17, 21]. Let be a random variable representing the value of the quantity of interest under different realizations of the stochastic process, for a given set of model parameters . The entropic risk measure is defined as:
in which the hyperparameter , called risk coefficient, controls the risk sensitivity: corresponds to risk-seeking behavior, while leads to risk-averse behavior. In the limit of , risk-neutral behavior is recovered.
Stochastic Computation Graphs
Consider an objective function defined as an expectation over a discrete random variable with finite support :
where is the probability distribution over . Both and depend on the model parameters . Consequently, has a twofold dependence on , since changing the parameters affects both the probability of sampling each realization and the value of associated with it.
Stochastic Computation Graphs (SCGs) [31] provide a general framework for differentiating objectives with this kind of twofold dependence, extending the score-function gradient estimator underlying the REINFORCE algorithm [32] to account also for the explicit parameter dependence of . For Equation (10), its unbiased gradient can be written as
in which the first term accounts for the dependence of the sampling distribution on , while the second accounts for the explicit dependence of on .
Risk-Seeking State Preparation with SNAP-Displacement
In this section, we describe how risk-seeking objective functions, formulated as in § 2.3, can be applied to the problem of optimizing the parameters of an SD-ansatz. Then, we provide a Monte Carlo procedure that uses quantum trajectories to estimate the gradient needed to optimize such objectives.
Risk-Seeking Objectives on Quantum Trajectories
In a noisy setting, the parameters of an SD-ansatz are optimized by maximizing the average fidelity , i.e. the fidelity between the output density matrix and the pure target state . The corresponding average infidelity is defined as .
In this work, we propose a different approach, aimed at maximizing the fidelities of only a subset of trajectories. In particular, we aim to increase the probability of obtaining trajectories with very high fidelity, even when this comes at the cost of reducing the average fidelity. Such a reframing of the problem leads to a risk-seeking formulation for the optimization of SD-ansatzes for state preparation in noisy settings. To do so, first we define the pure-state fidelity as the fidelity between the pure state produced by trajectory and the target state. The pure-state infidelity is then given by . We thus define two objective functions by applying the entropic risk measure defined in Equation (9) to two different quantities of interest. The first uses the pure-state fidelity directly and is referred to as the fidelity entropic risk. The second uses the negative logarithm of the pure-state infidelity and is referred to as the log-infidelity entropic risk.
As explained in § 2.3, the risk coefficient controls the strength of the risk-seeking behavior: hence, larger values of give relatively more weight to high-fidelity trajectories. The fidelity entropic risk and the log-infidelity entropic risk objectives differ in the quantity they prioritize. Optimizing the fidelity entropic risk from Equation (3.2a) emphasizes improvements in the absolute value of the pure-state fidelity. Optimizing the log-infidelity entropic risk, instead, emphasizes improvements in the order of magnitude of the pure-state infidelity. Given their definition, both fidelity and log-infidelity entropic risks assign relatively larger values to trajectories with higher pure-state fidelity, with this effect becoming stronger as such a measure approaches 1.
Gradient Computation
Computing the exact values and gradients of the fidelity and log-infidelity entropic risk objectives defined in Equations (3.2a) and (3.2b) requires evaluating expectations over all possible quantum trajectories induced by the noise process. Since the number of such trajectories grows combinatorially with the depth of the SD-ansatz, their exact evaluation becomes computationally infeasible.
We therefore estimate the gradients by Monte Carlo sampling of quantum trajectories [9, 11, 33, 29, 34]. Assuming Markovianity of the quantum evolution caused by photon loss, as previous works argued [8, 33], quantum trajectories are sampled by evolving the pure state of the qudit stochastically according to the probabilities of applying Kraus operator after each SD-block, as described in § 2.2.
The resulting optimization problem has the structure introduced in § 2.4: the SD-ansatz parameters , affect both the probability distribution over noise trajectories and the objective value associated with each sampled trajectory. We thus use the SCG expression in Equation (11) to construct a Monte Carlo gradient estimator for the fidelity and log-infidelity entropic risk objectives. While the SCG estimator is unbiased for expectations, the logarithm outside the expectation generally introduces finite-sample bias. We nevertheless use the resulting estimator as an optimization objective.
Experimental Protocol
In our experiments, we consider one qudit of levels in the Fock space and a SD-ansatz with SD-blocks, as defined in Equation (3). To train the parameters of this ansatz, we use the objective functions that we have introduced in § 3.1, defined over trajectories sampled according to the noise model of photon-counting Kraus operators. Throughout this work, we set , a regime that has been shown in previous numerical studies to constitute a challenging state preparation setting [16]. We simulate on a classical computer how the pure state of the qudit evolves, as described in § 2.2, by applying the unitaries of the S and D gates within each SD-block, interleaving the SD-blocks with applications of our noise model throughout the whole SD-ansatz. This is consistent with what is done in [16]: just like they do, we also include in the simulation 64 additional bumper states, to take into account the leakage described in § 2.1. For the gradient estimation, we collect 10 quantum trajectories at each training step through Monte Carlo sampling, as explained in § 3.2. The qudit state is initialized as the Fock state , and we aim to prepare as a target a Haar random pure state, which is chosen from the columns of a Haar random unitary generated according to [35].
To have statistically robust results, we run 100 independent optimizations of the parameters for each SD-ansatz, starting from different random initializations, and we call these repetitions. We train each repetition for 30000 steps, using the Adam optimizer with learning rate , momentum parameters (0.9, 0.999) and no regularization. We define the -probability as the probability of sampling a noise trajectory with pure-state infidelity below a threshold , which we call infidelity threshold. For each repetition, we estimate the -probability by sampling 10000 noise trajectories and computing the fraction of trajectories with final pure-state infidelity below . We consider infidelity thresholds ranging from to . Due to the stochasticity of the optimization process, though, only some repetitions yield an SD-ansatz with a non-zero -probability. We refer to them as successful repetitions, and define the success rate (SR) as their percentage. For each objective function and value of , we define the minimum infidelity threshold as the lowest infidelity threshold reached with a non-zero SR. The mean and standard deviation of the -probability are computed over successful repetitions only, and are thus conditional on successful optimization. We argue that this is reasonable, as the SR and the -probability capture two distinct aspects of the optimization process. Specifically, the first reflects the reliability of such a process, while the second quantifies the probability of reaching a desired infidelity threshold using the parameters corresponding to any successful repetition: in practice, one would use only such parameters. We train the SD-ansatz using the fidelity and log-infidelity entropic risk objectives for multiple values of the risk coefficient . For each objective and value of , we compute the -probabilities and SR and we analyze their trade-off with respect to the infidelity thresholds . For comparison, we use as a baseline the -probabilities and success rates obtained by training the SD-ansatz using the average fidelity objective.
Results & Discussion
The goal of this study is to assess whether, in noisy settings, an SD-ansatz optimized with risk-seeking objectives can prepare states with pure-state infidelity lower than that achieved when using the average fidelity. We report the full experimental results in Table 1. First, we give an overview of the results for each objective function. Then, we analyze the trade-off between average fidelity and pure-state infidelity.
| Objective function | Average fidelity | -probability for an infidelity of: | |||||||
| Average fidelity | N/A | 0.823921 0.035875 | 0.793 0.041 (SR=86%) | 0.772 0.026 (SR=5%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) |
| Fidelity entropic risk | 10 | 0.795007 0.079314 | 0.766 0.085 (SR=97%) | 0.766 0.049 (SR=86%) | 0.776 0.034 (SR=32%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) |
| Fidelity entropic risk | 100 | 0.728762 0.139118 | 0.658 0.196 (SR=95%) | 0.726 0.095 (SR=77%) | 0.745 0.051 (SR=68%) | 0.760 0.039 (SR=39%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) |
| Fidelity entropic risk | 1000 | 0.698329 0.144692 | 0.602 0.204 (SR=97%) | 0.682 0.082 (SR=79%) | 0.694 0.042 (SR=74%) | 0.708 0.028 (SR=61%) | 0.713 0.027 (SR=24%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) |
| Fidelity entropic risk | 10000 | 0.687215 0.134888 | 0.590 0.178 (SR=97%) | 0.638 0.117 (SR=84%) | 0.671 0.031 (SR=67%) | 0.676 0.030 (SR=58%) | 0.681 0.024 (SR=38%) | 0.690 0.013 (SR=5%) | 0.0 0.0 (SR=0%) |
| Fidelity entropic risk | 100000 | 0.663848 0.156595 | 0.534 0.220 (SR=97%) | 0.625 0.128 (SR=76%) | 0.659 0.027 (SR=64%) | 0.661 0.027 (SR=56%) | 0.672 0.021 (SR=36%) | 0.673 0.008 (SR=7%) | 0.0 0.0 (SR=0%) |
| Log-infidelity entropic risk | 0.01 | 0.762516 0.055348 | 0.704 0.037 (SR=66%) | 0.695 0.027 (SR=49%) | 0.694 0.026 (SR=43%) | 0.699 0.025 (SR=31%) | 0.699 0.019 (SR=20%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) |
| Log-infidelity entropic risk | 0.1 | 0.775744 0.032523 | 0.684 0.041 (SR=92%) | 0.676 0.032 (SR=78%) | 0.675 0.031 (SR=74%) | 0.676 0.029 (SR=63%) | 0.677 0.026 (SR=38%) | 0.0 0.0 (SR=0%) | 0.0 0.0 (SR=0%) |
| Log-infidelity entropic risk | 1.0 | 0.748327 0.032474 | 0.663 0.036 (SR=97%) | 0.663 0.036 (SR=94%) | 0.666 0.035 (SR=87%) | 0.667 0.032 (SR=80%) | 0.668 0.034 (SR=47%) | 0.680 0.032 (SR=12%) | 0.0 0.0 (SR=0%) |
| Log-infidelity entropic risk | 2.0 | 0.750230 0.032208 | 0.663 0.036 (SR=100%) | 0.664 0.034 (SR=93%) | 0.667 0.031 (SR=85%) | 0.672 0.025 (SR=74%) | 0.679 0.022 (SR=48%) | 0.682 0.017 (SR=10%) | 0.0 0.0 (SR=0%) |
| Log-infidelity entropic risk | 5.0 | 0.742331 0.041070 | 0.659 0.038 (SR=99%) | 0.661 0.038 (SR=94%) | 0.666 0.032 (SR=85%) | 0.670 0.027 (SR=75%) | 0.673 0.024 (SR=42%) | 0.685 0.020 (SR=7%) | 0.0 0.0 (SR=0%) |
| Log-infidelity entropic risk | 10.0 | 0.719670 0.096950 | 0.615 0.143 (SR=99%) | 0.618 0.137 (SR=95%) | 0.622 0.142 (SR=87%) | 0.645 0.098 (SR=75%) | 0.652 0.085 (SR=51%) | 0.681 0.018 (SR=6%) | 0.0 0.0 (SR=0%) |
Table 1. -probabilities and success rates (SR) computed from the SD-ansatzes trained on the objective functions listed in Section 3.1, for different values of the risk coefficient , if present. Each row reports the results of training the parameters of 100 repetitions of an SD-ansatz. For each objective function, the column “Average fidelity” reports the mean average fidelity across all 100 repetitions, with its standard deviation. The group of columns under the “-probability for an infidelity of:” label reports the evaluation using Monte Carlo sampling of noise trajectories, as explained in Section 4. The mean probability estimates are computed using only the successful repetitions, which are also the same repetitions indicated by the SR. For each objective function and risk coefficient value, we highlight in bold the cell related to the lowest infidelity achieved by them. For each infidelity threshold instead, we underline the values related either to the highest probability estimate or the highest SR.
Next, we examine the trade-off between the infidelity threshold , the corresponding -probability, and the success rate (SR). Finally, we discuss possible interpretations of the observed results.
Overview of the Objective Functions
First of all, we look at the average fidelity objective function. The SD-ansatzes prepared using this objective yield the best average fidelity value, 0.823921, across all experiments, when compared to both risk-seeking objectives and for all the values of their risk coefficient . However, the parameters of the trained SD-ansatzes start to behave poorly very quickly: not only is its minimum infidelity threshold, but also only 5% of the repetitions reach that. Yet, for the successful repetitions, the -probabilities for these relatively large infidelities are all rather high, between 0.77 and 0.80.
Optimizing on the fidelity entropic risk objective, instead, leads to a degradation in the computed average fidelity of the prepared ensemble. achieves an average fidelity of 0.795007 which is only slightly smaller than that achieved by the previous objective; however, the average fidelity steadily drops as the value of the risk coefficient increases, all the way down to 0.663848 for , and we can see that its standard deviation also increases, indicating diversity in this metric across the single repetitions. At the same time, this objective is able to push SD-ansatzes towards yielding pure states with infidelities as low as . For reaching such a threshold, though, the risk coefficient needs to be quite large, i.e. , and the SR is still only 5%, which is very low. Moreover, the SR for the infidelity threshold saturates beyond a certain value of , and does not further improve: even cannot raise the SR beyond 7%, nor reach . Instead, the SR increases considerably when aiming for larger thresholds, for example reaching 61% for and . Another thing to note is that the -probabilities for the largest infidelity thresholds also drop when the risk coefficient grows, reaching the lowest value of 0.534 when and . On the contrary, smaller values of , for example , lead to -probabilities comparable to those estimated for the average fidelity objective. Also, as the desired infidelity threshold gets lower, the -probabilities instead increase, while their standard deviations decrease: for example, for , the -probabilities improve from 0.534 0.220 to 0.673 0.008. In fact, when considering the largest -probabilities are achieved by the fidelity entropic risk objective and are underlined in Table 1 as such.
Last, we analyze the results for the log-infidelity entropic risk objective function. As we can see in Table 1, its behavior is largely consistent with that of the fidelity entropic risk. However, compared to it, as the value of the risk coefficient gets larger, the decrease in the average fidelity is smaller and slower, going only from 0.762516 for to 0.719670 for . Moreover, the infidelity threshold is reached already with , much smaller than that required by the fidelity entropic risk, even though the same saturation phenomenon prevents achieving a threshold of . Furthermore, the SR of the training process for the log-infidelity entropic risk is underlined in Table 1 as the largest among all the objective functions for all the infidelity thresholds. For example, even infidelity thresholds as low as and have respectively the highest SR of 80% for , and 51% for . However, this comes at the cost of slightly smaller -probabilities. In fact, for all the infidelity thresholds, the best -probabilities have values between 0.68 and 0.7, and never exceed the best ones achieved by the other objectives. Still, the trends in the -probabilities of the log-infidelity entropic risk are the same, but less pronounced, as those observed for the fidelity entropic risk for increasing or for considering progressively lower infidelity thresholds. As an example, for the threshold the -probabilities drop from 0.704 to 0.615 as increases. Instead, choosing a constant leads to the -probabilities increasing from 0.615 to 0.681 as the threshold gets smaller.
Trade-Off between Average Fidelity and Pure-State Fidelity
With risk-seeking objective functions, we have observed a decrease of up to four orders of magnitude in the minimum infidelity threshold achieved. However, at the same time, the average fidelity also gets smaller in general, compared to that measured using the average fidelity itself as objective, with its standard deviation increasing as well. This degradation in the average fidelity happens in tandem with the improvement in the minimum infidelity threshold as the risk coefficient gets larger, and is much faster for the fidelity entropic risk. Nonetheless, both the decrease in the average fidelity and the increase in its standard deviation are less impactful, but still present, for the log-infidelity entropic risk. Our results empirically confirm that, in the considered experimental setting, risk-seeking optimization exposes a trade-off between average fidelity and pure-state fidelity, enabling higher pure-state fidelities to be reached with a certain probability at the cost of reducing the average fidelity. Furthermore, such a trade-off between the average fidelity and the minimum infidelity threshold can be controlled through the risk coefficient . These results are consistent with how risk-sensitive optimization behaves in general, as already explained in § 2.3.
Trade-Off between Infidelity Threshold, -Probability and Success Rate
The two entropic risk objective functions expose different operating regimes. The fidelity entropic risk generally yields SD-ansatzes with higher -probabilities for any given infidelity threshold , whereas the log-infidelity entropic risk consistently achieves higher success rates, resulting more often in SD-ansatzes that reach the desired threshold. In general, for a fixed infidelity threshold , the -probability tends to decrease as increases. At the same time, increasing generally enables lower minimum infidelity thresholds. The reduction of -probabilities is more pronounced for the fidelity entropic risk. For both risk-seeking objectives, the SR initially increases with for a fixed infidelity threshold, but eventually saturates or even decreases. These observations identify a trade-off between reaching lower minimum infidelity thresholds, maintaining large enough -probabilities and achieving a consistent SR of the training process. Such a trade-off can be controlled by modifying the risk coefficient .
Discussion
Overall, optimizing on the entropic risk objectives yields remarkably lower infidelities than training on the average fidelity objective does, with an improvement as large as four orders of magnitude in the lowest infidelity reached. One possible interpretation is that optimizing the shared ansatz parameters for different noise trajectories may lead to conflicting effects on their fidelities, preventing them from being simultaneously maximized. While the average fidelity would favor a compromise across noise trajectories, the entropic risk objectives may instead prioritize a subset of trajectories whose fidelities can be further increased at the expense of the others. This aligns with our observation that the average fidelity objective does not push the pure-state infidelity towards the lowest thresholds.
A second behavior can also be observed when evaluating progressively smaller infidelity thresholds for each value of . Indeed, although lower thresholds correspond to more challenging tasks, the -probabilities often remain roughly constant or even increase, while their standard deviation decreases. While this might seem surprising at first, it should instead be interpreted together with the decreasing SR, since the -probabilities are computed only over successful repetitions. Thus, the observed behavior suggests that the repetitions that remain successful at lower infidelity thresholds assign a large probability mass to states with very low pure-state infidelity. However, this behavior may also be an artifact due to the progressively fewer successful repetitions, and should be further investigated.
For any chosen infidelity threshold, we also observed that the -probability generally decreases as increases, while its standard deviation tends to increase. This means that the -probability becomes more variable across successful repetitions. Moreover, especially for lower infidelity thresholds, increasing beyond a certain value may reduce the SR without providing a corresponding improvement in the -probability or in the lowest achievable pure-infidelity threshold, which eventually saturates. Therefore, larger risk coefficients do not necessarily lead to more favorable operating points, and should be carefully selected to match the desired trade-off between the target infidelity, -probability, and SR. At the same time, one should select the objective function depending on the application to balance the -probability against the SR of the training. If maximizing the -probability of the prepared ensemble for a target infidelity is the primary objective, the fidelity entropic risk may be preferable. Instead, the log-infidelity entropic risk is more reliable in training an SD-ansatz that reaches the target infidelity.
Conclusions & Future Directions
In this work, we introduced a risk-seeking optimization framework for noisy state preparation in bosonic quantum systems. By optimizing trajectory-wise objectives through Monte Carlo sampling, our approach provides control over the distribution of pure-state fidelities. Furthermore, our results show that risk-seeking optimization can reduce the lowest achievable pure-state infidelity by up to four orders of magnitude compared to standard optimization of the average fidelity in the considered experimental setting. More importantly, we show that the proposed framework provides control over the trade-off between the pure-infidelity threshold , the -probability and the success rate of the optimization process. In particular, the optimization objective and its risk coefficient allow the operating point of the state-preparation procedure to be tailored to the requirements of a specific application. Future work should investigate whether the observed behaviors generalize to different target states, larger Fock-space dimensions, deeper SD-ansatzes and different noise models. Finally, comparing the quantum states prepared by our framework with those obtained by optimizing the average fidelity may reveal which state properties are favored by trajectory-wise optimization, guiding the design of alternative risk-sensitive objectives.
Acknowledgments
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, GPT-5.6 Luna and Grammarly in order to paraphrase and reword, as well as grammar and spelling check. After using these tools/services, the authors reviewed and edited the content as needed and take full responsibility for the publication’s content.
References
- [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, Physical Review Letters 115 (2015) 137002. URL: https://link.aps.org/doi/10.1103/PhysRevLett.115.137002. doi:10.1103/PhysRevLett.115.137002.DOI
- [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, Physical Review A 92 (2015) 040303. URL: https://link.aps.org/doi/10.1103/PhysRevA.92.040303. doi:10.1103/PhysRevA.92.040303.DOI
- [3]T. Fösel, S. Krastanov, F. Marquardt, L. Jiang, Efficient cavity control with SNAP gates (2020). URL: http://arxiv.org/abs/2004.14256. doi:10.48550/arXiv.2004.14256, arXiv:2004.14256 [quant-ph].
- [4]O. Ogunkoya, K. Morris, D. M. Kürkçüoğlu, Investigating Parameter Trainability in the SNAP-Displacement Protocol of a Qudit system (2023). URL: http://arxiv.org/abs/2309.14942. doi:10.48550/arXiv:2309.14942, arXiv:2309.14942 [quant-ph].
- [5]The first Representation theorem, in: K. Kraus, A. Böhm, J. D. Dollard, W. H. Wootters (Eds.), States, Effects, and Operations Fundamental Notions of Quantum Theory: Lectures in Mathematical Physics at the University of Texas at Austin, Springer, Berlin, Heidelberg, 1983, pp. 42–61. URL: https://doi.org/10.1007/3540127321_24. doi:10.1007/3540127321_24.
- [6]M. A. Nielsen, I. L. Chuang, Quantum noise and quantum operations, in: Quantum Computation and Quantum Information: 10th Anniversary Edition, Cambridge University Press, 2010. URL: https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AFFEA52D53BE9AE. doi:10.1017/CBO9780511976667.
- [7]F. Ciccarello, S. Lorenzo, V. Giovannetti, G. M. Palma, Quantum collision models: Open system dynamics from repeated interactions, Physics Reports 954 (2022) 1–70. URL: https://www.sciencedirect.com/science/article/pii/S0370157322000035. doi:10.1016/j.physrep.2022.01.001.DOI
- [8]H. M. Wiseman, Quantum trajectories and quantum measurement theory, Quantum and Semiclassical Optics: Journal of the European Optical Society Part B 8 (1996) 205. URL: https://doi.org/10.1088/1355-5111/8/1/015. doi:10.1088/1355-5111/8/1/015.
- [9]D. A. Lidar, Lecture Notes on the Theory of Open Quantum Systems (2020). URL: http://arxiv.org/abs/1902.00967. doi:10.48550/arXiv.1902.00967, arXiv:1902.00967 [quant-ph].
- [10]J. Dalibard, Y. Castin, K. Mølmer, Wave-function approach to dissipative processes in quantum optics, Physical Review Letters 68 (1992) 580–583. URL: https://link.aps.org/doi/10.1103/PhysRevLett.68.580. doi:10.1103/PhysRevLett.68.580.DOI
- [11]R. Dum, A. S. Parkins, P. Zoller, C. W. Gardiner, Monte Carlo simulation of master equations in quantum optics for vacuum, thermal, and squeezed reservoirs, Physical Review A 46 (1992) 4382–4396. URL: https://link.aps.org/doi/10.1103/PhysRevA.46.4382. doi:10.1103/PhysRevA.46.4382.DOI
- [12]M. Bompais, N. H. Amini, C. Pellegrini, Parameter Estimation for Quantum Trajectories: Convergence Result (2022). URL: http://arxiv.org/abs/2204.00343. doi:10.48550/arXiv.2204.00343, arXiv:2204.00343 [quant-ph].
- [13]Y. Castin, J. Dalibard, K. Molmer, A Wave Function approach to dissipative processes (2008). URL: http://arxiv.org/abs/0805.4002. doi:10.48550/arXiv.0805.4002, arXiv:0805.4002 [quant-ph].
- [14]R. Hamazaki, K. Mochizuki, H. Oshima, Y. Fujii, An Introduction to Monitored Quantum Systems and Quantum Trajectories: Spectrum, Typicality, and Phases, Progress of Theoretical and Experimental Physics 2026 (2026) 052A01. URL: https://academic.oup.com/ptep/article/doi/10.1093/ptep/ptag055/8530537. doi:10.1093/ptep/ptag055.DOI
- [15]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
- [16]M. Ferrari DaCrema, D. M. Kurkcuoglu, A. C. Y. Li, T. Roy, S. Zorzetti, Sparse Phase Ansatzes for Resource-Efficient Qudit State Preparation via the SNAP-Displacement Protocol (2026). URL: http://arxiv.org/abs/2603.12203. doi:10.48550/arXiv.2603.12203, arXiv:2603.12203 [quant-ph].
- [17]R. A. Howard, J. E. Matheson, Risk-Sensitive Markov Decision Processes, Management Science 18 (1972) 356–369. URL: https://pubsonline.informs.org/doi/10.1287/mnsc.18.7.356. doi:10.1287/mnsc.18.7.356.DOI
- [18]M. Heger, Consideration of Risk in Reinforcement Learning, in: W. W. Cohen, H. Hirsh (Eds.), Machine Learning Proceedings 1994, Morgan Kaufmann, San Francisco (CA), 1994, pp. 105–111. URL: https://www.sciencedirect.com/science/article/pii/B9781558603356500210. doi:10.1016/B978-1-55860-335-6.50021-0.DOI
- [19]O. Mihatsch, R. Neuneier, Risk-Sensitive Reinforcement Learning, Machine Learning 49 (2002) 267–290. URL: https://doi.org/10.1023/A:1017940631555. doi:10.1023/A:1017940631555.
- [20]E. Noorani, J. S. Baras, Risk-sensitive Reinforcement Learning and Robust Learning for Control, in: 2021 60th IEEE Conference on Decision and Control (CDC), 2021, pp. 2976–2981. URL: https://ieeexplore.ieee.org/document/9683113. doi:10.1109/CDC45484.2021.9683113, iSSN: 2576-2370.DOI
- [21]A. Marthe, S. Bounan, A. Garivier, C. Vernade, Efficient Risk-sensitive Planning via Entropic Risk Measures (2025). URL: http://arxiv.org/abs/2502.20423. doi:10.48550/arXiv.2502.20423, arXiv:2502.20423 [stat.ML].
- [22]J. W. Pratt, Risk Aversion in the Small and in the Large, Econometrica 32 (1964) 122–136. URL: https://www.jstor.org/stable/1913738. doi:10.2307/1913738.DOI
- [23]P. Artzner, F. Delbaen, J.-M. Eber, D. Heath, Coherent Measures of Risk, Mathematical Finance 9 (1999) 203–228. URL: https://onlinelibrary.wiley.com/doi/abs/10.1111/1467-9965.00068. doi:10.1111/1467-9965.00068, _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1111/1467-9965.00068.DOI
- [24]H. Föllmer, A. Schied, Convex measures of risk and trading constraints, Finance and Stochastics 6 (2002) 429–447. URL: https://doi.org/10.1007/s007800200072. doi:10.1007/s007800200072.
- [25]D. Jacobson, Optimal stochastic linear systems with exponential performance criteria and their relation to deterministic differential games, IEEE Transactions on Automatic Control 18 (1973) 124–131. URL: https://ieeexplore.ieee.org/document/1100265/. doi:10.1109/TAC.1973.1100265.DOI
- [26]M. R. James, J. S. Baras, R. J. Elliott, Risk-sensitive control and dynamic games for partially observed discrete-time nonlinear systems, IEEE Transactions on Automatic Control 39 (1994) 780–792. URL: https://ieeexplore.ieee.org/document/286253/. doi:10.1109/9.286253.DOI
- [27]P. Dupuis, M. R. James, I. Petersen, Robust Properties of Risk-Sensitive Control, Mathematics of Control, Signals and Systems 13 (2000) 318–332. URL: https://doi.org/10.1007/PL00009872. doi:10.1007/PL00009872.
- [28]M. R. James, Risk-sensitive optimal control of quantum systems, Physical Review A 69 (2004) 032108. URL: https://link.aps.org/doi/10.1103/PhysRevA.69.032108. doi:10.1103/PhysRevA.69.032108.DOI
- [29]M. Abdelhafez, D. I. Schuster, J. Koch, Gradient-based optimal control of open quantum systems using quantum trajectories and automatic differentiation, Physical Review A 99 (2019) 052327. URL: https://link.aps.org/doi/10.1103/PhysRevA.99.052327. doi:10.1103/PhysRevA.99.052327.DOI
- [30]T. Azizpour, M. Yarahmadi, Optimal Risk Efficient Quantum Control For Risk Sensitive Quantum Systems, Iranian Journal of Science and Technology, Transactions of Electrical Engineering 49 (2025) 1661–1672. URL: https://doi.org/10.1007/s40998-025-00855-w. doi:10.1007/s40998-025-00855-w.
- [31]J. Schulman, N. Hess, T. Weber, P. Abbeel, Gradient Estimation Using Stochastic Computation Graphs (2016). URL: http://arxiv.org/abs/1506.05254. doi:10.48550/arXiv.1506.05254, arXiv:1506.05254 [cs.LG].
- [32]R. J. Williams, Simple statistical gradient-following algorithms for connectionist reinforcement learning, Machine Learning 8 (1992) 229–256. URL: https://doi.org/10.1007/BF00992696. doi:10.1007/BF00992696.
- [33]C. W. Gardiner, A. S. Parkins, P. Zoller, Wave-function quantum stochastic differential equations and quantum-jump simulation methods, Physical Review A 46 (1992) 4363–4381. URL: https://link.aps.org/doi/10.1103/PhysRevA.46.4363. doi:10.1103/PhysRevA.46.4363.DOI
- [34]Z. Cheng, M. Ippoliti, Efficient sampling of noisy shallow circuits via monitored unraveling, PRX Quantum 4 (2023) 040326. URL: http://arxiv.org/abs/2306.16455. doi:10.1103/PRXQuantum.4.040326, arXiv:2306.16455 [quant-ph].
- [35]F. Mezzadri, How to generate random matrices from the classical compact groups (2007). URL: http://arxiv.org/abs/math-ph/0609050. doi:10.48550/arXiv.math-ph/0609050, arXiv:math-ph/0609050.