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(
2626 circuit : 'cirq.AbstractCircuit' ,
2727 * ,
2828 context : Optional ['cirq.TransformerContext' ] = None ,
29- target_tags : set [Hashable ],
29+ target_tags : Optional [ set [Hashable ]] = None ,
3030) -> 'cirq.Circuit' :
3131 """Indexes tags in target_tags as tag_0, tag_1, ... per tag.
3232
@@ -41,7 +41,7 @@ def index_tags(
4141 if context and context .tags_to_ignore :
4242 raise ValueError ("index_tags doesn't support tags_to_ignore, use function args instead." )
4343 if not target_tags :
44- return circuit
44+ return circuit . unfreeze ( copy = False )
4545 tag_iter_by_tags = {tag : itertools .count (start = 0 , step = 1 ) for tag in target_tags }
4646
4747 def _map_func (op : 'cirq.Operation' , _ ) -> 'cirq.OP_TREE' :
You can’t perform that action at this time.
0 commit comments