ffsim.contract.diag_coulomb_linop¶
- ffsim.contract.diag_coulomb_linop(mat, norb, nelec, *, orbital_rotation=None, z_representation=False)[source]¶
Convert a (rotated) diagonal Coulomb matrix to a linear operator.
A rotated diagonal Coulomb operator has the form
\[\begin{split}\mathcal{U} (\sum_{\substack{ij \\ \sigma \tau}} Z^{(\sigma \tau)}_{ij} n_{i\sigma} n_{j\tau} / 2) \mathcal{U}^\dagger\end{split}\]where \(n_{i\sigma}\) denotes the number operator on orbital \(i\) with spin \(\sigma\), \(Z^{(\sigma \tau)}\) is a real-valued matrix, and \(\mathcal{U}\) is an optional orbital rotation.
- Parameters:
mat (
ndarray|tuple[ndarray|None,ndarray|None,ndarray|None]) – The diagonal Coulomb matrix \(Z\). You can pass either a single Numpy array specifying the coefficients to use for all spin interactions, or you can pass a tuple of three Numpy arrays specifying independent coefficients for alpha-alpha, alpha-beta, and beta-beta interactions (in that order). If passing a tuple, you can set a tuple element toNoneto indicate the absence of interactions of that type.norb (
int) – The number of spatial orbitals.nelec (
tuple[int,int]) – The number of alpha and beta electrons.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.z_representation (
bool) – Whether the input matrices are in the “Z” representation.
- Return type:
- Returns:
A LinearOperator that implements the action of the diagonal Coulomb operator.