Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ITensors] add kwarg to truncate! to return RankFactorization.Spectru…
…m (#1516) The purpose of this commit is to allow the truncation error from an operation to be returned. This is the first step envisioned for that functionality. The spectrum and truncation error from calling svd() on ITensors is not accessible from calls to truncate! and truncate. This allows the Spectrum type (which contains the spectrum and the error) to be optionally returned. This required importing RankFactorization.Spectrum in ITensors (so an added import in imports.jl) and then slightly refactoring the definition of truncate! and truncate. This commit makes a named tuple with each element being "bond_n" where n is `1` to `N-1` bonds and each element of the named tuple corresponds to the Spectrum returned from the call to svd as the bonds are swept over during the call to truncate. All tests were run with 92979 passing and 73 broken. Total tests were 93052.
- Loading branch information