Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Capture] Capture the single_qubit_fusion transform #6945

Merged
merged 44 commits into from
Feb 27, 2025

Conversation

PietropaoloFrisoni
Copy link
Contributor

@PietropaoloFrisoni PietropaoloFrisoni commented Feb 10, 2025

Context: single_qubit_fusion can now be captured. That is, it can be applied when qml.capture.enabled is True.

Description of the Change: As above.

Benefits: One more transform can be applied with the new capture feature.

Possible Drawbacks: The order of operations might change compared to the non-captured version of this function, but this does not affect the correctness of the result.

Related GitHub Issues: None.

[sc-83906]

Copy link
Contributor

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.

@PietropaoloFrisoni PietropaoloFrisoni marked this pull request as ready for review February 19, 2025 23:11
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.60%. Comparing base (64e226f) to head (3acbdaf).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #6945    +/-   ##
========================================
  Coverage   99.60%   99.60%            
========================================
  Files         484      484            
  Lines       46141    46243   +102     
========================================
+ Hits        45957    46059   +102     
  Misses        184      184            

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

Copy link
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 @PietropaoloFrisoni, very thorough testing 💪 💯

I had a number of minor technical suggestions and questions.
I think the occasional reordering through the transform is not problematic, but I would like to make sure that I understand where exactly it comes in :) Do we have other plxpr transforms that do such shenanigans? 😁

Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

First pass through, everything looks great to me so far! I think I might have some ways to clean-up my merge rotations PR now ... 😆

Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

Another pass through! 😎

Co-authored-by: Andrija Paurevic <[email protected]>
Copy link
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.

Thanks for addressing all my comments so thoroughly, @PietropaoloFrisoni 💯
Nice job! 🎉

Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

This looks really nice to me! Great job 🚀

@PietropaoloFrisoni PietropaoloFrisoni enabled auto-merge (squash) February 27, 2025 16:08
@PietropaoloFrisoni PietropaoloFrisoni merged commit 8e30920 into master Feb 27, 2025
45 checks passed
@PietropaoloFrisoni PietropaoloFrisoni deleted the capture_single_qubit_fusion branch February 27, 2025 16:26
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