IdentityGate(num_qubits: Optional[int] = None, qid_shape: Tuple[int, ...] = None)¶
A Gate that perform no operation on qubits.The unitary matrix of this gate is a diagonal matrix with all 1s on thediagonal and all 0s off the diagonal in any basis.
cirq.Iis the single qubit identity gate.
__init__(num_qubits: Optional[int] = None, qid_shape: Tuple[int, ...] = None)¶
qid_shape – Specifies the dimension of each qid the measurement applies to. The default is 2 for every qubit.
ValueError – If the length of qid_shape doesn’t equal num_qubits.
controlled([num_controls, control_values, …])Returns a controlled version of this gate. If no arguments are
The number of qubits this gate acts on.
Returns an application of this gate to the given qubits.
on_each(*targets)Returns a list of operations that applies the single qubit identity
Checks if this gate can be applied to the given qubits.