3
$\begingroup$

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).

figure

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];
$\endgroup$
  • $\begingroup$ Hi! Are you trying to transpile this for a specific backend? $\endgroup$ – met927 Feb 24 at 14:52
  • $\begingroup$ 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. $\endgroup$ – Adam Levine Feb 24 at 15:12
  • $\begingroup$ 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? $\endgroup$ – met927 Feb 24 at 15:13
  • $\begingroup$ Updated code and figure taking 16 qubits + 4 classical bits. $\endgroup$ – Adam Levine Feb 24 at 15:35
  • $\begingroup$ Sorry, I was mistaken! Melbourne only has 15 qubits so this circuit is still too large $\endgroup$ – met927 Feb 24 at 15:44
5
$\begingroup$

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
backend = FakeAlmaden()

# you can see how this differs from original circuit and can plan
# with some transpilation options
new_circuit = transpile(circuit, backend) 

And then you can refer to this tutorial on how to simulate this backend. Almaden is a 20-qubit backend. https://github.com/Qiskit/qiskit-iqx-tutorials/blob/09ea113fdeb340f4f2d71c862126ee35a676b754/qiskit/advanced/aer/2_device_noise_simulation.ipynb

| improve this answer | |
$\endgroup$

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.