Cove: A Practical Quantum Computer Programming Framework Matt Purkeypile Doctorate of Computer Science Dissertation Defense June 26, 2009.

Slides:



Advertisements
Similar presentations
University of Queensland
Advertisements

Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Quantum Computers Gates, circuits and programming.
Programming Types of Testing.
Chapter 1 - An Introduction to Computers and Problem Solving
Cove: A Practical Quantum Computer Programming Framework Matt Purkeypile Fall 2008.
Resent Progress in Quantum Algorithms Min Zhang. Overview What is Quantum Algorithm Challenges to QA What motivates new QAs Quantum Theory in a Nutshell.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Introduction to Cryptography and Security Mechanisms: Unit 5 Theoretical v Practical Security Dr Keith Martin McCrea
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Department of Computer Science & Engineering University of Washington
Quantum Computing Ambarish Roy Presentation Flow.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Quantum Computation and Error Correction Ali Soleimani.
An Algebraic Foundation for Quantum Programming Languages Andrew Petersen & Mark Oskin Department of Computer Science The University of Washington.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
Quantum Computing Joseph Stelmach.
Anuj Dawar.
Memory Hierarchies for Quantum Data Dean Copsey, Mark Oskin, Frederic T. Chong, Isaac Chaung and Khaled Abdel-Ghaffar Presented by Greg Gerou.
Chapter 1 Program Design
Shor’s Algorithm Osama Awwad Department of Computer Science Western Michigan University July 12, 2015.
ROM-based computations: quantum versus classical B.C. Travaglione, M.A.Nielsen, H.M. Wiseman, and A. Ambainis.
Quantum computing Alex Karassev. Quantum Computer Quantum computer uses properties of elementary particle that are predicted by quantum mechanics Usual.
By: Mike Neumiller & Brian Yarbrough
Tallinn University of Technology Quantum computer impact on public key cryptography Roman Stepanenko.
Quantum Algorithms for Neural Networks Daniel Shumow.
Quantum Error Correction Jian-Wei Pan Lecture Note 9.
Quantum Computing Presented by: Don Davis PHYS
CSC-115 Introduction to Computer Programming
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Quantum Information Jan Guzowski. Universal Quantum Computers are Only Years Away From David’s Deutsch weblog: „For a long time my standard answer to.
Y. Kotani · F. Ino · K. Hagihara Springer Science + Business Media B.V Reporter: 李長霖.
Small-Depth Quantum Circuits Frederic Green Department of Math/CS Clark University Worcester, MA.
1 Introduction to Quantum Information Processing CS 467 / CS 667 Phys 467 / Phys 767 C&O 481 / C&O 681 Richard Cleve DC 653 Course.
Lecture note 8: Quantum Algorithms
An Introduction to Quantum Phenomena and their Effect on Computing Peter Shoemaker MSCS Candidate March 7 th, 2003.
Objective At the conclusion of this chapter you will be able to:
1 Database Searching in Quantum and Natural Computing Michael Heather & Nick Rossiter, Northumbria University, England
Nawaf M Albadia
Cove: A Practical Quantum Computer Programming Framework Summer 2008 Status Matt Purkeypile.
Cove: A Practical Quantum Computer Programming Framework Matt Purkeypile (DCS3) Winter 2009.
Quantum Computing Michael Larson. The Quantum Computer Quantum computers, like all computers, are machines that perform calculations upon data. Quantum.
A SEMINAR ON Q UANTUM C OMPUTING Institute Of Engineering & Management (CSE 3 rd year batch) Submitted to- Submitted by- Mr. D.P.S. Rathor Sudhir.
Lattice-based cryptography and quantum Oded Regev Tel-Aviv University.
Multipartite Entanglement and its Role in Quantum Algorithms Special Seminar: Ph.D. Lecture by Yishai Shimoni.
MD5 & Hash Encryption By Alex Buzak. Overview Purpose of MD5 and Hash Encryptions Examples MD5 Algorithm Explanation of Possible Security Risks Practical.
3/12/2013Computer Engg, IIT(BHU)1 INTRODUCTION-1.
As if computers weren’t fast enough already…
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Can small quantum systems learn? NATHAN WIEBE & CHRISTOPHER GRANADE, DEC
An Introduction to Quantum Computation Sandy Irani Department of Computer Science University of California, Irvine.
Quantum Computation Stephen Jordan. Church-Turing Thesis ● Weak Form: Anything we would regard as “computable” can be computed by a Turing machine. ●
Final Project for Phys 642: An Introduction to Quantum Information and Quantum Computing Fall 2013 Implementing a Computer Simulation of Shor’s Quantum.
Quantum Computers By Ryan Orvosh.
1 An Introduction to Quantum Computing Sabeen Faridi Ph 70 October 23, 2007.
Beginner’s Guide to Quantum Computing Graduate Seminar Presentation Oct. 5, 2007.
Algorithms and Problem Solving
Quantum Computer Programming Framework Design
Introduction to Quantum Computing Lecture 1 of 2
Central Processing Unit
A Ridiculously Brief Overview
Chap 4 Quantum Circuits: p
OSU Quantum Information Seminar
Quantum Computation and Information Chap 1 Intro and Overview: p 28-58
Algorithms and Problem Solving
Improving Quantum Circuit Dependability
Quantum Computing Joseph Stelmach.
Matt Purkeypile January 2008
Presentation transcript:

Cove: A Practical Quantum Computer Programming Framework Matt Purkeypile Doctorate of Computer Science Dissertation Defense June 26, 2009

Outline This presentation will cover the following: –A brief introduction to quantum computing. –Walking through a simple factoring example. –Programming quantum computers. –Cove: A new solution for programming quantum computers. –Questions

Quantum Computing Existing computers (classical) operate on bits, which can hold the value of 0 or 1. Quantum computers operate on qubits, which can hold the value of 0, 1, or a combination of the two. –Utilizes probability amplitudes, which means they can reinforce or cancel out. What known problems can quantum computers do better? –Factor numbers, which means RSA can be cracked. A simple example will be shown. –Simulate quantum systems. –Unsorted searches.

Classical and quantum comparison The bit is just the poles of a qubit. The probabilistic bit is just a line through the poles of a qubit.

Mathematically General state of an arbitrary qubit: α 1 and α 2 are complex numbers and represent probability amplitudes. –Hence the total of 1. – in polar form, not commonly used. n qubits are described by 2 n complex numbers. Operations on n qubits are described by a 2 n x 2 n matrix of complex numbers.

Limitations of quantum computers There are several limitations of quantum computers. –Although qubits can hold many possible values, only one classical result can be obtained from every run. Hence the output is probabilistic. Repeated runs may be necessary to obtain the desired result. –The computation must be reversible. –It is impossible to copy qubits (no-cloning theorem)

Practical Example: Factoring Shor’s algorithm for factoring (1994) is perhaps the most famous practical quantum computing example. –It is exponentially faster than the classical solution. –A quantum computer is utilized for only part of the algorithm. This means you still have to do classical computation. Factoring means you can break codes such as RSA. –RSA is frequently utilized. –If N=pq, it is easy to calculate N when given p and q, but very hard to determine p and q when only given N. Also known as a one-way function.

High Level View of Factoring Except for step 2, the algorithm is carried out classically. A probabilistic algorithm: may have to repeat runs until the answer is achieved.

Trivial Example Goal: Factor 15. –Result is 3 and 5. –This has been done on quantum computers in the lab. –Can be worked out by hand. Step 1, let: –N = 15 (the number we are factoring) –n = number of (qu)bits needed to express N, in this case 4. –m = 8 (a randomly selected number between 1 and N)

Step 2 Calculate: –Need to calculate with enough x’s to find the period. – –In general, go to at least N 2 values. It seems like guessing would be faster, but isn’t. –For this example we’ll just do 0 – 15. Given this we can find the period (P). –Essentially where repeats. –In other words for every x. Performing all these calculations where we need only one answer (P) is how we can exploit a quantum computer.

Result

Can easily see the period graphically

Using the period (P) The period is 4 –It repeats 1, 8, 4, 2,… –This concludes step 2 Step 3: is P even? –If not we start over using a different randomly selected m, however in this case it is even. Step 4: Utilize P:

Check the result gcd(65, 15) = 5 and gcd(63, 15) = 3 –Can be done efficiently on classical computers [1]. Step 5: we have found the factors 5 and 3. –May only obtain one of the factors. –Simple to obtain the second factor if not found. Basic algebra: pq=N, we know N and either p or q. –Start over with a different m if the gcd of the results are 1. [1]M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 1 ed. Cambridge, UK: Cambridge University Press, 2000.

