-
Notifications
You must be signed in to change notification settings - Fork 625
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
[Capture] First PR for enabling dynamic decompositions with PLxPR
enabled
#6859
Conversation
Hello. You may have forgotten to update the changelog!
|
qml.cond
in decompositions can be captured into PLxPRPLxPR
enabled
…o cond_dynamic_decomp
…o cond_dynamic_decomp
…o cond_dynamic_decomp
…o cond_dynamic_decomp
…o cond_dynamic_decomp
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6859 +/- ##
=======================================
Coverage 99.59% 99.59%
=======================================
Files 480 480
Lines 45510 45517 +7
=======================================
+ Hits 45325 45332 +7
Misses 185 185 ☔ View full report in Codecov by Sentry. |
PLxPR
enabledPLxPR
enabled
…o cond_dynamic_decomp
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.
Looks good. We haven't had any testing for execution so far, so I'm happy to see that. I'd like some discussions about always relying on default.qubit
though. Especially after the conversations in stand-up yesterday, it seems like a good idea to standardize a strategy that everyone can use going forward.
Another thing I noticed is missing integration tests. DecomposeInterpreter
is integrated with qml.transforms.decompose
, so I'd like to see some testing with that as well instead of just DecomposeInterpreter
.
I totally second that! In this case, I'm using the device only to explicitly test the result, but in principle, I could do without it and just verify the structure of the Maybe we can create some kind of 'reference' qubit (not necessarily limited to program capture) so that these tests automatically take place with more than one device. For the moment, it seems to me that the only solution is to continue with
Good point, now that we have integrated dynamic decompositions with the old interpreter, this would be good. I added some tests in a P.S. As you can see in this PR (which enables nested decompositions), the tests will work automatically with autograph enabled and disabled once this PR is merged. |
…o cond_dynamic_decomp
tests/capture/transforms/test_capture_dynamic_decompositions.py
Outdated
Show resolved
Hide resolved
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.
Looks good to me, thanks @PietropaoloFrisoni !
Context: The main purpose of this story is to implement a prototype for dynamic decompositions in PL with program capture enabled.
At this stage, we only focus on one-level dynamic decompositions (without implementing additional parameters that can be passed to the interpreter). The UI might change in the future.
Therefore, these are the main current limitations of the prototype introduced in this PR:
Description of the Change: As above.
Benefits: We can start capturing the decompositions dynamically with program capture enabled instead of simply returning the operators list at the end.
Possible Drawbacks: Still experimental. It shouldn't cause issues with the current program capture scaffolding.
Related GitHub Issues: None
Related Shortcut Stories: [sc-82690]