cirq.GateOperation

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

An application of a gate to a sequence of qubits.

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

Methods

transform_qubits(func, …) 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.