# The Quantum Gates everyone should know in Quantum Computing

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.

## CNOT Gate

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).

## Y Gate

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.

## Z Gate

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.