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 pairof 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 optimizedoperations before they are put into the circuit to replace theold operations.
Methods
optimization_at(circuit, index, op)Describes how to change operations near the given location. optimize_circuit(circuit)Rewrites the given circuit to make it better. -