Add device preprocessing to from_plxpr#2557
Merged
Conversation
…rm-sequence-lowering
This was referenced Mar 6, 2026
…rm-sequence-lowering
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
…rm-sequence-lowering
mudit2812
added a commit
that referenced
this pull request
Mar 12, 2026
**Context:** We want an MLIR pass that can be used short-term to stand-in for other passes that do not have implementations **Description of the Change:** * Add `EmptyPass` MLIR pass, with a string `key` option **Benefits:** * Can be used in #2557 to use instead of unimplemented passes **Possible Drawbacks:** **Related GitHub Issues:** [sc-113732]
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2557 +/- ##
==========================================
+ Coverage 96.90% 96.91% +0.01%
==========================================
Files 155 156 +1
Lines 16974 17065 +91
Branches 1636 1659 +23
==========================================
+ Hits 16448 16539 +91
Misses 390 390
Partials 136 136 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
paul0403
reviewed
Mar 13, 2026
Member
paul0403
left a comment
There was a problem hiding this comment.
Amazing PR! This is a big step towards the device capabilities mliestone in capture! 💯 🥇
paul0403
reviewed
Mar 16, 2026
Co-authored-by: Paul <79805239+paul0403@users.noreply.github.com>
albi3ro
approved these changes
Mar 17, 2026
Contributor
albi3ro
left a comment
There was a problem hiding this comment.
Looks great! Thanks so much for getting this all done. 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context:
Description of the Change:
catalyst.from_plxpr.device_utilssubmodule, which contains a function for generating a device preprocessing pipeline based on device capabilities and the execution config.pass_name, the transform is processed as follows:empty, is used. This transform has akeystring argument that is used to indicate to devs which transform this pass is standing in for."device"pass pipeline that is added to thequantum_kernel_pbinding infrom_plxpr.skip_preprocessargument toqjit,trace_from_pennylane,from_plxpr, andWorkflowInterpreter, which can be used to skip appending device preprocessing transforms to the pass pipeline._preprocess_warn=Trueargument tofrom_plxprandWorkflowInterpreterwhich can be used to toggle the dummy transform warnings off. This argument is private and not exposed byqjit. I added it as a testing convenience.Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-111493] [sc-112073]