# The Weird World of Quantum Computing: Part 1

## Quantum computing is revolutionising the way we think about data and computation.

In the first of two articles on quantum computing, we introduce key concepts to demonstrate the differences between classical and quantum computing and explain why the latter can perform much faster.

In the second article, we will explore which types of actuarial calculations could be completed faster on quantum computers than classical ones; talk about the implications of quantum computing for cybersecurity; and look at competing approaches to building a working quantum computer.

**Classical computing**

In classical computing – which actuaries are familiar with – information (e.g., a number or letter) is represented by bits which have the value 0 or 1. A modern PC uses 64 bits in parallel. The bits are manipulated by logic gates to perform calculations. The gates are boolean operators, e.g., AND, OR and NOT, and the manipulations are performed sequentially, thousands of millions of times a second. The computer is built using billions of transistors and other components fabricated on small semiconductor chips.** **

**Qubits and superposition**

In quantum computers, information is represented by qubits that are quantum states of a system that can have two values. Common examples are electrons, which have spin -1/2 (down) or +1/2 (up), and photons, which have either vertical (V) or horizontal (H) polarisation.

The electron’s state | ψ > can be represented mathematically as the linear combination of the down and up states as follows:

| ψ > = α | ↓ > + β | ↑ >

where α and β are complex numbers and |α|^{2} + |β|^{2} = 1.

This linear combination is known as a superposition of the two states. In some sense, the electron is simultaneously in the down and up states. However, when we measure which state the electron is in, we will either get the answer down with probability |α|^{2} or up with probability |β|^{2}.

This is the same as the famous Schrödinger’s Cat thought experiment where in some sense the cat in the box is simultaneously alive and dead but, when we open the box to take a look, the cat must be *either* alive *or* dead. Schrödinger originally developed the thought experiment to show that the standard, or Copenhagen, interpretation of quantum mechanics led to an absurd result, but it is now used to illustrate that quantum systems behave in very different ways to classical ones.

**Quantum entanglement**

A second counterintuitive aspect of quantum systems called entanglement is also a feature of quantum computers. We can illustrate entanglement using the following example:

Suppose we have a neutral, spinless elementary particle – say a pion – which is stationary, and that the pion decays into an electron and positron. The electron and positron will fly away from each other in opposing directions.

The electron and positron both have spin. To conserve angular momentum, one must have spin down and the other spin up so that the combined system has zero spin like the pion before it decayed. If we measure the spin of the electron and find it is down and then immediately measure the spin of the positron, it must be up, and vice versa. In other words, the electron and positron are entangled.

But how can this happen when the electron and positron are now far away from each other – too far for a signal travelling at the speed of light to be exchanged by the two particles in between the two measurements?

Einstein didn’t like this at all – he called it “spooky action at a distance” – and argued that the spin states of the electron and positron must be determined at the time of the decay by so-called “hidden variables”.

Unfortunately for Einstein, experiments have shown that quantum entanglement is real and hidden variables do not exist. Entanglement is important because it allows quantum computers to manipulate many qubits in a single operation rather than manipulating each qubit individually as happens with bits in classical computing.

**No cloning theorum**

A third important aspect of quantum computing is that it can be shown that it is impossible to make an independent and identical copy of a qubit unless its state is already known. This is quite different to classical computing where it is common to create identical copies of bits, e.g., the intermediate result of a calculation. No cloning has important implications for error correction in quantum computing, which we will discuss in the second article.

**Quantum gates**

Qubits are manipulated using quantum gates – such as the controlled NOT (CNOT), Hadamard (H), and Toffoli (CCNOT) gates – which are analogous to classical gates. For example, the Hadamard gate manipulates a qubit in a known down or up state into a superposition which is equally up and down:

i.e., if we measure the known down or up qubit after it has passed through the Hadamard gate, the result will be down half the time and up half the time.

However, there are two key differences between classical and quantum gates. First, quantum gates are reversible which means that we can deduce the input from the output. Some classical gates such as NOT are reversible (if we know the output is 1 then the input is 0 and vice versa) but others, such as AND, are not (if we know the output is 0, we have no way of knowing if the input was 00, 01 or 10). Reversing the calculation helps with error correction and optimising calculation efficiency.

The second difference is that the operation of certain gates can lead to entanglement of the output qubits speeding up the computation.

**Why should quantum computers be faster than classical computers?**

The properties of qubits – superposition and entanglement – allow calculations to be made in parallel speeding them up, referred to as quantum parallelism. Classical computing can also be in parallel, e.g., modern processors have multiple cores and, in the 1980s and 1990s, arrays of processors became popular for simulations in fields such as meteorology and particle physics.

However, there is a key difference. With classical computing, increasing the parallelism requires increasing the number of processors; in quantum computing, it does not. Therefore, if the challenges associated with building scaleable quantum computers can be overcome, they will exponentially speed up certain types of calculation as we shall see in our second article.

CPD: Actuaries Institute Members can claim two CPD points for every hour of reading articles on Actuaries Digital.