How does a quantum computer help? A quantum computer speeds things up by doing step 2 (finding the period) efficiently. –Qubits are put in a superposition to represent all possible x’s at once (in the first register). –In the case of factoring 15 we need 12 qubits (2(4) + 4, as we need two registers) [2] Next is performed on the qubits in superposition. –One calculation on a quantum computer, many more classically. –The result is put in the second register. Measure Register 2- collapses the superpositions. The period is then obtained via the Quantum Fourier Transform (QFT) followed by a measurement. The rest of the algorithm is done classically. [2]N. S. Yanofsky and M. A. Mannucci, Quantum Computing for Computer Scientists, 1 ed. New York, NY: Cambridge University Press, 2008.

What is really happening after first measurement?

How about QFT and the second measurement?

Scaling 15 is a trivial example, how about a 128 bit number? We need at least 384 qubits (128 * 3) to do the quantum part of the algorithm. (scratch qubits not accounted for) –The quantum operations that are performed are done once, just on more qubits. –Similar to adding two integers: same technique, more bits. If we do it classically we have to calculate f(x) many times. –It isn’t how easy it is to calculate f(x), it is how many times. –Need to go from 0 to N 2, this is a huge number of calculations for a 128 bit number! This could be 2 (2*128) or ~1.16 x –The results have to be stored somewhere (taking up memory) and then we still have find the period! –Or we can just use 384 qubits and run through a set of quantum operations once per attempt, so the quantum computer scales quite well. Likewise, Quantum Fourier Transform also finds the period in one operation.

What do you need to program quantum computer? Fundamentally, there are only three things needed to perform quantum computation: –Initialization of a register (collection of multiple qubits) to a classical value. –Manipulation of the register via (reversible) operations. –Measurement, which “collapses” the system to a classical result. Hence input and outputs are classical values. Like programming classical computers, this is harder than it sounds.

Programming Quantum Computers? Quantum computers hold immense power, but how do you program them? –The operate fundamentally different from classical computers, so classical techniques don’t work. With the exception of one technique [3], all existing proposals are new languages. –New languages may be able to perform quantum computation, but lack power for classical computation. –Quantum computing is typically only part of the solution, as in factoring. –Often geared more towards mathematicians and physicists more than programmers. [3]S. Bettelli, "Towards an architecture for quantum programming," in Mathematics. vol. Ph.D. Trento, Italy: University of Trento, 2002, p. 115.

Grover’s algorithm in Bettelli’s:

Deutsch’s algorithm in Tafliovich’s:

A new solution: Cove Cove is a framework for programming quantum computers. –This means classical computation is handled by the language it is built on (C#) –It designed to be extended by users. –Key concept: programming against interfaces, not implementations. The current work includes a simulated quantum computer to execute code. –All simulations of quantum computers experience an exponential slow down.

Why is Cove a new contribution? Provides extensibility not present in Bettelli’s solution. –Like Bettelli, classical computation is handled by the existing language. Provides an object oriented approach for quantum computing. Documentation is as important as the framework. –Available online, within code, intellisense, and a help file. Attempts to avoid numerous usability flaws that are present in all existing proposals to various degrees.

Example: Entanglement Measurement of one qubit impacts the state of another. –This doesn’t happen in a classical computer, bits are manipulated independently- no impact on other bits.

Example: Implementation of Sum (documentation of method excluded)

Reflections Unit testing led to a much more solid design and implementation. –Forced code to be written that utilized Cove. –Takes hours to run tests with just a handful of qubits. Implementation of the local simulation was much harder than anticipated. –Many problems with implementation aren’t documented well: Reordering operations. Expanding operations to match register size. –Memory and time constraints limit what can be done. Ran into memory constraints early on. Applying an operation to a 20 qubit register requires (2 20 ) 2 =1,099,512,676,352 complex numbers! Makes debugging difficult.

Areas for future work Make the prototype implementation more robust and complete. –Utilize remote resources? Investigation into the expanded QRAM model. –Essentially how classical and quantum computers interact. Provide solutions for other algorithms such as Grover’s (unsorted search). The number of quantum algorithms is small, so that is an area for work as well.

Conclusion Quantum computers can carry out tasks that can never be done on classical computers, no matter how fast or powerful they become. Existing quantum programming techniques suffer from numerous flaws. Cove is a new method of programming quantum computers that tries to avoid flaws of existing techniques.

Questions? (Source code, documentation, dissertation, presentations and more) Matt Purkeypile