  We analyse the off-resonant Raman interaction of a single broadband photon,
copropagating with a classical `control' pulse, with an atomic ensemble. It is
shown that the classical electrodynamical structure of the interaction
guarantees canonical evolution of the quantum mechanical field operators. This
allows the interaction to be decomposed as a beamsplitter transformation
between optical and material excitations on a mode-by-mode basis. A single,
dominant modefunction describes the dynamics for arbitrary control pulse
shapes.
  Complete transfer of the quantum state of the incident photon to a collective
dark state within the ensemble can be achieved by shaping the control pulse so
as to match the dominant mode to the temporal mode of the photon. Readout of
the material excitation, back to the optical field, is considered in the
context of the symmetry connecting the input and output modes. Finally, we show
that the transverse spatial structure of the interaction is characterised by
the same mode decomposition.
