Optimizing for an arbitrary Schr\"odinger cat state

We derive a set of functionals for optimization towards an arbitrary cat state and demonstrate their application by optimizing the dynamics of a Kerr-nonlinear Hamiltonian with two-photon driving. The versatility of our framework allows us to adapt our functional towards optimization of maximally entangled cat states, applying it to a Jaynes-Cummings model. We identify the strategy of the obtained control fields and determine the quantum speed limit as a function of the cat state's excitation. Finally, we extend our optimization functionals to open quantum system dynamics and apply it to the Jaynes-Cummings model with decay on the oscillator. For strong dissipation and large cat radii, we find a change in the control strategy compared to the case without dissipation. Our results highlight the power of optimal control with functionals specifically crafted for complex physical tasks and the versatility of the quantum optimal control toolbox for practical applications in the quantum technologies.

We derive a set of functionals for optimization towards an arbitrary cat state and demonstrate their application by optimizing the dynamics of a Kerr-nonlinear Hamiltonian with two-photon driving.The versatility of our framework allows us to adapt our functional towards optimization of maximally entangled cat states, applying it to a Jaynes-Cummings model.We identify the strategy of the obtained control fields and determine the quantum speed limit as a function of the cat state's excitation.Finally, we extend our optimization functionals to open quantum system dynamics and apply it to the Jaynes-Cummings model with decay on the oscillator.For strong dissipation and large cat radii, we find a change in the control strategy compared to the case without dissipation.Our results highlight the power of optimal control with functionals specifically crafted for complex physical tasks and the versatility of the quantum optimal control toolbox for practical applications in the quantum technologies.

I. INTRODUCTION
Schrödinger cat states [1,2] constitute an important set of quantum states, which have various applications in quantum communication [3], computation [4][5][6][7], and sensing [8].In particular, they have been attracting a great deal of attention for the implementation of hardware-efficient qubit encodings [5,9].Recently, these include photonic [10] and superconducting quantum information [6,7] architectures due to their intrinsic fault tolerance and suitability for quantum error correction.Various approaches have been proposed and implemented for their creation, involving, e.g., a set of fundamental logical gates [11,12], homodyne detection [13,14], adiabatic protocols [15,16] or quantum reservoir engineering [17,18].Many of these approaches suffer from a long protocol time which in turn limits the speed in quantum information applications and makes the cat state generation susceptible to decoherence.
A powerful tool to obtain fast and robust state preparation protocols is quantum optimal control theory [19,20].It aims to determine suitable external controls for steering a physical system towards a particular goal, often by employing iterative numerical algorithms.The success of such algorithms crucially depends on choosing an appropriate optimization functional, i.e., a figure of merit encoding the optimization success by a single real number.An obvious choice for state-to-state optimizations is the overlap between the state generated by the optimized pulse and the target state.Such functionals have also been successfully employed for optimal control of cat state generation [21][22][23].State overlap functionals only allow for optimization towards a single, specific state whereas in many applications it is often sufficient to obtain any cat state.The actual optimization target is then a set of states and not a single state.Since the goal of the optimization is encoded in the functional's extremal values [24], tailoring the optimization functional to the underlying task helps to represent the physical target as faithfully as possible.This allows for maximal flexibility in finding optimal solutions which might be missed by too restrictive functionals.Such specifically crafted functionals for complex optimization tasks have proven to be very successful, e.g., in the optimization of individual optical cycles in laser cooling of molecules [25] or the optimization towards sets of entangling quantum gates [26,27] instead of specific gates.
Here we derive an optimization functional which allows for optimization towards the entire set of cat states instead of only a specific element.By engineering a set of functional terms, which individually check for all desired properties of the target state, we are able to construct a composite functional which takes on its extremal, optimal value if and only if a cat state is obtained.To illustrate our functional we show its application in creating cat states in a simple Kerr-nonlinear oscillator with two-photon driving.
We further demonstrate the power of our framework by studying the optimization of maximally entangled cats in a bipartite system.Such states are important in quantum sensing applications [8,28] or to implement so-called flying qubits [29].To perform optimizations for such a problem, we refine our functional such that it also checks whether maximal entanglement between the two subsystems is generated at final time.Optionally, the radius of the cat, i.e., the displacement of the corresponding coherent state, may also be prescribed.This option is particularly relevant when the system is subject to decay because the maximally achievable radius will be determined by a balance between the coherent mechanism that allows for preparing the cat, e.g. a Kerr non-linearity, and the decay [30].
Finally, in the present era of noisy quantum devices, it is imperative to also account for the sources of noise when deriving pulse shapes for practical applications.Decay and dephasing processes due to couplings between the quantum system and its environment constitute a major such source, and much effort has been devoted to adapting optimal control theory to open quantum systems [24].To account for this impact during the optimization and search for control strategies that can avoid or mitigate this effect, it is imperative to include the effect of the environment in the model and adapt the optimization functional.We do this here by rewriting our optimization functional in the density matrix formalism and employ a Markovian master equation to describe the noisy quantum dynamics.
The paper is organized as follows.We begin in Sec.II by briefly introducing cat states as well as the basic framework of optimal control theory, using Krotov's algorithm as an example.At the end of Sec.II we present our construction of the functional for optimization towards arbitrary cat states and arbitrary maximally entangled cat states as well as the necessary modifications when employing our functionals for open quantum systems.Section III illustrates the application of the cat state functional for optimization in a Kerr-nonlinear oscillator.In Sec.IV we present results for an example optimization towards maximally entangled cat states in a Jaynes-Cummings model for both coherent and dissipative dynamics.Finally, we also discuss which insight can be drawn from the optimization results regarding the role of the excitation of the cat state and the quantum speed limit and compare the performance of the optimized pulses we obtain with and without taking the decay into account.We conclude in Sec.V.

II. FRAMEWORK FOR TARGETING CAT STATES
Cat states are defined as a superposition of two coherent states |α where the complex-valued parameter α describes the displacement in phase space, respectively the excitation, of the coherent states with respect to the ground state |0 [1,2].A general form of a cat state is given as with N ϕ = 2 1 + e −2|α| 2 cos(ϕ) accounting for normalization.In the following, we refer to the relative phase ϕ between the two coherent states, as "superposition phase".Note that it is also possible to consider superpositions of more than two coherent states, which are commonly referred to as multicomponent cat states [31][32][33].However, in this paper we use the term "cat state" exclusively for two-component superpositions as the focus of our study.
Before we move to derive functionals optimizing towards an arbitrary cat state we briefly review Krotov's method [34][35][36] which we employ for all numerical optimizations performed in this work.

A. Optimization algorithm
Krotov's method [34][35][36] is an iterative, monotonically convergent optimization algorithm using gradient information to achieve convergence.The optimization target typically consists of two parts, where we assume a control problem described by a single Hilbert space state ψ(t) and a single control field ε(t), commonly realized by external electromagnetic pulses.The first part of J T depends only on the state at final time T and encodes the target to be reached at the end of the control pulse, whereas the intermediate-time functional J t describes further costs.In Krotov's algorithm, the following cost functional is usually employed, with the shape function S(t) ensuring that the optimized field is smoothly switched on and off.The reference field ε ref (t) is commonly taken to be the field from the previous iteration.This choice allows the parameter λ a to tune the step size of the optimization algorithm by penalizing large changes in the control field between iteration steps [37].
The update equation for the pulse in the iteration k +1 of the algorithm is given by [36][37][38][39][40][41] for coherent and dissipative dynamics, respectively.For the dissipative case we use density matrices instead of Hilbert space states to describe the state of our system and we assume that the time evolution is generated by a Liouvillian superoperator L -a detailed discussion of this framework in the context of Krotov's method can be found in Refs.[39,41].∂ Ĥ ∂ε is the derivative of the Hamiltonian with respect to the control pulse ε, while ∂L ∂ε describes the derivative of the Liouvillian superoperator L with respect to the pulse.
The |χ (k) (t) are often called costates.They are propagated backward in time according to the equation of motion, with the boundary condition The states |ψ (k+1) (t) are obtained by solving the equation of motion where |ψ 0 is the initial state of the system.Similarly to Eqs. ( 6) to (8), equations of motion for the dissipative dynamics, governed by L, are given as where L ε (k) (t) is the Liouvillian with the set of controls ε (k) (t) for the kth iteration and the initial state ρ0 .Together, these equations define the iterative optimization algorithm which is started by picking a guess pulse ε (0) (t).

B. Functional targeting a cat state
To construct a final time functional which allows for optimizing towards the set of cat states described by Eq. (1), we use the fact that the variance of an operator Ô in a state |ψ , is zero if and only if |ψ is an eigenstate of that operator.
Coherent states are eigenstates of the annihilation operator, â |α = α |α .As a result, all cat states as defined in Eq. ( 1) are eigenstates of â2 .Due to this property, we use the variance of â2 , as a starting point for the functional.However, cat states are not the only eigenstates of â2 , such that a vanishing variance is a necessary but not sufficient condition to identify an element from the set of cat states.Rather, all states of shape To obtain an expression whose minimal value is both necessary and sufficient to identify a cat state, we construct a composite functional with multiple terms, The first term is minimized if and only if the state is a superposition of |α and |−α , cf.Eq. ( 12) and the second term attains its minimum if and only if the desired subset of these superposition states is reached.We refer to J cs (ψ) as "coherent state term" and to J cat (ψ) as "cat term", due to their purpose in the overall functional.The specific form of the latter depends on which set of states should be targeted.For example, optimizing towards the set of even and odd cat states, respectively, can be achieved by choosing J cat as where are the projectors onto the eigenspaces of the parity operator.Π+ and Π− project onto even and odd cat states with a superposition phase ϕ of 0(even) and π(odd), respectively, while not imposing any restriction on the value of α.Another choice of J cat which allows to also leave the superposition phase ϕ free, is (12).With this, the functional term does not impose any restrictions on ϕ and allows to optimize towards the general set of cat states defined in Eq. (1).
A property shared by the functional terms in Eq. ( 11) and Eq. ( 17) is that their value is strongly suppressed for |α| → 0. This is due to the summands in both terms being proportional to |α| 4 and thus tending towards zero as |α| → 0. Therefore, the functional value is reduced for smaller values of α.Such a behavior leads to an artificial pull towards small values of |α|, which can be problematic since many applications of cat states rely on a large displacement of the two coherent states in phase space, corresponding to larger |α|.Examples for benefits of large displacements are increased sensing accuracy [4] or an improved robustness against errors in quantum information applications [42].The tendency towards small |α| can be amended by normalizing the coherent state term, and the cat term for arbitrary superposition phases, For the optimizations presented below, we always use the normalized expressions defined in Eqs. ( 18) and (19).

