-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Deprecate Cirq-FT module in favour of Qualtran #6362
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
"""Decorator to allow using deprecated classes and functions in Tests and suppress warnings.""" | ||
|
||
@functools.wraps(func) | ||
def wrapper(*args, **kwargs): |
There was a problem hiding this comment.
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.
def wrapper(*args, **kwargs): | |
@unittest.mock.patch.dict(os.environ, ALLOW_DEPRECATION_IN_TEST="True") | |
def wrapper(*args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this 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.
@pavoljuhas That was a good catch, thanks! Deprecated all the remaining classes & methods as well. PTAL! |
Final step as part of Cirq-FT & Qualtran integration.
cc @dstrain115 @mpharrigan