Skip to content

Remove the diagonal PhasedXZGate operation before measurement - #8531

Open
jangyoujin0917 wants to merge 5 commits into
quantumlib:mainfrom
jangyoujin0917:drop_diagonal_phasedxz
Open

jangyoujin0917 wants to merge 5 commits into
quantumlib:mainfrom
jangyoujin0917:drop_diagonal_phasedxz

Conversation

@jangyoujin0917

Copy link
Copy Markdown

Closes #8523

Updated _is_z_or_cz_pow_gate to recognize the PhasedXZGate when x_exponent is an even integer, making it equivalent to ZPowGate. Added tests for diagonal and non-diagonal PhasedXZGate for drop_diagonal_before_measurement pass.

@google-cla

google-cla Bot commented Nov 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the size: M 50< lines changed <250 label Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.58%. Comparing base (7769af9) to head (d7c87d4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8531      +/-   ##
==========================================
- Coverage   99.59%   99.58%   -0.01%     
==========================================
  Files        1137     1137              
  Lines      105152   105173      +21     
==========================================
+ Hits       104721   104738      +17     
- Misses        431      435       +4     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: M 50< lines changed <250

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential missed optimization: drop_diagonal_before_measurement leaves an identity PhasedXZGate that blocks further removal

1 participant