qib.operator.ising_hamiltonian.IsingHamiltonian¶
- class qib.operator.ising_hamiltonian.IsingHamiltonian(field: Field, J: float, h: float, g: float, convention: IsingConvention = IsingConvention.ISING_ZZ)[source]¶
Bases:
AbstractOperator- Ising Hamiltonian “J Z Z + h Z + g X” or “J X X + h X + g Z” with
interaction parameter J
longitudinal field strength h
transverse field strength g
on a lattice.
Methods
Generate the (sparse) matrix representation of the Hamiltonian.
Represent the Hamiltonian as Pauli operator.
List of fields the Hamiltonian acts on.
Whether the Hamiltonian is Hermitian.
Whether the Hamiltonian is unitary.
Attributes
Number of underlying lattice sites.