qiskit_addon_cutting.cut_gates¶
- cut_gates(circuit, gate_ids, inplace=False)[source]¶
Transform specified gates into
TwoQubitQPDGate
s.- Parameters:
circuit (
QuantumCircuit
) – The circuit containing gates to be decomposedgate_ids (
Sequence
[int
]) – The indices of the gates to decomposeinplace (
bool
) – Flag denoting whether to copy the input circuit before acting on it
- Return type:
- Returns:
A copy of the input circuit with the specified gates replaced with
TwoQubitQPDGate
s and a list ofQPDBasis
instances – one for each decomposed gate.- Raises:
ValueError – The input circuit should contain no classical bits or registers.