ffsim.apply_quad_ham_evolution¶
- ffsim.apply_quad_ham_evolution(vec, mat, time, norb, nelec, *, copy=True)[source]¶
Apply time evolution by a quadratic Hamiltonian.
Applies
\[\begin{split}\exp\left(-i t \sum_{\substack{ij \\ \sigma}} \mathbf{M}^{(\sigma)}_{ij} a^\dagger_{i\sigma} a_{j\sigma}\right)\end{split}\]where each \(\mathbf{M}^{(\sigma)}\) is a Hermitian matrix.
- Parameters:
vec (
ndarray) – The state vector to be transformed.mat (
ndarray|tuple[ndarray|None,ndarray|None]) – The matrix \(\mathbf{M}\) describing the quadratic Hamiltonian. You can pass either a single Numpy array specifying the Hamiltonian to use for both spin sectors, or you can pass a pair of Numpy arrays specifying independent Hamiltonians 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.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.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.