Skip to content

Conversation

@jzaia18
Copy link
Contributor

@jzaia18 jzaia18 commented Nov 26, 2025

Context:
There is currently no way to view the impact to runtime costs of a given MLIR pass from the python frontend of PennyLane.

Description of the Change:
Creates a new mlir_specs function, in addition to a specs_collect function which uses xDSL to allow inspection of compilation passes written in MLIR.

Benefits:
Allows users to evaluate the impact on the IR of various MLIR passes.

Possible Drawbacks:
Not integrated with qml.specs(), this will be handled in a followup PR.

Related GitHub Issues:
[sc-103510]
Migrated from PennyLaneAI/pennylane#8660

See also the frontend integration for this PR: PennyLaneAI/pennylane#8606

mudit2812 and others added 30 commits November 17, 2025 10:48
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.

Just some comments after my first pass - looks good though!

Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

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

🎉

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.

Looks good to me - nice work!

@jzaia18
Copy link
Contributor Author

jzaia18 commented Dec 5, 2025

Awesome! Thanks for the reviews. Will wait to merge this until after the migration PR gets merged to main.

Base automatically changed from migrate-unified-compiler to main 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.

6 participants