ffsim.apply_num_op_sum_evolution

ffsim.apply_num_op_sum_evolution(vec, coeffs, time, norb, nelec, *, orbital_rotation=None, copy=True)[source]

Apply time evolution by a (rotated) linear combination of number operators.

Applies

\[\mathcal{U} \exp\left(-i t \sum_{i \sigma} \lambda^{(\sigma)}_i n_{i\sigma}\right) \mathcal{U}^\dagger\]

where \(n_{i\sigma}\) denotes the number operator on orbital \(i\) with spin \(\sigma\), the \(\lambda_i\) are real numbers, and \(\mathcal{U}\) is an optional orbital rotation.

Parameters:
  • vec (ndarray) – The state vector to be transformed.

  • coeffs (ndarray | tuple[ndarray | None, ndarray | None]) – The coefficients of the linear combination. You can pass either a single Numpy array specifying the coefficients to apply to both spin sectors, or you can pass a pair of Numpy arrays specifying independent coefficients for spin alpha and spin beta. If passing a pair, you can use None for 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.

  • 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 use None for one of the values in the pair to indicate that no operation should be applied to that spin sector.

  • copy (bool) –

    Whether to copy the vector before operating on it.

    • If copy=True then this function always returns a newly allocated vector and the original vector is left untouched.

    • If copy=False then 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:

ndarray

Returns:

The evolved state vector.