Skip to content

Commit

Permalink
Remove FakeBackendV2 import deprecated in Qiskit 0.46 (backport #1420) (
Browse files Browse the repository at this point in the history
#1422)

This is an automatic backport of pull request #1420 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Elena Peña Tapia <[email protected]>
  • Loading branch information
mergify[bot] and ElePT authored Mar 12, 2024
1 parent fbcedcc commit 0f15f0b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion qiskit_experiments/framework/backend_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,24 @@ class unifies data access for various data fields.
from qiskit.providers.models import PulseBackendConfiguration
from qiskit.providers import BackendV1, BackendV2
from qiskit.providers.fake_provider import FakeBackend
from qiskit.providers.fake_provider.fake_backend import FakeBackendV2
from qiskit.utils.deprecation import deprecate_func

try:
# Removed in Qiskit 1.0.
from qiskit.providers.fake_provider.fake_backend import FakeBackendV2
except ImportError:

class FakeBackendV2:
"""Dummy class for when FakeBackendV2 import fails
This class is only used in isinstance checks. If the import fails, then
there won't be an instance of the class either so any dummy class is
fine.
"""

pass


try:
# Removed in Qiskit 1.0. Different from the other FakeBackendV2's
from qiskit.providers.fake_provider import QiskitFakeBackendV2
Expand Down

0 comments on commit 0f15f0b

Please sign in to comment.