Modeling of light-matter interactions with neural networks