Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deprecate
PauliList
estimator observables #11055Deprecate
PauliList
estimator observables #11055Changes from 2 commits
4a96d4c
9aca955
0307c06
fc024c4
d078174
10bd50f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
module
argument setting to limit the skip to precisely the allowed code, not allowed in general in all code.warnings
module, so it actually applies to all test cases, becauseqiskit.algorithms
tests run first alphabetically.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.
Since the algorithms will be removed, how about merging this PR after that?
#11086
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.
Point 1 is still important because Algorithms isn't disappearing completely, it's just in a separate package. We should know how much work it is that we're asking downstream packages to do to manage a deprecation, and if the only option is a warning skip (though I don't think that is the case here), that's an indication that there are use cases that the new form cannot supply. It's a good thing that this warning was triggered before Algorithms moved out and we'd have seen it too late.
The warnings and errors aren't there to be annoying, they're there to ensure that the effect of deprecations on consumers is properly accounted for, and skipping a warning that we emitted is very rarely the correct action.
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.
@chriseclectic I don't recall any algorithm/test in
qiskit.algorithms
explicitly usingPauliList
, but I guess that this warning filter was introduced after some tests raised warnings. Can you point out which tests did? This would help address Jake's first point.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 expected that used around opflow, but not explicitly by algorithms. Searching here shows PauliList in 8 test files, one in opflow, nothing explicit in algorithms. Code use in primitives, visualization and of course quantum_info modules. Searching qiskit_algorithms repo shows no occurrence of PauliList at all
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 ran the test locally and found that no algorithm tests raise the deprecation warning due to PauliList. The deprecation warning is raised by only
test.python.primitives.test_estimator.TestObservableValidation.test_validate_observables_deprecated_{1,2}
as expected. So, I don't thinkfilterwarnings
is necessary.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.
Right. I ran the test locally and all tests passed.