cirq.MergeInteractions

class cirq.MergeInteractions(tolerance: float = 1e-08, allow_partial_czs: bool = True, post_clean_up: Callable[Sequence[cirq.ops.raw_types.Operation], Union[cirq.ops.raw_types.Operation, Iterable[Any]]] = <function MergeInteractions.<lambda>>)[source]
Combines series of adjacent one and two-qubit gates operating on a pair
of qubits.
__init__(tolerance: float = 1e-08, allow_partial_czs: bool = True, post_clean_up: Callable[Sequence[cirq.ops.raw_types.Operation], Union[cirq.ops.raw_types.Operation, Iterable[Any]]] = <function MergeInteractions.<lambda>>) → None[source]
Args:
post_clean_up: This function is called on each set of optimized
operations before they are put into the circuit to replace the
old operations.

Methods

optimization_at(circuit, index, op) Describes how to change operations near the given location.
optimize_circuit(circuit)