![]() |
Performs an in-order iteration OP_TREE, yielding ops and moments.
cirq.ops.flatten_to_ops_or_moments(
root: cirq.ops.OP_TREE
) -> Iterator[Union[Operation, Moment]]
Args | |
---|---|
root
|
The operation or tree of operations to iterate. |
Yields | |
---|---|
Operations or moments from the tree. |
Raises | |
---|---|
TypeError
|
root isn't a valid OP_TREE. |