* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Quantum Computation and Quantum Information – Lecture 3
Ensemble interpretation wikipedia , lookup
Theoretical and experimental justification for the Schrödinger equation wikipedia , lookup
Wave–particle duality wikipedia , lookup
Relativistic quantum mechanics wikipedia , lookup
Renormalization wikipedia , lookup
Double-slit experiment wikipedia , lookup
Topological quantum field theory wikipedia , lookup
Renormalization group wikipedia , lookup
Basil Hiley wikipedia , lookup
Bohr–Einstein debates wikipedia , lookup
Quantum dot cellular automaton wikipedia , lookup
Scalar field theory wikipedia , lookup
Bell test experiments wikipedia , lookup
Delayed choice quantum eraser wikipedia , lookup
Particle in a box wikipedia , lookup
Quantum electrodynamics wikipedia , lookup
Probability amplitude wikipedia , lookup
Quantum decoherence wikipedia , lookup
Path integral formulation wikipedia , lookup
Measurement in quantum mechanics wikipedia , lookup
Quantum field theory wikipedia , lookup
Copenhagen interpretation wikipedia , lookup
Density matrix wikipedia , lookup
Coherent states wikipedia , lookup
Hydrogen atom wikipedia , lookup
Bell's theorem wikipedia , lookup
Quantum dot wikipedia , lookup
Quantum entanglement wikipedia , lookup
Quantum fiction wikipedia , lookup
Many-worlds interpretation wikipedia , lookup
Orchestrated objective reduction wikipedia , lookup
Symmetry in quantum mechanics wikipedia , lookup
History of quantum field theory wikipedia , lookup
EPR paradox wikipedia , lookup
Interpretations of quantum mechanics wikipedia , lookup
Quantum computing wikipedia , lookup
Canonical quantization wikipedia , lookup
Quantum machine learning wikipedia , lookup
Quantum key distribution wikipedia , lookup
Quantum group wikipedia , lookup
Quantum cognition wikipedia , lookup
Quantum state wikipedia , lookup
Quantum Computation and Quantum Information – Lecture 3 Part 1 of CS406 – Research Directions in Computing Nick Papanikolaou Motivation Quantum computers are built from wires and logic gates, just as classical computers are The potential of such devices stems from the ability to manipulate superpositions of states Quantum algorithms solve problems which are not known to be solvable classically! Lecture 3 Topics Quantum logic gates Simple quantum circuits Quantum teleportation as a circuit Deutsch’s quantum algorithm Quantum vs. classical gates The simplest boolean gate is NOT, with truth table: in out 0 1 1 0 Quantum gates have to be defined not only on the equivalents of 0 and 1, but on their superpositions too! Quantum NOT gate: Linearity Suppose we define a quantum NOT gate as follows: NOT 0 1 , NOT 1 0 The action of the quantum NOT gate on a superposition must then be: NOT 0 1 NOT 0 NOT 1 1 0 All quantum operations are linear The NOT Gate as a Matrix Because all quantum operations have to be linear, we can represent the action of a quantum gate by a matrix The quantum NOT, or Pauli-X gate, is written: 0 1 X 1 0 Quantum State Vectors Remember that a quantum state is represented by a vector Notation: 1 0 0 , 1 0 1 0 1 Quantum NOT We can express the NOT operation on a general qubit as matrix multiplication: 0 1 X 0 1 1 0 Other Single Qubit Gates The Pauli-X gate works on only one qubit Other common single qubit gates are: – Pauli-Z gate: 1 0 Z 0 1 Z Y – Pauli-Y gate: Y Z X – Hadamard gate: 1 1 1 H NOT 1 1 2 H Summary of Simple Gates 0 1 X 1 0 0 1 Y i 1 0 0 1 Z 0 1 0 1 H 0 1 2 0 1 2 Reversibility Requirement All quantum operations have to be reversible Boolean operations are not necessarily so A reversible operation is always given by a unitary matrix, i.e. one for which: (UT )* U 1 The Controlled NOT Gate The CNOT gate is the standard two-qubit quantum gate It is defined like this: CNOT 00 00 CNOT 01 01 CNOT 10 11 CNOT 11 10 The Controlled NOT Gate (2) CNOT is a generalisation of the classical XOR: CNOT A, B A, B A The CNOT gate is drawn like this: “control qubit” A A B B A “target qubit” The Controlled NOT Gate (3) The matrix corresponding to the CNOT gate is: 1 0 0 0 0 1 0 0 CNOT 0 0 0 1 0 0 1 0 The CNOT together with the single qubit gates are universal for quantum computing Quantum Circuits Using the conventions for control and target qubits, we can build interesting circuits Example: A Qubit Swap Circuit A B B A Qubit Swap Circuit A B A A ( A B) B A B A B B A B ( A B) A Features of Quantum Circuits 2. No loops are allowed; quantum circuits are acyclic Fan-in is not allowed: 3. Fan-out is not allowed: 1. Generalised Control Gate Any quantum gate U can be converted into a controlled gate: One control qubit U n target qubits If the control qubit is “high,” U is applied to the targets. CNOT is the Controlled-X gate! Quantum Measurement Measurement in a quantum circuit is drawn as: M (classical bit representing outcome of measurement) M = 0 with prob. or 2 M = 1 with prob. 2 If 0 1 then: A Qubit Cloning Circuit? Using the XOR gate, it is possible to copy a classical bit: x x x x 0 y xy x Can we build a quantum circuit that performs does ? this with qubits? 0 A Qubit Cloning Circuit? (2) 0 0 1 1 OK here 0 0 0 1 0 0 1 00 11 entangled!! A Qubit Cloning Circuit? (3) It is impossible to clone a qubit! Also note that 0 1 0 1 2 00 01 10 2 11 unwanted terms! The Bell State Circuit x H x y Output 0 0 1 00 11 2 0 1 1 01 10 2 0 1 00 11 2 1 1 01 10 2 y 1 1 The Bell State Circuit By Example 0 H 1 0 1 2 ? 0 0 1 00 10 CNOT 0 CNOT 2 2 1 CNOT 00 CNOT 10 2 1 00 11 2 Quantum Teleportation Circuit M1 H M2 XM2 0 ZM1 1 00 11 0 1 2 Quantum Teleportation Circuit (2) H M1 M2 XM2 ZM1 1 0 00 11 1 |10>|01> 1 00 11 2 Quantum Teleportation Circuit (3) H M1 M2 XM2 2 ZM1 1 00 0 1 01 1 0 2 10 0 1 11 1 0 Quantum Teleportation Circuit (4) H M1 M2 XM2 00, 01, 10 or 11 ZM1 Quantum Teleportation Circuit (5) If Alice Then Bob’s obtains qubit is in state So Bob applies gate 00 0 1 I 01 1 0 X 10 0 1 Z 11 1 0 Y = ZX obtaining 0 1 What have we achieved? The teleportation process makes it possible to “reproduce” a qubit in a different location But the original qubit is destroyed! Next topic: Quantum Parallelism and Deutsch’s quantum algorithm Quantum Parallelism Quantum parallelism is that feature of quantum computers which makes it possible to evaluate a function f(x) on many different values of x simultaneously We will look at an example of quantum parallelism now – how to compute f(0) and f(1) for some function f all in one go! Quantum Circuits for Boolean Functions It is known that, for any boolean function f : 0,1 0,1 it is possible to construct a quantum circuit Uf that computes it Specifically, to each binary function f corresponds a quantum circuit: U f : x, y x, y f ( x) binary addition Quantum Circuits for Boolean Functions (2) What can this circuit Uf do? Example: 0 1 x x Uf y yf(x) U f 0 1 U f 01 0, 1 f (0) Quantum Circuits for Boolean Functions (3) But what if the input is a superposition? 1 0 1 2 1 x x Uf y yf(x) amazing! we’ve computed f(0) and f(1) at the same time! 0 1 U f 0 2 00 10 U f 2 0, 0 f (0) 1, 0 f (1) 2 0, f (0) 1, f (1) 2 Quantum Parallelism Summary So, a superposition of inputs will give a superposition of outputs! We can perform many computations simultaneously This is what makes famous quantum algorithms, such as Shor’s algorithm for factoring, or Grover’s algorithm for searching Simple q. algorithm: Deutsch’s algorithm Deutsch’s Algorithm David Deutsch: famous British physicist Deutsch’s algorithm allows us to compute, in only one step, the value of f (0) f (1) To do this classically, you would have to: 1. 2. 3. – compute f(0) compute f(1) add the two results Remember: f : 0,1 0,1 Circuit for Deutsch’s Algorithm 0 H 1 H x H x Uf 0 01 y 1 yf(x) 0 1 2 0 1 2 Circuit for Deutsch’s Algorithm (2) 0 H 1 H 2 x x Uf y yf(x) 0 1 0 1 if f (0) f (1), 2 2 if f (0) f (1), 0 1 0 1 2 2 H Circuit for Deutsch’s Algorithm (3) 0 H 1 H if 3 if x x H Uf y yf(x) 0 1 f (0) f (1), 0 2 this simplifies to 0 1 f (0) f (1), 1 02 1 3 f (0) f (1) 2 ...and so we have computed f (0) f (1) End of Lecture 3 Congratulations! If you are still awake, you have learned something about: – – – – – quantum gates (X, Y, Z, H, CNOT) quantum circuits (swapping, no-cloning problem) teleportation quantum parallelism and Deutsch’s algorithm