ffsim.apply_diag_coulomb_evolution¶
- ffsim.apply_diag_coulomb_evolution(vec, mat, time, norb, nelec, *, orbital_rotation=None, z_representation=False, copy=True)[source]¶
Apply time evolution by a (rotated) diagonal Coulomb operator.
Applies
\[\begin{split}\mathcal{U} \exp\left(-i t \sum_{\substack{ij \\ \sigma \tau}} J^{(\sigma \tau)}_{ij} n_{i\sigma} n_{j\tau} / 2\right) \mathcal{U}^\dagger\end{split}\]where \(n_{i\sigma}\) denotes the number operator on orbital \(i\) with spin \(\sigma\), \(J^{(\sigma \tau)}\) is a real-valued matrix, and \(\mathcal{U}\) is an optional orbital rotation.
- Parameters:
vec (
ndarray) – The state vector to be transformed.mat (
ndarray|tuple[ndarray|None,ndarray|None,ndarray|None]) – The diagonal Coulomb matrix \(J\). 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. The alpha-alpha and beta-beta matrices are assumed to be symmetric, and only their upper triangular entries are used.time (
float) – The evolution time.norb (
int) – The number of spatial orbitals.nelec (
int|tuple[int,int]) – Either a single integer representing the number of fermions for a spinless system, or a pair of integers storing the numbers of spin alpha and spin beta fermions.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.copy (
bool) –Whether to copy the vector before operating on it.
If
copy=Truethen this function always returns a newly allocated vector and the original vector is left untouched.If
copy=Falsethen this function may still return a newly allocated vector, but the original vector may have its data overwritten. It is also possible that the original vector is returned, modified in-place.
- Return type:
- Returns:
The evolved state vector.