Modeling Quantum Computing in Haskell Amr Sabry عمرو صبرى Indiana University.

Slides:



Advertisements
Similar presentations
Department of Computer Science & Engineering University of Washington
Advertisements

Quantum Computation and Quantum Information – Lecture 2
Quantum Computation and Quantum Information – Lecture 3
University of Queensland
Quantum Computing MAS 725 Hartmut Klauck NTU
Cove: A Practical Quantum Computer Programming Framework Matt Purkeypile Fall 2008.
Quantum Packet Switching A. Yavuz Oruç Department of Electrical and Computer Engineering University of Maryland, College Park.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 40: Computing with Glue and Photons.
Chien Hsing James Wu David Gottesman Andrew Landahl.
Quantum Computing Ambarish Roy Presentation Flow.
An Algebraic Foundation for Quantum Programming Languages Andrew Petersen & Mark Oskin Department of Computer Science The University of Washington.
University of Queensland
Superposition, Entanglement, and Quantum Computation Aditya Prasad 3/31/02.
CSEP 590tv: Quantum Computing
Quantum Computing Joseph Stelmach.
Anuj Dawar.
Quantum Computing Lecture 1 Michele Mosca. l Course Outline
Introduction to Quantum logic (2) Yong-woo Choi.
Quantum Computation and Quantum Information – Lecture 2 Part 1 of CS406 – Research Directions in Computing Dr. Rajagopal Nagarajan Assistant: Nick Papanikolaou.
Quantum Information Processing
By: Mike Neumiller & Brian Yarbrough
CSEP 590tv: Quantum Computing Dave Bacon June 29, 2005 Today’s Menu Administrivia Complex Numbers Bra’s Ket’s and All That Quantum Circuits.
Presented by: Erik Cox, Shannon Hintzman, Mike Miller, Jacquie Otto, Adam Serdar, Lacie Zimmerman.
Quantum Computing MAS 725 Hartmut Klauck NTU
Quantum Algorithms for Neural Networks Daniel Shumow.
Alice and Bob’s Excellent Adventure
A Few Simple Applications to Cryptography Louis Salvail BRICS, Aarhus University.
Quantum Information Jan Guzowski. Universal Quantum Computers are Only Years Away From David’s Deutsch weblog: „For a long time my standard answer to.
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.
October 1 & 3, Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2
Solving mutual exclusion by using entangled Qbits Mohammad Rastegari proff: Dr.Rahmani.
Quantum Computer Simulation Alex Bush Matt Cole James Hancox Richard Inskip Jan Zaucha.
1 hardware of quantum computer 1. quantum registers 2. quantum gates.
David Evans CS150: Computer Science University of Virginia Computer Science Class 33: Computing with Photons From The.
You Did Not Just Read This or did you?. Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 3:
Quantum Computing Paola Cappellaro
A brief introduction to Quantum computer
Architectural Components for a Practical Quantum Computer: John Kubiatowicz University of California at Berkeley Berkeley IAB March 19, 2003.
QUANTUM COMPUTING What is it ? Jean V. Bellissard Georgia Institute of Technology & Institut Universitaire de France.
Wednesday, October 31 Ford Final Chapter (10). Agenda Announce: –Test Wednesday –Office Hours probably busy…better book appt. –Read Chs. 1-3 of Vilekin.
Quantum Computing and Quantum Programming Language
Introduction to Quantum Computing
Quantum Computing Michael Larson. The Quantum Computer Quantum computers, like all computers, are machines that perform calculations upon data. Quantum.
Basic Q.C. One moose, two moose Red moose, blue moose Live moose, dead moose.
IPQI-2010-Anu Venugopalan 1 qubits, quantum registers and gates Anu Venugopalan Guru Gobind Singh Indraprastha Univeristy Delhi _______________________________________________.
Quantum Computers The basics. Introduction 2/47 Dušan Gajević.
Quantum Cost Calculation of Reversible Circuit Sajib Mitra MS/ Department of Computer Science and Engineering University of Dhaka
Quantum Computation Stephen Jordan. Church-Turing Thesis ● Weak Form: Anything we would regard as “computable” can be computed by a Turing machine. ●
QUANTUM COMPUTERS, COMPUTING AND INFORMATION ALAN DURNEV, PHYSICS.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Quantum Computer Simulation Alex Bush Matt Cole James Hancox Richard Inskip Jan Zaucha.
1 An Introduction to Quantum Computing Sabeen Faridi Ph 70 October 23, 2007.
Simulation and Design of Stabilizer Quantum Circuits Scott Aaronson and Boriska Toth CS252 Project December 10, X X +Z Z +ZI +IX
Intro to Quantum Algorithms SUNY Polytechnic Institute Chen-Fu Chiang Fall 2015.
Quantum Computing Keith Kelley CS 6800, Theory of Computation.
Attendance Syllabus Textbook (hardcopy or electronics) Groups s First-time meeting.
Richard Cleve DC 3524 Introduction to Quantum Information Processing CS 467 / CS 667 Phys 667 / Phys 767 C&O 481 / C&O 681 Lecture.
Introduction to Quantum Computing Lecture 1 of 2
Q Jeff Kinne.
Quantum mechanics from classical statistics
A Ridiculously Brief Overview
Chap 4 Quantum Circuits: p
Introduction to Quantum logic (2)
OSU Quantum Information Seminar
Quantum computation with classical bits
QWIRE: A Core Language for Quantum Circuits
Quantum Computing Joseph Stelmach.
Presentation transcript:

