<<

Quantum computing (QC) Overview

September 2018

Dr. Sunil Dixit Technical Fellow Why is QC Important?

2 Classical Realm

3 Classical Physics Assumptions

• The universe is a giant machine

• All nonuniform motion and action have cause – Uniform motion does not have cause (principle of inertia)

• If the state of motion is known now then past and future states are accurately predictable because the universe is predictable

• Light is a wave described completely by Maxwell’s electromagnetic equations

• Waves and particles are distinct

• A measurement can be accurately made and errors corrected caused by the measurement tool

4 Single Slit – Classical Marbles

5 Double Slits – Classical Marbles

6 Single Slit – Classical Waves

7 Double Slit – Classical Waves

8 Quantum Realm

9 Single Slit – Quantum

10 Double Slits – Quantum Electrons

11 Double Slit – Shoot One At A Time

12 Double Slits – Quantum Electrons With Observer (Measure At One Slit)

13 Computational Capacity in the Universe

• Maximum possible quantum logic • Provides upper bounds computational operations: capacity performed by all matter since the • With gravitational degrees of freedom Universe began taken into account • Provides lower bounds of a quantum t required to simulate the entire 10120 t 2 Universe required operations and bits p • If the entire Universe performs a t 1010 years is the age of the universe computation, these numbers give the numbers of operations and bits in that with t Gh / c5  5.391  10 44 sec p computation is Planck time (the time scale at which gravitational effects are the same order as the quantum effects) • With registered quantum fields alone:

t 90 3/4 10 t p

*Seth Lloyd, “Computational Capacity of the Universe”, Phys. Rev. Letters, 88(23), 2002 14 https://en.wikipedia.org/wiki/Observable_universe Principles

15 Quantum Principles Important For QC

• Mathematics – Primarily Linear Algebra See Backup Slides – Mathematical Notation – the Dirac Notation

• Superposition

• Information Representation

• Uncertainty Principle

• Entanglement

• 6 Postulates of

16 Quantum Superposition & Uncertainty Principle h Et   2

17 Representation

• Physical Representation (Superposition and Entanglement) – Electrons Up / Spin Down Quantum Dots – Nuclear Spins Trapped Ions Optical Lattices • Nuclear Magnetic Resonance – Polarization of Light / Photons – Optical Lattices – Semiconductor Quantum DOT – Semiconductor Josephson Junctions – Ion Traps – Others

• Classical Representation – BIT (0,1)

• Quantum Representation – Quantum BIT () BLOCH representation of a qubit

rBLOCH rˆ x, ˆ y , r ˆ z   sin cos  ,sin  sin  ,cos   18 Electrons

19 Quantum Entanglement Photons

20 Quantum Entanglement (continued)

• Start with 2-: 0| 0  1 |1and  0 | 0  1 |1 – Both are their basis states

• How do we entangle them mathematically? – Take the tensor product between the states

0| 0  1 |1   0 | 0   1 |1 

0  0| 00   0  1 | 01   1  0 |10   1  1 |11

• 2-qubits in arbitrary states cannot be decomposed into their separate qubit 1 state. As an example, one of the Bell state |   | 00 |11 , cannot be 2 separated into its individual qubit state

• Einstein called entanglement as “spooky action at a distance,” as it appeared to violate the speed limit of information transmission in theory of relativity (i.e., “c” the velocity of light)

21 Qubit & Nuclear Spin Nuclear Magnetic Resonance

22 6 Postulates of QM deferred to backup slides

23 Basic Classical & Quantum Computer Operations & Flowchart Of Quantum Control

Control of quantum operations

Classical Quantum Computer Processor (Master) (Slave)

Results of Measurements Input x Output y n-bit n-bit string string

 • Classically Quantum Mechanics y measurements only Exponential Superposition reveal n-bits of May Repeat information • Probability of 100-bit “Quantification 2 Classical Manipulate Measure string y is |αy| ; new ”- n qubits in Classical Input Apply Gates state | x  Output state post transformed measurement is |y via superposition May Repeat

24 Quantum computer image from: Nature 519, 66–69 (05 March 2015) doi:10.1038/nature14270 Physical Quantum Computer

D-Wave

IBM

1000?

D-Wave Markets 1000 qubit for IBM 5 Qubit Microsoft $10M - $15M 25 Quantum Computing Models

26 Models of Quantum Computing

Model Description

QC Circuits / Gates

Adiabatic QC (Vary Hamiltonians slowly from initial to final state) s = (1/T) ˆ H(1  s ) Hinitial  sH final

Topological QC (World lines of particles positioned in a plane with time flowing downwards) Computational power of Anyons Measurement Based QC (Cluster States, Tomography) (local measurement is the only operation needed) 27 Quantum Circuits & Gates

28 Quantum Circuits Quantum Circuits Error Corrections

Gate Graphical Mathematical Form Comments

1000  CNOT gate is a generalized XOR gate: its action 0100 on a bipartite state |A,B> is |A, B  A>, where CNOT 0001  is addition modulo 2 (an XOR operation) 0010 1 0 0 0 Swaps states:  ,,       0 0 1 0 SWAP 0 1 0 0  0 0 0 1 1111 H-gate (square root NOT gate) is an 2 Hadamard xz idempotent operator: H = I. It transforms the 2211 computational basis into equal superpositions.   XYZ,, Quantum NOT is identical to σx => leaves |0> Pauli X, Y, Z 0 1   0i   1 0  invariant and changes the sign of |1>.  ,,     Rotations about the X, Y, Z axis 1 0  i 0   0 1   10 Applies a phase shift to the target qubit.  i T-Gate  e 4 | 00 remains same i  8 4 i 0 e e 4 |11 target qubit phase shift 1 0   0 0  Measurement collapses the superposed Measurement  ,   quantum states 0 0   0 1 

Qubit Wire = single qubit

n Qubits Wire with n qubits

Classical bit Double wire = single bit 29 {H, T, and CNOT} are called the “Standard Set.” Others in charts below Properties of Quantum Circuits

• Are not acyclic (no loops)

• No FANIN. This implies that the circuit is not reversible; does not obey unitary operation

• No FANOUT. Cannot copy the qubit’s state during the computational phase – No-Cloning Theorem • No copies of qubits in superposition (produces a multipartite entangled state)

| |||      |0   |1   |0   |1   |0   |1; NOT ALLOWED | 0  |1   | 0   |1   | 0   |1   | 000   |111  |   ; Entangled 3qubits  |  |

30 IBM 5-Qubit Quantum Computer Using Toffoli Gates – Freely Available Quantum Computing

5Q SQRT(Toffoli) State Timeline for IBM 17-qubit computer is unknown

3Q Toffoli State Uses QASM (IBM Q) Assembler or SDK (Python code) discussed later, for producing the QC circuit results

31 https://quantumexperience.ng.bluemix.net/qx/editor Multi Qubit Gates (continued)

12) Qubit Teleportation Circuit An arbitrary qubit is transferred from one location to another. In literature ALICE and BOB example is commonly utilized. Teleportation takes two classical bits to one . | H Alice Space Bob | AALICE

| BBOB | 

Squiggly lines correspond to movement of qubits. Straight reconstruct | lines correspond to movement of bits Step 4

moves from the lower left hand corner from Alice to Bob

in the upper right hand corner. Time

Only two classical bits remain with Alice in Step 4. Step 3 measure SINGLE QUANTUM PARTICLE IS TELEPORTED

Alice sends (with speed < speed of light) the two classical bits to Bob along a classical channel. Without these Bob will not know what he has received Step 2 | ,A interact Entanglement, as well, is not transported faster than the speed of light despite its undisputable magic

Infinite amount of information is passed with the qubit, however once Bob measures he can only get one bit of AB, entangled information Step 1 32 Video Quantum-Kit Simulation: https://en.wikipedia.org/wiki/Quantum_teleportation#/media/File:Quantum_Teleportation.gif

33 Quantum Computing Programming Languages

34 QC Programming Languages and QC Simulators

Product Description Website

QCL C like syntax and complete. The current version of http://tph.tuwien.ac.at/~oemer/qcl.html QCL is 0.6.4 (Mar 27 2014), Source Distribution: qcl- 0.6.4 (gcc 4.7 / gnu++98 compliant), Binary Distribution (64 bit): qcl-0.6.4-x86_64-linux-gnu.tgz (AMD64, Linux 3.2, glibc2.13) QASM Assembler: Maps directly to model https://www.media.mit.edu/quanta/qasm2circ/ instructions https://qiskit.org/documentation/quickstart.html MIT: qasm2circ; QISKit: openQASM QISKit SDK QISKit, a quantum program is an array of quantum https://qiskit.org/documentation/quickstart.html Terra–Python circuits developed by IBM. Python program code https://github.com/QISKit/qiskit-terra API-Python workflow consists of three stages: Build, Compile, https://github.com/QISKit/qiskit-api-py and Run. Q# Is a C# like language https://www.microsoft.com/en- developed by Microsoft. It come with a quantum us/quantum/development-kit simulator in the quantum development kit. CodeProject Is a Java quantum code project https://www.codeproject.com/Articles/1130092/Java- based-Quantum-Computing-library Quantum-Kit Is a graphical quantum circuit simulator https://sites.google.com/view/quantum-kit/home Other Simulators C/C++, CaML, Ocaml, F#, GUI based, Java, https://quantiki.org/wiki/list-qc-simulators in various Javascript, Julia, Maple, Mathematica, Maxima, languages and Matlab/Octave, .NET, Online Services, Perl/PH,P, tools Python, Rust, and Scheme/Haskell/LISP/ML Other Languages See Wikipedia https://en.wikipedia.org/wiki/Quantum_programming

35 Simple QSAM Example Using QRAM Model

ۄINITIALIZE R 2 Allocates register R to 2 qubits and initializes to |00 U TENSOR H H 1 1 1 1  APPLY U R 1 1 1 1 1 UHH    MEASURE R RES 2 1 1 1 1  1 1 1 1

Measures the q-register R and 1 stores in bit array RES. What is 2 the probability for the ground  1 1 1 1  1  1 state (i.e., expectation value)?     1 1 1 1 0 2 1    2 11   from coefficient of | 00 : 0.25 2 1 1 1 1  0  1 24     1 1 1 1  0  2 Parallel application of H to 1 the 2-qubits puts the  register R in a balanced 2 superposition of four basis 1 1 1 1 states | 00  | 01  |10  |11 36 2 2 2 2 Quantum

37 Quantum Computing Algorithms (continued)

Algorithm Description Reference

Algorithms Based on QFT Shor’s; O n2 log N 3 Integer factorization (given integer N find its Peter W. Shor, “Algorithms for Quantum Computation Discrete Log and Factoring,”     prime numbers); discrete logarithms, hidden AT&T Bell Labs, [email protected] subgroup problem, and order finding Simon’s; exponential Exponential quantum-classical separation. Simon, D.R. (1995), "On the power of quantum computation", Foundations of Searches for patterns in functions Computer Science, 1996 Proceedings., 35th Annual Symposium on: 116–123, retrieved 2011-06-06 Deutsch’s, Deutsch’s – Jozsa, an Depicts quantum parallelism and David Deutsch (1985). "Quantum Theory, the Church-Turing Principle and the extension Deutsch’s superposition. “Black Box” inside. Can Universal Quantum Computer". Proceedings of the Royal Society of London A. 400: evaluate the input function, but cannot see if 97 the function is balanced or constant David Deutsch and Richard Jozsa (1992). "Rapid solutions of problems by quantum computation". Proceedings of the Royal Society of London A. 439: 553 Bernstein/Vazirani; polynomial Superpolynomial quantum-classical separation Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. In Proc. 25th STOC, pages 11–20, 1993 Kitaev Abelian hidden subgroup problem A. Yu. Kitaev. Quantum measurements and the Abelian stabilizer problem, arXiv:quant-/9511026, 1995 van Dam/Hallgren Quadratic character problems Wim van Dam, Sean Hallgren, Efficient Quantum Algorithms for Shifted Quadratic Character Problems. CoRR quant-ph/0011067 (2000)

Watrous Algorithms for solvable groups John Watrous, Quantum algorithms for solvable groups, arXiv:quant- ph/0011023, (2001) Hallgren Pell’s equation Sean Hallgren. Polynomial-time quantum algorithms for pell’s equation and the principal ideal problem, Proceedings of the thirty-fourth annual ACM symposium on the theory of computing, pages 653–658. ACM Press, 2002. Algorithms Based on

Grover’s; Search algorithm from an unordered list Lov Grover, A fast quantum mechanical algorithm for database search, In (database) for a marked element, and Proceedings of 28th ACM Symposium on Theory of Computing, pages 212–219, statistical analysis 1996 Traveling Salesman Problem; ON  Special case of Grover’s algorithm https://en.wikipedia.org/wiki/Travelling_salesman_problem

Machine Learning Quantum Particle Swarm Optimization (QPSO) 38 Quantum Algorithms (continued) Machine Learning Applications

Quantum Algorithm Grover’s Execution Quality of Quantum Quantum Reference Algorithm Improvement Learning Computer States?# Applied?* vs. Classical Algorithm Implementation Studied Neural networks Yes Numerical Yes No 1 Boosting No Quadratic Analytical Yes No 2 K-medians Yes Quadratic No No No 3 K-means Optional Exponential No No Yes 4 Principal No Exponential No No Yes 5 components Hierarchical Yes Quadratic No No No 6 clustering Associative memory Yes No No No 7 No No No 8 Support vector Yes Quadratic Analytical No No 9 machines No Exponential No No Yes 10 Nearest neighbors Yes Quadratic Numerical No No 11

Regression No No No Yes 12

Hidden Markov No No No No 13 Chains Bayesian Methods No No No No 14

39 *Grover’s search or extension used; #Input or output were both quantum states vs. classical vectors Most topics from: Peter Wittek, “ Learning”, Elsevier Insights, 2014 Summary

40 Summary

• Develop / reuse quantum gates tailored to PHM – Creating “Oracles” are a very useful technique – Note: QC gates in series accumulate errors (described earlier) • Tailor algorithms for PHM algorithms • “Quantum particle swarm optimization (QPSO)” appears to be a good candidate for dynamic degraded state prognostics (tracks dynamic changes to a particle in its local focus specified by the characteristics length vector of the swarm in some Hamiltonian potential {E+V( r )}. Implementation on a quantum computer? Develop technology / gates / methods to do QPSO on quantum computers. • Consider “adiabatic quantum computing” as an alternative approach. It is based on the time evolution of a quantum system. A quantum adiabatic process is one in which the initial Hamiltonian evolves slowly to it final Hamiltonian (i.e., the time scale should be proportional to the energy difference between the ground state and the first excited) – For electrons the Hamiltonian can be represented by the Pauli operators • Consider “ quantum computing” that does not rely on quantum gates to do its processing (multi-qubits operations)

41 Treatment of topics discussed here are in Backup Slides Summary (continued)

• Develop quantum computer with superconducting materials at higher temperatures – Apart for space vehicles, current implementations for temperatures < 1.5◦K are not feasible out of large infrastructures

* *

*1 Gigapascal = 9869.2 Atmosphere 42 https://en.wikipedia.org/wiki/Superconductivity & Ref. 15, 16 Summary (continued)

• Is classical cybersecurity safe with the power of quantum computing? – Reference: Lily Chen et al., “Report on Post-”, 2016 http://dx.doi.org/10.6028/NIST.IR.8105

– If DWave 1000/2000 qubits Quantum Computer is a reality, AES and SHA-2/SHA-3 are unsafe

• Is quantum computing cybersecurity safe? – It is possible that we would need methods / techniques to keep Quantum Computers safe? • Still the issue of classical measurements

43 Treatment of topics discussed here are in Backup Slides References

• Videos Papers – Video from 1. Narayanan and Menneer (2000), Quantum artificial neural https://www.youtube.com/watch?v=fwXQjRBLwsQ network architectures and components, Inform Sci., 128(3-4), (Slits Video) 231-255 – https://www.youtube.com/watch?v=815oMDT5g0o 2. Neven et al. (2009), Quantum pattern recognition with liquid- (Superposition Video) state nuclear magnetic resolution, Phys. Rev. A 79, 042321 – https://www.youtube.com/watch?v=9lOWZ0Wv218 3. Aimeur et al. (2013), Quantum speed- for unsupervised (Entanglement Video) learning Mach. Learn., 90(2), 261-287 – https://www.youtube.com/watch?v=zNzzGgr2mhk (Nuclear Magnetic Resonance Video) 4. Lloyd et al. (2013), Quantum algorithms for supervised and unsupervised machine learning, arXiv:1307.0411 – https://www.youtube.com/watch?v=f5vOfr1dl4o (Teleportation Video) 5. Lloyd et al. (2013), Quantum principle component analysis, arXiv:1307.0411 • Quantum Mechanics Books 6. Aimeur et al. (2013), Quantum speed-up for unsupervised – Dirac Notation: “Principles of Quantum Mechanics”, learning Mach. Learn., 90(2), 261-287 Ramamurti Shankar, Plenum Press, New York / London, 1980 7. Ventura and Martinez (2000), Quantum associative memory, Infom. Sci., 124(1), 273-296 – “Lectures on Quantum Mechanics”, Steven Weinberg, Cambridge University Press, New York, 8. Trugenberger (2001), Probabilistic quantum memories, Phys. 2013 Lett., 87, 067901 – “Lectures on Computation”, Richard P. Feynman, 9. Anguita et al. (2003), Quantum optimization for training support Westview Press (1996, reprinted 1999) vector machines, Neural Netw, 16(5), 763-770 • Quantum Computing Books 10.Rebentrost et al. (2013), Quantum support vector machine for big feature and big feature classification, arXiv:1307.0471 – Jun Sun, Choi-Hong Lai, Xiao-Jun Wu, “Particle Swarm Optimisation-Classical and Quantum 11.Wiebe et al. (2014), Quantum nearest neighbor algorithms for Perspective”, Chapman & Hall/CRC Press,2012 machine learning, arXiv:1401.2142 – Peter Wittek, “Quantum Machine Learning”, Elsevier 12.Bisio et al. (2010), Optimal quantum learning of a unitary Insights, 2014 transformation, Phys. Rev. A 81(3), 032324 44 References (continued)

13 Siddarth Srinivasan et al., Learning Hidden Quantum Markov Models, Proceedings of the 21stInternational Conference on Artificial • Various Quantum Computing Websites Intelligence and Statistics (AISTATS) 2018, Lanzarote, Spain. – https://en.wikipedia.org/wiki/Quantum_computing JMLR: W&CP volume 7X – https://qnncloud.com/ 14 Sentís, Gael; Calsamiglia, John; Muñoz-Tapia, Raúl; Bagan, Emilio (2012), Quantum learning of coherent states. EPJ Quantum – https://en.wikipedia.org/wiki/Quantum_machine_learning Technology. 2 (1). doi:10.1140/epjqt/s40507-015-0030-4 – https://en.wikipedia.org/wiki/Quantum_algorithm 15 Zhi-An Ren; et al. (2008), Superconductivity at 55 K in iron-based

F-doped layered quaternary compound Sm[O1-xFx]FeAs, “Chin. Phys. Lett. 25, 2215 (2008) 16. Li, Yinwei; Hao, Jian; Liu, Hanyu; Li, Yanling; Ma, Yanming (2014-05-07), "The metallization and superconductivity of dense hydrogen sulfide". The Journal of Chemical Physics. 140 (17): 174712. arXiv:1402.2721 17 Zhi-An Ren; et al. (2008), ), Superconductivity at 55 K in iron-

