Optimal Control of Hybrid Optomechanical Systems for Generating Non-Classical States of Mechanical Motion

Cavity optomechanical systems are one of the leading experimental platforms for controlling mechanical motion in the quantum regime. We exemplify that the control over cavity optomechanical systems greatly increases by coupling the cavity additionally to a two-level system, thereby creating a hybrid optomechanical system. If the two-level system can be driven largely independently of the cavity, we show that the non-linearity thus introduced enables us to steer the extended system to non-classical target states of the mechanical oscillator with Wigner functions exhibiting significant negative regions. We illustrate how to use optimal control techniques beyond the linear regime to drive the hybrid system from the near ground state into a Fock target state of the mechanical oscillator. We base our numerical optimization on realistic experimental parameters for illustrating how optimal control enables the preparation of decidedly non-classical target states, where naive control fails. Our results pave the way for applying the toolbox of optimal control in hybrid optomechanical systems for generating non-classical mechanical states.


I. INTRODUCTION
In view of quantum technologies (see, e.g., [1]), optimal control techniques provide an increasingly useful toolbox to take quantum hardware to the limits of reaching target states with high fidelity, precision, sensitivity and robustness-one prominent example being feedback stabilization of predefined photon-number states in a box [2,3]. Systematic strategies to unlock and exploit the hardware potential in experimental settings with the help of optimal control methods can be found in a quantum control roadmap [4]. A recent physical system that has been added to the family of quantum hardware are mechanical resonators [5][6][7]. Pioneering experiments realized cooling of mechanical motion to the quantum ground state by direct cryogenic [8] or by laser-based cooling techniques [9,10]. A current focus lies on generating non-classical mechanical states, which are required to fully leverage mechanical resonators for applications in quantum metrology [11,12], as quantum transducers [13,14] or for fundamental tests of quantum mechanics [15][16][17]. Along these lines, the control over excitations of single phonons has been demonstrated by coupling mechanical motion to artificial atoms [8,18] or to cavity light fields [19,20].
In the present work we put focus on using a hybrid optomechanical system for non-classical state generation. We choose a system consisting of a mechanical resonator that is parametrically and weakly coupled to a cavity, which itself is strongly coupled to a two-level system (see Fig. 1). Such a system has been analyzed before in the context of strong atom-mechanics coupling [28], dissipative state engineering [29], tripartite polaron dynamics [39], and optical bistability [40]. It finds direct relevance in present experimental implementations [41] and potential future implementations in nano-optic [9,42] or iontrap scenarios [43].
In our study, we first establish controllability of the optomechanical hybrid system in the absence of decoherence processes. We then apply optimal control algorithms and suggest concrete controls in an experimentally realistic setting for generating a non-classical state of mechanical motion. As an example, we choose to focus on generating a single phonon Fock state and use numerical optimization to find pulse sequences for optimally arXiv:1812.06042v1 [quant-ph] 14 Dec 2018 generating such a state. In order to be close to realistic experimental settings, we adapt parameters from the electromechanics implementation reported in Ref. [41] in order to illustrate the gain of optimal control over established control techniques. Overview of the analyzed hybrid optomechanical system. (a) We consider the interaction of a mechanical resonator (represented by its annihilation operatorb) with a cavity field (represented by its annihilation operatorâ), which is at the same time coupled to an atom (represented by its lowering operatorσ−). Possible physical implementations of this conceptual model can be realized in (b) an electromechanical circuit QED architecture (see Ref. [41]) or (c) in an optomechanical cavity, which simultaneously traps an atom.
For many instances, quantum optimal control [44][45][46][47][48] provides both framework and algorithms to go beyond conventional control approaches. In cavity optomechanics, standard control approaches imply making use of interactions in the linearized regime using cwdriving [49][50][51][52][53][54][55], multi-tone driving [56][57][58] or pulsed driving [32,37,59] for generating entangled states [60][61][62], squeezed states [63][64][65] or for performing state tomography [66]. The leap that optimal control techniques offer is to accommodate the specifics of the system for finding experimental protocols that can be run in a much shorter time frame or that achieve a higher fidelity in state preparation. Optimal control may, thus, find control sequences that accommodate limitations in the system's parameters, which may prevent generating desired target states otherwise. Indeed, optimal control schemes have already been analyzed for optomechanical systems for enhancing cooling performance [67][68][69] and for generating optomechanical entanglement [70]. A recent account on treating optomechanical systems as linear control systems can be found in [55].
In the present work, we move to the setting of bilinear control systems [71] and cutting-edge algorithms [72] to show how bilinear optimal control allows for generating a non-classical mechanical Fock state in a parameter regime, where conventional steering methods fail. Our methodology can be extended for optimal generation of mechanical Schrödinger cat states [22,57] or cubic phase states [58], provided that the truncation of the Hilbert space required for our computational optimization can be extended to higher Fock state numbers.
Our paper is structured as follows: in Sec. II we present the Hamiltonian of the hybrid optomechanical system and derive a drift and control part, in Sec. III we discuss the controllability of our system from a general perspective, in Sec. IV we present the numerical algorithms our optimal control optimization is based on, in Sec. V we use optimal control based on realistic experimental parameters to generate a single phonon Fock state and in the final section Sec. VI we discuss our results and give an outlook for future work. The appendix Sec. A summarize in detail the derivation of the Hamiltonian of the hybrid optomechanical system that we consider.

