model

  • full name: tenpy.models.model

  • parent module: tenpy.models

  • type: module

Classes

Inheritance diagram of tenpy.models.model

CouplingMPOModel(model_params)

Combination of the CouplingModel and MPOModel.

CouplingModel(lattice[, explicit_plus_hc])

Base class for a general model of a Hamiltonian consisting of two-site couplings.

MPOModel(lattice, H_MPO)

Base class for a model with an MPO representation of the Hamiltonian.

Model(lattice)

Base class for all models.

NearestNeighborModel(lattice, H_bond)

Base class for a model of nearest neighbor interactions w.r.t.

Module description

This module contains some base classes for models.

A ‘model’ is supposed to represent a Hamiltonian in a generalized way. The Lattice specifies the geometry and underlying Hilbert space, and is thus common to all models. It is needed to initialize the common base class Model of all models.

Different algorithms require different representations of the Hamiltonian. For example for DMRG, the Hamiltonian needs to be given as an MPO, while TEBD needs the Hamiltonian to be represented by ‘nearest neighbor’ bond terms. This module contains the base classes defining these possible representations, namely the MPOModel and NearestNeighborModel.

A particular model like the XXZChain should then yet another class derived from these classes. In it’s __init__, it needs to explicitly call the MPOModel.__init__(self, lattice, H_MPO), providing an MPO representation of H, and also the NearestNeighborModel.__init__(self, lattice, H_bond), providing a representation of H by bond terms H_bond.

The CouplingModel is the attempt to generalize the representation of H by explicitly specifying the couplings in a general way, and providing functionality for converting them into H_MPO and H_bond. This allows to quickly generate new model classes for a very broad class of Hamiltonians.

The CouplingMPOModel aims at structuring the initialization for most models and is used as base class in (most of) the predefined models in TeNPy.

See also the introduction in Models.