How does a Mach–Zehnder interferometer work?