based F-doped layered quaternary compound Sm[O1-xFx]FeAs, “Chin. Phys. Lett. 25, 2215 (2008) 18 Gelo Noel M. Tabia (2011), Under a Microscope, American Physical Society March Meeting 2011, Dallas, Texas, United States (21 - 25 March 2011) 19 Frank Wilczek (1982), Phys. Rev. Lett. 49, 957 20 A. Kitaev (2003), Ann. Phys. 303, 2 21 Jacobson, Nathan (2009). Basic Algebra I (2nd ed.). Dover Publications

45 Backup Slides

46 Quantum Mathematics

"Bra " | ; " Ket " | ; • Mathematics † * T – Primarily Linear Algebra | |  |  ;† is Ajoint Operator – Notation Dirac Notation  1 dx * ( x )  ( x ); | , |    |  dx * ( x )  ( x ); | *   |  ; |Hˆˆ |   dx * ( x)) H  ( x ()Acting on an Hamiltonian ; Schrödinger Hamiltonian for th e N particle case (h 6.626  1034 Joule sec) : N ˆ  h 1 2 H nN  V( r12 , r ... r , t ); 2 n1 mn Time dependent Schrödinger Equation  i h(,)(,) r t  Hˆ  r t t

47 More mathematical details in Backup Slides Quantum Mathematics

n Linear Combination: |a  cii | b ; • Mathematics i1 n Linear Independence: c| b 0 iff c  ...  c  0; – Primarily Linear Algebra  i i1 n i1 – Notation Dirac Notation Probability Amplitudes: |  | 0   |1  22 "Bra " | ; " Ket " | ; 1; n † T 2 2 * Norm:|     ; unit vector:   1; | |  |  ;† is Ajoint Operator iii i1 *    1dx  ( x )  ( x ); 1 n  ** * * Inner Product: |    , ... ,  ... ; |   |  ;  |    ;  1 n   ii * | , |   | dx  ( x )  ( x );  i     n 

* 1 |   |  ; ** Outer Product: |  | ...  , ... ,  ;  1 n  ˆˆ*  |H |   dx ()) x H  ( x n Tensor Product:| |   |  |   |  ; (Acting on an Hamilto inna ); ax ay bx by Schrödinger Hamiltonian for th e  a b   x y   av aw bv bw AB       ; N particle case : c d   v w   cx cy dx dy  N cv cw dv dw ˆ  h 1 2  H  nNV( r12 , r ... r , t )  Orthogonality: | 0; 2 n1 mn

Time dependent Schrödinger Equation : Orthonormality :  ij (i , j  1,2,..., n );  ij  0, i  j ; n Trace: tr();  ˆ i1 ii i h(,)(,) r t  H  r t † t Hermitian Operators: ; 48 †  ()anti 6 Postulates of Quantum Mechanics

• Postulate 1: At each instant the state of a physical system is in the space of states ۄ represented by a ket | 휓

• Postulate 2: Every observable attribute of a physical system is described by an operator that acts on the kets that describe the system AAˆˆ:| | ' |  – For every operator, there are special states that are not changed (except for being multiplied by a constant) by the action of an operator ˆ Aa:|aa |

a are eigenstates a is eigenvalue

49 6 Postulates of Quantum Mechanics (continued)

• Postulate 3: The only possible result of the measurement of an observable A is one of the eigenvalues of the corresponding operator 퐴መ

• Postulate 4: When a measurement of an observable A is made on a | generic state , the probability of obtaining an eigenvalue an is given

by the square of the inner product of with the eigenstate | a n is 2 an  , an | is the probability amplitude

50 6 Postulates of Quantum Mechanics (continued)

• Postulate 5: Immediately after the measurement of an observable A

has yielded a value an, the state of the system is the normalized

eigenstate | an

• Postulate 6: The time evolution of a quantum system preserves the normalization of the associated ket. The time evolution of the state ˆ of a quantum system is described by |  ( t )  U ( t , t 00 ) | ( t ) for some unitary operator Uˆ

51 Qubit Processor Architectures

4 8 1000?

2 17

D-Wave Markets 1000 qubit computers for $10M - $15M

IBM 5 Qubit Microsoft 52 Physical Quantum Computer

D-Wave

IBM

Microsoft 53 CMC Microelectronics Quantum & Classical Systems Integration Quantum Random Access Memory (QRAM)

Quantum Register is an interface to an addressable sequence of qubits.. QRAM: In QRAM, the address and output registers are composed of qubits. The address register bk| contains a superposition of addresses:  k a and the output registers post superposition of k b|| k D information correlated with the address register:  kk ad k QRAM Model: “Bucket-brigade”, architecture optimizes the retrieval of data to O(log 2n) switches where “n” is the number of qubits in the address register. The basis of the architecture is to have qutrits instead of qubits allocated to the nodes of a bifurcation graph. “011” memory cell is an address register. • Quantum Entropy: measure of information Bifurcation Graph contained in a quantum system (von Neumann 0 Root Node entropy): S( )  tr (  log  )    log  , right 22 ii 1 i where  are the members of the set of eigenvalues of i and 0 log 0 0; S ( ) is nonnegative, maximum for mixed states 2 left For qubits 0SS ( ) 1 ; ( ) provides information in measures of qubits wait • N qubits can store 2N bits of information, e.g., DWave 1000 Qubits computer can store 21000 ~ 1.07x10301 bits

Graph Levels Graph >> 1075 – 1082 atoms in the universe

011 Note, however that N qubits can confer at Memory Cells most N bits of classical information

54 Quantum Random Access Memory (QRAM) (continued)

• |wait>, |left>, and |right> represent three-level quantum system. During each memory call the qutrit is in the |wait> state. The qubits of the address register are sent one by one through the graph and the wait state is transformed into |left> and |right> depending on the current qubit • States not in |wait> states are routed immediately and the results are a superposition of routes • The qutrit computation is to the O(1- €log N) where N is the number of qubits not in |wait> state Bifurcation Graph 0 Root Node

1 right

2 left

wait Graph Levels Graph

011 55 Memory Cells Quantum Circuits

• A quantum circuit consist of – Finite sequence of wires representing qubits or sequences of qubits (quantum registers) – Quantum gates that represent elementary operations from the particular set of operations implemented on a quantum machine – Measurement gates that represent a measurement operation, which is usually executed as the final step of a • It is possible to perform the measurement on each qubit in canonical basis  | 0 ,|1  which corresponds to the measurement of a set of observables – Composite n-qubit circuit obey unitary evolution (every operation on multiple qubits is described by a unitary matrix) – Unitary implies reversibility: it establishes a bijective mapping between input and output bits (with the output and operations, the initial state can be recovered). Since all unitary operators U are invertible with UU1† we can always “un-compute'' (reverse the computation) on a quantum computer 56 Quantum Parallelism

Simple example of Quantum Parallelism • Is there a single operation that |0 H | 0,ff (0) |1, (1) evaluates a single function on at least U two possible inputs to a quantum |0 f 2 | 0 |1 circuit without destroying ; data register superposition? 2 Functionf in basis states : 0,1  0,1 – The results of such an operation is known with appropriate sequence of quantum gates as Quantum Parallelism | ,  transform to |  ,  f (  ) ; qubit is called "data register"; qubit is called "target register". If we apply a

unitary transform Uf with  =0, such that the results becomes | ,f ( ) If we apply a Hadamard Gate on each data register it produces 2n bits with n gates; then

evaluate f with an appropriate Uf gate as in the example, we can generalize for n qubits with |0n | 0 the input state, Quantum Parallelism: 1 | |f ( ) n  57 2  Quantum Circuits (continued) Are one-shot circuits (run once from left to right)

Controlled-Qubit-Uf -Gate Control Line | 1

Input Output States U U f1 f2 U f3

| | 0 |1 | 2 | 3 4 • Circuit represents series of operations and measurements of n-qubit states • Quantum gates U … U are operators that operate on qubits f1 f3 • Each operator above is unitary and described by 2n x 2n matrix (n depends on input states) • Each Line is an abstract wire connecting quantum logic gates (or series of gates) • The meter symbol represents a measurement

58 Single Qubit Gates

1) Qubit NOT-Gate 4) Qubit Pauli I-Gate 5) Qubit Pauli X-, Y-, Representation: Representation: and Z-Gates – Rotations 2 x 2 matrix 2 x 2 matrix about X, Y, and Z axis Representation:2 x 2 01 10 matrix   0 I  10 01 X 01  X X  Constraint: | 0I | 0 10 UUI†  |1I |1 Y ()Identity matrix 10 0 i Input Amplitudes:   | 0  |1 Y Y  01 i 0 221 Z Output Amplitudes: 10 22 ''1  Z Z  01

