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

Apply transform program to diagonalizing_gates in specs #6290

Merged
merged 7 commits into from
Oct 3, 2024

Conversation

lillian542
Copy link
Contributor

@lillian542 lillian542 commented Sep 20, 2024

Context:
If the diagonalizing gates of a circuit contain unsupported gates, the decomposition isn't applied before deciding how many gates there are

Description of the Change:
We take the diagonalizing gates and apply the preprocess transform program (at the level specs was called with) on the gates before counting them for the num_diagonalizing_gates spec.

Benefits:
The num_diagonalizing_gates spec respects the level kwarg instead of always just returning the answer for the unprocessed version of the tape.

[sc-64695]

@lillian542 lillian542 changed the title Apply preprocess to diagonalizing_gates in specs Apply transform program to diagonalizing_gates in specs Sep 20, 2024

This comment was marked as resolved.

@lillian542 lillian542 marked this pull request as ready for review September 30, 2024 20:18
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.70%. Comparing base (d9e833a) to head (7bea93b).
Report is 339 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6290   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files         445      445           
  Lines       42260    42263    +3     
=======================================
+ Hits        42137    42140    +3     
  Misses        123      123           

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

pennylane/resource/specs.py Outdated Show resolved Hide resolved
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

👍

@lillian542 lillian542 enabled auto-merge (squash) October 3, 2024 15:19
@lillian542 lillian542 merged commit e458046 into master Oct 3, 2024
37 checks passed
@lillian542 lillian542 deleted the spec_decompose_diagonalizing_gates branch October 3, 2024 15:34
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.

3 participants