are slowly-varying collective atomic operators defined in App. A. It was shown in Ref. [@ref:Gorshkov_PRA1] that in order to determine normally-ordered quantities such as efficiencies, one can neglect quantum noise operators and treat all dynamical variables as complex numbers.

The equations of motion governing $\mathcal{E}$, $P_1$, and $S$ are derived by calculating the Heisenberg equation of motion for all dynamical variables using the dipole and rotating wave approximations. Then, two further approximations are made related to the fact that the quantum field is weak. First, it is assumed that almost all of the atoms remain in the ground state ${\ensuremath{|g\rangle}}$ during the whole process. Second, only terms to linear order in $\mathcal{E}$ are retained. Under these approximations (see Ref. [@ref:Gorshkov_PRA2] and App. A for details), the following equations of motion are obtained:

$$\begin{aligned}
\partial_{\tilde{z}} \mathcal{E} &= i \tilde{\mu}_{1g}\sqrt{d \gamma}P_1 \label{eqn:3LEoME}\\
\partial_{\tau}P_1 &= \left(i \delta_g-\gamma \right) P_1+i \tilde{\mu}_{1s} \Omega(\tau) S +i \tilde{\mu}_{1g} \sqrt{d \gamma} \mathcal{E} \label{eqn:3LEoMP1}\\
\partial_{\tau}S &= i \left(\delta_g - \delta_s \right) S + i \tilde{\mu}_{1s}\Omega^*(\tau)P_1. \label{eqn:3LEoMS}\end{aligned}$$

These equations of motion use a coordinate system $(\tilde{z},\tau)$, where $\tilde{z} = (1/N) \int_0^z dz'\, n(z')$ is a dimensionless length parameter ($\tilde{z} \in [0,1] $) and $\tau=t-z/c$ is the time in a co-moving 