C. Functional targeting an entangled cat state
The cat state functionals can be further adapted to more complex optimization targets.In this section we show how to extend our framework to target maximally entangled cat states in a bipartite system.Specifically, we consider a harmonic oscillator coupled to an atom described as a qubit -an ubiquitous physical setup in the field of cavity quantum electrodynamics and circuit quantum electrodynamics [2].The corresponding optimization targets are given by states of the form where |ψ ± cat is defined in Eq. ( 14) and |b ± denotes an arbitrary orthonormal basis of the qubit.In the spirit of allowing maximal flexibility, we again aim to derive a functional to optimize towards arbitrary maximally entangled cat states, i.e., the entire set of such states.In particular, we do not want to impose any restrictions on the basis states of the qubit involved in the superposition.However, if a specific basis on the qubit is desired, the functional can be easily adapted by introducing an additional term to the optimization functional.For example, the parity operators can be employed to project out one of the two summands constituting the entangled cat state in Eq. (20).Then, it is straightforward to fix the state |b ± by calculating the overlap with the desired basis state.
To generalize the final time functional, Eq. ( 13), to an entangled cat state in a bipartite system, we modify the operator used to calculate the variance, Thus, the coherent state term is replaced by Similar to the discussion in Sec.II B, it is insufficient to use only the coherent state functional Jcs (Ψ) since it takes on its minimal values not only for the desired set of states defined in Eq. ( 20), but for a larger set of states given by with |ψ j,a 2 being eigenstates of â2 (cf.Eq. ( 12)) and To amend this, we once again construct a composite functional, adding an additional term to restrict the set of states to exactly those of the form of |Ψ cat .We accomplish this by exploiting the fact that the targeted states |Ψ cat are maximally entangled.This means that the reduced states of the harmonic oscillator, respectively the qubit, take on the minimal purity value [43] of P = 0.5.Note that the more straightforwards choice of using the von Neumann entropy as measure for entanglement cannot be used as functional.Its derivative with respect to ψ|, which is needed for the calculation of the costates, cf.Eq. ( 7), exhibits singularities, which can easily lead to numerical instabilities.For this reason we employ the following cat term tracking the subsystem purity, where ρHO = Tr qubit [ρ] and ρqubit = Tr HO [ρ].Tr qubit [•] and Tr HO [•] are the partial traces corresponding to the qubit and the harmonic oscillator, respectively.Note that we have used the fact that ρ is a pure state in the second equality.This assumption is valid for coherent dynamics.
We introduce an extension of our formalism to dissipative dynamics in the next section.Furthermore, as is commonly done in optimal control, we have renormalized J cat (Ψ) such that it takes on values between zero and one.For the cat term in Eq. ( 24), we explicitly calculate the costates in App.B. The cat term in Eq. ( 24) ensures both that the eigenstates of â2 , |ψ j,a 2 in the entangled cat state superposition are orthogonal to each other, i.e., ψ 0,a 2 |ψ 1,a 2 = 0, and that the prefactors in Eq. ( 23) are the same, i.e., |d 0 | = |d 1 |.Thus, the combined functional, takes on its minimal value only for states with ψ 0,a 2 |ψ 1,a 2 = 0 and |b j being arbitrary orthogonal basis states of the qubit.Indeed, the states in Eq. ( 26) are equivalent to those in Eq. ( 20), which we prove in App. C.

D. Dissipation adapted functional
As in the previous section, optimization will target an entangled cat state, When considering open system evolution, we need to adapt the optimization functional derived in Sec.II C to density operators.The coherent state term J cs is simply defined in terms of the variance.For open quantum systems, it becomes where Â ≡ 1 1⊗â.Using the definition of the partial trace, this is equivalent to where ρHO = Tr qubit [ρ] is the reduced state of the HO.Analogously to Sec.II B, the coherent state term can be normalized to counter the tendency towards |α| → 0, Finally, J cat ensures equal weights in the superposition (20), which in Sec.II C is achieved by making use of the subspace purity.This cannot be so straightforwardly generalized to open system evolution.When optimizing coherent dynamics, the purity of either of the subsystems suffices to determine if the final state is maximally entangled.However, in case of non-unitary evolution, the subsystem purity is not only reduced by entangling the two systems, but also decreases due to dissipation.This can for example lead to different values for the two subsystem purities.We thus express J cat (ρ) in terms of the mutual information which is symmetric and, in general, defined as with S(ρ) the von Neumann entropy, S(ρ) = − Tr[ρ ln ρ].
We use the mutual information to assess the correlation of the optimized state which helps to steer the optimization towards our target state even in the early stages of the optimization when purity is low.Moreover, the mutual information takes on its maximal value for our maximally entangled target states and for pure states it is proportional to the entanglement entropy [44].Similar to the coherent case, the von Neumann entropy is inconvenient since the derivative of S(ρ), which is needed for calculation of costate in Eq. (9d), is not always defined.To avoid this numerical problem, we use the linear entropy [45,46] instead, Accounting for the fact that all terms in the final time functional will be minimized, we obtain replacing Eq. ( 24) in the presence of dissipation.

