To make the discussion more general, the state |α⟩ is not necessarily the adiabatic state used in Eq. 26. As discussed in Sec. 2.1, P defines the truncation of the full electronic Hilbert space 1r = P + Q which has infinite dimension, to a subspace P that contains a total of N states. This truncation reduces the size of the Hilbert space of the entire problem from the original space, 1r ⊗ 1R ⊗ 1ph , to P ⊗ 1R ⊗ 1ph , where 1R and 1ph represent the identity operators of the nuclear and the photonic DOF, respectively.