# sparse¶

Classes

 FlatHermitianOperator(npc_matvec, leg, dtype) Hermitian variant of FlatLinearOperator. FlatLinearOperator(npc_matvec, leg, dtype[, …]) Square Linear operator acting on numpy arrays based on a matvec acting on npc Arrays. NpcLinearOperator Prototype for a Linear Operator acting on Array.

Module description

Providing support for sparse algorithms (using matrix-vector products only).

Some linear algebra algorithms, e.g. Lanczos, do not require the full representations of a linear operator, but only the action on a vector, i.e., a matrix-vector product matvec. Here we define the strucuture of such a general operator, NpcLinearOperator, as it is used in our own implementations of these algorithms (e.g., lanczos). Moreover, the FlatLinearOperator allows to use all the scipy sparse methods by providing functionality to convert flat numpy arrays to and from np_conserved arrays.