-
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.
Fix Backend primitive classes for BackendV1 with no max_experiments (#…
…9069) (#9072) * Fix Backend primitive classes for BackendV1 with no max_experiments The ``max_experiments`` field in the BackendConfiguration for a BackendV1 backend is not a required field. While in practice most real backends set it, some simulators (including aer) do not. This causes a failure when using the Backend primitive classes with these backends as we were previously assuming the ``max_experiments`` attribute was always present. * Update test/python/primitives/test_backend_estimator.py Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit b2d3dcf) Co-authored-by: Matthew Treinish <[email protected]>
- Loading branch information
1 parent
cc8aadf
commit bece288
Showing
3 changed files
with
33 additions
and
1 deletion.
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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/fix-backend-primitive-no-max-experiments-e2ca41ec61de353e.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with the backend primitive classes :class:`~.BackendSampler` | ||
and :class:`~.BackendEstimator` which prevented running with a | ||
:class:`~.BackendV1` instance that does not have a ``max_experiments`` | ||
field set in its :class:`~.BackendConfiguration`. |
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