Skip to content

Transforms SelectPauliRot (phase gradient)#8738

Merged
KetpuntoG merged 35 commits intomasterfrom
multiplexer_decomposition
Dec 16, 2025
Merged

Transforms SelectPauliRot (phase gradient)#8738
KetpuntoG merged 35 commits intomasterfrom
multiplexer_decomposition

Conversation

@KetpuntoG
Copy link
Copy Markdown
Contributor

@KetpuntoG KetpuntoG commented Dec 5, 2025

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    test directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the doc/releases/changelog-dev.md file, summarizing the
    change, and including a link back to the PR.

  • The PennyLane source code conforms to
    PEP8 standards.
    We check all of our code against Pylint.
    To lint modified files, simply pip install pylint, and then
    run pylint pennylane/path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:

A new state of the art decomposition has been added to SelectPauliRot (as a transform) in qml.labs

Possible Drawbacks:

This is a transform so it will not be part of the decomposition graph

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 5, 2025

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.37%. Comparing base (eac7974) to head (58612ba).
⚠️ Report is 302 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8738   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files         589      589           
  Lines       63179    63181    +2     
=======================================
+ Hits        62784    62786    +2     
  Misses        395      395           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KetpuntoG KetpuntoG changed the title Transforms SelectPauliRot QROM Transforms SelectPauliRot (phase gradient) Dec 5, 2025
Copy link
Copy Markdown
Contributor

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a first pass it looks very nice and clean! Great job @KetpuntoG !
Missing some things in the doc string though

Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py
@KetpuntoG KetpuntoG requested a review from Qottmann December 9, 2025 21:00
Comment thread doc/releases/changelog-dev.md Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Copy link
Copy Markdown
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @KetpuntoG, this is so cool to have implemented essentially in a couple of lines 😍

Comment thread pennylane/labs/transforms/__init__.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py
Comment thread pennylane/labs/tests/transforms/test_select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/tests/transforms/test_select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/tests/transforms/test_select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/tests/transforms/test_select_pauli_rot_phase_gradient.py Outdated
@KetpuntoG KetpuntoG requested a review from dwierichs December 12, 2025 18:47
Copy link
Copy Markdown
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, nice work @KetpuntoG 🎉
Can I ask you to add some explanation for the updated ceiling+flooring logic for the rounding? I'm not sure what exactly is going on :D
Approving conditional on that small request :)

Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Copy link
Copy Markdown
Contributor

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks @KetpuntoG !

just a small suggestion to update the image

Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/tests/transforms/test_select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
Comment thread pennylane/labs/transforms/select_pauli_rot_phase_gradient.py Outdated
@KetpuntoG KetpuntoG added this pull request to the merge queue Dec 16, 2025
Merged via the queue into master with commit 1096074 Dec 16, 2025
55 checks passed
@KetpuntoG KetpuntoG deleted the multiplexer_decomposition branch December 16, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants