# How to divide one quantum circuit into multiple sub-circuits in qiskit?

While I'm simulating one Big quantum circuit in Qiskit, I wonder how we can divide one big quantum circuit into several sub-circuits. I looked in Qiskit API documents, but I couldn't find it.

Is there anyway that I can do that?

• If your big circuit has smaller circuit that are separated from each other, that is, the set of qubits are not entangled, then just write them as two different circuits and run them separately if you wish. You have to create that big circuit in the first place, right? So instead of define a single circuit, define multiple smaller circuits.... Commented Mar 19, 2021 at 15:51

## 1 Answer

This is the best I have at the moment.

def split_circuit(circuit, start, end):
nq = len(circuit.qubits)
qc2 = qis.QuantumCircuit(nq)
for x in circuit[start:end]:
qc2.append(x[0], x[1])
return qc2


I hope it helps. I too want something like this built in. Ideally it would just use something like the slicing.