qat.fermion.trotterisation.make_trotterisation_routine

qat.fermion.trotterisation.make_trotterisation_routine(hamiltonian: Union[SpinHamiltonian, FermionHamiltonian, ElectronicStructureHamiltonian], n_trotter_steps: int, final_time: Optional[float] = 1.0, method: Optional[str] = 'jordan-wigner') QRoutine

This function first trotterizes the evolution operator \(e^{-i H t}\) of a Hamiltonian \(H\) using a first order approximation. If the Hamiltonian is fermionic, it is converted to its spin representation.

Parameters
  • hamiltonian (Union[SpinHamiltonian, FermionHamiltonian, ElectronicStructureHamiltonian]) – Hamiltonian to trotterize.

  • n_trotter_steps (int) – Number \(n\) of Trotter steps.

  • final_time (Optional[float]) – Time \(t\) in the evolution operator.

  • method (Optional[str]) – Method to use for the transformation to a spin representation. Other available methods include "bravyi-kitaev" and "parity". Defaults to "jordan-wigner".

Returns

Gates to apply to perform the time evolution of the chemical Hamiltonian with trotterisation.

Return type

QRoutine

Notes

  • In the fermionic case :

    \[e^{-i H t} \approx \prod_{k=1}^{n} \left( \prod_{pq} e^{-i \frac{t}{n} h_{pq} c_p^\dagger c_q} \prod_{pqrs} e^{-\frac{i}{2}\frac{t}{n} h_{pqrs} e^{-i c_p^\dagger c_q^\dagger c_r c_s} } \right)\]

    This operator is then mapped to a product of Pauli operators via a Jordan-Wigner transformation and the resulting QRoutine is returned.

  • The QRoutine implements a first order Trotter approximation, but higher order approximations are possible.