NpcLinearOperator

  • full name: tenpy.linalg.sparse.NpcLinearOperator

  • parent module: tenpy.linalg.sparse

  • type: class

class tenpy.linalg.sparse.NpcLinearOperator[source]

Bases: object

Prototype for a Linear Operator acting on Array.

Note that an Array implements a matvec function. Thus you can use any (square) npc Array as an NpcLinearOperator.

Attributes
dtypenp.type

The data type of its action.

acts_onlist of str

Labels of the state on which the operator can act. NB: Class attribute.

Methods

matvec(self, vec)

Calculate the action of the operator on a vector vec.

matvec(self, vec)[source]

Calculate the action of the operator on a vector vec.

Note that we don’t require vec to be one-dimensional. However, for square operators we require that the result of matvec has the same legs (in the same order) as vec such that they can be added. Note that this excludes a non-trivial qtotal for square operators.