59 The unitary property provides other potential gates Single Qubit Gates (continued)

4) Qubit Phase S-Gate 5) Qubit 휋 T-Gate 6) Qubit Hadamard 8 H-Gate (square root S T NOT gate) 10 H 10          i  0 i  0 e 4  1 11            2 11   i | 0 i |1 4 | 0 e |1 | 0  |1   | 0  |1      22 Note: S = T2     7) Qubit Rotational R-Gates R R RX Y Z   i  Z cosi sin cos sin Y e 2 0 i X i 2 22i 222  e 2  e   e i   2 isin cos sin cos 0 e 22 22  XYZXYZ,,,,reduced form: cos I i sin ; Identity and Pauli Operators 60 22 Multi Qubit Gates

1) Qubit CNOT-Gate • True quantum gates must be reversible. | Reversibility require a control line which is unaffected by a unitary transformation. Implement by carrying the input with results |  |  •  represent the classical XOR with input on the beta line and the control line in the alpha line | 00CNOT | 00 ; • The gate is a 2 qubit gate represented by a 4 x | 01CNOT | 01 ; 4 matrix |10CNOT |11 ; |11CNOT |10 1000     | 0  |1 |1 CNOT   | 01   |10 ;      0100  0   0  | 0 | 0  |1 CNOT   | 00   | 01 ;  | 00  |11   0001          |1 | 0  |1 CNOT   |11   |10 ; 0010  0   0 

61 2-Qubit CNOT-Gate treatment in Backup Slides Multi Qubit Gates (continued)

2) Controlled X, Y, Z Gates 3) Reversible Circuit 4) Swap Qubit States At end of computation all ancillae retain initial values, except one ancilla bit, designated as the “answer” bit, carries the value of the function | X Y Z 1 Reversible |n

0 f 1,..., n  • CNOT is a controlled-X-gate SWAP12=CNOT12→CNOT21→CNOT12 • SXSᶧ = controlled-Y-gate Ancillae Ancilla bit is a ,,,,                 • HXH = controlled-Z-gate storage/garbage bit 5) Copying Circuits 6) Bell State Circuit  H| ۄ훽|1 + ۄ훼|0 | xx Entangled states |  ۄ0 Only on non-superposed states are produced: 1 | 00  | 00  |11  00 ; | 0  |1 | 0   | 00   |10 ; combined state 2 β00, β01, β10, and | 00  |10 CNOT   | 00   |11 ; 1 β11 | 01  | 01  |10  01 ; not a copy of original state 2 | 0  |1  | 0   |1   | 00   |11 ; 1 |10  | 00  |11  10 ; A qubit in an input unknown state cannot be 2 copied. It must be measured before being copied. The information held in the probability 1 |11  | 01  |10  11 ; amplitudes α and β is lost. 2 62 Equivalent Quantum Gate Operations (some examples)

7) Controlled-U Replaced by Equivalent Single Qubit Gates & CNOT gate C

U A B

Controlled-Unitary Gate Single Qubit Gates: A, B, C 8) Controlled-Pauli X Gate Replaced by Hadamard and Controlled-Pauli Z Gate

X H Z H

9) Controlled-Pauli X Gate Equivalent Circuit

X H H

H X H

63 Multi Qubit Gates (continued)

10) Qubit Toffoli Controlled-CNOT (CCNOT) or Deutsch (휋/2) Gate • Universal reversible gate | | • Fast, stable to imperfections, and has high |  fidelity for fault-tolerant quantum computation |  • Control qubits remain unaffected |  |  |  |  • Third target qubit is flipped if both control |  lines are set to 1, else it is left alone.

= Implementation U √푼 √푼ᶧ √푼 1 0 0 0 0 0 0 0  Toffoli Matrix : 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0  | 000 000 |  | 001 001|  | 010 010 |  | 011 011|  0 0 0 1 0 0 0 0   0 0 0 0 1 0 0 0 |100 100 | |101 101|  |110 111|  |111 110 |  0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1  Permutations in 8 Dimension Hilbert 1 0 0 0 0 0 1 0 Space that swaps the last two entries 64 Multi Qubit Gates (continued)

11) Qubit Fredkin (Controlled-SWAP) Gate • Universal reversible gate | • Factor impossibly large number in short time periods |  S ||  • Secure quantum communications - direct comparison of two sets of qubits for equality i.e., the two digital |  ||  signatures are the same

1 0 0 0 0 0 0 0  0 1 0 0 0 0 0 0 Fredkin Matrix :  0 0 1 0 0 0 0 0  | 000 000 |  | 001 001|  | 010 010 |  | 011 011|  0 0 0 1 0 0 0 0   |100 100 | |101 110 | |110 101| |111 111| 0 0 0 0 1 0 0 0  0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 Permutations in 8 Dimension  Hilbert Space that swaps the 101  0 0 0 0 0 0 0 1 and 110

65 Multi Qubit Gates

1) Qubit CNOT-Gate • True quantum gates must be reversible. Reversibility require a control line which is unaffected by unitary transformation. | Implement by carrying the input with results •  represent the classical XOR with input on the beta line and the control line in the alpha line |  |  • The gate is a 2 qubit gate represented by a 4 x 4 matrix

| 00CNOT | 00 ; 1000     | 0  |1 |1 CNOT   | 01   |10 ;      | 01CNOT | 01 ; 0100 0 0 | 0 | 0  |1 CNOT   | 00   | 01 ;      | 00  |11 |10CNOT |11 ; 0001     |1 | 0  |1 CNOT   |11   |10 ;      |11CNOT |10 0010  0   0 

0 1   1 0  0 1 0 0 2) Qubit NOT Two Gates 10    1 0 0 1  1 0   0 1       1 0 0 0 NOT2  I  X        ; Which Acts On Qubit 2 0 1 1 00 1   0 1   0 0 0 1      01     1 0   1 0  0 0 1 0 0100 | 00NOT2  I  X  | 01 ;  | 00IX   | 01 ; 1000 | 01NOT2  I  X  | 00 ; ; | 01IX   | 00 ; 0001 |10NOT2  I  X  |11 ; |10IX   |11 ; |11NOT  I  X  |10 ; |11IX   |10 0010 2 66  Multi Qubit Gates (continued)

13) Qubit Superdense coding takes a quantum state to two classical bits. It is a method for building shared quantum entanglement in order to increase the rate at which information may be sent through a noiseless . Sending a single qubit noiselessly between sender and receiver gives maximum communication rate of one bit per qubit. If the sender's qubit is maximally entangled with a qubit in the receiver's possession, then dense coding increases the maximum rate to two bits per qubit.

Arbitrary Distance Sender Bell States Encode Bits Receiver Decodes Prepared Send Bits | H Z H | 

67 Multi Qubit Gates (continued)

Errors in qubit superposition and entanglement occur due to 14) Qubit Error Correction Circuit increase in thermal motion of qubits as a result of environmental

|1   | 001  |110 ; temperature increase. Qubit encoding errors are also possible. Reasons for single qubit errors: |  | 00100  |11000 ; 2 1) Qubit Flip X: XX| 0 | 0 ; |1 | 0 2) Qubit Phase Flip Z: |3   | 00101  |11001 ; ZZ| 0 | 0 ; |1   |1 3) Qubit Complete Decoherence ρ: |4   | 001   |110  | 0 |1 ; 1  ZZ  † ; M12 and M read 01 on lines 4 and 5. Feed 01 2 † where O is 2x2 matrix (error syndrome) into the QEC which performs  OOii; i operations in the table below. 4) Qubit Rotation Rθ: R| 0 | 0 ; R |1 e |1 Apply qubit flip to line 3: 5) Basis states: {|0>, |1>} 1) Qubit-Flip (Amplitude Flip) |5   | 000  |111

| 001 |110 QEC | 000 |111

M1 M1 M2 Action |0 0 0 No action |111>→|111>

0 1 Flip qubit 3; |110>→|111>

M2 1 0 Flip qubit 2; |101>→|111> Error Syndrome 1 1 Flip qubit 1; |011>→|111> | 1 | 2 | 3 | 4 | 5 68 Multi Qubit Gates (continued)

15) Qubit Error Correction Circuit 2) Qubit-Phase Flip H | 001 |110 H QEC | 000 |111 H M1 |0

M2

|1 | 2 Error Syndrome • Same circuit as the amplitude flip circuit, except the Hadamard gates are added to the first three lines. Repetition code in the Hadamard gates correct for phase errors. • Errors happen between the encoding and the circuit

• Suppose the input state is: |  1   |      |    and phase flip occurs in line 2:

|2   | 001  |110 | 00 ; note that is the same as in the qubit-flip (amplitude flip) • Since the rest of the circuit is the same as the qubit-flip case. The output of QEC is: | 000 |111 Theorem: If a quantum error correcting code (QECC) corrects error A and B, then it also 69 corrects errors 휶A +휷B Multi Qubit Gates (continued)

16) Qubit Error Correction Circuit Decoherence is the loss of coherence in 3) Qubit-Decoherence a quantum system due to interactions with external environment. Decoherence in qubit system can be modeled by introducing a relative phase: Density Operator for state| : | 0 | 0and |1 ei |1 , i . e .,  |   |; |  | 0   |1   | 0  ei  |1 ; Time dependent Density Operator: | 0 |1 † ie. ., |  ; ());t U (t0 U U is Unitary matrix 2 2 |  | | |  |  | |  |  |  ; 1111 1 ei 2   i Tr( ) 1 2211 e 1 A global phase multiplies all superpositions, whereas a relative phase multiplies only a single term in the superposition and does not change measurements. We map, instead to a decoherent free subspace using logical gates in order avoid problems with physical global and relative phases: |0|1ii |1|0 |0|1 |1|0 | 0 ;|1 iθ LL22Each logical qubit has ben altered by an overall global phase e Introduce collective dephasing: and an arbitrary logical qubit is unchanged by decoherence. Hence error correction has been applied: ii i i  i  | 0e |1 ie |1 | 0 i | 0e | 0 ; |LLLLLL  | 0   |1 e  | 0  e  |1  e |  LL2 | 0eii |1 ie |1 | 0 |1 ei |1 ; LL2 70 Multi Qubit Gates (continued)

17) Qubit Error Correction Circuit 3) Qubit-Continuous rotational error

th Rθ acts on the j qubit  Rjj| cos |  i sin Z |  Error syndrome is formed by measuring  22 enough operators to determine the  location error cos |I i sin Zjj | | Z 22

Error Syndrome

Measuring the error syndrome collapses the state: Probability:  cos2 : | (no correction needed ) 2  sin2 :Zjj | ( Corrected with Z ) 2

71 Pauli Group Stabilizers 9-Qubit Error Syndrome Code

Operators for Error Syndrome

M1 Z Z

M2 Z Z

M3 Z Z

M4 Z Z

M5 Z Z

M6 Z Z

M7 X X X X X X

M8 X X X X X X These generate a group, the stabilizer of the code with all M Pauli ۄand all encoded sates |휓 ۄ 휓 |= ۄ operators with property: M| 휓

72 QASM2CIRC - MIT

Simple Quantum Teleportation Circuit https://www.media.mit.edu/quanta/qasm2circ/

% Time 01: % definitions for bit labels and initial % Gate 00 h(q1) states % Time 02: % Gate 01 cnot(q1,q2) % Time 03: \def\bA{ \q{q_{0}}} % Gate 02 cnot(q0,q1) \def\bB{ \q{q_{1}}} % Time 04: \def\bC{ \q{q_{2}}} % Gate 03 h(q0) % Gate 04 nop(q1) % Time 05: % The quantum circuit as an xymatrix % Gate 05 measure(q0) % Gate 06 measure(q1) \xymatrix@R=5pt@C=10pt{ % Time 06: \bA & \n &\n &\gCA &\gDA &\gEA % Gate 07 c-x(q1,q2) &\N &\gGA &\N % Time 07: % Gate 08 c-z(q0,q2) \\ \bB & \gAB &\gBB &\gCB &\gDB % Qubit circuit matrix: &\gEB &\gFB &\N &\N % \\ \bC & \n &\gBC &\n &\n &\n % q0: n , n , gCA, gDA, gEA, N , gGA, N &\gFC &\gGC &\n % q1: gAB, gBB, gCB, gDB, gEB, gFB, N , N % % q2: n , gBC, n , n , n , gFC, gGC, n \documentclass[11pt]{article} % Vertical lines and other post- \input{xyqcirc.tex} xymatrix latex % definitions for the circuit elements % \def\gAB{\op{H}\w\A{gAB}} \ar@{-}"gBC";"gBB" \def\gBB{\b\w\A{gBB}} \ar@{-}"gCB";"gCA" \def\gBC{\o\w\A{gBC}} \def\gCA{\b\w\A{gCA}} \ar@{=}"gFC";"gFB" \def\gCB{\o\w\A{gCB}} \ar@{=}"gGC";"gGA" \def\gDA{\op{H}\w\A{gDA}} } \def\gDB{*-{}\w\A{gDB}} \def\gEA{\meter\w\A{gEA}} \end{document} \def\gEB{\meter\w\A{gEB}} \def\gFB{\b\W\A{gFB}} \def\gFC{\op{X}\w\A{gFC}} \def\gGA{\b\W\A{gGA}} 73 \def\gGC{\op{Z}\w\A{gGC}} CodeProject Quantum Java Code

