Published in

InCode Lab

Quantum Gates-Explained

Quantum computing can be hard and intimidating in the beginning. But it will get easier with practice. With this article, I’m hoping to get you started with quantum computing with ease. First, you have to understand qubits.

Classical bit vs Qubit

In classical computers, the bit values can either be 0 or 1. In the case of a quantum computer, the “qubits” can take the coherent superposition of both 0 and 1 simultaneously. The qubit is represented with the probabilities of it being a 0 and 1.

This property of qubit is what makes quantum computers exponentially faster than a classical computer. For a given number of bits(n), a quantum computer will perform a calculation 2^n times faster than a classical computer.
Example: With 3 qubits of data, the Quantum computer can store all the 8 possible combinations of 0 and 1 simultaneously. As a result, 4 Qubit based Quantum computer does calculations 16 times faster compare to a 4-bit classical computer.

Now let’s take a look into quantum gates.

Hadamard Gate

The Hadamard gate is the most common and the most used quantum gate in quantum computing. It is a single qubit operation that maps the basis state ∣0＞ to ( |0＞ + |1＞)/√2 and ∣1＞ to ( |0＞ — |1＞)/√2, thus creating an equal superposition of the two basic states. This means the measurements will have equal probabilities to become 1 or 0.

Pauli-X gate

The Pauli-X gate is a single qubit operation gate that is similar to the classical not gate. It takes a value and flips it to the opposite one. It maps |0＞ to |1＞ and |1＞ to |0＞.

Pauli-Y gate

The Pauli-Y gate is a single qubit operation. It maps |0＞ to -i|1＞ and |1＞ to i|0＞. It equates to a rotation around the Y-axis of the Bloch sphere by pi radians.

Pauli-Z gate

The Pauli-Z gate is a single qubit operation. It maps |1＞ to -|1＞ and it leaves |0＞ unchanged. It equates to a rotation around the Z-axis of the Bloch sphere by pi radians.

Controlled gates

The controlled gate is a 2 or more qubit operation, where 1 or more qubits act as a control for some operation on a qubit. (eg: cx, cy, cz gates)

Controlled X gate

The controlled-x gate acts on 2 qubits and performs the NOT operation on the second qubit only when the first qubit is |1＞.

Conclusion

I have attached some links to learn quantum mechanics and quantum computing. I hope it helps.

Quantum Computing: https://www.youtube.com/playlist?list=PLOFEBzvs-Vvp2xg9-POLJhQwtVktlYGbY

Quantum Mechanics: http://ocw.mit.edu/8-04S16

--

--

More from InCode Lab

A Computer Science initiative from RoboVITics. Here to talk about everything Computers, Math and Tech.