1.16k likes | 1.27k Views
An Introduction to Quantum Computing GOSN203 (AI); GOSN204 (OS). Professor John FULCHER Christopher Newport University April 2004. …the story so far:. References :
E N D
An Introduction to Quantum ComputingGOSN203 (AI); GOSN204 (OS) Professor John FULCHER Christopher Newport University April 2004
…the story so far: • References: • * E. Riefel & W. Polak (2000) “An Introduction to Quantum Computing for Non-Physicists” ACM Computing Surveys22(3) 300-335 * HANDOUT#1 • * J. Mullins (2002) “Making Unbreakable Code” IEEE Spectrum May 40-45. * HANDOUT#2 • http://www.pcs.cnu.edu/~mzhang/PCS450_550/QuantumComp1(2).ppt (Lecture Notes: MS-PowerPoint) • C. Bennett, G. Brassad & A. Ekert (1992) “Quantum Cryptography” Scientific American267(4) 26-33 • C. Williams & S. Clearwater (1998) Explorations in Quantum Computing Springer (+ CDROM – Mathematica)
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 1. Superposition of all possible states simultaneously. Hence an n-Qubit memory register can exist in a superposition of all 2n possible configurations: |f> = a|0> + b|1> • i.e. a Quantum Computer = a massively parallel computer (however, it is impossible to observe these parallel computations individually).
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 2. Interference – since a QC can work on several classical inputs at once, they can interfere with/influence one another (either constructively or destructively): • |f> = |0 1> + |1 0> • a net computational state that reveals a joint/collective property of all the computations i.e. quantum parallelism.
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 3. Entanglement – 2 or more Qubits emerge from an interaction in a definite joint quantum state that cannot be expected in terms of a product of definite individual quantum states: |f> = |0 1> + |1 0> • Moreover, they retain a lingering, instantaneous influence on each other, irrespective of their distance of separation quantum teleportation(for which there is no classical counterpart!); quantum factoring relies on entanglement to create a repeating sequence of numbers whose period reveals the factors of a large integer.
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 4. Non-determinism = inability to predict the quantum state into which a superposed state will collapse upon being measured • quantum key distribution, which relies on non-determinism to guarantee that any eavesdropping will be detected.
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 5. Non-clonability, since it is impossible to copy an unknown quantum state exactly (Heisenberg Uncertainty Principle). • It is impossible to measure pairs of quantities simultaneously (e.g. position & momentum) quantum cryptography relies on non-clonability to guarantee security.
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 6. Non-locality: quantum teleportation relies on non-locality (as well as entanglement) to disassemble and re-assemble the quantum state to be teleported.
Key Quantum Phenomena • Key Quantum Computing Phenomena: • 7. reversible: and thus no power dissipation: • H |in> = |out>; H -1 |out> = |in> • An operation is logically reversible if it can be undone (run backwards) – i.e. if its inputs can always be deduced from the outputs. • cf. classical computations, which are irreversible & thus dissipative.
Quantum Spin States • 2-state quantum system used to encode a Qubit: • The (solid) angle between the vector & the vertical axis (= phase) is determined by the relative contributions of the |y0> and |y1> (eigen)states
Q: Where’s the power in QCs?A: Superposition • Superposition = simultaneous existence in many states, not just |0> and |1> but: • Qubit: phase = (solid) q magnitude = c0|0> + c1|1> • where probabilities |c0|2 + |c1|2 = 1 (i.e. 100%) • & |ci| = sqrt (xi2 + yi2) (i.e. complex numbers) q
Quantum Gates • Any quantum computation can be reduced to a sequence of 1 and 2 qubit operations: • H |in> = H1 H2 H3 .... Hn|in> • Conventional operations: NOT , AND • Quantum operations: qNOT , CNOT
Quantum Gates • e.g. a root(NOT) gate: |input> |output> = NOT |input> rootNOT rootNOT superposition of bits (thus unlike any classical gate)
Walsh-Hadamard Gate • e.g. if we apply the WH-gate to each of nqubits individually, we obtain the superposition of the 2n numbers that can be represented in n bits. • Thus we can effectively load exponentially many (2n) numbers into a quantum computer using only polynomial many (n) basic gate operations.
Controlled-NOT Gate • A particular 2-qubit gate is of paramount importance in quantum computing, & this is the controlled-NOT gate: • UCN|00> = |00> • UCN|01> = |01> • UCN|10> = |11> • UCN|11> = |10> • ie. apply NOT to (flip) second bit if firstqubit = 1. |x> |x> |y> |x xor y>
Controlled-NOT Gate • NOTE that this operation involves no measurements whatsoever – i.e. we do not need to measurequbits in order to bring about “controlled” operations. |x> |x> xor: control 10 1 not 0 1 1 |y> |x xor y>
Universal Quantum Gates • Universal Gates: the (infinite) set of all 1-qubit rotations, together with the controlled-NOT gate, is enough to achieve any imaginable quantum computation. • i.e. we can perform anyquantum computation by connecting just 1-qubit rotation gates and controlled-NOT gates (cf. any classical computation can be realized using just AND and NOT gates) • Barenco (1995) and DiVincenzo (1995) independently showed that a 2-qubit gate is universal for quantum computation.
Reversible Computation • Quantum realizations of sets of reversible gates which are universal for all Boolean circuits. • Recall that a quantum circuit is composed of quantum wires & elementary quantum gates; each wire represents a path of a single qubit & is described by a state in the 2D Hilbert SpaceC2.
Quantum Calculus • A Hilbert Space is a mathematical model for representing state space vectors. • The state of a quantum system can be described by a column vector (|y> “ket”) in a Hilbert Space of wave functions. • As the system evolves, its state vector rotates with its base anchored to the origin of the axes.
Tensor Products • Systems of more than onequbit need a Hilbert Space which captures the interaction (entanglement) of the qubits. • A 2-qubit system can be represented by a unit vector in the tensor product of 2 copies of C2 (i.e. the space C2C2).
Quantum Calculus • In general, a system containing exactly n >= 2 qubits is represented by n copies of C2tensored together. Thus the state space is 2n-dimensional. • Now in contrast to a classical system, which can be completely defined by describing the state of each individual component, in a quantum system, the state cannot always be described by considering only the component pieces.
Entangled States • e.g. the state 1/root(2)(|00> + |11>) cannot be decomposed into separate states for each of the 2 qubits. • i.e. we cannot express this state as a tensor product of two single qubits. • A state that can’t be expressed as a tensor product is called an entangled state.
Not covered in lectures… • Quantum Memory Registers • Quantum Error Correction • Symmetry, entanglement, “ancilla” qubits (Shor) • Fault tolerant (Quantum) Computers • [ref. Handout#1, references]
This Lecture… • Quantum Algorithms • Quantum Key Distribution • (Teleportation)? • Quantum Computer Hardware • QC Applications (OS; AI)?
Quantum Parallelism • The principal advantage of a quantum computer over a classical computer is that it can use a technique called quantum parallelism to compute certain joint properties of several superposed computations • (several answers to different classical computation) in the time it takes a classical computer to find just one of these answers…
Quantum Parallelism • …moreover, the quantum computer can do this without needing to reveal the answer to any one of those computations individually. • This gives the quantum computer the potential to be vastly more efficient than a classical computer at certain computational tasks.
Quantum Algorithms • 1. The Deutsch-Jozsa problem: Is a boolean function f:{0,1} {0,1} even(i.e. always gives the same output) and/or balanced(gives one output on half of the inputs, & another output on the other half)? • Exploits superpositionwithout need for measurement • 2. Simon (1994): a quantum memory register could be used to evolve into a superposition representing the Fourier Transform. • Measurement sample period (of sines, cosines)
Quantum Algorithms • 3. Shor (1994): factoring of large composite integers can be achieved by finding the period (= QC’s “killer app”lication) • exploits a technique similar to Simon’s Fourier Transform sampling. • 4. Grover (1996) showed that unstructured search can be solved with bounded probability in O(rootN) on a Quantum Computer.
1. Deutsch-Joza Problem • The Deutsch-Jozsa problem: Consider a boolean function f :{0,1} -> {0,1}. • Is f(0) = f(1) or f(0) not= f(1)? • Classical test: 2 computations & 1 comparison. • Can we do better on a QC? Yes! • The key to a Quantum Computer solution is that we do not need to actually calculatef(x), simply determine whether they are the same.
1. Deutsch-Joza Problem • Suppose we possess a quantum “black box” which computes ‘f’ (a big if!) • Consider the transformation Uf which applies to 2 qubits |x> and |y> and produces |x>|y mod2f(x)). • This transformation flips the second bit if f acting on the first bit is 1, & does nothing if f acting on the first qubit is 0.
1. Deutsch-Joza Problem • Now since the black box is “quantum”, we can choose the input state to be a superposition of |0> and |1>, say 1/root2(|0>+|1>) and 1/root2(|0>-|1>)… • Perform a measurement that projects the first qubit onto the basis 1/root2(|0>+|1>), 1/root2(|0>-|1>) • we will obtain 1/root2(|0>+|1>) if the function is balanced, 1/root2(|0>-|1>) if not.
1. Deutsch-Joza Problem • We can achieve this because a quantum computer can be in a blend of states: we can compute f(0) and f(1), but more importantly, extract information about f which tells us whether f(0) is equal to f(1) or not.
1. Deutsch-Joza Problem • Solution of the Deutsch-Jozsa problem on a quantum computer: • Step#1. Initialize the 2-qubit register in the state |0>|1>. • Step#2. Apply the Walsh-Hadamard operation W to each qubit: |0>|1> 1/root2(|0> + |1>) superimposed with 1/root2(|0> - |1>)
1. Deutsch-Joza Problem • Solution of the Deutsch-Jozsa problem on a quantum computer: • Step#3. Apply the operation U(which requires f to be evaluated once only):1/root2(|0> + |1>) superimposed with 1/root2(|0> - |1>) 1/root2((-1)f(0)|0> + (-1)f(1)|1>) superimposed with 1/root2(|0> - |1>)
1. Deutsch-Joza Problem • Solution of the Deutsch-Jozsa problem on a quantum computer: • Step#4. Apply the operation V(which does not require f to be evaluated):1/root2((-1)f(0)|0> + (-1)f(1)|1>) superimposed with 1/root2(|0> - |1>) 1/root2((-1)f(0)+(-1)f(1)|0> + (-1)f(0)-(-1)f(1)|1>) superimposed with 1/root2(|0> - |1>)
1. Deutsch-Joza Problem • Solution of the Deutsch-Jozsa problem on a quantum computer: • Step#5. Measure the bit value in the first qubit: • If it is 0, f(0) = f(1); • If it is 1, f(0) not= f(1).
1. Deutsch-Joza Problem • NOTE: in essence, this quantum algorithm exploits superposition and interference to extract a joint property of both function values – f(0) and f(1) – without having to calculate either function value explicitly.
2. Fourier Transform on QC • Any mathematical function can be described as a weighted sum of certain basis (elementary) functions such as sines & cosines (or real & imaginary exponential functions): sin(x), sin(2x), …cos(x), cos(2x)…(the more terms, the better the approximation) Fourier Series • recall eiq = cos q + i sin q (circle)
2. Fourier Transform on QC • Fourier series = (integral) representation of continuous (linear) functions Discrete Fourier Transform for sampled functions Fast Fourier Transform (= a more efficient algorithm – 2n terms) • In Digital Signal Processing, the FFT transforms a signal from the time-domain to the frequency domain (& Inverse FFT from f-domain to t-domain)
2. Fourier Transform on QC • Observation: if a time-varying signal is very spiky, this means it can be represented by just a few sines & cosines, with precisely defined periods.
2. Fourier Transform on QC • D. Simon (1994): a quantum computation could cause the state of a quantum memory register to evolve into a superposition representing the Fourier Transform. • By reading this memory register, we would most likely obtain a result corresponding to where the probability amplitude was most highly concentrated – i.e. where the Fourier Transform is most strongly spiked.
2. Fourier Transform on QC • Thus a quantum measurement returns a sample from the Fourier Transform, which provides us with some information about the periodic sine & cosine functions which make up our original function.
3. Shor’s Factoring Algorithm • P. Shor (AT&T) was wanting to demonstrate that a quantum computer could be used to solve a real problem, as opposed to the contrived problems demonstrated up to that time (mid 1990s). • Shor: if you can relate the (real) problem of finding the factors of a large composite integer to that of finding the period, then you can exploit a technique similar to Simon’s sampling of a FT.
3. Shor’s Factoring Algorithm • Shor (1994) showed that a quantum computer could be used to factor a large integer super-efficiently. • This was big news, especially in security & banking circles (since all of a sudden RSA public cryptography is rendered eminently breakable)!
3. Shor’s Factoring Algorithm • Multiplying large prime numbers together is computationally easy: e.g. 127 * 229 = ? • By contrast, no conventional (classical) polynomial algorithm exists for factoring large prime numbers (exhaustive search only) • (in fact it is thought to be practically impossible) hence used as the basis for (RSA) public key cryptography. e.g. ? * ? = 29,083 • & this is only for five digits – imagine 400, say!
3. Shor’s Factoring Algorithm • Classical Factoring Algorithms: • The time required to find the factors is strongly believed (but has never been proved) to be superpolynomial in log(n); i.e. as n increases, the worst case time grows faster than any power of log(n). • Quadratic Sieve was the best known technique in 1997 (network of 1,000 workstations).
3. Shor’s Factoring Algorithm • Shor’s exciting new result was that a quantum computer could factor in polynomial time – O[(ln n)3] factoring of a 400-digit number in under 3 years (cf. 1010 years on a classical computer)!
3. Shor’s Factoring Algorithm Public Key Cryptography (RSA) P1 P2 C [easy] : t = P(N) C P1 P2 [hard] : t = exp(N) Eg: Factorization of a 129-digit number (RSA-129) ~2000 computers processing for 8 months Shor’s Algorithm - Finds prime factors Peter Shor (AT&T Bell Labs, 1994) C P1 P2 [easy] : t = P(N) With a QC could solve RSA-129 in seconds!
3. Shor’s Factoring Algorithm • Shor’s quantum factoring algorithm relies on a result from number theory that relates the period of a particular periodic function to the factors of an integer: • Given a number n, choose a related function fn(a) = xa mod n, such that the Greatest Common Divisor of x and n = 1. • Both mod & GCD can be computed efficiently (even on a classical computer).
3. Shor’s Factoring Algorithm • Step-1: pick a number q such that 2n2 =< q =< 3n2. • Step-2: pick a random integer x whose Greatest Common Divisor with n is 1.