 Time-bin encoding is done by having a single-photon go through a Mach–Zehnder interferometer (MZ), shown in black here.The photon coming from the left is guided through one of two paths (shown in blue and red); the guiding can be made by optical fiber or simply in free space using mirrors and polarising cubes.One of the two paths is longer than the other.