III. OPTIMIZATION RESULTS FOR A KERR-NONLINEAR RESONATOR
To demonstrate the application of the functional constructed in Sec.II B, we consider a Kerr-nonlinear resonator with two-photon driving.In the rotating frame, it reads where K is the strength of the Kerr nonlinearity and ε(t) is the complex-valued amplitude of the two-photon drive.This Hamiltonian has been realized experimentally via coupled Josephson junctions [18].In this setting, various protocols exist for the generation of cat states using this [47] or similar Hamiltonians [48,49].The set of reachable cat states in this system is limited by the twophoton drive in Eq. ( 34) and depends on the initial state since the driving only allows for direct transfer between next-nearest energy levels, i.e., ∆n = ±2.Therefore, when starting in the ground state |0 , it is only possible to reach even-parity states.This means that only even cat states corresponding to a superposition phase ϕ = 0 are reachable.If the initial state is not an element of the even-parity subspace, then even cat states are unreachable, as transitions between the two parity subspaces are forbidden under two-photon driving.
We compare the performance of a naive state-to-state optimization with our cat state optimization for the initial state |ψ 0 = 1 √ 2 |0 + |1 .For the former optimization, we use the state-to-state functional, with the target state being an even cat state |ψ tgt = |ψ + cat , similar to Ref. [21].We present results for α = 1.5, but optimizations for different α yield similar results.Since the initial state |ψ 0 is not of even parity, it cannot evolve into an even cat state under two-photon driving.For the latter optimization, we use the cat state functional from Sec. II B with the cat term J cat chosen as in Eq. ( 15) targeting an arbitrary element from the cat state set with an arbitrary superposition phase.
Figure 1 shows the Wigner distribution of the final states after optimization with both functionals.While the optimization result for the cat state functional (Fig. 1(a)) exhibits the classical phase space structure of a cat state, i.e., two coherent states with interference fringes in between them, the results of the state-tostate functional (Fig. 1(b)) do not resemble a cat state.Furthermore, we observe that the optimized pulses we obtained via the cat state functional have a spectral width which does not exceed 400K, where K is again the strength of the Kerr nonlinearity.This confirms that we solidly stay in the regime where the rotating-frame expression in Eq. ( 34) remains valid.In the original frame the frequency of the oscillator is usually in the order of 1000K, cf. for example Ref. [6].This results in counterrotating terms at frequencies around 4000K, which is around one order of magnitude larger than the spectral width of our optimized pulses.
To quantify the distance between the optimized states and the set of cat states we define the "cat infidelity" to be the smallest infidelity between the final state and any element of the cat state set, where we use the overlap as state fidelity as defined in [50] and {|ψ cat } is the set of all cat states, which are described by Eq. (1).Using this definition, we obtain a cat infidelity of ≈ 0.004 for the optimization with the cat state functional and ≈ 0.235 for the naive state-to-state functional approach.This confirms that the state obtained with the cat state functional is much closer to a cat state than the result achieved with the state-to-state functional.This further elucidates, that targeting even cat states via a state-tostate functional for this Hamiltonian can only succeed when starting from an even initial state, as discussed earlier.
In addition to the optimizations just presented, we also compared the performance of the state-to-state functional with the cat state functional for the initial state |ψ 0 = |0 .From this state, the target states defined for the state-to-state functionals are reachable with the two-photon drive added to the Kerr-Hamiltonian.As expected, we find that the amount of iterations required in the optimization algorithm depends on the chosen cat state functional J cat .While the cat state functional optimizing towards an even cat state, as defined in Eq. ( 15), converges after around the same amount of iterations as the state to state functionals, J cat,ϕ (cf.Eq. ( 17)) takes about five times longer to converge.In case of the mixed parity initial state, we even need roughly another order of magnitude more iterations to reach convergence.This shows that more difficult optimization goals and more powerful optimization functionals often come at the price of higher numerical cost.However, since the state-tostate functional fails entirely for the mixed-parity initial state, this increased cost is well worth it.
Our results illustrate that the success of a naive stateto-state optimization hinges critically on the choice of the target state and can completely fail if, e.g., the symmetry of the system is not properly considered.Although it would be possible to amend such issues by sampling the parameter space of cat states and perform optimizations until success is achieved for some set of parameters, such an approach would be numerically very expensive.In contrast, using the functional introduced in Sec.II allows for a maximally general optimization target and thus makes scanning of the parameter space completely obsolete.

IV. OPTIMIZATION TOWARDS ENTANGLED CAT STATES IN A BIPARTITE SYSTEM
In this section we apply the functional from Secs.II C and II D to a system consisting of a harmonic oscillator coupled to a qubit.One example for such a model is the dipolar transition between two circular Rydberg states interacting with a microwave cavity mode, which is realized in an experimental setup by Raimond, Haroche, Brune and co-workers [2,51].For simplicity, we model this system by a resonant Jaynes-Cummings-Hamiltonian in the interaction picture.After applying the rotating wave approximation the Hamiltonian is given by where g describes the coupling strength between the harmonic oscillator and the qubit and ε(t) is an external drive, which couples to the qubit and can be realized by e.g. a microwave pulse.For our simulations, we use the parameters from the experimental setup in [2,51], where the coupling between the qubit and the cavity is given by g = 2π •50 kHz, which is much smaller than the resonance frequency of the qubit and the cavity ω = 2π • 51 GHz.The eigenstates of ĤJC in Eq. (38) read with the corresponding eigenenergies A more detailed introduction to the Jaynes-Cummings-Hamiltonian in the context of optimal control can be found, e.g., in Ref. [21].
To facilitate comparison between optimization results with different values of |α|, we amend the functional from Eq. ( 25) by a third term J |α| (Ψ) which allows to target cat states with a particular cat radius |α|, called |α tgt | in the following.To accomplish this, we define a scalar cost function f (x), which takes its minimal value at x = |α tgt |.To compare the desired value |α tgt |, with the actual cat radius |α| at final time T we estimate |α| from ρ(T ) by using the expression where Â = 1 1 ⊗ â, as above.Strictly speaking, this expression only yields a sensible value for |α| if ρ(T ) is an entangled cat state, which is only true if the optimization is fully converged through minimization of the other functional terms.Still, the value for |α| obtained with Eq. ( 40) can be used as an estimate of the cat state radius, which in practice turns out to be a good approximation for states close to a cat state.For our calculations we used the functional (41) Our choice of the function f proves to be particularly suitable since it possesses high gradients for both small and large arguments.This helps accelerating convergence during the optimization both far away and close to the target value.

A. Coherent Dynamics
Using the functional J T (ψ) = J cs (ψ)+J cat (ψ)+J |α| (ψ) we have performed numerical optimizations towards cat states with |α tgt | = 1 and |α tgt | = 2, respectively, starting from the ground state of the atom-cavity system.For both values of |α| we have obtained states with cat infidelities of I cat |Ψ(T ) < 10 −3 , where we use the same definition as in Eq. ( 36), although this infidelity is now calculated with respect to the set of maximally entangled cat states defined in Eq. ( 20) to match the optimization goal.In Fig. 2, we show the spectra of the optimized pulses.Both spectra exhibit sharp peaks located at the transition frequencies between the eigenstates of the atom-cavity system |n, ± (cf.Eq. ( 39)) of the drift Hamiltonian ĤJC with adjacent n, indicated by dashed lines in Fig. 2. Since the qubit is driven, these are the only direct transitions between atom and cavity.In turn this allows for increasing or decreasing the number of excitations in the cavity by ∆n = ±1 due to the interaction.It also explains why we observe spectral broadening when optimizing for cat states with larger α.Such cat states require higher levels of the harmonic oscillator to be populated and thus higher-level transitions between the eigenstates of the atom-cavity system need to be driven by the pulse.The transition frequencies be- We now inspect the optimized pulse obtained for |α tgt | = 2.0 in greater detail, noting that the optimization strategy obtained for |α tgt | = 1.0 turns out to be very similar.Figure 3(c) depicts the real part of the optimized pulse in time domain, showing a consistent increase of the instantaneous pulse frequency with time.This behavior can be further elucidated with a Gabor transform of the pulse, shown in Fig. 3 at the beginning, with more -and in particular larger -frequencies added over time.This gradual driving of higher frequency components generates a population ascent towards higher levels, ultimately yielding the desired distribution.
The pulse duration is an important property of an optimal control solution.It determines whether an operation can be carried out and influences the impact of dissipation.Specifically, finding the minimal time required to implement the physical target can help to limit the role of dissipative effects.Alternatively, dissipation can be included in the model -an approach that is followed in Sec.IV B. Here, we restrict ourselves to coherent dynamics and use the functional developed in Sec.II C to investigate how fast cat states can be prepared for a Jaynes-Cummings Hamiltonian.The determination of the shortest time for generating or transforming states is an important task of optimal control theory.The resulting quantity is called the quantum speed limit [52][53][54][55][56], which is usually determined by a set of optimizations with varying pulse durations.The shortest pulse duration at which the objective can still be reliably reached is then used as an estimate for the quantum speed limit [54,56].
Since the cat state functional is fairly complex, reaching convergence proved difficult in some of our calculations.Particularly the presence of plateaus in the optimization landscape posed an appreciable problem during some optimizations.These plateaus lead to asymptotically slow convergence if the value of λ a , cf.Eq. ( 4), is kept constant during the optimization.Hence, we have employed an additional line search inside Krotov's method to find the best value for the step size parameter λ a in each optimization step.With this modification, we have reliably obtained good convergence despite the functional's complexity.The results for the optimizations with different pulse durations are depicted in Fig. 4. All data exhibit a similar trend, as the final value |α|, cf.Eq. ( 40), steadily increases for small values of T and saturates at the desired value as soon as the pulse duration crosses a certain threshold.Once this threshold is reached, the optimization attains the desired value reliably.The smallest duration T α QSL at which |α| reaches |α tgt | increases with the desired target value |α tgt |.This suggests that T α QSL indeed represents the quantum speed limit.The increase of T α QSL with |α tgt | can be directly justified with our previous findings in Fig. 3, showing that higher levels need to be sequentially populated and thus longer times are needed for higher excitation of the cat state.
We have also performed optimizations towards entangled cat states without prescribing a target value for |α|, i.e., without the term J |α| .The obtained "free" optimization results are plotted as magenta squares in Fig. 4. As expected, the final values of the cat state radii |α| stay below all curves indicating the quantum speed limit for a given value of |α|.However, the final values |α| do not always increase with larger pulse durations for the "free" optimization, whereas the quantum speed limit continuously increases towards larger values of |α tgt |.The latter is in accordance with our previous findings in Fig. 3, showing that higher levels need to be populated one after another.Since larger excitations of the cat state, i.e., larger |α|, require more transitions to higher levels, the larger time required to reach the target is not surprising.

