  We study the impact of Rydberg molecule formation on the storage and
retrieval of Rydberg polaritons in an ultracold atomic medium. We observe
coherent revivals appearing in the retrieval efficiency of stored photons that
originate from simultaneous excitation of Rydberg atoms and Rydberg molecules
in the system with subsequent interference between the possible storage paths.
We show that over a large range of principal quantum numbers the observed
results can be described by a two-state model including only the atomic Rydberg
state and the Rydberg dimer molecule state. At higher principal quantum numbers
the influence of polyatomic molecules becomes relevant and the dynamics of the
system undergoes a transition from coherent evolution of a few-state system to
an effective dephasing into a continuum of molecular states.
