Simulating photonic devices with noisy optical elements | Synapse