Time dependent perturbations and electromagnetic waves interacting with quantum states