Quantum and classical control of single photon states via a mechanical resonator

Optomechanical systems typically use light to control the quantum state of a mechanical resonator. In this paper, we propose a scheme for controlling the quantum state of light using the mechanical degree of freedom as a controlled beam splitter. Preparing the mechanical resonator in non-classical states enables an optomechanical Stern-Gerlach interferometer. When the mechanical resonator has a small coherent amplitude it acts as a quantum control, entangling the optical and mechanical degrees of freedom. As the coherent amplitude of the resonator increases, we recover single photon and two-photon interference via a classically controlled beam splitter. The visibility of the two-photon interference is particularly sensitive to coherent excitations in the mechanical resonator and this could form the basis of an optically transduced weak-force sensor.


I. INTRODUCTION
Over the last decade, the new domain of engineered quantum systems has attracted considerable research interest [1][2][3], the objective of which is to control the quantum world.
Quantum engineered systems are a promising emergent technology, with many important applications such as enhanced sensing and metrology [4][5][6][7], fundamental tests of quantum mechanics [8] and quantum information and quantum computation [9,10]. Quantum control involves manipulating the evolution of a quantum system to steer the system to a desired state. This is particularly important in quantum information and computation in which quantum states of a qubit, such as a single photon, must be prepared, controlled and measured.
In quantum optomechanics [11], optical fields are used to both control the state of the mechanical system and to read it out. In the simplest case, sideband cooling is used to prepare the mechanical resonator in its ground state. From there, various schemes have been devised to steer the mechanical resonator into non-classical states such as squeezed states [12][13][14], phonon number eigenstates [15][16][17][18] and cat states [19,20] by suitable optical control. Given the ability to prepare a mechanical resonator in a non-classical state, we can then consider the possibility of using it to control the quantum state of the light. It is therefore interesting to investigate the control of single photon states and photon-photon interactions mediated by a mechanical resonator prepared in a non-classical state with possible applications in photonic quantum information processing [21][22][23]. In our protocol, the mechanical state can be prepared using a Raman process very much like that used for atomic Raman memories.
Single photon states [24] are predominantly employed as information carriers in quantum communication [25] and quantum information processing [26]. This has recently motivated the development of single photonic technologies such as the methods to generate, control, process and measure single photons [27][28][29][30][31]. At the heart of single photon experiments is the interference of two single photons at a beam splitter, a uniquely quantum feature first demonstrated by Hong, Ou and Mandel and known as HOM interference [32]. It lies at the core of the power of linear optical quantum information processing [10], demonstrated most recently in boson sampling experiments [33,34]. This effect is observed when two indistinguishable single photons enter a 50/50 beam splitter where the photons bunch together and both are detected at one output port as a result of quantum interference. As HOM interfer-ence is a purely quantum mechanical manifestation of single photon states interacting at a beam splitter, controlling the beam splitter interaction would lead to quantum or classical control of the single photon states.
Langford et al. [26] have introduced a controlled beam splitter interaction to coherently control the conversion of photons between three optical modes as a route to generate and process complex, multi-quanta states for photonic quantum information applications. In this paper, we consider this model in an optomechanical scheme to take advantage of the intrinsic optomechanical nonlinearities for coherent photon conversion and controlling the non-classical states of light. Our model considers a quantum controlled beam splitter in which a mechanical degree of freedom controls a beam splitter interaction between two optical modes. In particular, we show that when the mechanical resonator is prepared in a phonon number state it acts as a quantum controller, entangling the optical and mechanical degrees of freedom; a kind of optomechanical Stern-Gerlach interferometer. When the coherent excitation of the mechanical resonator is increased, the controller acts as a classical parameter, resulting in a classical beam splitter interaction. The experimental signature of the transition from quantum control to classical control is the visibility achievable in a Mach-Zehnder (MZ) or Hong-Ou-Mandel (HOM) interferometer for one and two photon inputs, respectively. The results we present demonstrate how an underlying quantum control can be configured as a purely classical control provided the residual entanglement between the controller and the system can be made arbitrarily small [35].
The implementation of single photon optomechanics entails a strong coupling between the mechanical and optical modes and is not yet experimentally achieved. However, several groups have put some efforts towards this [29,36]. For example, photonic crystal (PhC) resonators make it possible to get both localized optical and mechanical modes at the same time. This increases the optomechanical coupling strength between the optical and vibrational mode [37,38]. Therefore, PhCs are promising candidates for engineering strong single photon optomechanical coupling by providing high-Q nano-cavities. This achievement, together with improvements to single photon sources [39,40] and the technology to couple single photons into PhC cavities [27], offers a platform for novel proposals using single photon optomechanics.
Our proposal is based on a double cavity optomechanical system wherein a mechanical resonator modulates the coherent coupling of the two optical cavities. Each cavity has a single input-output channel. This system offers a strong intrinsic nonlinearity which cannot be achieved using standard linear optical components. This nonlinearity can be used to implement mechanically assisted coherent photon conversion between the two different optical modes and create an effective photon-photon interaction. An example of this kind of system has been developed by the Painter group [38]. Another example is based on a single bulk flexural mode driven by the opposing radiation pressure forces of two optical cavity modes. If the cavity modes are coupled, transformation to normal modes leads to a model in which the normal mode coupling is modulated by the mechanical displacement [41].
The protocol we describe is based on the ability to prepare the mechanical resonator in either a Fock state or a coherent state by transferring the desired state from the optics to the mechanics using one of the optical modes. In essence, this preparation step is using the mechanics as a quantum memory and parallels atomic Raman memory schemes [42]. In this way, we can prepare the mechanics in a single phonon state or a coherent state with varying amplitude. In the second stage of the protocol, we investigate how the prepared mechanical state controls the beam splitter interaction between two optical modes prepared in single photon states. We show that if the mechanical resonator is described classically, this interaction implements a controllable beam splitter interaction between the input and output modes of the optical cavities. As the coherent amplitude of the mechanical resonator is reduced, the photons become entangled with the mechanical resonator and this is reflected in a decrease in the visibility of a MZ or HOM interferometer. Optical interferometry is thus a probe of the entanglement between a quantum controller and the target system. The paper is organised as follows. In section II, we introduce a model for a mechanically controlled beam splitter and, using a simple unitary model encoding a qubit or a qutrit into the optical degrees of freedom, we investigate how the state of the controller can be varied to enable quantum or classical control of the optical system with the transition between these extremes determined by the degree of entanglement between the optical and mechanical subsystems. A simple interpretation is given in terms of 'which-path' information stored in the controller. In section III, we define continuous mode single photon states of the field. In section IV, we generalize the simple single frequency analysis from section II to a multimode input-output analysis. In section V, we show how the degree of quantum control can be determined using optical interferometry in which the mechanical system acts as a controlled beam splitter in place of a conventional beam splitter. The mechanically controlled beam splitter is comprised of two coupled optical cavities with a coupling rate that depends on the mechanical displacement and with each cavity coupled to a single input mode and a single output mode. The visibility of the resulting interferometer is shown to be an experimental signature of the degree of entanglement between the state of the mechanical element and the light. As the mechanical element becomes a classical controller, the entanglement goes to zero and the interferometer visibility goes to maximum value. Section VI discusses the broader implications of our model.

II. COHERENT PHOTON CONVERSION.
In this section, we provide a simple model which qualitatively explains many features that arise in the fully quantum model presented in section IV. The model consists of three single (frequency) mode bosons interacting via a cubic interaction Hamiltonian. Two of the bosonic modes describe the optical cavities and the third bosonic mode describes a mechanical system. We show that by preparing the mechanical system in various states (e.g. a Fock or coherent state) we can control the interaction between the optical modes.
In section II A, we present the model and review the concept of coherent photon conversion [26]. In section II B, we explicitly show that if the mechanical object is prepared in a large amplitude coherent state, to a very good approximation, it does not encode any 'which-path' information about the optical mode excitations while a perturbative analysis of the residual quantum correlations between the optical and mechanical modes indicates that which-path information is present at higher orders in the coupling strength. Finally, section II C illustrates that if the mechanics is in a quantum state such as a Fock state or a small amplitude coherent state, the optical and mechanical degrees of freedom become entangled. This entanglement changes the behaviour of the system by varying the extent to which which-path information is present for different initial states of the controller.

A. Unitary model
The classical beam splitter interaction between two optical modes a 1 and a 2 is defined by the unitary operator under which the optical operators transform as Langford et al. [26] introduced the concept of coherent photon conversion based on an ability to coherently control the exchange of photons between two optical modes. The Hamiltonian realized an optical three-wave mixing process in which a strong coherent pump field was used to create an enhanced nonlinearity in the nonlinear medium to convert a single photon into two single excitations in different frequencies. The defining Hamiltonian for the process is where a 1 , a 2 are the annihilation operators for the bosonic modes we seek to control while b is the annihilation operator of the bosonic controller. In [26], the controller was taken to also be an optical mode but in this paper the controller will represent a mechanical degree of freedom. Our scheme uses the intrinsic nonlinearity of the optomechanical beam splitter and does not need a nonlinear crystal.
The Hamiltonian in equation (4) will, in general, dynamically entangle the optical and mechanical degrees of freedom depending on the initial states used. We will now describe a picture in which this entanglement can be viewed in terms of 'which-path' information in a kind of optical Stern-Gerlach device in which optical information is stored in the mechanical element.
We will assume that the optical modes begin in an eigenstate of the total photon number N = a † 1 a 1 + a † 2 a 2 , while the mechanical element is prepared in an arbitrary state |φ b . It is convenient in this case to use the two mode Schwinger representation of SU(2) to write the joint state of the optical modes. Defining the generators of SU(2) as with S 2 = (N/2 + 1)N/2. We can then define the joint eigenstates of S 2 and S z in terms of the tensor product photon number basis for modes a k as |s, m z = |s − m 1 ⊗ |s + m 2 .