B. Dissipative Dynamics
Dissipation is expected to influence the preparation process of the entangled cat states.Including this influence in the optimization framework may allow for identifying control strategies that are better adapted to the presence of dissipation than those obtained with a coherent model.In the following, we first investigate the influence of dissipation on the coherently optimized results and then reoptimize the latter to find strategies better suited for dissipative dynamics.To this end, we consider an open quantum system described by a Gorini-Kossakowski-Sudarshan-Lindblad master equation [57] with T 1 relaxation of the HO, where ρ is the joint density operator of HO and qubit and L = 1 1 ⊗ â with decay rate κ.
In order to analyze how the optimization protocols derived in the previous section are affected by dissipation, we inspect three quantities, or "errors", characterizing the final state and its quality, for three different target values |α tgt | in Fig. 5.The first quantity is the deviation of the purity P from that of a pure state, which is equivalent to the linear entropy defined in Eq. (32).Second, in order to quantify how close the final state is to the set of target states |Ψ cat , we define a "cat infidelity", where we use the generalized overlap as state fidelity as defined in [50].The third quantity is the deviation of |α| from the target value |α tgt |, The target value |α tgt | determines the minimum time needed to prepare the cat state, the so-called quantum speed limit.We therefore discuss the influence of dissipation by expressing the dissipation strength in units of the quantum speed limit T QSL .Following the same logic, the pulse duration T is chosen to be approximately twice the quantum speed limit.The specific values are T = 2.4π/g for |α tgt | = 1.0, T = 3.5π/g for |α tgt | = 1.5, and T = 5π/g for |α tgt | = 2.0. Figure 5(a) depicts the deviation of the final state purity from the ideal purity with growing dissipation strength.The dashed lines correspond to the performance of pulses optimized for coherent evolution but evaluated in the presence of dissipation.The purity errors show a qualitatively similar behavior for different |α tgt | and, as expected, increase with dissipation strength.The solid lines display the results of reoptimization in the presence of dissipation using the pulses obtained without dissipation as guess pulse.They follow a similar trend as the coherently optimized results.Upon closer inspection, however, they exhibit improvements, which are most pronounced for |α tgt | = 1.5 (magenta lines).We analyze these improvements in more detail below.Dissipation does not only affect the purity, but we also find a larger infidelity of the final states.The cat infidelity as defined in Eq. ( 44) is plotted in Fig. 5(b).Analogously to Fig. 5(a), infidelity and dissipation strength are correlated and the shapes of the curves resemble those depicted in Fig. 5 FIG. 6.The same data as in Fig. 5(a) but with linear scale for the purity to illustrate the different improvements under reoptimization with dissipation (solid) compared to coherently optimized results (dashed).Same line styles and color code as in Fig. 5.
of |α| with respect to the target value |α tgt | as a function of the decay rate κ.Since the model accounts for decay of the harmonic oscillator, α is particularly affected by dissipation, reducing α with increasing κ.Indeed, the curves in Fig. 5(c) show this behavior and follow a similar trend as in Fig. 5(a-b) for both the coherently and the reoptimized pulses.Note that the reoptimization does not reduce the final-time cat radius error for the two larger values of |α tgt |, |α tgt | = 1.5 (magenta) and |α tgt | = 2.0 (green).This is not surprising for the following reason.
The optimization targets a sum of terms which are balanced against each other.Since the function f used in the definition of J |α| is comparatively insensitive to errors in the desired value of |α|, the value of |α| can slightly deteriorate in favor of improvements in the other terms.If needed, this could be counteracted by changing the weight of J |α| or even changing the function f used when defining J |α| .Despite the similar behavior of the three quantities presented in Fig. 5 on first glance, a more detailed analysis of the curves reveals three different types of adjustments that the reoptimization introduces.We illustrate these in Fig. 6 by changing the scale of plot Fig. 5(a) to highlight the differences between the coherently optimized (dashed) and reoptimized (solid) results.The blue curve, corresponding to |α tgt | = 1.0, shows no improvement due to the reoptimization, which indicates that the solution found without account of dissipation is already robust.This is corroborated by the observation that the other quantities in Fig. 5(a,c) do not significantly improve either.In contrast, the purity of the reoptimized result for |α tgt | = 1.5 (magenta) is strongly enhanced compared to the original result for all decay rates κ considered.An improvement under reoptimization is also observed for |α tgt | = 2.0 (green), except for small values of κ.The improvement in both cases suggests that the strategies found by the coherent optimization are not optimal once dissipation is taken into account and indicates the importance of considering dissipation in the optimization for obtaining more robust strategies.We also studied the generation of cat states with larger values of α, which revealed a similar behavior, albeit with a much stronger purity loss.For very large α this loss of purity becomes so strong that the optimization fails which illustrates the practical limitation that is imposed by the decay on exciting the system coherently.
We investigate the change in control strategy next.To this end, we focus on the results for |α tgt | = 1.5 and |α tgt | = 2.0, showing signs of a strategy change as discussed above.To analyze the dynamics of the harmonic oscillator, the mean number of excitations, is plotted over time in Fig. 7(a-b).Analogously Fig. 7(cd) shows the average excitation of the qubit, as a function of time.Additionally, the interaction between the subsystems is analyzed in Fig. 7(e-f) by means of the mutual information, defined in Eq. (31).We start by describing the dynamics for the case |α tgt | = 1.5.In Fig. 7(a), the dynamics optimized under pulses with and without dissipation show clear differences.Under the coherently optimized pulses (dashed line), the HO gets excited already shortly after the beginning.In contrast, the pulse optimized taking dissipation into account (solid line) keeps the excitation in the harmonic oscillator very small until t ≈ T /2, where it starts to increase linearly to n ≈ |α| 2 .Overall, the excitation induced by the pulse optimized without dissipation is above the one for the reoptimized pulse at all times.The strategy of reducing excitation is not surprising as more excitation in the harmonic oscillator is directly related to a stronger decay.The excitation dynamics on the qubit, depicted in Fig. 7(c), is oscillatory and does not immediately reveal an underlying strategy.As we will see below, it is important that, for strong dissipation, σz oscillates around zero in the last third of the time interval.Fig. 7(e) depicts the mutual information and thus the correlations between the subsystems.Note, that in case of the coherent dynamics, the mutual information indicates the entanglement between the systems, while for the mixed case the interpretation of the mutual information is more intricate.While in the coherently optimized case the harmonic oscillator and qubit become strongly entangled from the beginning on, the strategy for the reoptimized pulses is to keep the subsystems independent from each other until about t ≈ T /2, and then continue with strong correlations between the subsystems.During this phase of strong correlations, excitation is directly transferred to the harmonic oscillator, which explains the straight excitation increase in Fig. 7(a).All in all, the strategy identified by the optimization algorithm in the presence of dissipation is to wait in the beginning and then generate the cat state as fast as possible in the end.This  47), and of the qubit, Eq. ( 48), respectively, as well as the mutual information in (e-f), Eq. (31).simply reduces the time during which excitation in the harmonic oscillator is exposed to decay, yielding higher quality final states.
In case of |α tgt | = 2.0, the strategy change is more subtle.For both curves in Fig. 7(b), n is almost constant around zero in the beginning and linearly grows to the desired value of n tgt = |α tgt | 2 = 4.0 after about half of the time.The difference between both curves is the final peak of the dynamics under the coherently optimized pulse (dashed line), which surpasses the desired value just before the end and finally decreases to match the desired excitation.In contrast, the solid curve, representing the dynamics under the reoptimized pulse, approaches the final value in an almost straight line, a behavior already observed for the reoptimized dynamics in Fig. 7(a).The dynamics of σz , depicted in Fig. 7(d), is again more complex.The first part is clearly dominated by small fluctuations around the ground state of the qubit.Around half time, both dynamics exhibit strong oscillations before σz remains close to zero in the interval between t ≈ 0.65•10 −2 κ −1 and t ≈ 0.85•10 −2 κ −1 .Thereafter, the oscillations grow stronger again, ultimately ending close to the desired value of σz = 0. Finally, the dynamics of the mutual information in Fig. 7(f) are similar to each other and those found for the dissipatively optimized dynamics in Fig. 7(e).For the pulse obtained under strong dissipation, the mutual information increases a bit later compared to the coherently optimized case.Also, the mutual information for |α tgt | = 2.0 exhibits a significant dip just before the end, which indicates that the system briefly goes to a relatively uncorrelated state just before the entangled cat state is created.Apart from this detail, both strategies for |α tgt | = 2.0 follow a similar structure as the reoptimized dynamics discussed in Fig. 7(e).Despite this similarity of the dynamics, we observe a strong improvement in purity and even fidelity for large dissipation.The mutual information of the reoptimized pulse in Fig. 7(e) also exhibits a speedup, compared to the coherently optimized dynamics, which is reflected in the delayed rise of the solid curve, compared to the dashed one.However, since the speedup is only marginal, the enhancement must also be related to avoiding the final peak in the average excitation of the harmonic oscillator.
To further illustrate the strategy change for |α tgt | = 2.0, the qubit dynamics close to the final peak is presented in Fig. 8(b-c) together with the data from Fig. 7(b) replotted in Fig. 8(a) for clarity.Here, the star and cross in Fig. 8 c).For the optimization not taking into account dissipation (Fig. 8(b)), the qubit starts by evolving to the ground state |0 becoming disentangled from the harmonic oscillator as already indicated by the dip in the mutual information in Fig. 7(e).It continues and evolves to the maximally entangled state at the center of the Bloch sphere.For the reoptimized dynamics (Fig. 8(c)), the qubit instead starts to evolve towards the excited state |1 , but does not completely reach it, due to the purity reduction caused by dissipation.From there it evolves to the center of the Bloch sphere, again in an almost straight line.We thus find that the two strategies approach the final state in a similar way, yet from different sides of the Bloch sphere.In the case of the coherently optimized pulse (blue), this means that for the final part of the protocol, excitation is transferred from the harmonic oscillator to the qubit.This coincides with the observation of the peak around t = 0.95 • 10 −2 κ −1 in Fig. 8(a).It represents the excitation excess that is stored in the HO and later transferred to the qubit.Since the dissipation punishes more excitation in the harmonic oscillator, the strategy for the reoptimized pulse is to instead store excitation in the qubit and transfer the surplus excitation to the harmonic oscillator in the end, thus protecting it from decay as long as possible.

