-
Notifications
You must be signed in to change notification settings - Fork 672
Move capture code closer to its equivalent use case #7608
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7608 +/- ##
==========================================
- Coverage 99.68% 99.60% -0.08%
==========================================
Files 531 530 -1
Lines 51979 52040 +61
==========================================
+ Hits 51815 51835 +20
- Misses 164 205 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 is great, could you make a story in the circular dependencies epic for this?
Co-authored-by: Andrija Paurevic <[email protected]>
@@ -204,21 +201,19 @@ def create_measurement_wires_primitive( | |||
if not has_jax: | |||
return None | |||
|
|||
from .custom_primitives import QmlPrimitive # pylint: disable=import-outside-toplevel | |||
from ..capture.custom_primitives import QmlPrimitive # pylint: disable=import-outside-toplevel |
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.
😨
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.
Will this cause any potential risk?
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!
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.
Pure move-around, I can't think of any obvious issue! Let's see how CI feels
@@ -204,21 +201,19 @@ def create_measurement_wires_primitive( | |||
if not has_jax: | |||
return None | |||
|
|||
from .custom_primitives import QmlPrimitive # pylint: disable=import-outside-toplevel | |||
from ..capture.custom_primitives import QmlPrimitive # pylint: disable=import-outside-toplevel |
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.
Will this cause any potential risk?
Context:
When we first started, I tried to keep program cpature code isolated so it wouldn't cause confusion and complexity during standard developement. Now it's much more fleshed out, and instead it causes problems with module dependencies.
Description of the Change:
Moves operator, measurement, and gradient capture code closer to the code that it captures.
Benefits:
Clearer chain of dependencies.
Possible Drawbacks:
As program capture is still fairly experimental, I'm not concerned about moving things breaking anything.
Related GitHub Issues:
[sc-92605]