#### 2.1. Hamiltonian Formalism and Open System Dynamics

In the following we introduce the formalism for the BEC–cavity system, illustrated in

Figure 1, where the photons are leaking out of the cavity through the cavity mirrors. In the rotating wave approximation (and in the rotating frame of the pump field) we write the Hamiltonian for the closed system of two-level atoms and the cavity in the second-quantized form [

21,

22,

23]

where the Hamiltonian terms for the atoms,

${H}_{A}$, for the cavity,

${H}_{C}$, and for the atom–cavity coupling,

${H}_{CA}$, are written as

Here

${\omega}_{c}$ and

${\omega}_{a}$ denote the cavity and atom resonance frequencies, respectively. An essentially arbitrary external trapping potential is denoted by

$V\left(x\right)$. For the atomic fields

${\widehat{\Psi}}_{g\left(e\right)}\left(x\right)$ annihilates an atom in the ground (excited) state at position

x, while

$\widehat{a}$ annihilates a photon from the single cavity mode. The atom–cavity coupling is described by

The cavity field is pumped along the cavity axis at a rate η and via a transverse beam of profile $h\left(x\right)$. In practice, we consider situations where only one of the two driving mechanisms is used.

**Figure 1.**
Schematic of the BEC–cavity system. The single-mode cavity can be pumped on axis at rate η, while the BEC inside the cavity can be pumped directly by a transverse beam of profile $h\left(x\right)$. The photons leaking from the cavity (at a rate $2\kappa $) are continuously monitored. The atoms are subject to an external trapping potential $V\left(x\right)$ that is illustrated by the black line. Here the potential is shown mimicking a superposition of a periodic optical lattice and a harmonic trap, but generally the potential can take an essentially arbitrary form.

**Figure 1.**
Schematic of the BEC–cavity system. The single-mode cavity can be pumped on axis at rate η, while the BEC inside the cavity can be pumped directly by a transverse beam of profile $h\left(x\right)$. The photons leaking from the cavity (at a rate $2\kappa $) are continuously monitored. The atoms are subject to an external trapping potential $V\left(x\right)$ that is illustrated by the black line. Here the potential is shown mimicking a superposition of a periodic optical lattice and a harmonic trap, but generally the potential can take an essentially arbitrary form.

We assume that the atoms are tightly confined in a 1D cigar-shaped trap that is oriented along the cavity axis and neglect any density fluctuations of the atoms along the radial directions of the trap. The interatomic interactions for the ground state atoms are therefore represented by a 1D interaction strength $U=2\hslash {\omega}_{\perp}{a}_{s}$, where ${a}_{s}$ denotes the s-wave scattering length and ${\omega}_{\perp}$ the radial trapping frequency for the atoms (the confinement perpendicular to the cavity field). The trapping potential along the axial direction is ${V}^{\left(j\right)}\left(x\right)$, where j refers to either the excited- or the ground state atoms. The detunings between the pump frequency ${\omega}_{p}$ and the cavity and the atomic resonance frequencies are denoted by ${\Delta}_{pc}={\omega}_{p}-{\omega}_{c}$ and ${\Delta}_{pa}={\omega}_{p}-{\omega}_{a}$, respectively.

We will simplify the system description by considering a large detuning limit

${\Delta}_{ca}\gg \kappa $ (we also assume that

${\Delta}_{pa}$ is large so that the spontaneous emission to the modes other than the cavity mode may be ignored), where the excited state atomic field may be adiabatically eliminated. The dynamics may then be obtained from the effective Hamiltonian

Here ${H}_{0}$ now only refers to the ground state atoms and we drop the corresponding subscript.

So far, we have only described the closed system of the driven BEC and the cavity. The open-system description follows from the fact that cavity photons are leaking through the cavity mirrors at a rate

$2\kappa $. In order to analyze a continuous measurement process of photons outside the cavity, we will assume that all photons leaked out of the cavity are detected. The density operator

${\rho}_{\mathrm{tot}}$ for the BEC–cavity system then evolves according to the master equation

where the superoperator

$\mathcal{L}\left[\widehat{O}\right]$ acting on

$\widehat{O}$ is defined by

The next level of simplification for the dynamics can be obtained by also adiabatically eliminating the cavity light mode. This can be done in the bad cavity limit

$\kappa \gg N{g}_{0}^{2}/{\Delta}_{pa}$. The elimination is performed for the open system dynamics by means of unitary transformations, but we give here only a simple heuristic explanation of the derivation (for a more rigorous elimination, the reader is referred to [

15]). The equation of motion for

$\widehat{a}$ reads

