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

Remove deprecated methods from QuantumCircuit #8980

Merged
merged 9 commits into from
Nov 2, 2022

Conversation

jakelishman
Copy link
Member

Summary

This removes the old c?u[1-3] methods from QuantumCircuit, along with the combine and extend methods. The numbered-argument UGate alternatives had been deprecated since Terra 0.16, and the simpler forms of compose since 0.17.

The U1Gate class, and so on, are left in so the transpiler and equivalence rules can still support legacy backends with these as basis gates, but their privileged place as direct methods on QuantumCircuit is removed.

Details and comments

I also cut out the test warning suppressions that were related to these methods.

This removes the old `c?u[1-3]` methods from `QuantumCircuit`, along
with the `combine` and `extend` methods.  The numbered-argument `UGate`
alternatives had been deprecated since Terra 0.16, and the simpler forms
of `compose` since 0.17.

The `U1Gate` class, and so on, are left in so the transpiler and
equivalence rules can still support legacy backends with these as basis
gates, but their privileged place as direct methods on `QuantumCircuit`
is removed.
@jakelishman jakelishman added the Changelog: Removal Include in the Removed section of the changelog label Oct 21, 2022
@jakelishman jakelishman added this to the 0.23.0 milestone Oct 21, 2022
@jakelishman jakelishman requested review from a team and nonhermitian as code owners October 21, 2022 11:52
@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:

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.

LGTM, always nice to clean up the code 😉 There's a lint error due to an unused import of warnings in the test_extensions_standard but otherwise this looks good!

@jakelishman
Copy link
Member Author

Updated, thanks!

@coveralls
Copy link

coveralls commented Oct 21, 2022

Pull Request Test Coverage Report for Build 3380611518

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 84.51%

Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 91.49%
Totals Coverage Status
Change from base Build 3380350279: 0.1%
Covered Lines: 62359
Relevant Lines: 73789

💛 - Coveralls

@jakelishman
Copy link
Member Author

I've removed the now-unused private circuit method _check_compatible_regs to make the coverage check happier. That function wasn't sufficient as a check anyway (not to mention hideously inefficient...), and compose does it a bit better.

@jakelishman
Copy link
Member Author

@Mergifyio requeue

@mergify
Copy link
Contributor

mergify bot commented Nov 2, 2022

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify mergify bot merged commit b0f3d5c into Qiskit:main Nov 2, 2022
@jakelishman jakelishman deleted the remove-deprecated-functionality branch November 14, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Removal Include in the Removed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants