You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is an error occurring when trying to retrieve a FakeBackendV2 from the FakeProviderForBackendV2object through FakeProviderForBackendV2.backend(backend_name) method.
The error raised is:
filtered_backends = [backend for backend in self._backends if backend.name() == name]
TypeError: 'str' object is not callable
Steps to reproduce
declare a FakeProviderForBackendV2 instance and a valid backend name, e.g. 'fake_jakarta'
Call method backend()
Expected behavior
Should return a FakeBackend object
Suggested solutions
Adapt the code to the BackendV2 interface, where the name of the FakeBackend is an attribute and no longer a method (name instead of name())
Additional Information
It would be good to also adapt the backends attribute to fit the retrieval of backend through FakeProvider.get_backend() method as well.
qiskit-ibm-runtime version: 0.19.2
Python version: 3.11
Operating system: Mac OS Sonoma 14.3
The text was updated successfully, but these errors were encountered:
Describe the bug
There is an error occurring when trying to retrieve a
FakeBackendV2
from theFakeProviderForBackendV2
object throughFakeProviderForBackendV2.backend(backend_name)
method.The error raised is:
filtered_backends = [backend for backend in self._backends if backend.name() == name]
TypeError: 'str' object is not callable
Steps to reproduce
FakeProviderForBackendV2
instance and a valid backend name, e.g. 'fake_jakarta'Expected behavior
Should return a FakeBackend object
Suggested solutions
Adapt the code to the BackendV2 interface, where the name of the FakeBackend is an attribute and no longer a method (name instead of name())
Additional Information
It would be good to also adapt the backends attribute to fit the retrieval of backend through FakeProvider.get_backend() method as well.
The text was updated successfully, but these errors were encountered: