# Chapter 1 Quantum interference

About complex numbers, called

probability amplitudes, that, unlike probabilities, can cancel each other out, leading toquantum interference, and consequently qualitatively new ways of processing information.

The classical theory of computation does not usually refer to physics.
Pioneers such as Alan Turing, Alonzo Church, Emil Post, and Kurt Gödel managed to capture the correct classical theory by intuition alone and, as a result, it is often falsely assumed that its foundations are self-evident and purely abstract.
They are not!^{7}

The concepts of information and computation can be properly formulated only in the context of a physical theory — information is stored, transmitted and processed always by *physical* means.
Computers are physical objects and computation is a physical process.
Indeed, any computation, classical or quantum, can be viewed in terms of physical experiments, which produce **outputs** that depend on initial preparations called **inputs**.
Once we abandon the classical view of computation as a purely logical notion independent of the laws of physics it becomes clear that whenever we improve our knowledge about physical reality, we may also gain new means of computation.
Thus, from this perspective, it is not very surprising that the discovery of quantum mechanics in particular has changed our understanding of the nature of computation.
In order to explain what makes quantum computers so different from their classical counterparts, we begin with the rudiments of quantum theory.

Some of what we say in this chapter will be repeated in later chapters, but usually in much more detail. Feel free to think of this chapter as a sort of “aeroplane tour” of the rudiments, knowing that we will soon land on the ground to go out exploring by foot.

## 1.1 Two basic rules

Quantum theory, at least at some instrumental level, can be viewed as a modification of probability theory.
We replace positive numbers (probabilities) with complex numbers **probability amplitudes**) such that the squares of their absolute values,

The correspondence between probability amplitudes **Born’s Rule**.

The rules for combining amplitudes are very reminiscent of the rules for combining probabilities:

- Whenever something can happen in a sequence of independent steps, we multiply the amplitudes of each step.

- Whenever something can happen in several alternative ways, we add the amplitudes for each separate way.

That’s it!
These two rules are basically all you need to manipulate amplitudes in any physical process, no matter how complicated.^{8}
They are universal and apply to any physical system, from elementary particles through atoms and molecules to white dwarfs stars.
They also apply to information, since, as we have already emphasised, information is physical.
The two rules look deceptively simple but, as you will see in a moment, their consequences are anything but trivial.

## 1.2 Quantum interference: the failure of probability theory

Modern mathematical probability theory is based on three axioms, proposed by Andrey Nikolaevich Kolmogorov (1903–1987) in his monograph with the impressive German title *Grundbegriffe der Wahrscheinlichkeitsrechnung* (“Foundations of Probability Theory”).
The **Kolmogorov axioms** are simple and intuitive:^{9}

- Once you identify all elementary outcomes, or events, you may then assign probabilities to them.
- Probability is a number between
0 and1 , and an event which is certain has probability1 . - Last but not least, the probability of any event can be calculated using a deceptively simple rule — the
**additivity axiom**:*Whenever an event can occur in several mutually exclusive ways, the probability for the event is the sum of the probabilities for each way considered separately.*

Obvious, isn’t it? So obvious, in fact, that probability theory was accepted as a mathematical framework theory, a language that can be used to describe actual physical phenomena. Physics should be able to identify elementary events and assign numerical probabilities to them. Once this is done we may revert to mathematical formalism of probability theory. The Kolmogorov axioms will take care of the mathematical consistency and will guide us whenever there is a need to calculate probabilities of more complex events. This is a very sensible approach, apart from the fact that it does not always work! Today, we know that probability theory, as ubiquitous as it is, fails to describe many common quantum phenomena. In order to see the need for quantum theory let us consider a simple experiment in which probability theory fails to give the right predictions.

### 1.2.1 The double slit experiment

In a double slit experiment, a particle emitted from a source

The particle emitted from a source

Following the “quantum rules”, first we add the amplitudes and then we square the absolute value of the sum to get the probability.
Thus, the particle will reach the detector with probability
*modified* by the **interference term** **relative phase** **destructive** interference) or positive (**constructive** interference), leading to either suppression or enhancement of the total probability

The algebra is simple; our focus is on the physical interpretation.
Firstly, note that the important quantity here is the *relative* phase *either* through the upper or the lower slit, because it has travelled through *both*.
In the same way, quantum computers follow, in some tangible way, *all* computational paths simultaneously, producing answers that depend on *all* these alternative calculations.
Weird, but this is how it is!

Secondly, what has happened to the additivity axiom in probability theory?
What was wrong with it?
One problem is the assumption that the processes of taking the upper or the lower slit are mutually exclusive; in reality, as we have just mentioned, the two transitions *both occur*, simultaneously.
However, we cannot learn this from probability theory, nor from any other *a priori* mathematical construct.^{10}

There is no fundamental reason why Nature should conform to the additivity axiom.

We find out how nature works by making intelligent guesses, running experiments, checking what happens and formulating physical theories.
If our guess disagrees with experiments then it is wrong, so we try another intelligent guess, and another, etc.
Right now, quantum theory is the best guess we have: it offers good explanations and predictions that have not been falsified by any of the existing experiments.
This said, rest assured that one day quantum theory *will* be falsified, and then we will have to start guessing all over again.

## 1.3 Superpositions

Amplitudes are more than just tools for calculating probabilities: they tell us something about physical reality.
When we deal with probabilities, we may think about them as numbers that quantify our lack of knowledge.
Indeed, when we say that a particle goes through the upper or the lower slit with some respective probabilities, it does go through one of the two slits, we just do not know which one.
In contrast, according to quantum theory, a particle that goes through the upper and the lower slit with certain amplitudes does explore *both* of the two paths, not just one of them.
This is a statement about a real physical situation — about something that is out there and something we can experiment with.

The assumption that the particle goes through one of the two slits, but just that we do not know which one, is inconsistent with *many* experimental observations.

We have to accept that, apart from some easy to visualise states, known as the **basis states**, (such as the particle at the upper slit or the particle at the lower slit), there are infinitely many other states, all of them equally real, in which the particle is in a **superposition** of the two basis states.
This rather bizarre picture of reality is the best we have at the moment, and it works, at least for now.

Physicists write such superposition states as^{11}
*physical meaning* of the basis states.
Here, we use the

## 1.4 Interferometers

Many modern interference experiments are performed using internal degrees of freedom of atoms and ions.
For example, **Ramsey interferometry**, named after American physicist Norman Ramsey, is a generic name for an interference experiment in which atoms are sent through two separate resonant interaction zones, known as **Ramsey zones**, separated by an intermediate dispersive interaction zone.

Many beautiful experiments of this type were carried out in the 1990s in Serge Haroche’s lab at the Ecole Normale Supérieure in Paris.
Rubidium atoms were sent through two separate interaction zones (resonant interaction in the first and the third cavity) separated by a phase inducing dispersive interaction zone (the central cavity).
The atoms were subsequently measured, via a selective ionisation, and found to be in one of the two preselected energy states, here labeled as

The three rectangular boxes in Figure 1.1 represent three cavities, each cavity being an arrangement of mirrors which traps electromagnetic field (think about standing waves in between two mirrors).
The oval shapes represent rubidium atoms with two preselected energy states labelled as

We can understand this interference better if we follow the two internal states of the atom as it moves through the three cavities.

Suppose we are interested in the probability that the atom, initially in state ^{12}

The effect of each interaction on atomic states can be described by a matrix of transition amplitudes, as illustrated in Figure 1.3.
Then a sequence of independent interactions is described by the product of these matrices.

In general, quantum operation

## 1.5 Qubits, gates, and circuits

Atoms, trapped ions, molecules, nuclear spins and many other quantum objects with two pre-selected basis states labeled as **qubits**) can be used to implement simple quantum interference.
There is no need to learn about physics behind these diverse technologies if all you want is to understand the basics of quantum theory.
We may now conveniently forget about any specific experimental realisation of a qubit and represent a generic **single qubit interference** graphically as a **circuit diagram**:^{13}

This diagram should be read from left to right.
The horizontal line represents a qubit that is inertly carried from one quantum operation to another. We often call this line a **quantum wire**.
The wire may describe translation in space (e.g. atoms travelling through cavities) or translation in time (e.g. a sequence of operations performed on a trapped ion).
The boxes or circles on the wire represent elementary quantum operations, called **quantum logic gates**.
Here we have two types of gates: two Hadamard gates ^{14}

The input qubits appear as state vectors on the left side of circuit diagrams, and the output qubits as state vectors on the right.
The product of the three matrices ^{15}:

## 1.6 Quantum decoherence

We do need quantum theory to describe many physical phenomena, but, at the same time, there are many other phenomena where the classical theory of probability works pretty well.
We hardly see quantum interference on a daily basis.
Why?
The answer is **decoherence**.
The addition of probability amplitudes, rather than probabilities, applies to physical systems which are completely isolated.
However, it is almost impossible to isolate a complex quantum system, such as a quantum computer, from the rest of the world.
There will always be spurious interactions with the environment, and when we add amplitudes, we have to take into account not only different configurations of the physical system at hand, but also different configurations of the environment.

For example, consider an isolated system composed of a quantum computer and its environment.
The computer is prepared in some input state

*The computer is isolated and quantum computation does not affect the environment.*The computer and the environment evolve independently from each other and, as a result, the environment does not hold any physical record of how the computer reached outputO . In this case we add the amplitudes for each of the two alternative computational paths.

*Quantum computation affects the environment.*The environment now holds a physical record of how the computer reached outputO , which results in two final states of the composed system (computer + environment) which we denoteO_1 andO_2 . We add the probabilities for each of the two alternative computational paths.

When quantum computation affects the environment, we have to include the environment in our analysis for it now takes part in the computation.
Depending on which computational path was taken, the environment may end up in two distinct states.
The computer itself may show output **visibility** of the interference pattern, ranges from

We shall derive this formula later on, and you will see that

Decoherence suppresses quantum interference.

Decoherence is chiefly responsible for our classical description of the world — without interference terms we may as well add probabilities instead of amplitudes. While decoherence is a serious impediment to building quantum computers, depriving us of the power of quantum interference, it is not all doom and gloom: there are clever ways around decoherence, such as quantum error correction and fault-tolerant methods we will meet later.

## 1.7 Computation: deterministic, probabilistic, and quantum

Take one physical bit or a qubit.
It has two logical states: ** \texttt{INPUT}**, into some final configuration, called

**. We shall refer to the configurations as**\texttt{OUTPUT}

**states**. Figure 1.4 shows five consecutive computational steps performed on four distinct states.

That computation was **deterministic**: every time you run it with the same input, you get the same output.
But a computation does not have to be deterministic — we can augment a computing machine by allowing it to “toss an unbiased coin” and to choose its steps randomly.
It can then be viewed as a directed^{16} tree-like graph where each node corresponds to a state of the machine, and each edge represents one step of the computation, as shown in Figure 1.5

