350 likes | 359 Views
Explore quantum phenomena, measurements, notations, and quantum gates. Understand the fundamental concepts of quantum mechanics and discover the magic of quantum operations using unitary matrices.
E N D
Lecture 10: Quantum Computing • Basic Quantum Physics • Motivation: Waves versus particles, interference experiments • Quantum Notation, Jargon, and Definitions • Quantum computing • Quantum logic gates • Quantum software • Quantum hardware
Classical double-slit experiment #1 • Gun shoots identical particles • Large particleslike tennis balls • All identical • With random direction • At a slow firing rate • Probability of detecting particles for two slits is sum of individual slit probabilities: • P12 = P1 + P2
Classical double-slit experiment #2 • Source generates water waves • At any intensity value • No reflection from absorber • Detector measures wave intensity • (wave height)2 • Waves interfere at absorber • Wave intensity I12 = |h1 + h2|2 • = |h1|2 + |h2|2 + 2|h1||h2|cos • h1 and h2 are complex numbers
Double-slit with electrons • Gun shoots electrons • Individual particles • Indestructible • All identical • With random direction • At a slow firing rate • Detector sees individual electrons • P12P1 + P2 • P12 = |1 + 2|2 (interference!) • 1 and 2 are complex numbers • Electrons exhibit wave behavior?
Measurement: Watching the electrons • Electrons scatter light • Put a light at the back side of the slit wall • Watch where the electron goes • Light on: no interference! • P12=P1 + P2 • Light off: interference! • P12 = |1 + 2|2
First principles of quantum mechanics 1. The probability of an event is given by the square of the absolute value of the probability amplitude for that event: P probability probability amplitude (complex) P | |2 2. When an event can occur several ways, the probability amplitude for the event is the sum of the individual probability amplitudes: 1 + 2 (no measurement interference) P |1 + 2|2 (probability of event e.g. electron at backstop) 3. If you measure and determine which of the possible alternatives an experiment takes, then the probability of the event is the sum of the probabilities for each alternative: P12 = P1 + P2 = |1|2 + |2|2 (measurement at slits no interference)
Other Examples of Quantum Phenomena • Spin of an electron: spin up or spin down • Can be set to a continuum of values but collapses to up or down when measured with a magnetic field • Polarization of a photon: horizontal or vertical • Measured using a calcite crystal; can be set to a continuum of values but collapses to horizontal or vertical upon measurement • Energy levels of an ion: excited or ground state • Can be put in a continuum of states in between these two but collapses to excited or ground state when measured • Just as the state of a transistor can represent a bit (0 or 1), the state of a quantum system (e.g. spin) represents a qubit
Quantum Notation • Classical notation for a bit: x = 0 or x = 1 (only 2 values) • Dirac notation for a quantum bit x (Qubit |x>) e.g. spin of an electron: up = |1>, down = |0>, continuum of possible values |x> (0,1) x = 1 (1,0) x = 0 |1> Qubit |x> |0> Example: c1 and c2 are two real numbers
Quantum Jargon • A qubit in a quantum system can exist in a linear superpositionof basis states (“eigenstates”) |0> and |1>: • c1and c2 are complex numbers: c1= a1 + b1i ; c2= a2 + b2i • i is the square root of –1:
Cliff’s notes on complex numbers • Consider a complex number c = a+ bi • Complex conjugate of c is c* = a- bi • Amplitude of c = = amplitude of c* • Squared amplitude of c = a2 – (-b2) = a2 – i2b2 = c*c • c can also be written as c = Aei = A (cos + i sin ) where: is the amplitude, is the phase of c,
The Effect of Measurement • If you measure the quantum system, the qubit (superposition of states) collapses to one of the basis states |0> and |1> • c1and c2 are called probability amplitudes because probability of getting |0> or |1> upon measurement depends on their squared amplitudes: • Since Prob(|0>) + Prob(|1>) = 1,
Unitary matrices • Matrix of complex numbers: • Conjugate transpose of a matrix: • A matrix U is unitary if U*TU = I • I is the identity matrix
Why are unitary matrices important? • Suppose |x> is a qubit: • |x> has length 1 • Suppose |y> = U|x> (i.e. transform |x> using U) • Length of |y> is: • Unitary matrices preserve length! • Unitary transformationsconserve probability
Quantum Operations and Gates • Quantum systems are described by Schrödinger’s wave equation • Integrating this differential equation, we can show that the state |x> of a quantum system evolves as: • |x>new = U|x>old where • U is a unitary matrix derived from Hamiltonian H • H is a unitary matrix that represents total energy of the system • Every quantum state |x> is a vector of unit length • Quantum gates map unit vectors |x> to unit vectors |y> • For quantum computing, we design H so that U acts like a logic gate • Quantum computers are deterministic, linear, reversible, and unitaryuntil a measurement is made
1-bit quantum gates • Example: NOT gate • Check: UNOT is unitary • 1-bit gates: S phase shift gate R Rotation gate Walsh-Hadamard gate
1-bit quantum gates (cont.) • There are infinitely many 1-bit gates, corresponding to the rotations about a sphere: e.g. R gate Another example: Square root of NOT gate
More Notation • A qubit is given by a column vector: • In Dirac notation, define a row vector: • The “bra”-“ket” of x is the inner product:
Orthonormal basis states • The vectors |x and |y are orthonormal • iff they are orthogonal: • and normalized: • Example:
What is a Hilbert Space? • If S is a set of basis states, then the Hilbert space is the space of functions from S to complex numbers: each function produces a vector of complex numbers in this space • Example: |0> and |1> define an orthonormal Hilbert space whose vectors are of the form: • The states of a quantum system are vectors in a particular Hilbert space • Measurement of the system produces one of the orthogonal axes (a basis state or “eigenstate”) of the Hilbert space
Vector Products in Dirac Notation • Vector Products of basis states:
Quantum Logic Gates: 1-bit gates • NOT gate: • NOT gate in Dirac Notation:
2-bit Quantum Logic Gates • Orthonormal Basis States: • Controlled NOT gate: • CN gate in Dirac Notation: A B A’ B’0 0 0 00 1 0 110 1 1 11 1 0
Two-bit Quantum Operations • Operation of CN gate onarbitrary qubits x: UCN switches the amplitudes of |10> and |11>
Entanglement • Two bits in a quantum system are entangled if measurement of one is always correlated with measurement of the other • If you measure the second bit of x, you know the first bit also: E.g. if second bit was 1, we know first bit must be 1 • The qubits in y are not entangled: cannot determine value of first bit based on value of second bit • Entangled qubits cannot be factored into their components:
No Cloning Theorem • There is no unitary transform that allows us to copy a qubit • Proof: Suppose U is a copying matrix: U|c0> = |cc> for all states |c> • Then, • Illustration: Copy a bit using CNOT….yields an entangled state!
Three-bit Quantum Gates • Controlled Controlled NOT (CCN) gate: • UCCN is an 8 x 8 matrix: • UCCN is universal:we can form any Boolean function using only CCN gates: e.g. AND if C = 0 A B C A’ B’ C’0 0 0 0 0 0 0 0 1 0 0 10 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 11 1 0 1 1 1 1 1 1 1 1 0
Premise of quantum computing • Simulating an N-bit quantum system on a classical computer requires an amount of computation exponential in N • Need to track 2N complex amplitudes simultaneously • Nature updates real systems in constant time • Updates all the amplitudes simultaneously • Uses quantum superposition, or quantum parallelism • Quantum computation: Use nature to compute • Use N qubits to represent 2N complex amplitudes • Perform unitary operations on qubits • Measure to get the output • Harness quantum superposition to get exponential speedup
N particles 2N unique states Computations are sequential Select 1 state Operate on it Put it back into memory Example: N=3 3 bits 8 states Work on one number at a time x = 101 N particles 2N unique states Computations occur in parallel States interact They are entangled Operate on all states at once Example: N=3 3 qbits 8 complex amplitudes Operator manipulates 8 at once Comparson of Classical versus Quantum Computing Classical Computer Quantum Computer Exponential Speedup
Shor’s Quantum Factoring Algorithm • Suppose you want to factor a number N • Shor’s algorithm: • Pick random x < N. • Compute f = gcd(x,N); if f l, return f // f is a factor • Find the least r > 0 such that xr 1 (mod N). • Compute f1 = gcd(xr/2 – 1,N) ); if f1 l, return f1 // f1 is a factor • Compute f2 = gcd(xr/2 + 1,N); if f2 l, return f2 // f2 is a factor • Go to 1 and repeat • Number of repetitions for finding a factor with prob > 0.5 is polynomial in length of N • Hard part: Step 3. Find the least r such that xr 1 (mod N). • r is the period of repetition of x1, x2,… (mod N).
Quantum parallelism for finding period • Finding the period r of repetition of x1, x2,… (mod N). • Prepare an equal superposition of all values of r < q = N2 • Chose random x and compute (xr mod N) for all r simultaneously: • Apply quantum Fourier Transform UQFT to superposition of states: • Measure contents of register containing k to compute period r • See Shor’s paper and tutorials on class website for more details
Grover’s Database Search Algorithm • Problem: Search a random list of N items for a target itemxT such that the function P(xT) is true e.g. searching for a key in DES • Grover’s algorithm: Amplify amplitude of target item • Prepare an equal superposition of all x • Invert the amplitude of xj if P(xj) = 1 • Subtract all amplitudes from average amplitude • Repeat (2) and (3) times • Measure the result • Quadratic speedup over classical search (O(N) steps).
Quantum Hardware • Suggested Possibilities: Ion Traps (Quantum dots), Cavity QED (quantum electrodynamics), NMR: nuclear magnetic resonance
Quantum Computing: Summary • Basic Mechanism: Parallel computation along all possible computational paths, with selective manipulation of probability amplitudes • Main Features: Problem instances encoded as states of a quantum system (e.g. spins of n electrons, polarization values of n photons etc.) • The system is put into a superposition of all possible states, each weighted by its probability amplitude (= a complex number ci) E.g. Qubits for 2 electrons = c1|00> + c2|01> + c3 |10> + c4 |11> • The system evolves according to quantum principles: • Unitary matrix operation: describes how superposition of states evolves over time when no measurement is made • Measurement operation: maps current superposition of states to one state based on probability = square of amplitude ci E.g. probability of seeing output bits (00) is | c1|2
Quantum Computing: Problems and Future Directions • Problems: • Decoherence: Environmental noise may inadvertently “measure” the system, thereby disturbing the computation (current decoherence time ~ 1 ms) • Software solution: Error correcting codes may help ([Shor et al.]) • Scaling: All physical implementations so far (NMR, Cavity QED, etc.) have failed to scale beyond a few qubits. • Future Directions: • Hardware Implementations: New physical substrates are needed that allow manipulations of large numbers of qubits (superpositions of states) with little or no decoherence • New Algorithms: New ways of exploiting quantum parallelism are needed that allow solutions to NP-complete problems
5-minute break…(Please fill out course evaluations) Next: Student presentations!