3029 follow-up: Eliminate the rebinding of allocation primitives

Open
#3,055 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
compilers

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.

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

Dominant language
Python
Stars
234
Forks
84
Avg merge
3d 11h
Merged PRs (30d)
78

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PennyLaneAI/catalyst

All issues in PennyLaneAI/catalyst

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.