Photochromic materials are of great interest because they enable the fabrication of photo-activated switches. In this study, an experiment is proposed in which two chromene-based photochromic layers were inserted into the arms of a Mach–Zehnder interferometer. The chromene was studied from the perspective of optical absorption to determine the wavelength-dependent complex refractive index. Impinging ultraviolet light on one of the chromene layers induces a transition from the closed to the open form of the chromene, resulting in different phase shifts in the two arms of the interferometer. This results in a change in the probability of detecting a photon by the two detectors after the second mirror of the Mach–Zehnder interferometer. The experiment may be of interest to researchers working in the fields of quantum information and quantum communications.