II. THEORETICAL MODELS: DRIFT AND
CONTROL HAMILTONIAN The optomechanical system we are interested in is described in the lab frame by the Hamiltonian whereâ andb are the annihilation operators of the cavity and the oscillator, and the last term represents driving of the optical cavity by a laser. TheQ =â +â † quadrature of the cavity is defined as the direction of the driving. The driving Rabi frequency is connected to the laser power P and the cavity decay rate κ by E = 2κP ω L . The system may be made more amenable to control by adding a strongly non-linear element in the form of a controllable two-level atom in the cavity, with the Hamiltonian (2) Above, the three terms represent the atom itself, the atom-cavity coupling, and a classical control signal driving the atom, respectively.σ ± denote the atomic raising and lowering operators.
Decoherence processes to be taken into account are decay processes in the cavity and damping of the mechanical oscillator. The former are described by the Lindblad operatorV 1 = √ κâ. This assumes that the effective temperature of the cavity surroundings is zero, which is a good approximation for most cavities. To describe the damping in the mechanical oscillator we use the Lindblad operatorsV 2 = √ γbV 3 = √ γxb † , where x is the oscillator Boltzmann factor and γ the oscillator decay rate. Finally, we describe the atomic decoherence byV 4 = √ κ aσ− with atom decay rate κ a . Combining all decoherence processes we end up with a standard Markovian master equation where ρ is the density operator of the overall system. To get a set of equations which is better prone for numerical simulation we simplify the described setup in a number of steps (cf. Appendix A for detailed calculations): 1. We transform the cavity into a frame corotating with the laser by applying the unitary exp(itω Lâ †â ). This is followed by a rotating wave approximation (RWA) to drop the counter rotating terms.
3. Due to driving the cavity with a laser field, the cavity (without atom, and oscillator) ends up in a coherent steady state |α . From a computational point of view it is useful to consider oscillations around |α (and not around the cavity vacuum), since this step allows more radical truncations of the physical Hilbert space. Hence we apply a phase space shift to get new creation and annihilation op- with appropriately chosen parameters η, s, ζ, r; cf. Appendix A 3 for exact values. The s shift, in particular, will act as a multiplicative factor to g 0 in a new linear interaction term coupling the cavity and the oscillator.
4. The atomic operatorsσ ± are replaced by the phaserotated versions σ ± with 5. If the average photon number is high, the non-linear optomechanical interaction term can be linearized and replaced by a hopping interaction.
6. At the end we drop another counter rotating ab interaction term (i.e. another RWA), to make the system completely time independent (apart from the control terms).
Finally, we end up with the following drift and control Hamiltonians: and with the modified Lindblad operators Now we can replace the Hamiltonian part of Eq. (3) by H drift + H control (t) and theV i by the V i of Eq. (6) to get a new master equation the time dependence of which is entirely wrapped up in the control functions u j (t) with j ∈ {atomX, atomY, detuning}. Clearly, the optimal control task then amounts to finding control amplitudes u j (t) such that an appropriately chosen initial state ρ 0 evolves after a time T into some best approximation to a given target state ρ T of the mechanical oscillator (after tracing out the cavity and the atom).
An obvious candidate for the initial state ρ 0 is the steady state the system evolves into if we only consider laser driving of the cavity. The steady state is influenced by the presence of the atom and thus changes with the detuning of the atom. If the detuning is large, ρ 0 is close to the ground state. Numerical calculations can be found in Appendix A 4.

