Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions frontend/catalyst/jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,7 @@ def closure(qnode, *args, **kwargs):
params["_out_tree_expected"] = []
params["_classical_return_indices"] = []
params["_num_mcm_expected"] = []
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
Copy link
Contributor

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?

Suggested change
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

Copy link
Contributor Author

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.

Copy link
Contributor

@dime10 dime10 Oct 22, 2025

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.

params["debug_info"] = dbg

return QFunc.__call__(
Expand Down