# Why I am getting transpilation error while executing the following IBM Quantum Experience code?

While executing the following circuit (consisting 16 qubit and 4 classical bits) I am getting "Error in transpilation process. [1003]" error. I have a group of 2 operations (you can observe circuit duplication in the figure). Is it a valid circuit? If not why it is not?. Why am I getting error? (My target backend is ibmq_16_melbourne).

OPENQASM 2.0;
include "qelib1.inc";

qreg q[8];
qreg qGrp1[8];
creg c[2];
creg cGrp1[2];

h q[2];
h q[4];
h q[6];
x q[7];
x qGrp1[1];
h qGrp1[2];
h qGrp1[4];
h qGrp1[6];
x qGrp1[7];
cx q[2],q[3];
cx q[4],q[5];
cx q[6],q[7];
cx qGrp1[2],qGrp1[3];
cx qGrp1[4],qGrp1[5];
cx qGrp1[6],qGrp1[7];
ccx q[6],q[0],q[4];
ccx qGrp1[6],qGrp1[0],qGrp1[4];
ccx q[7],q[1],q[5];
ccx qGrp1[7],qGrp1[1],qGrp1[5];
x q[6];
x q[7];
x qGrp1[6];
x qGrp1[7];
ccx q[6],q[0],q[2];
ccx qGrp1[6],qGrp1[0],qGrp1[2];
ccx q[7],q[1],q[3];
ccx qGrp1[7],qGrp1[1],qGrp1[3];
cx q[2],q[3];
cx q[4],q[5];
cx qGrp1[2],qGrp1[3];
cx qGrp1[4],qGrp1[5];

measure q[3] -> c[0];
measure q[5] -> c[1];
measure qGrp1[3] -> cGrp1[0];
measure qGrp1[5] -> cGrp1[1];

• Hi! Are you trying to transpile this for a specific backend? – met927 Feb 24 at 14:52
• Yes backend is ibmq_16_melbourne. Even if I reduce the circuit to 16 qubits + 4 classical bits (exactly half of the current circuit), I am getting the same error. – Adam Levine Feb 24 at 15:12
• I was able to run this circuit on the IBM Q simulator ok. As Melbourne has only 16 qubits you won't be able to run this circuit as it is 32 qubits. Could you share the code for the 16 qubit version? – met927 Feb 24 at 15:13
• Updated code and figure taking 16 qubits + 4 classical bits. – Adam Levine Feb 24 at 15:35
• Sorry, I was mistaken! Melbourne only has 15 qubits so this circuit is still too large – met927 Feb 24 at 15:44

Your circuit looks fine, but it has 16 qubits, and the largest IBM public backend currently has 15 qubits (note that Melbourne has 16 but one of the qubits is off right now). So in order to run it, you need a larger backend. The 20+ qubit hardware is currently accessible by IBMQ Network institution members.

But if you just want to play around you can simulate your circuit under realistic noise models and see how transpilation changes the circuit. For this you can use the "fake" backends in Qiskit. For example:

from qiskit.test.mock import FakeAlmaden