|View source on GitHub|
Merges connected components of operations, acting on <= k qubits, into circuit operations.
cirq.merge_k_qubit_unitaries_to_circuit_op( circuit: CIRCUIT_TYPE, k: int, *, tags_to_ignore: Sequence[Hashable] = (), merged_circuit_op_tag: Optional[str] = None, deep: bool = False ) -> CIRCUIT_TYPE
cirq.merge_operations_to_circuit_op to identify and merge connected components of
unitary operations acting on at-most k-qubits. Moment structure is preserved for operations
that do not participate in merging. For merged operations, the newly created circuit operations
are constructed by inserting operations using EARLIEST strategy.
|Copy of input circuit with valid connected components wrapped in tagged circuit operations.|