Modeling Quantum Computing in Haskell Amr Sabry عمرو صبرى Indiana University

August 28, 2003Haskell Workshop 2 of 31 Our Abstractions are Broken! CS prides itself on the fact that it is insensitive to the changes in the hardware and its technology Turing Machines, complexity classes, lambda calculus, etc, were supposed to be “perfect abstractions” Changes in the model of physics (classical vs. quantum) broke through our abstractions

August 28, 2003Haskell Workshop 3 of 31 Turing ‘36Deutsch ‘97 Computing is normally done by writing certain symbols on paper. We may suppose this paper is divided into squares like a child’s arithmetic book…. If we regard a symbol as literally printed on a square we may suppose that the square is 0 < x < 1, 0 < y <1. The symbol is defined as a set of points in this square, viz. the set occupied by printers ink. Turing hoped that his abstracted- paper-tape model was so simple, so transparent and well defined, that it would not depend on any assumptions about physics that could conceivably be falsified, and therefore that it could become the basis of an abstract theory of computation that was independent of the underlying physics. 'He thought,' as Feynman once put it, 'that he understood paper.' But he was mistaken. Real, quantum- mechanical paper is wildly different from the abstract stuff that the Turing machine uses. The Turing machine is entirely classical, and does not allow for the possibility the paper might have different symbols written on it in different universes, and that those might interfere with one another.

August 28, 2003Haskell Workshop 4 of 31 Challenge to PL Research Quantum physics is affecting hardware design, complexity theory, and propagates all the way to our high level programming languages Develop a new appropriate programming paradigm

August 28, 2003Haskell Workshop 5 of 31 Outline Quantum data Operations/Functions I/O or Measurement Example --- Wave/Particle Duality Conclusions and Related Work

Quantum Data

August 28, 2003Haskell Workshop 7 of 31 Bits and Qubits or True False qFT = True False 1 1 Examples of qubits True False 0 1qF = True False 1 0qT =

August 28, 2003Haskell Workshop 8 of 31 Generalize Given a type a with constructors C 1, C 2, …, C n Quantum values of type QV a C1C1 11 …… C2C2 CnCn 22 nn

August 28, 2003Haskell Workshop 9 of 31 Examples

August 28, 2003Haskell Workshop 10 of 31 Pairs Pairs of type (QV a, QV b): No surprises … Pairs of type QV (a, b) can be assembled from two quantum values using a tensor product: q 2 = True False 11 22 True False q 1 = 11 22 q 1 &* q 2 = (False,False)  1 *  1 (False,True)  1 *  2 (True,False)  2 *  1 (True,True)  2 *  2

August 28, 2003Haskell Workshop 11 of 31 Non Compositionality and Entanglement ENTANGLED. There is no way to describe the state of the pair p 2 in terms of the state of its two components. The values are ENTANGLED.

Functions / Operations

August 28, 2003Haskell Workshop 13 of 31 Two Simple Operations What is hadamard qF ?

August 28, 2003Haskell Workshop 14 of 31 Controlled-Not (cnot) c x not v y cnot(c,v) = (x,y) where x is always the same as c if c is False, y = v if c is True, y = not v What is cnot (qFT,qF) ? cnot(qFT,qF) = the pair p 2 ((False,False),(False,False)) 1 ((False, True),(False, True)) 1 ((True, False),(True, True)) 1 ((True, True),(True, False)) 1 cnotM =

August 28, 2003Haskell Workshop 15 of 31 Our First Circuit not hadamard qF

Measurement

August 28, 2003Haskell Workshop 17 of 31 Probabilities observe qFT should produce False with 50% probability and produce True with 50% probability What happens if we observe a quantum value qFT more than once?

August 28, 2003Haskell Workshop 18 of 31 Collapse MUST return (True,True,True) or (False,False,False) Not allowed to produce (True,False,True) or any other mixed values

August 28, 2003Haskell Workshop 19 of 31 Observing Pairs Given a pair of type QV (a,b) we can make three observations: 1. Observe the state of the pair itself 2. Observe the left component only 3. Observe the right component only

August 28, 2003Haskell Workshop 20 of 31 Observing Pairs

August 28, 2003Haskell Workshop 21 of 31 The EPR Paradox Entangled particles Light-years apart observeLeft must affect the right particle Faster than light communication? Multiple universes? Signals back from the future? Hidden local state? Spooky action at a distance. HOW?

August 28, 2003Haskell Workshop 22 of 31 Spooky Action at a Distance ) Side-effects

Wave/Particle Duality

August 28, 2003Haskell Workshop 24 of 31 Let’s Implement a Simple Example… The individual operations are easy: H is hadamard, V and VT are phase-shifting operations But given a generally entangled triple QV (a,b,c), how can we conveniently apply an operation on the first component, or the second and third, or the first and third, etc given that we cannot decompose the tuple into its three components.

August 28, 2003Haskell Workshop 25 of 31 Virtual Values & Adaptors (False,False,False) (True,True,True) 1 1 A quantum value with entangled subvalues A virtual value to operate on the third and first components Pointer to the real value Adaptor (a,b,c) (c,a) b

August 28, 2003Haskell Workshop 26 of 31 Apply cnot to our virtual value cnotM = ((False,False),(False,False)) 1 ((False, True),(False, True)) 1 ((True, False),(True, True)) 1 ((True, True),(True, False)) 1 ((a,b,c),(x,b,z)) cnotM((c,a),(z,x)) Promote cnotM to work on the full quantum value as follows: -Extract the required components using the adaptor, apply cnot -Other components are left unchanged Promoted cnotM =

August 28, 2003Haskell Workshop 27 of 31 Example

Conclusions and Related Work

August 28, 2003Haskell Workshop 29 of 31 Summary Quantum values are maps from classical values to probability amplitudes (complex numbers) Functions are matrices Observation causes collapse (modeled by side-effects) Programming without destructors

August 28, 2003Haskell Workshop 30 of 31 A Lambda Calculus for QC by André van Tonder -calculus with (quantum) constants Uses sequences of terms (history) to make reductions reversible State ´ a superposition of sequences To avoid having history terms entangled with computational terms, functions are linear (cannot discard superpositions) No observation No datatypes: still talks about qubits and gates Can use pattern-matching on entangled values!

August 28, 2003Haskell Workshop 31 of 31 And of course … Jerzy Karczmarczuk

August 28, 2003Haskell Workshop 32 of 31 BBC World on SAS flight It is a bizarre place … … normal laws of physics break … … the fastest machine today will seem like an abacus …

August 28, 2003Haskell Workshop 33 of 31 Computer Science Physics Hardware Assembly, C, etc Functional Programming, lambda calculus, etc

August 28, 2003Haskell Workshop 34 of 31 Matrix Representation

August 28, 2003Haskell Workshop 35 of 31 Conventions in Physics Quantum values represented by a vector of probability amplitudes (in some implicit order) Quantum operations represented by matrices giving for each input constructor its contribution to each output constructor Applying an operation to a value is multiplication

August 28, 2003Haskell Workshop 36 of 31 Potential Rewards Nature’s programming paradigm might be better than what we have. Information flow in QM is a mystery (EPR paradox). An executable semantics for QC might help. There are some appealing connections between quantum computing and functional programming (operations must be pure and reversible, evaluation is different from observation, quantum values cannot be cloned i.e. are linear, etc) comp.lang.functional discussion about free will and predestination

August 28, 2003Haskell Workshop 37 of 31 Bits and Qubits

August 28, 2003Haskell Workshop 38 of 31 Generalize

August 28, 2003Haskell Workshop 39 of 31 Pairs Pairs of type (QV a, QV b): No surprises … Pairs of type QV (a, b) can be assembled from two quantum values using a tensor product:

August 28, 2003Haskell Workshop 40 of 31 Virtual Values & Adaptors Quantum value with entangled subvalues Adaptor Virtual Value 11 22

August 28, 2003Haskell Workshop 41 of 31 Applying Operations to Virtual Values Input Function Output Promote the function

August 28, 2003Haskell Workshop 42 of 31 Examples

August 28, 2003Haskell Workshop 43 of 31 Observing Pairs (I)

August 28, 2003Haskell Workshop 44 of 31 Accessing Substructures In conventional programming: composable references, façade pattern, … In quantum computing: virtual registers, shuffle wires, or our proposal of virtual values and adaptors