get_lattice

tenpy.models.lattice.get_lattice(lattice_name)[source]

Given the name of a Lattice class, get the lattice class itself.

Parameters:

lattice_name (str | type) – Name of a Lattice class defined in the module lattice, for example "Chain", "Square", "Honeycomb", .... Alternatively, instead of the name directly the class itself can be given.

Returns:

LatticeClass – The lattice class (type, not instance) specified by lattice_name.

Return type:

Lattice