get_order¶
full name: tenpy.models.lattice.get_order
parent module:
tenpy.models.latticetype: function
-
tenpy.models.lattice.get_order(shape, snake_winding, priority=None)[source]¶ Built the
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”.
- 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)
- priority
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 bypriority=(0, 1, 2, ...), and Fortrans F-style order is enforced bypriority=(dim, dim-1, ..., 1, 0)- group
None| 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.orderin the specified ordering.
See also
Lattice.orderingmethod in
Latticeto obtain the order from parameters.Lattice.plot_ordervisualizes the resulting order in a
Lattice.get_order_groupeda variant grouping sites of the unit cell.