Universal Gate Set
IBM Quantum Composer: https://quantum.ibm.com/composer/
1. Definition
A universal gate set is a set of quantum gates that allows us to approximate any quantum gate to any desired precision.
2. Components of a Universal Gate Set
There are several components that we need for a set of quantum gates to be universal
Superposition: We must be able to produce superpositions. For example, the Hadamard gate can create superpositions, such as \(H\ket{0} = \ket{+}\). Other gates are not. \(Z\), \(S\), and \(T\) only apply phases; they do not create superpositions of \(\ket{0}\) and \(\ket{1}\). Similarly, the \(X\) and \(\text{CNOT}\) gates only flip \(\ket{0}\) and \(\ket{1}\), so they cannot create superpositions. \(Y\) only applies phases and flips, so again superpositions cannot be created by it.
Entanglement: We must be able to entangle qubits. One-qubit gates, such as \(H\), cannot do this since they only act on a single qubit. A gate must act on at least two qubits to produce entanglement. \(\text{CNOT}\) can produce entanglement since \(\text{CNOT}\ket{+}\ket{0} = \ket{\Phi^+}\). Not all two qubit gates produce entanglement, however. The \(\text{SWAP}\) gate cannot generate entanglement since it only swaps two qubits.
Complex amplitudes: \(\text{CNOT}\) and \(H\) only contain real numbers, so they do not produce states with complex amplitudes.
In addition, the set must:
Generate more than the Clifford group.
The Clifford group is the set of gates that can be generated by {\(H\), \(\text{CNOT}\), \(S\)}.
3. Constructing Quantum Gates using Universal Gates
We will use universal gate set $G = $ {\(\text{CNOT}\) , \(H\), \(S\), \(T\)} to construct the Pauli \(X\), Pauli \(Y\) and \(\text{Toffoli}\) gates.
3.1. Pauli \(X\)
We can construct a Pauli \(X\) gate by applying the following gates: \(H\) gate, \(4\) \(T\) gates and \(H\) gate.
\(\underline{X}\)

\(\underline{\text{Universal gates}}\)

3.2. Pauli \(Y\)
We can construct a Pauli \(Y\) gate by applying the following gates in order: \(H\) gate, \(4\) \(T\) gates, \(H\) gate and \(2\) \(T\) gates.
\(\underline{Y}\)

\(\underline{\text{Universal gates}}\)

3.3. \(\text{Toffoli}\) Gate
The \(\text{Toffoli}\) gate is much more complex.
\(\underline{\text{Toffoli}}\)

\(\underline{\text{Universal gates}}\)
