cirq.freeze_op_tree

cirq.freeze_op_tree(root: Union[cirq.ops.raw_types.Operation, Iterable[Any]]) → Union[cirq.ops.raw_types.Operation, Iterable[Any]][source]

Replaces all iterables in the OP_TREE with tuples.

Parameters:root – The operation or tree of operations to freeze.
Returns:An OP_TREE with the same operations and branching structure, but where all internal nodes are tuples instead of arbitrary iterables.