File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
cirq-core/cirq/transformers Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def index_tags(
26
26
circuit : 'cirq.AbstractCircuit' ,
27
27
* ,
28
28
context : Optional ['cirq.TransformerContext' ] = None ,
29
- target_tags : set [Hashable ],
29
+ target_tags : Optional [ set [Hashable ]] = None ,
30
30
) -> 'cirq.Circuit' :
31
31
"""Indexes tags in target_tags as tag_0, tag_1, ... per tag.
32
32
@@ -41,7 +41,7 @@ def index_tags(
41
41
if context and context .tags_to_ignore :
42
42
raise ValueError ("index_tags doesn't support tags_to_ignore, use function args instead." )
43
43
if not target_tags :
44
- return circuit
44
+ return circuit . unfreeze ( copy = False )
45
45
tag_iter_by_tags = {tag : itertools .count (start = 0 , step = 1 ) for tag in target_tags }
46
46
47
47
def _map_func (op : 'cirq.Operation' , _ ) -> 'cirq.OP_TREE' :
You can’t perform that action at this time.
0 commit comments