![]() |
Performs an in-order iteration OP_TREE, yielding ops and moments.
cirq.flatten_to_ops_or_moments(
root: cirq.OP_TREE
) -> Iterator[Union[Operation, 'cirq.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. |