slice_by_gate_types¶
- slice_by_gate_types(circuit)[source]¶
Split a
QuantumCircuit
into depth-1 slices of operations of the same type.Warning
Note: Adjacent slices sharing no qubits in common may be ordered arbitrarily.
- Parameters:
circuit (QuantumCircuit) – The circuit to be split.
- Returns:
A sequence of
QuantumCircuit
objects, one for each slice.- Return type: