where |Φ I ⟩ represents an electronic Slater determinant, |n⟩ is a photon-number state, and C I,n is an expansion coefficient . Then, a variational scQED approach can be formulated as a matrix diagonalization problem where Eq. 1 or Eq. 2 is built in the basis of product states in Eq. 19. The matrix representation of Eq. 1 (here denoted H PF-CI ) has a similar structure as Eq. 14: