1 / 78

EEL 5930 sec. 5, Spring ‘05 Physical Limits of Computing

EEL 5930 sec. 5, Spring ‘05 Physical Limits of Computing. Slides for a course taught by Michael P. Frank in the Dept. of Electrical & Computer Engineering. Module #8. Introduction to Quantum Computing. Quantum Computing. Intro. & Overview: What’s Quantum Computing All About?.

wind
Download Presentation

EEL 5930 sec. 5, Spring ‘05 Physical Limits of Computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EEL 5930 sec. 5, Spring ‘05Physical Limits of Computing Slides for a course taught byMichael P. Frankin the Dept. of Electrical & Computer Engineering

  2. Module #8 Introduction to Quantum Computing

  3. Quantum Computing Intro. & Overview:What’s Quantum Computing All About?

  4. Classical vs. Quantum Computing • For any digital computer, its set of computational states is some set of mutually distinguishable (macro- or micro-) states. • The specific computational state that is in use at a given time represents the specific digital data currently being processed within the machine. • Classical computing is computing in which: • All of the computational states (at all times) are natural pointer states of the computer hardware. • States that are little perturbed by interactions w. the environment. • Quantum computing is computing in which: • The computational state is not always a pointer state. • Instead, it is usually a superposition of pointer states. Phys. Lim. of Comp., Module 7

  5. What is “Quantum Computing?” • Non-pointer-state computing. • Harnesses these quantum effects on a large, complex scale: • Computational states that are not just pointer states, but also, coherent superpositions of pointer states. • States having non-zero amplitude in many pointer states at the same time! “Quantum parallelism.” • Entanglement (quantum correlations) • Between the states of different subsystems. • Unitary (thus reversible) evolution through time • Interference (reinforcement and cancellation) • Between convergent trajectories in pointer-state space. Phys. Lim. of Comp., Module 7

  6. Why Quantum Computing? • It is, apparently, exponentially more time-efficient than any possible classical computing scheme at solving some problems: • Factoring, discrete logarithms, related problems • Simulating quantum physical systems accurately • This application was the original motivation for quantum computing research first suggested by famous physicist Richard Feynman in the early 80’s. • However, this has never been proven yet! • If you want to win a sure-fire Nobel prize… • Find a polynomial-time algorithm for accurately simulating quantum computers on classical ones! Phys. Lim. of Comp., Module 7

  7. Status of Quantum Computing • Theoretical & experimental progress is being made, but slowly. • There are many areas where much progress is still needed before quantum computing can be practical. • Physical implementations of very simple (e.g., 7-bit) quantum computers have been tested, and work as predicted. • However, scaling them up to larger sizes is very difficult. • There are no known fundamental theoretical barriers to large-scale quantum computing. • My guess: It will be a useful technology in ~20 yrs. or so. • Actually, useful commercial products already exist today in the closely related field of quantum cryptography. Phys. Lim. of Comp., Module 7

  8. Early History • Quantum computing was largely inspired by reversible computation work from the 1970’s: • Bennett, Fredkin, and Toffoli • Early quantum computation pioneers (1980’s): • Early models not using quantum parallelism to gain performance: • Benioff ‘80, ‘82 - Quantum serial Turing Mach. models • Feynman ‘86 - Quant. models of serial reversible circuits • Margolus ‘86,’90 - Quant. models of parallel rev. circuits • Performance gains w. quantum parallelism: • Feynman ‘82 - Suggested faster quantum sims with QC • Deutsch ‘85 - Quantum-parallel Turing machine • Deutsch ‘89 - Quantum logic circuits Phys. Lim. of Comp., Module 7

  9. More Recent History • There was a rapid ramp-up of quantum computing research throughout the 1990’s. • Some developments, 1989-present • Refining quantum logic circuit models • What is a minimal set of universal gates for QC? • Algorithms: Shor factoring, Grover search, etc. • Developing quantum complexity theory • What is the ultimate power of quantum computation? • Quantum information theory • Communications, Cryptography, etc. • Error correcting codes, fault tolerance, robust QC • Physical implementations • Numerous few-bit implementations demonstrated Phys. Lim. of Comp., Module 7

  10. Quantum Logic Networks • Invented by Deutsch (1989) • Analogous to classical Boolean logic networks • Generalization of Fredkin-Toffoli reversible logic circuits • System is divided into individual bits, or qubits • 2 orthogonal states of each qubit are designated as the computationalbasis states, “0” and “1”. • Quantum logic gates: • Local unitary transforms that operate on only a few state bits at a time. • Computation via predetermined sequence of gate applications to selected bits. Phys. Lim. of Comp., Module 7

  11. Gates without Superposition • All classical input-consuming reversible gates can be represented as unitary transformations! • E.g., input-consuming NOT gate (inverter) inout0 11 0 in out in out Phys. Lim. of Comp., Module 7

  12. ABA’B’0 0 0 00 1 0 11 0 1 11 1 1 0 Controlled-NOT • A.k.a. CNOT (or input-consuming XOR) A A’ A A’ B B’ = AB B B’ = AB Example: A B A B Phys. Lim. of Comp., Module 7

  13. Toffoli Gate (CCNOT) ABCA’B’C’0 0 0 0 0 00 0 1 0 0 10 1 0 0 1 00 1 1 0 1 11 0 0 1 0 01 0 1 1 0 11 1 0 1 1 01 1 1 1 1 1 A A’=A B B’=B A A’ B B’ C C’ = CAB C C’ (XOR) Now, what happens if the unitary matrix elements are not always 0 or 1? Phys. Lim. of Comp., Module 7

  14. The Square Root of NOT • If you put in either basis state (0 or 1) you get a state that appears random when measured… • But if you feed the output back into another N1/2without measuring it, you get the inverse of the original value! • “How is thatpossible?” 0 (50%) 0 (50%) 0 1 N1/2 N1/2 1 (50%) 1 (50%) 0 (50%) 0 1 N1/2 N1/2 1 (50%) 0 (50%) 0 0 N1/2 N1/2 1 (50%) Phys. Lim. of Comp., Module 7

  15. NOT1/2: Unitary implementation Prob. ½ Prob. ½ Phys. Lim. of Comp., Module 7

  16. The Hadamard Transform • A randomizing “square root of identity” gate. • Used frequently in quantum logic networks. Phys. Lim. of Comp., Module 7

  17. Another NOT1/2 • This one negates the phase of the state if the input state was |0. Phys. Lim. of Comp., Module 7

  18. Optical Implementation of N1/2 • Beam splitters (semi-silvered mirrors) form superpositions of reflected and transmittedphoton states. “1” “1” “1” “1” “0” “0” “0” laser “1” Phys. Lim. of Comp., Module 7

  19. Deutsch’s Problem • Given a black-box function f:{0,1}{0,1}, • Determine whether f(0)=f(1), • But you only have time to call fonce! H H f (N’)1/2 Phys. Lim. of Comp., Module 7

  20. Extended Deutsch’s Problem • Given black-box f:{0,1}n{0,1}, • and a guarantee that f is either constant or balanced (1 on exactly ½ of inputs) • Which is it? • Minimize number of calls to f. • Classical algorithm, worst-case: • Order 2n time! • What if the first 2n−1 cases examined are all 0? • Function could still be either constant or balanced. • Case number 2n-1+1: if 0, constant; if 1, balanced. • Quantum algorithm is exponentially faster! • (Deutsch & Jozsa, 1992.) Phys. Lim. of Comp., Module 7

  21. Universal Q-Gates: History • Deutsch ‘89: • Universal 3-bit Toffoli-like gate. • diVincenzo ‘95: • Adequate set of 2-bit gates. • Barenco ‘95: • Universal 2-bit gate. • Deutsch et al. ‘95 • Almost all 2-bit gates are universal. • Barenco et al. ‘95 • CNOT + set of 1-bit gates is adequate. • Later development of discrete gate sets... Phys. Lim. of Comp., Module 7

  22. Deutsch: Gen. 3-bit Toffoli gate: • The following gate is universal: (Where  is any irrational number.) a bb a Phys. Lim. of Comp., Module 7

  23. Barenco’s 2-bit gen. CNOT gate • where ,,, are relatively irrational • Also works, e.g., for =, =/2: U Phys. Lim. of Comp., Module 7

  24. Barenco et al. ‘95 results • Universality of CNOT + 1-bit gates • 2-bit Barenco gate already known universal • 4 1-bit gates + 2 CNOTs suffice to build it • Construction of generalized Toffoli gates • 3-bit version via five 2-bit gates • n-bit version via O(n2) 2-bit gates • No auxilliary bits needed for the above • All operations done “in place” on input qubits. • n-bit version via O(n) 2-bit gates, given 1 work bit Phys. Lim. of Comp., Module 7

  25. Quantum Complexity Theory • Early developments: • Deutch’s problem (from earlier): Slight speedup • Deutsch & Jozsa: Exponential speed-up • Important quantum complexity classes: • EQP: Exact Quantum Polynomial - like P. • Polynomial time, deterministic. • ZQP: Zero-error Quantum Polynomial - like ZPP. • Probabilistic, expected polynomial-time, zero errors. • BQP: Bounded-error Quantum Poly. - like BPP. • Probabilistic, bounded probability of errors. • All results relativized, e.g., • O: EQPO (NPO  co-NPO) Given a certain black-box, quantumcomputers can solve a certain problemfaster than a classical computer caneven check the answer! Phys. Lim. of Comp., Module 7

  26. Quantum Algorithms Part I: Unstructured Search

  27. Unstructured Search Problem • Given a set S of N elements and a black-box function f:S{0,1}, find an element xS such that f(x)=1, if one exists (or if not, say so). • Any NP problem can be cast as an unstructured search problem. • Not necessarily the optimal approach, however. • Bounds on classical run-time: • (N) expected queries in worst case (0 or 1 sol’ns): • Have to try N/2 elements on average before finding sol’n. • Have to try all N if there is no solution. • If elements are length- bit strings, • Expected #trials is (2) - exponential in . Bad! Phys. Lim. of Comp., Module 7

  28. Quantum Unstructured Search • Minimum time to solve unstructured search problem on a quantum computer is: • (N1/2) queries = (2/2) = (21/2) • Still exponential, but with a smaller base. • The minimum # of queries can be achieved using Grover’s algorithm. Phys. Lim. of Comp., Module 7

  29. Grover’s algorithm: • 1. Start w. amplitude evenly distributed among the N elements, (xi)=1/N • 2. In each state xi, compute f(xi): • 3. Apply conditional phase shift of  if f(xi)=1(Negate sign of solution state.) Uncompute f.  x1 xN solutionxs f=0 f=1  x1 xN solutionxs Phys. Lim. of Comp., Module 7

  30. Grover’s algorithm, cont. • 4. Invert all amplitudes with respect to the average amplitude:  x1 xN solutionxs Phys. Lim. of Comp., Module 7

  31. Grover’s algorithm, cont. • 5. Go to step 2, and repeat 0.785 N1/2 times. 1 (xs) # of iterations -1 Phys. Lim. of Comp., Module 7

  32. Shor’s Factoring Algorithm • Solves the >2000-year-old problem: • Given a large number N, quickly find the prime factorization of N. (At least as old as Euclid!) • No polynomial-time (as a function of n=lg N) classical algorithm for this problem is known. • The best known (as of 1993) was a number field sieve algorithm taking time O{exp[n1/3 log(n2/3)]} • However, there is also no proof that an (undis-covered) fast classical algorithm does not exist. • Shor’s quantum algorithm takes time O(n2) • No worse than multiplication of n-bit numbers! Phys. Lim. of Comp., Module 7

  33. Elements of Shor’s Algorithm • Uses a standard reduction of factoring to another number-theory problem called the discrete logarithm problem. • The discrete logarithm problem corresponds to finding the period of a certain periodic function defined over the integers. • A general way to find the period of a function is to perform a Fourier transform on the function. • Shor showed how to generalize an earlier algorithm by Simon, to provide a Quantum Fourier Transform that is exponentially faster than classical ones. Phys. Lim. of Comp., Module 7

  34. Powers of numbers mod N • Given natural numbers (non-negative integers) N1, x<N, and x, consider the sequence: x0 mod N, x1 mod N, x2 mod N, … = 1, x, x2 mod N, … • If x and N are relatively prime, • this sequence won’t repeat until it gets back to 1. • Discrete logarithm of y, base x, mod N: • The smallest natural number exponent k (if any) such that xk = y (mod N). • I.e., the integer logarithm of y, base x, in modulo-N arithmetic. Example: dlog7 13 (mod N) = ? Phys. Lim. of Comp., Module 7

  35. Discrete Log Example 0 1 2 3 4 • N=15, x=7, y=13. • x2 = 49 = 4 (mod 15) • x3 = 4·7 = 28 = 13 (mod 15) • x4 = 13·7 = 91 = 1 (mod 15) • So, dlog7 13 = 3 (mod N), • Because 73 = 13 (mod N). ×7 ×7 ×7 5 6 7 8 9 12 13 14 10 11 ×7 Phys. Lim. of Comp., Module 7

  36. The order of x mod N • Problem: Given N>0, and an x<N that is relatively prime to N, what is the smallest value of k>0 such that xk = 1 (mod N)? • This is called the order of x (mod N). • From our previousexample, the orderof 7 mod N is…? 0 1 2 3 4 ×7 ×7 ×7 5 6 7 8 9 12 13 14 10 11 ×7 Phys. Lim. of Comp., Module 7

  37. Order-finding permits Factoring • A standard reduction of factoring N to finding orders mod N: • 1. Pick a random number x < N. • 2. If gcd(x,N)1, return it (it’s a factor). • 3. Compute the order of x (mod N). • Let r := min k>0: xk mod N = 1 • 4. If gcd(xr/21, N)  1, return it (it’s a factor). • 5. Repeat as needed. • The expected number of repetitions of the loop needed to find a factor with probability > 0.5 is known to be only polynomial in the length of N. Phys. Lim. of Comp., Module 7

  38. Factoring Example 0 • For N=15, let x=7… • Order of x is r=4. • r/2 = 2. • x2 = 5. • In this case (we are lucky), bothx2+1 and x21 are factors (3 and 5). • Now, how do we compute orders efficiently? 1 2 3 4 ×7 ×7 ×7 5 6 7 8 9 12 13 14 10 11 ×7 Phys. Lim. of Comp., Module 7

  39. Quantum Order-Finding • Uses 2 quantum registers (a,b) • 0  a < q, is the k (exponent) used in order-finding. • 0  b < n, is the y (xk mod n) value • q is the smallest power of 2 greater than N2. • Algorithm: • 1. Initial quantum state is |0,0, i.e., (a=0, b=0). • 2. Go to superposition of all possible values of a: Phys. Lim. of Comp., Module 7

  40. Initial State Phys. Lim. of Comp., Module 7

  41. After Doing Hadamard Transform on all bits of a Phys. Lim. of Comp., Module 7

  42. After modular exponentiationb=xa(mod N) Phys. Lim. of Comp., Module 7

  43. State After Fourier Transform Phys. Lim. of Comp., Module 7

  44. Quantum Algorithms III Wrap-up: Classical vs. Quantum Parallelism Quantum Physics Simulations

  45. Classical Unstructured Search • The classical serial algorithm takes (N) time. • But: Suppose we search in parallel! • Have M<N processors running in parallel. • Each searches a different subset ofN/M elements of the search space. • If processors are ballistic reversible: • Can cluster them in a dense mesh of diameter (M1/3). • Time accounting: • Computation time: (N/M) • Communication time: (M1/3) (at lightspeed) • Total:T  N/M + M1/3 is minimized when M  N3/4 N1/4 Faster than Grover’s algorithm! M1/3 M Phys. Lim. of Comp., Module 7

  46. Classical+Quantum Parallelism • Similar setup to classical parallelism: • M processors, searching N/M items each. • Except, each processor uses Grover’s algorithm. • Time accounting: • Computation: T (N/M)1/2 • Communication: T  M1/3 (as before) • Total:T  (N/M)1/2 + M1/3 • Total is minimized when MN3/5 • Minimized total is T  N1/5. • I.e., quantum unstructured search is really only N1/4/N1/5 = N1/20 × faster than classical! Phys. Lim. of Comp., Module 7

  47. Simulating Quantum Physics • For n particles, takes exponential time using the best known classical methods. • Feynman suggested: use quantum computing • Takes only polynomial time on a QC. • History of some fast QC physics algorithms: • Schrödinger equation (Boghosian, Yepez) • Many-body Fermi systems (Abrams & Lloyd) • Eigenvalue/eigenvector computations (ditto) • Quantum lattice gases, Ising models, etc. • Totally general quantum physics simulations(Field theories, etc.) - Lloyd 1996 Phys. Lim. of Comp., Module 7

  48. Simulating Quantum Computers on classical ones

  49. Efficient QC Simulations • Task: Simulate an n-qubit quantum computer. • Maximally stupid approach: • Store a 2n-element vector • Multiply it by a full 2n×2n matrix for each gate op • Some obvious optimizations: • Never store whole matrix (compute dynamically) • Store only nonzero elements of state vector • Especially helpful when qubits are highly correlated • Do only constant work per nonzero vector element • Scatter amplitude from each state to 1 or 2 successors • Drop small-probability-mass sets of states • Linearity of QM implies no chaotic growth of errors Phys. Lim. of Comp., Module 7

  50. Linear-space quantum simulation • A popular myth: • “Simulating an n-qubit (or n-particle) quantum system takes e(n) space (as well as time).” • The usual justification: • It takes e(n) numbers even to represent a single (n)-dimensional state vector, in general. • The hole in that argument: • Can simulate the statistical behavior of a quantum system w/o ever storing a state vector! • Result BQP  PSPACE known since BV’93... • But practical poly-space sims are rarely described Phys. Lim. of Comp., Module 7

More Related