get_lattice

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

Given the name of a Lattice class, create an instance of it with gi.

Parameters
lattice_namestr

Name of a Lattice class defined in the module lattice, for example "Chain", "Square", "Honeycomb", ....

*args, **kwargs

Arguments and keyword-arguments for the initialization of the specified lattice class.

Returns
LatticeClass(subclass of) Lattice

An instance of the lattice class specified by lattice_name.