The interaction Hamiltonian equation (4) can then be written in the form
where S + = S † − = a † 2 a 1 or equivalently S ± = S x ± iS y . If the initial state of the entire system is the total state at time t > 0 can then be written as with U (t) = e − i H I t and Equation (10) is like a Stern-Gerlach device in which the mechanical controller is keeping track of 'which-path' information. We make this interpretation more explicit in section II B below.
Clearly |Ψ(t) is an entangled state in general. Tracing out the state of the controller, we see that the state of the optical system is where In general, ρ O (t) is a mixed state representing the degree of entanglement between the optical system and the controller; a correlation that encodes 'which-path' information if the states |φ m (t) b are distinguishable.

B. Classical control
We now consider the case in which the mechanical element is prepared in a coherent state, |β b , with a large coherent amplitude β. We can use a canonical transformation b →b + β, to include this amplitude in the Hamiltonian while the initial mechanical state now becomes the ground state. The new interaction Hamiltonian is whereḡ = gβ. For simplicity, and without loss of generality, we take β to be real.
As a coherent state with large amplitude is a semiclassical state, we expect that as |β| becomes large, this model should reduce to the simple unitary model of equation (1). To see this, we fixḡ to be constant while letting β → ∞. With this scaling we can regard g =ḡ β 1 as a perturbation parameter in the dynamics arising from equation (14). Terms arising to first and higher order terms in g describe optomechanical entanglement and a departure from the simple unitary coupling of the optical modes described by equation (1).
We define θ =ḡt as the effective beam splitter parameter that can be reached by unitary evolution; for example, a 50/50 beam splitter has θ = π/4. Let the initial state of the optics and the mechanics be where |ψ(0) O = |n 1 ⊗ |m 2 is the initial state of the mode-1 and mode-2, taken as a product Fock state, and |β b is a coherent state. In terms of the SU(2) operators, |ψ(0) O is an eigenstate ofŜ z . Therefore, equation (11) can be written as whereŪ and D(β) is the displacement operator with the property D † (β)bD(β) =b + β. To second order in gt, we find that where U BS is given by equation (1). Substituting this into equation (12), we then find that with ρ O (0) = |ψ(0) O ψ(0)|. The state of the two optical cavities, after fixed interaction time such that θ =ḡt = constant, is thus given by a completely positive unital map of the initial state. We can now see that, up to second order correction to the action of a classical beam splitter, we achieve a completely positive map corresponding to a dephasing channel that might arise, for example, as a weak measurement of S z . This is precisely what one would expect if the mechanics encoded 'which-path' information about the optical excitations. The classical control given by the beam splitter interaction U BS is composed with a random relative phase shift between the two optical cavities. This leads to a weak suppression of the off-diagonal coherence terms in the S z basis. This effect can be interpreted as an effective measurement of the relative occupation number of each cavity mode. The results of this measurement are hidden in the quantum correlations between the cavity modes and the mechanical degree of freedom and thus reflects residual entanglement between the controller and the optical system. This structure is typical of the way in which residual quantum entanglement in a semiclassical controller affects the ideal classical control transformation [35].
The dephasing channel described above is not the only decoherence phenomena that can happen (to second order in gt). However, this expression shows the point that once we go beyond zero order, the controller gets entangled with the optical system.

