  Time synchronization and phase shaping of single photons both play
fundamental roles in quantum information applications that rely on multi-photon
quantum interference. Phase shaping typically requires separate modulators with
extra insertion losses. Here, we develop a all-optical built-in phase modulator
for single photons using a quantum memory. The fast phase modulation of a
single photon in both step and linear manner are verified by observing the
efficient quantum-memory-assisted Hong-Ou-Mandel interference between two
single photons, where the anti-coalescence effect of bosonic photon pairs is
demonstrated. The developed phase modulator may push forward the practical
quantum information applications.
