-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Warn on use of property_set
kwarg to BasePassManger.run
#13821
Warn on use of property_set
kwarg to BasePassManger.run
#13821
Conversation
The transpiler's `BasePass.__call__` implementation accepts a `property_set` kwarg that can be used to seed the property set for the run of that pass. Starting in Qiskit 2.0, `PassManager.run` will also have that behaviour, so this commit begins emitting a warning on the potential change. The impact of this is expected to be minimal, as we are not aware of much use of the subclassing of the generic `BasePassManager`, and even less of passing arbitrary keyword arguments to the conversion functions.
One or more of the following people are relevant to this code:
|
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, I just had a small comment to make sure I am understanding the changes.
releasenotes/notes/passmanager-run-property_set-cb19ce448ab1e93a.yaml
Outdated
Show resolved
Hide resolved
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.
Alright, I think that the PR looks good.
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.
That is a good idea, I prefer "_MISSING" to "_NOT_PRESENT". I wouldn't say that the issue is the double negation as much as having two "nots" one directly after the other and accidentally skipping one.
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
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.
Nice!
The transpiler's
BasePass.__call__
implementation accepts aproperty_set
kwarg that can be used to seed the property set for the run of that pass. Starting in Qiskit 2.0,PassManager.run
will also have that behaviour, so this commit begins emitting a warning on the potential change.The impact of this is expected to be minimal, as we are not aware of much use of the subclassing of the generic
BasePassManager
, and even less of passing arbitrary keyword arguments to the conversion functions.Summary
Details and comments
This is the warning to enable to API change of #13820.