-
Notifications
You must be signed in to change notification settings - Fork 57
Tidy strange code in jit.py #2135
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: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2135 +/- ##
==========================================
- Coverage 97.39% 97.39% -0.01%
==========================================
Files 91 91
Lines 10610 10608 -2
Branches 999 999
==========================================
- Hits 10334 10332 -2
Misses 218 218
Partials 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hello. You may have forgotten to update the changelog!
|
default_pass_pipeline = self.compile_options.circuit_transform_pipeline | ||
pass_pipeline = params.get("pass_pipeline", default_pass_pipeline) | ||
params["pass_pipeline"] = pass_pipeline | ||
params["pass_pipeline"] = self.compile_options.circuit_transform_pipeline |
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.
Is this worth trying out then?
params["pass_pipeline"] = self.compile_options.circuit_transform_pipeline | |
default_pass_pipeline = self.compile_options.circuit_transform_pipeline | |
pass_pipeline = kwargs.pop("pass_pipeline", default_pass_pipeline) | |
params["pass_pipeline"] = pass_pipeline |
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.
So how would we hit that?
Also, seems like that might be a new feature we would have to document and test.
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.
Didn't you say PassPipelineWrapper
is generating the pass_pipeline
kwarg? There is also evidence that we expect a pass_pipeline
kwarg in qnodes here and here.
I'm not sure I see a new feature, just obviously buggy code that very likely doesn't match the intent of the author who wrote it. Maybe you're thinking of a new feature because this kwarg could be provided by users as well? But to me it looks like the kwarg is used an internal "secret" parameter rather than a user facing one.
Context:
Trying to understand how transforms get passed around in the catalyst frontend. This code was confusing, and I think it is dead code. So let's try getting rid of the dead logic.
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: