© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
I. BashirBlockchain Consensus https://doi.org/10.1007/978-1-4842-8179-6_9

9. Quantum Consensus

Imran Bashir1  
(1)
London, UK
 

This chapter covers quantum consensus. Before we explain what quantum consensus is, a basic introduction to quantum computing and its advantages is given to build an understanding about how quantum computer works. Moreover, topics like quantum networks, quantum Internet, quantum cryptography, and quantum blockchains are also covered. Then we discuss quantum consensus and explain what it is, how quantum computing impacts classical consensus in classical and quantum networks, and how quantum computing can enhance existing distributed consensus protocols. We survey what has been done so far in the research community and some open research problems.

Introduction

The roots of the idea to combine quantum mechanics and information theory can be traced back to as early as the 1970s. In 1979, Paul Benioff proposed a theoretical foundation of quantum computing. In 1982, Richard Feynman gave a lecture in which he argued that classical computers cannot possibly perform calculations that describe quantum phenomena. Classical computers are inherently limited, and to simulate quantum phenomena, the computing device must also be based on quantum principles, thus allowing quantum mechanical simulations and calculations which otherwise are not possible in the classical computing world. This was received well, and many researchers started working on this.

In 1985, David Deutsch proposed a universal quantum computer and indicated that it might perform simultaneous operations using quantum superposition. He also suggested the “Deutsch algorithm,” which could determine if a quantum coin is biased with a single toss. After this, an interest sparked again but soon waned. However, quantum computing came into the limelight when Peter Shor, in 1994, described a quantum algorithm that could factorize large numbers quickly. This event sparked a lot of interest because primarily Internet security is based on RSA, which uses prime factorization as a hard problem for its security. More precisely, it is computationally infeasible to factor large prime numbers on classical computers, which gives RSA its security. However, this can be done efficiently with quantum computers, thus breaking RSA, hence the security on the Internet. Of course, we can imagine, this was big news. In 1996, Grover introduced his quantum search algorithm, which further renewed the researchers’ interest in quantum computing. Almost 28 years later, we are at the stage where some companies have claimed quantum supremacy. Many researchers from academia and industry are working on quantum computing, and it now appears that quantum computing is at a stage where classical computing was in the 1960s. It will become mainstream in a decade or so in most large organizations, if not everywhere. Perhaps, quantum computers may not become a household reality soon. Still, one thing is clear; quantum computing is evolving rapidly and will start to impact (good or bad) quite soon on our daily lives.

Quantum computers use ideas from various fields, including computer science, engineering, quantum mechanics, physics, mathematics, and information theory. Several subjects have emerged from this, such as quantum information science and technology (QIST), a merger of quantum mechanics and information technology.

Quantum information science (QIS) is a subject at the intersection of computer science, information theory, and quantum mechanics. QIS changes how we fundamentally think about information processing and results in novel ways to solve previously unsolvable computationally complex problems. A quantum computer stores and processes data fundamentally differently from classical computing, where 0s and 1s are used to encode data. This difference in how the information is processed in quantum computers opens the door to achieving significant speedup to solve complex problems.

What Is a Quantum Computer?

A quantum computer is a device that makes use of properties of quantum mechanics to perform computations. Classical computers mimic calculations that humans can perform and are good at solving general day-to-day problems. However, many problems are still unsolvable on classical computers, called “intractable problems.” These problems include modelling of natural phenomena such as atomic particle behavior and modelling climate change and many others. A simple example of a complex problem could be when you organize ten people around a table for dinner. It turns out that there are 3,628,8001 ways to solve this. A brute-force way is to calculate factorial.

Another problem is the travelling salesman problem, which is an NP hard problem. This problem aims to find the shortest route for a round trip among multiple cities.

We can solve many complex problems on classical computers, and we have supercomputers available that can solve problems very fast, such as everyday math, algebra problems, etc. However, the intractable problems are not solvable on even modern supercomputers. This is where quantum computers come in. Especially in combinatorial optimization problems where even supercomputers fail, quantum computers provide a way to solve them.

Optimization problems are problems which try to find the best solution from all feasible solutions. Quantum computers are good at solving these types of problems where a large state space is explored.

Efficiently simulating molecules can help in new drug discovery. This problem of simulation of molecules is difficult because all variations in the way atoms behave with each other and even a small change in the way a single atom is positioned impact all other atoms. Such problems where exponentially many variations exist are expected to be solvable on quantum computers. Also, this information cannot be held on a classical computer, as we don’t have such amount of space available.

For example, a caffeine molecule is composed of 24 atoms, but representing that requires 10^48 bits, which makes this problem intractable on a classical computer; however, a quantum computer can handle this information in 160 qubits.

Route optimization of delivery companies is an exciting application where the aim is to find optimized routes in order to minimize fuel usage while still able to deliver a greater number of packages.

Quantum computing applications are vast, including but not limited to cryptography, machine learning, data analysis, computational biology, simulating chemistry, and quantum simulation.

An application in chemistry helps to discover new materials and compounds, new drugs, and improvements in fertilizer production, which leads to better agriculture. In cybersecurity, better and secure key generation and distribution mechanisms and novel cryptology (cryptography and cryptanalysis) can be realized. Optimization problems such as efficient route discovery, risk management in financial investments, and a lot more are expected to be solvable by Quantum computers.

Quantum computing has many applications and thus the excitement and race to achieve quantum supremacy. Quantum supremacy or quantum advantage is the empirical demonstration of solving a problem that no classical computer can solve in a reasonable amount of time.

There are several building blocks which are necessary to understand the quantum computing world. We describe them as follows:
  • Qubit

  • Superposition

  • Entanglement

  • Teleportation

Qubit

A classical computer works based on two distinct states, 0 and 1. Classical computers use transistors to create the absence or presence of an electric signal which represents 0 or 1, respectively. Fundamentally, it is all transistors, even in most modern supercomputers.

With qubits in quantum computers, this fundamental paradigm shifts, which leads to extraordinary speeds at which quantum computers can operate. A qubit is the state of physical atomic particles, for example, a spin on an electron. A qubit can be in a superposition of two states 0 and 1 simultaneously. The speedup rises exponentially as more qubits are added. Eight bits together in a classical computer are called a byte. In the quantum computing world, eight qubits together are called a qubyte.

Imagine 4 bits in a classical computer. These bits can have 16 possible states and can only be input sequentially. However, in a quantum computer, 4 qubits can be in a superposition of all 16 possible states and thus be input simultaneously Instead of the classical version, where 4 bits do have 16 possible states but can only be input sequentially. This phenomenon is called quantum parallelism and is the key to speeding up certain types of problems that are intractable on classical computers.

There are many ways to build a qubit physically. These techniques include trapped ions, photons, neutral atom, NMR, and several others.

Dirac notation is used to represent qubits. Qubits are represented as ∣0⟩ and ∣1⟩,as compared to classical 0 and 1. The difference is that a qubit can be in a linear combination of states called superpositions. A qubit can be a superposition of, for example, an electron with spin-up or spin-down or a photon with +45-degree polarization or –45-degree polarization and many other ways.

Dirac notation is used to represent quantum states and their superpositions. Dirac notation has the form ∣0⟩ +  ∣ 1⟩ where 0 and 1 are states.

A qubit can be in a quantum state ∣ψ⟩ = α ∣ 0⟩ + β ∣ 1⟩ where α, β ∈ C (complex amplitudes) and |α|2 + |β|2 = 1. This means that the state of a single qubit is represented by ∣ψ⟩ = α ∣ 0⟩ + β ∣ 1⟩, and the probability condition is |α|2 + |β|2 = 1. This probability condition means that the values that α, β can take are limited, and in any case, both must add to one. C represents complex numbers.

Other than Dirac notation, we can also use vector representations. A single vector can represent the state containing amplitudes α and β:
$$ mid psi Big
angle =left[ alpha eta kern0.5em 
ight] $$

and

∣0⟩ = [1 0 ] and ∣1⟩ = [0 1 ]

A qubit can be visualized using a Bloch sphere, as shown in Figure 9-1.

A Bloch sphere has a 3-D plane with origin at the center of the sphere. A line from the origin extends to psi. The marked angles are theta and phi.

Figure 9-1

The Bloch sphere – a convenient way to visualize qubits

We can describe a single qubit as a point on the surface of the Bloch sphere. The North pole represents state ∣0⟩, and the South pole represents state ∣1⟩. Qubit angles are θ the latitude and ϕ the longitude. When a single gate operation is performed on the qubit, the state ψ (the qubit) rotates to another point on the Bloch sphere.

Superposition

Superposition is a fundamental principle of quantum mechanics. Superposition means that quantum states can be added together to get another valid quantum state. This is analogous to classical mechanics, where waves can be added together. Added quantum states are so-called “superposed.” Superposition is the key to extraordinary speedup as it allows many computation paths to be explored simultaneously.

Entanglement

Entanglement is an incredibly strong correlation that exists between particles, which allows two or more particles to inseparably link with each other. It allows any two quantum particles to exist in a shared state. Any action on one particle instantly affects the other particle even at massive distances. Entanglement is usually performed by bringing two qubits close together, performing an operation to entangle them, and, once entangled, moving them apart again. They will remain entangled even if one of them is on earth and the other is moved to outer space at a vast distance.

There are two features of entanglement which makes it particularly suitable for a large range of applications: maximal coordination and monogamy.

Maximal Coordination

When two qubits at different nodes in a network entangle, that is, the quantum state of two particles become inseparably connected, they provide stronger correlation and coordination properties, which are nonexistent in classical networks. This property is called maximal coordination. For example, for any measurement on the first qubit, if the same measurement is made on the second qubit, instantaneously, the same answer is shown, even though that answer is random and was not predetermined. More precisely, they will always yield a zero or one at random, but both will produce the same output always. This feature makes entanglement suitable for tasks requiring coordination, for example, clock synchronization, leader election, and consensus. Imagine clock synchronization in a distributed network without physical transfer; it can make distributed networks extraordinarily fast. (Remember replacing communication with local computation from the last chapter.) Also, state transfer/awareness during consensus immediately makes consensus faster. The fundamental idea here is that when entangled, it is possible to change the state globally (full state) by only performing operations (changing parameters) in one qubit. This feature has far-reaching implications; imagine being able to do immediate state transfer to all nodes in the network. This can result in extraordinary speedup in consensus algorithms.

Monogamy

Quantum entanglement is not shareable. If two qubits are entangled, then a third qubit from anywhere in the universe can never entangle with either of them. This property is called monogamy of entanglement. This property can enable applications in privacy, cryptographic key generation, and identification.

Quantum Gates

Just like classical computing in the quantum world, we use gate operations for data processing. We are used to Boolean gates used in the classical world, such as NOT, AND, OR, XOR, NAND, and NOR. In the quantum world, we apply some operator to an input state which transforms into an output state. This operator is called a quantum gate. Quantum gates operate on a single qubit or multiple qubits. A rule here is that each gate must have the same number of inputs as outputs. This is what makes the gate reversible and consequently the quantum computers reversible. There are single qubit gates which make rotations on a Bloch sphere. Then there are two qubit gates which combine single gates to create more complex functions, which leads to building quantum computers.

There are many quantum gates; some common ones are introduced as follows.

Hadamard

This gate transforms a basis state into an even superposition of the two basis states. Fundamentally, it allows us to create superpositions. It operates on one qubit and is denoted by the symbol shown in Figure 9-2.

An illustration of the quantum gates includes the Hadamard gate, Z gate, C NOT gate, C C NOT gate, T gate, NOT gate, and swap gate.

Figure 9-2

Quantum gates

T

The T gate induces a pi/4 phase between contributing basis states. The symbol shown in Figure 9-2 represents the T gate. Relative phase rotation is by 45 degrees in T gate.

CNOT

This gate is called the controlled NOT. It is the same as the classical XOR gate, but with the property of reversibility. It works with two qubits. The first qubit serves as the control qubit, and the second qubit acts as the target qubit. It changes the state of the target qubit only if the first qubit is in a specific state. This gate can be used to create an entangled state in a two or more qubit system.

Toffoli (CCNOT)

This is the controlled-controlled NOT gate. It operates on three qubits. It switches the third bit of a three-bit state where the first two bits are 1, that is, it switches ∣110⟩ to ∣111⟩ and vice versa. It is represented by the symbol shown in Figure 9-2. In other words, if the first two bits are 1, the third bit inverts.

Z

It is a phase shift gate. It maps 1 to –1 and keeps 0 as 0. In other words, the amplitude of ∣1⟩ is negated. Fundamentally, it rotates the phase by 180 degrees. It is represented in the circuit with the symbol Z in a box, as shown in Figure 9-2.

NOT

This gate switches ∣1⟩ to ∣1⟩ and vice versa. It is an analogue of the classical NOT gate.

Swap Gate

The swap gate swaps two qubits. It can be visualized in Figure 9-2. Of course, there are many quantum gates, but we have introduced those which are commonly used and will help us to understand the algorithms later in this chapter.

All these gates can be visualized in Figure 9-2.

Measurement

In addition to gates, another important element is measurements. A measurement takes a quantum state and collapses it into one of the basis states. We can visualize this in Figure 9-3.

An illustration of the measurement. A quantum state enters measurement and a classical state is produced.

Figure 9-3

Measurement

Quantum Circuits

Using quantum gates, we build quantum circuits. A quantum circuit is basically a sequence of quantum operations applied to qubits. It is composed of quantum gates (operators), quantum registers containing qubits providing input, quantum wires representing a sequence of operations over time, and measurements. Time runs from left to right in quantum circuits. Figure 9-4 shows how a quantum circuit looks like.

A quantum circuit diagram includes 3 qubits q 0, q 1, and q 2, operations U 1 to U 3, 2 qubits operation U 4, U s, and a measurement.

Figure 9-4

A quantum circuit

Quantum gates are represented as boxes. On the left side, we have quantum registers. Quantum wires represent a qubit, that is, a photon or an electron. Each gate introduces a change in the qubit, for example, a change in the spin of an electron.

Quantum circuits implement quantum algorithms. In other words, quantum algorithms are described by quantum circuits. There are many standard quantum circuits. We describe some commonly used as follows.

Teleportation Circuit

Can we transfer a quantum state from one quantum device to another? Yes, we can; for this purpose, teleportation is used, which uses entanglement to move a quantum state from one quantum device to another.

In Figure 9-5, a teleportation circuit is shown, which can transport a quantum state from one party to another.

A teleportation circuit includes 3 qubits, 2 Hadamard gates, 3 C NOT gates, two measurements, and a controlled Z gate.

Figure 9-5

Teleportation circuit

Some applications of teleportation are state transportation between quantum systems. This can be valuable in quantum distributed systems where state transfer between nodes can enable applications like quantum state machine replication.

GHZ Circuit

The Greenberger-Horne-Zeilinger (GHZ) state is an entangled state of three or more qubits. If three or more particles get into an entangled state, it’s called a multipartite entanglement.

Figure 9-6 visualizes this circuit.

A G H Z circuit includes 3 qubits, a Hadamard gate, and 2 C NOT gates.

Figure 9-6

GHZ circuit

GHZ states have been shown to be useful in quantum cryptography and quantum Byzantine agreement (consensus) algorithms, as we’ll explore later in this chapter.

W State Circuit

The W state circuit is another way to achieve entanglement of three particles. The difference with GHZ is that in the W state if one qubit is lost out of three, then the remaining two will remain entangled. GHZ however does not have this property. The circuit is shown in Figure 9-7.

A W state circuit includes 3 qubits, an R y gate, a controlled Hadamard gate, two C NOT gates, and an x gate.

Figure 9-7

W state circuit

The W state circuit has application in leader election algorithms, as we’ll see later in this chapter.

Quantum Algorithms

As we know, algorithms are set of instructions to solve a problem. Quantum algorithms are the same in this regard; however, they run on quantum devices and contain at least one quantum operation, for example, superpositions or entanglement operations. In other words, a quantum algorithm is the same as the classical algorithm in the sense that it is a set of instructions to solve a problem, but it has instructions for creating superpositions and entanglements.

Famous quantum algorithms include the Deutsch-Jozsa blackbox solution algorithm, Shor’s discrete log problem and factorization algorithm, and Grover’s search algorithm. There is a catalogue maintained at the quantum algorithm zoo – https://quantumalgorithmzoo.org.

There are primarily three classes of quantum algorithms: quantum search algorithms, quantum Fourier transform–based algorithms, and quantum simulation algorithms.

Quantum Computational Complexity

In computer science, we are used to analyze algorithms to understand the resources required to run an algorithm. The analysis looks at algorithms from two angles, the time complexity of how many steps the algorithm will take to run and how much memory or “work space” it will consume. This is usually referred to as time and space complexity, respectively.

To describe and classify the time and space complexity of algorithms, the big O notation is used. Particularly, this classification is based on the study of how the time to run or space requirements of algorithms grow as the input size grows. A chart is presented in Figure 9-8, which gives a visual indication of how the problem class behaves from a complexity point of view.

A graph plots O 2 n exponential, O n cubed cubic, O n square quadratic, O n linear, O log n logarithmic, O under root n sublinear, and O 1 constant.

Figure 9-8

Big-O complexity chart

Common Big-O complexity orders are described in Table 9-1.
Table 9-1

Big-O complexity orders

Name

Big-O Notation

Examples

Constant time

O (1)

Find if a number is odd or even

Logarithmic

O (log n)

Binary search

Sublinear (square root)

O (√n)

 

Linear

O(n)

Linear search

Quadratic

O(n2)

Insertion sort

Cubic

O(n3)

Simple multiplication of n × n matrices

Exponential

O(2n)

Recursive Fibonacci

Algorithms are methods which contain a specific set of instructions to solve computational problems. Computation complexity is the study of categorization of different problems into suitable classes. Naturally, a need here arises to formally categorize the algorithms into different categories based on the computational resources required to solve a problem. For this purpose, complexity classes are considered.

With quantum computing, new complexity classes have also emerged. Quantum computers can solve NP hard problems, which classical computers cannot.

Several complexity classes exist; we describe them as follows.

P – Polynomial

A polynomial time class categorizes problems which are solvable in polynomial time, that is, a reasonable amount of time.

NP – Nondeterministic Polynomial

An NP class means that the solution to the problem can be checked quicker, that is, in polynomial time. One example of P is multiplication, whereas factorization is NP. For example, the multiplication of two numbers is in class P, whereas factoring (finding which two numbers were multiplied) is in class NP. However, if the solution is there, then it’s quick to verify the solution; hence, it is in the NP class.

NP-complete problems are those if they are in NP and all NP problems are “polynomial time” reducible to the NP problem under consideration. NP hard problems are those if we know that any NP problems are reducible to the possibly NP problem under consideration, but we do not know if the problem is in NP. In other words, NP-complete are those if any NP problem can be reduced to these problems, and NP hard means they’re reducible to NP but don’t know if they are in NP. One famous example of an NP-complete problem is the travelling salesman problem.

BPP – Bounded Error Probabilistic Polynomial Time

This class contains P. These problems are solvable in polynomial time with probability > ½. Problems in BPP are either solvable deterministically in polynomial time or probabilistically correctly more than one-thirds of the time.

BQP – Bounded Error Quantum Polynomial Time

This new class emerged with quantum computing. A problem is in BQP if it is solvable correctly on a quantum computer in polynomial time with probability > ½, that is, high probability. In other words, this class includes problems that are thought to be hard for classical computers, but easy for quantum computers.

Figure 9-9 shows complexity classes.

An illustration of complexity classes. From the innermost, the layers are N P complete, N P, P, B P P, B O P, and P space.

Figure 9-9

Complexity classes

PSPACE – Polynomial Space

This class is concerned with memory utilization, instead of time. Problems in PSPACE require a polynomial size of memory.

There is also a concept of hypercomputation that has come to limelight with quantum computing. The idea of hypercomputation is that it can even solve problems which are Turing incomplete, for example, the halting problem. It has, however, been shown that a quantum computer could be much faster than a classical one, but it cannot solve every problem that a classical computer cannot. The idea is that even on quantum computers, Turing-incomplete problems cannot be solved. However, research continues in this regard to study infinite state superposition and infinite state Turing machines which can lead to building hypercomputers.

With this we complete our discussion on complexity.

Other Quantum Systems

As quantum computing evolves, new systems utilizing quantum properties will emerge. We discuss them as follows.

Quantum Networks

Quantum networks are like classical networks with the same routing strategies and topologies. The key difference is that nodes can implement quantum computations and relevant quantum processes. Channels between quantum devices in a quantum network can be quantum or classical.

Quantum Internet

Just as the ARPANET from 1969 with just four nodes became the Internet of today with billions of entities2 on it, it is expected that small experimental scale quantum networks will become a quantum Internet of tomorrow.

It is envisioned that a quantum network infrastructure will be developed to interconnect remote quantum devices and enable quantum communication between them. The quantum Internet is governed by laws of quantum mechanics. It transfers qubits and distributes entangled quantum states. As the number of nodes grows in the quantum Internet, so does the quantum power. This is so because, as the number of qubits scales linearly with the number of quantum devices on the network, the quantum Internet could enable an exponential quantum speedup, resulting in a “virtual quantum computer” capable of solving previously impossible problems.

Traditional operations present in classical networks such as long-term data storage, data duplication (copying), and straightforward state reading are no longer applicable in quantum networks:
  • Long-term data storage is not possible because decoherence in the quantum world rapidly corrupts information, making it very difficult to rely on quantum memories/storage.

  • Data copying is not possible in the quantum world due to the no-cloning theorem which prohibits copying an unknown qubit. This means that usual mechanisms to improve resilience on the network, such as retransmission, are no longer applicable. However, note that the no-cloning theorem is a valuable property for secure communications.

  • Reading quantum states is challenging because when measured, any qubit immediately collapses to a classical single state of 0 or 1. Due to uncertainty associated with reading quantum states and the no-cloning theorem, direct transmission of qubits is only limited to very specific scenarios with short distances.

However, quantum teleportation can be used to transmit qubits. Quantum teleportation is realized using a quantum feature called entanglement, which we discussed earlier. Using entanglement, instantaneous transfer of the quantum state encoded in a qubit at a sender to a qubit stored at a receiver is possible. The surprising thing is that this transfer occurs without physical transfer of the qubit at the sender. Entanglement is the core enabler of the quantum Internet.

A quantum Internet enables several exotic applications such as blind computing, secure communications, and noiseless communications.

Quantum Distributed Systems – Distributed Quantum Computing

With the availability of the quantum Internet, it is not difficult to envisage that quantum nodes will also engage in communication with each other to cooperate and collectively solve some problem using the distributed computing approach. This development will inevitably lead to the emergence of distributed quantum systems or distributed quantum computing.

We can think of a layered approach where at the lowest layer we have a network layer composed of classical and quantum links. Then we have a layer of quantum computers running on the next layer. Next up are local and remote operations, which include local quantum operations and remote operations on qubits. By combining all operations and computing layers underneath, a virtual quantum computer can be imagined, which combines all the qubits and results in a scalable virtual quantum computer. A controller or distributed quantum compiler is then required to translate quantum algorithms into a sequence of local and remote operations. Finally, we have a layer on top which runs quantum algorithms. This layered approach can be visualized in Figure 9-10.

A blockchain ecosystem has 6 layers. Quantum algorithms, distributed compiler, virtual processors, operations, quantum computers, and networks.

Figure 9-10

An abstract quantum blockchain ecosystem

Quantum Blockchain

Inevitably with the quantum Internet and quantum distributed systems, we can envisage a quantum blockchain that utilizes quantum computers as nodes and the underlying quantum Internet as the communication layer.

There are two facets of blockchains in the quantum world. The first one is the pure quantum blockchains running on top of the quantum Internet. Some work has been done in this regard, and an innovative proposal by Rajan and Visser is to encode blockchains into a temporal GHZ state.

