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

Deprecate Cirq-FT module in favour of Qualtran #6362

Merged
merged 4 commits into from Nov 28, 2023

Conversation

tanujkhattar
Copy link
Collaborator

@tanujkhattar tanujkhattar commented Nov 28, 2023

Final step as part of Cirq-FT & Qualtran integration.

cc @dstrain115 @mpharrigan

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b5b3b74) 97.84% compared to head (7356d9c) 97.80%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6362      +/-   ##
==========================================
- Coverage   97.84%   97.80%   -0.04%     
==========================================
  Files        1110     1111       +1     
  Lines       96690    96878     +188     
==========================================
+ Hits        94606    94756     +150     
- Misses       2084     2122      +38     

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

"""Decorator to allow using deprecated classes and functions in Tests and suppress warnings."""

@functools.wraps(func)
def wrapper(*args, **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can use the patch.dict as follows and remove all the orig_exists / orig_value code below.

Suggested change
def wrapper(*args, **kwargs):
@unittest.mock.patch.dict(os.environ, ALLOW_DEPRECATION_IN_TEST="True")
def wrapper(*args, **kwargs):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done!

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

cirq_ft.__init__ seems to have a few objects that are not yet deprecated -

  • AdditionGate
  • AddMod
  • ContiguousRegisterGate
  • LessThanEqualGate
  • LessThanGate
  • unary_iteration

Otherwise LGTM.

@tanujkhattar
Copy link
Collaborator Author

@pavoljuhas That was a good catch, thanks! Deprecated all the remaining classes & methods as well. PTAL!

@tanujkhattar tanujkhattar merged commit 3c6a305 into quantumlib:master Nov 28, 2023
35 checks passed
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.

None yet

4 participants