Ludovic Noirie 2019/09/25 - - PowerPoint PPT Presentation

ludovic noirie 2019 09 25 http ludovic noirie fr sciences
SMART_READER_LITE
LIVE PREVIEW

Ludovic Noirie 2019/09/25 - - PowerPoint PPT Presentation

Ludovic Noirie 2019/09/25 http://ludovic-noirie.fr/sciences/quantum-computing 1 . 1 1. Outline, Sources, Python libraries, Web sites 2. Quantum Mechanics 3. Quantum Computers and Qubits 4. Quantum Logic Gates 5. Quantum Algorithms 6.


slide-1
SLIDE 1

Ludovic Noirie 2019/09/25 http://ludovic-noirie.fr/sciences/quantum-computing

1 . 1

slide-2
SLIDE 2
  • 1. Outline, Sources, Python libraries, Web sites
  • 2. Quantum Mechanics
  • 3. Quantum Computers and Qubits
  • 4. Quantum Logic Gates
  • 5. Quantum Algorithms
  • 6. Quantum Computers in Reality

2 . 1

slide-3
SLIDE 3

Short version: "slides" only (horizontal navigation) Long version: "slides" + "sub-slides" (horizontal + vertical navigation) Look at sub-slides for sources, Python libraries and web sites

3 . 1

slide-4
SLIDE 4

Quantum mechanics 's lecture I followed when I was student: Bas1993 J.-L. Basdevant: Mécanique Quantique. École Polytechnique, 1993. Quantum computers Essentially some Wikipedia pages: 's lecture notes: Wol2019 R. de Wolf: Quantum Computing - Lecture Notes. QuSoft, CWI and University of Amsterdam, 2019. Other sources are given in the slides. Jean-Louis Basdevant https://en.wikipedia.org/wiki/Quantum_computing https://en.wikipedia.org/wiki/Qubit https://en.wikipedia.org/wiki/Quantum_register https://en.wikipedia.org/wiki/Quantum_logic_gate https://en.wikipedia.org/wiki/Quantum_Fourier_transform https://en.wikipedia.org/wiki/Quantum_algorithm Ronald de Wolf https://homepages.cwi.nl/~rdewolf/qcnotes.pdf

3 . 2

slide-5
SLIDE 5

To illustrate what quantum computers can do in this notebook, I used the ProjectQ Python library: . Github: Installation: python -m pip install projectq The setup will try to build a C++-Simulator, which is much faster than the Python implementation. If it fails: python -m pip install --global-option=--without-cppsimulator projectq https://projectq.readthedocs.io/en/latest/index.html https://github.com/projectq-framework/ProjectQ

In [1]: import numpy as np import projectq.ops as QG import projectq.libs.math as QM # [not working] import projectq.libs.revkit as QO from projectq import MainEngine # create a main compiler engine QC = MainEngine()

3 . 3

slide-6
SLIDE 6

Quantum gate drawing using LaTeX with LaTeX PDF PNG https://github.com/CQuIC/qcircuit

3 . 4

slide-7
SLIDE 7

by Davy Wybiral with contributions of Jiman Hwang. A simple and intuitive quantum circuit simulator designed with a friendly GUI (drag-and-drop), up to 10 qubits. by Craig Gidney. A more complete quantum circuit simulator with drag-and-drop, up to 16 qubits. by a group of Google engineers. It simulate quantum registers up to 22 qubits, and uses its own scripting language with debugging and 3D quantum state visualization features. by IBM, need to sign in. A simulator and also a real quantum computer with 5 qubits, using an IMB Q device made of 5-qubits publically available. GUI with drag-and-drop for the design of the circuit. https://wybiral.github.io/quantum/ https://algassert.com/quirk http://www.quantumplayground.net/#/home https://quantumexperience.ng.bluemix.net/qx/editor

3 . 5

slide-8
SLIDE 8

4 . 1

slide-9
SLIDE 9
  • 1. Postulates of Quantum Mechanics
  • 2. Quantum Mechanics interpretation ?

You can skip this par in a first step and go back after (some people may be lost with Hilbert spaces,

  • perators on Hilbert spaces and tensor products).

To see the content: look at the sub-slides

5 . 1

slide-10
SLIDE 10

The following formulation of the Quantum Mechanics postulates are the English translation of the following source: Bas1993 J. L. Basdevant : Mécanique Quantique. École Polytechnique, 1993. Note: indicates that is not in the postulate wording, but it has been added for clarification. Texts in italic are additional comments.

5 . 2

slide-11
SLIDE 11

First Postulate First Postulate Superposition principle

The state of a system is completely defined, at each time, by an element

  • f the appropriate

Hilbert space

  • n complex numbers, with the Hermitian form

. Usually, the element is chosen to be normalized: . But in fact, the state of a system is completely defined by a ray of the Hilbert space , as the note in Bas1993, tome 1, §V.4.2,

  • p. 121 says that two colinear and non-null vectors represent the same state, and the propability

computation of the second postulat on measurement can be rewritten with renormalisation by the noms

  • f the potentially non-unitary vectors. So it is more correct to say that the state of a system is completely

defined, at each time, by an element of the projective space

  • f the appropriate Hilbert space

.

| ⟩ ⟨ | ⟩

5 . 3

slide-12
SLIDE 12

Second Postulate on the measure Second Postulate on the measure

Observable : A self-adjoint linear operator i.e., acting in is associated to any physical quantity : is the observable representing the physical quantity .

† ⋆

Quantization principle : If is the state of a system at the time we measure the physical quantity , whatever , the only possible results are the eigenvalues

  • f the observable

. Spectral decomposition principle : If is the state of a system, the probability to find the value in a measurement of is: Wave function collapse : The state of a system immediately after a measurement giving the value is .

5 . 4

slide-13
SLIDE 13

The following notations are not in the wording of the second postulate but in the discussions in Bas1993, tome 1, chapitre V, p. 122 : is an orthonormal basis of the eigenspace corresponding to the eigenvalue

  • f the observable

. The state is the projection of the state

  • n

: The observable can be written in the eigen vector basis:

5 . 5

slide-14
SLIDE 14

Third Postulate on the evolution Third Postulate on the evolution Schrödinger equation

If is the state of a system at time , while the system is not observed, its evolution with time follows the equation: where is the energy observable or Hamiltonian of the system. The evolution is unitary, because the hermitian product of two state vectors solutions remains constant. Proof: This means that any orthonormal basis is transformed into another orthonormal basis, i.e., with . If does not depend on time , .

5 . 6

slide-15
SLIDE 15

In fact, the unitary evolution implies the form of the Schrödinger equation. Proof: (H1) Suppose that the evolution is unitary, i.e., it conserves the hermitian product, which is equivalent to: 1) The evolution is a linear transformation, 2) It transforms unitary vectors into unitary vectors. Then the evolution with time of the state representation must be written , with a unitary operator , i.e., . Thus we also have .

5 . 7

slide-16
SLIDE 16

(H2) Suppose that is differentiable. The equation

  • f (H1) gives with (H2)

. If one writes then is hermitian, because . The equation gives with (H2) , which gives the Schrödinger equation: , with hermitian. is thus an observable.

5 . 8

slide-17
SLIDE 17

(H3) Suppose that, for a isolated system, an orthonormal basis

  • f time-invariant states exists (only

the phase may change, because it is not observable, true states being rays). This means that if then and , which implies . Thus is an eigenvector of the observable with eigenvalue (measure) . (H4) Suppose that, for a isolated system, the associated measured are also time-invariant: . Let's call them 'energies'. Then the observable is the observable of 'energy'. The superposition of 'energy' eigen vectors is generally not invariant: If then . But 'energy' is conserved: the probability of measuring is time-invariant and equal to . Source of inspiration: video "Schrodinger equation - Derivation and how to use it" on "Looking Glass Universe" YouTube chain . https://www.youtube.com/watch?v=DEgWbrMv6-k

5 . 9

slide-18
SLIDE 18

Fourth Postulate on composed systems - Fourth Postulate on composed systems - Tensor product

We postulate that a system with degrees of freedom is described in the tensor product Hilbert space

  • f the respective Hilbert spaces in which are described these

degrees of freedom. This postulate is not as explicit as the other ones in Bas1993, tome 1, §V . This is a simple sentence in Bas1993, tome 1, §V.6, p. 126 . The notion of composed system correspond exactely to the concept of degrees of freedom of the global system, each subsystem beeing one degree of freedom. If each subsystem is described by the Hilbert space then the full system is described by the tensor product . States that can be written are separable states. All the other states are entangled states. Tensor product:

5 . 10

slide-19
SLIDE 19

About entanglement: Schmidt decomposition theorem See . https://en.wikipedia.org/wiki/Schmidt_decomposition and are two Hilbert spaces of finite dimensions and . We consider the tensor product .

Then, for any quantum state , one can find an orthonormal basis with , for , an orthonormal basis with , for , and strictly positive real values with , such as: .

| ⟩ ∈ | ⟩ ≤ ≤ | ⟩ ≤ ≤ ≤ ≤ ≤ { }

being a quantum state, we have .

| ⟩

Proof: The Schmidt decomposition is essentially a restatement of the singular value decomposition in a different context... Separable vs. entangled states: For separable states, , and for entangled states, .

>

5 . 11

slide-20
SLIDE 20

This part can be skipped: For Quantum Computing, one does not need to "understand" Quantum Mechanics but just needs to know the formalism. Two papers that makes me "better understand" Quantum Mechanics: Rov1996 C. Rovelli: Relational quantum mechanics. International Journal of Theoretical Physics, 35:1637–1678, 1996. . Woo1981 W. K. Wootters: Statistical distance and Hilbert space. Physical review D, 23(2):357–362, 1981. . https://arxiv.org/abs/quant-ph/9609002 https://doi.org/10.1103/PhysRevD.23.357

5 . 12

slide-21
SLIDE 21

Relational Quantum Mechanics Relational Quantum Mechanics Rov1996 Rov1996

See also . This means that the state of a system is relative to the observer. A quantum state encodes the information an observer has about the observed system. https://en.wikipedia.org/wiki/Relational_quantum_mechanics Quantum mechanics is a theory about the physical description of physical systems relative to other systems, and this is a complete description of the world. Rov1996 is also a tentative of Quantum Mechanics reconstruction This means that probabilities are natural. Observation is information retrieving for the observer, and information means probabilities (see Shannon's theory of information). Postulate 1: There is a maximum amount of relevant information that may be

  • btained from a quantum system.

Postulate 2: It is always possible to obtain new information from a system.

5 . 13

slide-22
SLIDE 22

Relational Quantum Mechanics (RQM) "solves" quantum paradoxes: Schrödinger's cat Relational Quantum Mechanics (RQM) "solves" quantum paradoxes: Schrödinger's cat

Sch1935 E. Schrödinger: Die gegenwärtige Situation in der Quantenmechanik (The present situation in quantum mechanics). Naturwissenschaften, 23(48):807–812, 1935. . Is the cat dead or alive? With RQM, it depends on the observer: An observer who is outside the box does not know and encodes his/her knowledge in a superposition (dead + alive) state. An observer who is inside the box makes the measurement so he/she knows and encodes his/her knowledge in a separable (dead or alive, depending on the measurement result) state. https://doi.org/10.1007%2FBF01491891

5 . 14

slide-23
SLIDE 23

Relational Quantum Mechanics (RQM) "solves" quantum paradoxes: Einstein- Relational Quantum Mechanics (RQM) "solves" quantum paradoxes: Einstein- Podolsky-Rosen paradox Podolsky-Rosen paradox

EPR1935 A. Einstein, B. Podolsky and N. Rosen, "Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?" Phys. Rev., 47(10):777-780, 1935. . Absolute realism, locality of interactions and completeness of Quantum Mechanics are incompatible. https://doi.org/10.1103/PhysRev.47.777 EPR conclusion: Quantum Mechanics is incomplete, because absolute realism and locality (Special Relativity theory) must hold. Mainstream current conclusion: Locality does not holds, because of Bell's inequality violation (Alain Aspect's experiments). RQM conclusion: Absolute realism does not hold, because quantum states are relative to the

  • bserver.

SR2007 M. Smerlak and C. Rovelli: Relational: EPR. Found. Phys., 37(3):427-445, 2007. . https://arxiv.org/abs/quant-ph/0604064

5 . 15

slide-24
SLIDE 24

Statistical distance Statistical distance Woo1981 Woo1981

i) Statistical distance between probability vectors ii) Statistical distance between quantum states

5 . 16

slide-25
SLIDE 25

Statistical distance between probability vectors Statistical distance between probability vectors Woo1981 Woo1981

We consider the probability space . We consider two probability vectors and , and the set of curves on starting at and ending at . We fix . We note the minimal number of probability vectors "statistically distinguishable" in trials that covers the curve . Question: When can we say that two probability vectors are "statistically distinguishable" in trials?

5 . 17

slide-26
SLIDE 26

Distinguishability angular diameter around a probability vector: If the expected frequencies are and the measured frequencies are with , the probability distribution to observe is the multinomial distribution . When , follows a distribution with degrees of liberty. The angle between the unitary vectors and verifies . When , and , thus . Finally and . We can define the distinguishable diameter around the probability vector after trials by:

5 . 18

slide-27
SLIDE 27

Definition: The statistical distance between two probability vectors and measure the distinguishability between these two probability vectors: Theorem: The statistical distance between two probability vectors and is equal to the angle between the unitary vectors and :

5 . 19

slide-28
SLIDE 28

Statistical distance between quantum states Statistical distance between quantum states Woo1981 Woo1981

We consider the finite Hilbert space

  • f dimension .

We consider two quantum states and represented by the two unitary vectors and . We note the orthonormal basis representing the possible quantum states after a given complete measurement and the set of all possible complete measurements. Any orthonormal basis represents at least one possible complete measurement . We note a complete measurement such as and a complete measurement such as .

5 . 20

slide-29
SLIDE 29

Definitions: The statistical distance between quantum states and relatively to the measurement is the statistical distance of between the corresponding probability vectors: The absolute statistical distance between quantum states and is the maximal value of the relative statistical distances: Theorem: The absolute statistical distance between quantum states and is reached when

  • r

and is equal to the angle between the two rays representing the two quantum states and :

5 . 21

slide-30
SLIDE 30

6 . 1

slide-31
SLIDE 31
  • 1. Generic Quantum Computer system
  • 2. Qubits
  • 3. Quantum registers

7 . 1

slide-32
SLIDE 32

A quantum computer is simply a quantum system

  • beying the laws of Quantum Mechanics

Like a classical computer, the usage of a quantum computer can be divided in 4 steps: (1) Initial register value = Input quantum system state (2) Quantum processing = Interactions inside the quantum system (3) Final register value = Output quantum system state (4) Measurement of the final register value = Observable outcomes

8 . 1

slide-33
SLIDE 33

(1) Initial register value = Input quantum system state (complex vector) Hilbert spaces (complex vector spaces) and Tensor product of Hilbert spaces with Note: but Separable input state (tensor product of complex vectors) with for Generic (separable or entangled) input state: Hermitian product

9 . 1

slide-34
SLIDE 34

(2) Quantum processing = Interactions inside the quantum system = Unitary evolution according to Schrödinger equation Unitary operator (unitary square matrix with complex numbers) = Quantum logic gate: with , Linearity: Quantum serial processing = Matrix multiplication: Quantum parallel processing = Matrix tensor product on :

10 . 1

slide-35
SLIDE 35

(3) Final register value = Output quantum system state: Hilbert spaces (complex vector spaces) and Tensor product of Hilbert spaces with Generic (for almost all cases entangled) output state:

11 . 1

slide-36
SLIDE 36

(4) Measurement of the final register value = Observable outcomes Hermitian observable operator (hermitian matrix ) Measurement on output register only: Quantum computer: observable output register states = classical bits on output register: Observable = sum of projectors on classical register values with eigenvalues Register measurement ( ): Final register after measurement is an eigenvector

  • f the

measurement operator/matrix such as with probability ( ) Qubit parallel measurement ( ):

12 . 1

slide-37
SLIDE 37

Qubit definition Qubit definition

The smallest non-degenerated Hilbert space is . The elements of are qubits. The two qubits and form an orthonormal basis of . The qubits (= quantum bits) are all the possible superpositions (normalized to 1). The subset of classical bits is simply : the potential measurement outcome of the (z-axis direction) spin observable observable . For any unitary operator , i.e., such as , and form another

  • rthonormal basis of

(unitary operators = transformations between orthonormal bases).

13 . 1

slide-38
SLIDE 38

Qubit physical realization Qubit physical realization

Any physical system with spin is a qubit, with possible measured values and . Spin is a kind of intrinsic angular momentum of a "very small" quantum system. A system with spin has the possible measurement outcomes , , ..., , , and . Bosons have spins Fermions have spins Any fundamental fermion has spin : quarks (up , down , charm , strange , top and bottom ), leptons (electron , muon , tauon and neutrinos ), and their anti-particles . The usual choice of a basis of states is (z-axis of Bloch sphere). Other bases are for example (y-axis of Bloch sphere) and (x-axis of Bloch sphere).

14 . 1

slide-39
SLIDE 39

Photons have spin 1, with potential values , and . But because of relativistic effects (speed of light), value is forbidden. Thus a photon is also a qubit with possible values and , corresponding to left and right circular polarization of light. Another basis is the one with vertical vs. horizontal polarizations. For polarization of photons, with and , we have the following relationships: .

14 . 2

slide-40
SLIDE 40

Bloch sphere representation of Qubit Bloch sphere representation of Qubit

Any qubit can be represented by the general form of a unitary vector in : with and . Bloch sphere physical interpretation of any qubit: Directed axis of rotation of the 1/2-spin in our physical 3D euclidian (real) space Orthogonal states being antipodal points (= same line with opposite rotations) Physical meaning: Elementary fermions = qubits Our 3D physical space comes from qubits...

See https://en.wikipedia.org/wiki/Bloch_sphere

15 . 1

slide-41
SLIDE 41

The usual choice of basis corresponds to the z-axis of Bloch sphere: Any other pair of antipodal points in the Bloch sphere form an orthonormal basis of . Basis of y-axis of Bloch sphere: Basis of x-axis of Bloch sphere: . https://www.st-andrews.ac.uk/physics/quvis/simulations_html5/sims/blochsphere/blochsphere.html

16 . 1

slide-42
SLIDE 42

A quantum register is the association of qubits that are processed together. A state of a quantum register is an element of the tensor product of : . States with , i.e., with , form an orthonormal basis of . Mesuring the state of the register in this basis corresponds to get the value , by measuring the values

  • r

for each qubit . Complexity: qubits gives values . qubits number of atoms in the observable universe...

17 . 1

slide-43
SLIDE 43

18 . 1

slide-44
SLIDE 44
  • 1. Quantum logic gates for qubits
  • 2. Quantum logic gates for quantum registers
  • 3. Quantum registers

19 . 1

slide-45
SLIDE 45

A quantum logic gate on a qubit is any unitary operator acting on a qubit. The set of unitary operators on qubits is . The generic form is with , , and (we also have , ). So another generic form is with and modulo . Look at sub-slides for the detailed description of quantum logic gates on qubits

20 . 1

slide-46
SLIDE 46

Generic python functions used in this notebook to test quantum gates on qubits

In [2]: def qubitExperiment(nbExp,gate,thProbaUnchanged): res="Input qubit => Output qubit for "+str(nbExp)+" experiments\n" for inputQubit in range(0,2): # Test first with |0> then with |1> res+=str(inputQubit)+" => " s = 0; for i in range(0,nbExp): # Test 'nbExp' times r = gate(inputQubit) s+=r res+=str(r)+" " res+=": "+"{:>5.0%}".format(s/nbExp)+"\n" if theoreticalProbaUnchanged>-1: # If not -1, print the theoretical values res+="Expected probabilities: "+"{:.2%}".format(1-thProbaUnchanged) res+=" & "+"{:.2%}".format(thProbaUnchanged) print(res) # Print the results of all experiments def createQubit(bit): qubit = QC.allocate_qubit() # Create a qubit with value |0> if bit == 1: # Change it to |1> if bit = 1 QG.X | qubit # by using the NOT gate (X) return qubit # Return the qubit initialized to |bit> def measureQubit(qubit): QG.Measure | qubit # Measure the qubit QC.flush() # Flush the Quantum Computer return int(qubit) # Return the result of measurement

20 . 2

slide-47
SLIDE 47

Quantum NOT Quantum NOT

The quantum NOT inverts the qubits and .

20 . 3

slide-48
SLIDE 48

In [3]: def NOTgate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the gate NOT (=X) QG.X | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 0 qubitExperiment(32,NOTgate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 : 100% 1 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 0% Expected probabilities: 100.00% & 0.00%

20 . 4

slide-49
SLIDE 49

Hadamard gate Hadamard gate

The Hadamard gate produces uniform random qubits, which allows parallelization of operations. is hermitian and unitary, so it is a square root of the identity: .

20 . 5

slide-50
SLIDE 50

In [4]: def HadamardGate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the Hadamard gate H QG.H | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 0.5 qubitExperiment(32,HadamardGate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 0 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 : 41% 1 => 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 : 34% Expected probabilities: 50.00% & 50.00%

20 . 6

slide-51
SLIDE 51

Phase gates Phase gates

The phase gate of phase rotates the phases of the qubits and by .

20 . 7

slide-52
SLIDE 52

In [5]: def PhasePi8gate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply a phase of pi/8 to all: qubits QG.Ph(np.pi/8) | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 1 qubitExperiment(32,PhasePi8gate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 0% 1 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 : 100% Expected probabilities: 0.00% & 100.00%

20 . 8

slide-53
SLIDE 53

Phase-shift gates Phase-shift gates

The phase-shift gate of phase lets the qubit unchanged and rotate the phase of the qubit by . Phase-shift on qubit : . The phase-shift gates form the subgroup

  • f

: , and .

20 . 9

slide-54
SLIDE 54

In [6]: def PhaseShiftPi8gate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply a phase shift of pi/8 QG.R(np.pi/8) | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 1 qubitExperiment(32,PhaseShiftPi8gate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 0% 1 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 : 100% Expected probabilities: 0.00% & 100.00%

20 . 10

slide-55
SLIDE 55

Pauli gates Pauli gates

With ,

  • r

, , the Pauli matrix represents the rotation around the

  • axis of the Bloch

sphere by . is hermitian and unitary, so they are suare root of the identity: . The three Pauli matrices with the identity form a basis for the vector space of 2 × 2 Hermitian matrices (and also the natural basis of the quaternions by multiplying the Pauli matrices by ).

20 . 11

slide-56
SLIDE 56

In [7]: def Ygate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the Pauli gate Y QG.Y | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 0 qubitExperiment(32,Ygate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 : 100% 1 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 0% Expected probabilities: 100.00% & 0.00%

20 . 12

slide-57
SLIDE 57

Rotation gates Rotation gates

With ,

  • r

, the rotation matrix represents the rotation around the

  • axis of the Bloch

sphere by . They are defined by the exponential of the Pauli matrices : . We thus have for ,

  • r

, and .

20 . 13

slide-58
SLIDE 58

In [8]: def RxPi3Gate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the rotation gate R with angle pi/3 QG.Rx(np.pi/3) | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = np.cos(np.pi/6)*np.cos(np.pi/6) qubitExperiment(32,RxPi3Gate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 : 25% 1 => 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 1 : 62% Expected probabilities: 25.00% & 75.00%

20 . 14

slide-59
SLIDE 59

Roots of gates Roots of gates

A square root of is any quantum gate such as . For example, the square root of NOT is because . A -root of is any quantum gate such as .

20 . 15

slide-60
SLIDE 60

In [9]: def SQRTNOT(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the square root NOT gate QG.SqrtX | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 0.5 qubitExperiment(32,SQRTNOT,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 : 50% 1 => 1 1 1 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 : 56% Expected probabilities: 50.00% & 50.00%

20 . 16

slide-61
SLIDE 61

Clifford gates Clifford gates

The Clifford Gates are: (1) The Hadamard gate: . (2) The and gates: , . (3) The and gates: , .

20 . 17

slide-62
SLIDE 62

In [10]: def Sgate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the S gate QG.S | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 1 qubitExperiment(32,Sgate,theoreticalProbaUnchanged) In [11]: def TdaggerGate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the T-dagger gate QG.Tdag | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = 1 qubitExperiment(32,TdaggerGate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 0% 1 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 : 100% Expected probabilities: 0.00% & 100.00% Input qubit => Output qubit for 32 experiments 0 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 0% 1 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 : 100% Expected probabilities: 0.00% & 100.00%

20 . 18

slide-63
SLIDE 63

Generic quantum logic gates for qubits Generic quantum logic gates for qubits

A generic form is: with and modulo . This can be also written: , i.e., , with , and . Each term can be expressed with quantum gates , and : for any ;

20 . 19

slide-64
SLIDE 64

can also be expressed with quantum gates and : Thus any quantum gate on qubits can be expressed as a product of Hadamard gates and phase-shift gates: they are generated by the sub-group

  • f phase-shift gates and the Hadamard gate.

20 . 20

slide-65
SLIDE 65

In [12]: def CosSinPi8Gate(bit): # Create a qubit with value = bit (0 or 1) qubit = createQubit(bit) # Apply the Hadamard gate H QG.H | qubit # Apply a phase shift of pi/8 QG.R(np.pi/8) | qubit # Apply the NOT gate QG.X | qubit # Apply a phase shift of -pi/8 QG.R(-np.pi/8) | qubit # Apply the NOT gate QG.X | qubit # Apply the Hadamard gate H QG.H | qubit # Measure the qubit result = measureQubit(qubit) return result theoreticalProbaUnchanged = np.cos(np.pi/8)*np.cos(np.pi/8) qubitExperiment(32,CosSinPi8Gate,theoreticalProbaUnchanged) Input qubit => Output qubit for 32 experiments 0 => 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 : 16% 1 => 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 : 84% Expected probabilities: 14.64% & 85.36%

20 . 21

slide-66
SLIDE 66

Diagrams of 1-qubit gates Diagrams of 1-qubit gates

Explore quantum gates on qubits with: http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.qubitGate.htm

21 . 1

slide-67
SLIDE 67

A quantum gate on a quantum register is any unitary operator acting on a quantum register. The set of unitary operators on quantum registers of qubits is . with , , , and . Look at sub-slides for the detailed description of quantum logic gates on quantum register

22 . 1

slide-68
SLIDE 68

Generic python functions used in this notebook to test quantum gates on quantum registers

In [13]: def quregisterExperiment(nbExp,logNbIn,gate,param=[],formatIn="",formatOut=""): res="Input quregister => Output quregister for "+str(nbExp)+" experiments\n" for x in range(0,2**logNbIn): # Test with |x> , x = 0 to nbIn-1 res+=("{"+formatIn+"} => ").format(x) for i in range(0,nbExp): # Test 'nbExp' times r = gate(x,param) res+=("{"+formatOut+"} ").format(r) res+="\n" print(res) # Print the results of all experiments def createQuregister(n,x): qureg = QC.allocate_qureg(n) # Create a quregister of n qubits |0> QM.AddConstant(x) | qureg # Change value to |x> return qureg # Return the quregister |x> def measureQuregister(qureg): QG.All(QG.Measure) | qureg # Measure the quregister QC.flush() # Flush the Quantum Computer n = len(qureg) # Size of the quregister y = 0 # Transform quregister into integer for i in range(0,n): # with this for loop y = 2*y + int(qureg[n-i-1]) return y # Return the result of measurement

22 . 2

slide-69
SLIDE 69

Kronecker product quantum gates Kronecker product quantum gates

Each qubit , , of the register is processed independently with the single-qubit quantum gate . The resulting unitary operator is the Kronecker product of the quantum gates : More generally, the Kronecker product of the quantum gates such as acting on quantum sub-registers is:

22 . 3

slide-70
SLIDE 70

Diagrams of Kronecker product gates

23 . 1

slide-71
SLIDE 71

Quantum Hadamard transform gate, parallelization and random generator Quantum Hadamard transform gate, parallelization and random generator

The quantum Hadamard transform gate on a quantum register of qubits is the Kronecker product

  • f Hadamard gates
  • n each qubit.

with . This gate is used to process in parallel all the register values for , unitary

  • perators being linear.

A random generator can be made by applying the quantum Hadamard transform gate to the register value : After measurement, the probability to get the state for is . This is a perfect random generator.

23 . 2

slide-72
SLIDE 72

Diagram of an Hadamard transform gate

24 . 1

slide-73
SLIDE 73

In [14]: def randomGenerator(x,param): n = param[0] # number of qubits in the quregister # Create a quregister with n qubits, value x qureg = createQuregister(n,x) # Apply the Hadamard gate H to all qubits QG.All(QG.H) | qureg # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(32,3,randomGenerator,[3]) Input quregister => Output quregister for 32 experiments 0 => 1 7 3 4 6 1 2 6 1 0 3 2 4 1 4 6 5 3 7 5 4 2 5 4 1 0 6 0 7 5 4 5 1 => 5 3 6 0 7 4 1 2 3 7 0 5 0 0 7 1 4 4 0 6 3 1 5 3 2 1 6 5 1 7 4 4 2 => 5 0 1 2 3 7 4 0 3 3 6 5 5 0 2 7 4 2 2 5 7 7 1 0 1 6 6 6 6 7 2 6 3 => 1 0 5 2 7 1 7 5 2 2 1 4 6 4 0 0 3 2 7 5 2 1 5 1 7 5 7 7 0 1 3 6 4 => 3 3 7 2 2 4 4 1 7 1 2 0 0 4 3 2 0 6 5 4 4 1 1 2 2 2 5 5 6 3 5 3 5 => 2 1 5 4 2 5 7 1 6 2 0 5 6 1 1 5 4 2 6 7 2 1 1 0 5 7 5 5 1 2 1 1 6 => 0 7 7 4 4 6 7 5 2 1 0 0 2 5 3 5 5 2 5 5 2 5 3 5 1 6 1 0 3 0 0 2 7 => 7 0 5 1 6 5 1 6 3 1 5 3 2 5 1 3 2 1 1 7 1 3 0 5 7 5 7 0 4 1 5 4

24 . 2

slide-74
SLIDE 74

Action on a sub-register of a quantum register Action on a sub-register of a quantum register

A quantum register can be split into two sub-registers, for example, if , then for , , with and . An operator which acts only on the sub-register , with sub-operator can be written:

24 . 3

slide-75
SLIDE 75

Diagram of a sub-register gate

25 . 1

slide-76
SLIDE 76

In [15]: def singleQubitHadamard(x,param): n = param[0] # number of qubits in the quregister # Create a quregister with n qubits, value x qureg = createQuregister(n,x) # Apply the Hadamard gate H to last qubit QG.H | qureg[0] # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(32,3,singleQubitHadamard,[3]) Input quregister => Output quregister for 32 experiments 0 => 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 => 0 1 0 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1 0 2 => 2 3 2 3 3 3 3 3 2 2 3 2 2 2 2 2 3 3 3 3 3 3 2 2 3 2 3 3 3 3 3 3 3 => 3 2 2 3 3 3 2 2 2 3 3 2 2 2 2 3 3 2 2 2 2 3 2 3 2 2 2 2 2 3 3 3 4 => 5 4 4 4 4 5 4 5 4 5 5 4 4 5 4 4 4 4 4 4 4 5 5 4 5 4 5 4 5 5 5 5 5 => 5 5 5 5 5 4 5 5 5 5 4 4 4 5 4 4 4 4 5 5 4 4 4 4 4 5 4 4 4 4 4 5 6 => 7 7 7 7 7 6 6 6 7 6 6 6 7 7 7 6 6 6 6 7 7 6 6 7 7 7 6 7 6 6 7 7 7 => 7 7 7 6 7 7 7 7 6 6 7 7 7 6 7 7 7 7 6 7 7 6 6 6 6 7 7 6 6 7 6 7

25 . 2

slide-77
SLIDE 77

Quantum SWAP gate Quantum SWAP gate

The quantum SWAP gate swaps the qubits of the 2-qubit register: . Diagram of a SWAP gate

26 . 1

slide-78
SLIDE 78

In [16]: def SWAPgate(x,param): # Create a quregister with 2 qubits, value x = 0 qureg = createQuregister(2,x) # Apply the Swap gate SWAP # which is equivalent to: # QG.MatrixGate([ # [1, 0, 0, 0] , # [0, 0, 1, 0] , # [0, 1, 0, 0] , # [0, 0, 0, 1] ]) | qureg QG.Swap | (qureg[0],qureg[1]) # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(16,2,SWAPgate,formatIn=":02b",formatOut=":02b") Input quregister => Output quregister for 16 experiments 00 => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 => 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 => 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 11 => 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

26 . 2

slide-79
SLIDE 79

Quantum square-root of SWAP gate Quantum square-root of SWAP gate

The square root of the SWAP gate verifies . Any quantum gate on quantum registers can be expressed as the combination of Hadamar gates , phase-shift gates and square root of SWAP gates . Diagram of a square root of SWAP gate

26 . 3

slide-80
SLIDE 80

In [17]: def rootSWAPgate(x,param): # Create a quregister with 2 qubits, value x qureg = createQuregister(2,x) # Apply the root of the SWAP gate # which is equivalent to: # rootswap = QG.MatrixGate([ # [1, 0 , 0 , 0] , # [0, (1+1j)/2, (1-1j)/2, 0] , # [0, (1-1j)/2, (1+1j)/2, 0] , # [0, 0 , 0 , 1] ]) | qureg QG.SqrtSwap | (qureg[0],qureg[1]) # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(32,2,rootSWAPgate) Input quregister => Output quregister for 32 experiments 0 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 => 1 2 2 2 2 1 1 1 1 1 1 2 2 2 1 2 2 1 1 2 1 1 2 1 1 1 1 1 2 1 2 1 2 => 2 1 2 1 2 2 2 2 1 1 2 1 2 1 2 2 1 2 2 1 2 1 1 2 1 2 1 1 2 2 2 1 3 => 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

26 . 4

slide-81
SLIDE 81

Generic controlled gates Generic controlled gates

The quantum controlled gate

  • f any generic quantum gate

acts on a

  • qubit register such as, for any

: , .

27 . 1

slide-82
SLIDE 82

Diagram of a generic controlled gate

28 . 1

slide-83
SLIDE 83

Controlled NOT gate Controlled NOT gate

The controlled NOT gate (CNOT, or cX) is the control gate for the NOT gate: , . It realises a XOR operation: . Diagram of a controlled NOT gate

29 . 1

slide-84
SLIDE 84

In [18]: def CNOTgate(x,param): # Create a quregister with 2 qubits, value x qureg = createQuregister(2,x) # Apply the controlled NOT gate CNOT # which is equivament to: # QG.MatrixGate([ # [1, 0, 0, 0] , # [0, 1, 0, 0] , # [0, 0, 0, 1] , # [0, 0, 1, 0] ]) | qureg QG.CNOT | (qureg[1],qureg[0]) # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(16,2,CNOTgate,formatIn=":02b",formatOut=":02b") Input quregister => Output quregister for 16 experiments 00 => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 => 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 10 => 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 => 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10

29 . 2

slide-85
SLIDE 85

No cloning theorem No cloning theorem

CNOT gate can "duplicate"

  • r

qubits: , . But it cannot duplicate other qubits: . No cloning theorem , , . WZ1982 W. K. Wootters & W. H. Zurek: A single quantum cannot be cloned. Nature, 299:802-803,

  • 1982. http://copilot.caltech.edu/documents/525-299802a0.pdf

Proof: which implies , i.e.,

  • r

.

30 . 1

slide-86
SLIDE 86

Toffoli (CCNOT) gate Toffoli (CCNOT) gate

The Toffoli (or CCNOT for controlled-controlled NOT) gate acts on a -qubit register: . It realizes the NAND operation: .

30 . 2

slide-87
SLIDE 87

Diagram of a Toffoli gate

31 . 1

slide-88
SLIDE 88

In [19]: def CCNOTgate(x,param): # Create a quregister with 3 qubits, value x qureg = createQuregister(3,x) # Apply the Toffoli gate CCNOT # which is equivament to: # QG.C(QG.NOT,2) | (qureg[2],qureg[1],qureg[0]) QG.Toffoli | ([qureg[2],qureg[1]],qureg[0]) # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(16,3,CCNOTgate,formatIn=":03b",formatOut=":03b") Input quregister => Output quregister for 16 experiments 000 => 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 => 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 010 => 010 010 010 010 010 010 010 010 010 010 010 010 010 010 010 010 011 => 011 011 011 011 011 011 011 011 011 011 011 011 011 011 011 011 100 => 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 => 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 110 => 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 => 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110

31 . 2

slide-89
SLIDE 89

Classical boolean gate Classical boolean gate

OR and AND cannot be realized with a 2-qubit gate. . .

31 . 3

slide-90
SLIDE 90

The NAND gate being a universal gate for classical logic, any classical boolean function can be implemented using Toffoli gates (and SWAP gates for reordering of qubits if required). NOT is : AND is : Simpler AND using the NOT gate: Still another simpler AND:

31 . 4

slide-91
SLIDE 91

In [20]: def ANDgate(x,param): # Create an input quregister with 2 qubits, value x quregin = createQuregister(2,x) # Create an output quregister with 1 qubits, value 1 quregout = createQuregister(1,1) # Apply the Toffoli gate CCNOT QG.Toffoli | ([quregin[1],quregin[0]],quregout[0]) # Apply the NOT gates to the last bit QG.NOT | quregout # Measure the quregister result = measureQuregister(quregout) return result quregisterExperiment(32,2,ANDgate,formatIn=":02b") Input quregister => Output quregister for 32 experiments 00 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

31 . 5

slide-92
SLIDE 92

OR is : Simpler OR using the NOT gate:

31 . 6

slide-93
SLIDE 93

In [21]: def ORgate(x,param): # Create an input quregister with 2 qubits, value x quregin = createQuregister(2,x) # Create an output quregister with 1 qubits, value 1 quregout = createQuregister(1,1) # Apply the NOT gates to each qubit of input quregister QG.All(QG.NOT) | quregin # Apply the Toffoli gate CCNOT QG.Toffoli | ([quregin[1],quregin[0]],quregout[0]) # Measure the quregister result = measureQuregister(quregout) return result quregisterExperiment(32,2,ORgate,formatIn=":02b") Input quregister => Output quregister for 32 experiments 00 => 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 => 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

31 . 7

slide-94
SLIDE 94

Diagrams of boolean gates

32 . 1

slide-95
SLIDE 95

Fredkin (CSWAP) gate Fredkin (CSWAP) gate

The Fredkin gate is the controlled gate of the SWAP gate. , . If then . Like the Toffoli gate, it is also universal for classical computation.

32 . 2

slide-96
SLIDE 96

Diagram of Fredkin gates

32 . 3

slide-97
SLIDE 97

In [22]: def CSWAPgate(x,param): # Create a quregister with 3 qubits, value x qureg = createQuregister(3,x) # Apply the Fredkin gate CSWAP QG.C(QG.Swap) | (qureg[2], qureg[1], qureg[0]) # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(16,3,CSWAPgate,formatIn=":03b",formatOut=":03b") Input quregister => Output quregister for 16 experiments 000 => 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 => 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 010 => 010 010 010 010 010 010 010 010 010 010 010 010 010 010 010 010 011 => 011 011 011 011 011 011 011 011 011 011 011 011 011 011 011 011 100 => 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 => 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 => 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 111 => 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111

32 . 4

slide-98
SLIDE 98

Ising coupling gates Ising coupling gates

Ising coupling gates can be implemented natively in some trapped-ion quantum computers. They all have a continuous angular parameter.

Ising (XX) coupling gate Ising (XX) coupling gate Ising (YY) coupling gate Ising (YY) coupling gate

32 . 5

slide-99
SLIDE 99

Ising (ZZ) coupling gate Ising (ZZ) coupling gate

Diagrams of Ising coupling gates

32 . 6

slide-100
SLIDE 100

In [23]: def matrixIsing(axis,phi): if axis=="XX": a = np.sqrt(1/2) b = -1j*np.sqrt(1/2) c = -1j*np.exp(1j*phi)*np.sqrt(1/2) d = -1j*np.exp(-1j*phi)*np.sqrt(1/2) m = [[a,0,0,c], [0,a,b,0], [0,b,a,0], [d,0,0,a]] elif axis=="YY": c = np.cos(phi) s = np.sin(phi) m = [[c,0,0,1j*s], [0,c,-1j*s,0], [0,-1j*s,c,0], [1j*s,0,0,c]] else: # case axis == "ZZ" a = np.exp(1j*phi/2) b = np.exp(-1j*phi/2) m = [[a,0,0,0], [0,b,0,0], [0,0,b,0], [0,0,0,a]] return m def IsingGate(x,param): # Create a quregister with 2 qubits, value x qureg = createQuregister(2,x) # Apply the Ising matrix of type axis and angle theta QG.MatrixGate(matrixIsing(axis=param[0],phi=param[1])) | qureg # Measure the quregister result = measureQuregister(qureg) return result param = ["XX",np.pi/4] quregisterExperiment(16,2,IsingGate,param,formatIn=":02b",formatOut=":02b") Input quregister => Output quregister for 16 experiments 00 => 11 11 00 11 00 11 11 00 11 11 00 11 00 11 11 00 01 => 10 10 01 10 10 10 01 01 10 10 10 10 01 01 10 01 10 => 01 10 01 01 10 10 10 01 01 01 10 10 01 01 10 10 11 => 11 00 11 00 11 00 11 11 11 00 11 00 00 11 11 11

32 . 7

slide-101
SLIDE 101

Deutsch gates Deutsch gates

The Deutsch gate of parameter is the controlled-controlled gate of : Diagram of the Deutsch gate

32 . 8

slide-102
SLIDE 102

Entanglement gates Entanglement gates

The entanglement gate produces n entangled qubits. For = 2 qubits:

33 . 1

slide-103
SLIDE 103

Diagram of the entanglement gate For 2 qubits:

33 . 2

slide-104
SLIDE 104

In [24]: def EntGate(x,param): n = param[0] # Create a quregister with 2 qubits, value x qureg = createQuregister(n,x) # Apply the entanglement gate, which is equivalent to: # QG.H | qureg[0] # for k in range(1,n+1): # QG.CNOT | (qureg[0],qureg[k]) QG.Entangle | qureg # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(16,2,EntGate,[2],formatIn=":02b",formatOut=":02b") Input quregister => Output quregister for 16 experiments 00 => 00 11 11 00 00 11 11 00 00 11 00 11 00 00 11 00 01 => 11 00 11 00 11 00 00 11 11 11 11 11 00 00 00 00 10 => 01 01 01 10 01 01 10 10 10 10 01 01 01 01 01 01 11 => 10 01 10 10 01 10 10 01 10 01 01 10 10 10 10 10

33 . 3

slide-105
SLIDE 105

Quantum teleportation Quantum teleportation

BBC+1993 C. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres, and W. Wootters: Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels. Physical Review Letters, 70:1895-1899, 1993. http://www2.fisica.unlp.edu.ar/materias/qc/teleport.pdf Teleportation from Alice to Bob of qubit . Notation: (1) Alice prepares the qubit to be teleported (last qubit) and an entangled pair of qubits (first and middle qubits) (2) Alice sends (quantum communication) the first qubit to Bob (3) Alice processes a CNOT gate on the middle qubit controlled by the last qubit then an Hadamard gate

  • n the last qubit

34 . 1

slide-106
SLIDE 106

(4) Alice sends (classical communication) the measurements on the two last qubits to Bob Wave collapse with probability each: (5) Bob processes a controlled Pauli X ( ) on the first qubit controlled by the middle classical bit, then a controlled Pauli Z ( ) controlled by the last classical bit The result is the teleportation of by Alice to Bob, using a mix of quantum and classical communication channels

35 . 1

slide-107
SLIDE 107

Diagram of quantum teleportation on 1 qubit Quantum teleportation circuit on Quirk http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.QTeleport.htm

36 . 1

slide-108
SLIDE 108

In [25]: def QTeleportation(x,param): # x = 0 or 1 n = 3 # Create a quregister with 3 qubits, value x = 000 or 001 qureg = createQuregister(n,x) # Create an entangled pair with qubits 1 and 2: QG.H | qureg[1] QG.CNOT | (qureg[1],qureg[2]) # Process the qubits 0 and 1: QG.CNOT | (qureg[0],qureg[1]) QG.H | qureg[0] # Measure the qubits 0 and 1 QG.Measure | qureg[0] QG.Measure | qureg[1] # Process the qubit 2 QG.CNOT | (qureg[1],qureg[2]) QG.CZ | (qureg[0],qureg[2]) # Final measurement result = measureQuregister(qureg) return result quregisterExperiment(16,1,QTeleportation,[],formatIn=":03b",formatOut=":03b") Input quregister => Output quregister for 16 experiments 000 => 001 001 011 000 000 001 010 011 010 001 001 000 010 000 001 011 001 => 100 101 111 111 111 111 110 111 111 100 110 111 100 111 110 111

36 . 2

slide-109
SLIDE 109

Quantum Fourier transform gates Quantum Fourier transform gates

By convention, the quantum Fourier transform gate corresponds to the classical inverse discrete Fourier transform, and the inverse quantum Fourier transform gate corresponds to the classical discrete Fourier transform. Usually (n qubits), : , . and .

37 . 1

slide-110
SLIDE 110

Diagram of the Quantum Fourier Transform gate

38 . 1

slide-111
SLIDE 111

Diagram of the Inverse Quantum Fourier Transform gate

39 . 1

slide-112
SLIDE 112

Quantum Fourier transform vs. classical Fourier transform Classical Fast Fourier Transform: gates. Quantum Fourier Transform: gates. Approximation possible removing gates with small : gates.

39 . 2

slide-113
SLIDE 113

Quantum Fourier Transform gate on Quirk with 8 qubits: with 4 qubits: with 4 qubits: with 8 qubits: http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.QFTgate8.htm http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.QFTgate.htm http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.IQFTgate.htm http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.QFTxIQFT.htm

40 . 1

slide-114
SLIDE 114

In [26]: def QFTgate(x,param): n = param[0] # Create a quregister with 2 qubits, value x qureg = createQuregister(n,x) # Apply the quantum Fourier transform gate QFT: QG.QFT | qureg # Measure the quregister result = measureQuregister(qureg) return result quregisterExperiment(16,3,QFTgate,[3]) Input quregister => Output quregister for 16 experiments 0 => 7 7 1 1 1 6 3 3 1 3 1 6 4 7 7 4 1 => 6 3 2 2 2 6 1 0 5 2 6 1 3 6 0 4 2 => 3 6 6 4 5 7 1 3 7 7 1 1 0 0 7 6 3 => 5 7 5 4 6 2 7 6 0 3 1 6 4 3 4 6 4 => 3 4 7 2 6 3 4 7 3 5 2 7 6 1 0 5 5 => 2 2 7 1 3 0 2 3 4 2 2 7 5 7 5 5 6 => 7 1 5 6 0 3 4 0 4 4 1 3 5 7 5 1 7 => 2 0 5 7 2 4 4 6 4 5 0 5 7 4 1 5

40 . 2

slide-115
SLIDE 115

Quantum oracle gates Quantum oracle gates

Consider a function where and , with usually and . The quantum oracle gate associated with f is such as for all and , . When , . with corresponding to the cyclic permutation of elements with a shift value . More particularly, if , . This kind of gate is used in many quantum algorithms.

40 . 3

slide-116
SLIDE 116

Diagram of a generic oracle gate

41 . 1

slide-117
SLIDE 117

In [27]: # Matrix to be used for quantum oracle gates # f is an array of bits of length N = 2^n, n = number of bits of input # mbits is the number of bits of output: M = 2^m possible values def matrixOracle(f,mbits): N = len(f) M = 2**mbits mtrix = np.zeros((N*M, N*M)) for x in range(0,N): for y in range(0,M): z = y + f[x] if z>=M: z = z-M mtrix[M*x+y][M*x+z] = 1 return mtrix

41 . 2

slide-118
SLIDE 118

Definition Definition

A set

  • f universal quantum gates is any finite set of quantum gates that can approximate

any quantum opetrator , i.e., for any , for any desired accuracy , one can find a finite sequence with for all that is an

  • approximation of the quantum operator

, i.e., . Note: it is not possible to express exactly any quantum opetrator by a finite sequence of a finite set of quantum gates, because the set of quantum operators is uncountable.

41 . 3

slide-119
SLIDE 119

Solovay-Kitaev theorem Solovay-Kitaev theorem

In its simplest form the Solovay-Kitaev theorem shows that, roughly speaking, if a set of -qubit quantum gates generates a dense subset of , then that set is guaranteed to fill quickly, i.e., it is possible to obtain good approximations to any desired gate using surprisingly short sequences

  • f gates from the given generating set.

More precisely, let be an instruction set for , i.e., the group generated by is dense in , and let a desired accuracy be given. There is a constant such that for there exists a finite sequence

  • f gates from
  • f length

and such that . DN2005 C. M. Dawson and M. A. Nielsen: The Solovay-Kitaev algorithm. arXiv:quant-ph/0505030, 2005. . https://arxiv.org/abs/quant-ph/0505030

41 . 4

slide-120
SLIDE 120

Some sets of universal quantum gates Some sets of universal quantum gates

One simple set of 2-qubit universal quantum gates is (with to get the right wired quantum cirtcuit if qubits cannot be moved). Some single-gate set are also universal (with to get the right wired quantum cirtcuit if qubits cannot be moved), e.g., with . Another set of universal quantum gates consists of the Ising gates and the phase-shift gate. These are the set of gates natively available in some trapped-ion quantum computers.

41 . 5

slide-121
SLIDE 121

42 . 1

slide-122
SLIDE 122

The general form of quantum algorithm is the following: (1) Prepare some qubits. You may or may not have an input register with value given by the user. You may or may not have an internal register that need to be prepare to some fixed values. It may be seen as an input but the value is fixed. We call register the aggregation of the input register + internal register. (2) Apply the quantum Hadamard transform gate on a part of the register. This allows parallel processing on all integer values allowd in this part of the register. (3) Apply a quantum unitary operator on the full register. This unitary operator may be decomposed in smaller pieces (with wiring = quantum circuit) acting on smaller registers.

43 . 1

slide-123
SLIDE 123

(4) Produce interferences on a part of the register. This can be done for example with the quantum Hadamard transform gate or the quantum Fourier transform gate. (5) Measure the output register which is a part of the register. Mesure the values of the qubits of the output register (there may be only one qubit). Note: A quantum program may be included in a classical program as a subroutine.

44 . 1

slide-124
SLIDE 124

DS1992 D. Deutsch and R. Jozsa: Rapid solutions of problems by quantum computation. Proceedings

  • f the Royal Society of London A. 439 (1907): 553–558, 1992.

. See also . https://doi.org/10.1098%2Frspa.1992.0167 https://en.wikipedia.org/wiki/Deutsch%E2%80%93Jozsa_algorithm

45 . 1

slide-125
SLIDE 125

Deutsch-Jozsa problem statement Deutsch-Jozsa problem statement

We have some unknown function . But we know that the function is either constant (0 on all outputs or 1 on all outputs) or balanced (returns 1 for half of the input domain and 0 for the other half). The task then is to determine if is constant or balanced on the input values.

Deutsch-Jozsa problem classical solution Deutsch-Jozsa problem classical solution

In the best case, one needs measurements on different input values to be sure that is unbalanced. After measurements on different input values choosen randomly, if one obtains different output values, one is sure that is unbalanced. If one obtains the same output value, one can suppose that is constant. If is unbalanced, the probability of error is . For , . In the worst case, one needs measurements on different input values to be sure that is constant or unbalanced.

45 . 2

slide-126
SLIDE 126

Deutsch-Jozsa quantum algorithm Deutsch-Jozsa quantum algorithm

The Deutsch-Jozsa algorithm uses the quantum oracle gate with the function . (1) Prepare qubits with value: . (2) Apply the quantum Hadamard transform gate on : (3) Apply the quantum oracle gate

  • n

: We note and .

45 . 3

slide-127
SLIDE 127

(4) Apply the quantum Hadamard transform gate on

  • nly:

(5) Probability to measure : If is constant, (constructive interference), else is balanced and (destructive interference). One quantum measurement is enough!

45 . 4

slide-128
SLIDE 128

Diagram of the Deutsch-Jozsa quantum algorithm

45 . 5

slide-129
SLIDE 129

In [28]: def DeutschJoszaAlgo(nbExp,f): n = int(np.log2(len(truthtable))) res="f={}\nIs f constant with {} experiments?\n".format(f,nbExp) mtrix = matrixOracle(f,1) for i in range(0,nbExp): # Test 'nbExp' times x = createQuregister(n,0) y = createQubit(1) QG.All(QG.H) | x QG.H | y QG.MatrixGate(mtrix) | (y, x) QG.All(QG.H) | x rx = measureQuregister(x) ry = measureQuregister(y) # theoretically useless... if (rx==0): p=1 else: p=0 res+=("{} ").format(p) return res nbExp = 32 truthtable = [1,1,1,1,1,1,1,1] print(DeutschJoszaAlgo(nbExp,truthtable)+"\n") truthtable = [0,1,1,1,0,1,0,0] print(DeutschJoszaAlgo(nbExp,truthtable)+"\n") f=[1, 1, 1, 1, 1, 1, 1, 1] Is f constant with 32 experiments? 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 f=[0, 1, 1, 1, 0, 1, 0, 0] Is f constant with 32 experiments? 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

45 . 6

slide-130
SLIDE 130

Deutsch-Jozsa algorithm on Quirk Realization with ( ), ( ) or ( ): http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.DJalgo.htm

45 . 7

slide-131
SLIDE 131

Sho1994 P. W. Shor: Algorithms for quantum computation: discrete logarithms and factoring. Proceedings 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, USA, 1994,

  • pp. 124-134.

. See also . https://doi.org/10.1109%2Fsfcs.1994.365700 https://en.wikipedia.org/wiki/Shor%27s_algorithm

46 . 1

slide-132
SLIDE 132

Integer factorization problem statement Integer factorization problem statement

Given an odd composite number which is not a power of a prime, find an integer , , that divides N. If is even, this is trivial. If is a power of a prime, this can be tested by checking that is not an integer for any .

Integer factorization problem classical solution Integer factorization problem classical solution

See . https://en.wikipedia.org/wiki/Integer_factorization#Current_state_of_the_art The number of bits for is . There is no known algorithm that is polynomial in time, i.e., they are slower than , for any . There are published algorithms that are faster than for all positive , i.e., they are sub- exponential. The best published asymptotic running time is for the general number field sieve (GNFS) algorithm, which is .

46 . 2

slide-133
SLIDE 133

Classical part of Shor's algorithm Classical part of Shor's algorithm

(1) Pick a random number (2) Compute , the greatest common divisor of and . This may be done using the Euclidean algorithm. (3) If , then this number is a nontrivial factor of and we are done. (4) Otherwise, use the quantum period-search subroutine to find , which denotes the period of the following function: , i.e., the smallest such as (5) If is odd, then go back to step 1. (6) If , then go back to step 1. (7) Otherwise, at least one of and is a nontrivial factor of N and we are done. Indeed: with (step 6) and (step 4).

46 . 3

slide-134
SLIDE 134

Quantum period-search subroutine of Shor's algorithm Quantum period-search subroutine of Shor's algorithm

For this subroutine, and are given. Find such that , which implies that . The Shor's algorithm uses the quantum oracle gate with the function . (1) Prepare qubits with value: . (2) Apply the quantum Hadamard transform gate on the first half of the qubits of : (3) Apply the quantum oracle gate

  • n

:

46 . 4

slide-135
SLIDE 135

(4) Apply the quantum Fourier transform gate on the first half of the qubits of

  • nly, with

: (5) Probability to measure : is periodic, so if is the period, and , , which is maximal if , i.e., close to an integer. The probability to mesure such as is very high .

46 . 5

slide-136
SLIDE 136

(6) Performing classical continued fraction expansion on : with and . Put in irreducible form. With high probability . (7) Check classically if . If yes: . If not: (i) Try some multiple of : (cases when is not irreductible). (ii) Try with , , ..., , (cases when but ). If yes: If not: back to step (1) of the classical part of this quantum period-search subroutine.

46 . 6

slide-137
SLIDE 137

Diagram of the period-search quantum subroutine of Shor's algorithm

46 . 7

slide-138
SLIDE 138

Complexity of Shor's quantum algorithm Classical (GNFS): . Quantum (Shor): .

46 . 8

slide-139
SLIDE 139

Shor's quantum algorithm on Quirk http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.ShorAlgo.htm

46 . 9

slide-140
SLIDE 140

Gro1996] Grover L.K.: A fast quantum mechanical algorithm for database search. Proceedings 28th Annual ACM Symposium on the Theory of Computing, (May 1996) p. 212. See . https://arxiv.org/abs/quant-ph/9605043 https://en.wikipedia.org/wiki/Grover%27s_algorithm

47 . 1

slide-141
SLIDE 141

Problem: Find the unique input to a black box function that produces a particular output value (function inversion): such as , with . Efficiency: evaluations with probability vs. evaluations for the classical solution. Applications: It could be used to reverse-engineer cryptographic hash functions.

47 . 2

slide-142
SLIDE 142

Diagram of the Grover's search quantum algorithm

47 . 3

slide-143
SLIDE 143

Grover's search quantum algorithm on Quirk http://ludovic-noirie.fr/sciences/quantum-computing/link/Quirk.GroverAlgo.htm

47 . 4

slide-144
SLIDE 144

There are many quantum algorithms that are better than the classical algorithms to solve the same given problems. See a list in . Another quite exhaustive list at https://en.wikipedia.org/wiki/Quantum_algorithm http://quantumalgorithmzoo.org/ Applications: number factorization, function inversion, solution search, solution counting, quantum walk, quantum simulation, optimization, combinatorial optimization, linear systems, linear differential equation solving, least-squares fitting, machine learning, big data analysis, ...

48 . 1

slide-145
SLIDE 145

Quantum phase estimation Quantum phase estimation

See . https://en.wikipedia.org/wiki/Quantum_phase_estimation_algorithm Problem: Find an eigenvalue of a unitary operator, i.e., the phase of an eignevalue, because the absolute value of any eigenvalue of a unitary operator is 1. Applications: Shor's algorithm uses in fact the quantum phase estimation algorithm. Other quantum algorithms use it too...

48 . 2

slide-146
SLIDE 146

Quantum counting algorithm Quantum counting algorithm

See . https://en.wikipedia.org/wiki/Quantum_counting_algorithm Problem: Count the number

  • f solutions for a given search problem.

Relation with other quantum algorithms: The algorithm is based on the quantum phase estimation algorithm and on Grover's search algorithm. Applications: Grover's search algorithm for an initially-unknown number of solutions, speeding up NP-complete problems, quantum existence problem (is ?).

48 . 3

slide-147
SLIDE 147

Quantum algorithm for linear systems of equations Quantum algorithm for linear systems of equations

See . https://en.wikipedia.org/wiki/Quantum_algorithm_for_linear_systems_of_equations#Classical_efficiency Problem: is hermitian, is a unitary vector, what is the value of where and is a given

  • perator.

is also supposed to be sparse (see details in the link below). Efficiency: If is the size of the matrix and (the condition number) then the quantum algorithm runs in steps vs. steps for the classical algorithm ( for positive semidefinite matrices). Note: the best classical algorithm to solves is the Gaussian elimination which runs in . Applications: Linear differential equation solving, least-squares fitting, machine learning and big data analysis.

48 . 4

slide-148
SLIDE 148

Quantum walk Quantum walk

See . https://en.wikipedia.org/wiki/Quantum_wall Problem: Consider an undirected graph with vertices with a subset

  • f "marked" vertices: find a marked

vertex. Random walk algorithm: (0) Start at some specific vertex of the graph. (1) Check if and stop if yes (2) Random walk if not: choose one of its neighbors at random, set to be that neighbor, go back to step (1).

48 . 5

slide-149
SLIDE 149

Efficiency: is ratio of marked vertices and is the spectral gap of the random walk transition matrix (bistochastic: ) . Classical random walk cost

  • vs. Quantum random walk cost

. Applications: Quantum walks give polynomial speedups over classical algorithms for many practical problems, such as the element distinctness problem, the triangle finding problem, and evaluating NAND trees. The Grover's search algorithm can also be viewed as a quantum walk algorithm on a complete graph.

48 . 6

slide-150
SLIDE 150

Quantum simulation Quantum simulation

See . https://en.wikipedia.org/wiki/Quantum_simulator Problem (and applications): Study quantum systems that are difficult to study in the laboratory and impossible to model with a classical supercomputer. Classical supercomputers are inadequate for simulating quantum systems with as few as 30 particles History of quantum simulators: A universal quantum simulator is a quantum computer proposed by Yuri Manin in 1980 and Richard Feynman in 1982. Feynman showed that a classical Turing machine would experience an exponential slowdown when simulating quantum phenomena, while his hypothetical universal quantum simulator would not. David Deutsch in 1985, took the ideas further and described a universal quantum computer. Deu1985 D. Deutsch: Quantum theory, the Church-Turing principle, and the universal quantum Turing

  • machine. In Proceedings of the Royal Society of London, volume A400, pages 97-117, 1985.

https://doi.org/10.1098%2Frspa.1985.0070 In 1996, Seth Lloyd showed that a standard quantum computer can be programmed to simulate any local quantum system efficiently. LLo1996 S. Lloyd: "Universal quantum simulators". Science, 273(5278):1073–8, 1996. https://doi.org/10.1126%2Fscience.273.5278.1073

48 . 7

slide-151
SLIDE 151

49 . 1

slide-152
SLIDE 152

From Superconducting quantum computing: qubit implemented by the state of small superconducting circuits (Josephson junctions) Trapped ion quantum computer: qubit implemented by the internal state of trapped ions Optical lattices: qubit implemented by internal states of neutral atoms trapped in an optical lattice Quantum dot computer, spin-based (e.g. the Loss-DiVincenzo quantum computer): qubit given by the spin states of trapped electrons Quantum dot computer, spatial-based: qubit given by electron position in double quantum dot Coupled Quantum Wire: qubit implemented by a pair of Quantum Wires coupled by a Quantum Point Contact Nuclear magnetic resonance quantum computer (NMRQC) implemented with the nuclear magnetic resonance of molecules in solution, where qubits are provided by nuclear spins within the dissolved molecule and probed with radio waves Solid-state NMR Kane quantum computers: qubit realized by the nuclear spin state of phosphorus donors in silicon Electrons-on-helium quantum computers: qubit is the electron spin https://en.wikipedia.org/wiki/Quantum_computing#Physical_realizations

50 . 1

slide-153
SLIDE 153

Cavity quantum electrodynamics (CQED): qubit provided by the internal state of trapped atoms coupled to high-finesse cavities Molecular magnet: qubit given by spin states Fullerene-based ESR quantum computer: qubit based on the electronic spin of atoms or molecules encased in fullerenes Linear optical quantum computer: qubits realized by processing states of different modes of light through linear elements e.g. mirrors, beam splitters and phase shifters Diamond-based quantum computer: qubit realized by the electronic or nuclear spin of nitrogen- vacancy centers in diamond Bose-Einstein condensate-based quantum computer Transistor-based quantum computer – string quantum computers with entrainment of positive holes using an electrostatic trap Rare-earth-metal-ion-doped inorganic crystal based quantum computers: qubit realized by the internal electronic state of dopants in optical fibers Metallic-like carbon nanospheres based quantum computers A large number of candidates demonstrates that the topic, in spite of rapid progress, is still in its infancy.

51 . 1

slide-154
SLIDE 154

See See also by Olivier Ezratty: https://en.wikipedia.org/wiki/List_of_quantum_processors https://www.frenchweb.fr/comprendre-linformatique-quantique-panorama-des-acteurs D-Wave 2000Q (2017): 2048 qubits (2011: 128 qubits), fidelity = ??? Annealing quantum processors (usable only for combinatorial optimization problems with many local minima) Use of Josephson junctions (T°<0.015K, 25 kW) Google Bristlecone (2018): 72 qubits, fidelity Gate model (universal) quantum processors Superconducting circuits IBM Q 20 Tokyo (2017) 20 qubits (prototype 50 qubits), fidelity Gate model (universal) quantum processors Superconducting circuits Rigetti 19Q Acorn (2017): 19 qubits, fidelity = ??? Gate model (universal) quantum processors Aluminium circuits on a silicon wafer? Superconducting circuits? The construction of a quantum computer: beyond the publicity stunts, a nice puzzle (C-NET, 2019/05/14) http://ludovic-noirie.fr/sciences/quantum-computing/link/CNET.20190514.htm

52 . 1

slide-155
SLIDE 155

Simulating generic quantum computers Simulating generic quantum computers

Very limited size of simulated generic quantum computers: qubits gives values and unitary

  • perators with

complex coefficients. qubits number of atoms in the observable universe... RAM required to store -qubit register: complex numbers real numbers bytes (double precision) 16 qubits: 1 GB 32 qubits: 64 GB 48 qubits: 4096 TB Some references for simulated generic quantum computers IBM cloud simulator "statevector to 32Q": 32 qubits Qiskit IBM on your PC: ??? qubits (probably ) https://www.ibm.com/quantum-computing/technology/simulator https://qiskit.org/ https://github.com/Qiskit

53 . 1

slide-156
SLIDE 156

Simulating specific quantum computers Simulating specific quantum computers

Gottesman–Knill theorem A quantum circuit using only the following elements can be simulated efficiently on a classical computer: (1) Preparation of qubits in computational basis states (2) Quantum gates from the Clifford group: Hadamard gates, controlled NOT gates, phase gates. (3) Measurements in the computational basis Several important types of quantum algorithms use only Clifford gates, most importantly the standard algorithms for entanglement purification and for quantum error correction. From a practical point of view, stabilizer circuits have been simulated in time using the graph state formalism. qubits with gates in few hours in 2004.

53 . 2

slide-157
SLIDE 157

References for simulated specific quantum computers CHP: CNOT-Hadamard-Phase Got1998 D. Gottesman: The Heisenberg Representation of Quantum Computers. arXiv:quant- ph/9807006v1, 1998. AF2004 S. Aaronson, D. Gottesman: Improved simulation of stabilizer circuits. Phys. Rev. A. 70(5):052328, 2004. IBM cloud simulator "stabilizer to 50,000Q - coming soon": 50000 qubits stabilizer IBM cloud simulator "extended-stablizer to 63Q - coming soon": 63 qubits stabilizer https://en.wikipedia.org/wiki/Gottesman%E2%80%93Knill_theorem https://www.scottaaronson.com/chp/ https://arxiv.org/abs/quant-ph/9807006v1 https://arxiv.org/abs/quant-ph/0406196 https://www.ibm.com/quantum-computing/technology/simulator https://www.ibm.com/quantum-computing/technology/simulator

53 . 3

slide-158
SLIDE 158

(1) A quantum computer can theoretically find a solution to some problem faster than classical computers: see the examples of quantum algorithms. (2) Quantum computer does not consume energy during quantum processing, but just for the preparation (initialization) and the measurement (output measurement): The system is isolated and its evolution is governed by the Schrödinger equation (reversible), which conserves the energy. Proof: Consider a basis , ( for a register of n qubits), of eigenvectors of the Hamiltonian (the Hamiltonian does not depends on time for isolated systems), with eigenvalues (energy of state ). At any time , . The Schrödinger equation gives Thus we have and the probability to measure the energy is constant.

54 . 1

slide-159
SLIDE 159

(3) Quantum computation and telecommunication systems cannot be spied. If Eve intercepts a qubit and makes a measurement, it changes its state: this can be detected by Alice and/or Bob. Thanks to the no-cloning theorem, Eve cannot make a copy of an unknown qubit. Main application: quantum cryptography using "BB84" protocol (quantum key distribution - QKD): BB1984 C. H. Bennett, G. Brassard, Giles: Quantum cryptography: Public key distribution and coin

  • tossing. Proceedings of IEEE International Conference on Computers, Systems and Signal Processing,

175: 8, 1984. https://en.wikipedia.org/wiki/BB84 Today's capabilities for quantum cryptography: over ~100km fiber length without "quantum repeater". 1 Mbit/s over 50km standard fiber in 2014: 2014 L. C. Comandar, B. Fröhlich, M. Lucamarini, K. A. Patel, A. W. Sharp, J. F. Dynes, Z. L. Yuan, R.

  • V. Penty, and A. J. Shields: Room temperature single-photon detectors for high bit rate quantum key

distribution, Appl. Phys. Lett. 104, 021101, 2014. https://doi.org/10.1063/1.4855515 Cerberis3 QKD System commercially available, ~ 1.4 kbit/s at 50 km ID Quantique, SK Telecom & Nokia Secure Optical Transport System Using Quantum Key Distribution (QKD), 2018 https://www.idquantique.com/idq-sk-telecom-nokia-secure-optical-transport-system-using-qkd/ See https://en.wikipedia.org/wiki/Quantum_cryptography

55 . 1

slide-160
SLIDE 160

Difficulty to design efficient and usable quantum algorithms Difficulty to design efficient and usable quantum algorithms

Quantum computing algorithm design is very different to classical computing: one needs to think (very) differently. Even for known algorithms: "Oracle gates" implementation is not trivial...

56 . 1

slide-161
SLIDE 161

Requirements for a usable quantum computer Requirements for a usable quantum computer

Div2000 D. P. DiVincenzo,: The Physical Implementation of Quantum Computation. Fortschritte der Physik, 48(9–11):771–783, 2000. (1) A scalable physical system with well characterized qubits (usable large number of qubits) (2) The ability to initialize the state of the qubits to a simple fiducial state, such as (initialization problem) (3) Long relevant decoherence times, much longer than the gate operation time (problem of decoherence) (4) A "universal" set of quantum gates (ability to make any quantum gate) (5) A qubit-specific measurement capability (qubits easy to read without errors)

57 . 1

slide-162
SLIDE 162

Quantum decoherence Quantum decoherence

Quantum coherence occurs because of (non-avoidable) interactions of any quantum system with the external world. Quantum coherence change the state of the quantum register in some irreversible ways (it acts like measurements: it partly break the superposition of entangled states). Amplification cannot be used: no-cloning theorem! Quantum threshold theorem: A quantum computer with a physical error rate below a certain threshold can, through application of quantum error correction schemes, suppress the logical error rate to arbitrarily low levels. Current estimates put the threshold for the surface code on the order of 1%. At a 0.1% probability of a depolarizing error, the surface code would require approximately 1000-10000 physical qubits per logical data qubit, though more pathological error types could change this figure drastically. https://en.wikipedia.org/wiki/Quantum_threshold_theorem A very different approach to the stability-decoherence problem is to create a topological quantum computer with anyons, quasi-particles used as threads and relying on braid theory to form stable logic gates.

58 . 1

slide-163
SLIDE 163

Some skepticism about quantum computers Some skepticism about quantum computers

Gil Kalai (Hebrew University in Jerusalem): The Argument Against Quantum Computers, interview Quanta Magazine, 2018/02/07 "I think that the effort required to obtain a low enough error level for any implementation of universal quantum circuits increases exponentially with the number of qubits, and thus, quantum computers are not possible". http://ludovic-noirie.fr/sciences/quantum-computing/link/QMag.20180207.htm Mikhail Dyakonov (Univ. Montpellier): The Case Against Quantum Computing, IEEE Spectrum, 2018/11/15 "Could we ever learn to control the more than continuously variable parameters defining the quantum state of such a system? My answer is simple. No, never." http://ludovic-noirie.fr/sciences/quantum-computing/link/IEEEsp.20181115.htm David Schneider: The U.S. National Academies Reports on the Prospects for Quantum Computing, IEEE Spectrum, 2018/12/05 "The report summary makes clear that the challenges are enormous and that 'there is no guarantee that all of these challenges will be overcome'". "'Quantum computing is valuable for driving foundational research that will help advance humanity’s understanding of the universe. As with all foundational scientific research, discoveries in this field could lead to transformative new knowledge and applications.'" http://ludovic-noirie.fr/sciences/quantum-computing/link/IEEEsp.20181205.htm

59 . 1

slide-164
SLIDE 164

http://ludovic-noirie.fr/sciences/quantum-computing

60 . 1