Qiskit / qiskit-aer

Aer is a high performance simulator for quantum circuits that includes noise models

Home Page:https://qiskit.github.io/qiskit-aer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QiskitBackendNotFoundError - Unable to run the backend using BackendEstimator primitive

pamulism opened this issue · comments

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?