Skip to content

Conversation

@albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Nov 18, 2025

Context:

In #2149 I'm integrating transforms with passes names with the infrastructure so that we can replace the Catalyst Pass instracture with a unified transform handling ecosystem.

In order to test this integration, I'm just switching the passes over to use the transform instructure.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

"""

if fn.mlir_module is not None:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just switching to using a guard clause here. No actual code changes, but made it easier to scan the source code and see what was happening.

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@paul0403
Copy link
Member

Did you accidentally commit the intermediates? 😅

@albi3ro
Copy link
Contributor Author

albi3ro commented Nov 20, 2025

Did you accidentally commit the intermediates? 😅

looks like yes ...

albi3ro added a commit that referenced this pull request Dec 3, 2025
**Context:**

Trying to improve our integration between pennylane transforms and
catalyst passes.

See #2206 for where we are able to update all built-in catalyst passes
to be transforms instead. That PR helps validate we can make this change
with no breaking behaviour.

Going forward, we can setup a plan to get rid of the catalyst-specific
pass handling infrastructure.

Also note that this PR targets the PennyLane branch, so we can confirm
we won't need anymore changes there to get catalyst working correctly
before approving and merging.

**Description of the Change:**

Uses the `transform.pass_name` property as the higher priority source of
the `pass_name`.

Updates the `pass_pipeline` from the `quantum_kernel_p` primitive to be
a tuple of `TransformContainer` objects instead of `Pass`, but leaves in
the logic to handle `tuple[Pass,...]` for safer backwards compatibility.

Also makes using transforms with pass names by splitting a `QNode`'s
transform program into "things at the start of the program that are tape
transforms" and "things at the end of the program that are MLIR passes".
This will allow us to get rid of `PassPipelineWrapper` use for both
systems and soften the change from old frontend to new frontend.

**Benefits:**

Unified handling of transforms across pennylane and catalyst. 

**Possible Drawbacks:**
 


**Related GitHub Issues:**

Depends on PennyLaneAI/pennylane#8539
[sc-103775]

---------

Co-authored-by: Paul <[email protected]>
Base automatically changed from pass-pipeline-transform-program to main December 3, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants