Optimal storage of a single photon by a single intra-cavity atom

We theoretically analyse the efficiency of a quantum memory for single photons. The photons propagate along a transmission line and impinge on one of the mirrors of a high-finesse cavity. The quantum memory is constituted by a single atom within the optical resonator. Photon storage is realised by the controlled transfer of the photonic excitation into a metastable state of the atom and occurs via a Raman transition with a suitably tailored laser pulse, which drives the atom. Our study is supported by numerical simulations, in which we include the modes of the transmission line and we use the experimental parameters of existing experimental setups. It reproduces the results derived using input-output theory in the corresponding regime and can be extended to compute dynamics where the input-output formalism cannot be straightforwardly applied. Our analysis determines the maximal storage efficiency, namely, the maximal probability to store the photon in a stable atomic excitation, in the presence of spontaneous decay and cavity parasitic losses. It further delivers the form of the laser pulse that achieves the maximal efficiency by partially compensating parasitic losses. We numerically assess the conditions under which storage based on adiabatic dynamics is preferable to non-adiabatic pulses. Moreover, we systematically determine the shortest photon pulse that can be efficiently stored as a function of the system parameters.


I. INTRODUCTION
Quantum control of atom-photon interactions is a prerequisite for the realization of quantum networks based on single photons as flying qubits [1,2]. In these architectures, the quantum information carried by the photons is stored in a controlled way in a stable quantum mechanical excitation of a system, the quantum memory [3][4][5][6][7]. In several experimental realizations the quantum memory is an ensemble of spins and the photon is stored in a spin wave excitation [3]. Alternative approaches employ individually addressable particles, such as single trapped atoms or ions [8,9]: here, high-aperture lenses [10] or optical resonators [11] increase the probability that the photon qubit is coherently transferred into an electronic excitation. In addition, schemes based on heralded state transfer have been realized [10,[12][13][14]. Most recently, storage efficiencies of the order of 22% have been reported for a quantum memory composed by a single atom in an optical cavity [15]. This value lies well below the value one can extract from theoretical works on spin ensembles for photon storage [16]. This calls for a detailed understanding of these dynamics and for elaborating strategies to achieve full control of the atom-photon interface at the single atom level.
The purpose of this work is to provide a systematic theoretical analysis of the efficiency of protocols for a quantum memory for single photons, where information is stored in the electronic excitation of a single atom in- * present address: TOPTICA Photonics AG, Lochhamer Schlag 19, 82166 Graefelfing, Germany side a high-finesse resonator. The qubit can be the photon polarization [9,17], or a time-bin superposition of photonic states [18], and shall then be transferred into a superposition of atomic spin states.
The scheme is illustrated in Fig. 1: a photon propagating along a transmission line impinges on the cavity mirror, the storage protocol coherently transfers the photon into a metastable atomic state, here denoted by |r , with the help of an external laser. The protocols we analyse are based on the seminal proposal by Cirac et al. [1]. Here, we first compare adiabatic protocols, originally developed for atomic ensembles in bad cavities [17,19] as well as a protocol developed for any coupling regime for a single atom [18]. We then extend the protocol of Ref. [19] to quantum memories composed of single atoms confined inside a high-finesse resonator. We investigate how the storage efficiency is affected by parasitic losses at the cavity mirrors and whether these effects can be compensated by the dynamics induced by the laser pulse driving the atom. We finally extend our study to the non-adiabatic regime, and analyse the efficiency of storage of broadband photon pulses using optimal control. This manuscript is organized as follows. In Sec. II we introduce the basic model, which we use in order to determine the efficiency of the storage process. In Sec. III we analyse the efficiency of protocols based on adiabatic dynamics in presence of irreversible cavity losses. In Sec. IV we investigate the storage efficiency when the photon coherence time does not fulfil the condition for adiabatic quantum dynamics. Here, we use optimal control theory to determine the shortest photon pulse that can be stored. The conclusions are drawn in Sec. V. The appendices provide further details of the analyses presented in The single photon is absorbed by the cavity, which drives the atomic transition |g → |e . An additional laser couples to the atomic transition |r → |e . The dynamics of storage is tailored by optimizing the functional dependence of the laser amplitude on time, Ω(t): Ideally, the atom undergoes a Raman transition to the final state |r and the photon is stored. We analyse the storage efficiency including the spontaneous decay with rate γ of the excited state and photon absorption or scattering at the cavity mirrors via an incoherent process at rate κ loss . Further parameters are defined in the text.

II. BASIC MODEL
The basic elements of the dynamics are illustrated in Fig. 1. A photon propagates along the transmission line and impinges on the mirror of a high-finesse cavity. Here, it interacts with a cavity mode at frequency ω c . The cavity mode, in turn, couples to a dipolar transition of a single atom, which is confined within the resonator. We denote by |g the initial electronic state in which the atom is prepared, it is a metastable state and it performs a transition to the excited state |e by absorbing a cavity photon. The relevant atomic levels are shown in subplot (b): they are two meta-stable states, |g and |r , which are coupled by electric dipole transitions to a common excited state |e forming a Λ level scheme. Transition |r → |e is driven by a laser, which we model by a classical field.
In order to describe the dynamics of the photon impinging onto the cavity mirror we resort to a coherent description of the modes of the electromagnetic field out-side the resonator. The incident photon is an excitation of the external modes, and it couples with the single mode of a high-finesse resonator via the finite transmittivity of the mirror on which the photon is incident.
In this section we provide the details of our theoretical model and introduce the physical quantities which are relevant to the discussions in the rest of this paper.

A. Master equation
The state of the system, composed of the cavity mode, the atom, and the modes of the transmission line, is described by the density operatorρ. Its dynamics is governed by the master equation ( = 1) where HamiltonianĤ(t) describes the coherent dynamics of the modes of the electromagnetic field outside the resonator, of the single-mode cavity, of the atom's internal degrees of freedom, and of their mutual coupling. The incoherent dynamics, in turn, is given by superoperator L dis , and includes spontaneous decay of the atomic excited state, at rate γ, and cavity losses due to the finite transmittivity of the second cavity mirror as well as due to scattering and/or finite absorption of radiation at the mirror surfaces, at rate κ loss . We first provide the details of the Hamiltonian. This is composed of two terms,Ĥ(t) =Ĥ fields +Ĥ I (t). The first term,Ĥ fields , describes the coherent dynamics of the fields in absence of the atom. It readŝ (2) and is reported in the reference frame of the cavity mode frequency ω c . Here, operatorsb k andb † k annihilate and create, respectively, a photon at frequency ω k in the transmission line, with [b k ,b † k ] = δ k,k . The modesb k are formally obtained by quantizing the electromagnetic field in the transmission line and have the same polarization as the cavity mode. They couple with strength λ k to the cavity mode, which is described by a harmonic oscillator with annihilation and creation operators a and a † , where [â, In the rotatingwave approximation the interaction is of beam-splitter type and conserves the total number of excitations. The coupling λ k is related to the radiative damping rate of the cavity mode by the rate κ = L|λ(ω c )| 2 /c, with λ(ω c ) the coupling strength at the cavity-mode resonance frequency [20] and L the length of the transmission line. Note that κ is the cavity decay rate because of transmission into the transmission line and is necessary for the storage, while κ loss is the decay rate into other modes and is only detrimental.
The atom-photon interaction is treated in the dipole and rotating-wave approximation. The transition |g → |e couples with the cavity mode with strength (vacuum Rabi frequency) g. Transition |r → |e is driven by a classical laser with time-dependent Rabi frequency Ω(t), which is the function to be optimized in order to maximize the probability of transferring the excitation into state |r . The corresponding Hamiltonian readŝ where ∆ = ω c − ω e is the detuning between the cavity frequency ω c and the frequency ω e of the |g − |e transition, while δ = ω r + ω L − ω c is the two-photon detuning which is evaluated using the central frequency ω L of the driving field Ω(t). Here, we denote by ω r = (E r − E g )/ the frequency difference (Bohr frequency) between the state |r (of energy E r ) and the state |g (of energy E g ). Unless otherwise stated, in the following we assume that the condition of two-photon resonance δ = 0 is fulfilled.
The irreversible processes that we consider in our theoretical description are (i) the radiative decay at rate γ from the excited state |e , where photons are emitted into free field modes other than the modesb k introduced in Eq. (2), and (ii) the cavity losses at rate κ loss due to absorption and scattering at the cavity mirrors and to the finite transmittivity of the second mirror. We model each of these phenomena by Born-Markov processes described by the superoperators L γ and L κ loss , respectively, such that L dis = L γ + L κ loss and Here, |ξ e is an auxiliary atomic state where the losses of atomic population from the excited state |e are collected.

B. Initial state and target state
The model is one dimensional, the transmission line is at x < 0, and the cavity mirror is at position x = 0. The single incident photon is described by a superposition of single excitations of the modes of the external field [21] where |vac is the vacuum state and the amplitudes E k fulfil the normalization condition k |E k | 2 = 1. For the studies performed in this work, we will consider the amplitudes with c the speed of light, L the length of the transmission line, and the input amplitude at the position x = 0, with T the characteristic time determining the coherence time T c of the photon, T c = πT /4 √ 3 (see definition in Eq. (10)). Our formalism applies to a generic input envelope, nevertheless the specific choice of Eq. (7) allows us to compare our results with previous studies, see Refs. [17][18][19]. The total state of the system at the initial time t = t 1 is given by the input photon in the transmission line, the empty resonator, and the atom in state |g . In particular, the dynamics is analysed in the interval t ∈ [t 1 , t 2 ], with t 1 < 0, t 2 > 0 and |t 1 |, t 2 T c , such that (i) at the initial time there is no spatial overlap between the single photon and the cavity mirror and (ii) assuming that the cavity mirror is perfectly reflecting, at t = t 2 the photon has been reflected away from the mirror.
The initial state is described by the density operator and |0 c is the Fock state of the resonator with zero photons.
Our target is to store the single photon into the atomic state |r by shaping the laser field Ω(t). When comparing different storage approaches, it is essential to have a figure of merit characterizing the performance of the process. In accordance with Ref. [19] we define the efficiency η of the process as the ratio between the probability to find the excitation in the state |ψ T = |r ⊗ |0 c ⊗ |vac at time t and the number of impinging photons between t 1 and t, namely where t > t 1 and the denominator is unity for t → t 2 . We note that states |ψ 0 and |ψ T are connected by the coherent dynamics via the intermediate states |e ⊗|0 c ⊗ |vac and |g ⊗ |1 c ⊗ |vac . These states are unstable, since they can decay via spontaneous emission or via the parasitic cavity losses. Moreover, the incident photon can be reflected off the cavity. The latter is a unitary process, which results in a finite probability of finding a photon excitation in the transmission line after the photon has reached the mirror. The choice of Ω(t) shall maximize the transfer |ψ 0 → |ψ T by minimizing the losses as well as reflection at the cavity mirror.

C. Relevant quantities
The transmission line is here modelled by a cavity of length L, with a perfect mirror at x = −L. The second mirror at x = 0 coincides with the mirror of finite transmittivity, separating the transmission line from the optical cavity. The length L is chosen to be sufficiently large to simulate a continuum of modes for all practical purposes. This requires that the distance between neighbouring frequencies is smaller than all characteristic frequencies of the problem. The smallest characteristic frequency is the bandwidth of the incident photon, which is the inverse of the photon duration in time. Since the initial state is assumed to be a single photon in a pure state, the latter coincides with the photon coherence time T c [22] which is defined as where ε < 10 −5 for the choice |t 1 | = t 2 = 6T c and L = 12cT c . The modes of the transmission line are standing waves with wave vector along the x axis. For numerical purposes we take a finite number N of modes around the cavity wave number k c = ωc c . Their wave numbers are while n = −(N − 1)/2, . . . , (N − 1)/2, and the corresponding frequencies are ω n = ck n . We choose N and L so that our simulations are not significantly affected by the finite size of the transmission line and by the cutoff in the mode number N . We further choose N in order to appropriately describe spontaneous decay by the cavity mode. This is tested by initialising the system with no atom and one cavity photon and choosing the parameters so to reproduce the exponential damping of the cavity field.
Note that a single mode of the cavity is sufficient to describe the interaction with a single photon if the photon frequencies lie in a range which is smaller than the free spectral range of the cavity and is centered around the frequency of the cavity mode. In this work we choose the central frequency of the photon to coincide with the cavity mode frequency ω p = ω c and the spectrally broadest photon we consider (Figs. 5 and 6) spans about 16 × 2π MHz around the cavity frequency ω c . A cavity of 1 cm has a free spectral range of about 15×2π GHz which is three orders of magnitudes larger than the bandwidth of the photon. This justifies the approximation to a single mode cavity. The employed formalism can be applied to photons with other center frequencies as well, if the number of modes N is chosen sufficiently large and their center is appropriately shifted (c.f. eq. (12)).
Since the free field modes are included in the unitary evolution, it is possible to constantly monitor their state. The photon distribution in space at time t is given by where ρ nm (t) = Tr{ρ(t) |1 m 1 n |} and |1 n = b † kn |vac .
A further important quantity characterizing the coupling between cavity mode and atom is the cooperativity C, which reads [19] The cooperativity sets the maximum storage efficiency in the limit in which the cavity can be adiabatically eliminated from the dynamics of the system [19], which corresponds to assuming the condition In this limit, in fact, the state |g ⊗|1 c ⊗|vac can be eliminated from the dynamics. Then, the efficiency satisfies η(t) ≤ η max where the maximal efficiency η max reads [19] The maximal efficiency η max is reached for any input photon envelope E in (t) and detuning ∆, provided the adiabatic condition (15) is fulfilled.
In our study we also determine the probability that the photon is in the transmission line, the probability that spontaneous emission occurs, and finally, the probability that cavity parasitic losses take place, By means of these quantities we gain insight into the processes leading to optimal storage.

III. STORAGE IN THE ADIABATIC REGIME
In this section we determine the efficiency of storage protocols derived in Refs. [17][18][19] for the setup of Ref. [15] in the adiabatic regime. We then analyse how the efficiency of these protocols is modified by the presence of parasitic losses at rate κ loss . In this case, we find also an analytic result which corrects the maximal value of Eq. (16).
We remark that in Refs. [17][18][19] the optimal pulses Ω(t) were analytically determined using input-output theory [23]. In Refs. [17,19] the authors consider an atomic ensemble inside the resonator in the adiabatic regime. This regime consists in assuming the bad cavity limit κ g and the limit γT c C 1. The first assumption allows one to adiabatically eliminate the cavity field variables from the equations of motion, the second assumption permits one to eliminate also the excited state |e . In Ref. [18] a single atom is considered and there is no such adiabatic approximation, but the coupling with the external field is treated using a phenomenological model.
Here we simulate the full Hamiltonian dynamics of the external field in the transmission line and consider a quantum memory composed of a single atom inside a reasonably good cavity. The parameters we refer to in our study are the ones of the setup of Ref. [15]: corresponding to the cooperativity C = 3.27 and to the maximal storage efficiency η max = 0.77. When we analyse the dependence of the efficiency on γ or κ, we vary the parameters around the values given in Eq. (20).

A. Ideal resonator
We first review the requirements and results of the individual protocols of Refs. [17][18][19] and investigate their efficiency for a single-atom quantum memory. The works of Refs. [17][18][19] determine the form of the optimal pulse Ω(t) for cavities with cooperativities C ≥ 1. The optimal pulse is found by imposing similar, but not equivalent requirements. In Refs. [17,18] the authors determine Ω(t) by imposing impedance matching, namely, that there is no photon reflected back by the cavity mirror. In Ref. [19] the pulse Ω(t) warrants maximal storage, namely, maximal probability of transferring the photon into the atomic excitation |r . The latter requirement corresponds to maximizing the storage efficiency η defined in Eq. (9).
In detail, in Ref. [17] the authors determine the optimal pulse Ω(t) that suppresses back-reflection from the cavity and warrants that the dynamics follows adiabatically the dark state of the system composed by cavity and atom. For this purpose the authors impose that the cavity field is resonant with the transition |g → |e , namely ∆ = 0. They further require that the coherence time T c is larger than the cavity decay time, κT c 1. Under these conditions the optimal pulse Ω(t) = Ω F (t) reads where c 1 regularize Ω F (t) for t → t 1 . The work in Ref. [18] imposes the suppression of the back-reflected photon without any adiabatic approximation and finds the optimal pulse Ω(t) = Ω D (t), which takes the form with and F(t) =Ė in (t) − κE in (t). Coefficient ρ 0 accounts for a small initial population in the target state |r and it is relevant in order to avoid divergences in Eq. (22) for t → t 1 , see Ref. [18] for an extensive discussion. The pulse Ω F (t) of Eq. (21) can be recovered from Eq. (22) by imposing the conditionṡ The control pulse Ω D (t) can be considered as a generalization of Ω F (t) since it is determined by solely imposing quantum impedance matching. In Ref. [19] the authors determine the amplitude Ω(t) that maximizes the efficiency η. This condition is not equivalent to imposing impedance matching. In fact, while in the case of impedance matching major losses through the excited state |e are acceptable in order to minimize the probability of photon reflection, in the case of maximum transfer efficiency η those losses are detrimental and thus have to be minimized. The optimal pulse Ω(t) = Ω G (t) is determined for a generic detuning ∆ by using an analytical model based on the adiabatic elimination of the excited state |e of the atom and of the cavity field in the bad cavity limit κ g. It reads In the limit in which the adiabatic conditions are fulfilled, this control pulse allows for storage with efficiency η max , Eq. (16). This efficiency approaches unity for cooperativities C 1. We start by integrating numerically the master equation for a single atom (1) after setting κ loss = 0, namely, by neglecting parasitic losses. We determine the storage efficiency at the time t 2 , which we identify by taking t 2 T c for different choices of the control field Ω = Ω G , Ω F , Ω D in Hamiltonian (3). Numerically, t 2 corresponds to the time the photon would need to be reflected back into the initial position, assuming that the partially reflecting mirror is replaced by a perfect mirror. Our numerical simulations are performed for a single atom in a resonator in the good cavity limit.
Figures 2 display the efficiency and the losses as a function of κ, γ, and of the coherence time T c of the photon (and thus of the adiabatic parameter γT c C). Each curve corresponds to the different control pulses in the Hamiltonian (3) according to the three protocols. In subplot (a) we observe that the efficiency reached with the pulse Ω G (t) corresponds to the maximum theoretical efficiency η max , while the efficiency with Ω D is the smallest. In subplot (b) it is visible that the control pulse Ω G (t) warrants the maximum efficiency even down to values of κ of the order of κ ∼ g/5. Subplot (c) displays the efficiency as a function of the adiabatic parameter γT c C:  Protocol Ω D , which perfectly suppresses the back reflected photon, has the highest losses via spontaneous emission, which in the end leads to a lower efficiency η.
Protocol Ω G in turn, has the lowest radiative losses and it allows for the transfer with the maximal efficiency η max .
Protocol Ω F tries to minimize reflection of the photon at the cavity mirror. However, since Ω F is derived with some approximations, it does not suppress completely the reflection and its final efficiency is between the ones of the other two protocols.
An important general result of this study is that the bad cavity limit is not essential for reaching the maximal efficiency as long as the dynamics is adiabatic: the relevant parameter is in fact the cooperativity.

B. Parasitic losses
The protocols so far discussed assume an ideal optical resonator. In this section we analyse how their efficiency is modified by the presence of parasitic losses, here described by the superoperator L κ loss in Eq. (4b). In particular, we derive the maximal efficiency the protocols can reach as a function of κ loss > 0.
We first numerically determine the efficiency of the individual protocols as a function of κ loss for T c = 0.5 µs. Figure 3(a) displays η for Ω = Ω G , Ω D , Ω F . It is evident that the effect of losses is detrimental, for instance it leads to a definite reduction of the maximal efficiency from η = 0.77 down to η = 0.68 for κ loss ∼ 0.1κ. This result can be improved by identifying a control field Ω = Ω X which compensates, at least partially, the effects of these parasitic losses. The control field Ω X (t) is derived in Sec. III C using the input-output formalism: it corresponds to performing the substitution κ → κ + κ loss in the functional form Ω G (t) of Eq. (25). Specifically, it reads with the modified cooperativity When the control pulse Ω X (t) is used, the efficiency of the process corresponds to the maximal efficiency η max , which is now given by Clearly, η max ≤ η max , while the equality holds for κ loss = 0. By inspecting the numerical results, we note that the efficiency obtained using Ω X is always higher than the one reached by the other protocols. Even though for some values of κ loss the efficiencies using different control fields may approach the one found with Ω X , yet the dynamics are substantially different. This is visible by inspecting the probability that the photon is reflected, the , Ω G (t), Ω D (t), and Ω X (t) (resp. Eqs. (21), (25), (22), (26)). (c) Time evolution of the diagonal elements of the density matrix when the atom is driven by Ω X . The curves are the population ρrr of state |r , the population ρee of state |e , the probability that there is one photon in the cavity ρaa, the probability that the photon is in the transmission line Pr, Eq. (17), the probability of spontaneous decay, Eq. (18) Ps, and the probability of cavity parasitic losses P loss , Eq. (19). The parameters are (g, κ, γ, κ loss ) = (4.9, 2.42, 3.03, 0.33) × 2π MHz, ∆ = 0 and Tc = 0.5 µs. Figure 4 shows the evolution of the system for T c = 0.5 µs. Fig. 4(a) displays the envelope in time |E in (t)| 2 for the photon given in eq. (7), which is the one used also in this simulation. Fig. 4(b) displays the control pulse shapes of the protocols Ω F , Ω G , Ω D , of Refs. [17][18][19] and Ω X derived in this work (the pulse shapes are given an-alytically in Eqs. (21), (25), (22), (26)). Fig. 4(c) shows the population of the states and the losses during the evolution when the atom is driven by Ω X (t). The efficiency of the transfer, Eq. (9), corresponds to the population of the state |r , ρ rr . For the parameters of Ref. [15] the final efficiency is η(t 2 ) ≈ η max ≈ 0.653.
In the next subsection we report the derivation of Ω X and η max by means of the input-output formalism.

C. Maximal efficiency in presence of parasitic losses
In this section we generalize the adiabatic protocol of Ref. [19] in order to identify the control field that maximizes the storage efficiency and to determine the maximum storage efficiency one can reach. The derivation presented in this section is based on the input-output formalism and it delivers Eq. (26) and Eq. (28).
We first justify the result for Eq. (28) using a time reversal argument applied in Refs. [19,24]. Let us consider retrieval of the photon, assuming the atom is initially in state |r and there is neither external nor cavity field. Then, in order to retrieve the photon, the control pulse Ω(t) shall drive the transition |r → |e such that at the end of the process the state |r is completely empty. The excited state |e dissipates the excitation with probability 1/(1 + C ), while it can emit into the cavity mode with probability C /(1 + C ). When the cavity mode is populated, a fraction κ loss /(κ + κ loss ) is lost, while the fraction κ/(κ + κ loss ) is emitted via the coupling mirror into the transmission line. From this argument one finds that the probability of retrieval is given by Eq. (28). Using the time reversal argument, this is also the efficiency of storage.
We now derive this result as well as Ω X (t) starting from the retrieval process and then applying the time reversal argument. For this purpose, we restrict the dynamics to the Hilbert space H composed by the states {|g, 1 c , vac , |e, 0 c , vac , |r, 0 c , vac , |g, 0 c , 1 k : 1 ≤ k ≤ N }. In H the probability is not conserved due to leakage via spontaneous decay and via parasitic cavity losses. Therefore, a generic state in H takes the form |φ(t) = c(t)|g, 1 c , vac + e(t)|e, 0 c , vac + r(t)|r, 0 c , vac + k E k (t)|g, 0 c , 1 k , it evolves according to a non-Hermitian Hamiltonian and its norm decays exponentially with time [25]. We assume that at the initial time t = t 1 the probability amplitude r(t 1 ) equals 1, while all other probability amplitudes vanish. The equations of motion for the probability amplitudes reaḋ where we used the Markov approximation and the inputoutput formalism [23]. We now assume the bad-cavity limit κ g and adiabatically eliminate the cavity field from the equations of motion (which corresponds to assumingċ(t) ≈ 0 over the typical time scales of the other variables). In this limit the input-output operator relation,Ê out (t) = i √ 2κâ(t) −Ê in (t), takes the form where G = κ/(κ + κ loss ) and C is given in Eq. (14). This equation has to be integrated together with the equationṡ Our goal is to determine the retrieval efficiency assuming that at time t = 0 there is no input photonic excitation, thus E in (t) = 0 at all times. Using these assumptions, the above equations can be cast into the form The probability that no excitations are left in the atom at time t 2 > 0 (t 2 T c ) is the retrieval efficiency By means of the time reversal argument, this is also the storage efficiency. The output field can be analytically determined by adiabatically eliminating the excited state from Eqs. (30). This leads to the expression Integrating the norm squared of Eq. (35) one obtains We solve Eq. (36) to find |Ω(t)|, while the phase of Ω(t) can be determined from Eq. (35). Finally, we obtain the control pulse Ω X retr (t) which retrieves the photon with efficiency η max . It reads Using the time reversal argument, the control pulse Ω X (t) = Ω X * retr (T − t) stores the time reversed input photon with E in (t) = E * out (T − t)/ η max and T = t 2 − t 1 , and it takes the form given in Eq. (26). This pulse has the same form as the pulse of Eq. (25), where now C has been replaced by C (or equivalently κ → κ + κ loss ).

D. Photon Retrieval
The generation of single photons with arbitrary shape of the wavepacket envelope in atom-cavity systems has been discussed theoretically in [19,26] and demonstrated experimentally in [27,28].
In Ref. [1,24] it has been pointed out that photon storage and retrieval are connected by a time reversal transformation. This argument has profound implications. Consider for instance the pulse shape Ω(t) which optimally stores an input photon with envelope E in (t). This pulse shape is the time reversal of the pulse shape Ω retr (t) = Ω * (T − t) which retrieves a photon with envelope E out (t) = E * in (T − t) (here T = t 2 − t 1 ). In this case, the storage efficiency is equal to the efficiency of retrieval and is limited by the cooperativity through the relation in Eq. (28). We have numerically checked that this is fulfilled by considering adiabatic retrieval and storage of a single photon through 5 nodes, consisting of 5 identical cavity-atom systems. We applied Ω retr (t) for the retrieval and the corresponding Ω(t) for the storage. Within the numerical error, we verified that the storage efficiency of each retrieved photon remains constant and equal to the one of the first retrieved photon.

IV. BEYOND ADIABATICITY
In this section we analyse the efficiency of storage of single photon pulses in the regime in which the adiabaticity condition Eq. (15) does not hold. Our treatment extends to single-atom quantum memories the approach that was applied to atomic ensemble in Refs. [29,30] and allows us to identify the minimum coherence time scale of the photon pulse for which a given target efficiency can be reached.
Our procedure is developed as follows. We use the von-Neumann equation, obtained from Eq. (1) after setting γ = κ loss = 0, and resort to optimal control theory for identifying the control pulse Ω(t) = Ω opt (t) that maximizes the storage efficiency for γ = κ loss = 0. Specifically, we make use of the GRAPE algorithm [31] implemented in the library QuTiP [32]. We then determine the storage efficiency of the full dynamics, including spontaneous decay and cavity parasitic losses, by numerically integrating the master equation (1) using the pulse Ω opt (t). We show that the dynamics due to Ω opt (t) significantly differs from the adiabatic dynamics, and thereby improve the efficiency for short coherence times.  Figure 5 displays the storage efficiency η as a function of the photon coherence time T c when the control pulse is Ω X (t), Eq. (26), and when instead the control pulse is found by means of the numerical procedure specified above, which we denote by Ω opt (t). The storage efficiency is reported for γ = κ loss = 0 and for (γ, κ loss ) = (3.03, 0.33) × 2π MHz. The results show that optimal control, in the way we implement it, does not improve the maximal value of the storage efficiency, which seems to be limited by the value of η max , Eq. (28). We remark that this behaviour is generally encountered when applying optimal-control-based protocols to Markovian dynamics [33]. Nevertheless, the protocols identified using optimal control extend the range of values of T c , where the maximal efficiency is reached, down to values where the adiabatic condition is not fulfilled. We further find that the optimized pulse we numerically identified in absence of losses provides an excellent guideline for optimizing the storage also in presence of losses.
In order to get insight into the optimized dynamics we analyse the time dependence of the control pulse as well as the dynamics of cavity and atomic state populations for T c = 0.009 µs, namely, when the dynamics is nonadiabatic. Figure 6(a) shows the time evolution of the pulse Ω opt (t) resulting from the optimization procedure in the non-adiabatic regime; the pulse Ω X (t) is shown for comparison. The efficiency of the transfer (when the losses are neglected) with the control pulse Ω X is η X ≈ 0.07 < η max because the process is non adiabatic, while the efficiency reached with the optimized pulse Ω opt (t) is η opt ≈ 0.63. The value of the solid green line at t = t 2 in Fig. 6(b) and 6(c) corresponds to the leftmost point in Fig. 5 for the case without losses. A double bump in the cavity population is visible in Fig. 6 7), and optimized pulse Ω opt (t) as a function of time (the initial guess pulse Ω X (t) is shown for comparison). Subplot (b) and (c) display the time evolution of the diagonal elements of the density matrix when the atom is driven by Ω X and Ω opt , respectively. The curves are the population ρrr of state |r , the population ρee of state |e , the probability that there is one photon in the cavity ρaa, and the probability that the photon is in the transmission line Pr, Eq. (17). The parameters are (g, κ) = (4.9, 2.42) × 2π MHz, γ = κ loss = ∆ = 0 and Tc = 0.009 µs, thus the regime is non adiabatic as Tc ≈ 0.57/(γC). At t = t2 the population ρrr gives η(t2). In this case the system has been simulated for a longer time interval: t2 = −t1 = 15Tc.
the Jaynes-Cummings dynamics, and is thus the periodic exchange of population between the atomic excited state |e and the cavity field. In Fig. 6(a) it is noticeable that the intensity of the optimized pulse exhibits a relatively high peak when the photon is impinging on the cavity. It corresponds to a way to perform impedance matching in order to maximize the transmission at the mirror, and it is related to the same dynamics which gives rise to the divergence of Ω F (t) and Ω D (t) which is found when they are applied in the non-adiabatic regime. After this the intensity of the control pulse vanishes and then exhibits a second maximum when the population of the excited state reaches the maximum: we verified that the area about this second "pulse" corresponds to the one of a π pulse, thus transferring the population into state |r .
We now investigate the limit of optimal storage. For this purpose we determine the lower bound T min c to the coherence time T c of the photon, for which a given efficiency η = η tr can be reached. For each value of g and T c we optimize the control pulse using GRAPE. For each g we determine η as a function of T c and then extract T min c = min Tc {T c : η(T c ) ≥ η tr }. We then analyse how the minimum coherence time T min c scales with the vacuum Rabi frequency g. Figure 7 displays the minimum photon coherence time T min c required for reaching the storage efficiency (a) η tr = 0.99 and (b) η tr = 2/3 as a function of the coupling constant g. We observe two behaviours, separated by the value g = κ: For g κ, in the bad cavity limit, we extract the functional behaviour T min c ∝ 1/γC = κ/g 2 . On the contrary, in the good cavity limit, g > κ, we find that T min c ∝ 1/κ: The limit to photon storage is here determined by the cavity linewidth. The general behaviour as a function of g interpolates between these two limits. This result shows that the photon can be stored as long as its spectral width is of the order of the linewidth of the dressed atomic state.

V. CONCLUSIONS
We have analysed the storage efficiency of a single photon by a single atom inside a resonator. We have focused on the good cavity limit and shown that, as in the bad cavity limit, the storage efficiency is bound by the cooperativity and the maximal value it can reach is given by Eq. (16). We have extended these predictions to the case in which the resonator undergoes parasitic losses. For this case we determined the maximal storage efficiency for an adiabatic protocol as well as the corresponding control field respectively given in Eq. (28) and Eq. (26). Numerical simulations show that protocols based on optimal control theory do not achieve higher storage efficiencies than η max . Nevertheless they can reach this upper bound even for spectrally-broad photon wave packets where the dynamics is non-adiabatic, as long as the spectral width is of the order of the linewidth of the dressed atomic state.
Our analysis shows that the storage efficiency is limited by parasitic losses. Nevertheless, we have demonstrated that these can be partially compensated by the choice of an appropriate control field. This result has been analytically derived for adiabatic protocols, yet it shows that extending optimal control theory to incoherent dynamics could provide new tools for efficient quantum memories. κ have been fitted with the functions f1(g) = aκ/g 2 and f2(g) = a /κ, respectively.
We note that the quantum impedance matching condition imposed by the authors of Refs. [17] consists in taking E out (t) =Ė out (t) = 0, according to which the form of the control pulse Ω F , Eq. (21), is found.