The computation starts from some initial state (

For quantum computations, we associate with each edge in the graph the probability *amplitude* that the computation follows that edge.
The probability amplitude of a particular path to be followed is the product of amplitudes pertaining to transitions in each step.
The probability amplitude of a particular final state being reached is equal to the sum of the amplitudes along all mutually exclusive paths which connect the initial state with that particular state:

Quantum computation can be viewed as a complex multi-particle quantum interference involving many computational paths through a computing device. The art of quantum computation is to shape quantum interference, through a sequence of computational steps, enhancing probabilities of correct outputs and suppressing probabilities of the wrong ones.

## 1.8 Computational complexity

Is there a compelling reason why we should care about quantum computation?
It may sound like an extravagant way to compute something that can be computed anyway.
Indeed, your standard laptop, given enough time and memory, can simulate pretty much any physical process.
In principle, it can also simulate any quantum interference and compute everything that quantum computers can compute.
The snag is, this simulation, in general, is very inefficient.
And efficiency does matter, especially if you have to wait more than the age of the Universe for your laptop to stop and deliver an answer!^{17}

In order to solve a particular problem, computers (classical or quantum) follow a precise set of instructions called an **algorithm**.
Computer scientists quantify the efficiency of an algorithm according to how rapidly its running time, or the use of memory, increases when it is given ever larger inputs to work on.
An algorithm is said to be **efficient** if the number of elementary operations taken to execute it increases no faster than a polynomial function of the size of the input.^{18}
We take the input size to be the total number of binary digits (bits) needed to specify the input.
For example, using the algorithm taught in elementary school, one can multiply two

The class of problems that can be solved by a deterministic computer in polynomial time is represented by the capital letter *polynomial* time.
The class of problems that can be solved in polynomial time by a probabilistic computer is called *bounded-error probabilistic polynomial* time.
It is clear that *bounded-error quantum polynomial*, is the class of problems that can be solved in polynomial time by a quantum computer.

Since a quantum computer can easily generate random bits and simulate a probabilistic classical computer,

A quantum algorithm, discovered by Peter Shor in 1994, can factor ^{19}
Since the intractability of factorisation underpins the security of many methods of encryption, Shor’s algorithm was soon hailed as the first `killer application’ for quantum computation: something very useful that only a quantum computer could do.
Since then, the hunt has been on for interesting things for quantum computers to do, and at the same time, for the scientific and technological advances that could allow us to build quantum computers.

## 1.9 Outlook

When the physics of computation was first investigated, starting in the 1960s, one of the main motivations was a fear that quantum-mechanical effects might place fundamental bounds on the accuracy with which physical objects could render the properties of the abstract entities, such as logical variables and operations, that appear in the theory of computation. It turned out, however, that quantum mechanics itself imposes no significant limits, but does break through some of those that classical physics imposed. The quantum world has a richness and intricacy that allows new practical technologies, and new kinds of knowledge. In this course we will merely scratch the surface of the rapidly developing field of quantum computation. We will concentrate mostly on the fundamental issues and skip many experimental details. However, it should be mentioned that quantum computing is a serious possibility for future generations of computing devices. At present it is not clear how and when fully-fledged quantum computers will eventually be built; but this notwithstanding, the quantum theory of computation already plays a much more fundamental role in the scheme of things than its classical predecessor did. I believe that anyone who seeks a fundamental understanding of either physics, computation or logic must incorporate its new insights into their world view.

## 1.10 *Remarks and exercises*

### 1.10.1 A historical remark

Back in 1926, Max Born simply postulated the connection between amplitudes and probabilities, but did not get it quite right on his first attempt.
In the original paper^{20} proposing the probability interpretation of the state vector (wavefunction) he wrote:

… If one translates this result into terms of particles only one interpretation is possible.

\Theta_{\eta,\tau,m}(\alpha,\beta,\gamma) [the wavefunction for the particular problem he is considering] gives the probability^* for the electron arriving from thez direction to be thrown out into the direction designated by the angles\alpha,\beta,\gamma …

^* Addition in proof: More careful considerations show that the probability is proportional to the square of the quantity\Theta_{\eta,\tau,m}(\alpha,\beta,\gamma) .

### 1.10.2 Modifying the Born rule

Suppose that we modified the Born rule, so that probabilities were given by the absolute values of amplitudes *raised to power p* (for some

Recall that the *only* isometries, except for *one* special case!
For *see* this result.

In particular, the image of the unit sphere must be preserved under probability preserving operations.
As we can see in Figure 1.7, the

### 1.10.3 Complex numbers

Complex numbers have many applications in physics, however, not until the advent of quantum theory was their ubiquitous and fundamental role in the description of the actual physical world so evident. Even today, their profound link with probabilities appears to be a rather mysterious connection. Mathematically speaking, the set of complex numbers is a field. This is an important algebraic structure used in almost all branches of mathematics. You do not have to know much about algebraic fields to follow these lectures, but still, you should know the basics. Look them up.

- The set of rational numbers and the set of real numbers are both fields, but the set of integers is not. Why?
- What does it mean to say that the field of complex numbers is
**algebraically closed**? - Evaluate each of the following quantities:
1+e^{-i\pi}, \quad |1+i|, \quad (1+i)^{42}, \quad \sqrt{i}, \quad 2^i, \quad i^i. - Here is a simple proof that
+1=-1 :1=\sqrt{1}=\sqrt{(-1)(-1)}=\sqrt{-1}\sqrt{-1}=i^2=-1. What is wrong with it?

### 1.10.4 Many computational paths

A quantum computer starts calculations in some initial state, then follows ^{21}

### 1.10.5 Distant photon emitters

Imagine two distant stars, A and B, that emit *identical* photons.
If you point a single detector towards them you will register a click every now and then, but you never know which star the photon came from.
Now prepare two detectors and point them towards the stars.
Assume the photons arrive with the probability amplitudes specified in Figure 1.8.
Every now and then you will register a coincidence: the two detectors will fire.

- Calculate the probability of a coincidence.
- Now, assume that
z\approx \frac{1}{r}e^{i\frac{2r\pi}{\lambda}} , wherer is the distance between detectors and the stars. How can we use this to measurer ?

### 1.10.6 Physics against logic?

Now that we have poked our heads into the quantum world, let us see how quantum interference challenges conventional logic and leads to qualitatively different computations.
Consider the following task (which we will return to a few more times in later chapters): design a logic gate that operates on a single bit such that, when it is followed by another, identical, logic gate, the output is *always* the negation of the input.
Let us call this logic gate **the square root of \texttt{NOT}**, or

Figure 1.9 shows a simple computation, two identical computational steps performed on two states labelled as

Write a

### 1.10.7 Quantum bomb tester

You have been drafted by the government to help in the demining effort in a former war-zone.^{22}
In particular, retreating forces have left very sensitive bombs in some of the sealed rooms.
The bombs are configured such that if even one photon of light is absorbed by the fuse (i.e. if someone looks into the room), the bomb will go off.
Each room has an input and output port which can be hooked up to external devices.
An empty room will let light go from the input to the output ports unaffected, whilst a room with a bomb will explode if light is shone into the input port and the bomb absorbs even just one photon — see Figure 1.10.

Your task is to find a way of determining whether a room has a bomb in it without blowing it up, so that specialised (limited and expensive) equipment can be devoted to defusing that particular room. You would like to know with certainty whether a particular room had a bomb in it.

- To start with, consider the setup in Figure 1.11, where the input and output ports are hooked up in the lower arm of a Mach–Zehnder interferometer.
^{23}- Assume an empty room.
Send a photon to input port
|0\rangle . Which detector, at the output port, will register the photon? - Now assume that the room does contain a bomb.
Again, send a photon to input port
|0\rangle . Which detector will register the photon and with which probability? - Design a scheme that allows you — at least some of the time — to decide whether a room has a bomb in it without blowing it up. If you iterate the procedure, what is its overall success rate for the detection of a bomb without blowing it up?

- Assume an empty room.
Send a photon to input port

Assume that the two beam splitters in the interferometer are different. Say the first beam-splitter reflects incoming light with probability

r and transmits with probabilityt=1-r , and the second one transmits with probabilityr and reflects with probabilityt . Would the new setup improve the overall success rate of the detection of a bomb without blowing it up?There exists a scheme, involving many beam-splitters and something called the

**quantum Zeno effect**, such that the success rate for detecting a bomb without blowing it up approaches 100%. Try to work it out, or find a solution on the internet.

### 1.10.8 More time, more memory

A quantum machine has

Suppose you are using your laptop to add together amplitudes pertaining to each of the paths.
As

### 1.10.9 Quantum Turing machines

The classical theory of computation is essentially the theory of the universal Turing machine — the most popular mathematical model of classical computation. Its significance relies on the fact that, given a large but finite amount of time, the universal Turing machine is capable of any computation that can be done by any modern classical digital computer, no matter how powerful. The concept of Turing machines may be modified to incorporate quantum computation, but we will not follow this path. It is much easier to explain the essence of quantum computation talking about quantum logic gates and quantum Boolean networks or circuits. The two approaches are computationally equivalent, even though certain theoretical concepts, e.g. in computational complexity, are easier to formulate precisely using the Turing machine model. The main advantage of quantum circuits is that they relate far more directly to proposed experimental realisations of quantum computation.

### 1.10.10 Polynomial = good; exponential = bad

In computational complexity the basic distinction is between polynomial and exponential algorithms.
Polynomial growth is good and exponential growth is bad, especially if you have to pay for it.
There is an old story about the legendary inventor of chess who asked the Persian king to be paid only by a grain of cereal, doubled on each of the 64 squares of a chess board.
The king placed one grain of rice on the first square, two on the second, four on the third, and he was supposed to keep on doubling until the board was full.
The last square would then have ^{24}
The moral of the story: if whatever you do requires an exponential use of resources, you are in trouble.

### 1.10.11 Big O

In order to make qualitative distinctions between how different functions grow we will often use the asymptotic big-^{25} which means that

When we say that

f(n)=O(\log n) , why don’t we have to specify the base of the logarithm?Let

f(n)=5n^3+1000n+50 . Isf(n)=O(n^3) , orO(n^4) , or both?Which of the following statements are true?

n^k=O(2^n) for any constantk n!=O(n^n) - if
f_1=O(g) andf_2=O(g) , thenf_1+f_2=O(g) .

### 1.10.12 Imperfect prime tester

There exists a randomised algorithm which tests whether a given number ^{26}
The algorithm always returns

### 1.10.13 Imperfect decision maker

Suppose a randomised algorithm solves a decision problem, returning ^{27}.
If we are willing to accept a probability of error no larger than

- If we perform this computation
r times, how many possible sequences of outcomes are there? - Give a bound on the probability of any particular sequence with
w wrong answers. - If we look at the set of
r outcomes, we will determine the final outcome by performing a majority vote. This can only go wrong ifw>r/2 . Give an upper bound on the probability of any single sequence that would lead us to the wrong conclusion. - Using the bound
1-x\leqslant e^{-x} , conclude that the probability of our coming to the wrong conclusion is upper bounded bye^{-2r\delta^2} .

Computation is a physical process. Computation is a physical process. Computation is …↩︎

We will, however, amend the two rules later on when we touch upon particle statistics.↩︎

I always found it an interesting coincidence that the two basic ingredients of modern quantum theory, namely probability and complex numbers, were discovered by the same person, an extraordinary man of many talents: a gambling scholar by the name of Girolamo Cardano (1501–1576).↩︎

According to the philosopher Karl Popper (1902–1994) a theory is genuinely scientific only if it is possible, in principle, to establish that it is false. Genuinely scientific theories are never finally confirmed because no matter how many confirming observations have been made observations that are inconsistent with the empirical predictions of the theory are always possible.↩︎

Dirac notation will likely be familiar to physicists, but may look odd to mathematicians or computer scientists. Love it or hate it (and I suggest the former), the notation is so common that you simply have no choice but to learn it, especially if you want to study anything related to quantum theory.↩︎

From the classical probability theory perspective the resonant interaction induces a random switch between

|0\rangle and|1\rangle (why?) and the dispersive interaction has no effect on these two states (why?). Hence, one random switch followed by another random switch gives exactly a single random switch, which gives\frac12 for the probability that input|0\rangle becomes output|1\rangle .↩︎Do not confuse the interference diagrams of Figure 1.1 and Figure 1.3 with the circuit diagram. In the circuit diagrams, which we will use a lot from now on, a single qubit is represented by a single line.↩︎

Global phase factors are irrelevant, it is the relative phase

\varphi =\varphi_1-\varphi_0 that matters. In a single qubit phase gate we usually factor oute^{i\varphi_0} , which leaves us with the two diagonal entries:1 ande^{i\varphi} .↩︎HP_\varphi H =\begin{bmatrix}\cos\frac{\varphi}{2} & -i\sin\frac{\varphi}{2}\\\ -i\sin\frac{\varphi}{2}& \cos\frac{\varphi}{2}\end{bmatrix} ↩︎So we read left to right, and omit the arrowheads.↩︎

The age of the Universe is currently estimated at 13.772 billion years.↩︎

Note that the technological progress alone, such as increasing the speed of classical computers, will never turn an inefficient algorithm (exponential scaling) into an efficient one (polynomial scaling). Why?↩︎

It must be stressed that not all quantum algorithms are so efficient, in fact many are no faster than their classical counterparts. Which particular problems will lend themselves to quantum speed-ups is an open question.↩︎

Max Born, “Zur Quantenmechanik der Stoßvorgänge”,

*Zeitschrift für Physik***37**(1926), 893–867.↩︎1+z+z^2+\ldots + z^n= \frac{1-z^{n+1}}{1-z} ↩︎This is a slightly modified version of a bomb testing problem described by Avshalom Elitzur and Lev Vaidman in

*Quantum-mechanical interaction-free measurement*, Found. Phys.**47**(1993), 987-997.↩︎One light year (the distance that light travels through a vacuum in one year) is

9.4607\times10^{15} metres.↩︎f=O(g) is pronounced as “f is big-oh ofg ”.↩︎Primality used to be given as the classic example of a problem in

\texttt{BPP} but not\texttt{P} . However, in 2002 a deterministic polynomial time test for primality was proposed by Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. Thus, since 2002, primality has been in\texttt{P} .↩︎This result is known as the

**Chernoff bound**.↩︎