Kaje,
For what it's worth, single photons have no definite phase because of the number-phase uncertainty relation. Coherent states of light always have an indefinite number of photons. However, it looks from the figure that pulses from a coherent light source are prepared in states which are quantum superpositions of two states, one of which is phase shifted by φ relative to the other (by adding in an adjustable path delay between beam splitters). These states are then detected with an interferometer which adds another phase shift α between its beam splitters. The interferometer has two detectors, and if the phase delays are such that the final superposition seen at one of the two detectors has a phase difference of a multiple of 2π, that detector will fire and the other will not, and vice versa if the phase difference is an odd multiple of π. Label one detector as logic "1" and the other as logic "0" and the system is a binary demodulator. Note that these phase delays may be ascertained by taking the desired fraction of the coherent light's wavelength.