HeisenbergModel#

class HeisenbergModel(lattice, coupling_constants=(1.0, 1.0, 1.0), ext_magnetic_field=(0.0, 0.0, 0.0))[source]#

Bases: LatticeModel

The Heisenberg model.

This class implements the following Hamiltonian:

\[H = - \vec{J} \sum_{\langle i, j \rangle} \vec{\sigma}_{i} \otimes \vec{\sigma}_{j} - \vec{h} \sum_{i} \vec{\sigma}_{i}\]

where \(i,j\) refer to lattice nodes. The \(\sum_{\langle i, j \rangle}\) is performed over adjacent lattice nodes. This model assumes spin-\(\frac{1}{2}\) particles. Thus, \(\vec{\sigma}_{i} = (X_i, Y_i, Z_i)\) is a vector containing the Pauli matrices. \(\vec{J}\) is the coupling constant and \(\vec{h}\) is the external magnetic field, both with dimensions of energy.

This model is instantiated using a Lattice. For example, using a LineLattice:

line_lattice = LineLattice(num_nodes=10, boundary_condition=BoundaryCondition.OPEN)
heisenberg_model = HeisenbergModel(line_lattice, (1.0, 1.0, 1.0), (0.0, 0.0, 1.0))

The transverse-field Ising model can be recovered as a special case of the Heisenberg model by limiting the model to spins that are parallel/antiparallel with respect to a transverse magnetic field:

heisenberg_model = HeisenbergModel(line_lattice, (0.0, 0.0, 1.0), (1.0, 0.0, 0.0))
Parameters:
  • lattice (Lattice) – Lattice on which the model is defined.

  • coupling_constants (tuple) – The coupling constants in each Cartesian axis. Defaults to (1.0, 1.0, 1.0).

  • ext_magnetic_field (tuple) – Represents a magnetic field in Cartesian coordinates. Defaults to (0.0, 0.0, 0.0).

Attributes

lattice#

Return the input lattice.

Note, that this returns the internal lattice object without copying it. Thus, changing the returned lattice object, will affect the internal lattice stored in this Hamiltonian.

register_length#

Methods

interaction_matrix()#

Return the interaction matrix

Returns:

The interaction matrix.

Return type:

ndarray

interpret(result)#

Interprets an EigenstateResult in this hamiltonians context.

Parameters:

result (qiskit_nature.second_q.problems.EigenstateResult) – the result to add meaning to.

second_q_op()[source]#

Return the Hamiltonian of the Heisenberg model in terms of SpinOp.

Returns:

The Hamiltonian of the Heisenberg model.

Return type:

SpinOp