-
Notifications
You must be signed in to change notification settings - Fork 13
Update to TensorKit 0.16 #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using svd_full! here? tsvd is equivalent to svd_compact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) :)))