Modeling Quantum Computing in Haskell - PowerPoint PPT Presentation

About This Presentation
Title:

Modeling Quantum Computing in Haskell

Description:

Turing Machines, complexity classes, lambda calculus, etc, were ... Pairs of type QV (a, b) can be assembled from two quantum values using a tensor product: ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 32
Provided by: amras9
Category:

less

Transcript and Presenter's Notes

Title: Modeling Quantum Computing in Haskell


1
Modeling Quantum Computing in Haskell
  • Amr Sabry
  • ???? ????
  • Indiana University

2
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

3
Turing 36 Deutsch 97
  • 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.
  • Computing is normally done by writing
    certain symbols on paper. We may suppose this
    paper is divided into squares like a childs
    arithmetic book.
  • If we regard a symbol as literally printed
    on a square we may suppose that the square is 0 lt
    x lt 1, 0 lt y lt1. The symbol is defined as a set
    of points in this square, viz. the set occupied
    by printers ink.

4
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

5
Outline
  • Quantum data
  • Operations/Functions
  • I/O or Measurement
  • Example --- Wave/Particle Duality
  • Conclusions and Related Work

6
Quantum Data
7
Bits and Qubits
Examples of qubits
qFT
or
False
True
8
Generalize
Given a type a with constructors C1, C2, ,
Cn Quantum values of type QV a
9
Examples
10
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

11
Non Compositionality and Entanglement
  • There is no way to describe the state of the
    pair p2 in terms of the state of its two
    components. The values are ENTANGLED.

12
Functions / Operations
13
Two Simple Operations
14
Controlled-Not (cnot)
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
cnotM
What is cnot (qFT,qF) ?
cnot(qFT,qF) the pair p2
15
Our First Circuit
16
Measurement
17
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?

18
Collapse
  • MUST return (True,True,True) or
    (False,False,False)
  • Not allowed to produce (True,False,True) or any
    other mixed values

19
Observing Pairs
  • Given a pair of type QV (a,b) we can make three
    observations
  • Observe the state of the pair itself
  • Observe the left component only
  • Observe the right component only

20
Observing Pairs
21
The EPR Paradox
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?
22
Spooky Action at a Distance ) Side-effects
23
Wave/Particle Duality
24
Lets 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.

25
Virtual Values Adaptors
Pointer to the real value
Adaptor
(c,a)
(a,b,c)
b
A quantum value with entangled subvalues
A virtual value to operate on the third and first
components
26
Apply cnot to our virtual value
cnotM
  • 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
((a,b,c),(x,b,z)) cnotM((c,a),(z,x))
27
Example
28
Conclusions and Related Work
29
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

30
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!

31
And of course
  • Jerzy Karczmarczuk
Write a Comment
User Comments (0)
About PowerShow.com