Add support for rotation gates in `to_ppr` pass
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the provided qml.RX example with qml.transforms.to_ppr and the shown compilation pipeline. Then inspect the to_ppr pass and its existing PauliRot handling; done means regular rotation gates such as RX compile without the unsupported-gate error.
Written by the indexing model from the issue text.
Description
Currently, The to_ppr pass supports PauliRot gate. but not regular rotation gates like RX. Since the latter can be expressed as a PauliRot gate, we can add support for them as well.
Right now, a circuit like below would fail:
qml.capture.enable()
dev = qml.device("null.qubit", wires=1)
pipeline = [("pipe", ["quantum-compilation-stage"])]
@qml.qjit(pipelines=pipeline)
@qml.transforms.to_ppr
@qml.qnode(dev)
def circuit():
qml.RX(0.1, wires=0)
return qml.expval(qml.PauliZ(0))
print(circuit.mlir_opt)
with the error message:
catalyst.utils.exceptions.CompileError: catalyst failed with error code 1: Compilation failed:
circuit:24:12: error: Unsupported gate. Supported gates: H, S, T, X, Y, Z, S†, T†, I, and CNOT
%5 = "quantum.custom"(%4, %3) {gate_name = "RX", operandSegmentSizes = array<i32: 1, 1, 0, 0>, resultSegmentSizes = array<i32: 1, 0>} : (f64, !quantum.bit) -> !quantum.bit
^
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 78
Getting set up
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.
More from PennyLaneAI/catalyst
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
PennyLaneAI/catalyst#3489 ·
Maintainers usually reply within 1 day
-
Fix platform tag for macOS wheelsMay be free again @sarehaskari17 claimed this 107 days ago, and no pull request is open. OpenCI/Build enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PennyLaneAI/catalyst#2907 · 2 comments ·
Maintainers usually reply within 1 day
-
The docs page for `CompileOptions` is missing a description for the `target` attributePossibly taken @daxsh2803 claimed this 68 days ago. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PennyLaneAI/catalyst#2653 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
PennyLaneAI/catalyst#3550 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
PennyLaneAI/catalyst#3497 ·
Maintainers usually reply within 1 day
All issues in PennyLaneAI/catalyst
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day