cirq.flatten_op_tree¶
-
cirq.flatten_op_tree(root: Union[cirq.ops.raw_types.Operation, Iterable[Any]]) → Iterable[cirq.ops.raw_types.Operation][source]¶ Performs an in-order iteration of the operations (leaves) in an OP_TREE.
Parameters: root – The operation or tree of operations to iterate. Yields: Operations from the tree. Raises: TypeError– root isn’t a valid OP_TREE.