V. CONCLUSIONS
We have developed an optimization framework to target cat states and entangled cat states in bipartite systems.The corresponding functionals target the whole set of cat states instead of individual elements from this set.As a result, they provide the maximal flexibility for the optimization algorithm to steer the system towards the most suitable state from the set in a given physical setup.The composite functionals consist of several terms, which separately check whether the state is an eigenstate of the annihilation operator, whether it is an equally weighted superposition, and, in case of a bipartite entangled cat, whether the two subsystems are maximally entangled.Moreover, we have shown how to adjust the functionals to specify particular cat state properties, such as a desired displacement of the coherent states constituting the cat superposition.
We have performed example optimizations using these functionals for a Kerr-nonlinear oscillator with twophoton driving.By directly comparing their performance with a naive state-to-state approach, we have been able to show that our framework reliably finds cat states, whereas the state-to-state approach needs to be manually adjusted to a reachable state in advance.This demonstrates the power of the cat state functionals which allow to avoid analyzing the reachable set of cat states in advance.Furthermore, we have successfully applied the functionals for maximally entangled bipartite cat states in an archetypical Jaynes-Cummings model.We have analyzed the structure of the optimized pulses which show a consecutive transfer of population towards higher energy levels as control mechanism.Moreover, we have investigated how fast cat states can be prepared and determined the quantum speed limit which we found to be directly connected to the excitation of the cat states, i.e., to the cat radius.
Finally, we adopted our framework to open quantum systems and investigated the influence of dissipation in the Jaynes-Cummings model, comparing the performance of coherently optimized pulses with those optimized in the presence of decay of the harmonic oscillator.Accounting for the decay during the optimization has allowed us to improve the final state fidelity for states with large cat radius which are most affected by the decay.
Inspecting the dynamics under the optimized pulses, we have been able to identify the strategy changes obtained when taking dissipation into account.In the presence of decay, it is more advantageous to keep excitation of the harmonic oscillator low as long as possible.While this by itself is not surprising, the optimization identifies the most suitable protocol depending on the desired cat radius.For sufficiently small radii, the cat is simply generated as fast as possible towards the end of the protocol.For larger cat radii, the best way to keep the oscillator excitation low is by storing excitation temporarily in the qubit.These results illustrate how taking dissipation into account during the optimization of a desired quantum process allows for identifying control strategies which are more robust than those obtained by optimizing coherent dynamics.
In the future our functionals could be further adapted to target more complex sets of states, for example, multicomponent cat states [33,[58][59][60] or (entangled) multipartite cat states [8,29,61].Another potential future avenue of our work is to extend the framework to the generation of squeezed states or squeezed cat states, which have recently attracted interest in quantum error correcting codes [62].It will also be interesting to apply the cat state optimization framework derived here to open quantum systems that require a description of the environment's influence beyond a phenomenological decay, in particular to systems with non-Markovian dynamics.For example, superconducting circuits are subject to 1/f noise [63] which results in non-Markovian dynamics.Beyond identifying strategies that are best adapted to the open system properties, this may allow for exploiting non-Markovianity as a resource for control, see e.g.[24,64] and references therein.The present results thus increase the utility of the quantum optimal control toolbox [19,20] for practical applications in the quantum technologies.
where ρ = |ψ ψ|.However, the calculation of the costates for the cat term in Eq. ( 24) is not as straightforward.To calculate the derivative, we first express Eq. ( 24 In Sec.II C a functional is constructed which allows for optimizing towards states of the form given in Eq. (25).At first glance, this appears to be a different form compared to the desired entangled cat states in Eq. (20).In the following we show that both expressions are indeed equivalent.To this end, we first write the eigenstate of the annihilation operator â2 in Eq. ( 12) as Thus, the state obtained by optimizing the functional in Eq. ( 25) is a entangled cat state as defined in Eq. ( 20).

5 FIG. 1 .
FIG. 1.Comparison of the optimization results for two different functionals.The plot shows the Wigner distribution of the final states obtained with the cat state functional described in Sec.II in (a) and with the state-to-state functional (Eq.(35)) in (b).
tween n and n + 1 become either ∆ω ∝ √ n + 1 + √ n for |n, ± → |n + 1, ± , which we call type-(i) transitions or ∆ω ∝ √ n + 1 − √ n for |n, ± → |n + 1, ∓ , which we call type-(ii) transitions.Since the latter frequencies tend towards zero with larger n, the type-(ii) transition frequencies become more and more difficult to resolve for a given pulse duration.This only leaves the optimization algorithm to target the larger type-(i) transition frequencies to address higher-level transitions.Comparing the spectrum obtained for |α tgt | = 1.0 in Fig. 2(a) and the spectrum for |α tgt | = 2.0 in Fig. 2(b) confirms this interpretation.Indeed, the pulse in Fig. 2(b) contains larger frequency components in comparison to the pulse in Fig. 2(a) and exhibits a broader spectrum.

(b) with σ = T 4 √FIG. 3 .
FIG. 3. Detailed analysis of the optimized pulse towards |αtgt| = 2.0 showing the pulse in time domain (c), in frequency domain (a) and a time-frequency distribution (b) calculated via the Gabor transform.All quantities are expressed in units of the coupling strength g.

FIG. 4 .
FIG. 4. The final value of |α| plotted against the pulse duration T for different optimizations.The different marker styles indicate optimizations performed with different target values |αtgt|.The dashed auxiliary lines on the right, colored with the same color as the marker styles, are added to guide the eye.

FIG. 5 .
FIG. 5. Dependence of the final state errors on the dissipation strength κ for different target values |αtgt|: (a) purity error, (b) cat infidelity, and (c) cat radius error.The solid lines correspond to pulses optimized with dissipation taken into account whereas the dashed lines display the results obtained using the coherently optimized pulses, but propagated with the corresponding dissipation strength.

FIG. 7 .
FIG. 7. Comparison of different strategies:The solid lines depict the dynamics induced by the pulse optimized with strong dissipation and the dashed lines depict the dynamics with the coherently optimized pulses.The left and right column correspond to |αtgt| = 1.5 and |αtgt| = 2.0, respectively.The panels (a-b) and (c-d) show the average excitation of the harmonic oscillator, Eq. (47), and of the qubit, Eq. (48), respectively, as well as the mutual information in (e-f), Eq. (31).

FIG. 8 .
FIG. 8. Visualization the strategy change, storing excitation in the qubit instead of the harmonic oscillator, when optimizing with strong dissipation.Panel (a) is the same plot as in Fig. 7(b) and panels (b-c) show the dynamics of the qubit in Bloch sphere representation.For the sake of clarity, we only show the final part of the dynamics in (b-c), as indicated by the gray dashed lines in (a).