Entropy production in continuously measured Gaussian quantum systems

The entropy production rate is a key quantity in nonequilibrium thermodynamics of both classical and quantum processes. No universal theory of entropy production is available to date, which hinders progress toward its full grasping. By using a phase space-based approach, here we take the current framework for the assessment of thermodynamic irreversibility all the way to quantum regimes by characterizing entropy production—and its rate—resulting from the continuous monitoring of a Gaussian system. This allows us to formulate a sharpened second law of thermodynamics that accounts for the measurement back action and information gain from a continuously monitored system. We illustrate our framework in a series of physically relevant examples.


INTRODUCTION
Entropy production, a fundamental concept in nonequilibrium thermodynamics, provides a measure of the degree of irreversibility of a physical process. It is of paramount importance for the characterization of an ample range of systems across all scales, from macroscopic to microscopic [1][2][3][4][5][6][7][8][9][10][11] . The lack of a continuity equation for entropy prevents entropy production from being a physical observable, in general. Its quantification must thus pass through inference strategies that connect the values taken by such quantity to accessible observables, such as energy [12][13][14] . This approach has recently led to the possibility to experimentally measure entropy production in microscopic 15 and mesoscopic quantum systems 16 , and opened up intriguing opportunities for its control 17 . Alternative approaches to the quantification of entropy production are based on the ratio between forward and time-reversed path probabilities of trajectories followed by systems undergoing nonequilibrium processes [18][19][20] .
A large body of work has been produced in an attempt to overcome the lack of generally applicable theories of entropy production 11,21 . Remarkably, this has allowed the identification of important contributions to the irreversibility emerging from a given process stemming from system-environment correlations 17,22,23 , quantum coherence [24][25][26] , and the finite size of the environment 23,27 .
Among the directions of potential further investigations, a particularly relevant one is the inclusion of the back action, resulting from measuring a quantum system. Measurements can have a dramatic effect on both the state and the ensuing dynamics of a quantum system: while the randomness brought about by a quantum measurement adds stochasticity to the evolution of a system, the information gained through a measurement process unlocks effects akin to those of a Maxwell daemon 28,29 . Both such features are intuitively expected to affect the entropy production and its rate (cf. Fig. 1).
The ways such modifications occur have been the focus of some attention recently. Elouard et al. and Manikandan et al. 29,30 tackled the problem by focusing on the stochastic energy fluctuations that occur during measurements, while refs. [31][32][33][34][35][36][37][38][39] addressed the case of weak quantum measurements of a system, which allowed for the introduction of trajectory-dependent work and heat quantifiers (cf. refs. 40,41 ). In line with a Landauer-like framework, Sagawa and Ueda focused on the minimum thermodynamic cost implied by a measurement, highlighting the information theoretical implications of the latter on the stochastic thermodynamics of a two-level system 42,43 , an approach that can both be generalized to general quantum measurements 44 and assessed experimentally 45 .
Here, we contribute to the quest for a general framework for entropy production and its rate in a general system brought out of equilibrium and being continuously monitored. We propose a widely applicable formalism able to identify the measurementaffected rate of entropy production, and the associated entropy flux to or from the environment that is connected to the monitored system. We unveil the thermodynamic consequences of measuring by way of both general arguments and specific case studies, showing that the entropy production rate can be split in a term that is intrinsically dynamical and one that is informational in nature. We show that, for continuously measured Gaussian systems, the entropy production splitting leads to a refined, tighter second law. We also discuss the possibility to control the nonequilibrium thermodynamics of a system through suitable measurements. We illustrate it by studying a thermal quench of an harmonic oscillator and a driven dissipative optical parametric oscillator.
Our approach paves the way to the assessment of the nonequilibrium thermodynamics of continuously monitored Gaussian systems-such as (ensembles of) trapped ions and quadratically confined levitated optomechanical systems-whose energetics will require tools designed to tackle the intricacies of quantum dynamics and the stochasticity of quantum measurements, which are currently lacking [46][47][48][49][50][51][52][53][54][55] .

