Direct photo-patterning of halide perovskites toward machine-learning-assisted erasable photonic cryptography | Synapse