detect_grid_outer_legcharge
full name: tenpy.linalg.np_conserved.detect_grid_outer_legcharge
parent module:
tenpy.linalg.np_conserved
type: function
- tenpy.linalg.np_conserved.detect_grid_outer_legcharge(grid, grid_legs, qtotal=None, qconj=1, bunch=False)[source]
Derive a LegCharge for a grid used for
grid_outer()
.Note: The resulting LegCharge is not bunched.
- Parameters:
grid (array_like of {
Array
| None}) – The grid as it will be given togrid_outer()
.grid_legs (list of {
LegCharge
| None}) – One LegCharge for each dimension of the grid, except for one entry which isNone
. This missing entry is to be calculated.qtotal (charge) – The desired total charge of the array. Defaults to 0.
- Returns:
new_grid_legs – A copy of the given grid_legs with the
None
replaced by a compatible LegCharge. The new LegCharge is neither bunched nor sorted!- Return type:
list of
LegCharge
See also
detect_legcharge
similar functionality for a flat numpy array instead of a grid.