IdentityGate(num_qubits: Optional[int] = None, qid_shape: Optional[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: Optional[Tuple[int, …]] = None) → 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.