-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Change algorithms from pending deprecation to deprecated #9883
Change algorithms from pending deprecation to deprecated #9883
Conversation
Co-authored-by: Manoel Marques <manoelmrqs@gmail.com>
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:
|
WIP because I want to see what test changes from #9532 are necessary. Feel free to start reviewing the prod changes though! |
@@ -181,7 +183,7 @@ def __init__( | |||
self._quantum_instance = None | |||
if quantum_instance is not None: | |||
with warnings.catch_warnings(): | |||
warnings.simplefilter("ignore", category=PendingDeprecationWarning) | |||
warnings.simplefilter("ignore") |
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 see this was there before but I don't think we should do this. I do not believe the error message from the setter will be seen under normal usage, only something that is directly called like when calling the init here.
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 think it will be rendered because we indeed are calling the setter. I don't see much downside to these 2 lines, but there's a big upside in being confident they won't see a "double warning". The @deprecate_arg
here is all we want them to see.
But I'll add back the category
argument.
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 am pretty sure that nowadays they will not - it used to be Terra has some config set that all deprecations were shown. And if you configure things to see deprecations elsewhere we will have swallowed this. With the amount deprecation around opflow I cannot believe this is the only time internally we are calling/using deprecated code. It should be easy enough to check whether you see this or not. Create a Grover with a plain Backend.
…precations-algorithms-pending
…precations-algorithms-pending
Pull Request Test Coverage Report for Build 4699944194
💛 - 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.
@Eric-Arellano Now that the algorithm migration guide is done I think we should be able to finalize/merge this. It needs a conflict sorting and I left a couple of comments as well. Otherwise it all seems good to go right? Thanks again for doing this for us!
…precations-algorithms-pending
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.
LGTM thx again!
I will make a minor comment about the text though. Here is what comes out in the VQE class when you look at its docs. We talked about having refs in here instead so its not that. But when I read the first part |
I think I like FYI, if I recall correctly, I switched to the full module name because I encountered some deprecated function names that were the same function name but in different modules. I wanted to remove all ambiguity. |
Yes, that's kinda why I said work out better for the docs. Its a tradeoff given the duality of usage. Since the runtime message is coming from the class itself I though it would be kinda ok that it has this class - it does name itself too. It just seemed weirder in the docs to me where you kinda have to realize that "The class..." is what you are reading and not some other its referring to. The long ref in there at present did not help in that regard for me. Anyway its pretty minor. Its nice to have the notice coming out in the docs and something that is easily tweaked in the decorator right. Maybe its just me - can see what others think going forwards too. |
Yes, very easy to change at any time. |
* Change algorithms from pending deprecation to deprecated Co-authored-by: Manoel Marques <manoelmrqs@gmail.com> * Review feedback & fix fmt * Try to fix the tests * Another round of test fixes * Last round of test fixes? * Actual last test fix! * Use HTTPS * Refer to migration guide in deprecation changelog --------- Co-authored-by: Manoel Marques <manoelmrqs@gmail.com>
* Change algorithms from pending deprecation to deprecated Co-authored-by: Manoel Marques <manoelmrqs@gmail.com> * Review feedback & fix fmt * Try to fix the tests * Another round of test fixes * Last round of test fixes? * Actual last test fix! * Use HTTPS * Refer to migration guide in deprecation changelog --------- Co-authored-by: Manoel Marques <manoelmrqs@gmail.com>
* Change algorithms from pending deprecation to deprecated Co-authored-by: Manoel Marques <manoelmrqs@gmail.com> * Review feedback & fix fmt * Try to fix the tests * Another round of test fixes * Last round of test fixes? * Actual last test fix! * Use HTTPS * Refer to migration guide in deprecation changelog --------- Co-authored-by: Manoel Marques <manoelmrqs@gmail.com>
…it#9883) * Change algorithms from pending deprecation to deprecated Co-authored-by: Manoel Marques <manoelmrqs@gmail.com> * Review feedback & fix fmt * Try to fix the tests * Another round of test fixes * Last round of test fixes? * Actual last test fix! * Use HTTPS * Refer to migration guide in deprecation changelog --------- Co-authored-by: Manoel Marques <manoelmrqs@gmail.com>
Summary
Supersedes #9532.
Details and comments