Model

class tenpy.models.model.Model(lattice)[source]

Bases: object

Base class for all models.

The common base to all models is the underlying Hilbert space and geometry, specified by a Lattice.

Parameters
latticeLattice

The lattice defining the geometry and the local Hilbert space(s).

Attributes
latLattice

The lattice defining the geometry and the local Hilbert space(s).

Methods

group_sites(self[, n, grouped_sites])

Modify self in place to group sites.

group_sites(self, n=2, grouped_sites=None)[source]

Modify self in place to group sites.

Group each n sites together using the GroupedSite. This might allow to do TEBD with a Trotter decomposition, or help the convergence of DMRG (in case of too long range interactions).

This has to be done after finishing initialization and can not be reverted.

Parameters
nint

Number of sites to be grouped together.

grouped_sitesNone | list of GroupedSite

The sites grouped together.

Returns
grouped_siteslist of GroupedSite

The sites grouped together.