Hackernoon logoQuantum Computing: Things I Thought I Understood — But Didn’t by@jayantakshirsagar

Quantum Computing: Things I Thought I Understood — But Didn’t

Jayanta Kshirsagar Hacker Noon profile picture

@jayantakshirsagarJayanta Kshirsagar

Application Developer

IBM 50 qubit quantum computer — Image source: https://s.blogcdn.com/slideshows/images/slides/720/684/5/S7206845/slug/l/ibm1-1.jpg

Have you ever heard a joke like “Once Schrodinger’s cat walks into a bar and doesn’t.” and then wondered what does it mean? Let’s briefly talk about Schrodinger’s cat experiment, it’s a thought experiment where you put a cat in an aluminium box and place cat food mixed with poison in it. Now close the box. What would happen to the cat? Cat might eat the food and die because of poisoning or cat may not be hungry and would still be alive. Unless we open the box we would not come to know anything about the cat, so till the box is closed the cat is dead and alive at the same time.

Image source: https://i.stack.imgur.com/Of40B.jpg

Before we begin with quantum computing, let’s first quickly talk about need of quantum computing. As Moore’s law states, the number of transistors on a CPU doubles after every 2 years, and to get more speed we need more transistors. Given the current situation, the size of transistors has reduced so small, that it’s difficult to reduce it further. As we are advancing, we are generating more and more data, which creates exponential number of possibilities and we need more computing power to process and analyse this data. Also, there exists certain problems like combinatorial ones which are difficult to solve given our classical computing algorithms. Even using super computer, we can’t be sure when the program will terminate and also we won’t be able to tell whether it will terminate or not.

The way we have bits in classical computers, similarly quantum computers have qubits, which are also known as Quantum Bits. These qubits are implemented using artificial atoms kept at very low temperature. At such a small size, the atoms do not follow the laws of our day today science. Their behaviour is governed by laws of quantum physics. Let’s briefly go through the principles.

Quantum Principles

  1. Superposition — The atoms can be in grounded and excited state at the same time, same principle is applied to qubits, as they can exhibit two states at the same time. Let’s say if we flip a coin, in a binary world the coin would either be head or tail but as the coin is in the motion it is neither head nor tail but both. Which would mean that qubit would be having values 1 and 0 at the same time and a function applied on qubit would evaluate for both the states.
  2. Entanglement — In close proximity, the atoms depict entangled behaviour. State of one atom can easily be predicted based on state of other particle. To explain this phenomenon let’s take an example, we have an urn which has two balls of the same size but different colours which are black and white. Now, if you and your friend draws one each and goes home without looking at the balls. Once you reach home, you see the ball and at the same time without even looking at other one you know what colour the ball your friend has got. This can be viewed as information transfer faster than the speed of light and we need not to measure and still we could predict with 100% probability.
  3. Interference — As we know that the atoms also depict behaviour of waves, and waves can form constructive and destructive interferences and these interference patterns can be used to get the output. When we want a specific output we can form constructive interference and increase the probability to read the value as an output and at the same time we can mask other values by causing destructive interference.
  4. Quantum measurement — With the quantum systems, the act of observing or measuring the output changes the state of the system. Which means if we read the value of the qubit, the superposition state collapses and qubit behaves like an ordinary bit. These qubits are like those scrolls from movies which once read destroys themselves.
  5. Quantum parallelism — When we run a function in parallel say on ‘n’ bits we get n combinations but wehn we run same function on ’n’ qubits and as each qubit represents two states, We can explore 2 ^ n states at the same time. Which reduces algorithm complexity drastically and let’s us compute and solve exponential problems.

Quantum gates

As we discussed above, We have qubits the way we have bits in classical computing, similarly we have quantum gates which can be used to operate on these qubits. We use vectors to represent qubits since they hold multiple states, hence we need matrices to operate on these vectors. Examples of such gates can be Pauli’s X gate, Pauli’s Y gate, Hadamard gate. The explanation of these gates is beyond the scope of this article.

Image source: https://www.researchgate.net/publication/266855738/figure/fig1/AS:[email protected]/Commonly-used-quantum-gates-NOT-Z-Hadamard-and-CNOT.png

Future of Quantum Computing

So, Are we expecting that soon these quantum computers would replace our normal computers and our mobiles would be running on quantum CPU’s? The answer is No. Quantum computers help us solving combinatorial problems, and they won’t be able to run programs like operating systems or word processors. We would still be using our classical computers, which would interact with quantum computers to encode and decode the responses. Also, as of now IBM and Dwave have made there quantum computers available as “Hardware as service” basis where users can use these machines by using API’s.

Then have we solved the mystery of quantum computers? Not completely, because we haven’t yet figured out the ways to deal with error generated with these quantum systems and most of the algorithms are proven on paper and not been implemented fully. But we have many of the quantum computers ready and there are certain languages like Q, QCL which can be used to write code for quantum computers. Q#, Cirq are SDK’s which can also be able to simulate quantum system on our classical computers.

Thanks for reading. Your feedback is highly appreciated.


Join Hacker Noon

Create your free account to unlock your custom reading experience.