A reconfigurable grating unit based on a Bragg-grating-assisted Mach–Zehnder interferometer | Synapse