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

QiskitBackendNotFoundError - Unable to run the backend using BackendEstimator primitive #2085

Open
pamulism opened this issue Mar 21, 2024 · 0 comments

Comments

@pamulism
Copy link

pamulism commented Mar 21, 2024

Informations

  • Qiskit AER version: Qiskit Aer 0.13.3
  • Operating system: Ubuntu

What is the current behavior?

I am trying to run a small quantum circuit and generate the expectation value of an observable using the BackendEstimator primitive by incorporating the noise model from Fake20QV1 backend. Below is a snippet of the ending parts of the code.

....
my_service = QiskitRuntimeService()

backend_fake = Fake20QV1()
noise_model = noise.NoiseModel.from_backend(backend_fake)

coupling_map = backend_fake.configuration().coupling_map

basis_gates = noise_model.basis_gates

backend = AerSimulator(noise_model=noise_model,
coupling_map=coupling_map,
basis_gates=basis_gates)

with Session(backend=backend):
sampler = BackendSampler()
estimator = BackendEstimator()
result1 = sampler.run(qc).result()
print(f"Quasi-probability distribution: {result1.quasi_dists[0]}")
result2 = estimator.run(qc, observable).result()
print(f"Expectation Value : {result2.values[0]}")

Generates an error as shown below:
....
541 self._set_backend_config(name)

QiskitBackendNotFoundError: 'No backend matches the criteria.'

Steps to reproduce the problem

What is the expected behavior?

Suggested solutions


What is the expected behavior?


What is the expected enhancement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant