eigh_rho
full name: tenpy.linalg.truncation.eigh_rho
parent module:
tenpy.linalg.truncationtype: function
- tenpy.linalg.truncation.eigh_rho(rho, trunc_par, UPLO='L', sort=None)[source]
Performs EIG of a hermitian matrix rho (= density matrix) and truncates it.
Perform a hermitian eigenvalue decomposition with
eigh()and truncates withtruncate(). The result is an approximationrho ~= tensordot(V.scale_axis(W*renormalization, 1), V.conj().T, axes=1)- Parameters:
rho (
Array, shape(M, M)) – The matrix, on which the eigenvalue decomposition (EIG) is performed. Usually, rho represents a density matrix and is assumed to be hermitian AND positive so that the eigenvalues are non-negative.trunc_par (dict) – truncation parameters as described in
truncate().UPLO ({'L', 'U'}) – Whether to take the lower (‘L’, default) or upper (‘U’) triangular part of a. Only used for hermitian eigenvalue decomposition.
sort ({‘m>’, ‘m<’, ‘>’, ‘<’,
None}) – How the eigenvalues should are sorted within each charge block. Defaults toNone, which is same as ‘<’. Seeargsort()for details.
- Returns:
W (1D ndarray) – The eigenvalues, sorted within the same charge blocks according to sort.
V (
Array) – Unitary matrix;V[:, i]is normalized eigenvector with eigenvalueW[i]. The first label is inherited from A, the second label is'eig'.err (
TruncationError) – The truncation error introduced.