Try to use vector multiplication for truncation error computation#443
Draft
kshyatt wants to merge 2 commits into
Draft
Try to use vector multiplication for truncation error computation#443kshyatt wants to merge 2 commits into
kshyatt wants to merge 2 commits into
Conversation
lkdvos
reviewed
Jun 1, 2026
Member
lkdvos
left a comment
There was a problem hiding this comment.
I guess this only works for logical indices though, so probably have to specialize on that? Additionally, if we write custom code for that, you might be able to combine the norm and truncation pass with broadcasting (you can take a norm of a broadcast expression), since the norm also needs to spawn multiple kernels to include the quantum dimensions?
Member
Author
For GPU arrays? I'm not sure about this tbh, it wasn't working with |
Member
Author
|
Also I don't think we can bcast over |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'll add benchmarks to this after I have dinner. I think this should work ok (at least for trivial
SectorVectors?) because the boolean inds are just0or1and we can multiply by their!to set stuff to zero. That kernel seems to be a bit faster.