III. CONTROLLABILITY
Before considering an actual realistic scenario, let us sketch that the hybrid optomechanical system we consider is well-posed from a control theoretical point of view. To this end, we neglect dissipation for the moment and solely look at the coherent evolution that is given by H drift + H control (t).
It is well known that the extent of control over an harmonic oscillator or light modes greatly increases by coupling the modes to a controllable two-level atom, whereby the system actually becomes fully controllable [73][74][75]. For the Jaynes-Cummings model of one or several atoms coupled to an oscillator mode, some of us showed in [76] that breaking the symmetry σ z ⊗ N by controls on the atom leads to approximate full controllability 1 . Here σ z acts on the atom and N is the number operator of the oscillator.
Systematically extending similar lines, approximate controllability of the Jaynes-Cummings-Hubbard model (now comprising an entire network of cavities each containing one mode and one two-level atom, where the interaction between two cavities is given by a hopping term) is analyzed in detail in [77]. It is shown that any pure state of the overall system can be prepared with arbitrarily small error starting from an arbitrary pure initial state by controlling the atoms individually and the cavity-cavity interactions globally. Yet when looking at the mechanical oscillator as another cavity, this result does not directly cover our case, because the oscillator in turn is not coupled to another controllable two-level system and, more importantly, we cannot manipulate the coupling strength between the cavity and the oscillator. Moreover, the reasoning in [77] indicates that the given scenario is a minimal requirement for full controllability. Hence, in our case this means one could not prepare any pure state of the overall system either.
Fortunately, the overall state of the system is not needed, since in the extended system suggested here, we are interested in the partial state of the oscillator only, where the situation is much easier. Consider the atomcavity subsystem first. This part is well studied and known to be fully controllable [74-76, 78, 79] in the sense that one can reach with arbitrary small error any pure state of atom and cavity from any initial state by using u atomX (t) and u atomY (t) only-with u detuning (t) not needed except for speed-up.
In contrast, cavity and oscillator alone just follow quasi-free dynamics, which is much more limited. Even when allowing for control of the coupling strength, one is far from full controllability, since the time-evolution operator would be confined to the Schrödinger representation of the metaplectic group [80]. However, with the Hamiltonian components given in Eqs. (4) and (5), it is easy to see that-in entire analogy to the classical phase space-the states of cavity and oscillator become (approximately) flipped after a certain time. Hence a possible strategy to control the overall system is: prepare a state of the cavity first and wait until it flips over to the oscillator. This indicates that one can actually prepare any pure state of the oscillator from an arbitrary pure initial state.
Nevertheless the reasoning just outlined comes with two major caveats: Firstly it assumes that one can separate the atom-cavity from the cavity-oscillator interaction, which in reality is of course not true. Yet, what helps here is a separation of time scales. In the systems we are looking at, the atom-cavity coupling g ac is 10 times stronger than the boosted cavity-oscillator coupling g 0 s. Hence a simple cavity state can be prepared before the swapping to the oscillator has effectively started. Moreover, one can use the controls on the atom to decouple it during the swap process thus putting a limit to the length of the pulse sequences needed to prepare and stabilize the cavity state. This limits the complexity (e.g., the number of cavity and oscillator levels we take into account) of the states one can handle, but the requirements of the numerical algorithm are much more severe in this respect. The second caveat clearly is decoherence. So both the numerical analysis and the experiment have to address mixed states with the decoherence time limiting the overall control time.
The state-of-the-art of using optimal control with linear feedback for optomechanical systems has been summarized in the recent comprehensive review by Hofer and Hammerer [55]. Note that the systems thus far addressed do not use the interaction with an atom, but rather a feedback loop from homodyne detection on a beam cou-pled out of the cavity. The information gathered is then used to drive the cavity with a linear feedback Hamiltonian H fb of the form where a, a † are annihilation and creation operators of the cavity and (t) ∈ C is the amplitude of the feedback signal. From the point of view of Lie-algebraic systems and control theory, such systems come with limitations: since all terms in the overall Hamiltonian are at most quadratic in creation and annihilation operators, Hamiltonians of that form constitute a finite dimensional Lie algebra. Therefore, the manifold of time evolution operators thus generated is also finite dimensional (no matter whether the terms are time dependent or not) and can thus be described by finitely many parameters. A given initial state with Wigner function W 0 evolves following a classical phase flow, i.e. the solution of the initial value problem for the classical system. The latter, however, is but a multi-dimensional harmonic oscillator driven by a force which is constant in space. Hence, if W 0 has no negative parts, this cannot change under such a form of time evolution, e.g., if W 0 is Gaussian, it stays Gaussian all the time.
Adding an atom interacting with the cavity as used in our context is meant to overcome exactly these limitations: it allows for preparing any state of the harmonic oscillator subsystem from any initial state. The remaining question of how severe the restrictions imposed by a realistic dissipative system are, and up to which degree the theoretical possibilities can actually be exploited by pulse sequences shall be explored by some examples using numerical optimal control in the following.

