-
Notifications
You must be signed in to change notification settings - Fork 5
Output truncation error for truncated decompositions #75
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
lkdvos
left a comment
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.
Overall looks good!
I am slightly on the fence about whether we should compute the truncation error separately, or do that from inside the find_truncated functions. There's definitely some strategies where that information is either already available or more easily computable within these functions. In any case it probably makes sense to have a compute_truncerr function available for some of these strategies to use.
The reason I did not quite liked this in the Copilot PR is that |
|
This is also ready from my side, if at least the current strategy is acceptable. |
lkdvos
left a comment
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.
I rebased onto the current main branch and made some small updates to the docs, which I think I overlooked in the previous PR.
Additionally, I tried adding a compute_truncerr that does not destroy the input, and depending on the case at hand actually turns out to be more or less as performant. This is currently not being used, I just wanted to test the waters and see how you feel about this. I think that the accuracy loss in the fallback case is probably acceptable, am I correct in thinking this would mostly be an issue for heavy truncation, where norm(A)^2 - norm(Strunc)^2 is a difference of a large and small number? Given that we already have to include this for the decompositions that don't have access to the full spectrum, I don't think this is an unfair concession.
Let me know what you think though, I can try and add this in and properly test it, but if you think this is not worth the hassle I'm happy with just removing it and merging this with the input-destroying function.
|
After the build completes, the updated documentation will be available here |
No inaccuracies would appear in the case of very little truncation, where norm(A) and norm(Strunc) are both big, but almost equal.
I am certainly ok with the non-destructive |
|
I updated the JET compat here as well, and used the non-destructive implementation everywhere. |
|
It turns out that my initial approach of sorting the vector of indices in-place breaks the pullbacks: since we are first computing I currently patched it by allocating a new Ideas and opinions would be very welcome. |
|
If a copy of |
|
I'll just change it back to your implementation, it was worth a shot but I feel like it isn't working out too much, so your approach was probably best :) |
e9e42a5 to
1686649
Compare
|
I'm a bit confused about the failing test, I would have thought this now all is computing the same thing in more or less the same way |
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
I've modified the tests a bit. The |
* Bump v0.6 * rename `gaugefix` -> `fixgauge` * reduce unnecessary warnings * fix `copy_input` signatures in Mooncake tests * Add changelog to docs
No description provided.