charges

  • full name: tenpy.linalg.charges

  • parent module: tenpy.linalg

  • type: module

Classes

ChargeInfo([mod, names])

Meta-data about the charge of a tensor.

LegCharge(chargeinfo, slices, charges[, qconj])

Save the charge data associated to a leg of a tensor.

LegPipe(legs[, qconj, sort, bunch])

A LegPipe combines multiple legs of a tensor to one.

Module description

Basic definitions of a charge.

This module contains implementations for handling the quantum numbers (“charges”) of the Array.

In particular, the classes ChargeInfo, LegCharge and LegPipe are implemented here.

Note

The contents of this module are imported in np_conserved, so you usually don’t need to import this module in your application.

A detailed introduction to np_conserved can be found in Introduction to np_conserved.

In this module, some functions have the python decorator @use_cython. Functions with this decoartor are replaced by the ones written in Cython, implemented in the file tenpy/linalg/_npc_helper.pyx. For further details, see the definition of use_cython().