A new tutorial on non-linear response at finite temperature is available at the end of the tutorial on finite temperature optical response.
https://www.lumen-code.org/wiki/index.php?title=Optical_properties_at_finite_temperature#Using_electron-phonon_quasi-particles_in_real-time_simulations
Following this tutorial is possible to calculate second harmonic generation or other non-linear response functions including temperature effects. At present our approach is exact only at the independent particle approximation and it is described in the following paper:
Temperature-Dependent nonlinear optics from first-principles: Second-Harmonic Generation in few-layers MoS2
Anna Romani, Claudio Attaccalite, Myrta GrĂ¼ning
https://arxiv.org/abs/2609.07796v1