IV. NUMERICAL ALGORITHMS
In view of going beyond Gaussian states, the optomechanical setting lends itself to be treated as a bilinear control system [71] with states X(t) followinġ Its form is determined by a non-switchable drift term A, while the control is brought about by (typically piecewise constant) control amplitudes u j (t) ∈ R governing the time dependence of the otherwise constant control operators B j . The connection to the Lindblad master Eq. (7) above is obvious by the identifications Γ − iĤ drift / =: A (Eqs. (4) and (6)) (10) −iĤ control (t)/ =: (5)) . (11) Given this equation of motion, the optimal control task then amounts to minimizing the Euclidean distance between the (possibly mixed) target state ρ T on the one hand and the final state ρ(T ) of the system on the other hand. Typically ρ(T ) results after n steps of time propagation in slots of piecewise constant quantum maps F k Likewise, the distance between the truncations to the sublevels of interest tr E (ρ T ) and tr E (ρ(T )) may be taken, or alternatively, a Lagrange-type penalty term may be added to the cost functionals discussed in the outlook. Explicitly allowing for mixed target states requires some generalization of the standard task (with pure tar-gets) discussed in Ref. [72]. To this end, we extract from the (squared) Euclidean distance (in terms of the Frobenius norm ||A|| F := tr{A † A} ) those terms depending on time (and therefore on the controls) and rescale to arrive at the cost functional Taking the derivative with respect to the control amplitude u j in the k th time slot then gives where in the unital case the derivative of the propagating quantum map F k := e τL k withL k =Γ − i j u j (t k )Ĥ j would make use of F k being normal (so in slight abuse of language it has orthogonal eigenvectors |λ (k) i associated to the real eigenvalues λ (k) i ) to take the form described in [81,82] and used in [72] while in the general (non-normal) case mostly encountered here we have to resort to finite differences according to where δ has to be sufficiently small in the sense , steepest-descent of the cost functional with the controls would follow a recursion in r reading with α r as step size, while the standard Newton update would take the form (21) with H −1 r denoting the inverse Hessian in the r th iteration. For convenience the array of piecewise constant is the corresponding gradient vector. In this work we use the bfgs quasi-Newton algorithm [83] to approximate the inverse Hessian as explained in [72].

V. RESULTS BY OPTIMAL CONTROL
The optimization results presented in this section are for two variants of the circuit cavity electromechanical system described in [41]. It consists of a mechanical oscillator coupled to a microwave cavity. The cavity mode is further coupled to a superconducting qubit ("atom"). In the original implementation the atom-cavity coupling is fairly strong, g ac /(2π) = 12.5 MHz, but the cavityoscillator coupling is much weaker, g 0 /(2π) = 300 Hz. In all of our simulations we have artificially boosted the single-photon optomechanical coupling strength g 0 by one order of magnitude, which together with the boost s resulting from coherent driving of the cavity brings the optomechanical system in the required strong-coupling regime. The two parameter sets we use are • Set 1: Coupling enhancement factor s = 100, g 0 /(2π) is boosted by a factor of 40 to 12 kHz, cavity decay rate κ/(2π) = 1 MHz and the device is operated at a temperature of 25 mK.
• Set 2: Coupling enhancement factor s = 120, g 0 /(2π) is boosted by a factor of 10 to 3 kHz, cavity decay rate κ/(2π) = 0.2 MHz and the device is operated at a temperature of 10 mK. Compared to Set 1, we have assumed an optical cavity with smaller linewidth, which allowed us to reduce the boost of the optomechanical coupling strength.
Hence, further decreasing the optical cavity decay would make the boost of g 0 unnecessary. We have also assumed a dilution fridge operating at 10 mK.
A full list of parameters is found in the Appendix in Table III, along with related parameter ratios in Table IV. In the following, we shortly discuss parameter ratios that are relevant for achieving quantum control as commonly known from optomechanical or cavity QED setups. We require the optomechanical system to be sideband-resolved, i.e., Ω m /κ > 1. This facilitates efficient state swap of the cavity state to the mechanical oscillator by selecting the beam-splitter (hopping) interaction from the optomechanical interaction Hamiltonian and at the same time suppressing the undesired two-mode squeezing part of the Hamiltonian. We need the optomechanical cooperativity to be larger than unity ( |g0s| 2 κ γ n0 > 1), which allows the mechanical oscillator to be laser-cooled close to the quantum ground state, the initial state of our system. We need to be in the strong coupling regime, both for the cavity-oscillator part ( |g0s| max(κ,γ) > 1) as well as for the atom-cavity part ( gac max(κ,κa) > 1). The former facilitates coherent swapping of the state of the cavity to the oscillator, and the latter from the atom to the cavity. All these conditions are fulfilled for all chosen parameter sets.
The system is controlled by driving the atomic transition harmonically (the atomX and atomY controls), and by adjusting the atomic resonance frequency ω a , which changes the detuning ω a − ω R of the atom from the driving signal (the detuning control). The frequency ω R of the driving signal is 2π · 500 MHz below the shifted cavity resonance frequency ω c , which allows us to draw a clear separation between the atom being resonant with the drive, or with the cavity, or neither.
At the beginning of the optimization each control field in the sequence is initialized to a random value. The control sequence is first optimized for a short computational time (about 300 s) without decoherence to quickly obtain a reasonable starting sequence, and then for a longer computational time (several hours) with the computationally heavier decoherence processes included. Due to a complicated optimization landscape with many local minima (typical of open-system optimization), generically one has to repeat the optimization with random initial sequences dozens of times to obtain sufficiently good results.
We simulate the harmonic oscillator modes by truncating the infinite-dimensional Fock space into a finitedimensional one. To make sure our control sequences remain valid in the untruncated case, we apply a penalty functional on the population of the highest Fock state included in the simulation (currently |2 ) during the op-timization, thus obtaining control sequences which avoid exciting the higher-lying states. To verify the results, we finally simulate the optimized control sequence using a higher truncation dimension (4 instead of 3). The evolution does not change significantly for any of our sequences, which provides justification for our optimization method.

