Professional Documents
Culture Documents
Altenkirch Slides
Altenkirch Slides
Programming
Thorsten Altenkirch
University of Nottingham
based on joint work with Jonathan Grattage
supported by EPSRC grant GR/S30818/01
Can we build a quantum computer?
Can we build a quantum computer?
yes We can run quantum algorithms.
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
,+
!" "!
#$
#
')(&
"
%
*
'() &
"
*
Example: Hadamard operation
C
E KL 9 8
DaB ]C \ M
C
OGN
O
O Q:P < ;
=
Q P UTSR
XZ W
H SU R H U
Deutsch algorithm
O V
C C XYZ W
E KL E KL
DaB DaB > U
C ]C \ C ]C \
?
[
O N
G N N O N
G
^
_ ^
_
Q P Q P
SU R ` ` SU R
O O
V V
Q:P Q:P
^
_ ^
_
SUTR TSUR
` `
O O V O V O
XZ W XZ W XZ W XZ W
U U U U
[ [ [ [
Tallinn Feb 06 – p.6/44
Overview
d
e
h
f
d
e
h
f
g
a finite set of initial heaps ,
d
e
h
f
g
a finite set of initial heaps ,
an initial heap ,
kji
d
e
h
f
g
a finite set of initial heaps ,
an initial heap ,
kji
d
e
h
f
g
a finite set of initial heaps ,
an initial heap ,
kji
l
m
o
n
>> 88
n
n
>> 88
>> 88
>>
8
o
o
o
n
o
n
>> 88
n
n
>> 88
>> 88
>>
8
o
o
o
n
Theorem:
U U U
$
$
%
p $
%
pq
q
Tallinn Feb 06 – p.11/44
Extensional equality
A classical computation
$
%
i
q
r
r
r
induces a function U by
j
q
/
l
s
O
{zy
x w
|}
vut
/
U
A classical computation
$
%
i
q
r
r
r
induces a function U by
j
q
/
l
s
O
{zy
x w
|}
vut
/
U
n
We say that two computations are
extensionally equivalent, if they give rise to
the same function.
$
%
p $
%
pq
q
Tallinn Feb 06 – p.13/44
Extensional equality . . .
Theorem:
U U U
$
%
p $
%
pq
q
Hence, classical computations upto
extensional equality give rise to the category
.
$
%
p $
%
pq
q
Hence, classical computations upto
extensional equality give rise to the category
.
Theorem: Any function on finite
j
sets can be realized by a computation.
r
$
%
p $
%
pq
q
Hence, classical computations upto
extensional equality give rise to the category
.
Theorem: Any function on finite
j
sets can be realized by a computation.
r
function
%
j
~
r
$
%
~
function
%
j
~
r
$
%
~
r
computation
e
%
j
r
$
%
r
function
j
$ $ j
computation
$
r r $
% % r $
Example :
r
%
$ $
% r
$
%
r r
% r
% %
'!"#&%$
Tallinn Feb 06 – p.15/44
2. Finite quantum computation
Linear operators:
induces
j
.
j
we write
j
Linear operators:
induces
j
.
j
we write
j
Norm of a vector:
,
%$
j %
Linear operators:
induces
j
.
j
we write
j
Norm of a vector:
,
%$
j %
Unitary operators:
A unitary operator is a linear iso-
j
unitary
j
unit norm .
j
unit norm .
A reversible computation is given by a
unitary operator .
unitary
d
e
h
f
d
e
h
f
g
a finite set , the base of the space of initial
heaps,
d
e
h
f
g
a finite set , the base of the space of initial
heaps,
a heap initialisation vector ,
ji
d
e
h
f
g
a finite set , the base of the space of initial
heaps,
a heap initialisation vector ,
ji
a finite set , the base of the space of
garbage states,
d
e
h
f
g
a finite set , the base of the space of initial
heaps,
a heap initialisation vector ,
ji
a finite set , the base of the space of
garbage states,
a unitary operator .
j
unitary
Tallinn Feb 06 – p.19/44
Composing quantum computations
o
n
>> 88
n
n
>> 88
>> 88
>>
8
o
o
o
n
l
~
l
~
Indeed: Forgetting part of a pure state
results in a mixed state.
j
j
Eigenvalues represent probabilities
System is in state with prob.
j
Eigenvalues represent probabilities
System is in state with prob.
EPR is represented by
:
j
<
<
<
<
EPR is represented by
:
j
<
<
<
<
$
%
Tallinn Feb 06 – p.23/44
Example: forgetting a qbit . . .
<
<
<
<
#
#
#
#
There is an operator
'&
¢j
super
z
called partial trace.
There is an operator
'&
¢j
super
z
called partial trace.
E.g. is
¤£('&
¥ j
super
¥ £
z
represented by a matrix.
§
¦
q
superoperator U
j
q
super
s ¨
O
|
« ª©
¬
x
/
U
q
superoperator U
j
q
super
s ¨
O
|
« ª©
¬
x
/
U
n
Theorem: Every superoperator
super
(on finite Hilbert spaces) comes from a quantum
computation.
classical ( ) quantum ( )
Tallinn Feb 06 – p.28/44
Classical vs quantum
classical ( ) quantum ( )
finite sets
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
cartesian product ( )
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
cartesian product ( ) tensor product ( )
¯
®
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
cartesian product ( ) tensor product ( )
¯
®
bijections
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
functions
classical ( ) quantum ( )
finite sets finite dimensional Hilbert space
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
functions superoperators
classical ( ) quantum ( )
finite sets finite dimensional Hilbert spaces
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
functions superoperators
injective functions ( M )
classical ( ) quantum ( )
finite sets finite dimensional Hilbert spaces
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
functions superoperators
injective functions ( M ) isometries ( )
M
Tallinn Feb 06 – p.28/44
Classical vs quantum
classical ( ) quantum ( )
finite sets finite dimensional Hilbert spaces
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
functions superoperators
injective functions ( M ) isometries ( )
M
projections
classical ( ) quantum ( )
finite sets finite dimensional Hilbert spaces
cartesian product ( ) tensor product ( )
¯
®
bijections unitary operators
functions superoperators
injective functions ( M ) isometries ( )
M
projections partial trace
'!"#&%$
e
° e
±
'!"#&%$
e
° e
±
Classically
²
p
~
'!"#&%$
e
° e
±
Classically
²
p
~
Quantum
'!"#&%$
e
° e
±
Classically
²
p
~
Quantum
input:
#
#
*
'!"#&%$
e
° e
±
Classically
²
p
~
Quantum
input:
#
#
*
output:
#
*
#
*
r ´
r
r ´
r
Qbytes
.
µ
¹
¶·¸
!"
, +
'() &
"
¹
¶·¸
!"
, +
'() &
"
We can compile QML programs into quantum
computations (i.e. quantum circuits).
¹$
%
¶º
r
is illegal,
¹$
%
¶º
r
is illegal,
but
»¹
¶º
¹$
*
¶º
r
is ok.
¼
¼
')(&
"
, +
!"
is just the identity,
¼
¼
')(&
"
, +
!"
is just the identity, but
½¾
º
½¾
º
')(&
"
,+
!"
orthogonal, i.e. observable different.
orthogonal, i.e. observable different.
º
¿
ÀÁ
$
º
¿
ÀÁ
¿
r
$
%
r
$
%
, +
r
is illegal,
orthogonal, i.e. observable different.
º
¿
ÀÁ
$
º
¿
ÀÁ
¿
r
$
%
r
$
%
, +
r
is illegal, but
%
º
¿
ÀÁ
$
º
¿
ÀÁ
¿
r
$
%
%
'() &
"
r
r
$
%
%
, +
!"
r
is ok.
Tallinn Feb 06 – p.35/44
QML basics . . .
#$
%
*
!"
')(&
"
#
*
,+
!"
')(&
"
#$
%
*
!"
')(&
"
#
*
,+
!"
')(&
"
However, the terms in the superposition have
to be orthogonal.
Â
ÃÄ
ÆÃ
Å
r ³
r
ÉÈÇ
"
Í$
%
ËÊÃ
Â
Ä
ÏÐÎ
r
Å
Æ
Ì
Tallinn Feb 06 – p.38/44
Compilation
Â
ÃÄ
ÆÃ
Å
r ³
r
ÉÈÇ
"
Í$
%
ËÊÃ
Â
Ä
ÏÐÎ
r
Å
Æ
Ì
For each rule we can construct a quantum
computation, i.e. a circuit.
Â
ÃÊ r
ÃÄ
Ì
Í$
r ³ ³
Å
r
Å ´
% ´
Ä ÆÃ
ÏÎ
Æ
"
È Ç
Tallinn Feb 06 – p.39/44
-elim
Â
ÃÄ
ÆÃ
Å
r ³
r
È Ç
"
Í$
%
Â
Ä
ÏÎ
ÃÊ
r
Å
Æ
Ì
Â
Ø
×
;;
;;
Ô ÓÒ Ñ
Ö
Õ
;
Ø
Û
Ú
Ý
z
ß
Þ
Ü
;; ;;
Ü
Ü
;; ;;
;; ;;
Ù
Ù
Tallinn Feb 06 – p.39/44
Compiler