qib.operator.heisenberg_hamiltonian.HeisenbergHamiltonian

class qib.operator.heisenberg_hamiltonian.HeisenbergHamiltonian(field: Field, J: Sequence[float], h: Sequence[float])[source]

Bases: AbstractOperator

Heisenberg Hamiltonian “J_1 X X + J_2 Y Y + J_3 Z Z + h_1 X + h_2 Y + h_3 Z”
  • interaction parameters J

  • longitudinal field strengths h

on a lattice.

Methods

as_matrix

Generate the (sparse) matrix representation of the Hamiltonian.

as_pauli_operator

Represent the Hamiltonian as Pauli operator.

fields

List of fields the Hamiltonian acts on.

is_hermitian

Whether the Hamiltonian is Hermitian.

is_unitary

Whether the Hamiltonian is unitary.

Attributes

nsites

Number of underlying lattice sites.

as_matrix()[source]

Generate the (sparse) matrix representation of the Hamiltonian.

as_pauli_operator()[source]

Represent the Hamiltonian as Pauli operator.

fields()[source]

List of fields the Hamiltonian acts on.

is_hermitian()[source]

Whether the Hamiltonian is Hermitian.

is_unitary()[source]

Whether the Hamiltonian is unitary.

property nsites: int

Number of underlying lattice sites.