RESULTS
Entropy rate of a continuously measured system The dynamics of a continuously measured Markovian open quantum system can be described by a stochastic master equation (SME) that describes the evolution conditioned on the outcomes of the continuous measurement [56][57][58] . Upon averaging over all trajectories, weighted by the outcomes probabilities, the stochastic part vanishes leaving a deterministic Lindblad ME for the system, whose dynamics we call unconditional.
In the unconditional case, the entropy rate can be split as _ S uc ¼ Φ uc þ Π uc with Φ uc (Π uc ) the unconditional entropy flux (production) rate 11 , with S uc an entropic measure. The second law of thermodynamics for the unconditional dynamics is encoded in Π uc ≥ 0. It should be noted that, choosing the widely used von Neumann entropy leads to controversial results, when the system is in contact with a vanishing-temperature thermal bath 59,60 . We will address this point again later on.
For the conditional dynamics, a similar splitting of the entropy rate can be obtained, although involving stochastic trajectorydependent quantities. Indeed, given that the conditional dynamics describes quantum trajectories in Hilbert space, the entropy rate and the entropy production are stochastic quantities. We are interested in the average of such stochastic quantities over all trajectories, i.e., where dS, dπ, and dϕ depend on the stochastic conditional state, and Π and Φ are the averaged conditional entropy production and flux rates. These quantities will in general differ from their unconditional counterparts because they depend nonlinearly on the state of the system. We now move on to explain in more detail their physical interpretation. Operationally, the conditional dynamics is obtained by continuously monitoring the system and recording the outcomes of the measurement. After repeating the experiments many times, and computing each time the stochastic entropy flux and entropy production rate, one finally averages these quantities over the stochastic trajectories of the system. Such average quantities are related to the state of the system conditioned on the outcomes of the continuous measurements. On the contrary, the unconditional dynamics is recovered by ignoring the outcomes of the measurements at the level of the state of the system. Thus, the state of the system, from which the statistics are inferred, corresponds to the average over the possible outcomes of the conditional state at each instant of time.
We aim to connect Π to the entropy produced by the system due to only the open system dynamics (Π uc ). We thus assume that the stochastic entropy flux is linear in the conditioned state of the system, i.e., E½dϕ=dt ¼ Φ uc . This is so in all those cases where the entropy flux is given by the heat flux from the system to an (equilibrium) environment at a reference temperature, a second relevant instance being when the entropy flux is associated to the occurrence of a quantum jump of the system 8 . To the best of our knowledge, no example of violation of this assumption has been reported in the literature so far. However, a formal proof of linearity is still missing. As we aim at a general framework that encompasses nonequilibrium states of the environment, here we do not necessarily identify the entropy flux rate with the heat flow rate to a thermal environment, while claiming for its linearity in the conditional state of the system. In what follows we show that, for Gaussian systems, this linearity can be explicitly proven. The same can be done for more general systems starting from a microscopic description of the system-environment interaction via a repeated collisions model 61 .
By comparing the splitting of the entropy rate for conditioned and unconditioned dynamics, we arrive at where the last term quantifies the entropic cost of continuously monitoring the system and, as Φ = Φ uc , it must then follow _ I ¼ E½dS=dt À dS uc =dt.
In order to further characterize the informational term _ I and, in particular, single out the entropy production and flux rates, we focus on open Gaussian systems subject to continuous Gaussian measurements. Such a class of systems and processes plays a substantive role in the broad panorama of quantum optics, condensed matter physics, and quantum information science in general. Gaussian measurements are some of the most widely used techniques in quantum labs, and their role in stochastic nonclassical thermodynamics is thus both interesting and physically very well motivated.
The Gaussian case calls for the use of powerful phase-space techniques, in conjunction with the adoption of the Wigner entropy as an entropic measure 59 , which allow us to unambiguously identify the entropy flux and production rates based on the dynamics of the system, without resorting to a thermal environment (at finite temperature) and bypasses some of the controversies linked to more standard von Neumann entropybased formulations 59 , thus going beyond any standard approach. It should be noted that, in some cases of continuously measured quantum Gaussian systems, e.g., homodyne detection of an optical mode, where the bath mode being monitored is effectively at zero temperature, there are no alternatives to the adoption of the Wigner entropy due to the unphysical divergences that plague the definition of entropy production and fluxes obtained by adopting the von Neumann entropy 59,60 . Nonetheless, consistently with classical stochastic thermodynamics, ref. 59 showed that the results obtained using the Wigner entropy agree with the von Neumann ones, and crucially with the classical ones, for systems interacting with thermal baths in the high-temperature limit. Finally, we would like to remark that refs. 62,63 made a step Fig. 1 Scheme of principle. a A system, prepared in an arbitrary state and being externally driven, interacts with an environment. The dynamics is associated with a (unconditional) rate of entropy production Π uc . b Continuous measurements alter the dynamics of the system, resulting in an entropy production rate Π that includes an information-theoretical contribution _ I determined by the amount of information extracted through the measurement.
forward to extend phase-space-based formulation of entropy production rate and flux to the case of non-Gaussian systems and dynamics, using the well-known Wehrl entropy defined in terms of the Shannon entropy of the Husimi function. All the considerations reported here can be generalized straightforwardly to the use of the Wehrl entropy.
Continuously measured Gaussian systems Solving the SME is in general a tall order. Luckily, the intricacy of such an approach is greatly simplified when dealing with Gaussian systems, as their description can be reduced to the knowledge of the first two statistical moments of the quadratures of the system. The SME can thus be superseded by a simpler system of stochastic equations. We consider a system of n modes, each described by quadrature operators ðq i ;p i Þ with ½q j ;p j ¼ i, and define the vector ;q n ;p n Þ. When restricting to Gaussian systems, the Hamiltonian is at most quadratic in the quadrature operators and can be written asĤ where H s is a 2n × 2n matrix, b is a 2n-dimensional vector accounting for a (time-dependent) linear driving, and Ω ¼ È n j¼1 iσ y;j is the n-mode symplectic matrix (σ y,j is the y-Pauli matrix of subsystem j). For an environment modeled by Lindblad generators that are linear in the quadratures of the system and the latter is monitored through Gaussian measurements, the dynamics preserves the Gaussianity of any initial state. In this case, the vector of average moments x ¼ hxi and the covariance matrix (CM) σ ij ¼ hfx i ;x j gi=2 À hx i ihx j i of the modes completely describe the dynamics via the equations 57,58,64 where dw is a 2ℓ-dimensional vector of Wiener increments (ℓ is the number of output degrees of freedom being monitored), A(D) is the drift (diffusion) matrix characterizing the unconditional open dynamics of the system, and χ(σ) = (σC T + Γ T )(Cσ + Γ) ≥ 0 is defined in terms of the 2ℓ × 2n matrices C and Γ that describe the measurement process (see ref. 57 and references therein for a detailed derivation of these equations). While the explicit form of such matrices is inessential for our scopes (cf. refs. 57,58,64 ), we highlight the fact that the drift matrix A can be decomposed as A = ΩH s + A irr , where the first term accounts for the unitary evolution and the second for diffusion. Notwithstanding the stochasticity of the overall dynamics, the equation for the CM is deterministic. Thus, σ(t) does not depend on the explicit outcomes of the measurement (i.e., the trajectory followed by the system), while it depends on the measurement carried out 58 . The dynamics of the corresponding unconditional quantities σ uc and x uc is matrix. This then implies χ(σ) = 0, so that one recovers the dynamical equation for the evolution of σ uc .
Entropy production rate and flux Equation (3) can be conveniently cast in the phase space as the continuity equation (cf. Supplementary Information) dW ¼ Àdiv½Jdt þ J sto ; where W ¼ e À 1 2 ðxÀxÞ T σ À1 ðxÀxÞ =ð2πÞ n ffiffiffiffiffiffiffiffiffiffi ffi det σ p is the Wigner function associated with the state of the n-mode system and we have introduced the deterministic phase-space current J, which can be divided as J = J rev + J irr , and its stochastic counterpart J sto . Here, J rev = ΩH s xW + bW encodes the contribution stemming from the unitary dynamics and J irr = A irr xW − (D/2)∇W accounts for the irreversible dissipative evolution. It should be noted that these currents are equal to the ones of the unconditional dynamics with the replacement W → W uc , where W uc is the Wigner function of the unconditional state obtained through the replacements σ → σ uc and x ! x uc . The stochastic term J sto = W(σC T + Γ T )dw depends entirely on the conditional dynamics, through σ and W, and the measurement strategy being chosen.
In order to characterize the entropy of the n-mode system, we adopt the Wigner entropy S ¼ À R Wln W d 2n x as our entropic measure. For Gaussian systems 65 S ¼ 1 2 ln ðdet σÞ þ k n ¼ Àln ðPÞ þk n ; with k n ;k n inessential constants that depends only on the number n of modes involved and P the purity of the state of the system, which for a Gaussian state reads P ¼ ðdet 2σÞ À1=2 . This also coincides with the Rényi-2 entropy 65 and tends to the von Neumann entropy in the classical limit of high temperatures. Let us note that the Renyi-α entropy for a generic N-mode Gaussian state is defined as S α ðρÞ ¼ 1 À Á α and σ i is the ith symplectic eigenvalues of the Gaussian state. A "classical limit" for such a quantity can be recovered by considering σ i ≫ 1, i.e., the "high-temperature limit". In these conditions, it is easy to see that the Rényi-α entropy reduces to S α ðρÞ ¼ Nlog α=ðα À 1Þ À Nlog 2 þ P N i¼1 log σ i . We see that, except for a α-dependent constant, this matches the von Neumann entropy.
As the Wigner entropy only depends on the CM of the system, its evolution is deterministic even for continuously measured system, a peculiarity of Gaussian systems. The same then holds true for the entropy rate given by In the unconditional case, the entropy rate is _ S uc ¼ Φ uc þ Π uc 11 , and both the unconditional entropy flux and production rates depend on the irreversible part of the phase-space current J irr . In the Supplementary Information accompanying this paper, we report expressions for these quantities written in terms of A irr , σ uc , and D. For a system interacting with a high-temperature thermal environment, Φ uc coincides with the energy flux from the system to the environment. Thus, this formalism generalizes the usual thermodynamic description in a meaningful manner.
For the continuously measured case, while Eq. (6) presents a deterministic quantity, both the entropy flux and production rate are inherently stochastic, as they depend on the first moments of the quadrature operators. Nonetheless, using Eq. (4), it is possible to single out the entropy production and flux rates as the quadratic and linear part of dS/dt in the irreversible currents, respectively. The entropy rate is thus written as dS ¼ dϕ x þ dπ x with dϕ x ; dπ x the conditioned trajectory-dependent entropy flux and production rates. It can be shown that, upon taking the average (E) over the outcomes of the measurements, E dϕ x =dt ½ ¼Φ uc , demonstrating that the linearity of the stochastic entropy flux in the state of the system is a property of Gaussian systems and does not need to be postulated, as shown in the Supplementary Information. Thus, on average, we can rewrite the entropy as _ As the entropy of the conditioned system is deterministic, we can write _ S ¼ _ S uc þ _ I , where the term _ I accounts for the excess entropy production, resulting from the measurement process. Indeed, by integrating the above expression, one finds I ¼ ln ðP uc =PÞ, showing that I quantifies the noise to be added to the conditional state to bring it back to its unconditional form. As, in general, we have P ! P uc , we gather that I 0. In fact, it can be further shown that I ¼ ÀIðX : XÞ 0; with I the classical mutual information between the phase-space position X in the unconditional case and the stochastic first moments X, which evolve according to the Itô equation in Eq. (3). The inequality is saturated iff σ = σ uc (see Supplementary Information for details).
A straightforward calculation based on Eq. (6) leads to where, as seen from Eq. (3), D − χ(σ) accounts for a modification to the diffusion matrix of the dynamics occurring due to the choice of measurement: the latter conjures with the environment and acts on the system so as to modify its diffusive dynamics. Equation (7) embodies the effects of continuous detection, which modifies the CM of the system and its dynamics. As for Eq. (2), we have Π ¼ Π uc þ _ I : This is the main result of this work. It connects the entropy production rate of the unmonitored open Gaussian system to the homonymous quantity for the monitored one via the informational term _ I . The second law for the unmonitored system Π uc ≥ 0 can now be used to obtain the refined second law for continuously measured Gaussian systems Π ! _ I , which epitomizes the connection between nonequilibrium thermodynamics and information theory, as pioneered by Landauer's principle. The degree of irreversibility of the dynamics being considered, which is associated with a change in entropy of the state of the system, is lower-bounded by an information theoretical cost rate that depends on the chosen measurement, and that is in general more stringent than that associated with the unmeasured dynamics. This echoes and extends significantly the results in ref. 43 , which were valid for discrete measurements and equilibrium environments.
Case study To illustrate our framework, we consider two relevant examples: a thermal quench and the driven dissipative optical parametric oscillator. In both cases, the system (either a driven harmonic oscillator or an optical parametric oscillator) is monitored by a single field mode in thermal equilibrium. We call n th the mean occupation number of such thermal state of the field, which is subjected to general-dyne measurements 57 . The system is coupled to the thermal field mode via an excitation-exchange interaction, wherex ¼ ðq;pÞ andx B represent the quadratures vector for system and bath, respectively. Calling H s the system Hamiltonian in the two cases, the SME describing the conditional dynamics of the continuously monitored system is written as 57 _ ρ ¼ Ài½H s ; ρ þ γðn th þ 1ÞD½âρ þ γn th D½â y ρ þ ffiffi ffi γ p H½âρdw; (9) where D½Ôρ ¼ÔρÔ y À ðÔ yÔ ρ þ ρÔ yÔ Þ=2, dw is a Wiener increment, and H½Ôρ ¼Ôρ þ ρÔ y À Tr½ρðÔ þÔ y Þρ. The last, stochastic term in Eq. (9) encodes the effect of the continuous monitoring of thep quadrature of the environment's mode (cf. ref. 58 ). Similar SMEs describe general-dyne measurements (cf. refs. 64,66,67 for the most general SME for bosonic systems and Markovian dynamics, and further details).
The two exemplary cases that we consider are (I) a driven harmonic oscillator described by H s ¼ ω=2 ðq 2 þp 2 Þ þ H drive , where H drive ¼ iEðâe iθ Àâ y e Àiθ Þ describes the driving by a pump of amplitude E and phase θ; (II) the optical parametric oscillator described by H s ¼ Àχ=2 ðqp þpqÞ. From now on we work in natural units and set ω = χ = 1. Further details on these examples and their description in the Gaussian framework can be found in the "Methods" section.
In Fig. 2, the behavior of the entropy production rate, entropy flux rate, and _ I is shown for both systems under either homodyne or heterodyne measurements. For example (I), we have chosen a thermal bath with 2n th + 1 = 100 and a displaced thermal initial state for the system with a larger initial temperature. The system is thus cooled down by the interaction with the environment. For the parametric oscillator in example (II), the thermal bath is chosen at zero temperature, the initial state is a squeezed vacuum state, and we also consider a small additive Gaussian noise so as to make the detection not ideal. Such additional noise makes the steady state different for different detection strategies.
The behavior of the information rate _ I in both examples is consistent with expectations (cf. Fig. 2a, b, d, e). It starts at an initially large negative value in light of the nonequilibrium nature of the initial state, but then vanishes as the system approaches the steady state of the conditional dynamics. In fact, at the steady state no additional information on the system is acquired with respect to the one acquired up to that moment. This does not mean, however, that the continuous measurement is unnecessary at the steady state. Indeed, the continuous monitoring sustains the steady state, which would otherwise Fig. 2 Numerical example. a-c Thermal quench of a harmonic oscillator interacting with an environment in thermal equilibrium (mean occupation number n th such that 2n th + 1 = 100) and subjected to homodyne and heterodyne measurements. The initial state of the harmonic oscillator, which is externally driven by a pump of amplitude E, is thermal with an energy ten times larger than the environment. a, b Π uc (dashed blue curve), Π (solid red curve), Φ (black dotted curve), and _ I (dot-dashed green curve) for homodyne (monitoring of the system's momentum quadrature) and heterodyne detection. c I when homodyning the position and momentum quadratures of the system (dot-dashed green curve and dotted red curve, respectively), and heterodyne measurements (dashed blue curve). d-f Optical parametric oscillator in contact with an external mode in thermal equilibrium (n th = 0), and subjected to homodyne and heterodyne measurements with additional Gaussian noise. d and e are analogous to a and b. f I for various detection schemes (cf. "Methods" section).
evolve toward its unconditional counterpart effectively causing a loss of information 61,68 .
It should be noted that, after an initial negative phase, _ I becomes positive in both examples, consistently with Fig. 2c-f. While _ I takes both positive and negative values, the regions where _ I > 0 show how our refined second law offers a more stringent constraint than the standard one.
Finally, by comparing Fig. 2c, f, we note a stark qualitative difference between the informational terms resulting from the dynamics of a harmonic oscillator subjected to a thermal quench and the optical parametric oscillator. Indeed, the inspection of the results for the thermal quench shows that I ! 0 at the steady state (cf. Fig. 2c). This is justified by the fact that the steady state of the conditional and unconditional dynamics is the same irrespective of the measurement, and asymptotically no extra information from the measurements is acquired with respect to the unconditional case. In contrast, Fig. 2f, which refers to the parametric oscillator, shows different long-time behavior of I for different measurements due to the additive Gaussian noise that is introduced by the choice of detection strategy. This makes the steady state of the conditioned dynamics mixed, with a purity dependent on the measurement and, in turn, the measurement outcomes remain informative also in the asymptotic regime.

DISCUSSION
We have characterized the entropy production rate of continuously monitored nonequilibrium Gaussian quantum processes in terms of the effects induced by measurement. This led us to the formulation of a refined second law reminiscent of Landauer's principle, and in line with previous results valid for discrete measurements and systems. However, it should be noted that, the particular form of this refined second law is tailored to Gaussian dynamics and the Wigner entropy as an entropic measure.
On one hand, our results shine light on the emerging field of information thermodynamics, highlighting the tight fundamental link between nonequilibrium thermodynamics and information gains. On the other hand, they offer a general way to define the entropy production and flux rates for Gaussian systems, thus overcoming the limitations of previous approaches.
Our framework will be invaluable to analyze and characterize the nonequilibrium dynamics of experimental systems of strong current interest. In particular, levitated quantum optomechanics offers fertile ground for the application of our formalism 48,49,[51][52][53][54][55]68 .

METHODS
Here, we give some additional specifics of the two examples considered in the main text, i.e., the thermal quench of a simple harmonic oscillator and the optical parametric oscillator coupled to a thermal bath. In doing so, we follow closely 58 where the example of the optical parametric oscillator is described in details. The bath is described, in both our examples, by the initial single mode CM σ B ¼ ðn th þ 1=2ÞI. The excitation-exchange interaction Hamiltonian, also common to both the examples, is given bŷ where we have introduced the quadratures of the bathx B . A generaldyne, noisy measurement is described, in the Gaussian formalism, by giving the CM corresponding to the state over which one project. For an ideal general-dyne measurement on the single output mode, the state is pure and the CM is given by the 2 × 2 matrix where R[φ] is a rotation matrix and s > 0. Note that, given the form of the excitation-exchange interaction Hamiltonian, s = 0 corresponds to homodyne detection of the x-quadrature of the output mode, and thus the indirect monitoring of the p-quadrature of the system, s = 1 corresponds to heterodyne detection on the output mode, and s = ∞ to indirect monitoring of the x-quadrature of the system (homodyne detection of the p-quadrature of the output mode). In order to account for noisy measurements, the CM σ m needs to be modified by acting on it with the dual of a CP Gaussian map. The reason for this stems from the fact that a noisy measurement can be seen as the action of a CP Gaussian map on the state of the system previous to an ideal general-dyne measurement 58 . For our simple case, the CM σ m for a general-dyne detection with efficiency η ∈ [0, 1] and additive Gaussian noise Δ is given by Given the measurement CM and the interaction Hamiltonian, we can obtain the measurements matrices Γ, C. For both our examples, these are given by It should be noted that, in the limit of η → 0 and/or Δ → ∞, i.e., for zero efficiency of the detectors and/or infinite additive Gaussian noise, the conditional dynamics converges to the unconditional one. This is intuitive, given that in both these situations no information about the system is acquired by the inefficient/very noisy detection scheme. However, this highlight also another interesting aspect of this type of noisy general-dyne detection: no matter how large the additive noise or how inefficient the detectors, the conditional dynamics will never increase the uncertainty on the state of the system more than the unconditional dynamics.
Finally, we specify the Hamiltonians of the two systems that we consider and we explicit the parameters chosen in Fig. 2. For the thermal quench of the harmonic oscillator, we chose a thermal occupation number of the bath such that 2n th + 1 = 100. The Hamiltonian of the system, comprising a quadratic term and a linear drive, is given bŷ where d ¼ Àð ffiffi ffi 2 p E cos θ; ffiffi ffi 2 p E sin θÞ and the driving term correspond, in terms of annihilation and creation operators of the system oscillator, tô H drive ¼ iEðâe iθ Àâ y e Àiθ Þ: Here as in the second example, we work in natural units. Furthermore, we set ω = 1 so that all other quantities appearing are in units of ω. In Fig. 2, we have chosen θ ¼ 0; E ¼ 2; and γ = 1/10. For the measurement, we chose the rotation matrix to be the identity, i.e., φ = 0, and we consider an ideal measurement Δ = 0, η = 1, with s = {0, 1, ∞}. Furthermore, the initial mean values of the oscillator quadratures is xðt ¼ 0Þ ¼ ð1; 1Þ. The drift and diffusion matrices are readily obtained as For the optical parametric oscillator, we chose the bath in the vacuum state n th = 0, which is a reasonable assumption for optical modes. The (effective) Hamiltonian of the system is given bŷ The unconditional dynamics of the oscillator is stable only if γ > 2χ. The drift and diffusion matrices are given by D ¼ γðn th þ 1=2ÞI: (20) Note that, as expected, only the reversible part of the drift matrix (A) changes with respect to the previous example. In Fig. 2, we set χ = 1 so that all other quantities appearing are in units of χ. We chose the coupling A. Belenchia et al.
constant to be γ = 2.001, i.e., the parametric oscillator is close to the instability point γ = 2χ. The initial expectation value of the quadratures is chosen in the origin of phase space. For the measurement, we chose the rotation matrix to be the identity, i.e., φ = 0, and we consider an efficient measurement (η = 1) with a small additive noise Δ = 0.1. As before s = {0, 1, ∞}. We add Gaussian noise in such a way to have an unconditional dynamics which, for different detection schemes, leads the system to steady states with different purities. It should be noted that for a thermal bath at zero temperature and ideal general-dyne measurements, the steady state of the conditional dynamics would always be a pure state (in contrast to the unconditional steady state which is always a mixed state).

CODE AVAILABILITY
Codes are available upon request from the authors.