A. Fock state optimization
Here our optimization task is, starting from the steady state of the system, to create the Fock state |1 in the oscillator, without exciting the states |2 and up in either the cavity or the oscillator. Note that the task cannot be accomplished exactly due to decoherence.
We quantify the non-classicality of the resulting oscillator state using the CV-mana [84], an easily computable monotone, as the measure of Wigner negativity. It is defined as the logarithm of the integral of the absolute value of the Wigner function, M (ρ) = log dα |W ρ (α)|. It has the value zero for all classical states (i.e. states with nonnegative Wigner-functions). For the exact target state |1 we obtain M (|1 ) ≈ 0.355. The purpose of the non-classicality measure, given a measurement procedure with a specific level of uncertainty, is to say whether the measurement results expected in our state could have been produced by a classical state instead.
The results of the Fock state optimization are presented in Figs. 2 and 3, and summarized in Table I. We notice that with both parameter sets we are able to obtain a clearly non-classical state (with the |1 population significantly higher than the |0 population and the CVmana noticeably larger than zero), while keeping the excitation of the higher-lying states in both the cavity and the oscillator to a minimum. As expected, Set 2 yields a slightly better result. In both regimes, mere π pulses leave the system in a classical state or indistinguishably close to one, while optimal-control derived sequences attain significantly non-classical states with fidelities being limited mostly by dissipation.

Comparison to π pulse sequences
We may compare the optimized control sequences preparing the |1 Fock state in the oscillator to a naive excitation transfer control sequence consisting of just π pulses (or their drift Hamiltonian analogs). The sequence consists of three segments. The first pulse excites the atom, the second moves the atom in resonance with the cavity until the excitation is transferred there, and the final segment moves the atom back out of resonance and waits until the excitation has hopped from the cavity into the oscillator. Since there are several simultaneously active interaction terms as well as decoherence, this somewhat naive sequence does not perform very well. We may improve on it by optimizing the durations of each of the three pulses such that the population transfer during each step is maximized.
The optimized π-pulse sequences are presented in Figs. 4 and 5, and their performance is summarized in Table I. Unlike the fully numerically optimized sequences, the π pulses make it easy to observe the timescales of various interaction processes. For example, in Fig. 4(b) we can see the population of the |1 state of the cavity first go up from zero to 0.84 on the timescale τ = 2π/(4g) of the atom-cavity interaction g ac /(2π) = 12.5 MHz, and then fall back to zero roughly on the timescale of the boosted cavity-oscillator interaction g 0 s/(2π) = 1.2 MHz, expedited by decoherence.
With the Set 1 parameters the π-pulse sequence fails to produce a substantially non-classical state, as can be seen from the Wigner function which has a barely visible negative region in the middle. With the Set 2 parameters the π pulses fare a little better, but remain inferior to the fully optimized control sequence, as shown in Table I.  Figure 6.
Result of the cavity-oscillator entangled state (|01 + |10 )/ √ 2 optimization using Set 2 parameters. We can see that the states |2 and |3 are only slightly excited due to the penalty functional applied during the optimization. (a) oscillator population, (b) cavity population, (c) logarithmic negativity of the cavity-oscillator state, (d) optimized control sequence.

B. Entangled state optimization
Here we aim for a different target state, namely the entangled cavity-oscillator state (|01 + |10 )/ √ 2. Again, decoherence prevents us from achieving this exact state. We quantify the entanglement between the optical and the mechanical mode using the logarithmic negativity of the reduced cavity-oscillator state. The logarithmic negativity of a bipartite state ρ is defined as L(ρ) = log 2 ρ PT tr = log 2 ( i s i ), where s i are the singular values of the partial transpose of ρ. The logarithmic negativity is zero for all positive partial transpose (PPT) states (which include all separable states), and has the value 1 for the exact target state.
The results of the entangled state optimization are presented in Fig. 6, and summarized in Table II. With the Set 2 parameters we are able to obtain a decidedly nonclassical entangled optomechanical state with minimal excitation of the higher-lying Fock states.

VI. CONCLUSIONS AND OUTLOOK
In the present work we have shown how adding a steerable atom on top of a cavity coupled to a mechanical oscillator paves the way to (approximate) full controllability on the oscillator side. The system thus extended allows for preparing any state of the harmonic oscillator subsystem from any initial state. More precisely, the extension overcomes the limitations of previous designs confined to a cavity coupled to an oscillator (without interaction to an atom), where linear feedback from homodyne detection came with the inevitable confinement to interconverting within equivalence classes of Gaussian oscillator states or states with constant Wigner negativity. It is only by adding an interacting atom that opens the way to controlled dynamics including interconversion between different equivalence classes of oscillator states.
For illustration, we focused on analyzing the generation of the mechanical Fock state |1 , and the optomechanical entangled state (|01 + |10 )/ √ 2, which allowed us to truncate the control state space at dimension d = 3. However, higher truncations at d = 5 or larger are imaginable. A larger control state space would allow studying the generation of further non-classical states of interest, such as mechanical Schrödinger cat states [22,57] or higher NOON states [85], relevant for studying macroscopic non-classicality [15], or cubic phase states [58,86], relevant for Gaussian quantum computation [58].
Another aspect, where optimal control may be important, is to account for the multimode character of the mechanical oscillator [87,88]. In particular, when using pulsed control schemes, multiple mechanical modes lying in the finite bandwidth of the pulsed optical drive will be addressed simultaneously. This might lead to undesired optomechanical correlations, which could readily be treated by including Lagrange-type penalties into the target function subject to optimal control.
Our study of using optimal control techniques for generating non-classical mechanical states may find further application in, for example, nano-optic [9,42], ion-trap [43] or circuit QED implementations [41] of hybrid quantum optomechanical systems in the future.

ACKNOWLEDGMENTS
We acknowledge fruitful discussions with Giulia Ferrini and Markus Aspelmeyer, and, at an earlier stage, Stefan Welte. The work was supported in part by the Excellence Network of Bavaria (ENB) through the programme Exploring Quantum Matter (ExQM). W.W. acknowledges funding from Chalmers' Excellence Initiative Nano and from the Knut and Alice Wallenberg Foundation.  Table I. Summary of Fock state optimization results. The target state |ψT = |1 is a Fock state of the mechanical oscillator. dim denotes the truncation dimension of the Hilbert spaces of the cavity and the oscillator used in the simulation. The fidelity between a mixed final state ρ and a pure target state |ψT is F (ρ, |ψT ψT |) = ψT |ρ|ψT , which in this case is equal to the state |1 population of the oscillator. As measure of the negativity of the Wigner function Wρ(α) quantifying the non-classicality of the state ρ, we follow Ref. [84] and use the so-called CV-mana M (ρ) = log dα |Wρ(α)|.
parameter set sequence type dim fidelity F log-negativity L figure  Table II. Summary of entangled state optimization results. The target state |ψT = (|01 + |10 )/ √ 2 is an entangled state of the cavity and the mechanical oscillator. dim denotes the truncation dimension of the Hilbert spaces of the cavity and the oscillator used in the simulation. The entanglement between the two bosonic modes is quantified using the logarithmic negativity L(ρ) = log 2 ρ PT tr.
Appendix A: Deriving the optomechanical Hamiltonian

