class Inelastica.math.spectral.SpectralMatrix(A=None, cutoff=1e-08)[source]

Bases: object

Matrix class for spectral matrices.

Idea: Split a spectral matrix \(\mathbf{A}^{(mxm)}\) into two smaller matrices \(\mathbf{A} = \mathbf{L}.\mathbf{R}\) where \(\mathbf{L}^{(mxn)} = [\lambda_1 \mathbf{v}_1, ..., \lambda_n \mathbf{v}_n]\) and \(\mathbf{R}^{(nxm)} = [\mathbf{v}_1, ..., \mathbf{v}_n]^\dagger\) are constructed from a call to LA.eigh(A) keeping only \(n\) eigensolutions with eigenvalues above the specified cutoff.

The magic takes place in Matrix multiply function.

Todo: Adding two gives full matrix! Should be easy to fix.

Parameters:
Andarray
Attributes:
Lndarray
Rndarray
full()[source]

Returns the dense ndarray via matrix multiplication \(\mathbf{A}^{(mxm)} = \mathbf{L}.\mathbf{R}\).

Inelastica.math.spectral.dagger(x)[source]

Returns the hermitian conjugation of a normal or spectral matrix.

Inelastica.math.spectral.mm(*args)[source]

Matrix multiplication with arbitrary number of arguments and the SpectralMatrix type.

Inelastica.math.spectral.trace(a)[source]

Returns the trace of a normal or spectral matrix.