Skip to content

Conversation

@mudit2812
Copy link
Contributor

@mudit2812 mudit2812 commented Nov 17, 2025

This PR migrates all source code for the unified compiler to Catalyst.

Changes:

  • Add python_interface submodule to frontend/catalyst.
  • Add python_interface submodule to frontend/test/pytest.
  • Remove references to pennylane.compiler.python_compiler.
  • Add a utils.py file to frontend/test/pytest to house data that is used by multiple test files.

Remaining work:

  • Update the cookbook and associated notebooks to use catalyst.python_interface instead of pennylane.compiler.python_compiler.
  • Migrate alll changelog pertaining to the unified compiler from PennyLane's changelog.

Questions for reviewers:

  • Should I build wheels in this PR?
  • Should xdsl and xdsl-jax be hard dependencies?

Future work:

  • Add xDSL universe. This is needed to integrate lit testing for the unified compiler with the existing Catalyst infrastructure (see below).
  • Integrate unified compiler testing with Catalyst's testing infrastructure. This will involve removing all unit/integration lit tests from the frontend/test/pytest folder and adapting them so that they can be moved to the frontend/test/lit folder.
  • Begin the process of having documentation for the unified compiler on pennylane.ai.
  • Improve test coverage for the unified compiler.
  • Add tests and GitHub workflows to validate parity between xDSL and MLIR dialects.

[sc-99039] [sc-98172]

@mudit2812 mudit2812 added the unified compiler Pull requests for the integration with xDSL label Nov 17, 2025
@paul0403
Copy link
Member

Oh, the +20k lines 🤖

@mudit2812
Copy link
Contributor Author

Oh, the +20k lines 🤖

I'm not really sure what the review procedure should be for this PR. Beyond linting and updates to which modules we're referencing (pennylane.compiler.python_compiler -> catalyst.python_interface), there aren't any changes.

@mudit2812 mudit2812 requested review from dime10 and mehrdad2m December 5, 2025 20:11
Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

Changes since last approval LGTM

@mehrdad2m
Copy link
Contributor

for the lit failure on the check-catalyst workflow, we can add a # REQUIRES: xdsl to the top of the file and that I think should fix it

Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

New test setup looks good to me 👍 The only thing I would like to sort out is the changelog (could also be a follow up if needed).

@mudit2812
Copy link
Contributor Author

New test setup looks good to me 👍 The only thing I would like to sort out is the changelog (could also be a follow up if needed).

I'd prefer to address that later, as this PR is blocking quite a bit of work

@mudit2812 mudit2812 removed the author:build-wheels Run the wheel building workflows on this Pull Request label Dec 5, 2025
Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Looks great 🎉

@mudit2812 mudit2812 merged commit 454975a into main Dec 5, 2025
37 of 38 checks passed
@mudit2812 mudit2812 deleted the migrate-unified-compiler branch December 5, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unified compiler Pull requests for the integration with xDSL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants