ExpandComposite(no_decomp: Callable[cirq.ops.raw_types.Operation, bool] = <function ExpandComposite.<lambda>>)¶
An optimizer that expands composite operations via
cirq.decompose.For each operation in the circuit, this pass examines if the operation canbe decomposed. If it can be, the operation is cleared out and and replacedwith its decomposition using a fixed insertion strategy.
__init__(no_decomp: Callable[cirq.ops.raw_types.Operation, bool] = <function ExpandComposite.<lambda>>) → None¶
Construct the optimization pass.
Parameters: no_decomp – A predicate that determines whether an operation should be decomposed or not. Defaults to decomposing everything.
optimization_at(circuit, index, op)
Describes how to change operations near the given location.
Rewrites the given circuit to make it better.