Update FakeBackend to use BackendV2 #1102
Merged
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.
Summary
This change set updates the
FakeBackend
used by some tests to derive fromBackendV2
rather thanBackendV1
Details and comments
When combined with #900 which updates some calibration tests and #1040 which updates
T2HahnBackend
, this change results in almost all the tests in the test suite usingBackendV2
. The remaining tests using aBackend
that is notBackendV2
use theAerSimulator
which will be updated toBackendV2
in the future (tracked in Qiskit/qiskit-aer#1681). The check for backend type was performed by merging the calibration andT2HahnBackend
branches into this branch and running the tests withBaseExperiment.run()
,BaseExperiment._set_backend()
, andCalibrations.from_backend()
updated to error if thebackend
argument was notBackendV2
orAerSimulator
and confirming that all the tests passed.