Skip to content

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.67%. Comparing base (575552a) to head (c869899).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7294      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files        1109     1109              
  Lines       96826    96713     -113     
==========================================
- Hits        95543    95430     -113     
  Misses       1283     1283              

☔ 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

Copy link
Collaborator

@NoureldinYosri NoureldinYosri left a comment

Choose a reason for hiding this comment

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

thanks @babacry for doing this and for keeping our code healthy

@babacry babacry added this pull request to the merge queue May 7, 2025
@babacry babacry changed the title Starts deprecating pass_operations_over for PauliString and PauliStringPhasor Start deprecating pass_operations_over for PauliString and PauliStringPhasor May 7, 2025
Merged via the queue into quantumlib:main with commit 293f25e May 7, 2025
39 checks passed
@babacry babacry deleted the depre_pass_op branch May 7, 2025 22:39
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…ngPhasor (quantumlib#7294)

* Starts deprecating pass_operations_over

* use cirq._compat.deprecate

* Fix usages in contrib/paulistring

* fix lint

* instruct coverage to ignore the deprecated funcs
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
2 participants