slice_by_barriers¶
- slice_by_barriers(circuit)[source]¶
Split a
QuantumCircuit
into slices around full-circuit barriers.Barriers which do not act on all circuit qubits will be treated as normal operations and included in the slices. Barriers which act on all qubits will be interpreted as slice locations and will not be included in the output slices.
- Parameters:
circuit (QuantumCircuit) – The circuit to be split.
- Returns:
A sequence of
QuantumCircuit
objects, one for each slice.- Return type: