The block structure shown in Eq. 8 reflects the Kronecker deltas in the expressions for the matrix elements. Each of these integrals over many-electron determinants can be simplified using the Slater-Condon rules and expressed in terms of 1-and 2-electron integrals in the canonical MO basis for the PN-QED-CASCI formulation or in the QED-HF MO basis for the CS-QED-CASCI formulation; we make use of these expressions in the subsequent section on the Implementation Details.