/** /** * Constructs a new Qubit object. * Check if qubit state is valid * @param no0 complex number * @return true if the state is valid, otherwise false * @param no1 complex number */ * public boolean isValid(){ */ double sum=0.0; public Qubit(ComplexNumber no0, ComplexNumber no1) { for(ComplexNumber c:this.qubitVector){ qubitVector = new ComplexNumber[2]; double mod=ComplexMath.mod(c); qubitVector[0] = no0; sum+=mod*mod; qubitVector[1] = no1; } } return (sum==1.0); /** } * Constructs a new Qubit object. * @param qubitVector an array of 2 complex numbers public class QubitZero extends Qubit { */ // Construct a new QubitZero object. public Qubit(ComplexNumber[] qubitVector) { public QubitZero() { this.qubitVector=Arrays.copyOf(qubitVector, qubitVector.length); super(new ComplexNumber(1.0, 0.0), new ComplexNumber(0.0, 0.0)); } } } /** /** * Return the qubit represented as an array of 2 complex numbers. * Currently Implemented Quantum Gates. * @return qubit */ */ public enum EGateTypes { public ComplexNumber[] getQubit() { // Hadamard Gate ComplexNumber[] copyOfQubitVector = qubitVector; E_HadamardGate, return copyOfQubitVector; // Pauli-X Gate } E_XGate, // Pauli-Z Gate E_ZGate, // CNOT Gate E_CNotGate } 74 QISKit SDK – Quantum Python Code Example https://qiskit.org/documentation/quickstart.html # Import the QISKit SDK from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister from qiskit import available_backends, execute

# Create a Quantum Register with 2 qubits. q = QuantumRegister(2) # Create a Classical Register with 2 bits. c = ClassicalRegister(2) # Create a Quantum Circuit qc = QuantumCircuit(q, c)

# Add a H gate on qubit 0, putting this qubit in superposition. qc.h(q[0]) # Add a CX (CNOT) gate on control qubit 0 and target qubit 1, putting # the qubits in a Bell state. qc.cx(q[0], q[1]) # Add a Measure gate to see the state. qc.measure(q, c)

# See a list of available local simulators print("Local backends: ", available_backends({'local': True}))

# Compile and run the Quantum circuit on a simulator backend job_sim = execute(qc, "local_qasm_simulator") sim_result = job_sim.result()

# Show the results print("simulation: ", sim_result) print(sim_result.get_counts(qc))

75 QUACK Simulator In MATLAB/OCTAVE

>> quack Matlab Welcome to Quack! version pi/4 for MATLAB by Peter Rohde Centre for Quantum Computer Technology, Brisbane, Australia http://www.physics.uq.edu.au/people/rohde/ >> init_state(2) Initialize 2-qubit register to ground >> print_hist state { [1,1] = |0>- [2,1] = |0>- } >> prepare_one(1) >> print_hist Initialize states to |1> and |0> { [1,1] = |1>- [2,1] = |0>- } >> Z_measure(1) Measure spins of |1> and |0> ans = -1 along the z-axis (-1 => spin down) >> Z_measure(2) ans = 1 >> print_hist { Octave [1,1] = |1>------> cnot(1,2) Apply CNOT with first qubit as >> print_hist control { [1,1] = |1>------> H(2) Now apply Hadamard on second >> print_hist qubit { [1,1] = |1>------> T(1) Apply phase shift T gate to first >> print_hist qubit { [1,1] = |1>------> Z_measure(2) Measure spin of second qubit along 76 http://www.peterrohde.org/media/software/ ans = 1 the z-axis >> 5 Qubit Tofolli Gate and QISKIT Programming

from qiskit import QuantumRegister, QuantumCircuit

n = 5 # must be >= 2

ctrl = QuantumRegister(n, 'ctrl') anc = QuantumRegister(n-1, 'anc') tgt = QuantumRegister(1, 'tgt')

circ = QuantumCircuit(ctrl, anc, tgt)

# compute circ.ccx(ctrl[0], ctrl[1], anc[0]) for i in range(2, n): circ.ccx(ctrl[i], anc[i-2], anc[i-1])

# copy circ.cx(anc[n-2], tgt[0])

# uncompute for i in range(n-1, 1, -1): circ.ccx(ctrl[i], anc[i-2], anc[i-1]) circ.ccx(ctrl[0], ctrl[1], anc[0])

from qiskit.tools.visualization import circuit_drawer circuit_drawer(circ)

https://qiskit.org/documentation/qiskit.html 77 JQuantum Java

http://jquantum.sourceforge.net/ 78 Quantum Algorithms

• Quantum algorithms are realized by Turing Machine “String-101” Execution Time quantum circuits Exact Probable – Complexity optimization • Turing machine complexity definitions Deterministic N +N/2 NA – P is the set of problems that can be solved by deterministic Turing machines in Polynomial Probabilistic N +N/2 N/2 number of steps – NP is the set of problems that can be solved by Nondeterministic Turing machines in Polynomial Quantum N/2 NA number of steps P NP;?() P NP not proven yet – RP is the set of problems that can be solved by – coP is the set of problems whose complements can Probabilistic Turing machines in Polynomial time with be solved by deterministic Turing machine in false negatives possible Polynomial number of steps – coRP replaces “false negatives” with “false positives” in – coNP is the set of problems whose complements RP definition can be solved by a Nondeterministic Turing machine in Polynomial number of steps – ZPP replaces “some errors possible” with “zero error” in BPP definition NP PSPACE • (QTM) complexity – PSPACE is the set of problems that can be solved by deterministic Turing machine using a Polynomial definitions number of SPACEs on the tape – BQP, ZQP, P coP coNP ; coNP PSPACE – Is a set of problems that can be solved by QTM in • Probabilistic Turing machine (PTM) Polynomial time with Bounded error on both sides complexity definitions – EQP – BPP is the set of problems that can be solved by • Replaces Bounded error with “Exactly (without error)” in Probabilistic Turing machines in Polynomial time definition of QTM with some errors possible – QSPACE QSPACE( f ( n )) SPACE (( f ( n ))2 )

79 Quantum Computing Algorithms

• Quantum Turing Machine (QTM) Config c1 n+1

– Is well formed if the constructed UM preserves isometric inner product in c2 Confign+2 complex space Confign c3 • QTM is similar to the probabilistic Config Turning machine (PTM), except that n+3 the probability amplitudes are ck complex number amplitudes • Probabilistic TM (PTM) traverses the Confign+m tape left to right; QTM traverses in both directions simultaneously In "m" time steps the initial configuration will be in a • QTM performs all operations configuration of "superposition(s) of configuration(s)": simultaneously and enters a tm() superposition of all the resulting UM U M... U M | config n U M | config n states t() m times • When QTM is measured, it collapses into a single complex number configuration (state) and behaves like the PTM upon observation

80 Quantum Turing Complexity details in Backup Slides Quantum Algorithms (continued)

• Quantum Fourier Transform (QFT) (Unitary Operator and Reversible) – n-qubit QFT 21n || x x • Input State:  | x2 H S T x0 n 2nn 1 2 1  e2ixy /2 | ' Uy |  x | | x • Output State: QFT  n 1 H S xy00 2 – 3-qubit QFT | x0 H – Apply H gate to state | x2 11xy2 2ix y /2 2 x   xx   x x x  H| x2  (  1) | y  e | y 2i0 2  i 01 2  i 0  1  2  1  1 2  1  3 2  22yy |0e2  |1  |0  e 2 2  |1   |0  e  2 2 2  |1 x x 2 2 2 2i 0  2 1 2 | 0e 2 2 |1 2 x 2i 1 | 0 or |1 ;For |1 : S |1 e 4 |1 – Apply S gate with control bit for state | x 1 either x0 xx12 2i – State of System at this point: 1 22322 I S| x11  | x   | 0  e |1 2 x xx 2i 0 12 | x 1 32 – Apply T gate with control bit for state 0 : |x | x  | 0  e 22 2 |1 012 x x 2i 0  1 1 2 | x |xe | 02 2 |1 – 1 goes through the H gate and Controlled S-gate: 1 2 xx00x1   x 1 x 2  22ii      112222   2 3 2 2  – State of System at this point: |x0   | 0  e |1   | 0  e |1 22

x0 1 2i |xe | 02 |1 – Finally Hadamard gate applied to | x 0 : 0 81 2 Final System State Quantum Computing Algorithms (continued)

• Basic framework for all QC algorithms – Start with qubits in a particular classical state – The system is put into a superposition of many states – Unitary operations act on this superposition – Measurement of qubits in final states • Definitions * – Discrete Logarithm Problem: Given a prime number p, a base bZ  p , and an arbitrary yZ * * x element p , find an xZ  p such that b  y mod p – Hidden Subgroup Problem: G is a group. Let H < G be a subgroup implicitly defined by a function of f on G is constant and distinct on every co-set o H. The problem is to find a set of generators for H – Abelian Group (abstract algebra): Is a commutative group (generalize arithmetic addition of integers), is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written, i.e., these are the groups that obey the axiom of commutativity; named after early 19th century mathematician Niels Henrik Abel (ref. 21) – Abelian Hidden Subgroup Problem: G is a finite Abelian group with cyclic decomposition GZZ  nn  ...  . Let H < G be a subgroup implicitly defined by a function of f on G is constant and0 distinct Lon every co-set o H. The problem is to find a set of generators for H – Pell’s Equation Problem: Find an integral and positive solutions to x22 dy 1 82 Quantum Algorithms (continued)

n • Grover’s search algorithm (class of H n 2 | 0 0 | I algorithms called amplitude amplification) O = G – Finds an element in an unordered set quadratically faster O(N1/2) time than any Grover’s Diffusion Operator theoretical limit for classical algorithms O(N/2) 1 Apply a call to Oracle O – Internal calls to an oracle “O” for value of function 2 Apply the Hadamard transform H n (i.e., membership is true for an instance) x 3 Apply a phase shift (excluding |0 ): |xx  (  )0 | N entries with n = log(N) bits 4 Apply Hadamard transform HIHInn2 | 0 0 |  2 | |  Apply Hadamard transform on to produce equal   superposition state n n1 1 |0 … ||   x n x0 G √N G |1 … Apply the Grover diffusion operator H

2 Hadamard operations require n operations each Grover’s Circuit / Algorithm Start: Initialize the n-qubit states to |0 n The conditional phase shift is a controlled unitary operation and require O(n) gates Identify: Element requested (ensure it is available) • Apply Hadamard transform to n-quits and The Oracle complexity is application dependent, in this n n algorithm it requires only one call per iteration initialize superposition H |0 • for O(√N) times do Apply measurement • Apply the Grover operator G n • end for | x Oracle 83 | q Uf Measure the system q f() x Quantum Algorithms (continued)

• Quantum Fourier Transform (QFT) (Unitary Operator and Reversible) n-qubit QFT 21n || x 2 • Input State:  x O(log n ) execution time n x0 2nn 1 2 1  e2ixy /2 | ' Uy |  x | • Output State: QFT  n xy00 2 i | x2 H S T   e 4 UQFT | x1 H S 1 1 1 ... 1 2 2n  1 | x H 1  ...  0 2 4 2(2n  1) 1 1  ...  QFT period superpositions n 2n 1 36 3(2 1) … Period 3  0 3 6 9 M-6 M-3 n n n n 121  2(21)  ...  (21)(21)   … Period 4 1 5 9 M-7 M-3 84 2-Qubit & 3-Qubit treatment in Backup Slides Quantum Algorithms (continued)

11 |  | 00 |11 ; • 2 Qubit QFT matrix form 22 – QFT full matrix form: 1 1 1 1 1  i  i23  i 2 1 e4 e 4 e 4  1 0 | 'U | iii2 4 6 QFT  4 4 4 4 0 1 eee i3  i 6  i 9 1 4 4 4  1 e e e 2 11 00 11 00 22 22 i3  11 11i 00 e 4 00 1 221 22  4 11i6 4 1 i 00 e 4 00 22 22  11i9 11 i 00 e 4 00 22 22 2  8 21i 2 2 1 i 1  i 2  1  i 4 | 00  | 01  |10  |11 . 1 i 8844  8 21i 85  4 Quantum Algorithms (continued)

• Shor’s algorithm m m – Is a factoring algorithm |0 H UQFT • It can be used to break encryption U f codes aN, – Computation execution time is O(n2log n m log log n) number of polynomial steps; n |0 bits to represent number N | | | | | 4 – Classically it is O(ecn1/3 log2/3n) 0 1 2 3

exponential steps m |x ,0  x0,1 n |01 | 0mn ,0 ; | ; Algorithm Steps 2m 1. Input a positive integer N with n=log2N 2. Use a polynomial algorithm to determine if N is a Evaluation of f on all possibilities : prime or a power of prime. If it is prime, declare x mm|x , f ( x ) x , a Mod N and exit. If it is power of prime, declare and exit xx0,1aN, 0,1   |;     3. Randomly select an integer a: 1

• Uses adiabatic processes for QC in the Adiabatic Process

following steps: tHamiltonian t Critical; H initial H final slowly – Create an initial state of qubits h – Start with an initial Hamiltonian and very it very UncertainityPr inciple :  E  t  2 slowly (adiabatically) h 1 • Hinitial transforms into Hfinal whose eigenstates  t  encode the solution 2 E – The Hamiltonian ground state is created j HXinitial  j • Consists of Pauli Operators – The final Hamiltonian

Hfinal c x || x x x – If the T is the total time of computation, we can interpolate the Hamiltonian solution at any time “t”. Let s=1/T with 0≤s≤1: Hˆ (1  s ) H  sH 87 initial final Topological Quantum Computing (QC)

• Anyons (named by Frank Wilczek 1982 – ref. 19) Anyonic QC QC Anyonic Operations Initialize state Create and arrange anyons QC gates Braid anyons State Detect anionic charge measurement

aa Anyons World Lines – Obey exotic statistics including Fermi-Dirac statistics for fermions (Leptons, Quarks) – Bose-Einstein statistics for bosons (Gauge, Higgs) – They cannot occupy the same space 1 e1 e2 e3 e4 e5 e6 – Have arbitrary phase factors • One configuration of topological fault tolerant – Follow non-trivial unitary evolutions when particles are quantum computation exchanged • During initialization a pair of anyons aa, are created – Transformation of the anionic wave function obey from vacuum (i.e., ee  , electron-positron pair) exchange symmetry • Braided operations unitarily evolve to their fusion – Hence the name “Any” + “ons” state • Kitaev (2003 – ref. 20) demonstrate that anyons • Fusing the anyons together give a set of could be used to perform fault tolerant measurement outcomes ei; i=1,… which encodes computation the results of the computation Laboratory Systems: Electron gas in high magnetic field is sandwiched between thin 88 semiconductor layers of aluminum gallium arsenide Cluster State Quantum Computing (CSQC) Represent CSQC as Graphs

• CSQC is a multipartite qubit (highly entangled) modeling qubit scheme. It simulates unitary dynamics in crystal lattices. Within this model, the cluster states are a series of c-phase measured points in the computation; the result is used to gate select a new basis for the next measurement, thus forming a feedback loop – CSQC is represented a graph (each node/vertex of the graph is a qubit; the edges of the graph are the CZ gates – It is a two-step process: 1) initialize a set of qubits in some state, for 4-qubit cluster state example start with |+> then apply the CPHASE gates to the states Edges are c-phase gates – Measure the qubits in some basis states. As the next measurement is taken the choice of the new basis depends/determined by the Vertices are qubits previous measurement results CZ( controlled Z gate – Effect of CZ application: Example: intialproduct state: |  |   |  CZ |   |  , is controlled phase operation): C 1 1 0 0 0 where CZ I  I  Z  I  I  Z  Z  Z   2  0 1 0 0 Chose a basis state: CZ   0 0 1 0 1 | 0  |1  | 0  |1   A     0 0 0 1 2 22    CZ|  |   AZIAIZAZZA  (  )  (  )  (  )  Phase shift is applied to the target qubit with control qubit in state |1>: 1  | 00  | 01  |10  |11  CZ|11>=-|11> 2  89 – This operation gives an entangled 2-Qubit State represented by: Quantum Particle Swarm Optimization (QPSO) From: Jun Sun, Choi-Hong Lai, Xiao-Jun Wu, “Particle Swarm Optimisation-Classical and Quantum Perspective”, Chapman & Hall/CRC Press, 2012

• QPSO Algorithm • qpso\qpso.bat finds the mean best – Uses the one of many potential functions fit to particle position “x” for determination of particle position using ˆ hd the Schrödinger equation with Hamiltonian Hy 2  ( ); Ĥ (here the simple case of delta potential 2m dy well is used) where is intensity of potential well,y x p ; .. – Uses the mean best position “x” of particle Schr odinger equation: to enhance the global search capability for V(x) dm2 2 particle position Ey ( )   0; 22  x-p – Unlike the classical PSO algorithm the dy h QPSO does not require the velocity vectors Wave function solution is: of particle and fewer parameters to adjust. y 2 x 11 h It is simpler to implement  ();;y eL   L m   – Choosing QPSO parameters swarm size, problem dimension, the number of Probability Distribution Function: δ potential well y maximum iteration, and the most important 2 parameter “α” the contraction-expansion F( y ) 1 e L ; coefficient (CE) describes the dynamical Particles position is given by: behavior of individual particles and the L 1 algorithm converges (for α≤α0 1.7,1.8 ) xpln ; 2 u  e 1.781;is optimized for behavior particle – i.e., 0 where u is random number uniformly distributed  0.577215665 is called the Euler constant 90 on (0,1);uU (0,1) QPSO (continued)

• H. Gao et al., A cooperative approach to quantum-behaved particle swarm optimization, • Variants of QPSO have been In Proceedings of the 2007 IEEE International Symposium on Intelligent Signal Processing, Madrid, Spain, 2007, . 1–6 utilized • S. Lu, C. Sun, Quantum-behaved particle swarm optimization with cooperative- competitive coevolutionary, In Proceedings of the 2008 International Symposium on – Cooperative QPSO (CQPSO); Gao et. Knowledge Acquisition and Modeling, Wuhan, China, 2008, pp. 593–597. 32 • S. Lu, C. Sun, Coevolutionary quantum-behaved particle swarm optimization with hybrid Al [2007] , Sun et al. [2008] cooperative search, In Proceedings of the 2008 Pacific-Asia Workshop on Computational Intelligence and Industrial Application, Washington, DC, 2008, pp. 109–113 – Diversity-controlled QPSO (DCQPSO); • J. Sun, W. Xu, W. Fang. Quantum-behaved particle swarm optimization with a hybrid probability distribution, In Proceedings of the Ninth Pacific Rim International Conference Riget et al. [2002], Ursem et al. [2001], on Artificial Intelligence, Guilin, China, 2006, pp. 737–746. • Shao D., Hu S., Fei Y., A new quantum particle swarm optimization algorithm, Neural Sun et al. [2006] Network World 5/2016, 477–496 • J. Liu, J. Sun, W. Xu. Quantum-behaved particle swarm optimization with adaptive – Local-attractor QPSO (LAQPSO); Shao mutation operator, In Proceedings of the 2006 International Conference on Natural et al. [2016] Computing, Hainan, China, 2006, pp. 959–967. • W. Fang, J. Sun, W. Xu. Analysis of mutation operators on quantum-behaved particle swarm optimization algorithm, New Mathematics and Natural Computation, 2009, 5(2): – QPSO Tournament-selector (QPSO- 487–496 TS); P. Angeline [1998] • H. Long, J. Sun, X. Wang, C. Lai, W. Xu. Using selection to improve quantum behaved particle swarm optimization, International Journal of Innovative Computing and – QPSO-Roulette-Wheel selection Applications, 2009, 2(2): 100–114. • P.J. Angeline, Using selection to improve particle swarm optimization, In Proceedings of (QPSO-RS); Long et al. [2009] the 1998 IEEE International Conference on Evolutionary Computation, Anchorage, AK, 1998, pp. 84–89. – QPSO with Hybrid Distribution (QPSO- • J. Riget, J. Vesterstroem. A diversity-guided particle swarm optimizer—The ARPSO: HD); Sun et al. [2006] Department of Computer Science, University of Aarhus, Aarhus, Denment, 2002 • R.K. Ursem. Diversity-guided evolutionary algorithms, In Proceedings of the 2011 Parallel – QPSO with Mutation; Liu et al. [2006], Problem Solving from Nature Conference, Paris, France, 2001, pp. 462–471 • J. Sun, W. Xu, W. Fang, Quantum-behaved particle swarm optimization algorithm with Fang et al. [2009] controlled diversity, In Proceedings of the 2006 International Conference on Computational Science, Reading, MA, 2006, pp. 847–854. • J. Sun, W. Xu, W. Fang, Enhancing global search ability of quantum-behaved particle swarm optimization by maintaining diversity of the swarm, In Proceedings of the 2006 International Conference on Rough Sets and Current Trends in Computing, Kobe, Japan, 2006, pp. 736–745. 91 QPSO (continued) Applications

• Antenna Design: Determine infinitesimal dipoles • S. Mikki et al., Infinitesimal dipole model for dielectric resonator to represent an arbitrary antenna for near-field antennas using the QPSO algorithm, Proceedings of the 2006 distributions (ref. Mikki et al. [2006]) IEEE Antennas and Propagation Society International Symposium, Albuquerque, NM, 2006, pp. 3285-3288 • Biomedicine: Coupling RFB neural networks to • Lui et al., Culture conditions…neural network and quantum- the QPSO algorithm for the culture conditions of behaved particle swarm optimization algorithm, Enzyme and hyaluronic acid production by Streptococcus Microbial Technology, 2009, 44(1), pp. 24-32 zooepidemicus (Lui et al. [2009]). Lu and Wang • K. Lu and R. Wang, Application of PSO and QPSO … glutamic [2008] employed QPSO to estimate parameters acid batch fermentation, In Proceedings of the Seventh World from kinetic model of batch fermentation Congress on Intelligent Control and Automation, Chongqinq, • Mathematical Programming: Integer China, 2008, pp. 8968-8971 programming (Liu et al. [2006]), constrained non- • J. Liu et al., Quantum-behaved particle swarm optimization for linear programming (Liu et al. [2008]), integer programming, In Proceedings of the 2006 International combinatorial optimization (Wang et al. [2008]), Conference on Neural Information Processing, Hong Kong, layout optimization (Xiao et al. [2009]), and China, 2006, pp. 1042-1050 multiobjective design optimization of laminated • H. Liu et al., A modified quantum-behaved particle swarm composite components (Omkar et al. [2009]) optimization for constrained optimization, In Proceedings o the 2008 International Symposium on Intelligent Information • Communication Networks: NP-hard QoS Technology Application Workshops, Shanghai, China, 2008, pp. multicast routing (converted to integer 531-534 programming and solved by Sun et al. [2006]), • J. Wang et al., Discrete quantum-behaved particle swarm RBFNN network anomaly detection (hybrid QPSO optimization of distribution for combinatorial optimization, In with gradient descent algorithm to train RBFNN by Proceedings of the 2008 IEEE World Congress on Ma et al. [2008], Wavelet NN & conjugate gradient Computational Intelligence, Hong Kong, China, 2008, pp. 897- algorithm for network anomaly detection (Ma et al. 904 [2007], WLS-SVM QPSO for anomaly detection • B. Xiao et al., Optimal planning of substation locating and sizing (Wu et al. [2008]), mobile IP routing ( Zhao et al. based on improved QPSO algorithm, In Proceedings of the Asia- [2008]), and channel assignment (Yue et al [2009]) Pacific, Power and Energy Engineering Conference, Shanghai, China, 2009, pp. 1-5 92 QPSO (continued) Applications

• S.N. Omkar et al., Quantum behaved particle swarm optimization (QPSO) for • Many other applications employing QPSO multi-objective design optimization of composite structures, Expert Systems algorithm in the following areas: with Applications, 2009, 36(8), pp. 11312-11322 • R. Ma et al., Network anomaly detection using RBF neural networks with – Control Engineering hybrid QPSO, In Proceedings of the IEEE International Conference on Networking, Sensing and Control, Chicago, IL, 2008, pp, 1284-1287 – Clustering & Classification • J. Sun et al., QoS multicast routing algorithm, In Proceedings of the 2006 – Image Processing International Conference on Simulated Evolution and Learning, Hefei, China, 2006, pp. 261-268 • Image processing, image segmentation, • D. Zhao et al., An approach to mobile IP routing based on QPSO algorithm. In image registration, image interpolation, Proceedings of the Pacific-Asia Workshop on Computational Intelligence and and face recognition and registration Industrial Application, Wuhan, China, 2008, pp. 667-671 – Fuzzy Systems • R. Ma et al., Hybrid QPSO based wavelet neural networks for network anomaly detection, In Proceedings of the Second Workshop on Digital Media and its – Finance Application in Museum and Heritages, Qingdao, China, 2007, pp 442-447 • R. Wu et al., An approach to WLS-SVM based on QPSO algorithm in anomaly – Graphics detection, In Proceedings of the 2008 World Congress on Intelligent Control • Rectangular packing problem, polygonal and Automation, Chongqing, China, 2008, pp. 4468-4472 approximation curves, and irregular • C. Yue et al., Channel assignment based on QPSO algorithm, Communications Technology, 2009, 42(2), pp. 204-206 polygon layouts – Power Systems – Modelling • SVM, LS-SVM • Transistor Devices • Detection of unstable orbits in a non- Lyapunov technique – Filters • Design of Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters – Multiprocessor Scheduling 93 From: Jun Sun, Choi-Hong Lai, Xiao-Jun Wu, “Particle Swarm Optimisation-Classical and Quantum Perspective”, Chapman & Hall/CRC Press, 2012