What is the identity gate? ¶
The identity gate is a gate in quantum computing that, essentially, does nothing. Whatever state goes into it comes out again unchanged.
In a circuit diagram, an identity gate is represented by a square with the letter ‘I’ in it, as shown below.

However, since it has no effect on the output, it rarely needs to be drawn. It is comparable to the buffer gate in classical computation.
The identity gate's matrix representation is below.
Applying this matrix to any state vector simply results in that same state vector.
Quantum gates are reversible, meaning that any given quantum gate, $U$, and its adjoint, $U^\dagger$, applied one after another is equivalent to the identity gate: $U^\dagger U = I$.
The identity gate in PennyLane is available as qml.Identity
. This gate is called IGate
in Qiskit.