Presentation on theme: "Quantum Computation and Quantum Information – Lecture 3 Part 1 of CS406 – Research Directions in Computing Nick Papanikolaou."— Presentation transcript:
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 Deutschs quantum algorithm
Quantum vs. classical gates The simplest boolean gate is NOT, with truth table: Quantum gates have to be defined not only on the equivalents of 0 and 1, but on their superpositions too! inout 01 10
Quantum NOT gate: Linearity Suppose we define a quantum NOT gate as follows: The action of the quantum NOT gate on a superposition must then be: 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:
Quantum State Vectors Remember that a quantum state is represented by a vector Notation:
Quantum NOT We can express the NOT operation on a general qubit as matrix multiplication:
Other Single Qubit Gates The Pauli-X gate works on only one qubit Other common single qubit gates are: – Pauli-Z gate: – Pauli-Y gate: – Hadamard gate: Z Y H
Features of Quantum Circuits 1. No loops are allowed; quantum circuits are acyclic 2. Fan-in is not allowed: 3. Fan-out is not allowed:
Generalised Control Gate Any quantum gate U can be converted into a controlled gate: U One control qubit 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) Ifthen: M = 0 with prob. or M = 1 with prob.
A Qubit Cloning Circuit? Using the XOR gate, it is possible to copy a classical bit: xx y x y x 0 x x Can we build a quantum circuit that performs does this with qubits?
A Qubit Cloning Circuit? (2) entangled!! OK here
A Qubit Cloning Circuit? (3) It is impossible to clone a qubit! Also note that unwanted terms!
Quantum Teleportation Circuit H X M2 Z M1 M1 M2
Quantum Teleportation Circuit (2) H X M2 Z M1 M1 M2
Quantum Teleportation Circuit (3) H X M2 Z M1 M1 M2
Quantum Teleportation Circuit (4) H X M2 Z M1 00, 01, 10 or 11 M1 M2
Quantum Teleportation Circuit (5) If Alice obtains Then Bobs qubit is in state So Bob applies gate obtaining 00I 01X 10Z 11Y = ZX
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 Deutschs 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 it is possible to construct a quantum circuit U f that computes it Specifically, to each binary function f corresponds a quantum circuit: binary addition
Quantum Circuits for Boolean Functions (2) What can this circuit U f do? Example: xx y y f(x)
Quantum Circuits for Boolean Functions (3) But what if the input is a superposition? xx y y f(x) amazing! weve computed f(0) and f(1) at the same time!
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 Shors algorithm for factoring, or Grovers algorithm for searching Simple q. algorithm: Deutschs algorithm
Deutschs Algorithm David Deutsch: famous British physicist Deutschs algorithm allows us to compute, in only one step, the value of To do this classically, you would have to: 1. compute f(0) 2. compute f(1) 3. add the two results – Remember:
Circuit for Deutschs Algorithm xx y y f(x) H H H
Circuit for Deutschs Algorithm (2) xx y y f(x) H H H
Circuit for Deutschs Algorithm (3) xx y y f(x) H H H...and so we have computed
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 Deutschs algorithm