Try to use vector multiplication for truncation error computation - #443
Conversation
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?
For GPU arrays? I'm not sure about this tbh, it wasn't working with |
|
Also I don't think we can bcast over |
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
lkdvos
left a comment
There was a problem hiding this comment.
Looks good to me! Do you know if this is covered in the tests? If it is, good to go for me!
|
It seems to be based on codecov |
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.