Introduction
The simplest realization of an optomechanical system is a single-mode Fabry-Pérot cavity with one mirror semitransparent for coupling to the outside world, and the other mirror attached to a sufficiently harmonic mechanical oscillator [7]. The optical cavity is driven through the semitransparent mirror using lasers. There are also other systems that follow similar dynamics, e.g. quantum electromechanical circuits, and the discussion below applies to them as well.
Let us assume that there is just a single cavity mode and a single oscillator mode that are relevant. We denote the annihilation operators of the cavity and the oscillator byâ andb, and the corresponding dimensionless position and momentum by (Q,P ) and (q,p), respectively. 2 Let the zero-point motion of the mechanical oscillator have the standard deviation x 0 = u q 0|q 2 |0 . The resonance frequency of the optical cavity ω c depends on its length, which is modulated by the position of the mechanical oscillator, given byx = x 0q = x 0 (b +b † ). Linearizing, we obtain In the lab frame the optomechanical system is thus described by the Hamiltonian where the last term represents driving of the optical cavity by a laser. TheQ quadrature of the cavity is defined as the direction of the driving. The driving Rabi frequency is connected to the laser power P by E = 2κP ω L . The system may be made more controllable by adding a controllable two-level atom in the cavity, with the Hamiltonian Above, the three terms represent the atom itself, the atom-cavity coupling, and a classical control signal driving the atom, respectively. The driving defines the atomic X direction, and we (for now) introduce the arbitrary phases φ c and φ a to keep the atom-cavity interaction term as generic as possible.
The decoherence processes in the cavity are described by the Lindblad operator √ κâ. This assumes that the effective temperature of the cavity surroundings is zero, which is an excellent approximation for microwave cavities cooled to ultralow temperatures or for optical cavities operating at room temperature. Likewise, the atomic decoherence is described by the Lindblad operator √ κ aσ− . For the mechanical oscillator, due to its lower resonance frequency, we need both the annihilation and creation Lindblad operators { √ γb, √ γxb † }, where 0 ≤ x < 1 is the oscillator Boltzmann factor. The summary of the symbols used can be found in Table III along with the numerical values used in the simulations.

Moving into a rotating frame
To fix the terms driving the atom and the cavity we transform into a frame co-rotating with their frequencies, where ∆ is the detuning between the laser and the cavity, and We may then perform a rotating wave approximation and drop all three counter-rotating terms (and their hermitian conjugates).
The Lindblad operators in the rotating frame acquire a rotating complex phase factor which has no effect on the dynamics since it cancels out.

Shifting and rotating the cavity and oscillator states
Ignoring the oscillator for the moment (setting g 0 = 0), with constant laser driving a pure coherent steady state |α forms in the cavity, where If the average photon number â †â = |α| 2 of the optical cavity is high enough, the non-linear interaction term is "linearized"; we may introduce shifted and rotated versions a, b of the annihilation and creation operators, describing oscillations around the steady state:â where η, ζ are rotation angles and s, r are complex shifts in the harmonic oscillator phase space, all of them unspecified for now. Moreover, we introduce the hatless position and momentum operators (Q, P ) and (q, p) based on a, b. This yieldsâ †â = a † a + Re(s)Q + Im(s)P + |s| 2 1, b +b † = cos(ζ)q − sin(ζ)p + 2 Re(e iζ r)1, ae iφ L + h.c. = cos(η)Q − sin(η)P + 2 Re(e iη s)1.

(A8)
The cavity Lindblad operator √ κâ is equivalent to √ κa combined with the extra Hamiltonian term Now the optomechanical Hamiltonian, expressed in terms of the transformed operators and including the Lindbladinduced terms above, is H om / = (H om + H Lind, cavity + H Lind, osc )/ = (−∆ − g 0 (cos(ζ)q − sin(ζ)p + 2 Re(e iζ r)))(a † a + Re(s)Q + Im(s)P + |s| 2 1) where we immediately dropped any terms that are mere multiples of identity. Next, the unwanted interaction crossterms P q, Qp and P p are eliminated by choosing sin(ζ) = Im(s) = 0. Thus s is real, and ζ = 0 since ζ = π would be just an uninteresting q, p inversion. We obtain where the shifted detuning ∆ := ∆ + 2g 0 Re(r) = ω L − ω c , and the shifted cavity frequency ω c := ω c − 2g 0 Re(r). We can see that the shift s acts as an enhancement factor on the linear cavity-oscillator interaction term −g 0 sQq. The remaining linear terms can be eliminated by fixing the remaining free parameters η, s, r such that E 2 cos(η) = (∆ + 2g 0 Re(r))s This yields a cubic equation for Re(r). If we approximate γ Ω m (given in nearly all cavity optomechanics realizations), the oscillator shift is r = g0s 2 Ωm . If we instead assume the coupling enhancement factor s > 0 given and treat the driving laser amplitude E as a free parameter, we may easily solve r and ∆ , and then E and η. This way we obtain s = |α | and η = arg(α ) for the transformed coherent state parameter (cf. Eq. (A6)) We thus end up with the relatively simple Hamiltonian (plus the counter-rotating term) Next, we perform the same operator substitutions to the atomic Hamiltonian, again expressingâ andb in terms of the hatless versions using Eqs. (A7), together with the further substitutions yielding Since the new hatless atomic raising and lowering operators are simply phase-rotated versions of the originals, no extra Hamiltonian terms are induced by the Lindblad dissipator. The phases φ L , φ a and φ c were absorbed into the transformed operators and the control phase φ R , and only remain in the counter-rotating terms (which we approximate away as they perturb the dynamics only slightly). The non-linear term −g 0 a † aq in H om is also typically very weak and can be ignored in our weak coupling scenario, i.e., g 0 (κ, Ω m ). In Table V we show significance estimates for all the discarded terms.
The dynamics (in the rotating frame) given by H om + H atom together with the Lindblad dissipator D{ √ κa, √ γb, √ γxb † } are equivalent to H om + H atom together with D{ √ κâ, √ γb, √ γxb † }, but expressed in terms of the new, rotated and shifted operators a and b, which fulfill the original bosonic commutation relations. In terms of the eigenstates of the transformed number operator a † a, if g 0 = 0 the cavity steady state is |0 , and with realistic enhanced coupling strengths it remains close to |0 . We have The operator shift (A7) thus enables us to truncate the computational Hilbert space much more heavily, even when |s| is large. From now on we always use the shifted-and-rotated operators and their eigenstates.

Steady state
The full system Hamiltonian, after dropping the counter-rotating terms in Eqs. (A16) and (A18), is Depending on whether we want a two-mode squeezing or a hopping interaction, we choose the laser-cavity detuning In the absence of atomic control, R(t) = 0, ω R is an arbitrary constant, and we may choose ω R = ω L to obtain The presence of the atom modifies the steady state into which the system evolves during an initial period of laser driving of the cavity. The strong g ac s(σ + + h.c.) term makes the steady state impure, unless the atom is far detuned from the cavity in which case the system ends up close to the ground state (of the transformed operators), as the oscillator is cooled by the hopping interaction with the cavity. With this assumption, with Set 1 parameters we obtain a steady state with the cavity populations p 0 = 0.9969, p 1 = 0.0031 and the oscillator populations p 0 = 0.9967, p 1 = 0.0033). At the start of the control sequence, t = 0, we transform the steady state to the simulation frame. Since the frames coincide at this point, this does nothing to the state.

Control system
If ω R = ω L , in order to obtain a constant drift Hamiltonian, we need one more rotating frame transformation to stop the rotation of the atom-cavity interaction term while keeping either the two-mode squeezing or the hopping interaction term fixed. This is accomplished using the generator H 0 / = (ω R − ω L )a † a ∓ (ω R − ω L )b † b (in terms of the transformed operators), which yields The g ac s term in the above equation, resulting from the shifted part of the atom-cavity interaction term, is somewhat problematic. We propose three possible strategies for dealing with it: • Actively cancel it using the control signal (R(t), φ R (t)) produced by the signal generator. For this strategy we need a high Rabi frequency for the control signal, and a high sample rate for the signal generator.
• Passively cancel it using another harmonic signal on top of R(t), which also requires a high Rabi frequency for the canceling signal. Such a strong driving has been, e.g., used in Ref. [89].
• Include it in the simulation and optimization. To have a fixed H drift we need to set ω R = ω L . Since ω L is not that far from cavity resonance, this may weaken the control system.
The 2π factors were introduced to make the control fields u(t) normal frequencies. The decoherence processes are described using the Lindblad operators { √ κa, √ γb, √ γxb † , √ κ a σ − }. 12. 5 12.5 Table IV. Important parameter ratios for the hybrid optomechanical system. Both parameter sets place us in the highcooperativity, strong-coupling, resolved-sideband regime. n0 = x 1−x is the initial oscillator population in the absence of a coupling.