Add frontend lowering for pbc.fabricate#3019
Closed
Qottmann wants to merge 7 commits into
Closed
Conversation
Expose fabricate through Catalyst capture and QJIT lowering so qp.fabricate produces new qubits that compile to pbc.fabricate after value-semantics conversion. Co-authored-by: Cursor <cursoragent@cursor.com>
Apply black, isort, and clang-format so CI formatting checks pass. Co-authored-by: Cursor <cursoragent@cursor.com>
Assert empty wires directly instead of num_wires == 0, matching PennyLane Fabricate after the produced wire is attached during plxpr conversion. Co-authored-by: Cursor <cursoragent@cursor.com>
…tests. Replace global capture toggles with capture=True on qjit and add an enable_graph_decomposition pytest fixture for fabricate lowering tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Add a use_empty canonicalizer for pbc.ref.fabricate, assert ref ops are gone in fabricate tests, clarify deallocate error handling, and move the changelog entry to New features with the PR link. Co-authored-by: Cursor <cursoragent@cursor.com>
Handle standalone AbstractQbit tracers in QRegPromise and route qp.deallocate to catalyst.deallocate so PBC workflows compile with the old frontend. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
I'm guessing this PR is in need of updating? Let me know if you need anything |
Contributor
Author
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.
Summary
pbc.ref.fabricateMLIR op and value-semantics conversion topbc.fabricatefabricate_p/qref_fabricate_p, including deallocation support for fabricated qubitscatalyst.fabricate()for legacy QJIT tracing and add pytest/lit coverageTest plan
pytest frontend/test/pytest/test_fabricate.py -vpython frontend/test/lit/test_fabricate.pyRelated
qp.fabricate()/Fabricateoperator[sc-124605]
Made with Cursor