2. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
2 / 27
3. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
3 / 27
4. A brief and fast introduction to quantum computing
A bit of history
Richard Feynman’s quote (1982)
I’m not happy with all the analyses that go with just the classical theory,
because nature isn’t classical, and if you want to make a simulation of
nature, you’d better make it quantum mechanical, and by golly it’s a
wonderful problem, because it doesn’t look so easy.
4 / 27
5. A brief and fast introduction to quantum computing
A bit of history
Richard Feynman’s quote (1982)
I’m not happy with all the analyses that go with just the classical theory,
because nature isn’t classical, and if you want to make a simulation of
nature, you’d better make it quantum mechanical, and by golly it’s a
wonderful problem, because it doesn’t look so easy.
1985 David Deutsch → 1st. model of Quantum Turing Machine
1993 Charles Benett et.al. → Teleportation algorithm
1994 Peter Shor → Fast factorisation algorithm
1996 Lov Grover → Fast search algorithm
1998 Isaac Chuang et.al. → 1st (1 qubit) quantum computer
2001 Lieven Vandersypen et.al. → 7 qubit quantum computer
4 / 27
6. A brief and fast introduction to quantum computing
A bit of history
Richard Feynman’s quote (1982)
I’m not happy with all the analyses that go with just the classical theory,
because nature isn’t classical, and if you want to make a simulation of
nature, you’d better make it quantum mechanical, and by golly it’s a
wonderful problem, because it doesn’t look so easy.
1985 David Deutsch → 1st. model of Quantum Turing Machine
1993 Charles Benett et.al. → Teleportation algorithm
1994 Peter Shor → Fast factorisation algorithm
1996 Lov Grover → Fast search algorithm
1998 Isaac Chuang et.al. → 1st (1 qubit) quantum computer
2001 Lieven Vandersypen et.al. → 7 qubit quantum computer
. . . factorising the number 15
.
.
.
4 / 27
7. A physics free introduction to quantum computing
Quantum vs. Classic, side by side
Classic computing Bit: 0, 1
Quantum computing Qubit: Normalised vector from C2 . We
choose the basis {|0 , |1 } where |0 = (0, 1)T and |1 = (1, 0)T
5 / 27
8. A physics free introduction to quantum computing
Quantum vs. Classic, side by side
Classic computing Bit: 0, 1
Quantum computing Qubit: Normalised vector from C2 . We
choose the basis {|0 , |1 } where |0 = (0, 1)T and |1 = (1, 0)T
Classic computing 2-bits system: one from {00, 01, 10, 00}
Quantum computing 2-qubits system: One from the tensor
product of the two corresponding spaces. A canonical base for it is
{|00 , |01 , |10 , |11 }, where |xy = |x ⊗ |y .
5 / 27
9. A physics free introduction to quantum computing
Quantum vs. Classic, side by side
Classic computing Bit: 0, 1
Quantum computing Qubit: Normalised vector from C2 . We
choose the basis {|0 , |1 } where |0 = (0, 1)T and |1 = (1, 0)T
Classic computing 2-bits system: one from {00, 01, 10, 00}
Quantum computing 2-qubits system: One from the tensor
product of the two corresponding spaces. A canonical base for it is
{|00 , |01 , |10 , |11 }, where |xy = |x ⊗ |y .
Classic computing Reading data: No problem
Quantum computing Measuring the system: Measurement of
α|0 + β|1 returns a bit, and the system collapses to
|0 if 0 was measured, with probability p0 = |α|2
|1 if 1 was measured, with probability p1 = |β|2 .
5 / 27
10. A physics free introduction to quantum computing
Cont.
Classic computing computation: Logic gates {NOT, AND, etc...}
Quantum computing operations: Unitary matrices (U † U = I )
1
Example: H|0 = √ (|0 + |1 )
1 1 1 2
H=√
2 1 −1 1
H|1 = √ (|0 − |1 )
2
We can also combine them:
(H ⊗ I ) = Apply H to the first qubit, and identity to the second
6 / 27
11. A physics free introduction to quantum computing
Cont.
Classic computing computation: Logic gates {NOT, AND, etc...}
Quantum computing operations: Unitary matrices (U † U = I )
1
Example: H|0 = √ (|0 + |1 )
1 1 1 2
H=√
2 1 −1 1
H|1 = √ (|0 − |1 )
2
We can also combine them:
(H ⊗ I ) = Apply H to the first qubit, and identity to the second
No-cloning theorem “There is no universal cloning machine”
i.e. U s.t. U|φψ = |ψψ for an arbitrary qubit |ψ
6 / 27
12. A physics free introduction to quantum computing
Cont.
Classic computing computation: Logic gates {NOT, AND, etc...}
Quantum computing operations: Unitary matrices (U † U = I )
1
Example: H|0 = √ (|0 + |1 )
1 1 1 2
H=√
2 1 −1 1
H|1 = √ (|0 − |1 )
2
We can also combine them:
(H ⊗ I ) = Apply H to the first qubit, and identity to the second
No-cloning theorem “There is no universal cloning machine”
i.e. U s.t. U|φψ = |ψψ for an arbitrary qubit |ψ
1 1
Entanglement √2 |00 + √2 |11 is a 2-qubit system but cannot be
written as |ψ ⊗ |φ ...
Consequence: Measuring the first qubit... both collapse!
6 / 27
13. A physics free introduction to quantum computing
Example: Deutsh’s algorithm
Objective: To know if a 1-bit function f : B → B is constant or not.
Oracle: Uf |x, y = |x, y ⊕ f (x) where ⊕ is the addition modulo 2.
Uf |x, 0 = |x, f (x)
7 / 27
14. A physics free introduction to quantum computing
Example: Deutsh’s algorithm
Objective: To know if a 1-bit function f : B → B is constant or not.
Oracle: Uf |x, y = |x, y ⊕ f (x) where ⊕ is the addition modulo 2.
Uf |x, 0 = |x, f (x)
First attempt:
1 1
Uf (H ⊗ I )|00 = Uf √ (|00 + |10 ) = √ (|0, f (0) + |1, f (1) )
2 2
Superposition of results
Only one call to Uf ... but how to read the results?
7 / 27
15. A physics free introduction to quantum computing
Example: Deutsh’s algorithm
Objective: To know if a 1-bit function f : B → B is constant or not.
Oracle: Uf |x, y = |x, y ⊕ f (x) where ⊕ is the addition modulo 2.
Uf |x, 0 = |x, f (x)
First attempt:
1 1
Uf (H ⊗ I )|00 = Uf √ (|00 + |10 ) = √ (|0, f (0) + |1, f (1) )
2 2
Superposition of results
Only one call to Uf ... but how to read the results?
Deutsch’s algorithm:
±|0 |− if f (0) = f (1)
(H ⊗ I )Uf (H ⊗ H)|00 = · · · =
±|1 |− if f (0) = f (1)
1
with |− = √ (|0
2
− |1 )
Measuring the first qubit, we have the answer...
with only one call to the oracle
7 / 27
16. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
8 / 27
17. A brief and fast introduction to λ-calculus
History and intuitions
Introduced in 1936 by Alonzo Church (Alan Turing’s doctoral adviser)
Motivation: Investigating the foundations of mathematics
(in particular, the concept of recursion)
9 / 27
18. A brief and fast introduction to λ-calculus
History and intuitions
Introduced in 1936 by Alonzo Church (Alan Turing’s doctoral adviser)
Motivation: Investigating the foundations of mathematics
(in particular, the concept of recursion)
Why we still use it
Recursive functions are fundamental within computer science
It is the simplest model to study properties of computation
9 / 27
19. A brief and fast introduction to λ-calculus
History and intuitions
Introduced in 1936 by Alonzo Church (Alan Turing’s doctoral adviser)
Motivation: Investigating the foundations of mathematics
(in particular, the concept of recursion)
Why we still use it
Recursive functions are fundamental within computer science
It is the simplest model to study properties of computation
Two fundamental simplifications
Anonymity of functions:
Example: sqsum(x, y ) = x 2 + y 2
is written anonymously as (x, y ) → x 2 + y 2
No names needed
9 / 27
20. A brief and fast introduction to λ-calculus
History and intuitions
Introduced in 1936 by Alonzo Church (Alan Turing’s doctoral adviser)
Motivation: Investigating the foundations of mathematics
(in particular, the concept of recursion)
Why we still use it
Recursive functions are fundamental within computer science
It is the simplest model to study properties of computation
Two fundamental simplifications
Anonymity of functions:
Example: sqsum(x, y ) = x 2 + y 2
is written anonymously as (x, y ) → x 2 + y 2
No names needed
All the functions are in a single variable:
Example: (x, y ) → x 2 + y 2
is written as x → (y → x 2 + y 2 )
A 2-vars function is a 1-var function, returning
a 1-var function, which does the calculation
9 / 27
21. A brief and fast introduction to λ-calculus
Formalisation
Language of terms (a grammar)
M, N ::= x | λx.M | MN
A variable x ∈ Vars is a λ-term
If M is a term, and x is a variable, λx.M is a term (x → M)
If M and N are two terms, MN is a term (application)
These are the only possible terms.
10 / 27
22. A brief and fast introduction to λ-calculus
Formalisation
Language of terms (a grammar)
M, N ::= x | λx.M | MN
A variable x ∈ Vars is a λ-term
If M is a term, and x is a variable, λx.M is a term (x → M)
If M and N are two terms, MN is a term (application)
These are the only possible terms.
A rewrite rule (β-reduction)
(λx.M)N → M[x := N]
10 / 27
23. A brief and fast introduction to λ-calculus
Formalisation
Language of terms (a grammar)
M, N ::= x | λx.M | MN
A variable x ∈ Vars is a λ-term
If M is a term, and x is a variable, λx.M is a term (x → M)
If M and N are two terms, MN is a term (application)
These are the only possible terms.
A rewrite rule (β-reduction)
(λx.M)N → M[x := N]
Example: Let x 2 + 1 be a λ-term (with some encoding)
f (x) = x 2 + 1 is written λx.x 2 + 1
10 / 27
24. A brief and fast introduction to λ-calculus
Formalisation
Language of terms (a grammar)
M, N ::= x | λx.M | MN
A variable x ∈ Vars is a λ-term
If M is a term, and x is a variable, λx.M is a term (x → M)
If M and N are two terms, MN is a term (application)
These are the only possible terms.
A rewrite rule (β-reduction)
(λx.M)N → M[x := N]
Example: Let x 2 + 1 be a λ-term (with some encoding)
f (x) = x 2 + 1 is written λx.x 2 + 1
f (N) is written (λx.x 2 + 1)N which β-reduces to
(x 2 + 1)[x := N] = N2 + 1
10 / 27
25. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
11 / 27
26. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx)
11 / 27
27. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx) → xx[x := λx.xx]
11 / 27
28. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx) → xx[x := λx.xx] = (λx.xx)(λx.xx) = Ω
So Ω → Ω → Ω → ···
11 / 27
29. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx) → xx[x := λx.xx] = (λx.xx)(λx.xx) = Ω
So Ω → Ω → Ω → ···
Normalisation
M is in normal form, if it does not rewrite e.g. λx.x
11 / 27
30. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx) → xx[x := λx.xx] = (λx.xx)(λx.xx) = Ω
So Ω → Ω → Ω → ···
Normalisation
M is in normal form, if it does not rewrite e.g. λx.x
M is normalising if it can end e.g. (λx.λy .y )Ω
11 / 27
31. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx) → xx[x := λx.xx] = (λx.xx)(λx.xx) = Ω
So Ω → Ω → Ω → ···
Normalisation
M is in normal form, if it does not rewrite e.g. λx.x
M is normalising if it can end e.g. (λx.λy .y )Ω
M is strongly normalising if it always ends e.g. (λx.x)(λx.x)
11 / 27
32. A brief and fast introduction to λ-calculus
Normal form
Not every computation ends well...
Consider λx.xx
(the function that takes an argument, and applies it to itself)
Ω = (λx.xx)(λx.xx) → xx[x := λx.xx] = (λx.xx)(λx.xx) = Ω
So Ω → Ω → Ω → ···
Normalisation
M is in normal form, if it does not rewrite e.g. λx.x
M is normalising if it can end e.g. (λx.λy .y )Ω
M is strongly normalising if it always ends e.g. (λx.x)(λx.x)
How can we know if a λ-term is (strongly) normalising?
11 / 27
33. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
12 / 27
34. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
13 / 27
35. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
13 / 27
36. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
13 / 27
37. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
13 / 27
38. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax
Γ, x τ x : τ
13 / 27
39. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ
Γ, x τ
x :τ ⇒I
Γ λx.M : τ ⇒ σ
13 / 27
40. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ
x :τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
13 / 27
41. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ
x :τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
Example of type derivation
ax
xτ x : τ
13 / 27
42. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ
x :τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
Example of type derivation
ax
xτ x : τ
⇒I
λx.x : τ ⇒ τ
13 / 27
43. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ
x :τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
Example of type derivation
ax ax
x τ ⇒τ x : τ ⇒ τ xτ x : τ
⇒I ⇒I
λx.x : (τ ⇒ τ ) ⇒ (τ ⇒ τ ) λx.x : τ ⇒ τ
13 / 27
44. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ
x :τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
Example of type derivation
ax ax
x τ ⇒τ x : τ ⇒ τ xτ x : τ
⇒I ⇒I
λx.x : (τ ⇒ τ ) ⇒ (τ ⇒ τ ) λx.x : τ ⇒ τ
⇒E
(λx.x)(λx.x) : τ ⇒ τ
13 / 27
45. A brief and fast introduction to typed λ-calculus
Simply types
Static way of classify λ-terms (i.e. without reducing it)
Terms M, N ::= x | λx.M | MN
Types τ, σ ::= c | τ ⇒σ
c is a base type τ ⇒ σ is the functional type
τ τ
Context: set of typed variables Γ = x1 1 , . . . , xn n
Γ M:τ “M has type τ in context Γ”
Typing rules
ax Γ, x τ M : σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ
x :τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
Example of type derivation
ax ax
x τ ⇒τ x : τ ⇒ τ xτ x : τ
⇒I ⇒I
λx.x : (τ ⇒ τ ) ⇒ (τ ⇒ τ ) λx.x : τ ⇒ τ
⇒E
(λx.x)(λx.x) : τ ⇒ τ
Verification: (λx.x)(λx.x) rewrites to λx.x (of type τ ⇒ τ )
13 / 27
46. A brief and fast introduction to typed λ-calculus
Normalisation
Ω does not have a type in this theory
14 / 27
47. A brief and fast introduction to typed λ-calculus
Normalisation
Ω does not have a type in this theory
Moreover...
Theorem (Strong normalisation)
If M has a type, M is strongly normalising
14 / 27
48. A brief and fast introduction to typed λ-calculus
Normalisation
Ω does not have a type in this theory
Moreover...
Theorem (Strong normalisation)
If M has a type, M is strongly normalising
Slogan “Well-typed programs cannot go wrong” — [R. Milner’78]
14 / 27
49. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
15 / 27
50. How does it relates to intuitionistic logics?
A word on the Curry-Howard correspondence
Classical logic: a well-formed statement assumed true or false
16 / 27
51. How does it relates to intuitionistic logics?
A word on the Curry-Howard correspondence
Classical logic: a well-formed statement assumed true or false
Intuitionistic logic: a statement is true (false) if there is a constructive
proof that it is true (false)
Law of excluded middle is not an axiom!
(and cannot be proved neither) in intuitionistic logic
16 / 27
52. How does it relates to intuitionistic logics?
A word on the Curry-Howard correspondence
Classical logic: a well-formed statement assumed true or false
Intuitionistic logic: a statement is true (false) if there is a constructive
proof that it is true (false)
Law of excluded middle is not an axiom!
(and cannot be proved neither) in intuitionistic logic
Minimal intuitionistic logic
ax Γ, τ σ Γ τ ⇒σ Γ τ
Γ, τ τ ⇒I ⇒E
Γ τ ⇒σ Γ σ
16 / 27
53. How does it relates to intuitionistic logics?
A word on the Curry-Howard correspondence
Classical logic: a well-formed statement assumed true or false
Intuitionistic logic: a statement is true (false) if there is a constructive
proof that it is true (false)
Law of excluded middle is not an axiom!
(and cannot be proved neither) in intuitionistic logic
Minimal intuitionistic logic
ax Γ, τ σ Γ τ ⇒σ Γ τ
Γ, τ τ ⇒I ⇒E
Γ τ ⇒σ Γ σ
Typing rules
ax Γ, x τ M:σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ x : τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
16 / 27
54. How does it relates to intuitionistic logics?
A word on the Curry-Howard correspondence
Classical logic: a well-formed statement assumed true or false
Intuitionistic logic: a statement is true (false) if there is a constructive
proof that it is true (false)
Law of excluded middle is not an axiom!
(and cannot be proved neither) in intuitionistic logic
Minimal intuitionistic logic
ax Γ, τ σ Γ τ ⇒σ Γ τ
Γ, τ τ ⇒I ⇒E
Γ τ ⇒σ Γ σ
Typing rules
ax Γ, x τ M:σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ x : τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
The λ-term is the proof of the statement
Haskell Curry and William Howard,
Proofs... are programs! between 1934 and 1969
16 / 27
55. How does it relates to intuitionistic logics?
A word on the Curry-Howard correspondence
Classical logic: a well-formed statement assumed true or false
Intuitionistic logic: a statement is true (false) if there is a constructive
proof that it is true (false)
Law of excluded middle is not an axiom!
(and cannot be proved neither) in intuitionistic logic
Minimal intuitionistic logic
ax Γ, τ σ Γ τ ⇒σ Γ τ
Γ, τ τ ⇒I ⇒E
Γ τ ⇒σ Γ σ
Typing rules
ax Γ, x τ M:σ Γ M:τ ⇒σ Γ N:τ
Γ, x τ x : τ ⇒I ⇒E
Γ λx.M : τ ⇒ σ Γ MN : σ
The λ-term is the proof of the statement
Haskell Curry and William Howard,
Proofs... are programs! between 1934 and 1969
More complex logics corresponds to more complex typing systems
16 / 27
56. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
17 / 27
57. Untyped algebraic extensions
Two origins:
Vaux’09 (from Linear Logic)
Arrighi,Dowek’08 (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
18 / 27
58. Untyped algebraic extensions
Two origins:
Vaux’09 (from Linear Logic)
Arrighi,Dowek’08 (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
M, N ::= x | λx.M | MN | M + N | α.M | 0 α ∈ (S, +, ×), a ring.
18 / 27
59. Untyped algebraic extensions
Two origins:
Vaux’09 (from Linear Logic)
Arrighi,Dowek’08 (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
M, N ::= x | λx.M | MN | M + N | α.M | 0 α ∈ (S, +, ×), a ring.
β-reduction: (λx.M)N → M[x := N]
“Algebraic” reductions:
α.M + β.N → (α + β).M,
α.β.M → (α × β).M,
M(N1 + N2 ) → MN1 + MN2 ,
(M1 + M2 )N → M1 N + M2 N,
...
(oriented version of the axioms of
vectorial spaces)
18 / 27
60. Untyped algebraic extensions
Two origins:
Vaux’09 (from Linear Logic)
Arrighi,Dowek’08 (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
M, N ::= x | λx.M | MN | M + N | α.M | 0 α ∈ (S, +, ×), a ring.
β-reduction: (λx.M)N → M[x := N]
“Algebraic” reductions:
α.M + β.N → (α + β).M, Vectorial space of values
α.β.M → (α × β).M, B = { vars. and abs. }
M(N1 + N2 ) → MN1 + MN2 ,
(M1 + M2 )N → M1 N + M2 N, Space of values ::= Span(B)
...
(oriented version of the axioms of
vectorial spaces)
Value == result of the computation, if it ends
18 / 27
61. Example: simple encoding of quantum computing
|0 = λx.λy .x
Two base vectors:
|1 = λx.λy .y
19 / 27
62. Example: simple encoding of quantum computing
|0 = λx.λy .x
Two base vectors:
|1 = λx.λy .y
|+
1
H|0 → √ (|0 + |1 )
We want a linear map H s.t. 2
1
H|1 → √ (|0 − |1 )
2
|−
19 / 27
63. Example: simple encoding of quantum computing
|0 = λx.λy .x
Two base vectors:
|1 = λx.λy .y
|+
1
H|0 → √ (|0 + |1 )
We want a linear map H s.t. 2
1
H|1 → √ (|0 − |1 )
2
|−
H := λx. {x [|+ ] [|− ]}
19 / 27
66. My thesis: On vectorial typing [Díaz-Caro’11]
In one slide
A type system capturing the “vectorial” structure of terms
. . . to check for properties of probabilistic processes
. . . to check for properties of quantum processes
. . . or whatever application needing the structure of the vector
20 / 27
67. My thesis: On vectorial typing [Díaz-Caro’11]
In one slide
A type system capturing the “vectorial” structure of terms
. . . to check for properties of probabilistic processes
. . . to check for properties of quantum processes
. . . or whatever application needing the structure of the vector
Most important property of Vectorial
Theorem
If Γ M : i αi .τi then M ↓= i αi .Bi where Γ Bi : τi
If M ↓= i αi .Bi then Γ M : i αi .τi + 0.σ, where Γ Bi : τi
20 / 27
68. My thesis: On vectorial typing [Díaz-Caro’11]
In one slide
A type system capturing the “vectorial” structure of terms
. . . to check for properties of probabilistic processes
. . . to check for properties of quantum processes
. . . or whatever application needing the structure of the vector
Most important property of Vectorial
Theorem
If Γ M : i αi .τi then M ↓= i αi .Bi where Γ Bi : τi
If M ↓= i αi .Bi then Γ M : i αi .τi + 0.σ, where Γ Bi : τi
Long-term goal: a Curry-Howard approach to define a quantum
logic from a quantum programming language
20 / 27
70. Simplifying the problem: non-determinism
M, N ::= x | λx.M | MN | M + N
M +N →M M +N →N
Restricting to Linear Logic: Highly informative quantitative version
of strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
21 / 27
71. Simplifying the problem: non-determinism
M, N ::= x | λx.M | MN | M + N
M +N →M M +N →N
Restricting to Linear Logic: Highly informative quantitative version
of strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
Full calculus: 2nd order propositional logic [Díaz-Caro,Petit’12]
21 / 27
72. Simplifying the problem: non-determinism
M, N ::= x | λx.M | MN | M + N
M +N →M M +N →N
Restricting to Linear Logic: Highly informative quantitative version
of strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
Full calculus: 2nd order propositional logic [Díaz-Caro,Petit’12]
Naturally arise by considering some isomorphisms between
propositions [Díaz-Caro,Dowek’12]
e.g. τ ∧σ ≡σ∧τ
τ ⇒ (σ1 ∧ σ2 ) ≡ (τ ⇒ σ1 ) ∧ (τ ⇒ σ2 )
21 / 27
73. Outline
A brief and fast introduction to quantum computing
A brief and fast introduction to λ-calculus
A brief and fast introduction to typed λ-calculus
How does it relates to intuitionistic logic?
(a word on the Curry-Howard correspondence)
What I am doing
Algebraic calculi and vectorial typing
Non-determinism, a simpler problem
Work-in-progress
From non-determinism to probabilities
22 / 27
74. From non-determinism to probabilities
Work-in-progress (in collaboration with G. Dowek)
Premise: The algebraic calculus is too complex
Do we really need it?
23 / 27
75. From non-determinism to probabilities
Work-in-progress (in collaboration with G. Dowek)
Premise: The algebraic calculus is too complex
Do we really need it?
M + (N + P) + P
N +P
Ð 09
M N P
23 / 27
76. From non-determinism to probabilities
Work-in-progress (in collaboration with G. Dowek)
Premise: The algebraic calculus is too complex
Do we really need it?
M + (N + P) + P M + (N + P) + P
1 1 1
3 3 3
N +P N +P
→ 1
1
2
2
Ð 09 Ð 09
M N P M N P
1 1 1
∼ M+ N+ P
3 6 2
23 / 27
77. From non-determinism to probabilities
Generalising for any non-deterministic abstract rewrite system
Definition (Degree)
ρ(M) = {N | M → N}
Definition (Oracle)
f (M) = N if M → N (if ρ(M) = n there are n oracles)
Ω = set of all the oracles
24 / 27
78. From non-determinism to probabilities
Generalising for any non-deterministic abstract rewrite system
Definition (Degree)
ρ(M) = {N | M → N}
Definition (Oracle)
f (M) = N if M → N (if ρ(M) = n there are n oracles)
Ω = set of all the oracles
E.g. Rewrite system
Ω = {f , g , h, i}, with
M
f (M) = N1 g (M) = N1
Ó ' f (N2 ) = P1 g (N2 ) = P2
N1 N2
h(M) = N2 i(M) = N2
Ô h(N2 ) = P1 i(N2 ) = P2
P1 P2
24 / 27
79. From non-determinism to probabilities
Generalising for any non-deterministic abstract rewrite system (cont.)
Definition (Box)
B ⊆ Ω of the form
B = {f | f (M1 ) = N1 , . . . , f (Mn ) = Nn }
Definition (Probability function)
Let B = {f | f (M1 ) = N1 , . . . , f (Mn ) = Nn }
1
m(B) =
ρ(M1 ) × · · · × ρ(Mn )
P(S) = inf{ m(B) | C is a countable family of boxes s.t. S ⊆ B}
B∈C B∈C
A = {A ⊆ Ω | A is Lebesgue measurable}
25 / 27
80. From non-determinism to probabilities
Generalising for any non-deterministic abstract rewrite system (cont.)
Theorem
(Ω, A, P) is a probability space
Ω is the set of all possible oracles
A is the set of events (Lebesgue measurable subsets of Ω)
P is the probability function
Proof.
We show that it satisfies the Kolmogorov axioms.
26 / 27
81. Summarising
The long-term aim is to define a quantum computational logic
27 / 27
82. Summarising
The long-term aim is to define a quantum computational logic
We have
A λ-calculus extension able to express quantum programs
A complex type system characterising the structure of the vectors
A strong relation between non-determinism and second order
propositional logic
A restricted non-deterministic model related to linear logic
An easy way to move from non-determinism to probabilities, without
changing the model
27 / 27
83. Summarising
The long-term aim is to define a quantum computational logic
We have
A λ-calculus extension able to express quantum programs
A complex type system characterising the structure of the vectors
A strong relation between non-determinism and second order
propositional logic
A restricted non-deterministic model related to linear logic
An easy way to move from non-determinism to probabilities, without
changing the model
We need
To move from probabilities to quantum, without loosing the
connections to logic
No-cloning (partially solved [Arrighi,Dowek’08])
Measurement: we need to check for orthogonality
α.M + β.N → M with prob. |α|2 , if M ⊥ N
27 / 27