Amplitude and phase modulation of single photons and biphotons