4

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?

glS
  • 27,510
  • 7
  • 37
  • 125
peachnuts
  • 1,485
  • 1
  • 10
  • 15

1 Answers1

5

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.

met927
  • 3,251
  • 1
  • 10
  • 22