C. Quantum control
We now consider the opposite limit in which the mechanical element is a quantum controller for the optical states. Quantum control necessarily requires that the controller becomes entangled with the target state for appropriate states of the controller. For example, in a quantum CNOT gate, preparing the controller in a superposition of the two computational basis states with the target in one of the computational basis states, produces a Bell state for the combined system.
As in the previous section, the Schwinger representation allows one to see the kind of quantum control realized in this system. We now write the Hamiltonian given in equation (4) and equation (8), in terms of the (dimensionless) position and momentum operators for the mechanics where . This Hamiltonian represents two orthogonal rotations of the pseudo-spin controlled by two non-commuting operators in the controller. This is the canonical example of quantum control considered in [43]: it is not possible to represent this kind of control using a measurement and feedback protocol from the controller to the optical subsystem.
To proceed, we need to fix the initial optical state. For practical reasons it is unlikely that we will be able to prepare states with N > 2 in the foreseeable future. The case N = 1 requires a single photon and encodes a qubit in the two optical modes [17]. In the next section, we will see that this can be done using a MZ interferometer set-up. The case N = 2 can be done by preparing a single photon in each optical mode and corresponds to encoding a qutrit into the optical system. In this case, the initial state of the optical system is |1 1 ⊗ |1 2 ≡ |1, 0 z in the Schwinger representation. In the next section, we will see that this suggests a HOM interferometer set-up to investigate quantum to classical control.
The connection to interferometry can be seen more clearly by writing equation (10) for the two cases N = 1, 2 with the initial optical states |0 1 |1 2 and |1 1 |1 2 respectively These two equations indicate that the mechanical element acts, in general, as quantum controller of a qubit (N = 1) or a qutrit (N = 2).
In the N = 1 qubit case, it is easier to work in the dressed state basis rather than the tensor product basis as the dressed states are eigenstates of the Hamiltonian. These are defined by H I |±, n = ± g √ n|±, n , where where | ± 1/2, n = |1/2, ±1/2 ⊗ |n b with |n b a Fock state of the mechanical oscillator. If the initial state is written in the dressed-state basis as where c ± n are complex coefficients, the state at a later time is which is clearly a controlled rotation in the dressed state basis. For example, if the optical system is prepared in the state |1/2, −1/2 while the mechanical controller is prepared with a single excitation, |1 b , the state at a later time is an entangled state in general.
In the case N = 2, the qutrit case, the corresponding case for the initial state is If we write the state of the optical system in form of equation (12), we have where We see that R n,m (t) = 0 for n = m and there is a complete loss of coherence, due to the entanglement of the optical and mechanical systems, and perfect which-path information of the optical system is encoded in the mechanical object. Inspection of equation (29) indicates that this information is stored in the number of mechanical excitations.
If the optical system is prepared in the same initial state in each case N = 1, 2 but the mechanical controller is prepared in a superposition of ground and single excitation, , the state at time t for the case N = 1 becomes and for the case N = 2 we have Again we take the example for the case N = 2 to calculate the state of the optical system in form of equation (12) as where Figure 1 shows the coefficients R n,m (n = m) which measure the decoherence. It can be seen that these terms are not equal to zero at the same time thus there is always some coherence in the system which results in the reduction of the which-path information. These examples show that, by varying the state of the controller, the degree of entanglement between the optical system and the controller varies and so does the which-path information which affects the reduced state of the optical system.
A coherent state with a very small amplitude, β 1, can also be approximated as an asymmetric superposition of |0 and |1 |β |0 + β|1 Therefore, for a mechanical system prepared in coherent state with small amplitude there is less entanglement between the controller and the optical system than there is for the mechanical number state |0 b or |1 b , resulting in less decoherence and less which-path information stored in the mechanics. In section V, we consider the visibility of the interference pattern, in a MZ interferometer for the qubit case and in a HOM interferometer for the optical qutrit, as a measure of this which-path information.

III. CONTINUOUS MODE SINGLE PHOTON STATES
We wish to consider the case in which the field driving each cavity is made up of a sequence of pulses with exactly one photon per pulse. The positive frequency components of the input field operator, a in (t) can be written in the frequency domain as where ω c is an appropriate carrier frequency. We will work in an interaction picture rotating at the carrier frequency and ignore the oscillatory pre-factor in equation (37). However, it should be noted that whenever we use single photon states as an input to an optical cavity we will assume that the carrier frequency is resonant with the cavity.
We now define a single photon state as a superposition of a single excitation over many whereξ(ω) is the spectral density function. The average field amplitude of a single photon state is zero We can interpret this result as an indication of the random optical phase of a photon number eigenstate. A phase dependent measurement on the single photon state using, for example, homodyne detection would give a null signal on average. Despite this result, it is clear that the single photon state is a pure quantum state and as such contains a great deal of quantum coherence. This is revealed when we look at the intensity of the field rather than the field amplitude.
The probability per unit time to detect a single photon on an ideal detector is proportional to n(t) = 1 ξ |a † in (t)a in (t)|1 ξ and it is easy to show that where The fact that n(t) appears as the modulus square of a single, complex valued function in equation (40) is a reflection of the underlying purity of the single photon state. In optical terms we would say that the pulse is 'transform limited' although we need to bear in mind that this is highly non-classical state with an average field amplitude of zero.

IV. OPTOMECHANICAL MODEL
The previous discussion, while a good introduction to the central features of the model, is not realistic from an experimental perspective. Typically, we do not have control of the optical state of the two cavity fields directly, rather we only have control over single photon sources external to the optical cavities. In this setting, we need to take into account the stochastic nature of the reflection and absorption of photons by the cavities. This situation cannot be described by a single-mode and purely Hamiltonian model. Externally driven optical cavities have, of course, long been understood in quantum optics however typically the external fields are coherent or thermal. Here we will introduce new techniques for dealing with the non-stationary input fields that correspond to single photon sources rather than coherent or thermal sources.
The specific model of the bosonic control field we propose is based on an optomechanical system of two coupled cavity modes with an interaction strength that depends upon a mechanical displacement coordinate, although other models are possible, e.g. a Raman atomic memory. We will model the interaction between the two optical modes and the mechanical resonator in terms of the same third order bosonic Hamiltonian discussed in equation (4). Let a 1 , a 2 be the annihilation operators for the optical fields in two cavity modes with resonant frequencies ω 1 , ω 2 respectively, while b is the annihilation operator for a mechanical resonator with resonant frequency ω m . The Hamiltonian for this optomechanical system can be written as [38] We now move to an interaction picture for both optical modes and the mechanical mode.
After the rotating wave approximation, the interaction Hamiltonian in the interaction picture including only the resonant terms is where we have assumed the resonance condition ω 2 = ω 1 + ω m . We further assume that the cavity modes are coupled to a single input/output channel.
A nice feature of this model is that the optomechanical interaction can be configured to turn the mechanical element into a Raman quantum memory by choosing cavity-1 to be driven by a strong coherent pulse. In the scheme presented here we can exploit this feature to prepare the mechanical system in various states, for example, Fock states or coherent states of varying amplitude. This mechanical coherent state preparation is explained in more detail in Appendix A.
Once a mechanical state, say a coherent state, has been loaded into the mechanics, we can then inject single photon states into the optical cavities. This interaction is then described as a controlled beam splitter interaction between the optical modes controlled by the quantum state previously stored in the mechanics. We then repeat this process to do the interferometry so that, at each step, before injecting the single photons, we need to reset the mechanics in vacuum state (by active cooling) and then load it with a coherent state. As reported in the state of the art experiments with PhC optomechanical systems, the mechanical thermalization rate, γ mnm , is three orders of magnitude slower than the optical damping rate, κ [45,46]. Therefore, at each trial, we can assume that we detect the photons before the mechanical resonator is damped and we neglect the mechanical damping in this work.
The total irreversible dynamics of the optomechanical system is given by the master where the superoperator D is defined by The respective input and output fields for each cavity are related to the intra-cavity fields by a j, If the mechanics begins in a coherent state |β , we can make a canonical transformation (a displacement of the mechanics amplitude) as in section II to obtain One might worry if it is valid to treat the dissipative terms for the field as if there was no coherent interaction whenḡ >> 1. The coherent interaction will lead to normal mode splitting of the cavity fields which can indeed alter how they are coupled to the dissipative environment. However, if the local cavity modes are coupled to independent baths (as we assume), with no cross correlations, also flat enough spectral density, and κ 1 ≈ κ 2 , the normal modes are damped at the same rate as the local modes.
The mechanical system can be prepared in different quantum states by using the mechanical subsystem, as a kind of Raman quantum memory for light. We will assume that, before every preparation step, active cooling is used to prepare the mechanics in the ground state. A strong optical field pulse is directed into the input of one of the cavities to give a good beam splitter interaction between the other cavity and the mechanical element.
A strong optical coherent field pulse is directed into one of the input optical waveguides, say mode-1, to implement a beam splitter interaction between mode-2 and the mechanical mode. For example, a coherent pulse on the input to cavity-2 can then be transferred to a coherent excitation of the mechanics while a single photon pulse input to cavity-2 will be stored as a Fock state in the mechanics. In this protocol, the mechanical degree of freedom is acting as a quantum memory [42]. We thus have the ability to explore the transition from quantum to classical control described in the first part of this paper. Further details on this preparation stage are discussed in Appendix A.

V. MECHANICALLY CONTROLLED INTERFEROMETRY
Our objective here is to configure the optomechanical system to act as a controlled beam splitter in an interferometer. We will assume that the mechanical system has been prepared in a coherent state |β b (see Appendix A). We will then take the input fields a j,in (t) to be multi-mode single photon states and perform optical interferometry via a MZ interferometer or HOM interferometer, each using a mechanically controlled beam splitter in place of a conventional beam splitter. These states are injected into one or both of the input modes to each cavity depending the kind of interferometer (MZ or HOM). Thus the total initial state is where |ψ i,in is the state of the input field.
We now need to find the operating conditions so that the optomechanical system can function as a beam splitter port in an interferometer.

A. Semiclassical limit: open cavities
As we demonstrated in section II B, the semiclassical limit is obtained when the mechanics is prepared in a coherent state with large coherent amplitude and the coupling constant, g, is small, while the effective coupling,ḡ = βg, is constant. We now consider this limit for the case of cavities driven by external single photon sources. We can then compute the visibility of one and two-photon interferometry and how it depends on dephasing corrections that appear in equation (19) due to entanglement between the optical and mechanical subsystems.
Assume that each cavity is driven by single photon pulse states with wavepacket envelope functions ξ(t), η(t) for the input to cavity a 1 and a 2 , respectively, and that the coupling between the cavities is given by the first term in the Hamiltonian in equation (14), the semiclassical approximation. Note that we will assume that the carrier frequency of each single photon pulse is resonant with the respective cavity into which it is injected. We do not explicitly see the carrier frequencies here as we are already working in an interaction picture. We further assume the symmetric case for which κ 1 = κ 2 = κ. In the semiclassical regime, we use the quantum Langevin equations for the optical fields [47,48] in which the amplitude functions for single photon state inputs in a 1,in (t) and a 2,in (t) are respectively given by ξ(t) and η(t). The solution to these linear equations is where A(t) = e −κt/2 cos(ḡt), B(t) = −ie −κt/2 sin(ḡt), C(t) = e κt/2 cos(ḡt) and D(t) = ie κt/2 sin(ḡt).
We can now derive the effective transmission and reflection coefficients when only one photon is incident on the system. These are defined by For the single photon with pulse shape ξ(t) = √ γe −γt/2 , resulting from the decay of a photon from a cavity, these are given by where γ is the single photon bandwidth. Figure

