Just as many understand the concept of logic gates such as NOT, AND & OR, learning quantum gates can help quantum enthusiasts understand the fundaments of Quantum Computing. The challenge is that unlike classical gates, which behave in a logical way that we can easily understand, quantum gates need a little bit more understanding and insight. But once the fundamentals have been learned, people often find their knowledge accelerates. Here are some commonly used Quantum Gates.
X (NOT Gate)
Perhaps the simplest gate of all to understand because it is something we appreciate from our language of being able to enact “negation”. The “X” gate, also known as the “NOT” gate or the “Pauli-X” gate, is a quantum gate that flips the value of the input quantum state applied.
For example, if the quantum state is 0 (zero), applying the X gate will transform it into a 1 (one). Similarly, if the quantum state is 1 (one), using the X gate will change it to 0 (zero).
The X gate is a crucial and elemental building block for many quantum algorithms. It is one of three Pauli gates, along with the Y and Z gates, a set of basic quantum gates widely used in quantum computing.
The CNOT (Controlled NOT) gate is a two-qubit quantum gate that performs a NOT operation on the second qubit (also known as the “target” qubit) if the first qubit (also known as the “control” qubit) is in the ‘1’ (one) state. If the control qubit is in the ‘0’ (zero) state, the CNOT gate leaves the target qubit unchanged. The gate differs from the single qubit gates because it takes two input quantum states.
The CNOT gate is also an important building gate for many quantum algorithms and is commonly used in quantum error correction, quantum communication, and quantum computation. It is one of the most rudimentary two-qubit gates and is essential for implementing quantum logic gates and quantum circuits. It is used in the process of entanglement along with a Hadamard Gate (as illustrated below).
The Y gate, also known as the Pauli-Y gate, is a quantum gate that performs a specific unitary operation on a quantum state. Analogously to the X gate, it performs a rotation about the Y axis instead of the X axis.
The Y gate is similar to the X gate in that it flips the value of the quantum state it is applied. But, unlike the X gate, which converts the value of the quantum state between zero and one, a Y gate flips the value of the quantum states from one superposition to another. It flips the states from a ‘plus’ to a ‘negative’ state.= or vice versa.
The Z gate, also known as the Pauli-Z gate, is a quantum gate that performs a phase flip on the quantum state it is applied. The Z gate has the effect of multiplying the quantum state by -1 if it is in the ‘one’ state and leaving it unchanged if it is in the ‘zero’ state. The Z gate can implement the phase shift operation in quantum circuits, which introduces a phase shift of π/2, π, or 3π/2 to the quantum state.
Rotation Gates Rx, Ry, Rz
A rotation gate is a quantum gate that rotates the state of a qubit around a specific axis in the Bloch sphere. There are several types of rotation gates, including the X-rotation gate (also known as the “Rx” gate), the Y-rotation gate (also known as the “Ry” gate), and the Z-rotation gate (also known as the “Rz” gate). There are three axes in the Bloch-sphere, which is a way of representing a qubit. The X-rotation gate rotates the state of a qubit around the X-axis of the Bloch sphere, the Y-rotation gate rotates around the Y-axis, and the Z-rotation gate revolves the state around the Z-axis. A parameter specifies the angle of rotation called the “angle”, which can be defined to be any angle and that way the qubit can be oriented to any position to represent any state.
Hadamard Gate (H)
The Hadamard gate is our favourite gate. It seemingly injects some magic into the quantum process. It takes a pure quantum state and morphs it into a superposition of states. The Hadamard gate performs a unitary operation on a solitary qubit, which transforms the qubit’s state from the computational basis states 0 (zero) and 1 (one) to two superposition states named positive and negative.
The Hadamard gate is crucial and is commonly used to create superposition states and to implement quantum logic gates and quantum circuits.
Creating Entanglement with a Hadamard and CNOT Gate
Entanglement is a quantum phenomenon in which the state of two or more qubits becomes correlated, meaning that the state of one qubit depends on the state of the other qubits in a way that classical physics finds hard to explain. Entangled qubits can exhibit a range of strange and counterintuitive behaviours, such as being able to instantaneously affect each other’s state even when separated by distances that could be vast. Entanglement like superposition is one of the key areas that quantum computers exploit.