Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate BackendData.is_simulator #1390

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions qiskit_experiments/framework/backend_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class unifies data access for various data fields.
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. Different from the other FakeBackendV2's
Expand Down Expand Up @@ -274,6 +275,16 @@ def num_qubits(self):
return None

@property
@deprecate_func(
is_property=True,
since="0.6",
additional_msg=(
"is_simulator is deprecated because BackendV2 does not provide a "
"standard way for checking this property. Calling code must "
"determine if a backend uses a simulator from context."
),
package_name="qiskit-experiments",
) # Note: remove all FakeBackend imports when removing this code
def is_simulator(self):
"""Returns True given an indication the backend is a simulator

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
deprecations:
- |
:attr:`.BackendData.is_simulator` has been deprecated.
:class:`~qiskit.providers.BackendV2` does not provide a standard interface
for determining if a backend uses a simulator. Calling code must determine
if a backend uses a simulator through some other means. Qiskit Experiments
does not treat simulator-backed backends differently from hardware backed
ones.
Loading