In this section, we provide the detailed expression of the nuclear gradient for molecule-cavity hybrid systems. With the adiabatic-Fock basis |φ ν n and |φ γ m introduced in Eq. 10, the matrix elements of every term in the PF QED Hamiltonian (Eq. 12) can be explicitly expressed as follows (using the properties of creation and annihilation operators of photonic DOF)