-
Notifications
You must be signed in to change notification settings - Fork 41
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
WIP: implementation of DiagonalTensorMap #174
Conversation
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.
Looks very reasonable to me!
I would think that definitely here, we can probably get an efficient block iterator quite easily, which might alleviate the overhead of computing the block location, but for now, it might not even show up in profilers anyways.
Yes I agree the current |
Ok, if all tests work, I think this is getting more or less to a final stage for now. |
Before merging, as a feature request that will be useful for PEPSKit, powers of |
Checking the matrix implementation, it is another one of those that is type unstable. For a real matrix, if julia> A^0.57
2×2 Symmetric{ComplexF64, Matrix{ComplexF64}}:
0.121409+0.155758im -0.251072+0.107136im
-0.251072+0.107136im 0.313729+0.0736924im
julia> Diagonal(eigvals(A))^0.57
ERROR: DomainError with -0.07888175758153752:
Exponentiation yielding a complex result requires a complex argument.
Replace x^y with (x+0im)^y, Complex(x)^y, or similar.
Stacktrace:
... Because of all of this, I would very much like to postpone this to a separate PR. |
I'm definitely okay with having this as a separate PR. The results with the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #174 +/- ##
==========================================
+ Coverage 80.93% 81.39% +0.45%
==========================================
Files 41 42 +1
Lines 5015 5218 +203
==========================================
+ Hits 4059 4247 +188
- Misses 956 971 +15 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
c1e53c9
to
5b1e01f
Compare
Ok, thanks for the extra additions @lkdvos . I think this is now ready to be merged. |
I think we do want to have a
DiagonalTensorMap
type for the singular values and eigenvalues in the corresponding factorisations. Changing those tensor types arguably constitutes a breaking change, so we do not want to do this after releasing 1.0.In this first PR, I will just implement the type (finished) and a minimal implementation with some tests, but not yet start to use it.
Switching
svd
andeig
,eigh
to useDiagonalTensorMap
will constitute a second PR.