Skip to content

Commit d33b1a7

Browse files
authored
Don't create a new list of qubits in Gate.on (#6390)
Review: @dabacon
1 parent 7c9b713 commit d33b1a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cirq-core/cirq/ops/raw_types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def on(self, *qubits: Qid) -> 'Operation':
230230
Returns: a `cirq.Operation` which is this gate applied to the given
231231
qubits.
232232
"""
233-
return ops.gate_operation.GateOperation(self, list(qubits))
233+
return ops.gate_operation.GateOperation(self, qubits)
234234

235235
def on_each(self, *targets: Union[Qid, Iterable[Any]]) -> List['cirq.Operation']:
236236
"""Returns a list of operations applying the gate to all targets.

0 commit comments

Comments
 (0)