# 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[, control_values]) Returns a controlled version of this operation. If no control_qubits Returns the same operation, but with different qubits. validate_args(qubits) Raises an exception if the qubits don’t match this operation’s qid with_gate(new_gate) with_qubits(*new_qubits)

Attributes

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