PennyLaneAI / PennyLaneAI/catalyst
3029 follow-up: Eliminate the rebinding of allocation primitives
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Commenting for new issue:
Eliminate the rebinding of pl allocation primitives during the from_plxpr lowering, since these primitives now have a direct to mlir lowering. Then the TODO can be removed.
Also remove the qref_alloc_p and qref_dealloc_p primitives, and replace their use in the handle_qnode/calling_convention function with the equivalent pennylane primitives.
Originally posted by @dime10 in https://github.com/PennyLaneAI/catalyst/pull/3029#discussion_r3639261040
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the from_plxpr lowering code and the handle_qnode/calling_convention function mentioned in the issue, then inspect how allocation primitives and qref_alloc_p/qref_dealloc_p are currently used. Confirm the direct MLIR lowerings and the existing TODO before removing the rebinding and replacing the qref primitives; done means those obsolete bindings, primitives, and TODO are gone without changing the lowering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100