Skip to content

Starts deprecating pass_operations_over for PauliString and PauliStringPhasor #7294

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

babacry
Copy link
Collaborator

@babacry babacry commented Apr 23, 2025

Starts deprecating all pass_operations_over().

pass_operations_over class function for PauliString* Classes is supposed to be replaced by conjuaged_by(), after(), before(). And the function itself is confusing and misleading in terms of the input order (see #2351).

Context: #7123 and #2351.

@babacry babacry requested review from vtomole and a team as code owners April 23, 2025 20:40
@babacry babacry force-pushed the depre_pass_op branch 2 times, most recently from ffe2b94 to 1d14cbe Compare April 23, 2025 22:56
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.66%. Comparing base (de37106) to head (1df3390).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7294      +/-   ##
==========================================
- Coverage   98.67%   98.66%   -0.01%     
==========================================
  Files        1108     1108              
  Lines       96220    96107     -113     
==========================================
- Hits        94942    94827     -115     
- Misses       1278     1280       +2     

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

@babacry
Copy link
Collaborator Author

babacry commented Apr 29, 2025

Hi reviewers, I intended to deprecate the class function in the PR as

  1. the class function itself has a duplication in the class (PauliString.after() and PauliString.before())
  2. the class function itself is very confusing for users (see Fix PauliString.pass_operations_over not supporting common gates #2351.).

The deprecating timeline is from v1.5 (starts warning) -> v2.0 (fully remove). Wonder if this matches the general deprecating process of Cirq.

@github-actions github-actions bot added the size: M 50< lines changed <250 label Apr 30, 2025
@babacry babacry requested a review from Strilanc May 1, 2025 21:09
@babacry
Copy link
Collaborator Author

babacry commented May 1, 2025

@Strilanc @NoureldinYosri @pavoljuhas

wonder if you could help review this pr? this is part of #6946

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.

PauliString.after() crashes for Clifford gate PhXZ(a=0.25,x=-1,z=0) in _decompose_into_cliffords
1 participant