-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Prepare qiskit/transpiler/graysynth.py for deprecation in next release #9795
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 4722520110
💛 - Coveralls |
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.
The deprecation decorators look good to me. I didn't review the rest.
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.
These functions don't look eligible for deprecation to me in Terra 0.24, since this PR is the one that's adding their replacement. In the Qiskit deprecation policy, the rule is that the replacement needs to be in place for a full minor release cycle before a warning can be issued - the reason is so that it's always possible to have valid code for the most recent two minor releases of Terra, rather than requiring all users/downstream packages to depend on the bleeding edge if they want to avoid warnings.
For example, in all Qiskit projects we have warnings treated as errors in our test suite, and several projects test against Terra main as well. If we did deprecations at the same time as the replacement, those projects couldn't have code that supports both the current dev version and the current release version simultaneously.
@ShellyGarion has asked me to look at the code organization and the names of the functions. This looks good and consistent to what we did in the past. I have not look at the deprecation-related content. |
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 pushed up a commit that just adds a comment on the re-export to remind us why it exists and comment that it's eligible for deprecation later. Other than that, I think we're good here now. Thanks Shelly.
Qiskit#9795) * transfer cnot-phase (graysynth) synthesis code to qiskit/synthesis/cnot_phase * prepare qiskit/transpiler/graysynth.py for deprecation * update test_gray_synthesis * add cnot-phase (graysynth) code * update docstring of cnot_phase_synth * add deprecation functions * fix tests following deprecations * style fix * add release notes * remove deprecation functions from graysynth.py * update tests * update release notes as a bug fix * add back graysynth to synthesis/linear * fix link in releaese notes * Add note on re-export --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Summary
As described in #9445 we should properly deprecate
qiskit/transpiler/graysynth.py
that currently contains the two functionscnot_synth
andgray_synth
.Details and comments
cnot_synth
is refactored tosynth_cnot_count_full_pmh
in the fileqiskit/synthesis/linear/cnot_synth.py
.graysynth
is refactored tosynth_cnot_phase_aam
in the fileqiskit/synthesis/linear_phase/graysynth.py
.See also #9667