-
Couldn't load subscription status.
- Fork 706
Unified internal implementation for decompositions #8193
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
…o decomp-fallback
…o decomp-fallback
Co-authored-by: Isaac De Vlugt <[email protected]>
Co-authored-by: Pietropaolo Frisoni <[email protected]>
|
Hello. You may have forgotten to update the changelog!
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8193 +/- ##
==========================================
- Coverage 99.69% 99.69% -0.01%
==========================================
Files 548 548
Lines 56851 56845 -6
==========================================
- Hits 56678 56672 -6
Misses 173 173 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@astralcai Hopefully I didn't resolve the merge conflicts with wrongly changing anything you wrote before |
|
I would say actually this PR looks already ready for review. Would you like to suggest what is remained to implement here? @astralcai |
I don't think there's anything left to do here, but since nobody has capacity to take on more reviews this week, it'll likely have to wait till next week. I'll leave it up to you to address any review comments you receive. |
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.
That was pretty straight forward. Thanks! LGTM.
Co-authored-by: Andrija Paurevic <[email protected]>
Context:
Right now,
preprocessandtransformshave two different_operator_decomposition_gento do recursive long decision trees. This will eventually cause much pain and difficulty, especially when we are ready to have our new graph-based decomposition to do the device preprocess as well.Since these two methods are doing more or less the same functionality only with slightly difference in accepted arguments, it will be much beneficial if we can unify them as soon as possible.
Description of the Change:
devices/preprocess.py::_operator_decomposition_genhas been removed._operator_decomposition_genliving intransforms/decompose.pyto have the same core internal implementation for_operator_decomposition_gen._operator_decomposition_genaccepts two new args:custom_decomposer: to support thedecomposerfeature of thepreprocess.decompose, which was originally supported by the removed one.strict: If True, an error will be raised when an operator does not provide a decomposition and does not meet the stopping criteria. Otherwise, a warning is raised.Benefits:
Avoid code duplication, promotes feature parity.
Possible Drawbacks:
The
_operator_decomposition_genis getting bulky.Related GitHub Issues:
[sc-98684]