Quantum gates are the elementary operations for the qubits of a quantum computer.
They are comparable to the logic gates for classical bits. In contrast to the Boolean operators, all quantum gates are reversible, so there is always an inverse operation that can undo all computation steps. There is also a much wider variety of possible operations for qubits.
A quantum gate for a single qubit is described by a unitary matrix:
The operation on a state corresponds to the multiplication of the matrix with the state vector:
Executing two operators and \ (V ) one after the other is equivalent to an operator resulting from the matrix multiplication of and :
Since the operators are unitary matrices , the adjoint matrix corresponds to the inverse operator. (The quantum gate thus reverses the effect of the gate .)
where is the identity operator or unit matrix and denotes the complex conjungate of .
The Hadamard gate is one of the most fundamental operations in quantum computing.
The Hadamard gate for single qubit is described in the basis by the following matrix:
The basis states and are converted by the Hadamard gate into a superposition. You can also understand this operation as a transition between the bases and . The Hadamard matrix is self-adjoint (), so that the two-time application of the Hadamard gate gives the identity ( ).
The phase-shift is a whole family of single-qubit gates. It is described by the following matrix in the basis:
where . This operation leaves the amplitudes of the state vector unchanged and only introduces a phase shift between the vector components by the angle . The adjoint matrix yields such that .
Of particular importance are the phase shift gates , and .
The Pauli gates are a family of three operators with the matrices
The gate is the quantum mechanical equivalent to the classical NOT operator and interchanges the basis states so that and (bit-flip).
The gate performs a special phase-shift operation around the angle (phase-flip). The gate is a combination of bit and phase flip. The Pauli matrices are self-adjoint and obey the algebra .