openfermion.utils.map_two_hole_dm_to_one_hole_dm

Map from 2-hole-RDM to 1-hole-RDM

tqdm (numpy.ndarray): The 2-hole-RDM as a 4-index tensor. Indices follow the internal convention of tqdm[p, q, r, s] == $a_{p}a_{q}a_{r}^{\dagger}a_{s}^{\dagger}$. hole_number (float): Number of holes in the system. For chemical systems this is usually the number of spin orbitals minus the number of electrons.

oqdm (numpy.ndarray): The 1-hole-RDM contracted from the tqdm.