# 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. Operations from the tree. TypeError – root isn’t a valid OP_TREE.