-
Notifications
You must be signed in to change notification settings - Fork 604
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
Clean up Device.batch_transform
to use split_non_commuting
#5828
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5828 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 421 421
Lines 40464 40203 -261
==========================================
- Hits 40335 40073 -262
- Misses 129 130 +1 ☔ View full report in Codecov by Sentry. |
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.
Nice @astralcai !
Took me some time to dig through the logic, but it is nicer now! :)
Also good to see the reduction of number of terms in some scenarios! 🎉
Had only a few quite small comments, basically ready to approve.
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.
Thanks for the clarifications! 👍
LGTM! 🚀
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.
LGTM!
Context:
#5729 introduced the unified
split_non_commuting
. Now the legacy device can usesplit_non_commuting
in all scenarios.Description of the Change:
Cleans up
batch_transform
to usesplit_non_commuting
Benefits:
Cleaner code, prepares for the deprecation of
hamiltonian_expand
andsum_expand
.Related GitHub Issues:
[sc-61253]