# Quantum Computing: Is it the end of blockchain?

Let’s start by understanding blockchain.

*Disclaimer: I have tried to keep this as simple as possible, which could have abstracted the technical nuances a bit. Moreover, please excuse my handwriting in all the descriptions. I felt they do a better job in describing concepts than a picture from the web.*

In simple words, a blockchain is a ledger that records transactions of a certain type. It uses mathematical functions such as integer factorization, which is easy to solve in one direction but hard in the other direction for security.

The transactions in a blockchain are added to a database called a block, and the block is encrypted using a mathematical device called a hashing function. This hash is then included in the next block with the next set of transactions, which is then encrypted using the hashing function to produce a new hash. This new hash is added to the next block. And so on, creating a chain of blocks that are all nested inside the latest one — hence the name blockchain.

Here is an example of a hash generated by the MD5 algorithm in Python, which is a widely used hash function producing a 128-bit hash value.

Figuring out the input value (“Kellogg first block”) is extremely tough for a classical computer. It can be done only by brute force — systematically enumerating all possible candidates for the solution and checking whether each candidate satisfies the problem’s statement. Similarly, solving the hash for a bitcoin block — which starts with multiple zeros — requires an extremely large amount of computation. That’s why even the combined processing power of all the computers in the network in bitcoin takes approximately 7 minutes to solve a block.

However, things could change with a quantum computer, which could be a threat to blockchain and cryptocurrencies. Let’s see how.

# What’s a Quantum Computer?

One of the reasons behind most advances in computation capabilities has been ever decreasing sizes of transistors. At the core of every form factor in computation are transistors, which forms logic gates that process information in computers.

Over past decades, chip manufacturers, such as Intel, have been able to fit more and more transistors in CPUs by reducing its size. In modern CPU, the transistors are even smaller than the size of the HIV virus. In essence, we are reaching to the point where transistors will be the size of the atom. That’s why it’s believed Moore’s law will not hold in future, and computing power might not increase at a pace it has in the past. (Moore’s law: It states that the number of transistors in a densely integrated circuit doubles about every two years. This law is widely used in R&D planning)

One of the solutions to this problem has been quantum computing.

The bits in a classical computer, based on transistors, could be just 0 and 1. However, a quantum computer maintains a sequence of qubits, which can represent a one, a zero, or any quantum superposition of those two qubit states. In general, a quantum computer with n qubits can be in an arbitrary superposition of up to 2^n different states simultaneously. As a classical computer can only be in one of the 2^n states at any one time, Quantum computer is exponentially faster than a classical computer.

How is that superimposition possible? That’s because the quantum world is intrinsically parallel. In the famous Thomas Young Double slit experiment, a quantum particle could go through two slits at the same time. The best quantum computer could have massively large computation with much greater efficiency than a classical computer.

# Principles of Quantum Computing

As we have been mostly taught classical mechanics in schools, the concept of quantum computing doesn’t feel intuitive. I would try demonstrating using one of the simplest examples, which was used by my quantum mechanics professor.

Can you figure which one is the front side in this cube? You might not be sure. However, once you decide which side is front, the confusion collapses. This uncertainty of possible states describes one of the most profound theories in quantum mechanics — the superposition principle.

Because of this principle n qubits could represent an arbitrary superposition of up to 2^n different states simultaneously

Now try this one. Which side is the front?

This is interesting. While here again, you might have been unsure, once you settle the debate of front side for one cube, you also settle the debate for the second cube. Somehow the two cubes far apart in space are entangled.

Quantum entanglement is a phenomenon in which the quantum states of two or more objects have to be described with reference to each other, even though the individual objects may be spatially separated.

Quantum entanglement is a supercritical part of a quantum computer operation. A quantum computer sets entanglement and finally measure the output, collapsing superposition to 0 and 1 (or classical state). Many algorithms in a quantum world will only give the correct answer with a certain probability. However, by repeatedly initializing, running and measuring the quantum computer’s results, the probability of getting the correct answer can be increased.

# Threat to blockchain

As explained above, Blockchain technology uses cryptographic techniques that are widely thought to be unbreakable, except by brute force attacks requiring huge computing powers. The concept is similar to the cryptographic technique used for communication on the internet.

Quantum computer because of it’s massive computational power could, in theory, break today’s public key cryptography, and hence it’s a threat to the blockchain.

However, there are challenges in scaling quantum computing.

The qubits are extremely fragile. Even environmental noise could lead to decoherence destroying the quantum character of a particle.

For each useful qubit, you need 10 to 100 qubits to rectify the error. Thus, it’s tough to scale. It’s an ongoing area of research and some proposed solutions include topological Quantum Computer.

# What’s the future of blockchain in the world of Quantum computing?

When Marc Anderson, co-founder of Andreessen Horowitz, was asked about the problem of the blockchain, this is what he said:

“When you say there is a gigantic problem to VC, he just gets excited. Just find me a smart guy who is looking to solve this.”

His optimism aside, it’s going to be a complex solution.

One of the potential solutions is Quantum Blockchain, which uses quantum cryptography. This has been proposed by Del Rajan and Matt Visser of Victoria University of Wellington in New Zealand. The idea is simple — if computers can compute fast, make the puzzle more complex. Their idea is to create a blockchain using quantum particles that are entangled in time. That would allow a single quantum particle to encode the history of all its predecessors in a way that cannot be hacked without destroying it.

However, this would have further repercussions on the scaling of the blockchain, which is already constrained.

While the future of blockchain is uncertain, it’s certainly interesting.