Repacks avoiding simultaneous operations with different classes.
context: Optional['cirq.TransformerContext'] = None,
cirq.transformers.stratify.Category] = ()
) -> 'cirq.Circuit'
Used in the notebooks
This transforms the given circuit to ensure that no operations of different categories are
found in the same moment. Makes no optimality guarantees.
Tagged Operations marked with any of
context.tags_to_ignore will be treated as a separate
category will be left in their original moments without stratification.
The circuit whose operations should be re-arranged. Will not be modified.
cirq.TransformerContext storing common configurable options for transformers.
A list of classifiers picking out certain operations. There are several ways
to specify a classifier. You can pass in a gate instance (e.g.
a gate type (e.g.
cirq.XPowGate), an operation instance
cirq.X(cirq.LineQubit(0))), an operation type (e.g.
or an arbitrary operation predicate (e.g.
lambda op: len(op.qubits) == 2).
A copy of the original circuit, but with re-arranged operations.