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?
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.Sign up to join this community
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, x) return qc2
I hope it helps. I too want something like this built in. Ideally it would just use something like the slicing.