gftool.beb.SpecDec
- class gftool.beb.SpecDec(rv: ndarray, eig: ndarray, rv_inv: ndarray)[source]
SVD like spectral decomposition.
Works only for N×N matrices unlike the
UDecomposition
base class.- Parameters:
- rv(…, N, N) complex np.ndarray
The matrix of right eigenvectors.
- eig(…, N) float np.ndarray
The vector of real eigenvalues.
- rv_inv(…, N, N) complex np.ndarray
The inverse of
rv
.
Methods
__init__
(rv, eig, rv_inv)count
(value)from_gf
(gf)Decompose the inverse Green's function matrix.
from_hamiltonian
(hamilton)Decompose the Hamiltonian matrix.
index
(value, [start, [stop]])Raises ValueError if the value is not present.
partition
([return_sqrts])Symmetrically partition the spectral decomposition as u * eig**0.5, eig**0.5 * uh.
reconstruct
([eig, kind])Get matrix back from Decomposition.
truncate
([rcond])Return the truncated spectral decomposition.
Attributes
The vector of eigenvalues.
Check if SVD of square matrix is truncated/compact or full.
The matrix of right eigenvectors.
The inverse of
rv
.Singular values in descending order, different from order of
eig
.Unitary matrix of right eigenvectors, same as
rv
.