-
Notifications
You must be signed in to change notification settings - Fork 34
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
Broadcasting Kets and Operators #172
Conversation
Just to make sure it is clarified: this is strictly an improvement over current capabilities, it only makes changes to the broadcast capabilities of our types, and it does not hook these new broadcasting capabilities in the time evolution solvers. |
Looks like the manual piracy test is failing because of the new broadcasting interface. I'm not sure what this orgs policy on type piracy is. |
I should also mention: if this PR is approved, a lot of the defined methods can probably be moved to QuantumInterface. I'm happy to do this, but it's up to the maintainers if we want to do this now or later (or at all 😄). |
@apkille @Krastanov the changes here look fine to me. Not sure what causes the piracy failure, but I'll leave that up to you. I'd suggest we merge this PR (and by "we" I mean @Krastanov once you're happy with everything) and leave the move to QuantumInterface for another time (should be done though IMO). Do you guys agree? |
Type piracies should be fine now.
Sure, that works for me. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #172 +/- ##
==========================================
- Coverage 93.00% 92.13% -0.88%
==========================================
Files 25 26 +1
Lines 3104 3231 +127
==========================================
+ Hits 2887 2977 +90
- Misses 217 254 +37 ☔ View full report in Codecov by Sentry. |
@david-pl Is bumping the Julia compat to 1.10 OK with you? We are getting compat conflicts with RecursiveArrayTools otherwise. |
FYI, 1.10 will be the new LTS in about a month or so, when 1.11 is released. |
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.
This looks good to me. I am requesting one minor change and it is good to merge.
TODOs:
Oh, one more thing. I see a big part of the additions are not covered by the CI. Could you put your examples from the first comment in the test runner, maybe as a new file |
@Krastanov should be good to go. About the benchmarks, I am adding them in a separate PR, which will be submitted later today or early tomorrow. |
@apkille , could you check whether the new JET warnings come from something you have done? If not, could you bump the permitted number of warnings, to have this test pass? @david-pl , @amilsted , @ChristophHotter , let me know if there are any worries about the bump to the new julia LTS as a lower bound. If not, I will merge this in about a week (do not hesitate to request a longer waiting period). |
@Krastanov two of the JET warnings were because of me, and they were simple fixes. The rest were not from changes in this branch, so I bumped the permitted warnings from 24 to 28. |
Merged! Thank you for contributing this! |
@david-pl @Krastanov @amilsted Improves performance and reduces allocations in #16 by defining RecursiveArrayTools methods and
Base.Broadcast._broadcast_get_index
for QO types.For the example discussed in #16 (copied below)
the performance is now as follows.
QO Ket:
Julia array: