Create a pass to remove global phases

Open
#2,613 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
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by reading issue #2604 and locating the existing phase-operation handling in the quantum dialect. Identify how phase operations without control wires are represented and how passes inspect parent regions or call-graph ancestry. Done means the new pass removes those operations while enforcing the stated region-safety criteria.

Written by the indexing model from the issue text.

Description

enhancement good first issue

Similar to #2604, but even simpler by just deleting phase ops without control wires. There is no control regions yet in the quantum dialect, but once there are this pass would need to ensure there are no control regions in its parent chain, or call graph ancestry. One way to guarantee this right now for the future is to analyze this criteria with an opt-in model (e.g. only func, scf, module, and adjoint regions are allowed), making the pass safe.

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.