Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Properly deprecate quadratic program ising converter classes #1178

Merged
merged 10 commits into from
Aug 7, 2020

Conversation

mtreinish
Copy link
Contributor

Summary

In #1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

Details and comments

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

In qiskit-community#1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

[1] https://qiskit.org/documentation/contributing_to_qiskit.html#deprecation-policy
[2] https://qiskit.org/documentation/contributing_to_qiskit.html#stable-branch-policy
@mtreinish mtreinish added priority: high Changelog: Deprecation Include in Deprecated section of changelog stable backport potential The bug might be minimal and/or import enough to be port to stable labels Aug 7, 2020
mtreinish and others added 7 commits August 7, 2020 13:09
Running through the tutorials there are more methods that have been
removed that needed to go through a proper deprecation, this commit
starts adding them back. There is still print_details() that needs to be
added back.
This is needed for backwards compat with the optimziation code which
used to return a legacy WeightedPauliOp object. 'print_details()' is
used in the tutorials on the output from conversion so a deprecated
method is added to add this funcionality to gracefully move users over
to the new workflow.
@mtreinish
Copy link
Contributor Author

I've tested this with all the optimization tutorials locally and it works for me (given the critical nature of this it's probably good for someone else to double check too)

@manoelmarques manoelmarques merged commit 26d1176 into qiskit-community:master Aug 7, 2020
@mtreinish mtreinish deleted the fix-breaking-change branch August 7, 2020 20:12
manoelmarques added a commit to manoelmarques/qiskit-aqua that referenced this pull request Aug 7, 2020
…community#1178)

* Properly deprecate quadratic program ising converters

In qiskit-community#1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

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

* Fix typo

* Remove broken loop

* Add missing print methods

Running through the tutorials there are more methods that have been
removed that needed to go through a proper deprecation, this commit
starts adding them back. There is still print_details() that needs to be
added back.

* add unit test

* Add print_details to SummedOp

This is needed for backwards compat with the optimziation code which
used to return a legacy WeightedPauliOp object. 'print_details()' is
used in the tutorials on the output from conversion so a deprecated
method is added to add this funcionality to gracefully move users over
to the new workflow.

* fix lint

* fix docstring

Co-authored-by: Manoel Marques <manoel.marques@ibm.com>
pbark pushed a commit to pbark/qiskit-aqua that referenced this pull request Sep 16, 2020
…community#1178)

* Properly deprecate quadratic program ising converters

In qiskit-community#1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

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

* Fix typo

* Remove broken loop

* Add missing print methods

Running through the tutorials there are more methods that have been
removed that needed to go through a proper deprecation, this commit
starts adding them back. There is still print_details() that needs to be
added back.

* add unit test

* Add print_details to SummedOp

This is needed for backwards compat with the optimziation code which
used to return a legacy WeightedPauliOp object. 'print_details()' is
used in the tutorials on the output from conversion so a deprecated
method is added to add this funcionality to gracefully move users over
to the new workflow.

* fix lint

* fix docstring

Co-authored-by: Manoel Marques <manoel.marques@ibm.com>
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Nov 20, 2020
…community/qiskit-aqua#1178)

* Properly deprecate quadratic program ising converters

In qiskit-community/qiskit-aqua#1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

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

* Fix typo

* Remove broken loop

* Add missing print methods

Running through the tutorials there are more methods that have been
removed that needed to go through a proper deprecation, this commit
starts adding them back. There is still print_details() that needs to be
added back.

* add unit test

* Add print_details to SummedOp

This is needed for backwards compat with the optimziation code which
used to return a legacy WeightedPauliOp object. 'print_details()' is
used in the tutorials on the output from conversion so a deprecated
method is added to add this funcionality to gracefully move users over
to the new workflow.

* fix lint

* fix docstring

Co-authored-by: Manoel Marques <manoel.marques@ibm.com>
manoelmarques added a commit to manoelmarques/qiskit-terra that referenced this pull request Dec 2, 2020
…community/qiskit-aqua#1178)

* Properly deprecate quadratic program ising converters

In qiskit-community/qiskit-aqua#1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

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

* Fix typo

* Remove broken loop

* Add missing print methods

Running through the tutorials there are more methods that have been
removed that needed to go through a proper deprecation, this commit
starts adding them back. There is still print_details() that needs to be
added back.

* add unit test

* Add print_details to SummedOp

This is needed for backwards compat with the optimziation code which
used to return a legacy WeightedPauliOp object. 'print_details()' is
used in the tutorials on the output from conversion so a deprecated
method is added to add this funcionality to gracefully move users over
to the new workflow.

* fix lint

* fix docstring

Co-authored-by: Manoel Marques <manoel.marques@ibm.com>
manoelmarques added a commit to qiskit-community/qiskit-optimization that referenced this pull request Jan 14, 2021
…community/qiskit-aqua#1178)

* Properly deprecate quadratic program ising converters

In qiskit-community/qiskit-aqua#1061 the ising converter classes were removed without a deprecation
period and then backported to the stable branch. This is a violation of
both the Qiskit deprecation policy [1] and the Qiskit stable branch
policy [2] and should not have been merged like that. This is preventing
the Qiskit metapackage 0.20.0 from being released because the tutorials
as written today do not work with aqua 0.7.4 because of this breaking
change. It should have been deprecated first for an appropriate period
to give users a chance to adjust their code and then removed. During
this period the tutorial could also be updated. This also should never
have been backported to stable since users expect a stable point release
to just contain bugfixes removals and deprecations should not be part of
stable releases. This commit adds back the removed classes and deprecates
them, this will need to be backported and released as 0.7.5. While
normally this deprecation would not be allowed under the backport policy
it is necessary here because we already released a breaking change.

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

* Fix typo

* Remove broken loop

* Add missing print methods

Running through the tutorials there are more methods that have been
removed that needed to go through a proper deprecation, this commit
starts adding them back. There is still print_details() that needs to be
added back.

* add unit test

* Add print_details to SummedOp

This is needed for backwards compat with the optimziation code which
used to return a legacy WeightedPauliOp object. 'print_details()' is
used in the tutorials on the output from conversion so a deprecated
method is added to add this funcionality to gracefully move users over
to the new workflow.

* fix lint

* fix docstring

Co-authored-by: Manoel Marques <manoel.marques@ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog: Deprecation Include in Deprecated section of changelog priority: high stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants