Top Banner
The potential of Quantum Computing with a focus on Grover’s algorithm Bachelor Thesis Physics and Astronomy, 12EC 01/06/2011 - 23/08/2011 Author: Charlotte van Leeuwen (5942772) Supervisor: Prof. dr. A.J. Kox Second reader: Dr. J.S. Caux University of Amsterdam FNWI Institute for Theoretical Physics Science Park 904 1090 GL, Amsterdam The Netherlands August 2011
45

The potential of Quantum Computing · The potential of Quantum Computing with a focus on Grover’s algorithm Bachelor Thesis Physics and Astronomy, 12EC 01/06/2011 - 23/08/2011 Author:

Oct 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • The potential of Quantum Computingwith a focus on Grover’s algorithm

    Bachelor Thesis Physics and Astronomy, 12EC01/06/2011 - 23/08/2011

    Author:Charlotte van Leeuwen (5942772)

    Supervisor:Prof. dr. A.J. Kox

    Second reader:Dr. J.S. Caux

    University of AmsterdamFNWI

    Institute for Theoretical PhysicsScience Park 904

    1090 GL, AmsterdamThe Netherlands

    August 2011

  • Contents

    1 Preface 3

    2 Introduction 4

    3 History of quantum computing 53.1 Quantum physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    3.1.1 Old quantum physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.1.2 Modern quantum physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    3.2 Computer science . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.3 Quantum computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    4 Quantum computing 74.1 Quantum bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Tensor product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3 Multiple qubits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.4 Quantum gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    4.4.1 The NOT gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.4.2 Hadamard Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    4.5 Black-box function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.6 Quantum parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.7 Deutsch’s algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.8 Shor’s algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    5 Grover’s Algorithm 145.1 Preparing the registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.2 The operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    5.2.1 The Oracle operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.2.2 Inversion about the mean operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    5.3 Geometrical representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.3.1 Geometrical representation of the Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . 205.3.2 Geometrical representation of the Inversion about the mean operator . . . . . . . . . . 215.3.3 Grover’s operator on a generic vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    5.4 Worked out example for n=3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.5 Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    6 Possible implications of Grover’s algorithm and quantum computing 316.1 Amount of CO2 produced by Grover’s algorithm compared to classical algorithm . . . . . . . 316.2 Grover’s algorithm in spacecraft industry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    6.2.1 Current methods for attitude determination . . . . . . . . . . . . . . . . . . . . . . . . 326.2.2 Grover’s algorithm for attitude determination . . . . . . . . . . . . . . . . . . . . . . . 32

    7 Conclusion 337.1 Future of quantum computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337.2 Predictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337.3 Realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.4 Potential of quantum computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    1

  • Abstract

    In this thesis is given a short description of the history of quantum physics and quantum computationuntil today. The basic principles of quantum computing are described, followed by a short descriptionof a few important quantum algorithm’s and Grover’s algorithm is explained in detail. Furthermore isdescribed what the possible implications of Grover’s algorithm can be in the future, with an example oflabeling images for google and a possible application in spacecraft industry. In the last part we try tosketch the bigger picture of quantum computing in general and how the research to quantum algorithmscan bring us a lot of new insights towards understanding nature in physics.

    Populair wetenschappelijke samenvatting

    Toen enkele tientallen jaren geleden de eerste computers werden gebouwd wogen ze nog tonnen, nukan een computer al kleiner zijn dan je handpalm. Maar we kunnen niet oneindig klein gaan bouwenwant op een gegeven moment lopen we tegen de limieten van de quantum mechanica aan, de wereldvan de kleinste deeltjes die fundamenteel anders is dan onze klassieke wereld. Het bijzondere is datwe nu juist gebruik kunnen maken van die bijzondere eigenschappen van de quantum mechanica omquantum computers te maken. In plaats van gewone bits, die 0 of 1 zijn, kunnen we nu gebruik makenvan qubits, die tegelijkertijd 0 en 1 kunnen zijn. Hierdoor kunnen we bepaalde algoritme’s uitvoeren dieop een gewone computer niet mogelijk zijn, zoals bijvoorbeeld Grover’s algoritme, een manier om in eenongestructureerde database elementen heel snel te kunnen vinden. Normaal kost dat heel veel tijd: als jebijvoorbeeld een telefoonboek hebt maar je weet alleen iemands telefoonnummer en niet zijn naam, kosthet heel veel tijd om de naam bij dat specifieke nummer te zoeken. Met Grover’s algoritme kun je het welsnel doen, omdat je door gebruik te maken van quantum parallelisme alle database elementen in één keerkunt “zien”. In het laatste deel van deze scriptie wordt gekeken naar mogelijke toepassingen van Grover’salgoritme, bijvoorbeeld in de ruimtevaart en hoe begrip van quantum computing ons verder kan helpenvoor nieuwe inzichten in de natuurkunde. Ook is met wetenschap vaak gebleken dat het ongelofelijkmoeilijk te voorspellen is wat een nieuw vakgebied gaat opleveren, dus zelfs als de toepassingen vanquantum computing beperkt blijven en het bouwen van een goed werkende quantum computer niettoereikend blijkt te zijn, kan onderzoek naar zo’n nieuw fenomeen als quantum computing ons alsnogeen gaat opleveren wat we van te voren niet hadden kunnen bedenken.

    2

  • 1 Preface

    Writing this thesis has been for me the far most challenging part my bachelor. It is great realizing thatnow I am able to finish this thesis. Since I have been following apart from physics many other courses inhistory, anthropology, philosophy, sociology and a few interdisciplinary courses I have tried to involve what Idiscovered in these courses in this thesis as well, by looking at the bigger picture of what implications Grover’salgorithm and quantum computation can possibly have. Still I felt the need to also zoom in on Grover’salgorithm and I have been enjoying, even more than I was expecting, to come to my own understanding of theelegance and power of this algorithm. I want to thank Jean-Sébastien Caux for giving me the first directionsand inspiration and for being the second reader of this thesis. I want to thank Ronald de Wolf for answeringmy questions in the last part of writing my thesis. He was able to give me the full understanding by helpingme finding the missing link in the understanding of the geometrical representation Grover’s algorithm. Mostof all I want to offer great thanks to Anne Kox, for his well-thought feedback, his ability to motivate me inour meetings and for his great support and understanding in the process of writing the thesis.

    3

  • 2 Introduction

    The motivation for this research has been in the first place that it is quite a new field to discover on the borderof quantum physics and computing. It is not clear yet what this research will bring us and there is still a lotto discover. By fully understanding Grover’s algorithm, it is possible to see the power of a quantum algorithmand how it is fundamentally different from a classical computer, making use of qubits instead of bits. Inorder to understand Grover’s algorithm and actually any quantum algorithm in general, it is necessary tohave a basic knowledge of quantum physics. Furthermore it is necessary to know the basics of quantumcomputation, like the notation of qubits and tensor products, the most important quantum gates like theHadamard gate and quantum parallelism. With these elements, one should be able to understand Grover’salgorithm and the geometrical representation of it. With the full understanding of Grover’s algorithm it isinteresting to look at the possible implications of Grover’s algorithm and quantum computation in general.Although it is hard to say anything about such a new field in which so much is still to be discovered anddeveloped, it is quite likely that it will give us interesting new insights in physics and computing. In thisthesis we start looking at the bigger picture, starting with the history of quantum physics and the historyof computing science until the point where they meet into quantum computing. The basics of quantumcomputing will be described in order to fully understand Grover’s algorithm, which will be described indetail. After Grover’s algorithm we will zoom out again and look at possible implications for the future. Inthis way it is possible to get a snapshot of the larger picture without loosing the focus and knowledge indetail about at least one certain algorithm.

    4

  • 3 History of quantum computing

    3.1 Quantum physics

    3.1.1 Old quantum physics

    Before quantum mechanics was discovered the world was thought of as classical and the general thought wasthat all physics was finished. Everything seemed understood but this was not the case. Some problems couldnot be solved by classical physics and posed physicists for problems. Until quantum mechanics was acceptedas a fundamental theory describing our world, these problems were often solved with ad hoc theories as anaddition to classical physics.

    When J.J. Thomson discovered the electron he came up with the plum pudding model. Later Rutherfordspecified this model. In his experiments he beamed alpha particles on a gold leaf of only a few atoms thick.Since these particles were scattered into different angles, Rutherford and his colleagues derived that this newinteraction force must indicating the existence of the nucleus [20]. This model posed only a huge problemthat could not be solved with classical physics. According to classical mechanics, an electron should spiralinto the nucleus. This is because the Larmor formula predicts that an electron would emit electromagneticradiation while making an orbit around the nucleus thus loosing energy and spiraling down into the nucleus.Bohr attempted to overcome this problem by assuming that electrons could only circle around the nucleus incertain orbits and that each orbit was associated with a defined energy. After this quantum rule was appliedmechanics again to calculate the motion of the electron around the nucleus. In this way Bohr solved theproblem of nature’s behaviour not corresponding with classical physics.

    From experiments it was clear that a black body emits radiation. It was hard though to find a wayto describe the intensity of radiation for all wavelengths. The Rayleigh-Jeans law tries to describe theblack body spectrum and although it is quite accurate for large wavelengths, the predictions of this lawstrongly disagree at short wavelengths. If we assume the Rayleigh-Jeans law to be correct we face theproblem of the ultraviolet catastrophe, that the total radiated power is infinite at low wavelengths. Thisis because according to classical physics every wavelength should be allowed in a cavity of temperature Twith black body radiation. Since each wavelength has an energy of kT and since there is an infinite amountof wavelengths, there should be an infinite amount of energy inside the cavity, which is obviously not hownature works. Before the Rayleigh-Jeans law was made in 1990, Wien tried to describe the spectral radianceof a black body, but this was only correct for short wavelengths and for the long wavelengths like the infraredit failed to give a correct description. Planck was the one who found the correct derivation for describing thespectral radiance of a black body because he used different assumptions than Wien and Rayleigh-Jeans hadused. Planck assumed that every wavelength could only contain a certain amount of energy. He consideredthis as a mathematical trick and did not realize the physical meaning of wavelengths behaving as quanta.

    A few years later, around 1905, Einstein continued the work of Planck and developed the light quantumhypothesis. He showed the duality of atoms and waves and that Planck’s formula could only exist if elec-tromagnetic energy behaved as quanta of energy. With this light quantum hypothesis, Einstein could alsoexplain the photoelectric effect. The photoelectric effect is what happens when light is beamed on a piece ofmetal: a small current will flow. The problem that could not be explained with classical physics was the factthat when for example a red light was beamed on the metal, no matter how high the intensity, no currentwould flow. If blue light was beamed on the metal, even with a very low intensity, still the current wouldflow. This could not be explained with waves, since every wave has energy and the larger the intensity, themore energy it gets. Einstein was the first to approach this problem in an non-classical way and he took thequantum hypothesis seriously, not as a mathematical trick, but as a fundamental concept of nature.

    3.1.2 Modern quantum physics

    Later, around 1925, Heisenberg and Schrödinger continued to develop quantum physics by inventing matrixmechanics and wave mechanics. The theory of linear operators working on the Hilbert spaces was inventedand in 1927 Heisenberg came up with the uncertainty principle, telling that it is impossible to measure the

    5

  • place and the velocity of a particle with complete accuracy at the same time. Physicists started to realize theexistence of entanglement, the fact that when two quantum systems are spatially separated, they still shouldbe described in reference to each other. Einstein could never accept this because he had stated that nothingcould travel faster than light, including information [14]. Although quantum mechanics seems strange, itis not contradictory to classical physics. Around 1920 Bohr described that within the of large quantumnumbers, quantum mechanics reproduces classical physics. Quantum mechanics is a successful theory thathas been largely applied on various aspects of physics and brought a lot of technical development. Withoutunderstanding quantum mechanics, the development of a semiconductor, an essential part of computers andphones, would not have been possible

    3.2 Computer science

    A different part of science that brought a major change to the world is the development of computer science.The earliest work on computer science has already been done in the 17th century when the first scientists cameup with devices capable of performing basic arithmetic options [7]. In the 1930’s and the 1940’s, the word‘computer’ did not refer to a device, but to a person who was doing calculations. The real breakthrough incomputer science came with Alan Turing who thought up a mechanical device able to compute every givenmathematical expression. A Turing machine exists of a writable tape that functions simultaneously as amemory, a head that can read and write on the tape and an application that controls the whole process.There are no specifications made on the details of the machine and it is a mathematical model.

    Turing proved the existence of Universal Turing Machine. He claimed that a Universal Turing Machinecan simulate any other Turing Machine and that if an algorithm can be performed on a piece of hardware,there is an equivalent algorithm for a Universal Turing Machine which performs the same task. This theoryis called the Church-Turing thesis. The notion of a Universal Turing Machine helped scientists to understandthe limits and possibilities of which classes of problems can be performed on a computer [1].

    In 1943 the first all-electronic digital computer was built, the ENIAC (Electronic Numerical Integratorand Calculator). This is the beginning of an amazingly growing industry. According to Moore’s law, thenumber of transistors that can be placed on a chip will double every two years, so roughly the power of acomputer will double every two years. This law turns out to be quite accurate, but in some time we willreach the limitations of miniaturization, because quantum effects will appear once computers get smallerand smaller. This brings us to the point where quantum physics and computer science meet: quantumcomputation [1].

    3.3 Quantum computation

    As computing became more evolved, the Church-Turing hypothesis had to be strengthened. Some researchershad proved that computers with access to a random number generator could perform tasks more efficientlythan was possible on a deterministic Turing machine. This led to the new definition of the Church-Turinghypothesis:

    “Any algorithmic process can be simulated efficiently using a probabilistic Turing machine.”

    This ad hoc addition to the hypothesis was what caught the attention of David Deutsch. He was wonderingif he could discover a definition for the Church-Turing hypothesis that would be as secure as a physical theory,by looking at the laws of nature. Since the laws of nature are ultimately quantum mechanical, he startedto look at a device that would make use of the laws of quantum mechanics and its arbitrary character tosimulate an arbitrary physical system. This research led to the development of the first quantum computerin theory. With this concept of a quantum computer, Deutsch could prove with an example that quantumcomputers can indeed calculate things much faster than ever would be possible on a probabilistic Turingmachine [1].

    6

  • This caught the attention of many researchers since there were still many problems that did not have anefficient solution on a classical computer. The two main examples of this are Shor’s algorithm and Grover’salgorithm.

    Long before this, Richard Feynman had already noticed the problems with simulating a quantum systemon a classical computer and suggested to simulate quantum mechanical systems on a quantum computer,since it is impossible for a classical computer to store so much information needed to simulate a quantumsystem [21]. In a talk given at the annual meeting of the American Physical Society at Caltech he saidthat “ . . . trying to find a computer simulation of physics seems to me to be an excellent program tofollow out. The real use of it would be with quantum mechanics. Nature isn’t classical and if you want tomake a simulation of Nature, you‘d better make it quantum mechanical.” [8] For example, the computationalpower you need to simulate many particle quantum systems and chemical reactions exceeds that of the bestsupercomputer of today. With a quantum computer, you only need one hundred qubits to simulate the samesystem, because quantum computers can exactly simulate this in polynomial time [9].

    Furthermore, many more things related to quantum computing have been developed, e.g. quantuminformation processing, quantum communication and quantum cryptography. These will not be explainedin this paper but have an interesting application. Some of these have been tested already physically, likethe BB84 protocol which is based on sharing a private key between two users while being able to determinewith 100% certainty if someone was eavesdropping while sending the key.

    4 Quantum computing

    Before understanding the details of quantum algorithms it is necessary to get a basic understanding ofquantum computing. A few main principles will be described in the following sections. A basic understandingof quantum mechanics is necessary in order to understand the principles.

    4.1 Quantum bit

    Where a classical computer uses bits, a quantum computer makes use of quantum bits or qubits. A classicalbit can be in a state 0 or 1, a qubit can be in a superposition of both |0〉 and |1〉 where |0〉 and |1〉 represent

    respectively

    [10

    ]and

    [01

    ]|ψ〉 = α|0〉+ β|1〉 =

    [αβ

    ](1)

    We can say the state |ψ〉 lives in a vector space with |0〉 and |1〉 as the orthonormal basis. |α|2 and |β|2represent the possibilities of finding an |0〉 or |1〉 when doing a measurement. The only constraint is√

    |α|2+|β|2 = 1 (2)

    since the possibility of finding a |0〉 or a |1〉 is 1. One of the ways of interacting with the wave function isdoing a measurement, which makes the wave function collapse. Another way of interacting is by making alinear transformation, changing the values of α and β but let them keep the constraint from Equation 2.This linear transformation can be represented by a matrix U, with U defined as [12]

    U†U = UU† = I (3)

    7

  • 4.2 Tensor product

    In order to understand multiple qubits and how they are formed in Grover’s algorithm, it is important toget some understanding of the tensor product. For a tensor product the following conditions apply:

    z(|v〉 ⊗ |w〉) = (z|v〉)⊗ |w〉 = |v〉 ⊗ (z|w〉) (4)(|v1〉+ |v2〉)⊗ |w〉 = (|v1〉 ⊗ |w〉) + (|v2〉 ⊗ |w〉)|v〉 ⊗ (|w1〉+ |w2〉) = (|v〉 ⊗ |w1〉) + (|v〉 ⊗ |w2〉)

    There are a few notations for the tensor product that all mean the same. It is important to be aware of this,because the different notations are all used, depending on the context.

    |v〉 ⊗ |w〉 = |v〉|w〉 = |vw〉

    So for example if we have a matrix A (with dimension mn and a matrix B with some other random dimension,the tensor product of the two is

    A⊗B =

    A1,1B A1,2B · · · A1,nBA2,1B A2,2B · · · A2,nB

    ......

    . . ....

    Am,1B Am,2B · · · Am,nB

    (5)so for example [

    α βγ δ

    ] [a b cd e f

    ]=

    αa αb αc βa βb βcαd αe αf βd βe βfγa γb γc δa δb δcγd γe γf δd δe δf

    (6)And with vectors

    |1〉 ⊗ |0〉 =[01

    ]⊗[10

    ]=

    0010

    (7)To indicate if you want to take for example n times the tensor product of a function itself you write

    |ψ〉⊗n (8)

    This works the same for matrices.

    4.3 Multiple qubits

    For multiple qubits we have a notation that is similar for the single qubit, but can be a bit confusing. Thevector

    1000

    (9)can be represented as the tensor product of two vectors, e.g.

    1000

    = [10]⊗[10

    ]= |0〉 ⊗ |0〉 = |0〉|0〉 = |00〉 (10)

    8

  • and in the shortest notation we say that 1000

    = |0〉 (11)For the vector |2〉 we can use the following notations

    0010

    = [01]⊗[10

    ]= |1〉 ⊗ |0〉 = |1〉|0〉 = |10〉 = |2〉 (12)

    4.4 Quantum gates

    4.4.1 The NOT gate

    Just like the classical NOT gate that turns a 0 into a 1, we can make a quantum NOT gate that turns a |0〉into a |1〉 and vice versa. This is represented by the matrix

    X =

    [0 11 0

    ](13)

    since [0 11 0

    ] [10

    ]=

    [01

    ](14)

    [0 11 0

    ] [01

    ]=

    [10

    ](15)

    or in shorter notationX|0〉 = |1〉 (16)

    X|1〉 = |0〉 (17)

    In addition to its classical counter part, the quantum NOT gate is also able to transform a superpositionof |0〉 and |1〉. The state α|0〉 + β|1〉 will be transformed into α|1〉 + β|0〉 as you can see below [1][

    0 11 0

    ] [αβ

    ]=

    [βα

    ](18)

    4.4.2 Hadamard Gate

    Another one qubit gate is the Hadamard gate

    H ≡ 1√2

    [1 11 −1

    ](19)

    The Hadamard gate is also described as the ’square root of NOT gate’ since it turns a |0〉 into a 1√2(|0〉+ |1〉)

    and a |1〉 into a 1√2(|0〉 − |1〉) as you can see below

    1√2

    [1 11 −1

    ] [10

    ]=

    1√2

    [11

    ](20)

    9

  • 1√2

    [1 11 −1

    ] [01

    ]=

    1√2

    [1−1

    ](21)

    or in shorter notation

    H|0〉 = |0〉+ |1〉√2

    = |−〉 (22)

    H|1〉 = |0〉 − |1〉√2

    = |+〉 (23)

    The CNOT gate, together with the other 2-qubit gates form a universal set of gates. This means thatall circuits can be composed out of a combination of CNOT gates and 2-qubit gates.

    It is also possible to apply the Hadamard gate several times.

    H2⊗|0〉|0〉 = (H ⊗H)(|0〉 ⊗ |0〉) (24)= H|0〉 ⊗H|0〉 (25)

    =1√2

    (|0〉 ⊗+|1〉)⊗ (|0〉 ⊗+|1〉) (26)

    =1

    2(|00〉+ |01〉+ |10〉+ |11〉) (27)

    =1

    2(|0〉+ |1〉+ |2〉+ |3〉) (28)

    When you apply a Hadamard operator on the n-qubit state |0〉 you get

    H⊗n|0〉 = 1√N

    N−1∑i=0

    |i〉 (29)

    10

  • since

    H⊗n|0〉 = (H ⊗H ⊗H ⊗ ...⊗H) (|0〉 ⊗ |0〉 ⊗ |0〉 ⊗ ...⊗ |0〉) (30)= H|0〉 ⊗H|0〉 ⊗H|0〉 ⊗ ...⊗H|0〉

    =

    (1√2

    [1 11 −1

    ] [10

    ])⊗(

    1√2

    [1 11 −1

    ] [10

    ])⊗ ...⊗

    (1√2

    [1 11 −1

    ] [10

    ])=

    1√2n

    ([11

    ]⊗[11

    ]⊗[11

    ]⊗ ...⊗

    [11

    ])

    =1√N

    111...1

    =1√N

    100...0

    +

    010...1

    +

    001...1

    + · · ·+

    000...1

    =

    1√N

    (|0〉+ |1〉+ |2〉+ · · · |N − 1〉)

    =1√N

    N−1∑i=0

    |i〉

    So if the input is |0〉 the Hadamard creates a superposition of all the basis states.

    4.5 Black-box function

    In a lot of quantum algorithms we make use of a black-box function. A black-box function stands fora subroutine of a calculation, how the function exactly works is not discussed. After having defined thisfunction we often see that a quantum algorithm needs far less calls to this black-box than a classical algorithmwould need in order to solve the same problem. A black-box function can be defined by the input of ann-bit string i and the output of f(i). Such a box should be reversible, since in quantum computing we canonly make use unitary matrices and they are reversible. Since the black box needs to be reversible we addanother input, j, and we make the box so that it looks like Figure 1. So we have the input of i and j, andthe output of i and j ⊕ f(i). If we set j = 0, we simply have the output f(i) [10].

    Figure 1: A reversible black-box for a function f(i)

    11

  • 4.6 Quantum parallelism

    Quantum parallelism is a feature that has no classical equivalent in which a quantum computer is able to“see” all database elements simultaneously [12]. We can see this if we imagine a function so that

    Uf (|i〉|j〉) = |i〉|j ⊕ f(i)〉 (31)

    where f(i) is either 0 or 1. If we apply this to 1√N

    N−1∑i=0

    |i〉 as the first register and to |0〉 for example as the

    second register we get

    1√N

    N−1∑i=0

    Uf (|i〉|0〉) =1√N

    N−1∑i=0

    |i〉|f(i)〉 (32)

    So now the final state of the second register after applying Uf is just f(i). This is remarkable. Imagine westart with n = 100 qubits (remember that N = 2n). With applying the Hadamard operator only a 100 times

    (H⊗100) we are able to create the superposition 1√2n

    2n−1∑i=0

    |i〉 which we are using in Equation 32. Now we can

    evaluate the second register with f(i) 2100 times with just 100 times applying an operator! This idea of anoperator evaluating many elements of the database simultaneously is impossible on a classical level and areason why quantum computers can be much faster by making use of quantum parallelism. The drawbackis that it makes no sense yet to do a measurement at this point because when you measure one element, thewave function will collapse and the information is lost. But still we can make use of quantum parallelismand the information stored in these qubits and do our measurements later [1].

    4.7 Deutsch’s algorithm

    The Deutsch’s algorithm is the first quantum algorithm that was made up. This algorithm can tell you ifa function is constant or not. We will start with the initial state |ψ0〉 = |0〉|1〉. To get |ψ1〉 we apply aHadamard operator on |0〉 and |1〉.

    |ψ1〉 = H⊗2|0〉|1〉 (33)= H|0〉 ⊗H|1〉

    =

    (|0〉+ |1〉√

    2

    )⊗(|0〉 − |1〉√

    2

    )=

    1

    2

    (|0〉(|0〉 − |1〉

    )+ |1〉

    (|0〉 − |1〉

    ))Now we let Uf , as defined in Equation 31, act on |ψ1〉 and we obtain |ψ2〉

    |ψ2〉 =1

    2

    (|0〉(|0⊕ f(0)〉 − |1⊕ f(0)〉

    )+ |1〉

    (|0⊕ f(1)〉 − |1⊕ f(1)〉

    ))(34)

    For the |0⊕ f(0)〉 − |1⊕ f(0)〉 we can say that{if f(0) = 0then|0⊕ f(0)〉 − |1⊕ f(0)〉 = (|0〉 − |1〉)if f(0) = 1then|0⊕ f(0)〉 − |1⊕ f(0)〉 =

    (|1〉 − |0〉

    )=(|0〉 − |1〉

    )· −1

    (35)

    So we can write that|0⊕ f(0)〉 − |1⊕ f(0)〉 = (−1)f(0) · (|0〉 − |1〉) (36)

    12

  • The same holds for |0⊕ f(1)〉 − |1⊕ f(1)〉

    |0⊕ f(1)〉 − |1⊕ f(1)〉 = (−1)f(1) · (|0〉 − |1〉) (37)

    This gives us for |ψ2〉

    |ψ2〉 =1

    2

    (|0〉(−1)f(0)

    (|0〉 − |1〉

    )+ |1〉(−1)f(1)

    (|0〉 − |1〉

    ))=

    1

    2(−1)f(0)

    (|0〉+ |1〉 · (−1)

    f(1)

    (−1)f(0)

    )(|0〉 − |1〉

    )=

    1

    2(−1)f(0)

    (|0〉+ |1〉(−1)f(0)⊕f(1)

    )(|0〉 − |1〉

    )(38)

    This gives us

    |ψ2〉 =

    ±(|0〉+|1〉√

    2

    )(|0〉−|1〉√

    2

    )if f(0) = f(1)

    ±(|0〉−|1〉√

    2

    )(|0〉−|1〉√

    2

    )if f(0) 6= f(1)

    (39)

    Now we apply one more Hadamard gate on the input register in order to get |ψ3〉.

    |ψ3〉 =

    ±|0〉(|0〉−|1〉√

    2

    )if f(0) = f(1)

    ±|1〉(|0〉−|1〉√

    2

    )if f(0) 6= f(1)

    (40)

    So we started with a function f(i) and we want to know if it is constant. We can simply compute f(0) andf(1) but that would take two measurements. By using Deutsch’s algorithm we can see that |ψ0〉 has beentransformed by using only one evaluation of f(i) into |ψ3〉 for which we can determine if f(i) is constant (soif f(0) = f(1) or not) by measuring only the first qubit [11].

    4.8 Shor’s algorithm

    Shor’s algorithm is a way to break RSA encryption with a quantum computer. RSA is a public-key encryptionscheme that relies on the difficulty of factoring large numbers that exist of two prime numbers. Since thistakes for classical computers more than several times the age of the universe if we take for example a 400digit number to be factored, no classical computer is able to break RSA encryption [13]. The invention ofShor’s algorithm in 1994 had a huge impact, since a lot of widely used cryptosystems rely on the fact thatit would take a classical computer simply too much time to break RSA encryption [14].

    With Shor’s algorithm you make a reduction of the factoring problem to a problem of period-finding. Thispart can be done on a classical computer. To solve the period-finding problem you use a quantum algorithmthat can be done in polynomial time with the help of the inverse Quantum Fourier Transform. Since thiscan be done in polynomial time by making use of quantum parallelism, only the slightest possibility of aquantum computer to be build is a threat to the world.

    To show the power of this algorithm we provide simple example for factoring the number N=15 withShor’s algorithm [1]. We choose a number that has no common factors with N, for example x=7. We beginwith the state |0〉|0〉 and we apply the Hadamard operator 11 times (this number is chosen such that wehave an error probability of maximum 1/4) so we have the state

    1√2t

    2t−1∑k=0

    |k〉〉0〉 = 1√2t

    [|0〉+ |1〉+ |2〉+ ...+ |2t − 1〉]|0〉 (41)

    13

  • Now we transform the second register into f(x) = xk mod N so that

    1√2t

    2t−1∑k=0

    |k〉〉xk mod N〉 = 1√2t

    [|0〉|1〉+ |1〉|7〉+ |2〉|4〉+ |3〉|13〉+ |4〉|1〉+ |5〉|7〉+ |6〉|4〉+ ...] (42)

    Now we make use of something that is called implicit measurement. We assume that the second register is

    measured, for example if we measure |4〉, then we are left with the state√

    42t [|2〉 + |6〉 + |10〉 + |14〉 + ...].

    Remember that we can reduce the problem of factoring to period-finding classically, so that if we are ableto find the period we are done with the quantum part of Shor’s algorithm. In order to find the period weapply the inverse Quantum Fourier Transform, which will not be described here in detail 1, and create thestate 1√

    4[|0〉 + |512〉 + |1024〉 + |1536〉. If we now do a measurement we will measure 0, 512, 1025 or 1536.

    Now with the classical part of the algorithm, making use of the continued fraction expansion and computingthe greatest common divisor, we can derive that 15 can be factored in 5 and 3 [1].

    5 Grover’s Algorithm

    The most important algorithm that is discussed in this thesis is Grover’s algorithm, a quantum searchalgorithm developed in 1995. Grover’s algorithm is quadratically faster than the best classical algorithmfor conducting a search in some unstructured database. With the above elements it is possible to describeGrover’s algorithm. First I will give a short overview of the complete algorithm. Later I will go into moredetail about each part and the geometrical representation of the algorithm. Grover’s algorithm can find anelement in an unstructured database in

    √N attempts, which is much faster than the N/2 attempts needed

    with a classical computer. For simplicity we assume that N is a power of 2 (N = 2n) for a certain positiveinteger n [1].

    5.1 Preparing the registers

    We need two registers, the first one with n elements, the second register with just one qubit. To begin with,we need to prepare our registers in the correct state. For the first register we want a superposition where allbasis states weigh equally [12]. This we can achieve with the Hadamard operator. First we make sure thefirst register is in the n-qubit state |0〉 which is |0, 0, 0, ..., 0〉. On this we apply the Hadamard operator ntimes (H⊗n) which gives a superposition where all basis states weigh equally like we have showed in Equation30

    |ψ〉 = H⊗n|0〉 (43)

    =1√N

    N−1∑i=0

    |i〉

    The second register should be in the state |−〉 = (|0〉 − |1〉) /√

    2. We achieve this by preparing the qubit as|1〉 and apply the Hadamard operator one time.

    |−〉 = H|1〉 (44)

    =1√2

    (|0〉 − |1〉)

    1For a proper description of Shor’s algorithm and the Quantum Fourier Transform I would like to refer to [1]

    14

  • 5.2 The operators

    5.2.1 The Oracle operator

    Now we define a function that gives a 1 as its output when it finds the searched element |i0〉 and a 0 otherwise:

    f(i) =

    {1 if i = i0

    0 if i 6= i0(45)

    We build a linear operator that makes use of the function described above and will give the searchedelement |i0〉 a negative value, while keeping the rest of the elements i 6= i0 positive. Uf is called Oracle anddefined such that

    Uf (|i〉|j〉) = |i〉|j ⊕ f(i)〉 (46)

    The ⊕ stands for modulo 2, the |i〉 for the first register and |j〉 for the second register. We did put thesecond register in the state |−〉 because that is a state that will not change after applying Uf , so the firstregister is the only thing that will change after applying Uf . We can see what happens:

    Uf (|i〉|−〉) =Uf (|i〉|0〉)− Uf (|i〉|1〉)√

    2(47)

    =(|i〉|0⊕ f(i)〉)− (|i〉|1⊕ f(i)〉)√

    2

    (48)

    At this point it is important to realize that since f(i) is a function which ‘recognizes’ the solution, so that

    |0⊕ f(i)〉 =

    {|1〉 if i = i0|0〉 if i 6= i0

    |1⊕ f(i)〉 =

    {|0〉 if i = i0|1〉 if i 6= i0

    (49)

    This means that

    Uf (|i〉|−〉) =

    { |i0〉|1〉−|i0〉|0〉√2

    = −(|i0〉|0〉−|i0〉|1〉)√2

    = −|i0〉|−〉√2

    if i = i0|i〉|0〉−|i〉|1〉√

    2= (|i〉|0〉−|i〉|1〉)√

    2= |i〉|−〉√

    2if i 6= i0

    since

    (−1)f(i) =

    {−1 if i = i01 if i 6= i0

    (50)

    we can see thatUf (|i〉|−〉) = (−1)f(i)|i〉|−〉 (51)

    Since we did put the first register in the state |ψ〉 we want to see what happens if we apply Uf on |ψ〉. Theresult we call |ψ1〉.

    |ψ1〉|−〉 = Uf (|ψ〉|−〉) (52)

    =1√N

    N−1∑i=0

    Uf (|i〉|−〉)

    =1√N

    N−1∑i=0

    (−1)f(i)|i〉|−〉

    15

  • or in shorter notation (omitting the second register) [12]

    |ψ1〉 =1√N

    N−1∑i=0

    (−1)f(i)|i〉 (53)

    5.2.2 Inversion about the mean operator

    Now the searched element is distinguished from the rest because it has a negative amplitude in |ψ1〉 wherethe rest has a positive amplitude. Still at this point it does not make any sense to do a measurement since thechances are much higher we will measure a non-desired element than the desired element since the amplitudesare all equal. So before we want to measure we want to increase the amplitude of the searched element |i0〉while decreasing the amplitudes of the other elements. The way we do this is to apply the Inversion aboutthe mean operator (2|ψ〉〈ψ|−I) on |ψ1〉. Since |ψ1〉 is the same as |ψ〉 except for the searched element |i0〉which has a negative amplitude instead of a positive one, we can rewrite |ψ1〉 as

    |ψ1〉 =1√N

    N−1∑i=0

    (−1)f(i)|i〉 (54)

    =1√N

    N−1∑i=0

    (1)|i〉+ 2 · (−1) 1√N|i0〉

    = |ψ〉 − 2√N|i0〉

    = |ψ〉 − 2√2n|i0〉

    where |ψ〉 and |i0〉 form a non-orthogonal basis since their inner product is not 0.

    〈ψ|i0〉 =1√N

    N−1∑i=0

    〈i|i0〉

    since

    〈i|i0〉 =

    {0 if i 6= i01 if i = i0

    〈ψ|i0〉 =1√N〈i0|i0〉 (55)

    =1√2n· 1

    =1√2n

    16

  • If we apply the operator (2|ψ〉〈ψ|−I) on |ψ1〉 we get |ψG〉. As you can see

    |ψG〉 = (2|ψ〉〈ψ|−I)|ψ1〉 (56)

    = (2|ψ〉〈ψ|−I)(|ψ〉 − 2√2n|i0〉)

    = 2|ψ〉〈ψ|ψ〉 − 2 · 2√2n|ψ〉〈ψ|i0〉 − I|ψ〉+ I

    2√2n|i0〉

    = 2|ψ〉 · 1− 2 · 2√2n|ψ〉 1√

    2n− |ψ〉+ 2√

    2n|i0〉

    = |ψ〉 − 22

    2n|ψ〉+ 2√

    2n|i0〉

    =2n

    2n|ψ〉 − 2

    2

    2n|ψ〉+ 2√

    2n|i0〉

    =2n|ψ〉 − 22|ψ〉

    2n+

    2√2n|i0〉

    =2n − 22

    2n|ψ〉+ 2√

    2n|i0〉

    =2n−2 − 1

    2n−2|ψ〉+ 2√

    2n|i0〉

    Why we call this Inversion about the mean operator becomes clear when we look at what Inversion aboutthe mean actually means. Imagine we have a few numbers, let’s say

    −14, 12, 22, 9, 14, 6, 7, 5 (57)

    The mean of these numbers is

    −14 + 12 + 22 + 9 + 14 + 6 + 7 + 58

    = 7.625

    which we can represent in Figure 2. If we want to calculate the inversion about the mean we should take

    Figure 2: Numbers, the mean is indicated by the horizontal line

    the mean minus the number and add this to the mean. For example for 5 (the 8th element of Equation 57),the difference between the number and the mean is 7.625− 5 = 2.625. So the inversion about the mean for5 is 2.625 + 7.625 = 10.25. The same goes for the other numbers as you can see in Figure 3. If we name ψ1as the original number, ψG as the inversion about the mean of ψ1 and a as the average, in general we can

    17

  • Figure 3: Numbers and the Inversion about the mean numbers, the mean is indicated by the horizontal line

    say that

    ψG = (a− ψ1) + a→ (58)ψG = 2a− ψ1

    This we can translate to vectors and matrices, since a vector can be represented by a row of numbers. Invector-matrix form this equation will be

    |ψG〉 = (A|ψ1〉 − |ψ1〉) +A|ψ1〉 (59)= 2A|ψ1〉 − |ψ1〉= (2A− I)|ψ1〉

    where A · |ψ1〉 (the equivalent of a in Equation 58) should represent a vector with each element being theaverage of all amplitudes, so A should be the matrix

    1

    N

    1 1 ... 11 1 ... 1...

    .... . .

    ...1 1 ... 1

    (60)This matrix can be constructed by |ψ〉〈ψ| since

    |ψ〉〈ψ| = 1√N

    N−1∑i=0

    |i〉 1√N

    N−1∑i=0

    〈i| (61)

    =1√N

    1√N

    11...1

    [1 1 ... 1]

    =1

    N

    1 1 ... 11 1 ... 1...

    .... . .

    ...1 . ... 1

    so that is why we can say that [23]

    |ψG〉 = (2|ψ〉〈ψ|−I) |ψ1〉 (62)

    18

  • The Oracle and the Inversion about the mean operator together we call the Grover operator. We nowhave made the following calculations

    |ψ〉 = |ψ〉 (63)

    |ψ1〉 = Uf |ψ〉 = |ψ〉 −2√2n|i0〉

    |ψG〉 = (2|ψ〉〈ψ|−I)|ψ1〉 =2n−2 − 1

    2n−2|ψ〉+ 2√

    2n|i0〉

    5.3 Geometrical representation

    Because all the vectors and operator’s in Grover’s algorithm are real (not complex) we can make a nice2-dimensional representation. As a non-orthogonal basis (!) we take |ψ〉 and |i0〉. We have seen that thisis non-orthogonal because their inner product is not zero. Since the inner product between two vectorsindicates the angle between the two, we can calculate the angle between |ψ〉 and |i0〉 and draw a geometricalrepresentation.

    Figure 4: Geometrical representation of the non-orthogonal basis |ψ〉 and |i0〉

    When calculating the angle between the different vectors, we make use of the fact that for the innerproduct the following applies

    〈a|b〉 = |a||b| cosφ (64)where φ indicates the angle between |a〉 and |b〉 and |a| and |b| indicate the norm (|a| =

    √〈a|a〉). Since the

    norm of qubits and quantum operators should be always 1, we can even say that

    〈a|b〉 = cosφ (65)

    It is clear that 1√2n

    will be close to 0 when n is large. Since

    〈ψ|i0〉 = |ψ||i0| cosφ = cosφ =1√2n

    (66)

    we can conclude that cosφ will be close to 0, so φ will be close to π/2 if n is large. If we apply operatorson |ψ〉 in this geometrical representation, it will rotate in the plane spanned by |ψ〉 and |i0〉. Because allquantum operators have to be normalized, |ψ〉 will move on the unit circle citeLavor.

    19

  • 5.3.1 Geometrical representation of the Oracle

    Now we will calculate the angle θ between |ψ〉 and |ψ1〉 and |ψ〉 and |ψG〉 by using Equation 65.

    〈ψ|ψ1〉 = 〈ψ|(|ψ〉 − 2√

    2n|i0〉)

    (67)

    = 1− 2√2n

    1√2n

    = 1− 22n

    = 1− 12n−1

    = cos θ

    Equation 67 and the fact that |ψ1〉 = |ψ〉 − 2√2n |i0〉, tells us that |ψ1〉 rotates θ degrees clockwise (the |i0〉component becomes negative in |ψ1〉). If we would know n, we could calculate θ by taking the arccos of bothsides of the equation. We will see this when we take the worked out example for n = 3.

    Figure 5: Geometrical representation where |ψ1〉 rotated θ degrees clockwise from |ψ〉

    |ψ1〉 can be described as the reflection of |ψ〉 around the horizontal axis. The definition of a reflectionthrough a certain subspace V is that Av = v for a unitary A and that Aw = −w for all w orthogonal toV [24]. For the Oracle operator we can see this clearly when we start to rewrite |ψ〉 and |ψ1〉 in a partwhich contains the searched element and a part that doesn’t. Since we do a reflection through the subspaceorthogonal to |i0〉, every vector orthogonal to |i0〉 should stay the same and every vector |i0〉 should get aminus sign. We then indeed see that |ψ〉 has a factor + 1√

    2nfor the |i0〉 component and |ψ1〉 has − 1√2n for

    the |i0〉 component. Remember here that the Oracle was an operator that ‘recognizes’ the searched element

    20

  • and gives it a minus sign while keeping all the non searched elements positive.

    |ψ〉 = 1√N

    N−1∑i=0

    |i〉 (68)

    =1√2n

    2n−1∑i=0

    |i〉

    =1√2n

    2n−1∑i=0i 6=i0

    |i〉+ 1√2n|i0〉

    |ψ1〉 = |ψ〉 −2√2n|i0〉 (69)

    =1√2n

    2n−1∑i=0i6=i0

    |i〉+ 1√2n|i0〉 −

    2√2n|i0〉

    =1√2n

    2n−1∑i=0i6=i0

    |i〉 − 1√2n|i0〉

    5.3.2 Geometrical representation of the Inversion about the mean operator

    Now we calculate the angle θ′ between |ψ〉 and |ψG〉.

    〈ψ|ψG〉 = 〈ψ|(

    2n−2 − 12n−2

    |ψ〉+ 2√2n|i0〉)

    (70)

    =2n−2 − 1

    2n−2+

    2√2n

    1√2n

    =2n−2 − 1

    2n−2+

    2

    2n

    = 1− 12n−2

    +1

    2n−1

    = 1− 22n−1

    +1

    2n−1

    = 1− 12n−1

    = cos θ′

    Since

    |ψG〉 =2n−2 − 1

    2n−2|ψ〉+ 2√

    2n|i0〉 (71)

    you can see that |ψG〉 has a positive amplitude for |i0〉. Thus we can conclude that |ψG〉 turns θ′ degreesanticlockwise from |ψ〉.

    If we compare θ and θ′ from Equation 67 and 70, it turns out that

    θ = θ′ (72)

    So the angle between |ψ〉 and |ψ1〉 is equal to the angle between |ψ〉 and |ψG〉. Looking at the geometry ofthe Inversion about the mean operator, we can also say that it is a reflection of |ψ1〉 in |ψ〉. This is also clear

    21

  • when we remember what reflection through |ψ〉 actually means. It means that every vector that is the sameas |ψ〉 should just stay |ψ〉 and any vector orthogonal to |ψ〉 should get a minus sign. This is represented bythe operator 2|ψ〉〈ψ|−I. So if we apply this operator to |ψ〉 this will happen:

    (2|ψ〉〈ψ|−I) |ψ〉 = 2|ψ〉〈ψ|ψ〉 − |ψ〉 = |ψ〉 (73)

    and for a vector |V 〉 orthogonal to |ψ〉:

    (2|ψ〉〈ψ|−I) |V 〉 = 2|ψ〉〈ψ|V 〉 − |V 〉 = −|V 〉 (74)

    which is consistent with our definition of reflection through the |ψ〉 axis.

    Figure 6: Geometrical representation with |ψ1〉 and |ψG〉

    If we now measure |ψG〉 the chances are higher the measurement returns |i0〉 than when we would measure|ψ〉. To get highest chance possible to get |i0〉 if we do a measurement, we apply the Grover operator G (theOracle together with the Inversion about the mean operator) a few times to make |ψ〉 move each time withθ degrees towards |i0〉. How many times exactly will be calculated later. Since

    cos θ = 1− 12n−1

    (75)

    θ will be small when n is large, so we would need many applications of G to get closer to |i0〉 [12].

    5.3.3 Grover’s operator on a generic vector

    In order to continue with further applications of the operator G we would need to prove that applying Gseveral times brings |ψ〉 closer to |i0〉 with θ degrees each time the operator is applied. We imagine a vector|σ〉 making an angle α1 with |ψ〉 towards |i0〉. We will now prove that one application of G will bring |σ〉closer to |i0〉 with θ degrees. When we apply the Oracle operator Uf on |σ〉 we will get |σ1〉 as you can seein Figure 7. Since Uf turns the positive amplitude of |i0〉 into a negative one, we can say |σ1〉 is a reflectionaround the horizontal axis (the axis perpendicular to |i0〉). The angle between |σ1〉 and |ψ〉 is α2.

    Now we calculate |σG〉

    |σG〉 = (2|ψ〉〈ψ|−I) |σ1〉 (76)= 2|ψ〉〈ψ|σ1〉 − |σ1〉= 2|ψ〉 cosα2 − σ1= 2 cosα2|ψ〉 − σ1

    22

  • Figure 7: Geometrical representation displaying the reflection around the horizontal axis of |σ1〉

    Figure 8: Geometrical representation displaying |σ〉, |σ1〉 and |σG〉

    To calculate the angle between |σ〉 and |σG〉 we take the inner product since we know this is equal to thecosine of the angle between |σ〉 and |σG〉. As you can see in Figure 8, the angle between |σ〉 and |σ1〉 equalsto α1 + α2.

    〈σ|σG〉 = 〈σ|2 cosα2|ψ〉 − 〈σ|σ1〉 (77)= 2 cosα2〈σ|ψ〉 − 〈σ|σ1〉= 2 cosα1 cosα2 − cos (α1 + α2)

    Now we make use of the cosine rule

    (2 cosα1 cosα2 = cos (α1 − α2) + cos (α1 + α2)) (78)

    23

  • so〈σ|σG〉 = cos (α2 − α1) (79)

    From Figure 8 you can tell that (α2 − α1) is equal to the angle between |ψ〉 and |ψ1〉 which is θ. So σG is arotated θ degrees from |ψ〉 in the direction of |i0〉 [12].

    5.4 Worked out example for n=3

    If we take n = 3 it means that we have a search space of N = 2n = 23 = 8 elements. For a classical computerit would take 4 trials to find the searched element with probability a 1/2. For a quantum computer, weonly have to apply Grover’s algorithm two times in order to get a precise answer. In order to prepare theregisters, we bring the first register with 3 qubits in the state |000〉 and the second register with 1 qubit inthe state |1〉. Now we apply the Hadamard gates on the first and second register. The calculation for thefirst register goes as described in Equation 30

    |ψ〉 = H⊗3|000〉 (80)= (H|0〉)⊗3

    =1

    2√

    2

    7∑i=0

    |i〉

    For the second register:

    H|1〉 = |−〉 (81)

    Now let’s say we are looking for the element |101〉. Or in short notation: |5〉. In order to make things clearwe will rewrite |ψ〉 like we have done in Equation 68. We will separate a part which contains the searchedelement and the part that doesn’t.

    |ψ〉 = 12√

    2

    N−1∑i=0i 6=5

    |i〉+ 12√

    2|101〉 (82)

    We can even represent the part that doesn’t contain the searched element as a separate normalized state |u〉which contains all the elements except the searched one. We define |u〉 as

    |u〉 = 1√7

    7∑i=0i 6=5

    |i〉 (83)

    =|000〉+ |001〉+ |010〉+ |011〉+ |100〉+ |110〉+ |111〉√

    7

    Now we can take |u〉 and |101〉 as an orthogonal basis. The basis is orthogonal since their inner product is 0.

    〈u|101〉 = 〈u|101〉 (84)

    =

    (〈000|+〈001|+〈010|+〈011|+〈100|+〈110|+〈111|√

    7

    )|101〉

    = 0

    We can thus express |ψ〉 as

    |ψ〉 =√

    7

    2√

    2|u〉+ 1

    2√

    2|101〉 (85)

    24

  • Figure 9: Geometrical representation for the example n=3 with orthogonal basis |u〉 and |101〉

    Since |u〉 and |101〉 form an orthogonal basis, we can place |101〉 on the vertical axis and |u〉 on thehorizontal axis. Since |ψ1〉 can be described as a reflection around the horizontal axis and the angle between|ψ〉 and |ψ1〉 is θ degrees, the angle between |ψ〉 and the horizontal axis (|u〉) should be θ/2 degrees as youcan see in Figure 9.

    cos θ/2 = 〈u|ψ〉 (86)

    = 〈u|

    ( √7

    2√

    2|u〉+ 1

    2√

    2|101〉

    )

    =

    √7

    2√

    2〈u|u〉+ 1

    2√

    2〈u|101〉

    =

    √7

    2√

    2

    → θ/2 = arccos√

    7

    2√

    2

    → θ = 2 arccos√

    7

    2√

    2

    → θ ≈ 41.4◦

    Now remember that Uf is a function which gives a negative sign to the searched element such that

    Uf |i〉 =

    {|i〉 if i 6= i0−|i0〉 if i = i0

    (87)

    25

  • where the second register is left out for simplicity. In this particular case for n = 3

    |ψ1〉 = Uf |ψ〉 (88)

    =1√8

    7∑i=0

    (−1)f(i)|i〉

    =|000〉+ |001〉+ |010〉+ |011〉+ |100〉 − |101〉+ |110〉+ |111〉

    2√

    2

    we can also rewrite this as

    |ψ1〉 = |ψ〉 −2

    2√

    2|101〉 (89)

    = |ψ〉 − 1√2|101〉

    =

    √7

    2√

    2|u〉+ 1

    2√

    2|101〉 − 1√

    2|101〉

    =

    √7

    2√

    2|u〉 − 1

    2√

    2|101〉

    By having calculated |ψ1〉 we can also find θ this way, since the angle between |ψ〉 and |ψ1〉 is θ degrees

    cos θ = 〈ψ1|ψ〉 (90)

    = 〈ψ|ψ〉 − 1√2〈101|ψ〉

    = 〈ψ|ψ〉 −

    (1√2〈101|

    √7

    2√

    2|u〉+ 1√

    2〈101| 1

    2√

    2|101〉

    )

    = 1− 1√2

    1

    2√

    2

    = 1− 14

    =3

    4

    → θ = arccos 34

    → θ ≈ 41.4◦

    With the help of the above information we are able to construct |ψ〉 and |ψ1〉 and draw them into Figure9. Now we will apply the Inversion about the mean operator (2|ψ〉〈ψ|−I) in order to get a higher chanceof finding the searched element |i0〉 if we do a measurement. Geometrically, the Inversion about the mean

    26

  • operator will bring |ψ〉 closer to |i0〉.

    |ψ2〉 = (2|ψ〉〈ψ|−I) |ψ1〉 (91)

    = (2|ψ〉〈ψ|−I)(|ψ〉 − 1√

    2|101〉

    )= 2|ψ〉〈ψ|ψ〉 − |ψ〉 − 2√

    2|ψ〉〈ψ|101〉+ 1

    2|101〉

    = 2|ψ〉 − |ψ〉 − 2√2|ψ〉

    (( √7

    2√

    2〈u|+ 1

    2√

    2〈101|

    )|101〉

    )+

    1√2|101〉

    = 2|ψ〉 − |ψ〉 − 2√2

    1

    2√

    2|ψ〉+ 1√

    2|101〉

    =1

    2|ψ〉+ 1√

    2|101〉

    We can rewrite this using the orthonormal basis with |u〉 and |101〉.

    |ψ2〉 =1

    2|ψ〉+ 1√

    2|101〉 (92)

    =1

    2

    ( √7

    2√

    2|u〉+ 1

    2√

    2|101〉

    )+

    1√2|101〉

    =

    √7

    4√

    2|u〉+ 1

    4√

    2|101〉+ 4

    4√

    2|101〉

    =

    √7

    4√

    2|u〉+ 5

    4√

    2|101〉

    Now we have done one whole application of G (the Oracle together with the Inversion about the meanoperator) and moved |ψ〉 closer to |i0〉 by θ degrees. The angle between |ψ2〉 and |ψ〉 should be the same asthe angle between |ψ1〉 and |ψ〉 as we have shown in Equation 72 and as you can see below

    〈ψ2|ψ〉 =1

    2〈ψ|ψ〉+ 1√

    2〈101|ψ〉 (93)

    =1

    2+

    1√2〈101|

    ( √7

    2√

    2|u〉+ 1

    2√

    2|101〉

    )

    =1

    2+

    1√2

    1

    2√

    2

    =1

    2+

    1

    4

    =3

    4= cos θ

    → θ = cos 3/4→ θ ≈ 41.4◦

    This is consistent with our previously found values. We have to do one more application in order to get ahigh probability of finding |i0〉 if we do a measurement. Later on will be explained how many applicationsare needed for a certain number n in order to get a precise answer. For now we will just do one more iterationand we then see that we get a precise answer indeed. In order to obtain |ψ3〉 we reflect |ψ2〉 in the horizontal

    27

  • axis. It is clear that

    |ψ3〉 =√

    7

    4√

    2|u〉 − 5

    4√

    2|101〉 (94)

    In order to make it easier to do the Inversion about the mean operator we will rewrite |ψ3〉 in terms of |ψ〉and |101〉. Since

    |ψ〉 = 72√

    2|u〉+ 1

    2√

    2|101〉 (95)

    we can say that

    7

    2√

    2|u〉 = |ψ〉 − 1

    2√

    2|101〉 → (96)

    7

    4√

    2|u〉 = 1

    2|ψ〉 − 1

    4√

    2|101〉

    so

    |ψ3〉 =7

    2√

    2|u〉 − 5

    4√

    2|101〉 (97)

    =1

    2|ψ〉 − 1

    4√

    2|101〉 − 5

    4√

    2|101〉

    =1

    2|ψ〉 − 3

    2√

    2|101〉

    As the final step we apply the Inversion about the mean operator on |ψ3〉, so we have done two wholeiterations of G.

    |ψf 〉 = (2|ψ〉〈ψ|−I) |ψ3〉 (98)

    = (2|ψ〉〈ψ|−I)(

    1

    2|ψ〉 − 3

    2√

    2|101〉

    )= 2

    1

    2|ψ〉6 ψ|ψ〉 − 1

    2|ψ〉 − 2× 3

    2√

    2|ψ〉 6 ψ|101〉+ 3

    2√

    2|101〉

    = |ψ〉 − 3√2|ψ〉(

    7

    2√

    2〈u|+ 1

    2√

    2〈101|

    )|101〉+ 2

    2√

    2|101〉

    =1

    2|ψ〉 − 3√

    2× 1

    2√

    2|ψ〉+ 3

    2√

    2|101〉

    = −14|ψ〉+ 3

    2√

    2|101〉

    = −14

    ( √7

    2√

    2|u〉+ 1

    2√

    2|101〉

    )+

    3

    2√

    2|101〉

    = −√

    7

    8√

    2|u〉 − 1

    8√

    2|101〉+ 4× 3

    8√

    2|101〉

    = −√

    7

    8√

    2|u〉+ 11

    8√

    2|101〉

    And again, if we would do the calculation, it turns out the the angle between |ψf 〉 and |ψ2〉 is θ. Now youcan see clearly how Grover’s algorithm works. By bringing |ψ〉 closer to |i0〉, the amplitude of |101〉 increases

    28

  • while the amplitude of all the other states |u〉 decreases. When we do a measurement now, chances aremuch higher we will measure |101〉 opposed to any of the other states. We can calculate the probability ofmeasuring |101〉 by taking the square of the absolute value of the amplitude

    p(|101〉) = | 118√

    2|2= 121

    128≈ 0.945 (99)

    So already for n = 3 after 2 applications of Grover’s algorithm, we have a chance of 94.5 % of finding oursearched element [12].

    5.5 Generalization

    Now we showed a geometrical representation of Grover’s algorithm and we have given a worked out examplefor n = 3. Now it is also time to give an even more general explanation of the phenomena and we willcalculate how many iterations of G are needed for a certain n to get a precise answer. Like we have donebefore, we can split |ψ〉 into a section that doesn’t contain the searched element |i0〉 and a section that does.We can define the state that doens’t contain the searched element as a separate state |u〉.

    |u〉 = 1√N − 1

    N−1∑i=0i 6=i0

    |i〉 (100)

    so

    |ψ〉 = 1√N

    N−1∑i=0

    |i〉 (101)

    =1√N

    N−1∑i=0i 6=i0

    |i〉+ 1√N|i0〉

    =1√N

    √N − 1√N − 1

    N−1∑i=0i 6=i0

    |i〉+ 1√N|i0〉

    =

    √N − 1N|u〉+ 1

    N|i0〉

    =

    √1− 1

    N|u〉+ 1

    N|i0〉

    or

    |u〉 =√

    N

    N − 1|ψ〉 − 1√

    N − 1|i0〉 (102)

    From now on we will stop cutting Grover’s algorithm in two with the Oracle and the Inversion about themean operator, but see it as one operator which turns |ψ〉 towards |i0〉 by θ degrees. From Figure 10 we cancome to the conclusion that the amplitude of the |u〉 component is equal to the cosine and the amplitude ofthe |i0〉 component is equal to the sine. After 0 applications of G, the angle between |ψ〉 and the horizontalaxis |u〉 is θ/2. After 1 application of G, the angle is 3θ/2, after 2 applications of G, the angle is 5θ/2 etc.We can say that

    Gk|ψ〉 = cos(

    2k + 1

    )|u〉+ sin

    (2k + 1

    )|i0〉 (103)

    29

  • Figure 10: Generalized geometrical representation of Grover’s algorithm

    Actually we should have included the second register |−〉 into this equation but we left it out for simplicity,which we could do easily since it is the same everywhere. In order to calculate the amount of iterationsneeded to get the best probability of measuring |i0〉 we define θ. Since

    G0|ψ〉 = cos(

    2× 0 + 12

    θ

    )|u〉+ sin

    (2× 0 + 1

    )|i0〉 → (104)

    |ψ〉 = cos(

    1

    )|u〉+ sin

    (1

    )|i0〉

    From this and Equation 101 we can see that

    cos

    (1

    )=

    √1− 1

    N→ (105)

    1

    2θ = arccos

    (√1− 1

    N

    )

    θ = 2 arccos

    (√1− 1

    N

    )As you can see from Figure 10 the amount of times θ is applied should bring |ψ〉 as close as possible to |i0〉.The total of all θ and the first θ/2 added should together be as close to π/2 as possible.

    k0θ +θ

    2=

    π

    2→ (106)

    k0 =π − θ

    and k0 must be an integer since it is the number of times G is applied so we round k0 to an integer

    k0 = Round

    (π − θ

    )(107)

    30

  • For N is large, we can make a Taylor expansion of Equation 105 as you can see in Appendix A. We can makethe approximation that θ ≈ 2/

    √N , so our k0 will be

    k0 ≈π − 2√

    N

    2 · 2√N

    =

    √N

    2 · 2π − 1

    2

    √N

    2

    2√N≈ π

    4

    √N (108)

    The probability of finding |i0〉 we can calculate by taking the absolute value of the amplitude for |i0〉 andsquare it. So

    p = |sin(

    2k + 1

    )|2 (109)

    With the above information we can make a diagram showing the probability of finding |i0〉 when we haveapplied the operator G k0 times as calculated above. This gives Figure 11, where, as you can see, for alreadyn=5, the probability of finding the searched element |i0〉 will be very close to 1.

    Figure 11: Probability of finding the searched element |i0〉 as a function of the number of qubits n (where N = 2n)

    6 Possible implications of Grover’s algorithm and quantum com-puting

    Although it is very hard to say something about the possible implications of Grover’s algorithm in detailsince it is (until now) a theoretical algorithm and has not been implemented yet, we can try to show whatdifference it would make in certain situations if we would use Grover’s algorithm compared to a classicalone. In this example we do not take into account how we exactly define for example the function f(x) that‘recognizes’ the searched element, so the calculation we do below will be a rough one.

    6.1 Amount of CO2 produced by Grover’s algorithm compared to classical al-gorithm

    Since Grover’s algorithm is only useful for unstructured databases (for example, to find the name of someonein a phone book when you only have the number of that person) we take the example of Google wanting torecognize a certain object in the database of the one trillion (1012) images available on the internet in orderto label that certain picture with that object. We assume that recognizing a certain object in an image takesapproximately 1 gram of CO2. We think this is a reasonable estimation since a normal websearch costs 0.2gram CO2 according to the numbers Google presented [3] and searching through images costs more energy

    31

  • than doing a search through words. If we now imagine we could have done this with Grover’s algorithm, soinstead of N/2 steps to find the desired object in one of the N = 1012 images, we only need

    √N steps, we

    get the following

    N2 =

    1012

    2 1 gram CO2√N =

    √1012 ? gram CO2

    so the amount of CO2 we would use with Grover’s algorithm is√

    1012 · 1/(1012/2) = 2 · 10−6 grams insteadof 1 gram CO2. If we now assume these searches in order to label images are done 20 million times in oneday, it would cost the classical algorithm 20000 kg CO2 a day. With Grover’s algorithm it would only cost20 grams CO2 a day, quite a difference.Unfortunately, Grover’s algorithm is not any better for searching structured database searches, so the twobillion normal searches on google every day that cost 0.2 grams CO2 per search cannot be changed withquantum computing. Although in theory it is possible to apply the algorithm in order to label images, this isnot the real issue and something where Grover’s algorithm will not bring a real change. Google produces stillfar less CO2 than most cars, domestic machines and Google actually also saves energy by preventing peoplefrom taking a car to the library, preventing printing many thick encyclopedias and other energywasters [3].Thus, it is questionable if it would be profitable to implement a quantum computer in such a situationbecause of the little impact it would make on a whole. However, there are some situations where Grover’salgorithm could actually make a big change, for example in spacecraft industry.

    6.2 Grover’s algorithm in spacecraft industry

    6.2.1 Current methods for attitude determination

    Where Grover’s algorithm can actually have a very useful application is in spacecraft industry. Grover’salgorithm can make a large improvement in the attitude determination of autonomous spacecraft navigation.Attitude determination is a way to define a position, based on recognizing the relative position of the starswith respect to the background stars and the angle between them. Usually an image is taken from the fieldof view and is manipulated via the computer on board that matches the results with the ones in its database.Star recognition and getting to know the angle between the stars is a complicated and power consumingprocess, while the amount of power we use we want to keep as low as possible since we are dealing with asituation where power and volume are limited. For space missions, its successfulness often relies upon thepreciseness of the navigation. With the use of Grover’s algorithm, a new way of attitude determination isproposed and could help in improving autonomous spacecraft navigation.

    Currently, stars are recognized by measuring the magnitude of a few stars and considering the angle theymake with each other. This takes a lot of energy since a star is determined by its magnitude and this takesa lot of steps to compute. If a database contains 1638 stars and 1160 triangles, it takes at least 2800 stepsto determine the right position. Apart from the fact that this takes a lot of energy, the problem is that witheach false recognition of a star, the chances are higher that the position is determined wrongly. In our idealsituation we would like to keep the amount of stars as low as possible in order to keep the chance of failedrecognition as low as possible. Unfortunately it is not possible to recognize a star only of its magnitude, sowe need more variables in order to determine the exact star [15].

    6.2.2 Grover’s algorithm for attitude determination

    In the new method where Grover’s algorithm is involved, star spectra are used as well in order to determinestars. In this way we can define the position of the aircraft with only two stars and in this way lower downour chance of failing in determining the correct position. The absorption lines of a star have a unique pat-tern since each absorption line corresponds with a certain element and the strength of the absorption linesdepends on the amount of the element the star contains and the efficiency of the absorptions. Due to this

    32

  • unique composition of the star, the absorption lines act like fingerprints for a star [15].

    The new algorithm for attitude determination would look something like this:1. Construct a stellar database by defining the magnitude of each star and the unique composition of E-Iand E-II absorption lines, where E-I stands for neutral ions or elements and II for the once ionized version.2. Set threshold levels based on brightness magnitude3. Do a CCD scan of the the sky4. (a) If some stars are detected, measure their E-I and E-II absorptions lines and define with Grover’salgorithm the exact stars(b) If no stars are detected, lower the threshold and repeat the algorithm from step 15. Once stars are recognized, the attitude of the spacecraft can be determined by calculating the pitch-roll-yaw angles (a common way of defining the attitude of a spacecraft, using the three angles of rotation, thepitch, roll and yaw, around the center of the spacecraft) with respect to the recognized background stars,from whom the angular positions are already known and stored in the memory of the onboard computer.

    Imagine that between +5.50 and +6.49 there are 6000 stars. With Grover’s algorithm it only takes√6000 ≈ 78 steps to identify a star. Since for the method with calculating the pitch, roll and yaw angles, we

    need one camera along each of the three principle axes of the spacecraft. This makes a total of 78 · 3 = 234steps, which is far less than the 2800 steps needed for the classical way of defining the attitude of thespacecraft. In this way Grover’s algorithm can be very useful for the spacecraft industry where energy andvolume are limited on the onboard computers and should be used as efficiently as possible [15].

    7 Conclusion

    7.1 Future of quantum computing

    Apart from Shor’s and Grover’s algorithm and the idea by Richard Feynman to make use of a quantumcomputer to simulate quantum mechanical systems, we don’t know at this moment many more problemsthat can be solved more quickly with a quantum computer than with a classical computer. Some say thisis because there is no future in quantum computers and there are simply no other useful algorithms. It isimportant to realize though, that it is really hard to come up with quantum algorithms. Our brains aredesigned to understand the world as we perceive it, and our intuition is based on that. Quantum mechanicsis far from intuitive and in order to come up with quantum algorithm’s we have to overcome the contra-intuitive part of it. Moreover, it is not enough for a quantum algorithm to be working fast and making useof the fundamental properties of quantum mechanics, it has to be even better than a classical algorithm inorder to be useful [1].

    7.2 Predictions

    It is dangerous to make any remark about the ’usefulness’ of certain parts of science, since it cannot bepredicted beforehand (see also the essay about this subject in Appendix A). No one could predict beforehandthat Einstein’s theory of General Relativity would help making a GPS system work perfectly. The discovery ofnuclear power did not came from a search to new forms of a power, it came from the interest in discoveringthe nature of an atom. The laws of induction were not discovered because people wanted to develop aninduction coil for a motor car. The laws were discovered many decades earlier and found their applicationin the induction coil for a motor car much later. The theory of electromagnetic waves, which is the basis ofalmost all communication, was not developed because people were looking for new ways of communicating.It was discovered because people were puzzled by the beauty of physics. Moreover, there is a huge spin-offfrom getting into a new field of science. The internet for example, was invented at CERN because scientistswere looking for a way to easily communicate a lot of data instantly with each other (see also the Appendix,

    33

  • “Zonder onderzoek naar de oerknal geen internet”). So what the field of quantum computation will bringus exactly is hard to tell. Like Grover himself stated: Let me start with a visionary quotation: “Wherea calculator on the Eniac is equipped with 18,000 vacuum tubes and weighs 30 tons, it is possible that thecomputer of the future may have only 1,000 vacuum tubes and weigh only 1.5 tons”. The idea is that due tothe intrinsic unpredictability of innovation when we are talking of revolutionary technologies, I (or anyoneelse) could be way off mark” [13]. It is very hard as well to predict when these developments will takeplace. According to Deutsch, the impact will be quite philosophical for the next few decades, but later onthe impact of quantum computing will be also technological, when we are able to build quantum computerslarge enough to process useful quantum algorithm’s.

    7.3 Realization

    Until now we have been able to make quantum computers that can do 100 logic operations on two qubits or 10operations on seven qubits. The seven qubit quantum computer is realized with nuclear magnetic resonance(NMR) [17]. This computer is able to demonstrate superposition but cannot produce entanglement. Untilnow, entanglement has been only achieved in a laser-cooled ion trap [13].

    The problem with building a large quantum computer is that problems arise with noise and scaling.Luckily there have been theories how to solve this with quantum error-correcting codes and fault tolerantcomputing. For many years it was believed that quantum error computing was impossible, because classicalerror correction depends on amplifying to find the error and then an irreversible damping process. Withquantum computing it is not possible to perform damping because it will disturb the whole computation.So error-correcting with quantum computers has to work in a different way. When we encounter an error,we need to understand what quantum transformation was applied to the state, and then undo it. Becauseit is possible to make a mechanism that can find the transformation without gaining information about thestate, we can correct the error without doing a measurement and let the wave function collapse.

    Unfortunately, there is no concrete idea yet how to implement these ideas in practice. Important isto realize though, that the problems of noise-reduction and error-reduction we now deal with in quantumcomputing, are alike to the problems that had to be overcome for classical computing and seemed formidableas well at that time but have been solved now. Quantum computing is still a field that is very new and a lot isstill to be discovered [14]. Moreover, no one sees a fundamental barrier in building quantum computers. Stillit is not very likely a quantum computer being able to perform a complex algorithm like Grover’s or Shor’swill be built in the coming decades. How much time it will take depends on how fast the miniaturizationwill go, so when, with building computers we will run up to the limits of quantum physics and how muchtheoretical research has been done to different quantum algorithms and the way to implement them optimally.

    7.4 Potential of quantum computing

    A few assumptions can be made about what quantum computing will bring. First of all, quantum computerscan be used to simulate quantum systems. Since the devices built are getting smaller and smaller it is gettingmore important to know details about the way these quantum systems behave in a particular situation. Thesame counts for chemistry, which deals directly with the laws of quantum mechanics since it looks at thebuilding blocks of nature. Even for pharmacy, where certain biological molecules are influenced by quantumeffects, we can use a quantum computer to calculate this effects. With a classical computer this is impossiblein a reasonable amount of time [13].

    Secondly, quantum computation forces us to think about computation in a very physical way, since wemake use of the basic building blocks of nature to perform a calculation. Both in computer science andinformation science this is a field that can be explored, bring us a lot of new insights and may result indevices capable of doing things that are now unimaginable, with benefits for the whole society. Thirdly,quantum computation introduces a new concept to think computationally about physics. Although we tendto understand things from an elementary perspective and the basic building blocks, a lot of physics startsto become interesting once things get complex. Even if a wonderful algorithm like Grover’s algorithm never

    34

  • gets implemented in real, it will still have a lot of impact on the development and insights around quantumcomputing. Quantum computation shows us a possibility for a bridge between the elementary and therelatively complex. This can contribute to new insights and ways of understanding nature in physics [1].

    References

    [1] M. A. Nielsen and I. L. Chuang. Quantum Computation and Quantum Information. Cambridge Univer-sity Press, 2000.

    [2] Carbon Footprint Household Energy Consumption [online]. 2011 Jan [cited 2011 Jul 2]Available from: URL:http://www.carbonfootprint.com/energyconsumption.html

    [3] U. Hlzle Powering a Google Search 2001 Nov 1 [cited 2011 Jul 1]Available from: URL:http://http://googleblog.blogspot.com/2009/01/powering-google-search.html

    [4] L. K. Grover Trade-offs in the quantum search algorithm Physical Review A, Vol. 66, 052314, 2002.

    [5] K. Brickman Implementation of Grovers Quantum Search Algorithm in a Scalable System PhysicalReview A, Vol. 72, 050306, 2005.

    [6] G. F. Viamontes, I. L.Markov and J. P. Hayes Is Quantum Search Practical? Computing in Science andEngineering archive. Volume 7, Issue 3, 2005.

    [7] M. Davies Norton The Universal Computer, The Road from Leibniz to Turing Norton, 2000.

    [8] R. Feynman Theres Plenty of Room at the Bottom. Talk given at the annual meeting of the AmericanPhysical Society at Caltech, 1959.

    [9] I. Kassel Polynomial-time quantum algorithm for the simulation of chemical dynamics Proc. Natl. Acad.Sci. 105, 18681, 2008.

    [10] P.W. Shor Algorithms for quantum computation: discrete logarithms and factoring Annual Symposiumon Foundations of Computer Science Vol 35, pages 124, 1994.

    [11] D. Deutsch Quantum theory, the church-turing principle and the universal quantum computer Proc.Roy. Soc. London Ser. A, 400, Pages97-117, 1985.

    [12] C. Lavor, L. R. V Manssur, R. Portugal Grover’s Algorithm: Quantum Database Search arXiv:quant-ph/0301079v1, May 25, 2006

    [13] A. Steane and E. Reiffel Beyond bits: The Future of Quantum Information Processing Computer 33,No. 1, Pages 38-45, 2000.

    [14] R. Spalek Quantum Algorithms, Lower Bounds, and Time-Space Tradeoffs Ph.D. Thesis. Universiteitvan Amsterdam: Netherlands, 2006.

    [15] J. Tsai, F. Y. Hsiao, Y. J. Li A quantum search algorithm for future spacecraft attitude ActaAstronautica Volume 68, Issues 7-8, Pages 1208-1218, April-May 2011.

    [16] L. K. Grover Quantum Computing The Sciences, Pages 24-30, July/August 1999.

    [17] G. L. Long, H. Y. Yan, et al. Experimental NMR Realization of a Generalized Quantum SearchAlgorithm Physics Letters A, Vol. 286, No. 2-3, 2000.

    35

  • [18] L. K. Grover Quantum computers can search rapidly by using almost any transformation Phys. Rev.Lett., vol. 80, no. 19, Pages 4329-4332, 1998.

    [19] C. P. Williams Explorations in Quantum Computing Springer, 2011

    [20] J. J. Thomson XXIV. On the Structure of the Atom Philosophical Magazine, Series 6, Volume 7,Number 39, Pages 237-265, March, 1904.

    [21] C. Zalka Efficient Simulation of Quantum Systems by Quantum Computers Roc. Roy. Soc. Lond. A.Volume 454, Pages 313-322. 1998.

    [22] P. W. Shor Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quan-tum Computer SIAM rev.41(2(, Pages 303-332, Jun, 1999.

    [23] L. K. Grover A fast quantum mechanical algorithm for database search STOC 9́6: Proceedings of thetwenty-eighth annual ACM symposium on Theory of computing, Pages 212-219, 1996.

    [24] R. de Wolf Quantum Computing and Communication Complexity Ph.D. Thesis. Universiteit vanAmsterdam: Netherlands, 2001.

    36

  • Appendix A

    37

  • Calculating the probability

    of finding the searched element i0 >

    ΘsmallN@N_D := 2 ArcCosB 1 - 1N

    F

    For large N we take an approximation for

    Θ by taking the power series of 2 ArcCosB 1 -1

    NF

    Series@ΘsmallN@ND, 8N, Infinity, 1>

    k0smallN@N_D := RoundB HΠ - ΘsmallN@NDL2 ΘsmallN@ND F

    k0largeN@N_D := RoundBΠ - ΘlargeN@ND2 ΘlargeN@ND

    F = RoundBΠ -

    2

    N

    2 *2

    N

    F = RoundBΠ N

    4-1

    2F

    But since N is large, we can leave out the factor1

    2so

    k0largeN@N_D := RoundB Π N4

    F

    For N = 2^n is small, we take the probability ' p ' and for N =2^n is large we take the probability ' plarge'. Until n =10 we consider N small and from n = 11 onwards,

    we consider N to be large. This brings us to the following equations and table

    p@n_D := SinB2 k0smallN@2^nD + 1

    2* ΘsmallN@2^nDF ^2

    plarge@m_D := SinB2 k0largeN@2^mD + 1

    2* ΘlargeN@2^mDF ^2

    Table@8n, N@p@nDD

  • MatrixForm@Table@8n, N@p@nDD

  • Uit publieke gelden gefinancierd wetenschappelijk onderzoek moet aantoonbaar nuttig

    zijn voor de maatschappij.

    Charlotte van Leeuwen (5942772) Pagina 1

    Zonder onderzoek naar de oerknal geen internet

    De Nederlandse overheid dient de maatschappij optimaal te laten functioneren. De overheid heeft

    als taak om de kwaliteit van ons wetenschappelijk onderzoek hoog te houden. Beide zijn belangrijke

    zaken, maar je moet ze niet willen verenigen. Helaas is dat nu precies wat de overheid van plan is.

    Door wetenschap in hokjes te stoppen en aan bureaucratische banden te leggen wil ze alleen nog

    onderzoek toestaan dat van ‘direct maatschappelijk nut’ is. Dat is zonde. Heel zonde. Want juist

    door de wetenschap in een keurslijf van nut te stoppen en af te dwingen dat de wetenschap werkt

    aan de verbetering van de maatschappij, wordt het tegenovergestelde bereikt. De wetenschap heeft

    vrijheid nodig. Om te bloeien. Om nuttig te zijn. Om de maatschappij verder te brengen.

    In 2002 werd een groot deel van de echtelijke ruzies over kaartlezen in de auto opgelost

    door een bescheiden en onderhand onmisbare uitvinding: de TomTom. Hoewel je het

    misschien niet direct zou verwachten is de TomTom is mede mogelijk gemaakt dankzij

    Albert Einstein en zijn relativiteitstheorie. Een theorie die in 1905 nog geen enkele nuttige

    toepassing leek te hebben.

    Einstein was dol op onnuttig, maatschappelijk irrelevant onderzoek. Dagen achter elkaar

    zat hij achter zijn bureau weg te dromen over abstracte lichtstralen en de oorsprong van de

    zwaartekracht. Toen hij zijn bijna puur wiskundige relativiteitstheorie publiceerde had

    deze geen enkel direct nut, behalve dat het voor natuurkundigen buitengewoon

    interessant was. Zijn theorie voorspelde dat enorm zware objecten, zoals de aarde en de

    zon, genoeg gewicht hebben om de ruimte eromheen te vervormen. Lichtstralen of

    satellietsignalen, die normaal in een rechte baan op de aarde afkomen, volgen in de

    relativiteitstheorie van Einstein het gekromde pad van de ruimte en leggen dus een

    langere afstand af.

    Als Einstein zijn relativiteitstheorie niet had ontwikkeld zou de TomTom totaal

    onbruikbaar zijn. Als je geen rekening houdt met de kromming van satellietsignalen in de

    ruimte zou een TomTom binnen een paar minuten kilometers afwijken van de juiste

    positie. Zonder de relativiteitstheorie van Einstein zou er geen einde zijn gemaakt aan de

    ellenlange ruzies in de auto over het vinden van de juiste weg.

    Stel dat er een wet zou zijn geweest die eist dat alle wetenschap voortaan „maatschappelijk

    verantwoord‟ moet zijn. Dat alle wetenschap „een duidelijk aantoonbaar nut voor de

    maatschappij moet hebben‟. Dan zou Einstein honderd jaar geleden hebben moeten

    verschijnen voor een strenge en bureaucratische commissie ter Evaluatie van

    Maatschappelijke Relevantie van Wetenschappelijk Onderzoek. Hij zou hebben moeten

    aantonen dat zijn nieuwe theorie over zwaartekracht in 2002 zou voorkomen dat mensen

    verdwalen. Hij zou hebben moeten voorspellen dat zijn relativiteitstheorie het aantal

    echtelijke ruzies in de auto vermindert. Waarschijnlijk was hij dan niet het icoon van de

    wetenschap geweest. Hij zou eerder in een gekkengesticht zijn gestopt en de rest van zijn

    dagen daar slijten met een trechter op zijn hoofd en zijn tong uit zijn mond.

  • Uit publieke gelden gefinancierd wetenschappelijk onderzoek moet aantoonbaar nuttig

    zijn voor de maatschappij.

    Charlotte van Leeuwen (5942772) Pagina 2

    Wat te denken van Nobelprijswinnaar Alexander Fleming die door een foutje tijdens een

    experiment per ongeluk penicilline ontdekte? Eigenlijk was hij bezig met het doen groeien

    van bacteriënkoloniën en onderzoek naar de stafylokokkenbacterie. Zijn onderzoek naar

    de stafylokokkenbacterie had nou niet bepaald een direct duidelijk maatschappelijk nut,

    maar toch is er bij toeval een medicijn uit ontdekt dat duizenden levens heeft gered.

    In het CERN wordt met behulp van een deeltjesversneller gezocht naar de bouwstenen

    van het heelal. Stel dat het CERN bij oprichting vijftig jaar geleden net als Einstein ook had

    moeten verschijnen voor de commissie ter Evaluatie van Maatschappelijke Relevantie van

    Wetenschappelijk Onderzoek. “Eh ja, we willen fundamenteel onderzoek doen naar

    elementaire deeltjes en op zoek gaan naar de bouwstenen van ons heelal. En o ja! We

    willen ook de oerknal onderzoeken. Want dat is heel nuttig voor de maatschappij want…

    eh… tsja…”. Waarschijnlijk zou het idee onherroepelijk in de prullenbak verdwenen zijn

    en zou de commissie geen cent over hebben gehad voor de ontwikkeling van dit enorme

    laboratorium.

    Toch jammer, want dankzij het CERN beschikken we nu over het internet. Het World

    Wide Web is daar in 1991 ontstaan, omdat de 2500 wetenschappers van alle mogelijke

    nationaliteiten daar keihard samenwerkten en zochten naar een manier om sneller met

    elkaar te communiceren. In de jaren ‟50 was het niet te voorzien dat ze dankzij een

    zoektocht naar de oerknal een netwerk zouden uitvinden waar de hele wereld 24 uur per

    dag mee is verbonden. Een netwerk waar wetenschappelijke data kunnen worden

    uitgewisseld. Een manier om binnen luttele seconden in contact te komen met de andere

    kant van de wereld. Een medium dat bijna niet te censureren is. Hoogstwaarschijnlijk

    waren de wetenschappers bij Einstein in het gekkengesticht beland.

    En zo zijn er nog duizenden voorbeelden van kennis die op het eerste gezicht weinig nut

    lijkt te hebben maar achteraf een enorme impact heeft. Geen koelkast zonder

    thermodynamica, geen batterijen zonder de onbedaarlijke nieuwsgierigheid van Volta

    naar elektriciteit, geen computerchip zonder de wiskundige kwantummechanica. Al onze

    huizen staan bomvol met apparaten die elk een hele hoop wetenschap in zich dragen.

    Kennis en feiten die, toen ze ontdekt werden, geen enkele toepassing kenden, maar

    waarvan de eigenschappen pas tientallen jaren later gebruikt konden worden in allerlei

    gadgets en apparaten.

    Wetenschappelijk onderzoek wordt gefinancierd vanuit het bedrijfsleven en de overheid.

    Vanzelfsprekend wil de overheid geen willekeurige projecten financieren maar een mooie

    selectie maken uit de enorme hoeveelheid onderzoeksaanvragen. Momenteel wordt er

    volgens een slim systeem bijgehouden wat de kwalitatief hoogste en meest

    toonaangevende onderzoeken zijn. Wetenschappers worden beoordeeld op drie

    verschillende objectieve en professionele criteria. Ten eerste wordt gekeken naar het aantal

    gepubliceerde artikelen en zo wordt de productiviteit bepaald. Dit alleen is natuurlijk niet

    genoeg, dus wordt er ook gekeken naar het aantal verwijzingen van andere

    wetenschappers naar het desbetreffende artikel. Het aantal verwijzingen naar een artikel

    geeft aan hoe relevant het stuk is voor de huidige wetenschap en wat de impact ervan is.

  • Uit publieke gelden gefinancierd wetenschappelijk onderzoek moet aantoonbaar nuttig

    zijn voor de maatschappij.

    Ch