Professional Documents
Culture Documents
Thorsten Altenkirch University of Nottingham based on joint work with Jonathan Grattage supported by EPSRC grant GR/S30818/01
Background
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits.
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits. Feynman: Can we exploit this fact to perform computations more efciently?
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits. Feynman: Can we exploit this fact to perform computations more efciently? Shor: Factorisation in quantum polynomial time.
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits. Feynman: Can we exploit this fact to perform computations more efciently? Shor: Factorisation in quantum polynomial time. Grover: Blind search in
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits. Feynman: Can we exploit this fact to perform computations more efciently? Shor: Factorisation in quantum polynomial time. Grover: Blind search in
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits. Feynman: Can we exploit this fact to perform computations more efciently? Shor: Factorisation in quantum polynomial time. Grover: Blind search in
Background
Simulation of quantum systems is expensive: PSPACE complexity for polynomial circuits. Feynman: Can we exploit this fact to perform computations more efciently? Shor: Factorisation in quantum polynomial time. Grover: Blind search in
QML
QML
QML: a functional language for quantum computations on nite types.
QML
QML: a functional language for quantum computations on nite types. Quantum control and quantum data.
QML
QML: a functional language for quantum computations on nite types. Quantum control and quantum data. Design guided by semantics
QML
QML: a functional language for quantum computations on nite types. Quantum control and quantum data. Design guided by semantics Analogy with classical computation Finite classical computations Finite quantum computations
QML
QML: a functional language for quantum computations on nite types. Quantum control and quantum data. Design guided by semantics Analogy with classical computation Finite classical computations Finite quantum computations
QML
QML: a functional language for quantum computations on nite types. Quantum control and quantum data. Design guided by semantics Analogy with classical computation Finite classical computations Finite quantum computations
QML
$ D %C $ ( )' 1 0 34%2 ( 5 9A @8 4 B 1 0 4%2 3 56 ( 7 9A @8 4 B ( )' &%" # $ !
u g hf i rspq PR QI b GS t d g g y r g hf g y qx y
Tallinn Feb 06 p.6/44
FH GE
FH GE PR QI T US
d ec i uv g y r w y qx X
W XV W V
hf
Deutsch algorithm
` aY y g c y x i uv g g hf x y i g y qx b uv
X y
X y
Overview
1. Finite classical computation 2. Finite quantum computation 3. QML basics 4. Compiling QML 5. Conclusions and further work
1. Semantics
1. Finite classical computation 2. Finite quantum computation 3. QML basics 4. Compiling QML 5. Conclusions and further work
Classical computation (
Classical computation (
Given nite sets (input) and
d
)
(output):
Classical computation (
Given nite sets (input) and
d
)
(output):
Classical computation (
Given nite sets (input) and
d
)
(output):
Classical computation (
Given nite sets (input) and
d
)
(output):
, ,
Classical computation (
Given nite sets (input) and
d
)
(output):
, , ,
,
l m l
j ki
1 1
bb bb bbb b
n ! o
VV VV VVV 1
1 1
bb bb bbb b
n ! o
VV VV VVV 1
Theorem: U U U
6 7 6 p 6 7 pq q 7
Extensional equality
Extensional equality
A classical computation induces a function U
q j l 6 q r r i
by
/
l
O
zx {yw |}
vut
Extensional equality
A classical computation induces a function U
q j l 6 q r r i
by
/
l
O
zx {yw |}
We say that two computations are extensionally equivalent, if they give rise to the same function.
vut
Extensional equality . . .
Theorem:
U U U
6 7 6 p 6 7 pq q 7
Extensional equality . . .
Theorem:
U U U
6 7 6 p 6 7 pq q 7
Hence, classical computations upto extensional equality give rise to the category .
Extensional equality . . .
Theorem:
U U U
6 7 6 p 6 7 pq q 7
Hence, classical computations upto extensional equality give rise to the category . Theorem: Any function on nite sets can be realized by a computation.
r j
Extensional equality . . .
Theorem:
U U U
6 7 6 p 6 7 pq q 7
Hence, classical computations upto extensional equality give rise to the category . Theorem: Any function on nite sets can be realized by a computation. Translation for Category Theoreticians: U is full and faithful.
r j
Example
function
~ j 6 ~ 6
:
7
7
Example
function
~ j 6 ~ 6
:
7
computation
1
e
Example :
function
j 6 6 r 7 r 7
function
computation
j 6 6 r 7 r 7
6 j 6 7 7 6 6 r r r 7 6
Example :
r 7 r 7 7
r
'!"# &%$
is a vector
with
is a vector
with
Quantum computations (
Quantum computations (
Given nite sets (input) and
e d
(output):
Quantum computations (
Given nite sets (input) and
e d
(output):
Quantum computations (
Given nite sets (input) and
e d
(output):
Quantum computations (
Given nite sets (input) and
e d
(output):
Quantum computations (
Given nite sets (input) and
e d
(output):
a nite set , the base of the space of garbage states, a unitary operator
unitary
1 1
bb bb bbb b
n ! o
VV VV VVV 1
Density matrizes
Density matrizes
Mixed states can be represented by density matrizes .
j
Density matrizes
Mixed states can be represented by density matrizes .
j
System is in state
with prob.
Density matrizes
Mixed states can be represented by density matrizes .
j
System is in state
with prob.
is represented by
:
`
` `
is represented by
:
`
` ` 6 5 5 7 5 5
Superoperators
Superoperators
Morphisms on density matrizes are called superoperators, these are linear maps, which are completely positive, and trace preserving
Superoperators
Morphisms on density matrizes are called superoperators, these are linear maps, which are completely positive, and trace preserving Every unitary operator superoperator .
gives rise to a
Superoperators. . .
There is an operator
98 j z
super
Superoperators. . .
There is an operator
98 j z
super
matrix.
super
is
Semantics
Semantics
Every quantum computation gives rise to a superoperator U super
q j q
O
| x
Semantics
Every quantum computation gives rise to a superoperator U super
q j q
O
| x
Theorem: Every superoperator super (on nite Hilbert spaces) comes from a quantum computation.
j
Classical vs quantum
Classical vs quantum
classical ( ) quantum ( )
Classical vs quantum
classical ( ) quantum ( )
nite sets
Classical vs quantum
classical ( ) quantum ( )
nite sets
Classical vs quantum
classical ( ) quantum ( )
Classical vs quantum
classical ( ) quantum ( )
Classical vs quantum
classical ( ) quantum ( )
Classical vs quantum
classical ( ) quantum ( )
bijections
Classical vs quantum
classical ( ) quantum ( )
bijections functions
Classical vs quantum
classical ( ) quantum ( )
bijections functions
Classical vs quantum
classical ( ) quantum ( )
Classical vs quantum
classical ( ) quantum ( )
nite dimensional Hilbert spaces tensor product ( ) unitary operators superoperators ) isometries ( )
w w
Classical vs quantum
classical ( ) quantum ( )
nite dimensional Hilbert spaces tensor product ( ) unitary operators superoperators ) isometries ( )
w w
Classical vs quantum
classical ( ) quantum ( )
nite dimensional Hilbert spaces tensor product ( ) unitary operators superoperators ) isometries ( )
w w
partial trace
Decoherence
Decoherence
'!"# &%$
e e
Decoherence
'!"# &%$
e ~ p e
Classically
Decoherence
'!"# &%$
e ~ p e
Classically Quantum
Decoherence
'!"# &%$
e ~ p B e
Classically Quantum
input:
'
5
Decoherence
'!"# &%$
e ~ p B B e
Classically Quantum
input:
'
output:
'5
'5
3. QML basics
1. Finite classical computation 2. Finite quantum computation 3. QML basics 4. Compiling QML 5. Conclusions and further work
QML basics
QML basics
QML is a rst order functional languages, i.e. programs are well-typed expressions.
QML basics
QML is a rst order functional languages, i.e. programs are well-typed expressions. QML types are
r r
QML basics
QML is a rst order functional languages, i.e. programs are well-typed expressions. QML types are Qbytes
r r
QML basics . . .
A QML program is an expression in a context of typed variables, e.g.
! $ &%" # D C ( 9A @8 4 $ $ ( 1 0 34 2
QML basics . . .
A QML program is an expression in a context of typed variables, e.g.
! $ &%" # D C (
We can compile QML programs into quantum computations (i.e. quantum circuits).
9A @8 4
1 0 34 2
QML basics . . .
Forgetting variables has to be explicit.
QML basics . . .
Forgetting variables has to be explicit. E.g.
6 7
is illegal,
QML basics . . .
Forgetting variables has to be explicit. E.g.
6 7
is illegal, but
6 7 '
is ok.
QML basics . . .
QML basics . . .
&%" # $ !
1 0 34%2
D C
9A @8 4 (
QML basics . . .
&%" # $ !
1 0 34 2
D %C
9A @8 4 (
1 0 34%2
D C
9A @8 4 (
QML basics . . .
!
Using is only allowed, if the branches are orthogonal, i.e. observable different.
QML basics . . .
!
Using is only allowed, if the branches are orthogonal, i.e. observable different.
6 7 ! r 6 $ &%" # 6 r D C $ $
is illegal,
QML basics . . .
!
Using is only allowed, if the branches are orthogonal, i.e. observable different.
6 7 ! r 6 $ &%" # 6 r D C $ $
is illegal, but
6 6 7 ! r 6 6 $ &%" # 9A @8 4 ( 6 6 r r ( 1 0 34 2 D C $ $ r 7
is ok.
QML basics . . .
We can introduce superpositions, e.g.
! ( )'
56
( 7
&%" # $
1 0 34%2
( )'
( 5
1 0 34%2
D %C
9A @8 4
9A @8 4
QML basics . . .
We can introduce superpositions, e.g.
! ( )'
56
( 7
&%" # $
1 0 34%2
( )'
( 5
1 0 34%2
D %C
9A @8 4
9A @8 4
4. Compiling QML
1. Finite classical computation 2. Finite quantum computation 3. QML basics 4. Compiling QML 5. Conclusions and further work
Compilation
Compilation
Correct QML programs are dened by typing rules, e.g.
r r
Compilation
Correct QML programs are dened by typing rules, e.g.
r r
-elim
r
r 7
4 2
-elim
r r 6 7 2 4 r
YY YYY
1 1
YY YY YY
YY YY YY 1
Compiler
Compiler
A compiler is currently being implemented by my student Jonathan Grattage (in Haskell).
Compiler
A compiler is currently being implemented by my student Jonathan Grattage (in Haskell). The output of the compiler are quantum circuits which can be simulated by a quantum circuit simulator.
Compiler
A compiler is currently being implemented by my student Jonathan Grattage (in Haskell). The output of the compiler are quantum circuits which can be simulated by a quantum circuit simulator. Amr Sabry and Juliana Vizotti (Indiana University) embarked on an independent implementation of QML based on our paper.
5. Conclusions
1. Semantics of nite classical and quantum computation 2. QML basics 3. Compiling QML 4. Conclusions and further work
Conclusions
Conclusions
Our semantic ideas proved useful when designing a quantum programming language, analogous concepts are modelled by the same syntactic constructs.
Conclusions
Our semantic ideas proved useful when designing a quantum programming language, analogous concepts are modelled by the same syntactic constructs.
Our analysis also highlights the differences between classical and quantum programming.
Conclusions
Our semantic ideas proved useful when designing a quantum programming language, analogous concepts are modelled by the same syntactic constructs.
Our analysis also highlights the differences between classical and quantum programming. We have developed an algebra of quantum programs which for pure programs is complete wrt the semantics and a normalisation algorithm.
Conclusions
Our semantic ideas proved useful when designing a quantum programming language, analogous concepts are modelled by the same syntactic constructs.
Our analysis also highlights the differences between classical and quantum programming. We have developed an algebra of quantum programs which for pure programs is complete wrt the semantics and a normalisation algorithm. Quantum programming introduces the problem of control of decoherence, which we address by making forgetting variables explicit and by having different if-then-else constructs.
Further work
Further work
We have to analyze more quantum programs to evaluate the practical usefulness of our approach.
Further work
We have to analyze more quantum programs to evaluate the practical usefulness of our approach.
We should be able to extend our algebra and normalisation to the full language (including measurements).
Further work
We have to analyze more quantum programs to evaluate the practical usefulness of our approach.
We should be able to extend our algebra and normalisation to the full language (including measurements). Are we able to come up with completely new algorithms using QML?
Further work
We have to analyze more quantum programs to evaluate the practical usefulness of our approach.
We should be able to extend our algebra and normalisation to the full language (including measurements). Are we able to come up with completely new algorithms using QML? How to deal with higher order programs?
Further work
We have to analyze more quantum programs to evaluate the practical usefulness of our approach.
We should be able to extend our algebra and normalisation to the full language (including measurements). Are we able to come up with completely new algorithms using QML? How to deal with higher order programs? How to deal with innite datatypes?
Further work
We have to analyze more quantum programs to evaluate the practical usefulness of our approach.
We should be able to extend our algebra and normalisation to the full language (including measurements). Are we able to come up with completely new algorithms using QML? How to deal with higher order programs? How to deal with innite datatypes? Investigate the similarities/differences between FCC and FQC from a categorical point of view.
LICS 2005
with J.Grattage
Structuring Quantum Effects: Superoperators as Arrows