full name: tenpy.models.lattice.get_order
get_order(shape, snake_winding, priority=None)¶
Lattice.orderin (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”.
shape (tuple of int) – The shape of the lattice, i.e., the length in each direction.
snake_winding (tuple 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)
None| 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)
None| tuple of tuple) – If
None(default), ignore it. Otherwise, it specifies that we group the fastests changing dimension
order – An order of the sites for
Lattice.orderin the specified ordering.
- Return type
ndarray (np.prod(shape), len(shape))