0
$\begingroup$

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'
$\endgroup$
1
  • $\begingroup$ You're right luciano ! $\endgroup$ – butterfly24 Feb 6 at 8:12
1
$\begingroup$

It is qasm_simulator with an underscore.

$\endgroup$
1
  • $\begingroup$ Thanks a lot for your help! $\endgroup$ – butterfly24 Feb 5 at 13:33
1
$\begingroup$

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
$\endgroup$
1
  • $\begingroup$ Thanks this will surely help me ! $\endgroup$ – butterfly24 Feb 6 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.