Skip to content

Conversation

@VictorVanthilt
Copy link
Owner

TensorKit v0.16 gives us access to eigh_trunc (and the error it makes, measured by the 2-norm of the discarded eigenvalues) :)))

@VictorVanthilt
Copy link
Owner Author

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.

@VictorVanthilt VictorVanthilt merged commit 6a734a3 into master Feb 11, 2026
8 checks passed
@VictorVanthilt VictorVanthilt deleted the vv-TensorKit-0.16 branch February 11, 2026 14:23

# SVD fmatrix
U, S, V = tsvd(f)
U, S, V = svd_full!(f)
Copy link
Contributor

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

Copy link
Owner Author

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 :) ?

Copy link
Owner Author

@VictorVanthilt VictorVanthilt Feb 11, 2026

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?

Copy link
Owner Author

@VictorVanthilt VictorVanthilt Feb 11, 2026

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

Copy link
Contributor

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;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants