  Thorough control of the optical mode of a single photon is essential for
quantum information applications. We present a comprehensive experimental and
theoretical study of a light-matter interface based on cavity quantum
electrodynamics. We identify key parameters like the phases of the involved
light fields and demonstrate absolute, flexible, and accurate control of the
time-dependent complex-valued wave function of a single photon over several
orders of magnitude. This capability will be an important tool for the
development of distributed quantum systems with multiple components that
interact via photons.
