of *single* travelling optical modes, with annihilation operators $\hat{a}_{p,t}$.

2.  We assume that the pulses are tailored in such a way that they simultaneously enter gas cell and completely overlap with it during the interaction (see Fig. \[fig:pulsescheme\]). This means that their length (compressed inside a medium due to group velocity reduction) is of the order of the cell length $L$ and their beam waist is of the order of the cell radius. In this way, the two pulses interact with *all* $N_a$ atoms in the cell at once, and moreover, one can ignore spatial aspects of pulse propagation.

With these assumptions, and neglecting dipole-dipole interactions, the interaction picture Hamiltonian may be written as $$\begin{aligned}
\label{eq:coll_ham}
&& H = \hbar\epsilon_{12}\hat{S}_{11}+\hbar\delta_{2}\hat{S}_{22} +\hbar\delta_{3}\hat{S}_{44}+\hbar\epsilon_{34}\hat{S}_{55}  \\
&&+\hbar\Omega_{1}\sqrt{N_a}\left(\hat{S}_{21}+\hat{S}_{12}\right)+\hbar g_{p}\sqrt{N_{a}}\left(\hat{a}_{p}\hat{S}_{23}+\hat{S}_{32}\hat{a}_{p}^{\dagger}\right)
 \nonumber\\
&&+\hbar g_{t} \sqrt{N_{a}} \left(\hat{a}_{t}\hat{S}_{43}+\hat{S}_{34}\hat{a}_{t}^{\dagger}\right)+ \hbar\Omega_{4}\sqrt{N_a} \left(\hat{S}_{45}+\hat{S}_{54}\right),
\nonumber\end{aligned}$$ where we have defined the collective atomic operators

\[eq:collectiveop\] $$\begin{aligned}
\label{eq:collective1}
\hat{S}_{kl}&=&\frac{1}{\sqrt{N_{a}}}\sum_{i=1}^{N_a}\sigma_{kl}^i, \;\;\;\;k\neq l=1,\ldots,5, \\
\hat{S}_{kk}&=& \sum_i^{N_a}\sigma_{kk}^i, \label{eq:collective2}\end{aligned}$$

with $\sigma_{kl}^i\equiv |k\rangle _i \langle l |$ being the operator switching between states $k$ and $l$ of the $i$th atom. The initial state of the system corresponds to a probe and a trigger single-photon pulse with generic polarization, simultaneously entering the medium in which all the atoms are initially in 