get_order

tenpy.models.lattice.get_order(shape, snake_winding, priority=None)[source]

Built the Lattice.order in (Snake-) C-Style for a given lattice shape.

In this function, the word ‘direction’ referst to a physical direction of the lattice or the index u of the unit cell as an “artificial direction”.

Parameters
shapetuple of int

The shape of the lattice, i.e., the length in each direction.

snake_windingtuple of bool

For each direction one bool, whether we should wind as a “snake” (True) in that direction (i.e., going forth and back) or simply repeat ascending (False)

priorityNone | tuple of float

If None (default), use C-Style ordering. Otherwise, this defines the priority along which direction to wind first; the direction with the highest priority increases fastest. For example, “C-Style” order is enforced by priority=(0, 1, 2, ...), and Fortrans F-style order is enforced by priority=(dim, dim-1, ..., 1, 0)

groupNone | tuple of tuple

If None (default), ignore it. Otherwise, it specifies that we group the fastests changing dimension

Returns
orderndarray (np.prod(shape), len(shape))

An order of the sites for Lattice.order in the specified ordering.

See also

Lattice.ordering

method in Lattice to obtain the order from parameters.

Lattice.plot_order

visualizes the resulting order in a Lattice.

get_order_grouped

a variant grouping sites of the unit cell.