B. One photon interferometry: Mach-Zender interferometer
We insert a controlled beam splitter of the type described before by Hamiltonian (4) into the output beam splitter of a MZ interferometer, see figure 3. We inject a single photon with an exponentially decaying shape, ξ(t) = √ γe − 1 2 γt , into the interferometer through the port containing cavity-1. Note that the carrier frequency of this pulse needs to be set equal to the resonance frequency of cavity-1. We further use dimensionless units assuming the cavity damping rate κ = 1 in numerical simulations. The initial input state to the optomechanical beam splitter after passing the first beam splitter is We use the solutions to the Langevin equations (50) given in relations (51) to calculate the detection probability in t to t + dt at the upper detector D 1 P u (t : t + dt) = a † 1,out (t)a 1,out (t) dt.
This probability versus detection time and phase shift is plotted in figure 4. For κt ≤ 1 the decrease in P u is due to the transmission of a photon which has not interacted strongly with the mechanics. This is evident because the decay of P u follows ξ(t) ∝ e −γt/2 . In figure   4, it appears that the maximum visibility of the fringes occurs at κt ≈ 3, but this can be deceiving. For this reason we use P u to calculate the visibility of the interference pattern at each detection time which is given by where P max u (P min u ) is maximized (minimized) over the phase shift φ.
For the fully quantum mechanical description of the system, we use the unconditional where H is the Hamiltonian given in the equation (4), L i = √ κ i a i and the superoperator L is defined by The dynamics is reduced to solving the hierarchy of equations for the operators ρ m,n;p,q .
These act on the joint Hilbert space of the system and the input fields. The subscripts m, n refer to the Fock basis for the input to cavity-1 described by the wave packet ξ(t) while p, q refer to the Fock basis of the input to cavity-2 described by the wave packet η(t). As each input has, at most, one photon, the indices are restricted to the values 1, 0. For example, if we had a single photon input at each cavity we would need to solve for dρ 1,1;1,1 which couples all the way down to dρ 0,0;0,0 in the hierarchy of coupled differential equations.
(60) Therefore, we solve the hierarchy of differential equations produced by master equation (57) for ξ(t) = η(t) = √ γe − 1 2 γt . We need the solutions for ρ 1,1;0,0 (t), ρ 0,0;1,1 (t), ρ 0,1;1,0 (t) and ρ 1,0;0,1 (t) to calculate the dynamical state of the optomechanical system given by equation (60). When we use the Fock state master equation approach, a different phase convention to the input-output relation (46) is used (see section five of [48]) such that we have  To calculate the detection probability at the top detector, D 1 , which is defined in equation (55), one also needs the action of the operators a 1,in (t) and a 2,in (t) on two mode Fock states We then use equation (56) to calculate the visibility of the interference pattern for different values of the coherent state amplitude shown in figure 5. This figure demonstrates that as β increases, the corrections due to the first and higher order terms in g, which was discussed in section II, become negligible and when β is large enough, we recover a semiclassical interaction without any entanglement between the optical and mechanical degrees of freedom.
In practice, photo detector operates with a finite integration time. Therefore, it is more convenient to integrate over time to calculate the detection probability at D 1 as which gives a detection probability and an interference visibility independent of the detection time as one would expect in an experiment. This visibility is plotted in figure 6 versus coherent state amplitude prepared in the mechanics. This figure shows that by enhancing β, the visibility saturates to the value obtained in the semiclassical limit. The interference visibility of a MZ interferometer can be used as a sign to show the transition from quantum control to classical control that is obtained for a certain value of β.

