reference frame. Compared to the results of Ref. [@ref:Gorshkov_PRA2], Eqs. \[eqn:3LEoME\]-\[eqn:3LEoMS\] also include relative dipole moments $\tilde{\mu}_{\alpha \beta}$. These are defined as dipole moments relative to that of the two-level, cycling transition $\mu_{cyc}$ where a measurement of the optical depth would take place. This sets the natural scale of the atom’s dipole strength and allows for easy comparison between different physical implementations of levels ${\ensuremath{|g\rangle}}$, ${\ensuremath{|s\rangle}}$, and ${\ensuremath{|1\rangle}}$ (see App. A for details).

For storage, we would like to take a quantum field with initial envelope $\mathcal{E}_{\textrm{in}}(\tau)$ (non-zero on the interval $\tau \in [0,T]$) and map it into a spin wave $S(\tilde{z},T)$ using a classical pulse $\Omega(\tau)$. The boundary conditions for the dynamical variables are $\mathcal{E}(0,\tau)=\mathcal{E}_{\textrm{in}}(\tau)$ and $S(\tilde{z},0)=P_1(\tilde{z},0)=0$. We then want to compute the efficiency of this mapping once $\mathcal{E}_{\textrm{in}} = 0$ at $\tau = T$. If the envelope of the initial quantum field is normalized ($\int_0^T d\tau \left|\mathcal{E}_{\textrm{in}}(\tau) \right|^2=1$), the storage efficiency $\eta_s$ is given by [@ref:Gorshkov_PRA2] $$\eta_s = \int_0^1 d\tilde{z}\left|S(\tilde{z},T)\right|^2 \label{eqn:etastor}.$$

For a given input field and optical depth of the medium, one would like to determine the optimal classical pulse shape so as to maximize the storage efficiency. In Ref. [@ref:Gorshkov_PRA2] it was shown that in the 