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

Follow through with PendingDeprecationWarnings #8023

Closed

Conversation

mtreinish
Copy link
Member

Summary

This commit promotes several pending deprecation warnings from earlier
releases to full deprecation warnings making them user facing.
Specifically, the qiskit.circuits.qpy_serialization module, the legacy
scheduling paths, and the qobj support in basic aer are now deprecated
as they have been pending deprecation for at least 1 release. This
starts the timer on pending removal per the qiskit deprecation
policy [1] so we can remove this functionality in >= 3 months and > 1
release. Meaning all of these are eligble for removal in qiskit-terra
0.23.0 (assuming that is at least 3 months after 0.21.0).

Details and comments

[1] https://qiskit.org/documentation/contributing_to_qiskit.html#deprecation-policy

This commit promotes several pending deprecation warnings from earlier
releases to full deprecation warnings making them user facing.
Specifically, the qiskit.circuits.qpy_serialization module, the legacy
scheduling paths, and the qobj support in basic aer are now deprecated
as they have been pending deprecation for at least 1 release. This
starts the timer on pending removal per the qiskit deprecation
policy [1] so we can remove this functionality in >= 3 months and > 1
release. Meaning all of these are eligble for removal in qiskit-terra
0.23.0 (assuming that is at least 3 months after 0.21.0).

[1] https://qiskit.org/documentation/contributing_to_qiskit.html#deprecation-policy
@mtreinish mtreinish requested review from a team and jyu00 as code owners May 4, 2022 21:41
@qiskit-bot
Copy link
Collaborator

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:

@mtreinish mtreinish requested a review from nkanazawa1989 May 4, 2022 21:41
@coveralls
Copy link

coveralls commented May 4, 2022

Pull Request Test Coverage Report for Build 2457070427

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 84.417%

Totals Coverage Status
Change from base Build 2454743017: 0.002%
Covered Lines: 54676
Relevant Lines: 64769

💛 - Coveralls

Copy link
Contributor

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a small nitpicks.

qiskit/circuit/qpy_serialization.py Show resolved Hide resolved
qiskit/circuit/qpy_serialization.py Outdated Show resolved Hide resolved
qiskit/transpiler/passes/scheduling/alap.py Outdated Show resolved Hide resolved
@kevinsung
Copy link
Contributor

@mtreinish The docstring of DynamicalDecoupling should indicate that it will be deprecated.

"This class will be deprecated in a future release and subsequently "
"removed after that.",
PendingDeprecationWarning,
"This class is deprecated and will be removed in a future release",
Copy link
Member

Choose a reason for hiding this comment

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

Can i request that we postpone this deprecation until a future release while we build more confidence that the PadDynamicalDecoupling is the way to go (for other kinds of DD)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I'll remove the deprecation of this and the matching scheduling passes and we can revisit for 0.22

Copy link
Contributor

Choose a reason for hiding this comment

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

@ajavadia is this ready to be deprecated or do we want to keep it still? 🙂

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

Are there some additional pending deprecations we can follow through with? E.g. in qiskit.pulse there seem to be some that are from 0.21 and one in AlignMeasures.__init__ 🙂

def __getattr__(name):
if name in deprecated_names:
warnings.warn(
"The qiskit.circuit.qpy_serialization module is deprecated and has been supersceded "
Copy link
Contributor

Choose a reason for hiding this comment

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

😉

Suggested change
"The qiskit.circuit.qpy_serialization module is deprecated and has been supersceded "
"The qiskit.circuit.qpy_serialization module is deprecated and has been superseded "

"This class will be deprecated in a future release and subsequently "
"removed after that.",
PendingDeprecationWarning,
"This class is deprecated and will be removed in a future release",
Copy link
Contributor

Choose a reason for hiding this comment

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

@ajavadia is this ready to be deprecated or do we want to keep it still? 🙂

- |
The :class:`~.ALAPSchedule` pass has been deprecated and will be removed
in a future release. Instead the :class:`~.ALAPScheduleAnalysis` pass should
be used in conjunction with a padding pass such as :class:`~PadDelay` or
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
be used in conjunction with a padding pass such as :class:`~PadDelay` or
be used in conjunction with a padding pass such as :class:`~.PadDelay` or

@mtreinish
Copy link
Member Author

This is super stale at this point so I'm going to close this, we can revisit this in a new PR.

@mtreinish mtreinish closed this Nov 2, 2023
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Nov 2, 2023
In Qiskit#10754 3 legacy scheduling passes were accidently deleted. These
passes were incorrectly identified as deprecated, however they were
never marked as deprecating just pending future deprecation. They were
intended to be be promoted from a pending deprecation to a full
deprecation in Qiskit#8023 but we never took that step because there were
objections at the time as they still served a purpose. Qiskit#10754 likely
missed this as the only indication in the deprecation decorator was a
kwarg that said `pending=True`, and this was the only indication that
these passes weren't actually deprecated yet. This commit restores these
passes on the 0.45.0 branch in the interest of unblocking the 0.45.0
release ASAP. We can handle forward porting this PR to main as needed
after the 0.45.0 release is tagged.
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Nov 2, 2023
In Qiskit#10754 3 legacy scheduling passes were accidently deleted. These
passes were incorrectly identified as deprecated, however they were
never marked as deprecating just pending future deprecation. They were
intended to be be promoted from a pending deprecation to a full
deprecation in Qiskit#8023 but we never took that step because there were
objections at the time as they still served a purpose. Qiskit#10754 likely
missed this as the only indication in the deprecation decorator was a
kwarg that said `pending=True`, and this was the only indication that
these passes weren't actually deprecated yet. This commit restores these
passes on the 0.45.0 branch in the interest of unblocking the 0.45.0
release ASAP. We can handle forward porting this PR to main as needed
after the 0.45.0 release is tagged.
github-merge-queue bot pushed a commit that referenced this pull request Nov 3, 2023
In #10754 3 legacy scheduling passes were accidently deleted. These
passes were incorrectly identified as deprecated, however they were
never marked as deprecating just pending future deprecation. They were
intended to be be promoted from a pending deprecation to a full
deprecation in #8023 but we never took that step because there were
objections at the time as they still served a purpose. #10754 likely
missed this as the only indication in the deprecation decorator was a
kwarg that said `pending=True`, and this was the only indication that
these passes weren't actually deprecated yet. This commit restores these
passes on the 0.45.0 branch in the interest of unblocking the 0.45.0
release ASAP. We can handle forward porting this PR to main as needed
after the 0.45.0 release is tagged.
mergify bot pushed a commit that referenced this pull request Nov 3, 2023
In #10754 3 legacy scheduling passes were accidently deleted. These
passes were incorrectly identified as deprecated, however they were
never marked as deprecating just pending future deprecation. They were
intended to be be promoted from a pending deprecation to a full
deprecation in #8023 but we never took that step because there were
objections at the time as they still served a purpose. #10754 likely
missed this as the only indication in the deprecation decorator was a
kwarg that said `pending=True`, and this was the only indication that
these passes weren't actually deprecated yet. This commit restores these
passes on the 0.45.0 branch in the interest of unblocking the 0.45.0
release ASAP. We can handle forward porting this PR to main as needed
after the 0.45.0 release is tagged.

(cherry picked from commit aa272e9)
github-merge-queue bot pushed a commit that referenced this pull request Nov 3, 2023
In #10754 3 legacy scheduling passes were accidently deleted. These
passes were incorrectly identified as deprecated, however they were
never marked as deprecating just pending future deprecation. They were
intended to be be promoted from a pending deprecation to a full
deprecation in #8023 but we never took that step because there were
objections at the time as they still served a purpose. #10754 likely
missed this as the only indication in the deprecation decorator was a
kwarg that said `pending=True`, and this was the only indication that
these passes weren't actually deprecated yet. This commit restores these
passes on the 0.45.0 branch in the interest of unblocking the 0.45.0
release ASAP. We can handle forward porting this PR to main as needed
after the 0.45.0 release is tagged.

(cherry picked from commit aa272e9)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
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.

8 participants