Ehrenfest dynamics uses TDSE in Eq. 19 for quantum subsystem (electronic-photonic DOFs), and equation of motion in Eq. 23 for the classical subsystem (nuclear DOF). We use the fourth-order Runge-Kutta method to integrate the TDSE and the velocity Verlet algorithm to integrate Newton's equation of motion. The time step for the nuclear motion is 0.1 a.u. and the sub-step for solving the TDSE of the electronic-photonic subsystem is 0.001 a.u. The total energy is well conserved for all the trajectories.