enter image description here

I want to run this qasm file using IBM device. However, there's always an error:

qiskit.transpiler.exceptions.TranspilerError: 'Number of qubits (16) in circuit0 is greater than maximum (5) in the coupling_map'

How does this error come?

How can I set up the initial mapping when running this qasm file? How to run the qasm file in Jupyter notebook?


1 Answer 1


The issue is that you are transpiling for a backend with 5 qubits, but this circuit is defined over a 16 qubit register (line 3 qreg q[16];).

To avoid this error you can either update your qasm to work over a register of 5 qubits, or transpile for a different backend. I think that the simulator is the only available device that will run up to 16 qubits.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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