cirq.ParallelGateOperation

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

An application of several copies of a gate to a group 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 – list of qubits to apply the gate to.

Methods

controlled_by(*control_qubits[, control_values])

Returns a controlled version of this operation. If no control_qubits

transform_qubits(func)

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)

ParallelGateOperation with same qubits but a new gate

with_qubits(*new_qubits)

ParallelGateOperation with same the gate but new qubits

Attributes

gate

The single qubit gate applied by the operation.

qubits

The qubits targeted by the operation.