Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
A Functional QuantumProgramming Language
Thorsten Altenkirch
University of Nottingham
based on joint work with Jonathan Grattage
and discussions with V.P. Belavkin
supported by EPSRC grant GR/S30818/01
A Functional Quantum Programming Language – p.1/??
Alternative title
What you always wanted to know
about quantum computation
but never dared to ask.
A Functional Quantum Programming Language – p.2/??
Another alternative title
Quantum programming
for the
lazy functional programmer
A Functional Quantum Programming Language – p.3/??
Background
Simulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in� � � �
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in� � � �
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in� � � �
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in� � � �
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
BackgroundSimulation of quantum systems is expensive:Exponential time to simulate polynomial circuits.
Feynman: Can we exploit this fact to performcomputations more efficiently?
Shor: Factorisation in quantum polynomial time.
Grover: Blind search in� � � �
Can we build a quantum computer?
yes We can run quantum algorithms.
no Nature is classical after all!
Assumption: Nature is fair. . .
A Functional Quantum Programming Language – p.4/??
The quantum software crisis
Quantum algorithms are usually presentedusing the circuit model.
Nielsen and Chuang, p.7, Coming up withgood quantum algorithms is hard.Richard Josza, QPL 2004: We need todevelop quantum thinking!
A Functional Quantum Programming Language – p.5/??
The quantum software crisis
Quantum algorithms are usually presentedusing the circuit model.
Nielsen and Chuang, p.7, Coming up withgood quantum algorithms is hard.Richard Josza, QPL 2004: We need todevelop quantum thinking!
A Functional Quantum Programming Language – p.5/??
The quantum software crisis
Quantum algorithms are usually presentedusing the circuit model.
Nielsen and Chuang, p.7, Coming up withgood quantum algorithms is hard.
Richard Josza, QPL 2004: We need todevelop quantum thinking!
A Functional Quantum Programming Language – p.5/??
The quantum software crisis
Quantum algorithms are usually presentedusing the circuit model.
Nielsen and Chuang, p.7, Coming up withgood quantum algorithms is hard.Richard Josza, QPL 2004: We need todevelop quantum thinking!
A Functional Quantum Programming Language – p.5/??
QML
QML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation
Finite classical computations
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
QMLQML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation
Finite classical computations
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
QMLQML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation
Finite classical computations
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
QMLQML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation
Finite classical computations
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
QMLQML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation� � �
Finite classical computations� �
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
QMLQML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation� � �
Finite classical computations� �
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
QMLQML: a first-order functional language for quantumcomputations on finite types.
Quantum control and quantum data.
Design guided by semantics
Analogy with classical computation� � �
Finite classical computations� �
Finite quantum computations
Important issue: control of decoherence
Compiler under construction (Jonathan)
A Functional Quantum Programming Language – p.6/??
Example: Hadamard operation
Matrix
QML
A Functional Quantum Programming Language – p.7/??
Example: Hadamard operation
Matrix
� ��
� �� �
QML
A Functional Quantum Programming Language – p.7/??
Example: Hadamard operation
Matrix
� ��
� �� �
QML �� �� � � ��� �� � �� � ������ ��� ��� �!" #$ � % � &(') " *
� +�, � ��� ��� �!" # � &(') " *
A Functional Quantum Programming Language – p.7/??
Something we know well . . .
Classical computations on finite types.
Quantum mechanics is time-reversible. . .
. . . hence quantum computation is based on reversibleoperations.
However: Newtonian mechanics, Maxwellianelectrodynamics are also time-reversible. . .
. . . hence classical computation should be based onreversible operations.
A Functional Quantum Programming Language – p.8/??
Something we know well . . .
Classical computations on finite types.
Quantum mechanics is time-reversible. . .
. . . hence quantum computation is based on reversibleoperations.
However: Newtonian mechanics, Maxwellianelectrodynamics are also time-reversible. . .
. . . hence classical computation should be based onreversible operations.
A Functional Quantum Programming Language – p.8/??
Something we know well . . .
Classical computations on finite types.
Quantum mechanics is time-reversible. . .
. . . hence quantum computation is based on reversibleoperations.
However: Newtonian mechanics, Maxwellianelectrodynamics are also time-reversible. . .
. . . hence classical computation should be based onreversible operations.
A Functional Quantum Programming Language – p.8/??
Something we know well . . .
Classical computations on finite types.
Quantum mechanics is time-reversible. . .
. . . hence quantum computation is based on reversibleoperations.
However: Newtonian mechanics, Maxwellianelectrodynamics are also time-reversible. . .
. . . hence classical computation should be based onreversible operations.
A Functional Quantum Programming Language – p.8/??
Something we know well . . .
Classical computations on finite types.
Quantum mechanics is time-reversible. . .
. . . hence quantum computation is based on reversibleoperations.
However: Newtonian mechanics, Maxwellianelectrodynamics are also time-reversible. . .
. . . hence classical computation should be based onreversible operations.
A Functional Quantum Programming Language – p.8/??
Something we know well . . .
Classical computations on finite types.
Quantum mechanics is time-reversible. . .
. . . hence quantum computation is based on reversibleoperations.
However: Newtonian mechanics, Maxwellianelectrodynamics are also time-reversible. . .
. . . hence classical computation should be based onreversible operations.
A Functional Quantum Programming Language – p.8/??
Classical computation ( )
Given finite sets (input) and (output):
� �
a finite set of initial heaps ,
an initial heap ,
a finite set of garbage states ,
a bijection ,
A Functional Quantum Programming Language – p.9/??
Classical computation ( )
Given finite sets (input) and (output):
- ./
0 � 1 2 �
a finite set of initial heaps ,
an initial heap ,
a finite set of garbage states ,
a bijection ,
A Functional Quantum Programming Language – p.9/??
Classical computation ( )
Given finite sets (input) and (output):
- ./
0 � 1 2 �
a finite set of initial heaps ,
an initial heap354 ,
a finite set of garbage states ,
a bijection 4 6 7 6 ,
A Functional Quantum Programming Language – p.9/??
Composing computations
�
>>>>
>>>>
8888
888 �
�
��������
������� �
A Functional Quantum Programming Language – p.10/??
Composing computations
8. 98 �
>>>>
>>>>
8888
888 8�
9 �
��������
������� 9�
9 � 8
A Functional Quantum Programming Language – p.10/??
Extensional equality
A classical computationinduces a function U by
//
��
OO
U//
We say that two computations areextensionally equivalent, if they give rise tothe same function.
A Functional Quantum Programming Language – p.11/??
Extensional equality
A classical computation : �$ ; 3 ; ; %
induces a function U : 4 by
6 < // 6=?>
��
@BADC E FOO
U 8 //
We say that two computations areextensionally equivalent, if they give rise tothe same function.
A Functional Quantum Programming Language – p.11/??
Extensional equality
A classical computation : �$ ; 3 ; ; %
induces a function U : 4 by
6 < // 6=?>
��
@BADC E FOO
U 8 //
We say that two computations areextensionally equivalent, if they give rise tothe same function.
A Functional Quantum Programming Language – p.11/??
Extensional equality . . .
Theorem:
U
$ G : % �$ U
% G$ U : %
Hence, classical computations upto extensionalequality give rise to the category .
Theorem: Any function on finite setscan be realized by a computation.
Translation for Category Theoreticans:U is full and faithful.
A Functional Quantum Programming Language – p.12/??
Extensional equality . . .
Theorem:
U
$ G : % �$ U
% G$ U : %
Hence, classical computations upto extensionalequality give rise to the category .
Theorem: Any function on finite setscan be realized by a computation.
Translation for Category Theoreticans:U is full and faithful.
A Functional Quantum Programming Language – p.12/??
Extensional equality . . .
Theorem:
U
$ G : % �$ U
% G$ U : %
Hence, classical computations upto extensionalequality give rise to the category .
Theorem: Any function4
on finite sets; can be realized by a computation.
Translation for Category Theoreticans:U is full and faithful.
A Functional Quantum Programming Language – p.12/??
Extensional equality . . .
Theorem:
U
$ G : % �$ U
% G$ U : %
Hence, classical computations upto extensionalequality give rise to the category .
Theorem: Any function4
on finite sets; can be realized by a computation.
Translation for Category Theoreticans:U is full and faithful.
A Functional Quantum Programming Language – p.12/??
Example � :function HJI 4 $ � ; � % �
HKI $ � ; L % � �
computation
�
A Functional Quantum Programming Language – p.13/??
Example � :function HJI 4 $ � ; � % �
HKI $ � ; L % � �
computation � �
� �
/NMO
A Functional Quantum Programming Language – p.13/??
Example :
function P4 � $ � ; � %
P� �$ � ;� %
computation
� '&%$ !"#
A Functional Quantum Programming Language – p.14/??
Example :
function P4 � $ � ; � %
P� �$ � ;� %
computation Q � � R Q � �
S � � � '&%$ !"# Q � �
T T 4 $ � ; � % $ � ; � %
T$ S ;� % �$ S ;� %
T$ � ;� % �$ � ; U � %
A Functional Quantum Programming Language – p.14/??
Classical vs quantum
classical ( ) quantum ( )
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( ) tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( ) tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets
finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( ) tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( ) tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections
unitary operators
cartesian product ( ) tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( ) tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( V )
tensor product ( )
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( V ) tensor product ( W)
functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( V ) tensor product ( W)functions
superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( V ) tensor product ( W)functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( V ) tensor product ( W)functions superoperators
projections
partial trace
A Functional Quantum Programming Language – p.15/??
Classical vs quantum
classical (
� � �
) quantum (� �
)
finite sets finite dimensional Hilbert spaces
bijections unitary operators
cartesian product ( V ) tensor product ( W)functions superoperators
projections partial trace
A Functional Quantum Programming Language – p.15/??
� X , classically
HDI G P� � �
� '&%$ !"# �
A Functional Quantum Programming Language – p.16/??
� X , classically
HDI G P� � �Q � � R Q � �
S � � � '&%$ !"# �
/ZY /NMO
A Functional Quantum Programming Language – p.16/??
� X , classically
HDI G P� � �Q � � R Q � �
S � � � '&%$ !"# �
/ZY /NMO[
� �
A Functional Quantum Programming Language – p.16/??
� X , quantum
Q � � R Q � �
S � � � '&%$ !"# �
/\Y /]MO
input:
output:
Decoherence!
A Functional Quantum Programming Language – p.17/??
� X , quantum
Q � � R Q � �
S � � � '&%$ !"# �
/\Y /]MOinput:
� I ^ � # S _ I^ � # � _ *
output:
Decoherence!
A Functional Quantum Programming Language – p.17/??
� X , quantum
Q � � R Q � �
S � � � '&%$ !"# �
/\Y /]MOinput:
� I ^ � # S _ I^ � # � _ *output:
I � � # S _ * I � � # � _ *
Decoherence!
A Functional Quantum Programming Language – p.17/??
� X , quantum
Q � � R Q � �
S � � � '&%$ !"# �
/\Y /]MOinput:
� I ^ � # S _ I^ � # � _ *output:
I � � # S _ * I � � # � _ *
Decoherence!
A Functional Quantum Programming Language – p.17/??
Control of decoherence
QML is based on strict linear logic
Contraction is implicit and realized by .
Weakening is explicit and leads todecoherence.
A Functional Quantum Programming Language – p.18/??
Control of decoherence
QML is based on strict linear logic
Contraction is implicit and realized by .
Weakening is explicit and leads todecoherence.
A Functional Quantum Programming Language – p.18/??
Control of decoherence
QML is based on strict linear logic
Contraction is implicit and realized by T.
Weakening is explicit and leads todecoherence.
A Functional Quantum Programming Language – p.18/??
Control of decoherence
QML is based on strict linear logic
Contraction is implicit and realized by T.Weakening is explicit and leads todecoherence.
A Functional Quantum Programming Language – p.18/??
QML overview
Types
Terms
A Functional Quantum Programming Language – p.19/??
QML overview
Types ` � � # ` a # ` a
Terms
A Functional Quantum Programming Language – p.19/??
QML overview
Types ` � � # ` a # ` aTerms b �� # +� �� � b �� c # � �d# $ % #$ b ; c % # +� �$ � ; L % � b �� c# � egf b # � e f ' c#ih j, � b(k � ��� e f � c # � e f ' L c l *
#ih j, � � b(k � ��� e f � c # � e f ' L c l *
# �$ m % b # $�n % c *
A Functional Quantum Programming Language – p.19/??
Qbits
� � � �
� &') " � � egf $ %
� ��� �!" � � egf ' $ %
�� b ����� c � +, � c l
�h j, � ��� e f c # � e f ' c l *
�� � b ���� � c � +, � c l
�h j, � � ��� e f c # � e f ' c l *
A Functional Quantum Programming Language – p.20/??
QML overview . . .
Typing judgementsprograms
strict programs
Semantics
A Functional Quantum Programming Language – p.21/??
QML overview . . .
Typing judgementso pq � ` programso p � q � ` strict programs
Semantics
A Functional Quantum Programming Language – p.21/??
QML overview . . .
Typing judgementso pq � ` programso p � q � ` strict programs
Semantics o pq � `rq s 4 r o s r ` s
o p � q � `rq s 4 � r o s r ` s
A Functional Quantum Programming Language – p.21/??
The let-rule
o pq � `; Q � ` p�t � a " &o pvu w x Q �q y{z t � a
;;;;
;
�
�����
�
;;;;
;;
9999
99�
�
������
������ �
A Functional Quantum Programming Language – p.22/??
The let-rule
o pq � `; Q � ` p�t � a " &o pvu w x Q �q y{z t � a
o |~}�� � �;;
;;;
�
��C � � � ����� � � �
� �
;;;;
;;
9999
99 ��
� �
������
������ ��
A Functional Quantum Programming Language – p.22/??
on contexts
if dom
�
A Functional Quantum Programming Language – p.23/??
on contexts
o ; Q � ` ; Q � ` � $ o % ; Q � `o ; Q � ` � $ o % ; Q � ` if Q �4
domR �
�
A Functional Quantum Programming Language – p.23/??
on contexts
o ; Q � ` ; Q � ` � $ o % ; Q � `o ; Q � ` � $ o % ; Q � ` if Q �4
domR �
o |~}�� � o
�C � �
A Functional Quantum Programming Language – p.23/??
Another source of decoherence
mentions
but doesn’t use it.
Hence, it has to measure it!
A Functional Quantum Programming Language – p.24/??
Another source of decoherence
��� � b mentions���� � b� � � �
��� � b� � �� � ����� � &') " � +, � � &(') "
but doesn’t use it.
Hence, it has to measure it!
A Functional Quantum Programming Language – p.24/??
Another source of decoherence
��� � b mentions���� � b� � � �
��� � b� � �� � ����� � &') " � +, � � &(') "
but doesn’t use it.
Hence, it has to measure it!
A Functional Quantum Programming Language – p.24/??
Another source of decoherence
��� � b mentions���� � b� � � �
��� � b� � �� � ����� � &') " � +, � � &(') "
but doesn’t use it.
Hence, it has to measure it!
A Functional Quantum Programming Language – p.24/??
-elim
::::
:
�
�����
�
�
DDDD
DD�
�
zzzzzz �
A Functional Quantum Programming Language – p.25/??
-elim
� ���� � ����� �� � ��� ��� �� � ��� � � �¡ ¢£¥¤� W � ��¦§ ¨© � ª « ¬®°¯ ± � ²� ³ °¯ ´ � ² � µ� �
::::
:
�
�����
�
�
DDDD
DD�
�
zzzzzz �
A Functional Quantum Programming Language – p.25/??
-elim
� ���� � ����� �� � ��� ��� �� � ��� � � �¡ ¢£¥¤� W � ��¦§ ¨© � ª « ¬®°¯ ± � ²� ³ °¯ ´ � ² � µ� �
� W � /�¶¸·º¹ » �::
:::
/½¼¾ ¿ÁÀ Â1 �Äà � � � ����� /ÄÅ� Æ � �
Ç¸È ÉËÊ�1Å �
DDDD
DD
2�1¾¸Ì À �
zzzzzz
2ÍÅ�
A Functional Quantum Programming Language – p.25/??
-elim decoherence-free
::::
:
�
�����
�
DDDD
DD�
�
zzzzzz �
A Functional Quantum Programming Language – p.26/??
-elim decoherence-free
� �Î �� � � ��� �� � �Ï �� ��� �� � �Ï � � � � Ð� ��Ñ ¢£¥¤ Ï� W � �Î ¦§ ¨ © Ï � ª « ¬®°¯ ± � ²� ³ ¯ ´ � ² � µ� �
::::
:
�
�����
�
DDDD
DD�
�
zzzzzz �
A Functional Quantum Programming Language – p.26/??
-elim decoherence-free
� �Î �� � � ��� �� � �Ï �� ��� �� � �Ï � � � � Ð� ��Ñ ¢£¥¤ Ï� W � �Î ¦§ ¨ © Ï � ª « ¬®°¯ ± � ²� ³ ¯ ´ � ² � µ� �
� W � /Ķ¸·º¹ » �
::::
:
/½¼Ò ¿ÁÓ Â1 �Äà � � � ����� /ÕÔ� Æ � Ö /¾ ×À �
ÇØÈ ÇØÈ1Ô �
DDDD
DD
2�1Ò Ì Ó �
zzzzzz
2ÙÔ�
A Functional Quantum Programming Language – p.26/??
Ú G
This program has a type error, because.
This program typechecks, because.
A Functional Quantum Programming Language – p.27/??
Ú G��� � b l� � � �
��� � b l� � �� � � ����� � &') " � +�, � � &') "
This program has a type error, because.
This program typechecks, because.
A Functional Quantum Programming Language – p.27/??
Ú G��� � b l� � � �
��� � b l� � �� � � ����� � &') " � +�, � � &') "
This program has a type error, becauseÛ xDÜÝ w Û x ÜÝ w.
This program typechecks, because.
A Functional Quantum Programming Language – p.27/??
Ú G��� � b l� � � �
��� � b l� � �� � � ����� � &') " � +�, � � &') "
This program has a type error, becauseÛ xDÜÝ w Û x ÜÝ w.
Þß � b� � � �
Þß � b� � �� � ����� � ��� �!" � +�, � � &') "
This program typechecks, because.
A Functional Quantum Programming Language – p.27/??
Ú G��� � b l� � � �
��� � b l� � �� � � ����� � &') " � +�, � � &') "
This program has a type error, becauseÛ xDÜÝ w Û x ÜÝ w.
Þß � b� � � �
Þß � b� � �� � ����� � ��� �!" � +�, � � &') "
This program typechecks, becauseÛ àÁá u â w Û xDÜÝ w.A Functional Quantum Programming Language – p.27/??
Conclusions
Our semantic ideas proved useful whendesigning a quantum programming language,analogous concepts are modelled by thesame syntactic constructs.
Our analysis also highlights the differencesbetween classical and quantumprogramming.
Quantum programming introduces theproblem of control of decoherence, which weaddress by making forgetting variablesexplicit and by having different if-then-elseconstructs.
A Functional Quantum Programming Language – p.28/??
ConclusionsOur semantic ideas proved useful whendesigning a quantum programming language,analogous concepts are modelled by thesame syntactic constructs.
Our analysis also highlights the differencesbetween classical and quantumprogramming.
Quantum programming introduces theproblem of control of decoherence, which weaddress by making forgetting variablesexplicit and by having different if-then-elseconstructs.
A Functional Quantum Programming Language – p.28/??
ConclusionsOur semantic ideas proved useful whendesigning a quantum programming language,analogous concepts are modelled by thesame syntactic constructs.
Our analysis also highlights the differencesbetween classical and quantumprogramming.
Quantum programming introduces theproblem of control of decoherence, which weaddress by making forgetting variablesexplicit and by having different if-then-elseconstructs.
A Functional Quantum Programming Language – p.28/??
ConclusionsOur semantic ideas proved useful whendesigning a quantum programming language,analogous concepts are modelled by thesame syntactic constructs.
Our analysis also highlights the differencesbetween classical and quantumprogramming.
Quantum programming introduces theproblem of control of decoherence, which weaddress by making forgetting variablesexplicit and by having different if-then-elseconstructs.
A Functional Quantum Programming Language – p.28/??
Further work
We have to analyze more quantum programsto evaluate the practical usefulness of ourapproach.
Are we able to come up with completely newalgorithms using QML?
How to deal with higher order programs?
How to deal with infinite datatypes?
Investigate the similarities/differencesbetween FCC and FQC from a categoricalpoint of view.
A Functional Quantum Programming Language – p.29/??
Further work
We have to analyze more quantum programsto evaluate the practical usefulness of ourapproach.
Are we able to come up with completely newalgorithms using QML?
How to deal with higher order programs?
How to deal with infinite datatypes?
Investigate the similarities/differencesbetween FCC and FQC from a categoricalpoint of view.
A Functional Quantum Programming Language – p.29/??
Further work
We have to analyze more quantum programsto evaluate the practical usefulness of ourapproach.
Are we able to come up with completely newalgorithms using QML?
How to deal with higher order programs?
How to deal with infinite datatypes?
Investigate the similarities/differencesbetween FCC and FQC from a categoricalpoint of view.
A Functional Quantum Programming Language – p.29/??
Further work
We have to analyze more quantum programsto evaluate the practical usefulness of ourapproach.
Are we able to come up with completely newalgorithms using QML?
How to deal with higher order programs?
How to deal with infinite datatypes?
Investigate the similarities/differencesbetween FCC and FQC from a categoricalpoint of view.
A Functional Quantum Programming Language – p.29/??
Further work
We have to analyze more quantum programsto evaluate the practical usefulness of ourapproach.
Are we able to come up with completely newalgorithms using QML?
How to deal with higher order programs?
How to deal with infinite datatypes?
Investigate the similarities/differencesbetween FCC and FQC from a categoricalpoint of view.
A Functional Quantum Programming Language – p.29/??
Further work
We have to analyze more quantum programsto evaluate the practical usefulness of ourapproach.
Are we able to come up with completely newalgorithms using QML?
How to deal with higher order programs?
How to deal with infinite datatypes?
Investigate the similarities/differencesbetween FCC and FQC from a categoricalpoint of view.
A Functional Quantum Programming Language – p.29/??
The end
Thank you for your attention.
A Functional Quantum Programming Language – p.30/??