The cavity field is then eliminated by setting

We expand the denominator in terms of the small parameter

${\tilde{\Delta}}_{pc}/\kappa $ (valid when

$\kappa \gg {\Delta}_{pc},N{g}_{0}^{2}/{\Delta}_{pa}$), leading to

For the case that we only pump transversely (with a beam profile

$h\left(x\right)$) we set

$\eta =0$. Then

where

$\widehat{Y}$ represents the off-resonant excitation of the atoms via the transverse pump beam and

$\widehat{X}$ excitation via the cavity field

Eliminating the light field in the lowest order approximation (only keeping the first term in Equation (13)) then results in an effective Hamiltonian and the master equation

As the light field is eliminated, the measurement observable now depends solely on atomic operators [

15]. In particular, the measurement operator involves an integral over a non-uniform multimode quantum field

$\widehat{\Psi}\left(x\right)$ combined with a spatially varying pump profile and the cavity coupling strength. The rate of measurement is given by

which we have expressed in terms of the number of photons in the cavity

$n=\langle {\widehat{a}}^{\u2020}\widehat{a}\rangle =\langle {(\widehat{Y}/\kappa )}^{2}\rangle $. Here all cavity photons appear from interactions of the transverse beam with atoms and the rate of measurement events that affect the atoms

${r}_{\mathrm{meas}}$ is therefore simply that of the number of photons leaving the cavity.

For the case that the cavity mode is driven axially and there is no transverse pumping of the atoms (

$h\left(x\right)=0$), eliminating the cavity field operator leads, in the lowest order in our expansion parameter, to the Hamiltonian and master equation for the atoms

and the rate of scattered photons counted by the measurement apparatus is

The master equations,

i.e., Equation (

8), Equation (

16) and Equation (

19), represent an ensemble average over a large number of measurement realizations and are not conditioned on any particular measurement record. They do not incorporate information about individual stochastic runs. A common approach to describe the backaction of a continuous quantum measurement is to unravel the master equation into quantum trajectories of the state vectors [

11,

12,

13,

24]. A full quantum treatment of quantum trajectory simulations is computationally demanding in large systems and in the following we will develop approximate methods for individual stochastic runs.

#### 2.2. Phase-Space and Stochastic Descriptions

Typical BEC–cavity systems may consist of spatial atom dynamics that require well over 100 modes for an accurate description. On the other hand, the atom number in the cavity may commonly vary between

${10}^{3}$ and

${10}^{6}$. This is a significantly larger system than what the full quantum description would allow in a numerical simulation. Here we introduce an approximate computationally feasible approach that is based on classical phase-space methods. The state of the multimode atom–light system can be expressed by the Wigner function

$W(\alpha ,{\alpha}^{*},\{\psi ,{\psi}^{*}\})$, where α is the classical variable associated with

$\widehat{a}$, and ψ is a classical field representation of the field operator

$\widehat{\Psi}$ that is stochastically sampled from an ensemble of Wigner distributed classical fields. The full quantum dynamics of the master equation can be mapped to a phase-space dynamics of the Wigner function using standard techniques of quantum optics [

22,

25]. Neither the master equation for the density matrix nor the phase-space dynamics for the Wigner function are conditioned on any particular measurement record, but represent an ensemble average over a large number of measurement realizations. In order to describe a single experimental run of a continuously monitored BEC–cavity system, where the photons leaking out of the cavity are measured and the state of the system is determined by the detection record, we need to have an alternative representation to the ensemble-averaged ones. We will therefore derive classical stochastic measurement trajectories from an approximate description of the phase-space dynamics. Each such a trajectory is a faithful representation of a single experimental run where the dynamical noise of the equations is associated with the measurement noise and the detection record of the output light from the cavity.

The equation of motion for the Wigner function of the BEC–cavity system may be derived from the master Equation (

8) via the operator correspondences [

22,

25] similar to

The substitution of the operator correspondences to the master equation leads to a

Fokker–Planck equation (FPE) for the Wigner function in the limit of weak quantum fluctuations [

15]. Specifically, for the interatom interactions we consider the limit the atom number

$N\to \infty $, while keeping

$C=NU$ constant. Analogously, for the atom–photon interaction terms we take the limit where the number of cavity photons

$n\to \infty $ while the maximum atom–photon interaction energies

$\chi =\hslash ({g}_{0}^{2}/{\Delta}_{pa})n$ and

${\chi}_{h}\phantom{\rule{3.33333pt}{0ex}}=\hslash ({h}_{0}{g}_{0}/{\Delta}_{pa})\sqrt{n}$ remain constant (note that the transverse pump scales as

${h}_{0}\propto \sqrt{n}$). The interatomic interaction limit can be related to the 1D Tonks parameter [

26]

$\gamma =mU/\left({\hslash}^{2}{\rho}_{1D}\right)\gg 1$, where

${\rho}_{1D}$ is the one-dimensional atom density, indicating that the expansion is strictly valid in the regime of a weakly interacting bosonic gas (when the Bogoliubov approximation becomes accurate for the ground state atoms), although especially in 1D systems short-time behavior can be qualitatively described even for more strongly fluctuating cases [

27]. The classical approach can also be significantly more accurate in estimating the dynamics of the

measured observable even deep in the quantum regime [

16]. The Tonks parameter measures the ratio of the nonlinear

s-wave interaction to kinetic energies for atoms spaced at the mean interatomic distance and the expansion also implies that the number of atoms found within a healing length ξ is

${N}_{\xi}\simeq 1/\sqrt{2\gamma}\gg 1$.

In the limit of weak quantum fluctuations the FPE for the approximate BEC–cavity system then reads [

15]

where the index

${q}_{i}$ runs over the set

$\left\{\alpha ,{\alpha}^{*},\psi \left(x\right),{\psi}^{*}\left(x\right)\right\}$. The nonlinear atom–light dynamics is incorporated in the drift term elements

${A}_{i}$ that arise from the unitary Hamiltonian Equation (7)

The last two terms in Equation (

22) can be physically associated with the backaction of the continuously measured light leaking out of the cavity, and they form the diffusion part of the equation.

In deriving Equation (

22) we have neglected the terms containing higher derivatives than the second order ones by taking the weak fluctuation limit. The advantage of expressing the dynamics as a FPE follows from their mathematical correspondence to systems of SDEs [

25,

28]. Besides the computational simplicity of SDEs as compared with Equation (

22), we can now also obtain a stochastic description for single realizations of a continuous measurement process. On the other hand, the corresponding FPE corresponds to an ensemble average over all possible measurement outcomes that has discarded the individual measurement records.

The derivation of an FPE is reminiscent of dropping the triple derivative terms that arise from the

s-wave interactions in the truncated Wigner approximation [

29] that has been actively utilized in the studies of bosonic atom dynamics in closed systems [

30,

31,

32,

33,

34,

35,

36] (for a recent work on using truncated Wigner approximation in cold atoms see, e.g., [

37,

38,

39,

40,

41,

42,

43]) as well as when incorporating three-body losses of atoms in a trap [

36,

44].

An FPE can be mathematically mapped to Ito SDEs. For the cavity system we can express Equation (

22) as coupled SDEs for the stochastic light and atomic amplitudes

$\alpha \left(t\right)$ and

$\psi (x,t)$, respectively. These equations can be numerically integrated even for large systems and they represent an unraveling of the FPE into classical stochastic measurement trajectories [

15]. The trajectories describe individual continuous measurement processes where the dynamics is conditioned on the detection record. Here we, however, focus on the specific limit of a bad cavity

$\kappa \gg N{g}_{0}^{2}/{\Delta}_{pa}$, when the cavity light field can be adiabatically eliminated from the dynamics. We consider the transversely pumped case of Equation (

16). Having eliminated the cavity field we can now use a Wigner representation in terms solely of the atomic variables

$W\left(\{\psi \left(x\right),{\psi}^{*}\left(x\right)\}\right)$. The approximate FPE can be derived in the case of weak quantum fluctuations using the same principles as Equation (

22). We find

where the first term corresponds to that from the Hamiltonian evolution governed by Equation (

16)

while the measurement term has the form

The diffusion matrix of the FPE for the part that does not involve measurements vanishes identically. Symmetrically-ordered expectation values

${\langle \cdots \rangle}_{W}$ for the atomic fields are obtained with respect to the quasidistribution function

$W\left(\{\psi \left(x\right),{\psi}^{*}\left(x\right)\}\right)$The FPE can then be unraveled into classical trajectories for the stochastic field

$\psi \left(x\right)$ obeying

where

$dW$ denotes a Wiener increment with

$\langle dW\rangle =0$,

$\langle d{W}^{2}\rangle =dt$.

At first glance, the last term proportional to $dt$ would appear to give rise to non-unitary evolution. However, this term counteracts the non-unitary evolution introduced by the term proportional to $dW$, and the total atom number is in fact conserved by Equation (29). These two terms, which are $\propto h\left(x\right)g\left(x\right)$, represent the effect of the light detection record on the atoms. Of those terms which explicitly lead to unitary evolution, the one that is proportional to ${h}^{2}\left(x\right)$ describes the light shift due to the transverse beam, while the remainder describe the evolution of the BEC that would occur in the absence of the cavity mode.

The stochastic noise in Equation (29) is a physical consequence of the backaction of a continuous quantum measurement process of the light that has leaked out of the cavity. In this classical approximation to a single experimental run the dynamics is conditioned on the detection record. The noise term in the SDE Equation (29) directly results from the diffusion term in the corresponding FPE. The ensemble average of the dynamics over many stochastic realizations generates the unconditioned expectation values Equation (

28). Different multimode treatments of continuously measured systems, which are based on alternative phase-space approaches and are also suitable for cavity systems, were developed in [

45,

46]. The method also has similarities to numerical approaches to “stochastic electrodynamics”, see for instance [

47].

In the stochastic representation the initial conditions

$W(\{\psi ,{\psi}^{*}\},t=0)$ correspond to a (Wigner-distributed) classical probability distribution for the initial state. Thermal and quantum fluctuations may be included in the initial state of ψ within the constraint that the corresponding

$W(\{\psi ,{\psi}^{*}\},t=0)$ remains positive [

48]. This still allows notable quantum fluctuations, such as mode and spin squeezing, to be incorporated. In practical situations, for an accurate modeling of short-time dynamics it is often necessary to sample the initial conditions

$\psi (x,t=0)$ of individual stochastic realizations from

$W(\{\psi ,{\psi}^{*}\},t=0)$ using many-body theories that sufficiently well reproduce the correct quantum statistical correlations for an initially stable equilibrium configuration of the system. For simplicity, we consider the initial configuration of the atoms in the ground state inside the cavity in the absence of the light field. The general idea is to represent the many-body initial state in terms of some non-interacting quasiparticles, with annihilation and creation operators

${\widehat{\beta}}_{j}$ and

${\widehat{\beta}}_{j}^{\u2020}$ respectively, that satisfy the ideal gas phonon statistics

We then replace the quantum operators

$({\widehat{\beta}}_{j},{\widehat{\beta}}_{j}^{\u2020})$ by the complex stochastic variables

$({\beta}_{j},{\beta}_{j}^{*})$, obtained by sampling the corresponding Wigner distribution of the quasiparticles. The operators

$({\widehat{\beta}}_{j},{\widehat{\beta}}_{j}^{\u2020})$ behave as a collection of ideal harmonic oscillators whose Wigner distribution in a thermal bath reads [

25]

where

${\xi}_{j}\equiv {\u03f5}_{j}/2{k}_{B}T$. The nonvanishing contribution to the width

${\overline{n}}_{j}+\frac{1}{2}$ of the Gaussian distribution at

$T=0$ for each mode represents the quantum noise. Since the Wigner function returns symmetrically ordered expectation values, we have

and similarly

${\langle {\beta}_{j}\rangle}_{W}={\langle {\beta}_{j}^{*}\rangle}_{W}={\langle {\beta}_{j}^{2}\rangle}_{W}=0$.

In the Bogoliubov approximation we introduce the quasiparticles by expanding the field operator

$\widehat{\psi}(x,t=0)$ in terms of the BEC ground state amplitude

${\widehat{\beta}}_{0}{\psi}_{0}$, with

$\langle {\widehat{\beta}}_{0}^{\u2020}{\widehat{\beta}}_{0}\rangle ={N}_{0}$ (here

${N}_{0}$ denotes the BEC atom number that excludes the depleted atoms in the excited states), and the excited states [

32]

The ground state BEC solution

${\psi}_{0}$ (

$\int dx|{\psi}_{0}{\left(x\right)|}^{2}=1$), the quasiparticle mode functions

${u}_{j}\left(x\right)$ and

${v}_{j}\left(x\right)$ (

$j>0$), and the corresponding eigenenergies

${\u03f5}_{j}$, can be solved numerically. In a more strongly fluctuating case the quasiparticle modes and the ground state condensate profile may be solved self-consistently using the Hartree–Fock–Bogoliubov theory [

38,

49]. A strongly confined 1D system may also exhibit enhanced phase fluctuations that can be incorporated using a quasicondensate representation [

34]. Finally, the initial state

$\psi (x,t=0)$ for the stochastic simulations that synthesizes the appropriate statistics may then be constructed from

$\widehat{\psi}(x,t=0)$ in Equation (

33) by replacing

$({\widehat{\beta}}_{j},{\widehat{\beta}}_{j}^{\u2020})$ by the stochastically sampled

$({\beta}_{j},{\beta}_{j}^{*})$.