# cirq.GateOperation¶

class cirq.GateOperation(gate: cirq.ops.raw_types.Gate, qubits: Sequence[cirq.ops.raw_types.Qid])[source]

An application of a gate to a sequence of qubits.

__init__(gate: cirq.ops.raw_types.Gate, qubits: Sequence[cirq.ops.raw_types.Qid]) → None[source]
Parameters: gate – The gate to apply. qubits – The qubits to operate on.

Methods

 controlled_by(*control_qubits) Returns a controlled version of this operation. transform_qubits(func, cirq.ops.raw_types.Qid]) Returns the same operation, but with different qubits. with_gate(new_gate) with_qubits(*new_qubits)

Attributes

 gate The gate applied by the operation. qubits The qubits targeted by the operation.