full name: tenpy.models.lattice.get_order_grouped
get_order(), grouping some sites of the unit cell.
This function is usefull for lattices with a unit cell of more than 2 sites (e.g. Kagome). For 2D lattices with a unit cell, the ordering goes first within a group , then along y, then the next group (for the same x-value), again along y, and finally along x when all groups are done.
As an example, consider the Kagome lattice.
In this doc-string, the word ‘direction’ referst to a physical direction of the lattice or the index u of the unit cell as an “artificial direction”.
shape (tuple of int) – The shape of the lattice, i.e., the length in each direction.
groups (tuple of tuple of int) – A partition and reordering of range(shape[-1]) into smaller groups. The ordering goes first within a group, then along the last spatial dimensions, then changing between different groups and finally in Cstyle order along the remaining spatial dimensions.
order – An order of the sites for
Lattice.orderin the specified ordering.
- Return type
ndarray (np.prod(shape), len(shape))