TransWikia.com

How to fix an error : " QiskitBackendNotFoundError: 'No backend matches the criteria' "

Quantum Computing Asked by Soham Bopardikar on March 9, 2021

I am trying to run the Quantum Teleportation Algorithm using Qiskit on Jupyter Notebook.
Here is my code below where I am finding an error –

circuit.measure(2,2)
simulator = Aer.get_backend('qasm-simulator')
result = execute(circuit, backend = simulator, shots = 1024).result()
counts = result.get_counts()
from qiskit.tools.visualization import plot_histogram
plot_histogram(counts)

Error: QiskitBackendNotFoundError: 'No backend matches the criteria'

2 Answers

It is qasm_simulator with an underscore.

Correct answer by Paul Nation on March 9, 2021

This maybe useful for you as it will list out all the devices that are available to you and theirs name. This way you can call them through the correct name and not running into the same error in the future.

from qiskit import IBMQ, Aer
provider = IBMQ.load_account()
available_cloud_backends = provider.backends() 
print('nHere is the list of cloud backends that are available to you:')
for i in available_cloud_backends: print(i)

available_local_backends = Aer.backends() 
print('nHere is the list of local backends that are available to you: ')
for i in available_local_backends: print(i)

This will output something like the following:

Here is the list of cloud backends that are available to you:
ibmq_qasm_simulator
ibmqx2
ibmq_16_melbourne
ibmq_vigo
ibmq_ourense
ibmq_valencia
ibmq_armonk
ibmq_athens
ibmq_santiago

Here is the list of local backends that are available to you: 
qasm_simulator
statevector_simulator
unitary_simulator
pulse_simulator

Answered by KAJ226 on March 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP