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

Removed code deprecated in 0.20 #10767

Merged
merged 9 commits into from
Sep 12, 2023
Merged

Removed code deprecated in 0.20 #10767

merged 9 commits into from
Sep 12, 2023

Conversation

Raghav-Bell
Copy link
Contributor

@Raghav-Bell Raghav-Bell commented Sep 4, 2023

It fixes #10747

Summary

Details and comments

Please add Changelog: Removal tag.

@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Sep 4, 2023
@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:

@Raghav-Bell
Copy link
Contributor Author

In qiskit/visualization/circuit/latex.py:52 (__init__) there is no argument gregs, i think it should be qregs i,e removed qregs.

@Raghav-Bell
Copy link
Contributor Author

tox -epy310 -- -n test\python\visualization\test_circuit_latex.py it doesn't run due to absent of pylatexenc even though it is installed in the env.

@1ucian0 1ucian0 added the Changelog: Removal Include in the Removed section of the changelog label Sep 4, 2023
1ucian0
1ucian0 previously requested changes Sep 4, 2023
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

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

Thanks! While I check for the rest of the code, do not forget to add the release note:

create a release note in the category upgrade:. If you can include an example with an alternative for user to migrate to the new code, as this change might break users code.

@1ucian0 1ucian0 added this to the 0.45.0 milestone Sep 4, 2023
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

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

Here some suggestions on how to reformulate the release notes. Let me know what you think.

Comment on lines 4 to 7
Code and tests deprecated in 0.20 are removed.
:class:`.visualization.QCircuitImage` objects no longer supports
`qregs`, `cregs`, `layout`and `global_phase` arguments.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Code and tests deprecated in 0.20 are removed.
:class:`.visualization.QCircuitImage` objects no longer supports
`qregs`, `cregs`, `layout`and `global_phase` arguments.
The class constructor arguments `qregs`, `cregs`, `layout`and `global_phase` for :class:`.visualization.QCircuitImage` are removed, as they were deprecated in 0.20.

Comment on lines 9 to 12
Code and tests deprecated in 0.20 are removed. In
:class:`.transpiler.CouplingMap` :meth:`~subgraph` is removed.
:meth:`~reduce` can be used in place of
:meth:`~subgraph`.
Copy link
Member

Choose a reason for hiding this comment

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

:meth:`~subgraph`

wont resolve, as it is being removed. By this PR :)

Suggested change
Code and tests deprecated in 0.20 are removed. In
:class:`.transpiler.CouplingMap` :meth:`~subgraph` is removed.
:meth:`~reduce` can be used in place of
:meth:`~subgraph`.
The method `subgraph` in :class:`.transpiler.CouplingMap`
is being removed as it was deprecated in 0.20. The method
:meth:`~reduce` can be used in its place. It does the same thing, but preserves nodelist order.

Comment on lines 14 to 17
- |
Code and tests deprecated in 0.20 are removed. In
:class:`.dagcircuit.DAGCircuit` private :meth:`~_copy_circuit_metadata` is removed.
Instead use public :meth:`~copy_empty_like` with same functionality.
Copy link
Member

Choose a reason for hiding this comment

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

No need for this one, since it is a private method.

Suggested change
- |
Code and tests deprecated in 0.20 are removed. In
:class:`.dagcircuit.DAGCircuit` private :meth:`~_copy_circuit_metadata` is removed.
Instead use public :meth:`~copy_empty_like` with same functionality.

Comment on lines 20 to 23
Code and tests deprecated in 0.20 are removed. In
:class:`.synthesis.SuzukiTrotter` deprecation warning for
odd `order` is replaced with `ValueError`.
Refer to `#10747 <https://github.com/Qiskit/qiskit/issues/10747>`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Code and tests deprecated in 0.20 are removed. In
:class:`.synthesis.SuzukiTrotter` deprecation warning for
odd `order` is replaced with `ValueError`.
Refer to `#10747 <https://github.com/Qiskit/qiskit/issues/10747>`
The parameter `order` in :class:`.synthesis.SuzukiTrotter` raises an exception instead of deprecation warning when set in an odd number. Suzuki product formulae are symmetric and therefore only defined for even orders.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, your suggestions are quite good, i have tried to accommodate them in the commit. Thanks

@1ucian0 1ucian0 self-assigned this Sep 11, 2023
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

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

Great work! Let's get it merged once you solve the conflicts in qiskit/dagcircuit/dagcircuit.py

@1ucian0 1ucian0 self-requested a review September 11, 2023 14:26
@1ucian0 1ucian0 dismissed their stale review September 11, 2023 14:27

release note comments addressed

1ucian0
1ucian0 previously approved these changes Sep 11, 2023
@coveralls
Copy link

coveralls commented Sep 11, 2023

Pull Request Test Coverage Report for Build 6149701107

  • 3 of 4 (75.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 87.311%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/synthesis/evolution/suzuki_trotter.py 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 3 91.67%
Totals Coverage Status
Change from base Build 6124202354: 0.02%
Covered Lines: 74469
Relevant Lines: 85292

💛 - Coveralls

Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

@1ucian0 1ucian0 added this pull request to the merge queue Sep 12, 2023
Merged via the queue into Qiskit:main with commit 29dddab Sep 12, 2023
14 checks passed
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 Community PR PRs from contributors that are not 'members' of the Qiskit repo
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove code deprecated in 0.20 (released on March 31, 2022)
4 participants