as one can verify, but it has no trivial solution. Since the atoms are initially uncorrelated with the cavity mode, the inhomogeneous term of the Zwanzig-Nakajima mas- ter equation disappears [40]. Moreover, the Markov ap- proximation is valid in presence of a single cavity: the atoms exiting the resonators do not interact with it any longer, leading to no memory effects. Indeed, in Eq. (5) the density matrix at time t + Δ t depends only on ˆ ρ ( t ). We remark that, if the atoms exiting one resonator then interact with a second physical system, then correlations mediated by the atoms must be taken into account. Below we discuss the master equation for the cavity mode in two specific limits: the weak-coupling regime, when the coupling of a single atom with the cavity mode is a small perturbation of the cavity state, i.e., φ ≪ 1, and the strong-coupling regime, when a single atom perturbs significantly the cavity state, and φ ≥ 1. From now on we denote by ˆ ρ$_{t}$ the density matrix of the cavity field at time t after the coarse-grained time averaging. and φ = gt is the Rabi angle. These equations show explicitly the periodic exchange of energy between dipole and field when they are resonantly coupled. In the rest of this section we will assume that cavity mode and atomic dipole are resonant, ω$_{c}$ = ω$_{0}$ . whereby The interaction of the cavity mode with an atomic beam gives rise to a stochastic evolution, which is mainly due to the statistical knowledge of the number of atoms which have interacted with the cavity mode. It is then appropriate to use a density-matrix formalism for the cavity-mode state. We denote by ˆ ρ the cavity-mode den- sity matrix. The time evolution of the cavity field is characterized by: (i) the typical time scale which sepa- rates the arrival of two atoms, which is here given by the arrival rates r and r$_{e}$ for the atoms prepared in state | g 〉 and | e 〉 , respectively. (ii) the interaction time τ between atom and resonator, which is determined by the atomic velocity and which follows a normal distribution P ( τ ) (which we do not specify for the moment). Typically, rτ, r$_{e}$τ ≪ 1 and one can study the field evolution on a coarse-grained time scale Δ t , such that Δ t ≫ ¯ τ , with ¯ τ the average interaction time. For r Δ t, r$_{e}$ Δ t ≪ 1 such that we can assume that there is at most one atom inside of the cavity, we can determine the density operator at the time t + Δ t given ˆ ρ ( t ), according to the formula The weak-coupling limit corresponds here to the regime in which the mean interaction time ¯ τ fulfills the re- lation g ¯ $_{τ}$√$_{n}$ ≪ 1, where n is any relevant photon number (such that the corresponding populations and coherences are not negligibly small) and the width of the distribu- tion for τ is assumed to be small compared to the average value ¯ τ . In this limit the field operators in Eq. (5) can be expanded in powers of φ , and the dynamics of the cavity density matrix ˆ ρ$_{t}$ is governed by the master equation [17] where γ = rg $^{2}$¯ τ 2 and γ$_{e}$ = R γ [41]. This equation de- scribes the incoherent energy exchange between the cav- ity field and an external reservoir, with loss and pump rates γ and γ$_{e}$ , respectively. If R < 1, the resonator thermalizes with an effective reservoir at temperature The steady state of the resonator is hence a thermal state, whose temperature can be controlled by adjusting the parameter R , giving the average rate of atoms prepared in the excited states over the ones prepared in the ground state. The steady state can be a pure state, the vacuum state, by preparing the atoms exclusively in the ground state | g 〉 (which corresponds to setting R = 0 in Eq. (6)): In this case the atoms absorb in average energy from the cavity mode until it reaches the vacuum state | 0 〉 . This identifies a simple strategy which allows one to prepare the cavity in the vacuum state as a result of the interaction with a where we used r$_{e}$ = R r and we wrote the distribution P ( τ ) in terms of the distribution p ( φ ) of the Rabi angle φ = gτ . Operator Δˆ ρ in Eq. (5) is the differential change of the field state. The master equation is given by the differential equation ∂ ˆ ρ$_{t}$/∂t which is found from equa- tion Δˆ ρ/ Δ t . This equation has the Lindblad form [39], B. Interaction with a beam of atoms C. The weak-coupling limit e − i ˆ H$_{JC}$t/ ℏ | g 〉 = cos( $_{φ}$√$_{ˆ}$ a $^{†}$ˆ a ) | g 〉 + i sin( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) √$_{ˆ}$ a ˆ † ˆ a | e 〉 (3) e − i ˆ H$_{JC}$t/ ℏ | e 〉 = cos( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) | e 〉 + iˆ a $_{†}$sin( $_{φ}$√$_{ˆ}$ a ˆ a $^{†}$) √$_{ˆ}$ a ˆ a † | g 〉 (4) 3 ∂ ˆ ρ$_{t}$ ∂t = − i ω$_{c}$ [ˆ a $^{†}$ˆ a, ˆ ρ ] − γ 2 $^{(}$ˆ a $^{†}$ˆ a ˆ ρ$_{t}$ − 2ˆ a ˆ ρ$_{t}$ ˆ a † + ˆ ρ$_{t}$ ˆ a $^{†}$ˆ a ) − γ$_{e}$ 2 $^{(}$ˆ a ˆ $^{†}$ˆ ρ$_{t}$ − 2ˆ a $^{†}$ˆ ρ$_{t}$ ˆ a + ˆ ρ$_{t}$ ˆ a ˆ † $^{)}$, (6) T = 1 κ$_{B}$ ℏ ω$_{c}$ | ln R| . ˆ ρ ( t + Δ t ) = ˆ ρ ( t )(1 − r Δ t − r R Δ t ) + r Δ t$^{∫}$ ∞ 0 d φp ( φ ) ×$^{[}$ cos( $_{φ}$√$_{ˆ}$ a $^{†}$ˆ a )ˆ ρ ( t ) cos( $_{φ}$√$_{ˆ}$ a $^{†}$ˆ a ) + sin( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) √$_{ˆ}$ a ˆ † ˆ a ˆ ρ ( t )ˆ a $_{†}$sin( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) √$_{ˆ}$ a ˆ † + R cos( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$)ˆ ρ ( t ) cos( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) + R ˆ a $_{†}$sin( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) √$_{ˆ}$ a ˆ † ˆ ρ ( t ) sin( $_{φ}$√$_{ˆ}$ a ˆ $^{†}$) √$_{ˆ}$ a ˆ † ˆ a$^{]}$ ≡ ˆ ρ ( t ) + Δˆ ρ, (5)