Rephasing efficiency of sequences of phased pulses in spin-echo and light-storage experiments
Genko T. Genov Daniel Schraft Thomas Halfmann








locale=US






 
    sech ı i eıie const∑→→↔121434ḍsech𝐔𝐅𝐇̋𝐜̧Ø𝒪C
        Scolor cmyk 1. .4 0 0color cmyk 0 0.81 1. 0.60color cmyk 1. 0 0 0color cmyk  0 0.10 0.84 0color cmyk 1 0 1 0
        color cmyk 1 0.3 0.5 0
        color cmyk 0 1. 1. 0color cmyk 0 0 0 1.color cmyk 0 0.8 0.5 0rms|#⟩1| #1 ⟩⟨#|1⟨ #1 |Πϕ←→→j_maxj_0ıiflhsrhs
        
        
        genko.genov@physik.tu-darmstadt.deInstitut für Angewandte Physik, Technische Universität Darmstadt, Hochschulstr. 6, 64289 Darmstadt, GermanyInstitut für Angewandte Physik, Technische Universität Darmstadt, Hochschulstr. 6, 64289 Darmstadt, Germanyhttp://www.iap.tu-darmstadt.de/nlqInstitut für Angewandte Physik, Technische Universität Darmstadt, Hochschulstr. 6, 64289 Darmstadt, Germany
        
        We investigate the rephasing efficiency of sequences of phased pulses for spin echoes
        and light storage by electro-magnetically induced transparency (EIT). We derive a simple theoretical model and show that the rephasing efficiency is very sensitive to the phases of the imperfect rephasing pulses. The obtained efficiency differs substantially for spin echoes and EIT light storage,
        which is due to the spatially retarded coherence phases after EIT light storage. Similar behavior is also expected for other light storage protocols with spatial retardation or for rephasing of collective quantum states with an unknown/undefined phase, e.g., as relevant in single photon storage. We confirm the predictions of our theoretical model by experiments in a Pr^3+:Y_2SiO_5 crystal.
        Rephasing efficiency of sequences of phased pulses in spin-echo and light-storage experiments
            Thomas Halfmann
            26 December 2018
        =============================================================================================
        
        
        
        
        
        § INTRODUCTION
        
        
        
        
        Sensing, processing, and communication of quantum information
        in realistic media usually suffers from dephasing processes due to unwanted interactions with the environment. Therefore, rephasing techniques are inherent part of many experimental protocols, e.g., for light storage <cit.>, quantum sensing <cit.>, or quantum information <cit.>.
        
        Pulse imperfections are often a major limitation to high fidelity rephasing <cit.>, leading to the development and implementation of robust rephasing schemes <cit.>. 
        Furthermore, the rephasing efficiency often depends on the initial quantum state of the system, e.g., with the widely used Carr‐Purcell‐Meiboom‐Gill (CPMG) sequence <cit.>. Pulse error compensation, e.g., with composite pulses, can sometimes work better for some initial states, but not for others <cit.>.
        Thus, the performance of rephasing sequences might differ in experiments where the initial state is usually known, e.g., spin echo, and when this is not the case, e.g., for quantum memories. Proper characterization of rephasing efficiency in the two cases is thus important. 
        
        The performance of rephasing sequences
        is usually analyzed theoretically by their single qubit fidelity <cit.>.
        The characterization is typically performed for rectangular pulses, specific errors (e.g., amplitude variation), and with the assumption that the qubits' phases are well-defined with respect to the rephasing pulses, e.g., in spin echo experiments <cit.>.
        Related theoretical investigations on the rephasing efficiency of collective atomic states with a single excitation were proposed recently <cit.>.
        To the best our knowledge, however, there are no investigations on the rephasing efficiency in the case of EIT light storage,
        where the initial phase can vary along the atomic ensemble or is unknown/undefined.
        This is especially important, e.g., for EIT quantum memories in atomic ensembles, where rephasing is applied to prolong storage time <cit.>.
        There is also no explicit comparison with the rephasing efficiency in spin echo experiments.
        
        In our work, we theoretically analyze the rephasing efficiency for spin echoes or EIT light storage. We confirm the theoretical findings by experiments in a doped solid.
        First, we develop a simplified theoretical model for the rephasing efficiency of a sequence of imperfect rephasing pulses for (a) spin echoes or (b) EIT light storage. 
        We then use it to derive explicit formulas for the rephasing efficiency of several example sequences.
        
        The model specifies the performance in terms of the population transfer efficiency
        and is, in principle, applicable to pulses of arbitrary shape.
        
        It shows a substantial difference between the two cases, which can be explained by variation of the initial phases of atomic coherences after EIT light storage, e.g., due to spatial retardation. Such variation is also expected in other light storage protocols, as well as in the absence of retardation effects when the phases of qubits vary or are undefined, e.g., as in single photon storage.
        
        Second, we performed an experimental investigation of rephasing efficiencies for spin echoes and EIT light storage in a Pr^3+:Y_2SiO_5 crystal (termed Pr:YSO hereafter).
        
        We used several variants of phased “detection” sequences to demonstrate the differences between the two cases.
        
        The experiments confirm the theoretical predictions, i.e., the rephasing efficiency is very sensitive to the phases of the imperfect rephasing pulses and differs significantly for spin echoes and EIT light storage.
        
        Finally, we discuss an example of rephasing by CPMG, applied in EIT light storage. We show explicitly that CPMG with pulse errors cannot efficiently preserve an arbitrary initial quantum state and, hence, is not appropriate to rephase quantum memories.
        
        
        
        
        
        
        § THEORY
        
        
        
        
        
        
         §.§ The System
        
        
        We consider an ensemble of non-interacting three-state systems, e.g., in a Λ-type atomic medium (see Fig. <ref>).
        
        The quantum states |1⟩ and |2⟩ are assumed long-lived and thus suitable for optical data storage.
        The individual atoms in the ensemble exhibit slightly different transition frequencies ω_12=ω_12+Δ, e.g., due to inhomogeneous broadening, where ω_12 is the center frequency of the ensemble and Δ is the frequency detuning of an individual atom.
        All atoms are initially prepared in state |1⟩ by an appropriate preparation, e.g., optical pumping.
        Then, a “write” process is applied,
        and the atom states can be characterized by the density matrix ρ(z,t=0),
        where z is the position of the atom and t=0 is the time immediately after the “write” process. The parameters ρ_11(z,t) and ρ_22(z,t) show the populations in state |1⟩ and |2⟩, respectively, while ρ_12(z,t)≡|ρ_12(z,t)|exp[ıξ(z,t)] is the slowly varying coherence of an atom in a frame rotating at an angular frequency ω_12, which has a phase ξ(z,t).
        
        For example, if the system is initially in state |1⟩ and we apply a “write” process by a resonant π/2 pulse with a phase ϕ_0, see Fig. <ref>(a), the coherence phase afterwards is ξ(z,t=0)=ϕ_0+π/2.
        
        In a typical storage experiment, we are interested in the expectation value of the dipole moment, i.e., μ_21⟨ρ_12(z,t)⟩ + c.c. with
        
            ⟨ρ_12(z,t)⟩= ∫_-∞^+∞ρ_12(z,t) g(Δ) Δ̣,
        
        where μ_21=⟨ 2|μ|1⟩ is the dipole moment on the |1⟩↔ |2⟩ spin transition, 
        g(Δ) describes the spectral distribution of the detunings in the inhomogeneous manifold of frequency ensembles, with ∫_-∞^+∞ g(Δ) Δ̣=1. We assume that g(Δ) has no spatial dependence and does not change with time. Then, if the system evolves freely after the “write” process, we obtain
        
            ⟨ρ_12(z,t)⟩=ρ_12(z,0)⟨^ıΔ t⟩,
        
        with ⟨^ıΔ t⟩=∫_-∞^+∞^ıΔ tg(Δ) Δ̣.
        
        It is obvious that the latter expression approaches 0 for times much greater than a characteristic dephasing time T_deph (depending on the spectral distribution g(Δ)) unless rephasing pulses are applied.
        
        
        
        
         §.§ Rephasing efficiency model
        
        
        
        In order to counter the effect of dephasing, we apply “rephasing” pulse(s) that enable preservation of ⟨ρ_12(z,t)⟩ for a storage time T_st≫ T_deph (see Fig. <ref>, right).
        Ideally, we use resonant pulse(s) on the |1⟩↔ |2⟩ spin transition for rephasing. In the following, the notation A(ϕ) denotes a pulse with a target pulse area of A and a relative phase ϕ.
        
        If (each of) the pulse(s) is resonant and has a pulse area of π the effect of dephasing is reversed for every atom.
        
        However, perfect resonant π-pulses are not possible in systems with large inhomogeneous broadening due to the different detuning Δ for the individual atoms.
        The efficiency can be further reduced by spatial inhomogeneity of the applied field.
        Hence, the driving pulse is no more a π-pulse for all atoms.
        In order to investigate the rephasing efficiency for sequences of time-separated phased pulses,
        we derive now a simplified theoretical model.
        
        The density matrix after a rephasing process is
        
            ρ(z,T_st)=𝐔_reph(z,T_st)ρ(z,0)𝐔_reph^†(z,T_st),
        
        where 𝐔_reph is a propagator that depends on the applied rephasing sequence and can vary for each atom due to variation in the individual detuning Δ and/or the inhomogeneity of the field (see Appendix, Sec. <ref>).
        
        
        
        
        
        If we apply a single rephasing pulse with a relative phase ϕ_1, i.e., a Hahn echo <cit.>, the coherence at the end of the process is given by Eq. (<ref>) and takes the form
        
            ρ_12^Hahn   (z,T_st)=a_0 +a_1 exp(ıδ)+a_2 exp(2ıδ),
            
            a_0   =-(1-ϵ)^2ı(β+ϕ_1)ρ^∗_12(z,0),
            
            a_1   =√(ϵ(1-ϵ))^ı(β+ϕ_1)[ρ_22(z,0)-ρ_11(z,0)],
            
            a_2   =ϵρ_12(z,0),
        
        where δ≡α+Δτ/2 is an accumulated phase for the particular atom during the pulse and the free evolution times τ/2 before and after the pulse.  The parameter ϵ≡ 1-p is the error in the transition probability of the pulse for a particular atom with p the probability that the atom is in state |2⟩ after applying the pulse if it was initially in state |1⟩. Finally, α, β are phases that depend on the pulse characteristics (see Appendix, Sec. <ref>). We are interested in
        
            ⟨ρ^Hahn_12(z,T_st)⟩   ≈⟨ a_0 ⟩+⟨ a_1⟩⟨exp(ıδ)⟩+⟨ a_2 ⟩⟨exp(2ıδ)⟩
            ≈⟨ a_0 ⟩   =-e^ıϕ_1⟨ (1-ϵ)^2ıβ⟩ρ^∗_12(z,0),
        
        where we used the approximation ⟨ a_1exp(ıδ)⟩≈⟨ a_1⟩⟨exp(ıδ)⟩, i.e., exp(ıδ) varies much faster than a_1 and a_2 when we perform the integration, defined in Eq. (<ref>). This is feasible, e.g.,
        if the time τ>T_deph, which we use in the last step to make ⟨exp(ıδ)⟩→ 0. We note that the latter assumption might not hold when the time between the rephasing pulses is short, but even then the contribution of the higher order terms will be small when ϵ→ 0. We also assumed for simplicity that the coherence ⟨ρ_12(z,0)⟩≈ρ_12(z,0).
        We note the latter might not always be fulfilled, e.g., as the “write” pulse for spin echo is typically also imperfect. Nevertheless, we neglect this effect as it is usually small for the ratio ⟨ρ_12(z,t)/ρ_12(z,0)⟩, which we use in our analysis. Furthermore, we are interested in the efficiency of the rephasing pulses only.
        Finally, we assumed that the phase ϕ_1 is the same for all atoms, which is usually feasible.
        
        We derive expressions for the coherences after rephasing for sequences of n time-separated rephasing pulses in a similar way
        
            ⟨ρ_12(z,T_st)⟩ =
            ⟨ a_0 ⟩+∑_m=1^2n⟨ a_mexp(ı mδ)⟩≈⟨ a_0 ⟩,
        
        neglecting all higher order terms of the expansion ⟨ a_mexp(ı mδ)⟩→ 0 due to the fast variation in mδ for the different atoms at position z in the medium in comparison to a_m. This is our main assumption that allows significant simplification. It is usually feasible for time separation τ>T_deph or ϵ→ 0.
        
        In the next subsections, we use our theoretical approach to investigate the rephasing efficiency in two different cases: (a) for atomic coherences with phases well defined with respect to the subsequent imperfect rephasing π pulses, e.g., as in spin echo experiments (see Fig. <ref>a), and (b) light storage, e.g., by electro-magnetically induced transparency (EIT), where the relative phase of the created coherence is usually varying/unknown with respect to the phases of the rephasing pulses (see Fig. <ref>b).
        
        
        
        
        
         §.§ Rephasing efficiency for spin echo experiments
        
        
        We assume now, that the coherence phase ξ(z,0) after a “write” process is the same for all atoms in the storage medium and it is well defined with respect to the phases of subsequent rephasing pulses. For example, if the system is initially in state |1⟩ and we apply a π/2(ϕ_0) pulse on the |1⟩↔|2⟩ transition, with a pulse duration much shorter then the dephasing time, and pulse wavelength much longer than the medium length, we have ξ(z,0)≈ϕ_0+π/2 all across the medium.
        We determine the rephasing efficiency by the ratio
        η_r
        =|⟨ρ_12(z,T_st)⟩/ρ_12(z,0)|,
        
        This definition is an appropriate choice also for our experimental implementation, which uses Raman-heterodyne (RH) detection. The magnitude of the detected RH amplitude is proportional to the magnitude of the coherence at the end of the storage time <cit.>.
        
        The efficiency of rephasing with a single pulse (usually termed Hahn echo) is obtained from (<ref>) and takes the form 
        η_r^Hahn=|⟨ (1-ϵ)^2ıβ⟩|,
        
        where the brackets imply averaging of the respective parameter for the different atoms in the ensemble, e.g., ⟨ϵ⟩ = ∫ϵ g(Δ)Δ̣ is the averaged error in the transition probability because of variation in the detuning Δ, e.g., due to inhomogeneous broadening. We note, that averaging over variations of the Rabi frequency or other experimental parameters can also be taken into account in a similar way.
        Then, a rephasing pulse that performs perfect population transfer ϵ=0 for all atoms would yield η_r^Hahn=1, assuming small variation in β. This is the case for rectangular rephasing pulses, i.e., β=-π/2 (see Appendix, Sec. <ref>), which we assume further on for simplicity.
        
        We note for completeness, that the assumption of small variation of β is not always feasible, e.g., when we apply a chirped rephasing pulse. Then, β can vary significantly because of the dynamic phase due to the chirped pulse (see Appendix, Sec. <ref>). Thus, the efficiency of Hahn echo suffers, which has also been confirmed in previous experiments <cit.>.
        
        We apply the same approach to calculate the rephasing efficiency for the widely used CPMG sequence <cit.>. It usually consists of two time-separated resonant pulses, each ideally with a pulse area of π, which we denote [π(ϕ_1)-π(ϕ_2)].
        
        We note that rephasing with CPMG can also be applied with adiabatic chirped pulses, where each performs population inversion <cit.>. Then, the pulse area is usually much greater than π to satisfy the adiabatic condition <cit.>.
        
        We also note that throughout this work we refer to spin echo as an experiment where there is a well-defined relation between the phase of the first coherence creation π/2 pulse and the phases of the subsequent rephasing π-pulses. The spin echo signal can be obtained with different rephasing π-pulse sequences, e.g., CPMG with two π-pulses (shown in Fig. <ref>), and does not refer solely to the Hahn sequence where we use a single rephasing π-pulse.
        
        We choose ϕ_1=0 without loss of generality and obtain 
        
        
            η_r^CPMG=|⟨ (1-ϵ)[1+ϵ-2ϵ(1+^-ı(2ϕ_0+ϕ_2))]⟩|.
        
        Again, a rephasing pulse that performs perfect population transfer (ϵ=0) yields η_r^CPMG=1. Unlike Hahn echo, this condition is also sufficient for chirped pulses where the dynamic phase from the first pulse is canceled by the second pulse <cit.>.
        
        
        There is also another difference compared to the Hahn echo: the rephasing efficiency with imperfect pulses now depends on the phase relation between the “write” pulse ϕ_0 and the phase ϕ_2 of the second rephasing π-pulse. When 2ϕ_0+ϕ_2=0, the efficiency is lowest and given by
        
        
            η_r^CPMG=|⟨ (1-ϵ)(1-3ϵ)⟩|.
        
        The original Carr-Purcell <cit.> sequence π/2(0)-π(0)-π(0) is an example for this case. We note that a phase ϕ_k=0 of a pulse ideally implies rotation around the the X axis of a Bloch sphere (see Fig. <ref> (left)). Thus, if the system was initially in state |1⟩ and we apply a π/2(ϕ_0=0)“write” pulse, the Bloch vector will then point along the Y axis of the Bloch sphere and the “bad” initial coherence phase will be ξ(z,0)≈ϕ_0+π/2=π/2. Figure <ref> (left, top)) provides intuition for the underlying reason for the worse performance for the Carr-Purcell sequence.
        Then, the pulse error of the second rephasing π(0) pulse adds up to the error of the first π(0) pulse.
        
        When the 2ϕ_0+ϕ_2=π, the efficiency is improved and given by
        
        
            η_r^CPMG=⟨ 1-ϵ^2⟩.
        
        The improved CPMG sequence, originally proposed by Meiboom and Gill <cit.>, π/2(π/2)-π(0)-π(0), is an example of this case. 
        
        After a π/2(ϕ_0=±π/2)“write” pulse, the Bloch vector will point along the X axis of the Bloch sphere and the “good” initial coherence phase will be ξ(z,0)≈ϕ_0+π/2=0 or π. Figure <ref> (left, bottom)) provides intuition for the improved performance. The quantum state after the “write”π/2 pulse is closely aligned with the torgue vector of the rephasing pulses, so the second rephasing π(0) pulse partially compensates the error of the first π(0) pulse for the particular initial state along the X axis.
        
        Our analysis so far showed that CPMG efficiency depends on the value of 2ϕ_0+ϕ_2. This result implies that choosing a different phase of the second rephasing π-pulse cannot improve performance for an arbitrary initial coherence phase. A different choice of ϕ_2 only shifts the “good” value of ϕ_0 (and thus of ξ(z,0)).
        
        For example, one can naively think that the CPMG-2 sequence π(0)-π(ϕ_2=π), also termed X-(-X), would perform better than CPMG 
        
        as the second π-pulse of CPMG-2 has ideally an opposite rotation axis to the first π-pulse.
        Indeed, CPMG-2 can compensate pulse area errors for arbitrary states but only for resonant pulses and negligible dephasing between the pulses.
        However, its error compensating mechanism fails in the case of significant dephasing during or between the imperfect π-pulses, e.g., due to inhomogeneous broadening.
        
        In the latter case, which we analyze, the sequence π/2(0)-π(0)-π(π) has improved efficiency as 2ϕ_0+ϕ_2=π and the second rephasing π(π) pulse partially compensates the error of the first π(0) pulse. In other words, CPMG-2 has improved performance when the initial Bloch vector after the “write” pulse points along the Y axis of the Bloch sphere, so the “good” initial coherence phase is ξ(z,0)=±π/2. However, the sequence π/2(π/2)-π(0)-π(π) now has a worse efficiency as 2ϕ_0+ϕ_2=0 (mod 2π). Thus, we achive a worse performance with CPMG-2 when the initial Bloch vector points along the X axis of the Bloch sphere, so the “bad” initial coherence phase is now ξ(z,0)=0 or π. As the “good” and “bad” initial coherence phases are only shifted in comparison to standard CPMG, rephasing by CPMG-2 will have the same efficiency when averaged over different ϕ_0 (and thus over ξ(z,0)).
        
        In summary, our analysis showed that π(0)-π(ϕ_2) has improved performance when 2ϕ_0+ϕ_2=π (mod 2π), i.e., the “good” initial coherence phase is ξ(z,0)=ϕ_2/2+π k,k ∈ℤ. However, its performance suffers when 2ϕ_0+ϕ_2=0 (mod 2π), i.e., for the “bad” initial coherence phase ξ(z,0)=(π+ϕ_2)/2+π k,k ∈ℤ.
        
        The performance of CPMG for ϕ_0=0 and different ϕ_2 is demonstrated further below in the experimental section and confirms our theoretical predictions. 
        
        We can derive analytical formulas also for three and more pulses, but will not discuss the rather complicated features here.
        The simulated rephasing patterns for a sequence of four pulses is also shown further below
        
        in the experimental section.
        
        
        Finally, we analyze the case for repeated application of CPMG, e.g., for dynamical decoupling.
        We denote the CPMG sequence, repeated N times, as [π(0)-π(0)]^N. The repetition of CPMG with imperfect pulses will lead to even more pronounced differences in the rephasing efficiencies vs. phase of the initial coherence, as shown in Eqs.(<ref>) and (<ref>). Assuming a small variation in ϵ (ϵ 0) for the different atoms and N→∞, it is possible to show that
        
        
            η_r   → 0,              ξ(z,0)=π/2+π k,
            η_r   ≈ 1-⟨ϵ⟩/√(2),  ξ(z,0)=π k,
        
        where in the last approximation we neglected the effect of the higher moments of ϵ, which is usually valid, e.g., when ⟨ϵ^k⟩≪⟨ϵ⟩, k=2,3,… and ϵ⪅ 0.5. Thus, rephasing of the “good” phase does not suffer from repeated application of the CPMG sequence, also with pulse errors. Every second pulse approximately cancels the error of the previous pulse for the specific initial state, determined by the rotation axis of the CPMG pulses (see Fig. <ref>(left, bottom)) <cit.>. Thus, applying many CPMG sequences with pulse errors in an ensemble effectively projects (spin-locks) the quantum state of the atoms onto this quantum state, i.e., onto the state with the “good” phase.
        
        
        
        
        
         §.§ Rephasing efficiency for EIT light storage
        
        
        Control over the phase of the initial coherences after the “write” process cannot be achieved with light storage where the phase ξ(z,0) is unknown with respect to the applied rephasing pulses and/or is spatially retarded. This is typical for many light storage protocols, e.g., atomic-frequency combs (AFC) or electromagnetically-induced transparency (EIT). Our analysis focusses on EIT light storage, i.e., when the coherence phase ξ(z,0) varies due to spatial retardation. We will discuss other possible scenarios in section <ref>.
        
        Light storage by EIT is implemented in a Λ-type atomic medium (see Fig. <ref>(b)), where the atoms are initially prepared with all population in the ground state |1⟩<cit.>. EIT uses a strong control pulse, tuned to the transition between the ground state |2⟩ and an excited state |e⟩.
        
        The probe and control pulse are assumed phase coherent, e.g., they can be derived from the same laser source.
        
        The coherent interaction with the control pulse makes the medium transparent for a probe pulse on the |1⟩↔|e⟩ transition and reduces its group velocity. Thus, the probe pulse is compressed in the storage medium.
        
        By reducing the control pulse intensity adiabatically, the “slow light” probe pulse is “stopped” and converted into an atomic coherence of the quantum states |1⟩ and |2⟩ along the probe propagation path z in the atomic medium. This establishes a spin wave of spatially distributed atomic coherences ρ_12(z,0) in the medium, which contains all information of the incoming probe pulse. This is usually termed the “write” process of EIT light storage and in the perfect case it maps <cit.>
            ℰ_probe(z,0)→√(N/V)ρ_12(z,0)^ıΔ k z,
        
        where ℰ_probe(z,t) is the electric field envelope of the probe pulse, N/V is the number density of atoms, ρ_12(z,t) is the coherence at position z in the ensemble, Δ k=(𝐤_probe-𝐤_c,write)_z is the phase mismatch between probe and control “write” beams along the z propagation axis of the probe beam, e.g., due to the geometry of the experiment (see also Fig. <ref>(b,c)).
        We assume without loss of generality that ℰ_probe(z,0) is real.
        The coherence phase ξ(z,0)=-Δ k z is spatially retarded and vary along z (see also Fig. <ref>, top).
        
        During a storage time T_st, we “rephase” our coherences by applying a sequence of time-separated pulses analogously to the previous section.
        
        The spin wave is then read out by applying a control read pulse to beat with the atomic coherences and generate a signal pulse on the |1⟩↔|e⟩ transition.
        
            -√(N/V)⟨ρ_12(z,T_st)⟩^ıΔ k z→ℰ_signal(z,T_st).
        
        
        The light storage efficiency is typically determined by the ratio of the energy of retrieved photons after storage vs. the energy of the photons of the input probe pulse <cit.>.
        
            η_ls=∫_T_st^∞| ℰ_signal(z=L,t)|^2ṭ/∫_-∞^0|ℰ_probe(z=0,t)|^2ṭ,
        
        where z=0 and z=L are the beginning and end of the storage medium.
        If the mapping of the probe field to atomic coherences during the “write” and “read” steps is perfect, the overall light storage efficiency would correspond to the rephasing efficiency and we obtain for the latter (see Appendix, Sec. <ref>)
        
            η_ls=|∫_0^L⟨ρ_12(z,T_st)⟩^ıΔ k zẓ|^2/|∫_0^Lρ_12(z,0)^ıΔ k zẓ|^2.
        
        We note, that in case of imperfect pulses the overall light storage efficiency would be lower than the rephasing efficiency, e.g., due to reabsorption of the probe pulse as the system will not be perfectly aligned with the dark state, required for EIT, during readout.
        
        We can further simplify Eq. (<ref>) by change of variables Δ k z→ -ξ(z,0) and by assuming that the phases of the coherence after the “write” process ξ(z,0) are equally distributed between 0 and 2π. The latter is a valid assumption in the limit of large spatial retardation Δ k L≫ 2π (see Fig. <ref>), which is often feasible, e. g., due to
        the geometry of the experimental setup when there is an angle between the probe and control fields. We also assume for simplicity that |ρ_12(z,0)| does not vary much along the usually small distance where Δ k z changes from 0 to 2π. Thus, the rephasing efficiency in the approximation of equal coherence phase distribution becomes (see Appendix, Sec. <ref>)
        
            η_ls=|1/2π∫_0^2π⟨ρ_12(z,T_st)⟩/ρ_12(z,0)ξ̣(z,0)|^2.
        
        Next, we use the above analytical formulas to estimate the efficiency for several imperfect rephasing sequences applied for EIT light storage.
        
        First, we analyze the rephasing efficiency of a single rephasing pulse, i.e., the well-known Hahn echo <cit.> for EIT light storage. Figure <ref> shows a simulation for the spatial variation of the magnitude of the coherence ratio ⟨ρ_12(z,T_st)⟩/ρ_12(z,0) and the phase ⟨ξ(z,T_st)⟩ along the propagation axis of the probe pulse after Hahn echo rephasing. As noted in the previous section, the magnitude of the final coherence after Hahn echo does not depend on the initial phase. However, the final phase is inverted, i.e., ⟨ξ(z,T_st)⟩=-ξ(z,0). Then, phase matching implies that the individual atomic dipoles along the axis of probe field propagation will not be properly phased during standard forward readout and, thus, their emission cannot add up coherently in the propagation direction of the signal field. We then use Eqs. (<ref>) and (<ref>) to estimate the rephasing efficiency
        
            η^Hahn_ls   =|1/L∫_0^L⟨(1-ϵ)⟩^2ıΔ k zẓ|^2
            
               ≈⟨(1-ϵ)⟩^2|^2ıΔ k L-1/2Δ k L|^2,
        
        where again ϵ≡ 1-p is the error in the transition probability of the rephasing pulse for a single atom and we assumed that ϵ varies much more slowly that Δ k z in the last calculation step. We also assumed that β=-π/2 for any z. This is the case when we apply a short rectangular-shaped pulse in time, and the frequency of the |1⟩↔ |2⟩ transition is in the radio frequency (rf) regime, i.e., the wavelength is much longer than the medium. In the limit of large spatial retardation Δ k L≫ 2π the rephasing efficiency becomes
        
            η^Hahn_ls→ 0.
        
        We note that rephasing by a Hahn echo is also expected to work inefficiently for light storage because of reabsorption of the signal field during retrieval, as the populations of states |1⟩ and |2⟩ are interchanged and the system will not be in the dark state, required for EIT.
        
        Next, we estimate the rephasing efficiency for the CPMG sequence [π(0)-π(ϕ_2)]. Figure <ref> shows an example for the spatial variation of coherences along the propagation axis of the probe pulse after CPMG with pulse errors (ϕ_2=0), simulated from Eq. (<ref>). The rephasing efficiency varies along z as the performance of CPMG is then highly dependent on the initial coherence phase. As a result, the final coherence magnitude exhibits a distinct grating-like pattern, with the highest magnitude corresponding to the “good” phases ⟨ξ(z,T_st)⟩→ 0 or π. Additionally, the phases of the final coherences also tend to these “good” phases. Thus, applying a CPMG sequence (ϕ_2=0) with pulse errors effectively partially projects the quantum states of the individual atoms onto the quantum state, determined by the rotation axis of the CPMG pulses, making ⟨ξ(z,T_st)⟩→ 0 or π. We use Eqs. (<ref>) and (<ref>)
        to obtain the overall rephasing efficiency for light storage
        
            [π(0)-π(ϕ_2)]: η^CPMG_ls=⟨(1-ϵ)^2⟩^2.
        
        It is notable, that the light storage rephasing efficiency does not depend on the phase ϕ_2 of the second rephasing pulse - in contrast to the spin echo case (see Eqs. (<ref>) and (<ref>)). For example, the performances of CPMG (ϕ_2=0) and CPMG-2 (ϕ_2=π) rephasing sequences applied to light storage are equal while they worked differently for spin echoes. The reason is that the rephasing efficiency for EIT light storage is averaged over all possible coherence phases in the medium, e.g., due to the spatial retardation.
        
        Similarly, we can estimate the rephasing efficiencies for sequences of three and more time-separated pulses. We apply the same assumptions as for CPMG and obtain
        
            [π(0)-π(ϕ_2)-π(0)]: η_ls=⟨ 4ϵ(1-ϵ)^2cos(ϕ_2)⟩^2,
               [π(0)-π(ϕ_2)]^2:
               η_ls=|⟨(1-ϵ)^2(e^4ıϕ_2(1-ϵ)^2
            +6ϵ^2+4^2ıϕ_2ϵ(2ϵ-1))⟩|^2,
        
        where the index in [π(0)-π(ϕ_2)]^2 denotes twice application of the CPMG sequence. The rephasing efficiency of sequences of more pulses and with other phases can be calculated in an analogous way.
        
        Explicit analytical formulas for several robust sequences are included in Table <ref> in the Appendix, Sec. <ref>.
        
        
        Finally, we consider the rephasing efficiency of CPMG, repeated many times, e.g., for dynamical decoupling. The repeated sequence CPMG [π(0)-π(0)]^N leads to more pronounced differences in the rephasing efficiency vs. initial coherence phase, as shown in Eqs.(<ref>) and (<ref>). Assuming a small variation in ϵ for the different atoms,
        we deduce the rephasing efficiency for [π(0)-π(0)]^N, applied to light storage, for very large N as
        
            [π(0)-π(0)]^N: η_ls≈⟨1-ϵ/√(2)/2⟩^2
        
        In the above approximation we neglected the effect of higher moments of ϵ, similarly to the spin echo case. Thus, for large N, the number of repetitions of the CPMG sequence with pulse errors does not matter. The often repeated CPMG sequence effectively projects (spin-locks) the quantum states of the atoms onto the quantum state, determined by the rotation axis of the CPMG pulses, i.e., onto a state with the “good” phase (see Eqs. (<ref>)).
        
        In summary, we derived a simplified theoretical model for the rephasing efficiency of sequences of pulses in atomic ensembles in two cases:
        (a) when the individual atoms' quantum states exhibit the same, well-defined phase with respect to the rephasing pulses, e.g.,
        in a spin echo experiment,
        and (b) when the phases of the individual coherences vary, e.g., due to spatial retardation, for light storage by electro-magnetically induced transparency (EIT). We find, that the rephasing efficiency is very sensitive to the phases of the imperfect rephasing pulses. The behaviour of the rephasing efficiency differs significantly for spin echoes or EIT light storage.
        In the following, we verify the theoretical predictions by rephasing experiments for spin echo and EIT light storage in a doped solid.
        
        
        
        
        
        § EXPERIMENTAL DEMONSTRATION
        
        The experiments are performed in a Pr:YSO crystal with a length of 3.2 mm and a dopant concentration of 0.05 at.% praseodymium. The crystal is mounted in a liquid-helium cryostat and held at temperatures of about 4 K to reduce phononic excitations. Figure <ref>(a) shows the relevant part of the level scheme of a Pr^3+ ion. The optical transition between the electronic ground state ^3 H_4 and the excited state ^1 D_2 is at a wavelength of 605.98 nm.
        The population lifetime of the ground state ^3 H_4 is of the order of T_1≈ 100 s <cit.>.
        Local variations in the crystal field for the different Pr^3+ ions lead to inhomogeneous broadening of both the optical (Γ_opt≈ 7 GHz) and spin transitions.
        The latter is of the order of kHz and leads to a dephasing time of the spin coherence on the hyperfine transitions of the order of
        
        T_deph≡ T_2^*≈ 10 μs.
        Additionally, stochastic magnetic interactions between the dopant ions and the host matrix lead to a decoherence time of T_2≈ 500 μs <cit.>. 
        Figure <ref>(b) shows a simplified setup of the optical beam path and rf coils next to the crystal in the experiment. For more details on the experimental setup, including the generation of optical and rf pulses, as well as the optical preparation of the medium see <cit.>.
        
        Each experimental cycle starts with an optical pump sequence to prepare the system in the initial state |1⟩. Afterwards, we perform three steps, i.e., “write”, “rephasing” and “read” (see Fig. <ref>). The “write” and “read” processes are different for (a) spin echo and (b) EIT light storage, while the “rephasing” processes are the same for both storage protocols.
        
        In the spin echo rephasing experiments, we apply a radio frequency (rf) π/2 pulse with a phase ϕ_0 during the “write” step to generate a maximum coherent superposition between states | 1⟩ and | 2 ⟩ (see Fig. <ref>(a)).
        Unless explicitly otherwise noted, we store the atomic coherences for a storage time of T_storage=600 μs, which is much longer than the dephasing time of T_deph≈ 10 μs.
        In order to reverse the effect of dephasing during the storage time, in the “rephasing” step we apply ideally resonant rf pulses, each with a pulse area of π. The relative phases between the pulses serve as control parameters to drive and compare different types of rephasing sequences, as discussed in the theory section above.
        
        Since we “wrote” the atomic coherence by a rf pulse with full experimental control of the waveform, we have a precisely defined relative phase between the atomic coherences after the “write” step and the rf rephasing pulses <cit.>. We note, that such precisely defined relative phases between storage and rephasing pulses are, in principle, also possible in appropriate setups with optical pulses <cit.>.
        
        Unless otherwise noted, the rephasing pulses in all measurements have a rectangular shape in time, a target pulse area of π, pulse duration of T=3.2μs, corresponding to a Rabi frequency of Ω≈ 2π 156 kHz, optimized for the highest light storage efficiency with CPMG. The time separation between the pulses is variable, depending on the specific sequence, while the latter always fit in the fixed storage time T_st. In the “read” step for spin echoes, we use an optical detection field
        to detect and measure the spin coherence on the | 1⟩↔| 2 ⟩ by RH detection <cit.>.
        
        The detection field scatters at the spin coherence to generate a Stokes field on the | 1⟩ and | e ⟩ transition. Stokes and detection field interfere with each other to provide a beating pattern, which we observe on a photo diode and demodulate by a lock-in amplifier. The magnitude of the signal is proportional to the magnitude of the coherence on the |1⟩↔ |2⟩ transition at the end of the storage time <cit.>. We note, that the rephasing efficiencies are reduced due to inhomogeneous broadening of the spin transition and
        the spatial inhomogeneity of the rf field along the crystal.
        
        For EIT light storage, we “write” atomic coherences on the | 1⟩↔| 2 ⟩ transition by Raman-type two-photon interaction of a weak classical probe pulse and a strong classical control pulse in the Λ-type level scheme (see Fig. <ref>(b)).
        
        Figure <ref>(c) shows the phase matching condition for EIT light storage and retrieval. The geometry of the experiment leads to a large Δ k=(𝐤_probe-𝐤_c,write)_z, i.e., phase mismatch between to probe and control “write” beams along the z propagation axis of the probe beam.
        
        The coherence phase ξ(z,0) after EIT light storage then varies in the storage medium due to spatial retardation along the propagation axis of the probe pulse. The effect is quite large in our specific experiment due to the counter-propagating probe and control beams,
        i. e., Δ k≈ 2k_probe, so Δ k L≈ 10^7, where L≈ 3.2 mm is the crystal length.
        (see Fig. <ref>(b,c)).
        
        The “rephasing” sequences for EIT light storage are the same as in the case of spin echoes. In order to “read” the optical memory, we again apply the strong optical control “read” pulse in the same direction as in the “write” step
        
        (forward readout). Despite the large Δ k, if the readout phase matching condition 𝐤_signal=Δ 𝐤+𝐤_c,write is satisfied, the control “read” pulse beats with the atomic coherences and generates a signal pulse in the same direction as the probe field (see also Fig. <ref>(c)) <cit.>.
        
        We present now measurements of the rephasing efficiency for different rephasing sequences and compare them with the theoretical results, in both cases of spin echoes and EIT light storage. In the first experiment we investigate spin echoes, applying a rf π/2“write” pulse of a pulse duration 1.6μs to drive maximal atomic coherences. We varied the phase ϕ_0 of the rf “write” pulse, while keeping the phases of all subsequent rephasing pulse(s) constant (we take ϕ_k=0,k 0 without loss of generality).  The experimentally obtained rephasing efficiency vs. phase of the initial coherence is shown in Fig. <ref>, along with the theoretically expected dependence. As expected,
        
        the rephasing efficiency of CPMG varies significantly with ϕ_0. It reaches a maximum for 2ϕ_0+ϕ_2=π, i.e., ϕ_0=±π/2 and a minimum for 2ϕ_0+ϕ_2=2π k, i.e., ϕ_0=π k, k∈ℤ. The experimental data fit very well the simulation based on Eq. (<ref>) with ⟨ϵ⟩=ϵ=0.1 (for simplicity we assumed ⟨ϵ^k⟩≈⟨ϵ⟩^k).
        We note, that our simulations are normalized to the extrema of the experimental data to exclude perturbing effects beyond dephasing, e.g., stochastic phase fluctuations. In Pr:YSO, the latter is caused by random changes in the transition frequencies due to spin flips in the host lattice <cit.>.
        
        In a modified version of the spin echo experiment, we again applied a rf π/2“write” pulse, but kept its phase ϕ_0=ϕ_2k+1=0,k∈ℕ. Instead, we varied now the phases ϕ_2k≡ϕ of all even π pulses in the rephasing sequences. Fig. <ref>(a) shows the experimental results for single and double application of a GPMG sequence [π(0)-π(ϕ_2)], i.e., with two or four pulses. Similarly to the previous experiment, the rephasing efficiency of CPMG varies clearly with phase ϕ_2. For the single two-pulse CPMG sequence, we observe a maximum for 2ϕ_0+ϕ_2=π, i.e., ϕ_2=±π, and a minimum for 2ϕ_0+ϕ_2=2π k, i.e., ϕ_2=2π k, k∈ℤ (see black data points in Fig. <ref>(a)).
        
        The dependence of the rephasing efficiency vs. phase becomes more complicated for a double four-pulse CPMG sequence, showing several and very pronounced extrema (see green data points in Fig. <ref>(a)). As expected, repeated application of CPMG sequences yields a much stronger variation of the performance with phase. Also here, the simulations confirm the experimental findings. We note, that the rephasing efficiency for a double CPMG sequence is higher compared to a single CPMG sequence - although pulse errors are expected to add up for the longer sequence. However, the improvement is due to the shorter time separation between the pulses for the longer sequence in order to keep the total duration of any sequence in the fixed storage time. The shorter pulse separation reduces the effect of stochastic phase fluctuations between the pulses in a sequence <cit.>.
        
        We shift our attention now to rephasing in EIT light storage experiments. Similarly to the spin echo measurement discussed before, we varied the phases ϕ_2k≡ϕ of all even pulses in CPMG [π(0)-π(ϕ_2)] rephasing sequences, while keeping ϕ_2k+1=0 fixed. Figure <ref>(b) shows the results of these measurements. We first consider application of the single two-pulse CPMG sequence (see black data points in Fig. <ref>(b)). The dependence upon the phase is flat, i.e., very different to spin echoes. As already discussed in theory section, this difference is due to averaging over all possible coherence phases in the medium generated by EIT light storage involving spatial retardation. However, the flat dependence changes for the double, i.e., four-pulse, CPMG sequence (see green data points in Fig. <ref>(b)). It exhibits a strong variation of the rephasing efficiency with phase - though still different from spin echoes. Also a triple, i.e., six-pulse, CPMG sequence (see red data points in Fig. <ref>(b)) reveals similar oscillation of the rephasing efficiency.
        The data fit well to the numerical simulations of all sequences, i.e., confirming our theoretical model.
        
        
        
        
        In a concluding measurement we varied the number of rephasing pulses with zero phases for a total storage time of T_st=300 μs.
        
        According to theory, sequences with an odd number of perfect π pulses (e.g., a single pulse as in a Hahn echo) yield no light storage signal at all. This is due to phase-mismatch and inversion of the ground states populations, as already discussed in the theory section. Hence, only sequences with an even number of pulses are applicable for quantum memory in our experiment.
        
        Figure <ref> confirms our theoretical predictions that we indeed obtain no signal with a single rephasing pulse.
        However, we obtain a small signal for sequences with a higher number of odd pulses, e.g., three, five, which is due to pulse errors.
        We also found, that the light storage efficiency for repeated CPMG sequences, i.e., of more than 10 single pulses, does not depend significantly on whether we use an odd or an even number of them. This confirms the prediction that CPMG is significantly affected by pulse errors.
        
        After several repetitions the quantum state of each atom is “projected” (spin-locked). This is confirmed by a numerical simulation (see the inset of Fig. <ref>), which shows the average Bloch vector of an atomic ensemble (green dot) for different initial states on the Bloch sphere. As noted in the theory section, the overall light storage efficiency is expected lower than the maximal rephasing efficiency in Eq. (<ref>), due to reabsorption of the retrieved signal, which is not taken into account in our model. After the “projection”, the rephasing efficiency of CPMG at the specific storage time does not depend on the number of pulses. We note that a similar spin-lock effect exists with the CPMG-2 but the projection is on the Y axis of the Bloch sphere.
        
        
        
        
        § DISCUSSION
        
        In our analysis, we assumed that the phase of the atomic coherence ξ(z,0) varies substantially in the medium, due to spatial retardation along the propagation axis of the probe pulse. The latter effect is quite large in our specific experiment, due to the counter-propagating probe and control beams.
        In case of co-propagating beams, the angle between the two beams can realistically be of the order of at least θ≈ 1^∘ (see Fig. <ref>(b)), which implies Δ k L≈ 5>π, where Δ k≈ k_pr(1-cosθ), L=3.2 mm. Hence, in this case spatial retardation will be smaller, but still significant.
        
        The above findings are also relevant to other light storage protocols involving retardation effects, e.g., atomic frequency combs <cit.>), by taking into account the specific characteristics of the protocol, e.g., phase matching conditions.
        
        Moreover, our approach is applicable also beyond the specific effect of spatial retardation. As an example we note that the estimation of rephasing efficiencies by integration over all possible initial coherence phases ξ(z,0), similarly to Eq. (<ref>), is also applicable when the initial coherence phase is not defined. This is relevant for rephasing of collective quantum states with a well defined number of excitations <cit.>, e.g., for highly symmetric Dicke states after single or few photon storage. Specifically, it is well known that an incoherent average over the phase ξ(z,0) of a collective Bloch state can be used to represent a mixture of symmetric Dicke states <cit.>. The statistical distribution of the latter can be sharply peaked when the number of atoms is large and the number of collective excitations is small. Thus, it is justified to approximate the rephasing efficiency for a collective entangled state after single photon storage with the rephasing efficiency of a phase-averaged Bloch state, as shown in <cit.>. Our theoretical approach is applicable also in these cases.
        
        
        
        
        
        § CONCLUSION
        
        In conclusion, we investigated the efficiency of imperfect rephasing pulse sequences in atomic ensembles
        for (a) spin echoes and (b) light storage by electro-magnetically induced transparency (EIT) in a doped solid crystal. We developed a simplified theoretical model for the rephasing efficiency in both cases. We found, that the rephasing efficiency varies considerably with the relative phase between the atomic coherences and the applied rephasing pulses. Moreover, the behaviour of the rephasing efficiency vs. phase differs significantly for coherences generated by spin echoes or EIT light storage.
        While spin echoes provide well-defined phases with respect to the rephasing pulses, in EIT light storage spatial retardation of the phases of individual coherences plays a crucial role. We confirmed the theoretical predictions by experimental implementations of rephasing for spin echoes and EIT light storage in a Pr:YSO crystal. The data clearly prove the differences between rephasing for spin echoes and EIT light storage. We compared the behaviour of sequences of CPMG pulse pairs, either with pulses of equal phases or phase shifts inbetween, as well as longer pulse sequences with a variable number of pulse pairs. Finally, we demonstrated the spin-locking effect of dynamical decoupling with CPMG pulse pairs in EIT light storage. CPMG dynamical decoupling with pulse errors permits long storage times of selected coherences, but is not appropriate to rephase states with an arbitrary phase, as relevant, e.g., in quantum memories. The experimental data fit well with numerical simulations based on our theoretical model. The findings are of relevance also for other light storage protocols, whenever the initial phase of the quantum state varies along the storage medium, or whenever the initial phase is not precisely defined.
        
        
        The authors thank B. W. Shore, N. V. Vitanov, M. Hain and S. Mieth for useful discussions. This work is supported by the Alexander von Humboldt Foundation and a Career Bridging Grant of the Technische Universität Darmstadt.
        
        
        
        
        § APPENDIX
        
        
        
        
        
         §.§ Derivation of the propagator for a rephasing sequence
        
        
        We depict rephasing with a single pulse, i.e., the well-known Hahn echo <cit.>, by the schematic representation [τ/2-A(ϕ)-τ/2],
        where the label A(ϕ) indicates a pulse with area A and phase ϕ, and τ/2 is the duration of free evolution before and after the pulse. We depict longer sequences, e.g., a CPMG sequence with two time-separated pulses <cit.>, by [τ/2-A(ϕ_1)-τ/2]-[τ/2-A(ϕ_2)-τ/2]. In the following, we compress this notation to [A(ϕ_1)-A(ϕ_2)]. Finally, the notation [A(ϕ_1)-A(ϕ_2)]^N implies the sequence [A(ϕ_1)-A(ϕ_2)] is repeated N times.
        
        The evolution due to the pulse A(ϕ=0) is described by a propagator _pulse(0), which connects the atom density matrix at the initial and final times ρ(t_f)=𝐔(0) ρ(t_i)𝐔^†(0) (without loss of generality, we take ϕ=0 as a global phase without physical relevance). The propagator _pulse(0) can be conveniently parameterized with three real variables p (0≦ p ≦ 1), α and β as
        
            _pulse(0) = [[  √(1-p) ^ıα    √(p) ^ıβ;  -√(p) ^-ıβ √(1-p) ^-ıα ]],
        
        where the phases α, β depend on the pulse properties and p is the transition probability induced by the pulse, i.e., the probability that the system is in state |2⟩ after the pulse, when it was initially in state |1⟩. We define the error in the transition probability ϵ≡ 1-p.
        Table <ref> shows examples for these variables for several conventional rephasing pulses, i.e., a resonant pulse, a detuned rectangular pulse and an adiabatic chirped pulse (assuming coherent evolution, dipole and rotating-wave approximations <cit.>).
        
        Free evolution of an atom with a transition angular frequency ω_12+Δ, where ω_12 is the center frequency of an ensemble of atoms and Δ is the frequency detuning of the individual atom, is described in the rotating frame at a frequency ω_12 by the propagator
        
            𝐅(Δ) = [[  ^ıΔτ/4      0,;       0 ^-ıΔτ/4 ]],
        
        where τ/2 is the duration of the free evolution, e.g., before or after the rephasing pulse.
        
        
        The propagator of the rephasing cycle [τ/2-A(ϕ)-τ/2] by a single time-separated, phase-shifted pulse for a particular atom then takes the form
        
            𝐔(ϕ)   =𝐅(Δ) _pulse(ϕ) 𝐅(Δ) 
               = [[     √(1-p) ^ıδ   √(p) ^ı(β+ϕ); -√(p) ^-ı(β+ϕ)    √(1-p) ^-ıδ ]],
        
        where δ≡α+Δτ/2 is an accumulated phase for the particular atom during the pulse and the free evolution times τ/2 before and after the pulse. We note that the parameters p, α, β are affected, e.g., by detuning Δ, field inhomogeneities, etc.
        
        We also note that the propagator 𝐔(ϕ), which takes free evolution into account,
        
        has the same transition probability as the propagator of the rephasing pulse 𝐔_𝐩𝐮𝐥𝐬𝐞(ϕ) and differs only by the transformation α→δ.
        
        The propagator of a rephasing sequence of n pulses with relative phases ϕ_1, ϕ_2,…, ϕ_n is
        𝐔_reph=𝐔(ϕ_n)𝐔(ϕ_n-1)…𝐔(ϕ_1),
        
        where we assumed that each rephasing cycle, including the pulse errors, can be repeated and we have control over the relative phase shifts between the pulses.
        
        The density matrix of an atom after a storage time T_st
        takes the form
        
            ρ(z,T_st)=𝐔_reph(z,T_st)ρ(z,0)𝐔_reph^†(z,T_st),
        
        where 𝐔_reph(z,T_st) is a propagator that depends on the applied rephasing sequence and can vary for each atom due to variation in the individual detuning Δ and/or the inhomogeneity of the field, e.g., along z.
        
        
        
        
        
        
        Then, the density matrix for an ensemble of atoms 
        at position z after a rephasing sequence of pulses is
        
            ⟨ρ(z,T_st)⟩=∫_-∞^+∞ρ(z,T_st)g(Δ)Δ̣,
        
        where g(Δ) is the already defined spectral distribution of the detunings of the individual atoms.
        
        A single pulse, which performs perfect population inversion (ϵ=0) for every atom, e.g., a perfect resonant pulse π(ϕ_1), has a propagator
        𝐔_ϵ=0(ϕ)=[[           0   ^ı(β+ϕ_1); -^-ı(β+ϕ_1)           0 ]].
        
        Then, the density matrix after a Hahn echo is
        ρ(z,T_st)=[[            ρ_22(z,0) -^2ı(β+ϕ_1)ρ_21(z,0); ^-2ı(β+ϕ_1)ρ_12(z,0)            ρ_11(z,0) ]],
        
        i.e., the populations are inverted due to the single rephasing pulse, and the coherence ρ_12(z,T_st)=-^2ı(β+ϕ_1)ρ_12(z,0)^∗.
        Thus, the magnitude of the coherence at position z is preserved, but its phase is inverted and shifted, i.e., ⟨ξ(z,T_st)⟩=⟨-ξ(z,0)+2ϕ_1+2β+π⟩ (see also Fig. <ref>). We note that β=-π/2 for a resonant or rectangular pulse, which allow for spin echo rephasing with a single pulse. However, β can vary significantly for chirped pulses because of their dynamic phase (see Table <ref>). Thus, the efficiency of Hahn echo suffers, which has also been confirmed in previous experiments <cit.>.
        
        This problem does not occur for CPMG with two time-separated rephasing pulses with relative phases ϕ_1 and ϕ_2, respectively, which perform perfect population inverstion (ϵ=0). Then, the density matrix after rephasing is
        ρ(z,T_st)=[[              ρ_11(z,0) ^-2ı(ϕ_1-ϕ_2)ρ_12(z,0);  ^2ı(ϕ_1-ϕ_2)ρ_12(z,0)              ρ_22(z,0) ]],
        
        i.e., it is identical to the initial matrix, except for a constant phase shift -2(ϕ_1-ϕ_2) of the coherence, which is the same for every atom. We note that the density matrix does not depend on β, so rephasing with chirped pulses becomes possible, as shown in experiments <cit.>.
        
        However, perfect rephasing pulses, e.g., resonant π pulses, are not possible in systems with large inhomogeneous broadening due to the different detuning Δ for the individual atoms.
        The efficiency may further decrease due to spatial inhomogeneity of the applied field. In these cases,
        the driving pulse is no longer a π pulse for all atoms. The rephasing efficiency depends then on the initial state of the atoms, e.g., on the coherence phase.
        
        
        
        
        
         §.§ Detailed derivation of the rephasing efficiency in EIT light storage
        
        
        Control over the phase of the initial coherences after the “write” process cannot be achieved in EIT light storage. In this case, the phase ξ(z,0) is unknown with respect to the phase of the applied rephasing pulses and/or is spatially retarded.
        For example, light storage by EIT is usually implemented in a Λ-type atomic medium (see Fig. 1, right for an idealized scheme), where the atoms are initially prepared with all population in the ground state |1⟩<cit.>. Then, a “write” process is applied, which maps the envelope of a probe pulse onto a spin wave of spatially distributed atomic coherences ρ_12(z,0) in the medium, which contains all information about the probe pulse <cit.>
            ℰ_probe(z,0)→√(N/V)ρ_12(z,0)^ıΔ k z,
        
        where ℰ_probe(z,t) is the electric field envelope of the probe pulse, N/V is the number density of atoms, ρ_12(z,t) is the coherence at position z in the ensemble, Δ k the phase mismatch between to probe and control beams, e.g., due to the geometry of the experiment (see Fig. <ref>). Thus, the phase of ξ_12(z,t) can be spatially retarded and vary along z after the “write” process.
        
        
        
        
        During a storage time T_st, we “rephase” the coherences by applying a sequence of time-separated pulses to counter the effect of dephasing. The density matrix at a time T_st along z is ρ(z,T_st), given by Eq. (<ref>).
        
        
        The spin wave is then read out by applying a control read pulse to beat with the atomic coherences and generate a signal pulse on the |1⟩↔|e⟩ transition. This is usually termed the “read” process, which in the perfect case for forward readout maps back the spin wave onto an electromagnetic field on the probe  pulse transition <cit.>
            -√(N/V)⟨ρ_12(z,T_st)⟩^ıΔ k z→ℰ_signal(z,T_st).
        
        If ⟨ρ_12(z,T_st)⟩=ρ_12(z,0), e.g., with perfect rephasing pulses, and the control read pulse is in the same direction as the control write pulse, the retrieved pulse will be a perfect time-inverted copy of the stored pulse, propagating in the same direction due to the phase-matching condition <cit.>.
        
        However, the rephasing pulses are usually not perfect.
        In the following we derive a simplified expression for the rephasing efficiency for EIT light storage, which we then use to analyze the effect of pulse imperfections in the main text.
        
        First, we assume without loss of generality that the probe pulse envelope ℰ_probe(z,t) is real, so the coherence phase after the “write” process is ξ(z,0)=-Δ k z. Perfect phase matching for forward readout 
        requires
        
            ⟨ρ_12(z,T_st)⟩^ıΔ k z=|⟨ρ_12(z,T_st)⟩|
        
        that ξ(z,T_st)=-Δ k z=ξ(z,0). Microscopically, phase matching implies that the individual atomic dipoles along the axis of propagation are properly phased, so that their emission adds up coherently in the propagation direction of the signal field <cit.>. If we assume perfect EIT conditions after readout to avoid reabsorption, e.g., two-photon resonance and negligible population in states |e⟩ and |2⟩, it is known that
        the signal pulse envelope at distance L (end of our storage medium) yields <cit.>:
        
            ℰ_signal(L,T_st)∼∫_0^L⟨ρ_12(z,T_st)⟩^ıΔ k zẓ.
        
        The light storage efficiency is defined by the ratio of the energy of retrieved photons after storage vs. the energy of the photons of the input probe pulse <cit.>
            η_ls=∫_T_st^∞| ℰ_signal(z=L,t)|^2ṭ/∫_-∞^0| ℰ_probe(z=0,t)|^2ṭ,
        
        where z=0 and z=L are the beginning and end of the storage medium.
        We assume assume that EIT light storage “write” and “read” procedures are perfect, and there is no change in the duration of the probe field after the storage. Then, the storage efficiency can be approximated by the ratio of magnitudes of the time-averaged Poynting vectors of the probe field after and before the storage <cit.>. We also assume that the magnitude of the Poynting vector is proportional to |ℰ_signal(L,t)|^2, which should be feasible, e.g., for a constant probe pulse envelope.
        Then, we use Eq. (<ref>) to obtain
        
            η_ls=|∫_0^L⟨ρ_12(z,T_st)⟩^ıΔ k zẓ|^2/|∫_0^Lρ_12(z,0)^ıΔ k zẓ|^2.
        
        We note that this expression does not take into account reabsorption of the signal field, e.g., in case of imperfect EIT because of significant population in state |2⟩ after the rephasing sequence. Nevertheless, it provides a good qualitative estimate for the relative change in the storage efficiency for sequences of pulses when we change the phases of the latter. Next, we assume for simplicity that |ρ_12(z,0)| is constant along z (or does not vary much along z for a length for Δ k z changes from 0 to 2π), which allow us to simplify Eq. (<ref>) to obtain
        
            η_ls≈|1/L∫_0^L⟨ρ_12(z,T_st)⟩/|ρ_12(z,0)|^ıΔ k zẓ|^2.
        
        It is obvious that ⟨ρ_12(z,T_st)⟩=ρ_12(z,0)=|ρ_12(z,0)|exp(-ıΔ k z) implies that η_ls=1.
        
        Alternatively, we can further simplify the calculation of the integrals in Eq. (<ref>) by change of variables Δ k z→ -ξ(z,0) if we assume that the phases of the coherence after the “write” process ξ(z,0)=-Δ k z are equally distributed between 0 and 2π, so
        
        
            η_ls   =|∫_0^2π⟨ρ_12(z,T_st)⟩^-ıξ(z,0)ξ̣(z,0)|^2/|∫_0^2πρ_12(z,0)^-ıξ(z,0)ξ̣(z,0)|^2
               ≈|∫_0^2π⟨ρ_12(z,T_st)⟩^-ıξ(z,0)ξ̣(z,0)|^2/|2πρ_12(z,0)|^2
               =|1/2π∫_0^2π⟨ρ_12(z,T_st)⟩/ρ_12(z,0)ξ̣(z,0)|^2,
        
        where we used that |ρ_12(z,0)|=ρ_12(z,0)^-ıξ(z,0) is approximately constant for the small distance along z where the initial coherence phase ξ(z,0)=-Δ k z changes from 0 to 2π. We note that the above expression for the rephasing efficiency is also valid whenever averaging over a phase distribution of initial coherences is required, i.e., also beyond the specific case of spatial retardation.
        
        
        
        
        
         §.§ Rephasing efficiency in EIT light storage for some robust sequences
        
        
        We use the theoretical approach from Sec. <ref> and provide explicit analytical formulas for the rephasing efficiency of several robust rephasing sequences in Table <ref>.
        
        
        
        
        
        99Lvovsky09NPhot A. I. Lvovsky, B. C. Sanders, and W. Tittel, Nat. Phot. 3, 706-714 (2009).
        Fleischhauer05RMP M. Fleischhauer, A. Imamoglu, and J. P. Marangos, Rev. Mod. Phys. 77, 633 (2005).
        MarangosHalfmann09Optics J. P. Marangos and T. Halfmann, Electromagnetically Induced Transparency, in Handbook of Optics Vol. IV (McGraw-Hill Professional, New York, 2009).
        
        Heinze13PRL G. Heinze, C. Hubrich, T. Halfmann, Phys. Rev. Lett. 111, 033601 (2013).
        Lovric13PRL M. Lovric, D. Suter, A. Ferrier, and P. Goldner, Phys. Rev. Lett. 111, 020503 (2013).
        Zhong15Nature M. Zhong, M. P. Hedges, R. L. Ahlefeldt, J. G. Bartholomew, S. E. Beavan, S. M. Wittig, J. J. Longdell, and M. J. Sellars, Nature (London) 517, 177 (2015).
        Jobez15PRL P. Jobez, C. Laplane, N. Timoney, N. Gisin, A. Ferrier, P. Goldner, and M. Afzelius, Phys. Rev. Lett. 114, 230502 (2015).
        Mieth16PRA S. Mieth, G. T. Genov, L. P. Yatsenko, N.V. Vitanov, and T. Halfmann, Phys. Rev. A 93, 012312 (2016).
        Schraft16PRL D. Schraft, M. Hain, N. Lorenz, and T. Halfmann, Phys. Rev. Lett. 116, 073602 (2016).
        
        DegenRMP2017 C. L. Degen, F. Reinhard, and P. Cappellaro, Rev. Mod. Phys. 89, 035002 (2017).
        
        HaeffnerPR2008 H. Häffner, C. F. Roos, and R. Blatt, Phys. Reports 469, 155-203 (2008).
        PiltzScience2016 Ch. Piltz, Th. Sriarunothai, S. S. Ivanov, S. Wolk and Ch. Wunderlich, Science Advances 2, e1600093 (2016).
        RDD_review12Suter A. Souza, G. A. Alvarez, and D. Suter, Phil. Trans. R. Soc. A 370, 4748-4769 (2012), and references therein.
        Torosov11PRA B. T. Torosov and N. V. Vitanov, Phys. Rev. A 83, 053420 (2011).
        Torosov11PRL B. T. Torosov, S. Guérin and N. V. Vitanov, Phys. Rev. Lett. 106, 233001 (2011).
        Schraft13PRA D. Schraft, T. Halfmann, G. T. Genov, and N.V. Vitanov, Phys. Rev. A 88, 063406 (2013).
        Casanova15PRA J. Casanova, Z.-Y. Wang, J. F. Haase, and M. B. Plenio, Phys. Rev. A 92, 042304 (2015).
        Van-Damme17PRA L. Van-Damme, D. Schraft, G. T. Genov, D.  Sugny, T. Halfmann, and S. Guérin, Phys. Rev. A 96, 022309 (2017).
        Genov2014PRL G. T. Genov, D. Schraft, T. Halfmann, N. V. Vitanov, Phys. Rev. Lett. 113, 043001 (2014).
        Genov17PRL G. T. Genov, D. Schraft, N.V. Vitanov, and T. Halfmann, Phys. Rev. Lett. 118, 133202 (2017).
        CPMG_papers H. Y. Carr and E. M. Purcell, Phys. Rev. 94, 630 (1954);
        
        S. Meiboom and D. Gill, Rev. Sci. Instrum. 29, 688-691 (1958).
        Levitt84NMR M. H. Levitt, Prog. NMR Spectrosc. 18, 61 (1986);
        
        R. Freeman, Spin Choreography (Spektrum, Oxford, 1997).
        
        Cruzeiro16JMO E. Z. Cruzeiro, F. Fröwis, N. Timoney and M. Afzelius, J. Mod. Opt. 63, 2101-2113 (2016).
        Hahn50PR E. L. Hahn, Phys. Rev. 80, 580 (1950).
        NMR_literature A. Abragam, The Principles of Nuclear Magnetism (Oxford
        University Press, Oxford, 1961);
        C. P. Slichter, Principles of Magnetic Resonance (Springer, Berlin, 1990).
        
        Wong83PRB N. C. Wong, E. S. Kintzer, J. Mlynek, R. G. DeVoe, and R. G. Brewer, Phys. Rev. B 28, 4993 (1983).
        Lauro11PRA R. Lauro, T. Chaneliére, and J.-L. Le Gouët, Phys. Rev. B 83, 035124 (2011).
        Mieth12PRA S. Mieth, D. Schraft, T. Halfmann, and L. P. Yatsenko, Phys. Rev. A 86, 063404 (2012).
        Pascual-Winter13NJP M. F. Pascual-Winter, R.-C. Tongning, T. Chaneliére, and J.-L. Le Gouët, New J. Phys. 15, 055024 (2013).
        Shore_literature B. W. Shore, The Theory of Coherent Atomic Excitation (Wiley, New York, 1990);  B. W. Shore, Manipulating Quantum Structures Using Laser Pulses (Cambridge University Press, Cambridge, 2014).
        
        Novikova12review I. Novikova, R. L. Walsworth, and Y. Xiao, Laser Phot. Rev. 6, 333 (2012).
        Heinze14PRA G. Heinze, C. Hubrich, T. Halfmann, Phys. Rev. A 89, 053825 (2014).
        Mieth14OE S. Mieth, A. Henderson, and T. Halfmann, Opt. Express, 22, 11182 (2014).
        Serrano2018NattComm D. Serrano, J. Karlsson, A. Fossati, A. Ferrier and P. Goldner, Nat. Comm. 9, 2127 (2018).
        Surmacz08PRA K. Surmacz, J. Nunn, K. Reim, K. C. Lee, V. O. Lorenz, B. Sussman, I. A. Walmsley, and D. Jaksch, Phys. Rev. A 78, 033806 (2008).
        
        
        PezzeRMP2018 L. Pezzé, A. Smerzi, M. K. Oberthaler, R. Schmied, and P. Treutlein, Rev. Mod. Phys. 90, 035005 (2018).
        Arecchi72PRA F. T. Arecchi, E. Courtens, R. Gilmore, and H. Thomas, Phys. Rev. A 6, 2211 (1972).
        Friedberg07LPL R. Friedberg and J. T. Manassah, Laser Phys. Lett. 4, 900911 (2007).
        
        
        Demkov-Kunike Yu. N. Demkov, M. Kunike, Vestn. Leningr. Univ. Fiz. Khim. 16, 39 (1969);
        F. T. Hioe, C. E. Carroll, Phys. Rev. A 32, 1541 (1985);
        J. Zakrzewski, Phys. Rev. A 32, 3748 (1985);
        K.-A. Suominen, B.M. Garraway, Phys. Rev. A 45, 374 (1992).
        GenovOptComm2011 G. T. Genov, A. A. Rangelov, and N. V. Vitanov, Opt. Comm. 284, 2642 (2011).
        Boyd2008NonlinOpt R. W. Boyd, Nonlinear Optics, 3rd ed. (Academic Press, Burlington, MA, 2008).
