250 likes | 471 Views
Beginner’s Guide to Quantum Computing. Graduate Seminar Presentation Oct. 5, 2007. Introduction. Quantum Computation and Quantum Information by Nielsen and Chuang Answer Guide Tech Report An Introduction to Quantum Computing for Non-Physicists – ACM Computing Surveys, Sept. 2000
E N D
Beginner’s Guide to Quantum Computing Graduate Seminar Presentation Oct. 5, 2007
Introduction • Quantum Computation and Quantum Information by Nielsen and Chuang • Answer Guide Tech Report • An Introduction to Quantum Computing for Non-Physicists – ACM Computing Surveys, Sept. 2000 • Quantum Mechanics Demo
Qubits • Representation of basic physical property • Spin of atom • Orientation of photon • Computational Basis • Ket notation • |0> |1>
Qubit State • “Other” states • Complex probabilities • x + yi [i is square root of -1] • Sum of square of absolute values of probabilities = 1 • Absolute value of complex number is distance from origin in complex plane • abs(x+yi) = (x^2 + y^2)^0.5
Example Qubits • (1/2)^0.5|0> + (1/2)^0.5|1> • (1/2)^0.5 (|0> +|1>) • [(1/2)^0.5,(1/2)^0.5] • [(1/2)^0.5+i/2,i/2] • [sin(x),cos(x)] • [sin(x)+cos(x)i,0]
Qubit Systems • Two qubits (q0, q1) => Four probabilities • |00>, |01>, |10>, |11> • Tensor product • [a,b] * [c,d] = [ac, ad, bc, bd] • N qubits => 2^N probabilities • Exponential growth!
Measurement • Reduces qubit to classical bit • [1,0] (|0>) or [0, 1] (|1>) • Can measure 1 qubit and leave rest alone
Entangled States • Cannot be represented as tensor product of two qubits • [(1/2)^0.5, 0, 0, (1/2)^0.5] (Bell state) • Measure 1 qubit, “fixes” other qubit!
Unitary Operators • 1-qubit ops • effect both complex probabilities • 2x2 matrix of complex numbers • UUT = I (reversible) • Examples • THISXYZ • T=[1 0][0 (1+i)/(2^0.5)]
(Walsh)-Hadamard Gate • H = [(1/2)^0.5, (1/2)^0.5] [(1/2)^0.5, -(1/2)^0.5] • Applying to N qubits generates superposition – 2^N possibilities equally likely • True random number generator
Review • Benefits • Massive parallelism • Exponential state space growth • Problems • Measurement collapses state • Reversible computation • No copying
Shor’s Algorithm • Finding prime factors (RSA) • Input N (integer) in binary (e.g., 128-bit) • Randomly choose x, 1<x<N • Find smallest r such that x^r % N = 1 • If r is even and x^(r/2) % N != N-1 • Factors are at least one of gcd(x^(r/2)-1,N) & gcd(x^(r/2)+1,N)
Factoring 15 • Randomly pick 8 • 8^4 % 15 = 1 • gcd(8^2-1,15) = 3 • gcd(8^2+1,15) = 5
Shor’s Algorithm – Quantum Part • Finding r • Superposition N qubits • Apply x^r % N on all qubits • Effectively calculates r for all values from 0 to N-1 • Find minimum value (1)
Shor’s Algorithm - Analysis • Benefits • Uses O(log N)^3 time • Uses O(log N) space • Implemented on 7 qubit machine • Cons • Probabilistic – est. 25% failure rate • More qubits required than bits
Grover’s Algorithm • Unordered search – O(N) • Quantum results – O(N^0.5) • Search matrix • e.g., identity with -1 at desired location • Rotation matrix • Applied N^0.5 times yields minimal failure rate • Optimal for quantum
Phase Estimation • Unitary op has eigenvalue e^(2*PI*i*X) • Estimate X • Basis for Grover’s algorithm and Shor’s algorithm • Shor’s algorithm achieves exponential speed-up • Grover’s algorithm quadratic
Simulation • Java using dense matrices • 12-qubit op requires 5-25 seconds • 12-qubit Inverse QFT requires 2 minutes • 10-qubit ripple carry adder requires 2 min • Allows combination quantum and classical
Future • Quantum algorithm other than phase estimation? • Quantum computer larger than 16 qubits? • Quantum data structures? • Quantum subprocessor?