ffsim.slater_determinant_rdms¶
- ffsim.slater_determinant_rdms(norb, occupied_orbitals, orbital_rotation=None, *, rank=1)[source]¶
Return the reduced density matrices of a Slater determinant.
Note
Currently, only rank 1 is supported.
- Parameters:
norb (
int) – The number of spatial orbitals.occupied_orbitals (
Sequence[int] |tuple[Sequence[int],Sequence[int]]) – The occupied orbitals in the electronic configuration. This is either a list of integers specifying spinless orbitals, or a pair of lists, where the first list specifies the spin alpha orbitals and the second list specifies the spin beta orbitals.orbital_rotation (
ndarray|tuple[ndarray|None,ndarray|None] |None) – The optional orbital rotation. You can pass either a single Numpy array specifying the orbital rotation to apply to both spin sectors, or you can pass a pair of Numpy arrays specifying independent orbital rotations for spin alpha and spin beta. If passing a pair, you can useNonefor one of the values in the pair to indicate that no operation should be applied to that spin sector.rank (
int) – The rank of the reduced density matrix. I.e., rank 1 corresponds to the one-particle RDM, rank 2 corresponds to the 2-particle RDM, etc.
- Return type:
- Returns:
The reduced density matrices of the Slater determinant. All RDMs up to and including the specified rank are returned, in increasing order of rank. For example, if
rank=2then a tuple(rdm1, rdm2)is returned. The representation of an RDM depends on whetheroccupied_orbitalsis a sequence of integers (spinless case), or a pair of such sequences (spinful case). In the spinless case, the full RDM is returned. In the spinful case, each RDM is represented as a stacked Numpy array of sub-RDMs. For example, the 1-RDMs are: (alpha-alpha, alpha-beta), and the 2-RDMs are: (alpha-alpha, alpha-beta, beta-beta).