Effect of photon detuning on storage
The protocol Ω G (t) does not have any restriction on ∆: for every ∆ there is a pulse Ω G (t) that allows for storage with efficiency η max (within the adiabatic regime), see Eq. (25). Figure 8 displays the storage efficiency and the losses for each protocol as a function of ∆, as expected the protocol Ω G (t) performs in the same way for any values of ∆. A time-dependent phase χ(t) of the control pulse Ω(t) = |Ω(t)|e iχ(t) can be implemented as a two-photon detuning δ =χ(t). (A4) In fact, by applying the unitary transformationÛ (t) = exp (−i |r r| χ(t)), the transformed Hamiltonian isĤ = H I +Ĥ fields , wherê H I =χ(t) |r r| − ∆ |e e| + + (g |e g|â + |Ω(t)| |e r| + H.c.) .
For Ω G (t) we havė Recall that also |Ω G (t)| depends on ∆. This can be understood in terms of AC Stark shift: one-photon detuning ∆ = 0 is a shift of the control laser out of resonance for the transition |r − |e and thereby induces an AC Stark shift on the levels |e and |r of the atom; thus the condition of two-photon resonance does not hold anymore. In order to restore the latter, changes in frequency of the carrier and/or of the cavity and/or of the atomic levels are needed and they appear as a two-photon detuning in the Hamiltonian. This also explains why the reflected photon probability for the protocols Ω F (t) and Ω D (t) (see Fig. 8), which do not take into account the one-photon detuning, increases with increasing ∆: the input photon sees the system out of resonance and hence it is mostly reflected.
Eq. (A6b) gives the energy shift as a function of the Rabi frequency of the control pulse.