The other aspect is the existence of classical blockchains in the post-quantum world. Quantum computers can impact the security of blockchains and consensus adversely due to the ability to break classical cryptography. More on this later in this chapter in the last section.

A quantum blockchain can comprise several elements. The quantum blockchain can have both classical and quantum channels and devices. It can exist as a quantum algorithm, among others, in the “distributed quantum algorithm” layer in the distributed quantum computing ecosystem discussed in the previous section.

We elaborated a layered approach in the previous section. We can envisage blockchains and other algorithms running on the top layer. This whole layer approach represents quantum Internet–based distributed quantum computing ecosystem.

Another element could be a quantum transaction coordinator responsible for transaction ordering and dissemination. On the other hand, by using blind computing, quantum blockchains can immediately realize the unparalleled privacy which will enable quantum scale blockchain applications that require privacy, for example, finance, health, and government-related applications.

Quantum Cryptography

Quantum cryptography is indeed the most talked-about aspect of quantum computing, especially from the point of view of the impact that it can have on existing cryptography.

There are two dimensions here; one is quantum cryptography, and the other is post-quantum cryptography. Quantum cryptography refers to cryptography primitives or techniques that are based on properties of quantum mechanics. For example, quantum key distribution, quantum coin flipping, and quantum commitment. Using quantum properties, a new type of unconditionally secure mechanisms can be developed, which have no counterpart in the classical world. Quantum key distribution (QKD) protocols, such as BB84, were proposed by Bennett and Brassard in 1984, which allow two parties to construct private keys securely using qubits. The benefit of this quantum scheme is that due to superposition any adversary trying to eavesdrop will inevitably be detected.

The other dimension of the study of quantum cryptography is the impact of quantum computers on classical cryptography. We know that using Shor’s algorithm, the discrete log problem can be solved, and integer factorization can be sped up, which can result in breaking commonly used public key cryptography schemes, such as RSA and elliptic curve cryptography. Not so much impact is expected on symmetric cryptography because simply key lengths can be increased to ensure that exhaustive searches O(n) in the classic world and $$ Oleft(sqrt{n} 
ight) $$ using quantum techniques made possible by Grover’s algorithm or similar no longer are effective.

Several approaches have been studied for post-quantum cryptography, including lattice-based cryptography, code-based cryptography, multivariate cryptography, hash-based cryptography, and isogeny-based cryptography.

As blockchain consensus mechanisms use cryptography, which is known to be impacted by quantum computing, it is essential that the blocks produced today are quantum resistant so that when quantum computers can do so, they cannot rewrite the entire history of a blockchain. For example, Bitcoin uses the digital signature scheme ECDSA, which quantum computers can break. If quantum technology becomes capable of breaking ECDSA even in ten years, they can still move funds around due to broken ECDSA. Therefore, there is a need to address this issue and apply some quantum resistance to already produced and future blocks. If quantum technology becomes capable of breaking ECDSA in future, an adversary cannot rewrite the block history. Bitcoin generally is not quantum safe, and Lamport signatures have been proposed to alleviate this issue. Note that Bitcoin is secure for the foreseeable future, and the quantum computer required to break ECC is still decades away. To break the 256-bit ECC encryption within one hour, 317 × 106 physical qubits3 are required. However, currently the most qubits we have today are only 127 on IBM’s 127-qubit Eagle processor. So breaking elliptic curve cryptography is not going to be a reality any time soon.

So far, we have discussed what quantum computing is and what effect it can have on classical computing. We also covered some applications of quantum computing and relevant technical details such as gates and circuits. One thing is clear: quantum computing is going to revolutionize the world soon, and a tremendous effort is already being put into making the technology grow and become mainstream.

With all this revolutionary advancement in quantum computing, a natural question arises whether it is possible to harness this power and apply it to solve distributed computing problems, especially the consensus problem. Can we make consensus faster, can we circumvent FLP in some novel way, or does FLP even apply in the quantum world? Is there a quantum solution for the Byzantine generals problem? How can quantum computing help in distributed systems? Can it increase its efficiency? Can quantum consensus tolerate any number of dishonest parties, and no usual lower bounds apply? Can blockchains benefit from this advancement and improve blockchain consensus and other aspects of blockchains, such as cryptography, security, efficiency, and scalability? We answer these questions in the next section.

Quantum Consensus

Quantum consensus drives a quantum network with some qubits to a symmetric state. Also, with the advent of quantum computing, the problems from the classical computing world are being studied through the lens of quantum computing to see if there are any improvements that can be made to the existing algorithms from the classical world by harnessing the quantum power. One such problem is distributed consensus from the classical computing/networking world, which we have studied throughout this book. We’ll study the agreement/consensus in quantum distributed systems and the impact of quantum computing on classical distributed systems, especially consensus. It has been shown that the classical distributed consensus problem when studied under a quantum framework results in enhancing the classical results and can also solve problems which are otherwise unsolvable in classical networks.

Also, in quantum networks, reaching an agreement is required in many cases; thus, pure quantum consensus for quantum networks and quantum Internet is also an area of interest.

In this section, we’ll focus more on enhancement of classical results rather than pure quantum consensus where a quantum network with some qubits is brought to consensus, that is, in a symmetric state. Classical result enhancement is more relevant to our study of consensus in this book.

Quantum consensus algorithms are a very active area of research. There are four categories that have emerged in this context:
  • Symmetric state consensus

  • Entanglement-based consensus

  • Measurement-based consensus

  • Quantum key distribution (QKD)–based consensus

Symmetric state consensus refers to the convergence of arbitrary states of quantum nodes in a quantum network to a consensus symmetric state.

Entanglement-based consensus is more relevant to the classical consensus problem. This is so because classical consensus has been investigated through the lens of quantum computing. The key idea here is that quantum properties can enhance the classical consensus and can solve problems which were understood to be unsolvable in the classical consensus world.