C. Hong-Ou-Mandel interferometer
The scheme for our system working as a beam splitter inside a HOM interferometer is shown in figure 7. We send one photon to each of the modes a 1 and a 2 . The single photons are specified by the same amplitude function except one is time shifted with respect to the other and, as before, we assume that they have carrier frequencies resort with their respective cavities. We can then use differential equations (50) together with the input-output relation (46) to analytically calculate the probability of the joint photon counting at D 1 and D 2 in the semiclassical regime [7] which is defined as In the quantum regime, one way to calculate this two-time correlation function is to use the quantum regression theorem, for which one needs to solve the unconditional master equation.
However, for this two-mode, two-input photon case, this becomes complicated. Another way is to numerically simulate a HOM experiment using the stochastic theory of quantum jumps.
We choose the latter approach in this work, the details for which will be given later in this section. Before that, we start with a simpler calculation to give some physical insight into testing the quantum to classical control by employing a HOM interferometer.
We consider the physically idealistic case of coincidence detection at a specific detection time t by calculating the coincidence detection rate C(t, τ ) = κ 1 κ 2 a 1 (t) † a 1 (t)a 2 (t) † a 2 (t) .
This expectation value can be computed using the Fock state master equation (57) as This coincidence rate is plotted in figure 8 for which the HOM visibility in the semiclassical regime is 1 and then plot the coincidence rate versus the time shift between the input photons for different values of coherent state amplitude, β, changing from a quantum regime, β = 1, to very strong amplitudes, as can be seen in figure 8(b). One feature we observe in this figure is the asymmetry in the HOM dip in the quantum regime, which arises from the asymmetry in interaction Hamiltonian given in equation (4). By increasing β, this asymmetry is gradually removed since as we increase β, there is a gradual transition to the semiclassical regime with a symmetric interaction Hamiltonian between the optical modes. This figure also suggests that the change in the HOM dip can be used as a measure of the transition from the quantum control regime to the classical control regime.
We calculate the visibility of the HOM interference pattern as which gives the worst case visibility for each curve. In the next step, we perform the calculation using the more realistic definition of the joint detection probability given in equation (65). As discussed earlier, we perform a Monte-Carlo simulation using the stochastic version of the Fock state master equation to simulate the HOM interference which shows the ratio of coincident photo-detections over the total number of measurements versus the time shift, (τ ). We need to model the conditional evolution of the system. Following the same procedure as introduced for unconditional Fock state master equation [49], we derive the conditional master equation (for more details see [51]) describing the dynamics of the system given vacuum detection in both modes up to time t d dtρ whereρ (0 1 ,0 2 ) m,n;p,q (t) is the conditional un-normalised state of the system in which n i in the superscript (n 1 , n 2 ) is the number of counts at detector D i . The top level generalized density operatorρ (0 1 ,0 2 ) 1,1;1,1 (t) is the physical state of the system and is used to calculate the normalization factor: Tr[ρ (0 1 ,0 2 ) 1,1;1,1 (t + dt)], which is in fact the probability for a vacuum detection occurring in the time interval (t, t + dt] The conditional state of the system given that one photon is detected at D 1 in the time interval (t, t + dt], should be updated as ρ (1 1 ,0 2 ) m,n;p,q (t + dt) = dt L 1 ρ m,n;p,q (t)L † 1 + √ mn|ξ(t)| 2 ρ m−1,n−1;p,q and for a count occurring at D 2 in t to t + dt we havẽ ρ (0 1 ,1 2 ) m,n;p,q (t + dt) = dt L 2 ρ m,n;p,q (t)L † 2 + √ pq|η(t)| 2 ρ m,n;p−1,q−1 The associated normalization with the states given in equations (70) and (71) gives the probability for a photo-detection occurring in the time interval (t, t + dt] at detectors D 1 and D 2 , respectively We perform the two-jump Monte-Carlo simulation in four steps as follows: (1) start with the optomechanical initial state |ψ(0) = |0 1 |0 2 |β b and inject two single photons, with a time shift τ , to the cavity inputs.
If P (0 1 ,0 2 ) (t : t + dt) < rand, a jump occurs and we choose a second random number rand J to decide if the jump occurs in mode one or in mode two. If If m,n;p,q (t + dt) P (0 1 ,1 2 ) (t : t + dt) .
(3) We repeat step 2 until we have detected both photons. (4) We repeat steps 1 to 3 for a large number of trajectories. We have demonstrated that, when the mechanics is prepared in a deep quantum state, the controlled beam splitter instantiates a kind of optical mechanical Stern-Gerlach interferometer for an optical qubit (one-photon case) and qutrit (two-photon case). We have shown how increasing the degree of coherent excitation in the mechanical resonator leads to a decrease in the entanglement between the optical and mechanical degrees of freedom and further show how this may be monitored using HOM interferometry of the input optical photons. In figure 5, we see that the minimum visiblity for normalised detection times κt > 1, is sensitive to the amplitude of the mechanics coherent state. Specifically the visibility varies rapidly when the mechanics is acting as a quantum controller i.e. |β| < 2. When |β| ≥ 2 the mechanics is essentially classical. Similar conclusions can be drawn from figure 9. We see G (2) (0) varies rapidly for |β| < 2. Both of these effects are therefore signatures that the mechanics is behaving as a genuine quantum controller. This decrease in entanglement is explained in terms of the Stern-Gerlach analogy by the gradual loss of which-path information stored in the mechanical resonator. Further, these effects could be used as a weak force sensor if the weak force drives the coherent excitation of the mechanical resonator.
Given the ability to prepare the mechanical degree of freedom in coherent states of varying amplitude, this model demonstrates the emergence of classical control from an underlying quantum mechanical model.

