Conversation
This reverts commit 6c282b4.
|
Errors now are related to the issue raised in QuantumKitHub/TensorKit.jl#368 and will be fixed with TensorKit 0.16.2. I'll wait for that. |
|
|
||
| # SVD fmatrix | ||
| U, S, V = tsvd(f) | ||
| U, S, V = svd_full!(f) |
There was a problem hiding this comment.
Why are you using svd_full! here? tsvd is equivalent to svd_compact
There was a problem hiding this comment.
Because I have no idea what svd_compact actually does. Can you please explain the difference in 1/2 sentences :) ?
There was a problem hiding this comment.
Ok I think I understand it. In case of a rectangular map A the "inner dimension" (dim(domain(U)) for svd or dim(domain(Q)) for QR) can be smaller if dim(codomain(A) < dim(domain(A)). Is that correct?
There was a problem hiding this comment.
Yes indeed
julia> using MatrixAlgebraKit
julia> T = rand(Float64, 100, 50);
julia> size(svd_full(T)[1])
(100, 100)
julia> size(svd_compact(T)[1])
(100, 50)ok thanks for bringing this to my attention and for looking through my PRs without me asking :))) appreciate it <3
There was a problem hiding this comment.
Yeah, in general the compact is actually the default, and the full version is really only relevant if you want to find nullspaces, which is the same for things like qr etc. It should be slightly more efficient to use the compact ones in general;)
TensorKit v0.16 gives us access to
eigh_trunc(and the error it makes, measured by the 2-norm of the discarded eigenvalues) :)))