Quantum Functional Programming Language & Its Denotational Semantics
|
|
- Allen Dawson
- 5 years ago
- Views:
Transcription
1 Quantum Functional Programming Language & Its Denotational Semantics Ichiro Hasuo Dept. Computer Science University of Tokyo Naohiko Hoshino Research Inst. for Math. Sci. Kyoto University Talk based on: I. Hasuo & N. Hoshino, Semantics of Higher-Order Quantum Computation via Geometry of Interaction, to appear in Proc. Logic in Computer Science (LICS), June 2011.
2 Quantum Functional Programming Language & Its Denotational Semantics
3 Quantum Functional Programming Language & Its Denotational Semantics
4 Quantum Functional Programming Language & Its Denotational Semantics What? Why?
5 Overview Why programming language? Why functional programming language? Why semantics? Why denotational semantics?
6 Overview Why programming language? Why functional programming language? Why semantics? Why denotational semantics? Contribution First denotational semantics for full-featured QFPL
7 Quantum Functional Programming Language & Its Denotational Semantics
8 Quantum Functional Programming Language & Its Denotational Semantics Q1. Why programming language?
9 Formalisms We need one for describing/studying quantum algorithms
10 Formalisms We need one for describing/studying quantum algorithms Classical Quantum (Boolean) circuit Quantum circuit [Null-Lobur] [beachhandball.es] Programming language int i,j; int factorial(int k) { j=1; for (i=1; i<=k; i++) j=j*i; return j; }
11 Formalisms We need one for describing/studying quantum algorithms Classical Quantum (Boolean) circuit Quantum circuit [Null-Lobur] [beachhandball.es] Programming language int i,j; int factorial(int k) { j=1; for (i=1; i<=k; i++) j=j*i; return j; } Quantum programming language [Selinger-Valiron]
12 Quantum Programming Languages Imperative (Mlnarik) Functional (Selinger, Valiron)
13 Quantum Programming Languages Imperative (Mlnarik) Functional (Selinger, Valiron) High-level new algorithms?
14 Quantum Programming Imperative (Mlnarik) Languages Functional (Selinger, Valiron) High-level new algorithms? Well-developed techniques for correctness guarantee (verification) Type system Program model checking etc.
15 Quantum Functional Programming Language & Its Denotational Semantics
16 Quantum Functional Programming Language & Its Denotational Semantics Q2. Why functional programming language?
17 (Classical) Functional Programming Languages Computation as evaluation of mathematical functions Avoids (memory) state or mutable data Scheme, Erlang, ML (SML, OCaml), Haskell, F#, int i,j; int factorial(int k) { j=1; for (i=1; i<=k; i++) j=j*i; return j; } Factorial in C fun factorial x = if x = 0 then 1 else x * factorial (x-1) Factorial in ML
18 (Classical) Functional Programming Languages Higher-order computation twice f = λx.f(fx) as fun twice (f : int -> int) : int -> int = fn (x : int) => f (f x) Modularity, code reusability
19 (Classical) Functional Programming Languages Higher-order computation twice f = λx.f(fx) as fun twice (f : int -> int) : int -> int = fn (x : int) => f (f x) Modularity, code reusability Mathematically clean Programs as functions!
20 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum
21 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum Uniform treatment of quantum data and classical data
22 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum quantum data, classical control Uniform treatment of quantum data and classical data
23 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum quantum data, classical control Uniform treatment of quantum data and classical data Nicely enforced by types 0 : int + : int * int -> int
24 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum quantum data, classical control Uniform treatment of quantum data and classical data Nicely enforced by types 0 : int + : int * int -> int new 0 : qbit tt :!bit meas : qbit! bit
25 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum quantum data, classical control Uniform treatment of quantum data and classical data Nicely enforced by types 0 : int + : int * int -> int new 0 : qbit tt :!bit meas : qbit! bit! : duplicable
26 Quantum Functional Programming Mathematical Mathematical transfer from classical to quantum quantum data, classical control Uniform treatment of quantum data and classical data Nicely enforced by types 0 : int + : int * int -> int new 0 : qbit tt :!bit meas : qbit! bit --o : linear function (input is used only once)! : duplicable
27 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] Types:
28 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] Types: A, B ::= n-qbit bit! A A B A B
29 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state Types: A, B ::= n-qbit bit! A A B A B
30 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B
31 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit A, duplicable! A A B A B
32 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B A, duplicable linear function
33 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B A, duplicable linear function pair of A & B
34 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B Programs or terms: A, duplicable linear function pair of A & B M, N ::= x Var λx A.M MN M, N let x A,y B = M in N letrec f A x = M in N new 0 meas n+1 i U cmp m,n
35 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B Programs or terms: A, duplicable linear function pair of A & B M, N ::= x Var λx A.M MN M, N let x A,y B = M in N letrec f A x = M in N new 0 meas n+1 i U cmp m,n function
36 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B Programs or terms: A, duplicable linear function pair of A & B M, N ::= x Var λx A.M MN M, N let x A,y B = M in N letrec f A x = M in N new 0 meas n+1 i U cmp m,n function pairing
37 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B Programs or terms: A, duplicable linear function pair of A & B M, N ::= x Var λx A.M MN M, N let x A,y B = M in N letrec f A x = M in N new 0 meas n+1 i U cmp m,n function pairing recursive def. of func.
38 Our Language qλ l λ-calculus (prototype FPL) Based on [Selinger-Valiron, 2008] n-qubit state (classical) bit Types: A, B ::= n-qbit bit! A A B A B Programs or terms: A, duplicable linear function pair of A & B M, N ::= x Var λx A.M MN M, N let x A,y B = M in N letrec f A x = M in N new 0 meas n+1 i U cmp m,n function pairing recursive def. of func. quantum primitives
39 Our Language qλ l Typing rules: N.B. Only some are shown. Very much simplified!,x : A x : A (Ax.1)! new 0 : qbit (Ax.2)! meas :!(qbit bit) (Ax.2) x : A, M : B λx A.M : A B (.I 1)!, Γ 1 M : A B!, Γ 2 N : A!, Γ 1, Γ 2 MN : B (.E), ( )!, Γ 1 M 1 : A 1!, Γ 2 M 2 : A 2!, Γ 1, Γ 2 M 1,M 2 : A 1 A 2 (.I), ( )
40 Our Language qλ l Typing rules: N.B. Only some are shown. Very much simplified!,x : A x : A (Ax.1)! new 0 : qbit (Ax.2)! meas :!(qbit bit) (Ax.2) x : A, M : B λx A.M : A B (.I 1)!, Γ 1 M : A B!, Γ 2 N : A!, Γ 1, Γ 2 MN : B (.E), ( )!, Γ 1 M 1 : A 1!, Γ 2 M 2 : A 2!, Γ 1, Γ 2 M 1,M 2 : A 1 A 2 (.I), ( )
41 Type Discipline Typable safe Guarantees minimal correctness f AB x A : B f AB y AA meas(x qbit ):bit meas(x qbit ), meas(hx qbit )
42 Type Discipline Typable safe Guarantees minimal correctness f AB x A : B f AB y AA meas(x qbit ):bit meas(x qbit ), meas(hx qbit ) Faulty program fun isvalue t = case t of Num _ => 1 _ => false compile Type error ex.sml: Error: types of rules don't agree [literal] earlier rule(s): term -> int this rule: term -> bool in rule: _ => false
43 Examples In [Selinger-Valiron]; similar in ours Quantum teleportation (Fair) cointoss, repeated Hadamard Flip coin: head Hadamard and flip again tail done
44 Quantum Functional Programming Language & Its Denotational Semantics
45 Quantum Functional Programming Language & Its Denotational Semantics Q3. Why semantics?
46 Semantics
47 Semantics Meaning of a program
48 Semantics Meaning of a program For reasoning about programs
49 Semantics Meaning of a program For reasoning about programs M N: M and N have the same meaning, i.e. computational content
50 Semantics Meaning of a program For reasoning about programs M N: M and N have the same meaning, i.e. computational content?? = λx. (x x) λx. 0
51 Semantics Meaning of a program For reasoning about programs M N: M and N have the same meaning, i.e. computational content?? = λx. (x x) λx. 0 (stupid) sort quick sort
52 Semantics For functional languages: Operational: how the program is transformed/evaluated/reduced (λx. 1+x) Denotational: meaning as a mathematical function λx. 1+x = (function N N, n 1+n)
53 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic Denotational λx. 1+x = (function N N, n 1+n) mathematical static
54 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.)
55 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion
56 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion Goal: M = opr. N
57 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion Goal: M = opr. N
58 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion Goal: M = opr. N
59 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion Goal: M = opr. N hard to show directly
60 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion Goal: M = opr. N = M = N hard to show directly
61 Operational vs. Denotational Operational (λx. 1+x) reduction-based dynamic (akin to) machine implementation Denotational λx. 1+x = (function N N, n 1+n) mathematical static comes with mathematical reasoning principles (fixed pt. induction, well-fdd induction, etc.) powerful esp. for recursion Goal: M = opr. N = M = N hard to show directly Adequate denotational semantics: M = N M = opr. N
62 Quantum Functional Programming Language & Its Denotational Semantics
63 Quantum Functional Programming Language & Its Denotational Semantics Q4. Why no denotational semantics before?
64 Challenges H = : C 2 C 2, isn t it?
65 Challenges H = : C 2 C 2, isn t it? Quantum data, classical control not clear how to accommodate duplicable data in Hilbert spaces
66 Technical Contributions
67 Technical Contributions Quantum functional programming language Based on [Selinger-Valiron] w/ recursion, classical data (by!)
68 Technical Contributions Quantum functional programming language Based on [Selinger-Valiron] w/ recursion, classical data (by!) Its denotational semantics First one for fully-featured QFPL
69 Full-fledged Semantical Technologies
70 Full-fledged Semantical Technologies
71 Geometry of Interaction Originally by J.-Y. Girard, 1989: Computation as player of a game cf. Game semantics (Abramsky et al., Hyland-Ong) We use categorical formulation: Abramsky, Haghverdi and Scott, 2002
72 Geometry of Interaction Originally by J.-Y. Girard, 1989: Computation as player of a game cf. Game semantics (Abramsky et al., Hyland-Ong) We use categorical formulation: Abramsky, Haghverdi and Scott, 2002 Axiomatization of what is classical control
73 (Particle-Style) Geometry of Interaction (countably many) M = M
74 (Particle-Style) Geometry of Interaction (countably many) M = M
75 (Particle-Style) Geometry of Interaction (countably many) M = M
76 (Particle-Style) Geometry of Interaction token (chocolate) (countably many) M = M
77 (Particle-Style) Geometry of Interaction (countably many) M = M
78 (Particle-Style) Geometry of Interaction (countably many) M = M
79 (Particle-Style) Geometry of Interaction (countably many) M = M
80 MN = M N
81 MN = M N
82 MN = M N
83 MN = M N
84 MN = M N
85 MN MN = M N
86 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
87 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
88 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
89 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
90 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
91 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
92 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
93 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
94 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
95 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
96 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
97 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
98 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
99 MN MN = M N M = λx. x +1 N =2 M = λx. 1 N =2 M = λf. f1 N = λx. (x +1)
100 Quantum Geometry of Interaction (countably many) M = M
101 Quantum Geometry of Interaction Not just a token/ particle, but quantum state! (countably many) M = M
102 Quantum Geometry of Interaction (countably many) M = M Not just a token/ particle, but quantum state!
103 Quantum Geometry of Interaction (countably many) M = M Quantum Data Not just a token/ particle, but quantum state!
104 Quantum Geometry of Interaction Classical Control (countably many) M = M Quantum Data Not just a token/ particle, but quantum state!
105 Quantum Functional Programming Language & Its Denotational Semantics
106 Quantum Functional Programming Language & Its Denotational Semantics Q5. Why quantum computation?
107 Ans. You know why!
108 Conclusions Structured programming & mathematical semantics Quantum data, classical control Geometry of interaction as the essence of classical control
109 Conclusions Structured programming & mathematical semantics Quantum data, classical control Geometry of interaction as the essence of classical control Thank you for your attention! Ichiro Hasuo (Dept. CS, U Tokyo) Naohiko Hoshino (RIMS, Kyoto U)
110 Quantum Programming Languages Functional (Selinger, Valiron)
111 Quantum Programming Languages Imperative (Mlnarik) Functional (Selinger, Valiron)
112 Quantum Programming Languages Imperative (Mlnarik) Functional (Selinger, Valiron) High-level new algorithms?
113 Quantum Programming Languages Imperative (Mlnarik) Functional (Selinger, Valiron) High-level new algorithms? (Sometimes) good handling of quantum vs. classical data No-Cloning vs. Duplicable
114 Quantum Programming Imperative (Mlnarik) Languages Functional (Selinger, Valiron) High-level new algorithms? (Sometimes) good handling of quantum vs. classical data No-Cloning vs. Duplicable Model quantum communication protocols
115 Quantum Functional Programming Language & Its Denotational Semantics
116 Quantum Functional Programming Language & Its Denotational Semantics Q4. Why denotational semantics?
117 M N
118 M N
119 M N
120 M N
121 M N
122 M N
123 M N
124 M N
125 M N
A categorical model for a quantum circuit description language
A categorical model for a quantum circuit description language Francisco Rios (joint work with Peter Selinger) Department of Mathematics and Statistics Dalhousie University CT July 16th 22th, 2017 What
More informationDynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics
Dynamic Semantics Operational Semantics Denotational Semantic Dynamic Semantics Operational Semantics Operational Semantics Describe meaning by executing program on machine Machine can be actual or simulated
More informationOrthogonality and Algebraic Lambda-Calculus
Orthogonality and Algebraic Lambda-Calculus Benoît Valiron March 28, 2010 Abstract Directly encoding lambda-terms on quantum strings while keeping a quantum interpretation is a hard task. As shown by van
More informationQuantum Effects. Juliana K. Vizzotto 1 Thorsten Altenkirch 2. Amr Sabry January Yale CS Colloquium Page 1
Quantum Effects Juliana K. Vizzotto 1 Thorsten Altenkirch 2 Amr Sabry 3 1 Federal University of Rio Grande do Sul 2 The University of Nottingham 3 Indiana University 2 January 25 Yale CS Colloquium Page
More informationQWIRE Practice: Formal Verification of Quantum Circuits in Coq
1 / 29 QWIRE Practice: Formal Verification of Quantum Circuits in Coq Robert Rand, Jennifer Paykin, Steve Zdancewic University of Pennsylvania Quantum Physics and Logic, 2017 2 / 29 QWIRE A high-level
More informationEDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach
EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types
More informationA lambda calculus for quantum computation with classical control
A lambda calculus for quantum computation with classical control Peter Selinger, Benoît Valiron Department of Mathematics and Statistics, University of Ottawa, Ottawa, Ontario K1N 6N5, Canada Abstract
More informationExtending the Lambda Calculus: An Eager Functional Language
Syntax of the basic constructs: Extending the Lambda Calculus: An Eager Functional Language canonical forms z cfm ::= intcfm boolcfm funcfm tuplecfm altcfm intcfm ::= 0 1-1... boolcfm ::= boolconst funcfm
More informationDenotational semantics
Denotational semantics Semantics and Application to Program Verification Antoine Miné École normale supérieure, Paris year 2015 2016 Course 4 4 March 2016 Course 4 Denotational semantics Antoine Miné p.
More information1 Quantum Lambda Calculus
1 Quantum Lambda Calculus Peter Selinger Dalhousie University, Canada Benoît Valiron INRIA and École Polytechnique, LIX, Palaiseau, France. Abstract We discuss the design of a typed lambda calculus for
More informationQuantum Recursion and Second Quantisation
Quantum Recursion and Second Quantisation Mingsheng Ying State Key Laboratory of Computer Science Outline 1. Introduction 2. Recursive Programming 3. Classical Recursion in Quantum Programming 4. Quantum
More informationSimply Typed Lambda Calculus
Simply Typed Lambda Calculus Language (ver1) Lambda calculus with boolean values t ::= x variable x : T.t abstraction tt application true false boolean values if ttt conditional expression Values v ::=
More informationDomain theory and denotational semantics of functional programming
Domain theory and denotational semantics of functional programming Martín Escardó School of Computer Science, Birmingham University MGS 2007, Nottingham, version of April 20, 2007 17:26 What is denotational
More informationSimply Typed Lambda-Calculi (II)
THEORY AND PRACTICE OF FUNCTIONAL PROGRAMMING Simply Typed Lambda-Calculi (II) Dr. ZHANG Yu Institute of Software, Chinese Academy of Sciences Fall term, 2011 GUCAS, Beijing Introduction PCF Programming
More informationCS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus
CS 4110 Programming Languages & Logics Lecture 16 Programming in the λ-calculus 30 September 2016 Review: Church Booleans 2 We can encode TRUE, FALSE, and IF, as: TRUE λx. λy. x FALSE λx. λy. y IF λb.
More informationReview. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007
CSE 230: Winter 2007 Principles of Programming Languages Lecture 12: The λ-calculus Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2 Several evaluation
More informationA lambda calculus for quantum computation with classical control
Under consideration for publication in Math. Struct. in Comp. Science A lambda calculus for quantum computation with classical control P E T E R S E L I N G E R 1 and B E N O I T V A L I R O N 1 Department
More informationA lambda calculus for quantum computation with classical control
Under consideration for publication in Math. Struct. in Comp. Science A lambda calculus for quantum computation with classical control P E T E R S E L I N G E R 1 and B E N O I T V A L I R O N 1 Department
More informationProgramming with classical quantum datatypes
Programming with classical quantum datatypes Robin Cockett & Brett Giles (robin,gilesb)@cpsc.ucalgary.ca University of Calgary FMCS 2006, Programming with classical quantum datatypes p. 1/49 Yet another
More informationOperational Semantics
Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical
More informationOn Coinduction and Quantum Lambda Calculi
On Coinduction and Quantum Lambda Calculi Yuxin Deng East China Normal University (Joint work with Yuan Feng and Ugo Dal Lago) To appear at CONCUR 15 1 Outline Motivation A quantum λ-calculus Coinductive
More information1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures
CS 6110 S18 Lecture 21 Products, Sums, and Other Datatypes 1 Introduction In this lecture, we add constructs to the typed λ-calculus that allow working with more complicated data structures, such as pairs,
More information1 Quantum Lambda Calculus
1 Quantum Lambda Calculus Peter Selinger Dalhousie University, Canada Benoît Valiron INRIA and École Polytechnique, LIX, Palaiseau, France. 1.1 Introduction The lambda calculus, developed in the 1930 s
More informationType Systems for Quantum Computation
Type Systems for Quantum Computation Bill Zorn Abstract Type systems are useful to programmers for a variety of reasons. In the classical world, they help us to define interfaces between separate pieces
More informationCode Generation for a Simple First-Order Prover
Code Generation for a Simple First-Order Prover Jørgen Villadsen, Anders Schlichtkrull, and Andreas Halkjær From DTU Compute, Technical University of Denmark, 2800 Kongens Lyngby, Denmark Abstract. We
More informationTyping λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus
Course 2D1453, 200607 Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Some material from B. Pierce: TAPL + some from G. Klein, NICTA Typing λterms The uptyped λcalculus
More informationBaby's First Diagrammatic Calculus for Quantum Information Processing
Baby's First Diagrammatic Calculus for Quantum Information Processing Vladimir Zamdzhiev Department of Computer Science Tulane University 30 May 2018 1 / 38 Quantum computing ˆ Quantum computing is usually
More informationA Functional Perspective
A Functional Perspective on SSA Optimization Algorithms Patryk Zadarnowski jotly with Manuel M. T. Chakravarty Gabriele Keller 19 April 2004 University of New South Wales Sydney THE PLAN ➀ Motivation an
More informationQWIRE: A Core Language for Quantum Circuits
QWIRE QWIRE: A Core Language for Quantum Circuits Jennifer Paykin Robert Rand Steve Zdancewic University of Pennsylvania, USA jpaykin@seas.upenn.edu, rrand@seas.upenn.edu, stevez@cis.upenn.edu Abstract
More informationProgramming Languages
CSE 230: Winter 2010 Principles of Programming Languages Lecture 10: Programming in λ-calculusc l l Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2
More informationFormalization of quantum protocols using Coq
Formalization of quantum protocols using Coq Jaap Boender Rajagopal Nagarajan Florian Kammüller July 17, 2015 Motivation for Interactive Theorem Proving (ITP) Automated Reasoning High Expressivity Trade
More informationM ::= x M M x = M M :: M x :: x
Mini-ML expressions M ::= x variable true boolean values false if M then M else M conditional lx (M) function abstraction MM function application let x = M in M local declaration nil nil list M :: M list
More informationA lambda calculus for quantum computation with classical control
A lambda calculus for quantum computation with classical control Peter Selinger Benoît Valiron Department of Mathematics and Statistics, University of Ottawa, Ottawa, Ontario K1N 6N5, Canada Abstract The
More informationFrom Symmetric Pattern-Matching to Quantum Control
From Symmetric Pattern-Matching to Quantum Control Amr Sabry 1, Benoît Valiron 2, and Juliana Kaizer Vizzotto 3 1 Indiana University sabry@indiana.edu 2 LRI, CentraleSupélec, Université Paris-Saclay benoit.valiron@lri.fr
More informationFunctional Programming with F# Overview and Basic Concepts
Functional Programming with F# Overview and Basic Concepts Radu Nicolescu Department of Computer Science University of Auckland 27 Sep 2017 1 / 52 1 Background 2 Overview 3 Type System and Type Inference
More informationGreat Theoretical Ideas in Computer Science. Lecture 7: Introduction to Computational Complexity
15-251 Great Theoretical Ideas in Computer Science Lecture 7: Introduction to Computational Complexity September 20th, 2016 What have we done so far? What will we do next? What have we done so far? > Introduction
More informationSemantics of Higher-Order Quantum Computation via Geometry of Interaction
Semantics of Higher-Order Quantum Computation via Geometry of Interaction Ichiro Hasuo Dept. Computer Science, University of Tokyo, Japan Naohiko Hoshino RIMS, Kyoto University, Japan Abstract While much
More informationQuantum data and control made easier
QPL 006 Preliminary Version Quantum data and control made easier Michael Lampis 1, Kyriakos G. Ginis 3 Nikolaos S. Papaspyrou 4 School of Electrical and Computer Engineering National Technical University
More informationQuantum Computation: from a Programmer s Perspective
Quantum Computation from a Programmer s Perspective 1 Quantum Computation: from a Programmer s Perspective Benoît Valiron University of Pennsylvania, Department of Computer and Information Science, 3330
More informationCS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers
CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped
More informationOn space efficiency of Krivine s abstract machine and Hyland-Ong games
13/02/08, LIPN p.1/28 On space efficiency of Krivine s abstract machine and Hyland-Ong games Kazushige Terui terui@nii.ac.jp National Institute of Informatics, Tokyo Laboratoire d Informatics de Paris
More informationReasoning about entanglement and separability in quantum higher-order functions
Reasoning about entanglement and separability in quantum higher-order functions Frédéric Prost 1 and Chaouki Zerrari 2 1 Grenoble Université, LIG, France Frederic.Prost@imag.fr 2 VERIMAG, Grenoble Université,
More informationStatic Program Analysis
Static Program Analysis Xiangyu Zhang The slides are compiled from Alex Aiken s Michael D. Ernst s Sorin Lerner s A Scary Outline Type-based analysis Data-flow analysis Abstract interpretation Theorem
More informationThe Lambda Calculus. Stephen A. Edwards. Fall Columbia University
The Lambda Calculus Stephen A. Edwards Columbia University Fall 2014 Lambda Expressions Function application written in prefix form. Add four and five is (+ 4 5) Evaluation: select a redex and evaluate
More informationCSE 311 Lecture 28: Undecidability of the Halting Problem. Emina Torlak and Kevin Zatloukal
CSE 311 Lecture 28: Undecidability of the Halting Problem Emina Torlak and Kevin Zatloukal 1 Topics Final exam Logistics, format, and topics. Countability and uncomputability A quick recap of Lecture 27.
More informationPhysics, Language, Maths & Music
Physics, Language, Maths & Music (partly in arxiv:1204.3458) Bob Coecke, Oxford, CS-Quantum SyFest, Vienna, July 2013 ALICE f f = f f = f f = ALICE BOB BOB meaning vectors of words does not Alice not like
More informationInteger Clocks and Local Time Scales
Integer Clocks and Local Time Scales Part I Part II Adrien Guatto ENS - PARKAS SYNCHRON 2014 Adrien Guatto (ENS - PARKAS) Integer Clocks and Local Time Scales SYNCHRON 2014 1 / 31 Part I Adrien Guatto
More informationIntroduction to lambda calculus Part 6
Introduction to lambda calculus Part 6 Antti-Juhani Kaijanaho 2017-02-16 1 Untyped lambda calculus 2 Typed lambda calculi 2.1 Dynamically typed lambda calculus with integers 2.2 A model of Lisp 2.3 Simply
More informationVerified Characteristic Formulae for CakeML. Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 18, 2017
Verified Characteristic Formulae for CakeML Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 18, 2017 CakeML Has: references, modules, datatypes, exceptions, a FFI,... Doesn t have:
More informationQWIRE: A QRAM-Inspired Quantum Circuit Language
QWIRE: A QRAM-Inspired Quantum Circuit Language Jennifer Paykin jpaykin@seas.upenn.edu Robert Rand rrand@seas.upenn.edu University of Pennsylvania Steve Zdancewic stevez@cis.upenn.edu We introduce QWIRE,
More informationGame semantics for quantum stores
Replace this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. Game semantics for quantum stores Yannick Delbecque a,1,2
More informationAbstract Semantics for a Simple Quantum Programming Language
Abstract Semantics for a Simple Quantum Programming Language Martin Churchill, Keble College, Oxford martin.churchill@keble.oxon.org Dissertation for the Degree of Master of Science in Mathematics and
More informationTowards a quantum calculus
QPL 2006 Preliminary Version Towards a quantum calculus (work in progress, extended abstract) Philippe Jorrand 1 Simon Perdrix 2 Leibniz Laboratory IMAG-INPG Grenoble, France Abstract The aim of this paper
More informationTopology for functional programming
Topology for functional programming Martín Escardó University of Birmingham, England EWSCS, Palmse, Estonia, 26 Feb 2 Mar 2012 Computational fact Function types A B with A infinite don t have decidable
More information6.896 Quantum Complexity Theory September 9, Lecture 2
6.96 Quantum Complexity Theory September 9, 00 Lecturer: Scott Aaronson Lecture Quick Recap The central object of study in our class is BQP, which stands for Bounded error, Quantum, Polynomial time. Informally
More informationTutorial on Semantics Part I
Tutorial on Semantics Part I Basic Concepts Prakash Panangaden 1 1 School of Computer Science McGill University on sabbatical leave at Department of Computer Science Oxford University Fields Institute,
More informationApplying quantitative semantics to higher-order quantum computing
Applying quantitative semantics to higher-order quantum computing Michele Pagani Université Paris 3, Sorbonne Paris Cité Villetaneuse, France michele.pagani@lipn.univ-paris3.fr Peter Selinger Dalhousie
More informationIntroduction to Quantum Information Processing
Introduction to Quantum Information Processing Lecture 6 Richard Cleve Overview of Lecture 6 Continuation of teleportation Computation and some basic complexity classes Simple quantum algorithms in the
More informationSemantics of Higher-Order Functional Programming
Semantics of Higher-Order Functional Programming Petros Barbagiannis µ λ July 14, 2014 Petros Barbagiannis Semantics of Higher-Order Functional Programming July 14, 2014 1 / 18 Introduction Higher-order
More informationLogic: The Big Picture
Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving
More informationGeometry of Interaction
Linear logic, Ludics, Implicit Complexity, Operator Algebras Geometry of Interaction Laurent Regnier Institut de Mathématiques de Luminy Disclaimer Syntax/Semantics Syntax = nite (recursive) sets Semantics
More informationCS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers
CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped
More informationWhat is a quantum computer? Quantum Architecture. Quantum Mechanics. Quantum Superposition. Quantum Entanglement. What is a Quantum Computer (contd.
What is a quantum computer? Quantum Architecture by Murat Birben A quantum computer is a device designed to take advantage of distincly quantum phenomena in carrying out a computational task. A quantum
More informationPropositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST
Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST moonzoo@cs.kaist.ac.kr http://pswlab.kaist.ac.kr/courses/cs402-07 1 Review Goal of logic To check whether given a formula
More informationA Bird s Eye View on the Quantitative Semantics of Linear Logic
A Bird s Eye View on the Quantitative Semantics of Linear Logic Michele Pagani Laboratoire d Informatique de Paris Nord Institut Galilèe Universitè de Paris 13 Villetaneuse, France michelepagani@lipnuniv-paris13fr
More informationA Logic for Formal Verification of Quantum Programs
A Logic for Formal Verification of Quantum Programs Yoshihiko Kakutani Department of Information Science, University of Tokyo kakutani@is.s.u-tokyo.ac.jp Abstract. This paper provides a Hoare-style logic
More informationTyped Arithmetic Expressions
Typed Arithmetic Expressions CS 550 Programming Languages Jeremy Johnson TAPL Chapters 3 and 5 1 Types and Safety Evaluation rules provide operational semantics for programming languages. The rules provide
More informationRefined Environment Classifiers
Refined Environment Classifiers Type- and Scope-safe Code Generation with Mutable Cells Oleg Kiselyov Yukiyoshi Kameyama Yuto Sudo Tohoku University University of Tsukuba APLAS 2016 November 22, 2016 Region
More informationSEQUENTIALITY & COMPLEXITY. Jim Royer Syracuse University
SEQUENTIALITY & COMPLEXITY Jim Royer Syracuse University OUTLINE I. Some History and Background and Background Sequential vs. Parallel PCF and parallel junk No junk models of PCF Sequentiality beyond PCF
More informationoutput of newer technologies and the subsequent adoption by the general population. The
Jared Stillford 16 November 2015 CS4960-001 Dr. Melanie Martin Quantum Computing: A Matter of Time Within the last few decades, computer programming has grown exponentially in both its output of newer
More informationBuilding a (sort of) GoI from denotational semantics: an improvisation
Building a (sort of) GoI from denotational semantics: an improvisation Damiano Mazza Laboratoire d Informatique de Paris Nord CNRS Université Paris 13 Workshop on Geometry of Interaction, Traced Monoidal
More informationCSE 505, Fall 2005, Midterm Examination 8 November Please do not turn the page until everyone is ready.
CSE 505, Fall 2005, Midterm Examination 8 November 2005 Please do not turn the page until everyone is ready. Rules: The exam is closed-book, closed-note, except for one side of one 8.5x11in piece of paper.
More information(2) (15pts) Using Prolog, implement a type-checker for the following small subset of System F:
CS 6371 Advanced Programming Languages Sample Spring 2018 Final Exam This sample final exam is LONGER than a real final exam (to give you more practice problems) and has a medium difficulty level. You
More informationFunctional Big-step Semantics
Functional Big-step Semantics FM talk, 11 Mar 2015 Magnus Myréen Books Big-step semantics are defined as inductively defined relation. Functions are better! me Context: CakeML verified compiler Old compiler:
More informationGOTO the past / programs choose their own adventure. CSE 505: Programming Languages
GOTO the past / programs choose their own adventure. CSE 505: Programming Languages Lecture 13 Evaluation Contexts First-Class Continuations Continuation-Passing Style Zach Tatlock Fall 2013 Zach Tatlock
More informationNICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods
NICTA Advanced Course Theorem Proving Principles, Techniques, Applications Gerwin Klein Formal Methods 1 ORGANISATORIALS When Mon 14:00 15:30 Wed 10:30 12:00 7 weeks ends Mon, 20.9.2004 Exceptions Mon
More informationFormal Verification of Mathematical Algorithms
Formal Verification of Mathematical Algorithms 1 Formal Verification of Mathematical Algorithms John Harrison Intel Corporation The cost of bugs Formal verification Levels of verification HOL Light Formalizing
More informationLambda-Calculus (I) 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010
Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables conversion
More informationQuantum gate. Contents. Commonly used gates
Quantum gate From Wikipedia, the free encyclopedia In quantum computing and specifically the quantum circuit model of computation, a quantum gate (or quantum logic gate) is a basic quantum circuit operating
More informationMathematical Fundamentals
Mathematical Fundamentals Sets Factorials, Logarithms Recursion Summations, Recurrences Proof Techniques: By Contradiction, Induction Estimation Techniques Data Structures 1 Mathematical Fundamentals Sets
More information20.1 2SAT. CS125 Lecture 20 Fall 2016
CS125 Lecture 20 Fall 2016 20.1 2SAT We show yet another possible way to solve the 2SAT problem. Recall that the input to 2SAT is a logical expression that is the conunction (AND) of a set of clauses,
More informationIntroduction to λ-calculus
p.1/65 Introduction to λ-calculus Ken-etsu FUJITA fujita@cs.gunma-u.ac.jp http://www.comp.cs.gunma-u.ac.jp/ fujita/ Department of Computer Science Gunma University :Church 32, 36, 40; Curry 34 1. Universal
More informationFormal Techniques for Software Engineering: Denotational Semantics
Formal Techniques for Software Engineering: Denotational Semantics Rocco De Nicola IMT Institute for Advanced Studies, Lucca rocco.denicola@imtlucca.it May 2013 Lesson 4 R. De Nicola (IMT-Lucca) FoTSE@LMU
More informationCS4705. Probability Review and Naïve Bayes. Slides from Dragomir Radev
CS4705 Probability Review and Naïve Bayes Slides from Dragomir Radev Classification using a Generative Approach Previously on NLP discriminative models P C D here is a line with all the social media posts
More informationCalculating axiomatic semantics from program equations by means of functional predicate calculus
Calculating axiomatic semantics from program equations by means of functional predicate calculus (Some initial results of recent work not for dissemination) Raymond Boute INTEC Ghent University 2004/02
More information- Why aren t there more quantum algorithms? - Quantum Programming Languages. By : Amanda Cieslak and Ahmana Tarin
- Why aren t there more quantum algorithms? - Quantum Programming Languages By : Amanda Cieslak and Ahmana Tarin Why aren t there more quantum algorithms? there are only a few problems for which quantum
More informationIntroduction. Pedro Cabalar. Department of Computer Science University of Corunna, SPAIN 2013/2014
Introduction Pedro Cabalar Department of Computer Science University of Corunna, SPAIN cabalar@udc.es 2013/2014 P. Cabalar ( Department Introduction of Computer Science University of Corunna, SPAIN2013/2014
More informationThe Geometry of Parallelism: Classical, Probabilistic, and Quantum Effects
The Geometry of Parallelism: Classical, Probabilistic, and Quantum Effects Ugo Dal Lago, Claudia Faggian, Benoît Valiron, Akira oshimizu To cite this version: Ugo Dal Lago, Claudia Faggian, Benoît Valiron,
More informationLecture 23: More PSPACE-Complete, Randomized Complexity
6.045 Lecture 23: More PSPACE-Complete, Randomized Complexity 1 Final Exam Information Who: You On What: Everything through PSPACE (today) With What: One sheet (double-sided) of notes are allowed When:
More informationQPEL Quantum Program and Effect Language
QPEL Quantum Program and Effect Language QPL 2014 Kyoto Robin Adams r.adams@cs.ru.nl 5 June 2014 R Adams 5 June 2014 QPEL 1 / 32 Introduction QPEL (Quantum Program and Effect language) is a formal system
More informationHoare Logic: Reasoning About Imperative Programs
Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Programming Paradigms Functional. (Haskell, SML, OCaml,... ) main paradigm:
More informationRoy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK
Midlands Graduate School, University of Birmingham, April 2008 1 Operational Semantics Abstract Machines and Correctness Roy L. Crole University of Leicester, UK Midlands Graduate School, University of
More informationInformation Flow Inference for ML
Information Flow Inference for ML Vincent Simonet INRIA Rocquencourt Projet Cristal MIMOSA September 27, 2001 Information flow account number bank applet order vendor account H order L bank H vendor L
More informationA Concrete Representation of Observational Equivalence for PCF
A of Observational Equivalence for PCF Martin Churchill, Jim Laird and Guy McCusker University of Bath March 28th, 2009 GaLoP workshop, University of York Martin Churchill, Jim Laird and Guy McCusker University
More informationComplexity Theory Part I
Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?
More informationCS357: CTL Model Checking (two lectures worth) David Dill
CS357: CTL Model Checking (two lectures worth) David Dill 1 CTL CTL = Computation Tree Logic It is a propositional temporal logic temporal logic extended to properties of events over time. CTL is a branching
More informationMemory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1
Memory Elements I CS31 Pascal Van Hentenryck CS031 Lecture 6 Page 1 Memory Elements (I) Combinational devices are good for computing Boolean functions pocket calculator Computers also need to remember
More informationCMSC 631 Program Analysis and Understanding Fall Type Systems
Program Analysis and Understanding Fall 2017 Type Systems Type Systems A type system is a tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according
More informationMath 230 Final Exam, Spring 2009
IIT Dept. Applied Mathematics, May 13, 2009 1 PRINT Last name: Signature: First name: Student ID: Math 230 Final Exam, Spring 2009 Conditions. 2 hours. No book, notes, calculator, cell phones, etc. Part
More informationThe LCF Approach to Theorem Proving
The LCF Approach to Theorem Proving 1 The LCF Approach to Theorem Proving John Harrison Intel Corporation Ideas and historical context Key ideas of LCF Equational logic example More about HOL Light Programming
More information