APPENDIX A: PREPARATION OF THE MECHANICAL SYSTEM
The mechanical system can be prepared in a coherent state in two ways. In both methods, first a laser cooling scheme prepares the mechanical oscillator in the ground state. First method is to apply a classical resonant force to the mechanics to drive it to a steady state which is a coherent state. Second approach is based on the mechanical degree of freedom operating in a quantum memory mode [42]. In this approach, we drive one of the optical modes by a strong continuous coherent field to implement a beam splitter interaction between the mechanics and the other optical mode. Then we send a strong coherent pulse to the second optical mode. This coherent field can then be transferred to a coherent excitation of the mechanical mode as a result of the beam splitter interaction between the mechanics and optical mode-2. In both approaches, we have the potential to prepare the mechanics in coherent sates with different amplitudes, β. Below we study the latter method in more details.
Suppose we wish to load a coherent state into the memory. In that case the input to both optical cavities are coherent time dependent pulses. The input pulse to cavity-1 will be taken to be a very strong coherent pulse and we will refer to this as the read/write (R/W) pulse. The input R/W pulse is assumed to be in a coherent state with complex amplitude E(t) which is an external field to the cavity so the pulse intensity, |E(t)| 2 , must have units of flux (s −1 ). We now make a canonical transformation where α(t) is the time dependent complex field amplitude of the control pulse inside the cavity. The interaction Hamiltonian is then written as In order to operate as a quantum memory we would like R/W cavity field (a 1 ) to respond quickly to the input pulse, E(t) so that α(t) is slaved to E(t) (the adiabatic approximation) In order to swap the state of the cavity mode-2 to the mechanics, the strong control pulse should be always on over the time required to write to the memory. In this case, α(t) is very large over the interaction time between the signal and the memory, so with a good approximation we can ignore the second term in equation (78) compared to the first term.
The output fluctuation field (i.e. the output field minus the coherent component) is thus given by If we assume that g/κ 1 << 1, the output R/W field is virtually the same as the input R/W field, i.e. coherent, and the entanglement with the other degrees of freedom can be neglected. It is possible to account for the residual entanglement between the R/W modes in the adiabatic approximation by the master equation, in the interaction picture, where The second last term describes a correlated quantum jump via the jump operator a 2 b † wherein the memory is accidentally excited and one photon is absorbed from the cavity mode-2. In order to use this system as a quantum memory we require that over the time T of the RW pulse where A = T 0 α(t)dt is the pulse area, so that we can neglect the residual entanglement described by the second term in equation (81) over the times required to write or read to the memory.
We now assume that cavity mode-2 is continuously driven by a coherent driving field, with amplitude , resonant with the cavity mode. The time dependent interaction Hamiltonian for reading and writing to the memory is The corresponding quantum stochastic differential equations for the memory are Prior to the R/W pulse switching on, the cavity will have reached a steady state which is in fact a coherent state |α 0 with coherent amplitude We define a change of variable according to Thus θ(t) is a sigmoidal function between 0 and 1 and centered on the R/W pulse.
We now assume that the temporal width of the R/W pulse, T , is sufficiently short that κ 2 T << 1. This means that over the time that the R/W pulse is significantly different from zero we can neglect the decay of the cavity. In that case, we can approximate the dynamics over the time of the pulse by where the dimensionless coupling constant is given byg = gA and with initial condition set as |α 0 2 ⊗ |0 b . The solution to these equations is given by a unitary transformation with generator G =g(a † b + ab † ). If we choosegθ = π/2 we find that the initial state thus evolves so that we have swapped the steady state coherent amplitude in the optical cavity into the memory, with a π/2 phase change. We thus find that at the end of the first step of the protocol we have prepared the memory mode b in the coherent state |β b where β = −2 /κ 2 .
At this point in time we turn off the driving field on cavity-2 allowing it to relax back to the vacuum state. This completes the first step of the protocol. The light detected in the reflection/transmission port of the effective beam splitter comprises of two parts as shown in figure 7: (1) the field that bounces off the cavity and directly moves from the source to the detector without entering the cavity (dashed blue line in figure  7) and (2) the field which is detected from within the cavity (solid blue line in figure 7). To characterize this effective beam splitter having this in mind, we use the cavity beam splitter in two model system interferometers: a classical MZ interferometer and a quantum HOM interferometer. We wish to study the visibility of the interference pattern to obtain some intuition as to how this effective beam splitter can be compared to a conventional beam splitter.

A. Characterization of the beam splitter in a Mach-Zender interferometer
We inject a single photon with an exponentially decaying shape into the interferometer already described in figure 3. The visibility of the interference pattern is given by the relation where is the probability to detect a single photon at any time in the upper detector D 1 . The input state incident on the effective beam splitter (second beam splitter shown in figure 3) after passing the conventional 50/50 beam splitter (first beam splitter shown in figure 3) is |ψ(0) = 1 √ 2 (e iφ |1 a 1 , 0 a 2 + |0 a 1 , 1 a 2 ).
Therefore, P u becomes P u = 4κg (4g 2 − κ(κ + γ)) sin(φ) (4g 2 + κ 2 ) (4g 2 + (κ + γ) 2 ) This relation gives the typical interference pattern for a MZ interferometer shown in figure   10(a). The interference visibility is given by v = | 8κg (4g 2 − κ(κ + γ)) (4g 2 + κ 2 ) (4g 2 + (κ + γ) 2 ) |. visibility is one. The red dashed line in figure 10(b) shows the parameter regime where according to figure 2, the transmission is 0.5. In this case, to compare the cavity beam splitter with a conventional 50/50 beam splitter, we need to achieve a visibility as close as possible to 1. This figure shows that to achieve a visibility greater than 0.9, in the case of T = 0.5, one needs to work in regimes where κ/γ 1. However, one can see that for values of T other than T = 0.5, the overlap of the corresponding transmission contour given in figure (2) with the expected visibility value can be achieved in regimes where κ/γ 1 or κ/γ < 1.
In the next section, we use the effective beam splitter in a HOM interferometer which demonstrates a fully quantum phenomena.