Common Quantum Gates
In this notebook, we’ll introduce some of the most commonly used quantum gates, such as the Identity \(I\), Pauli (\(X\), \(Y\), \(Z\)), Hadamard \(H\), \(S\), and \(T\) gates. We also show how to use them in IBM Quantum Composer.
IBM Quantum Composer: https://quantum.ibm.com/composer/
1. Identity I Gate
1.1 Definition and Matrix Representation
The Identity \(I\) gate, often referred to as a “do-nothing” gate, leaves the qubit unchanged. It turns \(\ket{0}\) into \(\ket{0}\) and \(\ket{1}\) into \(\ket{1}\):
The Identity gate is represented by the matrix:
1.2 Bloch Sphere Effect
Since the Identity gate does not change the qubit state, it does not alter the position on the Bloch sphere.

1.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the Identity gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

2. Pauli X Gate
2.1 Definition and Matrix Representation
The \(X\) gate, also known as the \(NOT\) gate, flips the state of the qubit. It turns \(\ket{0}\) into \(\ket{1}\) and \(\ket{1}\) into \(\ket{0}\):
The Pauli \(X\) gate is represented by the matrix:
2.2 Bloch Sphere Effect
The \(X\) gate performs a rotation about the \(x\)-axis by 180\(^\circ\) or \(\pi\) radians on the Bloch sphere. Visually, this is represented by a flip along the \(x\)-axis.

2.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the \(X\) gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

3. Pauli Y Gate
3.1 Definition and Matrix Representation
The \(Y\) gate turns \(\ket{0}\) into \(i\ket{1}\) and \(\ket{1}\) into \(-i\ket{0}\):
The Pauli \(Y\) gate is represented by the matrix:
3.2 Bloch Sphere Effect
The \(Y\) gate performs a rotation about the \(y\)-axis by 180\(^\circ\) or \(\pi\) radians on the Bloch sphere.

3.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the \(Y\) gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

4. Pauli Z Gate
4.1 Definition and Matrix Representation
The \(Z\) gate, also known as the “phase-flip” gate, turns \(\ket{0}\) into \(\ket{0}\) and \(\ket{1}\) into \(-\ket{1}\):
The Pauli \(Z\) gate is represented by the matrix:
4.2 Bloch Sphere Effect
The Z gate performs a rotation about the \(z\)-axis by 180\(^\circ\) or \(\pi\) radians on the Bloch sphere.

4.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the \(Z\) gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

5. Hadamard H Gate
5.1 Definition and Matrix Representation
The Hadamard \(H\) gate turns \(\ket{0}\) into \(\ket{+}\) and \(\ket{1}\) into \(\ket{-}\):
The Hadamard gate is represented by the matrix:
5.2 Bloch Sphere Effect
The H gate performs a rotation about the \(x+z\)-axis by 180\(^\circ\) or \(\pi\) radians on the Bloch sphere.

5.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the Hadamard gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

6. S Gate
6.1 Definition and Matrix Representation
The \(S\) gate, also known as the Phase gate, is the square root of the \(Z\) gate (i.e. \(S^2 = Z\)):
The S gate is represented by the matrix:
6.2 Bloch Sphere Effect
The S gate performs a rotation about the \(z\)-axis by 90\(^\circ\) or \(\frac{\pi}{2}\) on the Bloch sphere.

6.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the \(S\) gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

7. T Gate
7.1 Definition and Matrix Representation
The \(T\) gate, also called the \(\frac{\pi}{8}\) gate, is the square root of the \(S\) gate (i.e. \(T^2 = S\)) or fourth root of the \(Z\) gate. It turns \(\ket{0}\) into \(\ket{0}\) and \(\ket{1}\) into \(e^{\frac{i\pi}{4}}\ket{1}\):
The T gate is represented by the matrix:
7.2 Bloch Sphere Effect
The T gate performs a rotation about the \(z\)-axis by 45\(^\circ\) or \(\frac{\pi}{4}\) on the Bloch sphere.

7.3 IBM Quantum Composer
Using IBM Quantum Composer, we apply the \(T\) gate on:
\(\underline{\ket{0}}\)

\(\underline{\ket{1}}\)

8. Summary

9. More Quantum Computing Gate Notes
