0

I try to run a simple quantum circuit on a quantum computer ('ibmq_oslo') and I get an error at qresorc=provider.get_backend('ibmq_oslo').
I verified that ibmq_oslo is in my resources list from my IBM quantum account.

Here it is the code:

from qiskit import *  
circuit = QuantumCircuit(2, 2)
circuit.h(0)  
circuit.cx(0, 1)  
circuit.draw()  
simulator = Aer.get_backend('qasm_simulator')  
result = execute(circuit, backend=simulator).result()  

from qiskit .tools.visualization import plot_histogram  
plot_histogram(result.get_counts(circuit))  

from qiskit import IBMQ  
provider = IBMQ.get_provider('ibm-q')  
qresorc = provider.get_backend('ibmq_oslo')  
QiskitBackendNotFoundError                Traceback (most recent call last)
Input In [14], in <cell line: 1>()
----> 1 qresorc=provider.get_backend('ibmq_oslo')

File ~\anaconda3\lib\site-packages\qiskit\providers\provider.py:55, in  
ProviderV1.get_backend(self, name, **kwargs)
     53     raise QiskitBackendNotFoundError("More than one backend matches the criteria")
     54 if not backends:
---> 55     raise QiskitBackendNotFoundError("No backend matches the criteria")
     57 return backends[0]

QiskitBackendNotFoundError: 'No backend matches the criteria'
Michael M.
  • 10,486
  • 9
  • 18
  • 34
user21686
  • 1
  • 2

2 Answers2

0

The name of the backend is ibm_oslo (without the q).

jyu00
  • 181
  • 1
0

*The IBM Quantum backend ibmq_16_melbournehas been retired. In order to see the quantum backends you have access to, use the provider.backends() command. For example, for the Open provider

from qiskit import IBMQ
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q', group='open',
project='main')
provider.backends()

shows a list of available backends. For example, replacing the line in the video with

qcomp = provider.get_backend('ibmq_santiago')

will fix this issue.

Aneki
  • 1