-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove validation methods from primitive base classes (backport #11052)…
… (#11532) * Remove validation methods from primitive base classes (#11052) * Remove validation methods from primitive base classes This deprecates the argument validation methods from primitive base classes and moves them to separate helper functions. These methods unnecessarily bloat the base classes, and are odd to have when the BasePrimitive doesn't even define a run method to validate. There is no reason primitive implementations need to use the same validation as these base classes either. A follow up will be to remove the validation from the base `run` methods and have subclasses implement their own validation. * Apply suggestions from code review * Update qiskit/primitives/base/base_estimator.py --------- Co-authored-by: Ikko Hamamura <[email protected]> (cherry picked from commit 05d958b) * Update qiskit/primitives/base/base_estimator.py * Add missing import --------- Co-authored-by: Christopher J. Wood <[email protected]> Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Jake Lishman <[email protected]>
- Loading branch information
1 parent
3d3edd0
commit 6177feb
Showing
6 changed files
with
273 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.