Orbital rotations and quadratic Hamiltonians¶
This page discusses orbital rotations and how they can be used to implement time evolution by a quadratic Hamiltonian.
Orbital rotations¶
The orbital rotation is a fundamental operation in the simulation of a system of fermionic modes. An orbital rotation is described by an
That is,
for any unitary matrices
Time evolution by a quadratic Hamiltonian¶
Orbital rotations can be used to implement time evolution by a quadratic Hamiltonian. A quadratic Hamiltonian is an operator of the form (here we only consider Hamiltonians with particle number and spin Z symmetry)
where
where the
Time evolution by
Compute the orbital energies
and the orbital rotation matrix by performing an eigendecomposition of .Perform the orbital rotation
, which corresponds to the matrix .Perform time evolution by the operator
.Perform the orbital rotation
, which corresponds to the matrix .
This logic can be implemented in ffsim as follows:
[1]:
import numpy as np
import ffsim
def apply_quad_ham_evolution(
vec: np.ndarray, mat: np.ndarray, time: float, norb: int, nelec: tuple[int, int]
) -> np.ndarray:
"""Apply time evolution by a quadratic Hamiltonian to a state vector."""
energies, orbital_rotation = np.linalg.eigh(mat)
vec = ffsim.apply_orbital_rotation(
vec, orbital_rotation.T.conj(), norb=norb, nelec=nelec
)
vec = ffsim.apply_num_op_sum_evolution(vec, energies, time, norb=norb, nelec=nelec)
vec = ffsim.apply_orbital_rotation(vec, orbital_rotation, norb=norb, nelec=nelec)
return vec
ffsim already includes a function called apply_num_op_sum_evolution for performing this operation, but it accepts the orbital energies and rotation as arguments rather than the matrix