openfermion.utils.map_particle_hole_dm_to_two_pdm

Map the 2-RDM to the particle-hole-RDM

phdm (numpy.ndarray): The 2-particle-hole-RDM as a 4-index tensor. Indices follow the internal convention of phdm[p, q, r, s] == :math:a_{p}^{\dagger}a_{q}a_{r}^{\dagger}a_{s}. opdm (numpy.ndarray): The 1-RDM as a 2-index tensor. Indices follow the internal convention of opdm[p, q] == :math:a_{p}^{\dagger}a_{q}.

tpdm (numpy.ndarray): The 2-RDM matrix.