| |||||||||
A quantum gate or quantum logic gate is a rudimentary quantum circuit operating on a small number of qubits. They are the analogues for quantum computers to classical logic gates for conventional digital computers. Quantum logic gates unlike classical logic gates are reversible. In fact, they are represented by unitary matrices.
The most common quantum gates operate on spaces of one or two qubits. This means that as matrices, quantum gates can be described by 2 x 2 or 4 x 4 matrices with orthonormal rows.
Remark. The investigation of quantum logic gates is unrelated to quantum logic, which is a foundational formalism for quantum mechanics based on a modification of some of the rules of propositional logic.
Hadamard gate. This gate operates on a single qubit. It is represented by the Hadamard matrix:
Since the rows of the matrix are orthogonal, H is indeed a unitary matrix.
Phase shifter gates. Gates in this class operate on a single qubit. They are represented by 2 x 2 matrices of the form
where θ is the phase shift.
Controlled gates. Suppose U is a gate that operates on single qubits with matrix representation
The controlled-U gate is a gate that operates on two qubits in such a way that the first qubit serves as a control.
Thus the matrix of the controlled U gate is as follows:
Uncontrolled gate. We note the difference between the controlled-U gate and an uncontrolled 2 qubit gate <math> I \otimes U <math> defined as follows:
represented by the unitary matrix
Since this gate is reducible to more elementary gates it is usually not included in the basic repertoire of quantum gates. It is mentioned here only to contrast it with the previous controlled gate.