Measurement-based consensus works on the premise that when a measurement is made on a quantum state, it collapses to a classical state, 0 or 1. Such a mechanism can be useful in quantum hybrid networks with quantum nodes but classical channels. The quantum state is kept in quantum computers, whereas the classical channels are used for communication to reach consensus. The aim is to allow convergence of quantum nodes to a common state in a hybrid quantum–classical network.

QKD-based consensus has been proposed to solve the Byzantine agreement problem between multiple nodes without entanglement. The unconditional security property of QKD is fundamental to this type of consensus.

Participants in a classical distributed system, including permissioned blockchains, are inherently slow to achieve consensus due to high time complexity incurred by the use of classical protocols like PBFT, three-phase commit, or Paxos. Usually, the time complexity of these consensus algorithms is O(n2), that is, quadratic. Is it possible to significantly reduce time complexity of classical distributed/blockchain consensus by using quantum computing? The short answer is yes. Ben-Or and Hassidim proposed a fast quantum Byzantine agreement which resolves consensus in O(1) time complexity.

In the next section, we introduce some consensus and agreement algorithms that have been introduced in the literature, which due to quantum properties significantly improve classical results or provide novel algorithms for consensus and relevant problems in the quantum world.

Fast Quantum Byzantine Agreement

Michael Ben-Or and Avinatan Hassidim introduced the fast quantum Byzantine agreement protocol which reaches an agreement in O(1) expected communication rounds. There are two results presented in the paper:
  • A quantum protocol for synchronous consensus which tolerates t<n/3 faults and acts in an expected constant number of rounds. The adversary is fail-stop, adaptive, full information, and computationally unbounded.

  • A quantum protocol for a synchronous Byzantine agreement tolerating t < n/3 faulty actors in an expected constant number of rounds. The adversary model is an adaptive, full information, and computationally unbounded adversary.

The system model comprises of n nodes, and each pair of nodes is connected through a separate two-way quantum channel. The protocol works in rounds, and each round has two phases. In the first phase, all processors send and receive messages, and the second phase is the computation phase where nodes do local computation to process received messages and decide what messages to send.

The protocol satisfies the following conditions:
  • Agreement: All nonfaulty processors decide on the same value with probability 1.

  • Validity: The decided value is the input value of all processors.

  • Termination: All nonfaulty processes decide on a value with probability 1.

Remember we discussed coin flip randomized protocols earlier in Chapter 6. Especially, we discussed Ben-Or’s algorithm where coin flipping was used to achieve an agreement. Fundamentally, the agreement problem is reduced to weak global coin flipping.

The idea in the quantum world is that instead of obtaining a weak global coin by classical means, we use quantum techniques to obtain a weak global coin. With this quantum technique, it is possible to tolerate Byzantine failures under synchrony if n > 3t in O(1) expected rounds. Consensus however is still impossible if n < 3t, but there’s an improvement of achieving O(1) rounds.

In an asynchronous model, a quantum algorithm exists if >3t; however, it is impossible if n < 3t.

The protocol for fail-stop faults works as described in the following:

(C represents a coin, L represents a leader, and the state is GHZ.)

GHZ state is $$ mid GHZleft
angle =frac{1}{surd 2}mid 000
ight
angle +frac{1}{surd 2}mid 111Big
angle $$

Each process Pi runs:

Round 1
  1. 1.
    Generate the state $$ mid {C}_ileft
angle =frac{1}{surd 2}mid 0,0,dots 0
ight
angle +frac{1}{surd 2}mid 1,1,dots 1Big
angle $$ on n qubit.
    1. a.

      Send the k th qubit to the k th player while keeping one part to yourself.

       
     
  2. 2.
    Generate the state $$ mid {L}_ileft
angle =frac{1}{n^3}{sum}_{a=1}^{n^3}mid a,a,dots a
ight
angle $$ on n qubits, an equal superposition of the numbers from 1 to n3/2.
    1. a.

      Distribute n qubits among all processes.

       
     
  3. 3.

    Receive the quantum message from all processes.

     
Round 2
  1. 4.

    Measure all Lj qubits received in round 1.

     
  2. 5.

    Select the process which has the highest leader value as the leader of the round.

     
  3. 6.

    Measure the leader’s coin in the standard base.

     
  4. 7.

    Obtain the measurement outcome of the leader’s coin which serves as the global coin.

     

Using this algorithm, a weak global coin is obtained. The probability for either common outcome is at least $$ frac{1}{3} $$ if 3t < n. The protocol works for crash faults.

Another protocol for Byzantine faults is presented in the paper, which can tolerate up to $$ t&lt;frac{n}{4} $$ faulty nodes under an asynchronous environment.

How to Refute FLP Impossibility

An interesting claim is made in [by Louie Helm] that distributed consensus can be achieved under asynchrony even in the presence of faults, which appears to contradict FLP impossibility.

Helm proposed a protocol for solving consensus using quantum techniques. At a high level, the protocol works as follows:
  • Entangled qubits are distributed to all nodes.

  • Each node measures its qubit(s).

  • Finally, due to measurement, the superposed quantum state will collapse, which leads to consensus.

This is so because the quantum entanglement here guarantees that entangled qubits collapse to the same state. This means that all nodes will end up with the same state, which means an agreement.

The GHZ state is used to realize this scheme. The key assumption made here is that each node receives a qubit during the setup phase and then later measures it, which results in the same collapsed state at all nodes.

The algorithm works as follows:
  1. 1.

    Prepare the GHZ state via entanglement of a set of n qubits.

     
  2. 2.

    Distribute a single qubit from the set of superposed qubits to each node in the network. This step distributes a shared state between all nodes.

     
  3. 3.

    Each node measures their qubit. Note there is no decision yet at this stage.

     
  4. 4.

    If qubit measurement is ∣0⟩, choose 0. Choose 1 if qubit measurement is ∣1⟩. This is where the quantum benefit is realized. When the measurement is made on a node, its quantum state will collapse to either ∣0⟩ or ∣1⟩, with equal probability. Also, with the first measurement on a node, the state of all other nodes will also collapse simultaneously and instantaneously to the exact same value as the first node that did the measurement. This is possible because of entanglement and thus strong correlation between qubits. Now as all nodes have the exact same value, this scheme achieves consensus.

     

An agreement is provided simply because measuring any single full entangled qubit in the GHZ state causes all other qubits in the same GHZ state to collapse to the same basis state. Validity is achieved because when the measurement is made on the first node, it’s effectively proposing either a ∣0⟩ or ∣1⟩.

This protocol can tolerate network delays because even if a qubit arrives late on a quantum node, the other nodes will keep working without any impact. When the late qubit arrives at any time, it will already contain the agreed-upon value, again due to entanglement. The fundamental reason why FLP can be refuted using this algorithm is because it requires one-way broadcast, and no classical response is required. Even if a single process does not measure its qubit, it will not impact the overall outcome of the computation, that is, even if that single measurement is not available, the other correct nodes will continue to operate even if one qubit is missing. This algorithm will work if the distribution of the original GHZ state completes successfully. Once that’s complete, missing measurements won’t impact the protocol from there onward. In case of Byzantine faults, the algorithm is also resilient. Any malicious party cannot tamper with the value the algorithm will eventually choose. This is so because any measurement does not impact the correlation of other qubits in the system. This means that any adversary measuring the qubits cannot impact the final chosen value. Due to the quantum nature, the qubit will always end up as 0 or 1. This always means that the decision will eventually be made regardless of Byzantine faults. This achieves termination.

Enhanced Distributed Consensus

Seet and Griffin proposed how quantum computing can speed up an agreement on a distributed network. They proposed a novel quantum consensus mechanism. The work presented in the paper focuses on the scalability and speed of distributed consensus.

By removing the need for multicast replies, the consensus speed and scalability is accomplished. Moreover, using quantum properties, it is ensured that only a single multicast is required. The key idea for achieving consensus is to aggregate the wave function of the received qubits (from other nodes) and local qubits of a quantum node.

The scheme works as follows:
  • The network is composed of quantum computers, communication channels, and classical computers. The channels can be quantum to quantum, classical-quantum, and between classical computers.

  • Each quantum computer is connected with a classical computer for storage and data retrieval.

  • A quantum computer creates an entangled qubit of each qubit.

  • Send the duplicates to other nodes in the system.

  • Consensus to be determined via the sum of each qubit wave function.

  • The qubits can be measured directly from within the quantum computer to calculate the wave function of each qubit. The idea revolves around the assumption that the wave function of each qubit should be similar to each other. Here, the expectation is that the values obtained should be consistent with each other.

  • Relying on the superposition, these wavelengths of qubits are a scalar multiple, that is, , where n is the number of nodes participating in consensus.

  • The technique here is to determine the difference between an ideal and actual system state wave function.

  • If all quantum nodes participating in the consensus have a consistent state, then a randomly selected result would be consistent with any other node’s state. This can be compared against the actual system state wave function.

  • If the same state exists on all quantum nodes, each individual node’s wave function is a scalar multiple of the system’s state wave function. The wave function then outputs zero.

  • In case of any different state on a node, then that node’s wave function will not be a scalar multiple of the entire system’s state function. So, the difference between the system state wave function and the node’s state wave function is not zero, indicating the discrepancy. The difference increases as the discrepancy between the node’s state and system state grows. The level of fault tolerance can be determined if the difference does not fall below a certain threshold. This could be a percentage of the total system, in line with classical BFT where roughly 33% of the nodes can be faulty in a network. It is possible to apply similar thresholds here too, though not proven.

  • The consensus algorithm multiplies a randomly chosen wave function with the number of nodes in the system.

  • It subtracts the sum of wave functions of each qubit in the system.

  • If all wave functions are the same, then the expected result is zero, indicating a coherent system. Otherwise, the system is not coherent. The larger the difference, the more incoherent the system is.

In the paper, this algorithm is expanded to a multiqubit system. Also, several improvements over the classical model are achieved such as reducing the time complexity of state verification by half. This is achieved by utilizing entanglement where the verifier only needs to receive the entangled qubit, after which verification can be done locally, by comparing the state of all qubits. This contrasts with a classical high complexity request-response style of message passing, which increases time and communication complexity. With quantum properties, this complexity is reduced, and consensus can be reached in half the time as compared to the classical consensus. Such efficiency gains can be utilized in blockchains to increase scalability. Moreover, any attempt of manipulation of the original and the sent state in isolation is immediately detectable due to entanglement, thus resulting in increased security of the system. The paper also proposes several scalability, privacy, and performance enhancements addressing the blockchain trilemma.

Quantum Leader Election and Consensus

Ellie D’Hondt and Prakash Panangaden presented a quantum solution for a totally correct leader election in quantum networks, which is considered difficult in the classical world.

For electing a leader using quantum properties, the use of the W state is proposed. In an anonymous network, if quantum nodes share the W state the leader election problem can be solved trivially.

Remember we discussed the W state earlier. For example, the entangled W state of three qubits is
$$ mid WBig
angle =frac{1}{sqrt{3}} left(001Big
angle +|010Big
angle +|100 Big
angle 
ight) $$
This is used as a symmetry breaking quantum resource. The quantum leader election algorithm for each process i then simply is
  1. 1.
    q = ith qubit from the entangled W-state i.e., from a quantum process i
     
  2. 2.
    initialize b = 0 and result = wait
     
  3. 3.
    b = measurement of q
     
  4. 4.
    if b = 1 then result = leader, else result = follower
     

This protocol has time complexity of O(1), that is, constant, and there is no message passing required. This is in complete contrast with the classical world where multiround protocols with higher complexity are usually common. This quantum protocol works in asynchronous networks too.

Also, a simple algorithm for consensus is presented. Leader election was based on symmetry breaking; however, this algorithm is dependent on symmetry preservation.

The idea is that to achieve totally correct anonymous quantum distributed consensus where each process has one qubit initially, the processors are required to be entangled in a GHZ state. It is shown that not only is it necessary but also a sufficient condition.

The core idea of the protocol is to share the GHZ entangled state between all nodes participating in the consensus. This allows to create symmetry in one step.

The GHZ state for three qubits is given as
$$ mid GHZBig
angle =frac{left(|000Big
angle +|111Big
angle 
ight)}{surd 2} $$
Each process i runs
q = ith qubit of GHZ state among n processes
result= wait
result = measure q

Again, this protocol has time complexity of O(1), and no message passing is needed. This protocol works under different communication topologies and under asynchrony.

The result in the paper shows that GHZ for consensus is necessary and sufficient. Moreover, W is necessary and sufficient for leader election.

Other Algorithms

There is a wide range of quantum consensus algorithms and relevant proposals. It’s not possible to cover them all here in detail; however, this section summarizes some of the prominent results.

Luca Mazzarella, Alain Sarlette, and Francesco Ticozzi in “Consensus for Quantum Networks: From Symmetry to Gossip Iterations” extend the classical distributed computing problem to networks of quantum systems. They proposed a general framework to study the consensus problem in the quantum world. Also, a quantum gossip–style algorithm is presented in the paper.

“Reaching Agreement in Quantum Hybrid Networks” is proposed by Guodong Shi, Bo Li, Zibo Miao, Peter M. Dower, and Matthew R. James. The problem considered in the paper is to drive a quantum hybrid network composed of quantum nodes holding qubits to a common state, thus achieving consensus. The key idea is that quantum nodes measure the qubits, and the results of the measurement are exchanged through classical communication links.

It has been shown that the classical Byzantine generals problem is unsolvable even if pairwise quantum channels are used. However, a variation of the Byzantine agreement problem called the detectable Byzantine agreement (DBA) can be solved by using quantum properties. The DBA protocol ensures that either all generals agree on an order or all abort, that is, the agreement property, and if all generals are loyal, they agree on an order, that is, validity.

“Multi-party Quantum Byzantine Agreement Without Entanglement” is proposed by Xin Sun, Piotr Kulicki, and Mirek Sopek. Usually, an entanglement property is used in the quantum consensus algorithm. But this algorithm is different where entanglement is not used. Instead, the protocol relies on quantum key distribution and its unconditional security. The protocol relies on sequences of correlated numbers shared between semihonest quantum key distributors.

There are other proposals where a concept of the quantum blockchain using temporal GHZ is introduced.

There are quite a few innovative results regarding quantum consensus, and researchers are presenting more and more developments. We introduced some of these results earlier. The quantum algorithms that can enhance classical distributed consensus results are of particular importance as they can impact classical distributed systems in the near future. Other pure quantum results are also fascinating but will be fully useful only in the future when quantum Internet and relevant quantum ecosystems become a reality.

Summary

As quantum computing is a vast and deep subject, we have not covered everything. Still, this chapter should give us a good understanding of quantum computing and how it can benefit distributed systems and consensus. Moore’s law has almost come to an end, so with quantum computing, we can reinvigorate it. In computer science, more complexity classes are emerging due to quantum computing. For physicists, the interest is to understand more about quantum theory.

This chapter gives us an intuition to think more deeply and prepare ourselves for further research and exploration. The main point to remember is that largely quantum consensus mechanisms exploit the quantum properties of superposition and entanglement.

In the next chapter, we conclude all ideas presented in this book and some exotic ideas and future research directions.

Bibliography

  1. 1.

    Rohde, P.P., 2021. The Quantum Internet: The Second Quantum Revolution. Cambridge University Press.

     
  2. 2.

    Cuomo, D., Caleffi, M., and Cacciapuoti, A.S., 2020. Towards a distributed quantum computing ecosystem. IET Quantum Communication, 1(1), pp. 3–8.

     
  3. 3.

    LaPierre, R., 2021. Quantum Gates. In Introduction to Quantum Computing (pp. 101–125). Springer, Cham.

     
  4. 4.

    National Academies of Sciences, Engineering, and Medicine, 2019. Quantum computing: progress and prospects. National Academies Press.

     
  5. 5.

    Marcozzi, M. and Mostarda, L., 2021. Quantum Consensus: an overview. arXiv preprint arXiv:2101.04192.

     
  6. 6.

    SEET, Jorden and GRIFFIN, Paul. Quantum consensus. (2019). 2019 IEEE Asia-Pacific Conference on Computer Science and Data Engineering (CSDE) 2019: December 9–11, Melbourne, Australia: Proceedings. 1-8. Research Collection School Of Computing and Information Systems.

     
  7. 7.

    Ben-Or, M. and Hassidim, A., 2005, May. Fast quantum Byzantine agreement. In Proceedings of the thirty-seventh annual ACM symposium on Theory of computing (pp. 481–485).

     
  8. 8.
     
  9. 9.

    Rajan, D. and Visser, M., 2019. Quantum blockchain using entanglement in time. Quantum Reports, 1(1), pp. 3–11.

     
  10. 10.

    Stinson, D.R., & Paterson, M.B. (2018). Cryptography: Theory and Practice (4th ed.). Chapman and Hall/CRC. https://doi.org/10.1201/9781315282497

     
  11. 11.

    Helm, L.K., 2008, August. Quantum distributed consensus. In PODC (p. 445).

     
  12. 12.
     
  13. 13.

    Lamport, L., 1979. Constructing digital signatures from a one way function. (Lamport signatures).

     
  14. 14.

    Pinski, Sebastian. (2011). Adiabatic Quantum Computing.

     
  15. 15.

    Mohr, A., 2014. Quantum computing in complexity theory and theory of computation. Carbondale, IL, 194.

     
  16. 16.

    Sun, X., Kulicki, P., and Sopek, M., 2020. Multi-party quantum Byzantine agreement without entanglement. Entropy, 22(10), p. 1152.

     
  17. 17.

    Fitzi, M., Gisin, N., and Maurer, U., 2001. Quantum solution to the Byzantine agreement problem. Physical Review Letters, 87(21), p. 217901.

     
  18. 18.

    Webber, M., Elfving, V., Weidt, S., and Hensinger, W.K., 2022. The impact of hardware specifications on reaching quantum advantage in the fault tolerant regime. AVS Quantum Science, 4(1), p. 013801.

     
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.49