vectorial types, non-determinism and probabilistic systems: towards a computational quantum logic
DESCRIPTION
TRANSCRIPT
Vectorial types, non-determinism andprobabilistic systems
Towards a computational quantum logic
Alejandro Díaz-CaroUniversité Paris-Ouest NanterreINRIA Paris – Rocquencourt
Quantum Computing at NancyMarch 21, 2013
A proof-as-programs approach to quantum logicMotivation
Curry-Howard correspondenceIntuitionistic logics ⇐⇒ Typed λ-calculus
hypotheses free variablesimplication elimination (modus ponens) application
implication introduction abstraction
A proof is a program(the formula it proves is a type for the program)
Goal: To find a quantum Curry-Howard correspondence
Between what?I A quantum λ-calculus (quantum control/quantum data)I Any logic, even if we need to define it!
Computational quantum logicWe want a logic such that its proofs are quantum programs
2 / 11
A proof-as-programs approach to quantum logicMotivation
Curry-Howard correspondenceIntuitionistic logics ⇐⇒ Typed λ-calculus
hypotheses free variablesimplication elimination (modus ponens) application
implication introduction abstraction
A proof is a program(the formula it proves is a type for the program)
Goal: To find a quantum Curry-Howard correspondence
Between what?I A quantum λ-calculus (quantum control/quantum data)I Any logic, even if we need to define it!
Computational quantum logicWe want a logic such that its proofs are quantum programs
2 / 11
A proof-as-programs approach to quantum logicMotivation
Curry-Howard correspondenceIntuitionistic logics ⇐⇒ Typed λ-calculus
hypotheses free variablesimplication elimination (modus ponens) application
implication introduction abstraction
A proof is a program(the formula it proves is a type for the program)
Goal: To find a quantum Curry-Howard correspondence
Between what?I A quantum λ-calculus (quantum control/quantum data)I Any logic, even if we need to define it!
Computational quantum logicWe want a logic such that its proofs are quantum programs
2 / 11
Untyped algebraic extensions to λ-calculusTwo origins:
I Alg [Vaux’09] (from Linear Logic)I Lineal [Arrighi,Dowek’08] (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
t, r ::= v | tr | t + r | α.t | 0 α ∈ (S,+,×), a ringv ::= x | λx .t
β-reduction: (λx .t)v→ t[x := v]
“Algebraic” reductions:α.t + β.t → (α + β).t,
α.β.t → (α× β).t,t(r1 + r2) → tr1 + tr2,(t1 + t2)r → t1r + t2r,
. . .(oriented version of the axioms of
vectorial spaces)
Vectorial space of values
B = vars. and abs.
Space of values ::= Span(B)
Value == result of the computation, if it ends
3 / 11
Untyped algebraic extensions to λ-calculusTwo origins:
I Alg [Vaux’09] (from Linear Logic)I Lineal [Arrighi,Dowek’08] (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
t, r ::= v | tr | t + r | α.t | 0 α ∈ (S,+,×), a ringv ::= x | λx .t
β-reduction: (λx .t)v→ t[x := v]
“Algebraic” reductions:α.t + β.t → (α + β).t,
α.β.t → (α× β).t,t(r1 + r2) → tr1 + tr2,(t1 + t2)r → t1r + t2r,
. . .(oriented version of the axioms of
vectorial spaces)
Vectorial space of values
B = vars. and abs.
Space of values ::= Span(B)
Value == result of the computation, if it ends
3 / 11
Untyped algebraic extensions to λ-calculusTwo origins:
I Alg [Vaux’09] (from Linear Logic)I Lineal [Arrighi,Dowek’08] (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
t, r ::= v | tr | t + r | α.t | 0 α ∈ (S,+,×), a ringv ::= x | λx .t
β-reduction: (λx .t)v→ t[x := v]
“Algebraic” reductions:α.t + β.t → (α + β).t,
α.β.t → (α× β).t,t(r1 + r2) → tr1 + tr2,(t1 + t2)r → t1r + t2r,
. . .(oriented version of the axioms of
vectorial spaces)
Vectorial space of values
B = vars. and abs.
Space of values ::= Span(B)
Value == result of the computation, if it ends
3 / 11
Untyped algebraic extensions to λ-calculusTwo origins:
I Alg [Vaux’09] (from Linear Logic)I Lineal [Arrighi,Dowek’08] (for Quantum computing)
Equivalent formalisms [Díaz-Caro,Perdrix,Tasson,Valiron’10]
t, r ::= v | tr | t + r | α.t | 0 α ∈ (S,+,×), a ringv ::= x | λx .t
β-reduction: (λx .t)v→ t[x := v]
“Algebraic” reductions:α.t + β.t → (α + β).t,
α.β.t → (α× β).t,t(r1 + r2) → tr1 + tr2,(t1 + t2)r → t1r + t2r,
. . .(oriented version of the axioms of
vectorial spaces)
Vectorial space of values
B = vars. and abs.
Space of values ::= Span(B)
Value == result of the computation, if it ends3 / 11
Example: simple encoding of quantum computing[Arrighi,Dowek’08]
Two base vectors: |0〉 = λx .λy .x|1〉 = λx .λy .y
We want a linear map H s.t.H|0〉 →
|+〉︷ ︸︸ ︷1√2
(|0〉+ |1〉)
H|1〉 → 1√2
(|0〉 − |1〉)︸ ︷︷ ︸|−〉
H := λx . x [|+〉] [|−〉]
H|+〉 = H(1√2
(|0〉+ |1〉)) → 1√2
(H|0〉+ H|1〉) → 1√2
(|+〉+ |−〉)
=1√2
(1√2
(|0〉+ |1〉) +1√2
(|0〉 − |1〉))→ 1√
2(√2|0〉) → |0〉
4 / 11
Example: simple encoding of quantum computing[Arrighi,Dowek’08]
Two base vectors: |0〉 = λx .λy .x|1〉 = λx .λy .y
We want a linear map H s.t.H|0〉 →
|+〉︷ ︸︸ ︷1√2
(|0〉+ |1〉)
H|1〉 → 1√2
(|0〉 − |1〉)︸ ︷︷ ︸|−〉
H := λx . x [|+〉] [|−〉]
H|+〉 = H(1√2
(|0〉+ |1〉)) → 1√2
(H|0〉+ H|1〉) → 1√2
(|+〉+ |−〉)
=1√2
(1√2
(|0〉+ |1〉) +1√2
(|0〉 − |1〉))→ 1√
2(√2|0〉) → |0〉
4 / 11
Example: simple encoding of quantum computing[Arrighi,Dowek’08]
Two base vectors: |0〉 = λx .λy .x|1〉 = λx .λy .y
We want a linear map H s.t.H|0〉 →
|+〉︷ ︸︸ ︷1√2
(|0〉+ |1〉)
H|1〉 → 1√2
(|0〉 − |1〉)︸ ︷︷ ︸|−〉
H := λx . x [|+〉] [|−〉]
H|+〉 = H(1√2
(|0〉+ |1〉)) → 1√2
(H|0〉+ H|1〉) → 1√2
(|+〉+ |−〉)
=1√2
(1√2
(|0〉+ |1〉) +1√2
(|0〉 − |1〉))→ 1√
2(√2|0〉) → |0〉
4 / 11
Example: simple encoding of quantum computing[Arrighi,Dowek’08]
Two base vectors: |0〉 = λx .λy .x|1〉 = λx .λy .y
We want a linear map H s.t.H|0〉 →
|+〉︷ ︸︸ ︷1√2
(|0〉+ |1〉)
H|1〉 → 1√2
(|0〉 − |1〉)︸ ︷︷ ︸|−〉
H := λx . x [|+〉] [|−〉]
H|+〉 = H(1√2
(|0〉+ |1〉)) → 1√2
(H|0〉+ H|1〉) → 1√2
(|+〉+ |−〉)
=1√2
(1√2
(|0〉+ |1〉) +1√2
(|0〉 − |1〉))→ 1√
2(√2|0〉) → |0〉
4 / 11
Typed Lineal : λvec
[Arrighi,Díaz-Caro,Valiron’12]
T ,R ::= U | X | α.T | T + RU ::= X | U → T | ∀X.U | ∀X.U
T + R ≡ R + TT + (R + S) ≡ (T + R) + S
1.T ≡ Tα.(β.T ) ≡ (α× β).T
α.T + α.R ≡ α.(T + R)α.T + β.T ≡ (α + β).T
Most important property of λvec
Γ ` t :∑
i αi .Ti ⇒ t→∗∑
i αi .rit→∗
∑i αi .ri ⇒ Γ ` t :
∑i αi .Ti + 0.R
where Γ ` ri : Ti
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
Still far from the main goal: (for a quantum Curry-Howard correspondence)I λvec−→ “vectorial” programs (not only quantum)I The logic behind −→ not easy to define
5 / 11
Typed Lineal : λvec
[Arrighi,Díaz-Caro,Valiron’12]
T ,R ::= U | X | α.T | T + RU ::= X | U → T | ∀X.U | ∀X.U
T + R ≡ R + TT + (R + S) ≡ (T + R) + S
1.T ≡ Tα.(β.T ) ≡ (α× β).T
α.T + α.R ≡ α.(T + R)α.T + β.T ≡ (α + β).T
Most important property of λvec
Γ ` t :∑
i αi .Ti ⇒ t→∗∑
i αi .rit→∗
∑i αi .ri ⇒ Γ ` t :
∑i αi .Ti + 0.R
where Γ ` ri : Ti
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
Still far from the main goal: (for a quantum Curry-Howard correspondence)I λvec−→ “vectorial” programs (not only quantum)I The logic behind −→ not easy to define
5 / 11
Typed Lineal : λvec
[Arrighi,Díaz-Caro,Valiron’12]
T ,R ::= U | X | α.T | T + RU ::= X | U → T | ∀X.U | ∀X.U
T + R ≡ R + TT + (R + S) ≡ (T + R) + S
1.T ≡ Tα.(β.T ) ≡ (α× β).T
α.T + α.R ≡ α.(T + R)α.T + β.T ≡ (α + β).T
Most important property of λvec
Γ ` t :∑
i αi .Ti ⇒ t→∗∑
i αi .rit→∗
∑i αi .ri ⇒ Γ ` t :
∑i αi .Ti + 0.R
where Γ ` ri : Ti
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
Still far from the main goal: (for a quantum Curry-Howard correspondence)I λvec−→ “vectorial” programs (not only quantum)I The logic behind −→ not easy to define
5 / 11
Typed Lineal : λvec
[Arrighi,Díaz-Caro,Valiron’12]
T ,R ::= U | X | α.T | T + RU ::= X | U → T | ∀X.U | ∀X.U
T + R ≡ R + TT + (R + S) ≡ (T + R) + S
1.T ≡ Tα.(β.T ) ≡ (α× β).T
α.T + α.R ≡ α.(T + R)α.T + β.T ≡ (α + β).T
Most important property of λvec
Γ ` t :∑
i αi .Ti ⇒ t→∗∑
i αi .rit→∗
∑i αi .ri ⇒ Γ ` t :
∑i αi .Ti + 0.R
where Γ ` ri : Ti
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
Still far from the main goal: (for a quantum Curry-Howard correspondence)I λvec−→ “vectorial” programs (not only quantum)
I The logic behind −→ not easy to define
5 / 11
Typed Lineal : λvec
[Arrighi,Díaz-Caro,Valiron’12]
T ,R ::= U | X | α.T | T + RU ::= X | U → T | ∀X.U | ∀X.U
T + R ≡ R + TT + (R + S) ≡ (T + R) + S
1.T ≡ Tα.(β.T ) ≡ (α× β).T
α.T + α.R ≡ α.(T + R)α.T + β.T ≡ (α + β).T
Most important property of λvec
Γ ` t :∑
i αi .Ti ⇒ t→∗∑
i αi .rit→∗
∑i αi .ri ⇒ Γ ` t :
∑i αi .Ti + 0.R
where Γ ` ri : Ti
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
Still far from the main goal: (for a quantum Curry-Howard correspondence)I λvec−→ “vectorial” programs (not only quantum)I The logic behind −→ not easy to define
5 / 11
Non-determinismSimplifying Lineal
t, r ::= x | λx .t | tr | t + r
t + r→ t t + r→ r
I Restricting to Linear Logic: Highly informative quantitative versionof strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
I However this is a restriction
I Full calculus: 2nd order intuitionistic logic [Díaz-Caro,Petit’12]
I 2nd order intuitionistic logic ↔ A non linear fragment of Linear Logic
I First logic related to (a fragment of) Lineal
6 / 11
Non-determinismSimplifying Lineal
t, r ::= x | λx .t | tr | t + r
t + r→ t t + r→ r
I Restricting to Linear Logic: Highly informative quantitative versionof strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
I However this is a restriction
I Full calculus: 2nd order intuitionistic logic [Díaz-Caro,Petit’12]
I 2nd order intuitionistic logic ↔ A non linear fragment of Linear Logic
I First logic related to (a fragment of) Lineal
6 / 11
Non-determinismSimplifying Lineal
t, r ::= x | λx .t | tr | t + r
t + r→ t t + r→ r
I Restricting to Linear Logic: Highly informative quantitative versionof strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
I However this is a restriction
I Full calculus: 2nd order intuitionistic logic [Díaz-Caro,Petit’12]
I 2nd order intuitionistic logic ↔ A non linear fragment of Linear Logic
I First logic related to (a fragment of) Lineal
6 / 11
Non-determinismSimplifying Lineal
t, r ::= x | λx .t | tr | t + r
t + r→ t t + r→ r
I Restricting to Linear Logic: Highly informative quantitative versionof strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
I However this is a restriction
I Full calculus: 2nd order intuitionistic logic [Díaz-Caro,Petit’12]
I 2nd order intuitionistic logic ↔ A non linear fragment of Linear Logic
I First logic related to (a fragment of) Lineal
6 / 11
Non-determinismSimplifying Lineal
t, r ::= x | λx .t | tr | t + r
t + r→ t t + r→ r
I Restricting to Linear Logic: Highly informative quantitative versionof strong normalisation [Díaz-Caro,Manzonetto,Pagani’13]
I However this is a restriction
I Full calculus: 2nd order intuitionistic logic [Díaz-Caro,Petit’12]
I 2nd order intuitionistic logic ↔ A non linear fragment of Linear Logic
I First logic related to (a fragment of) Lineal
6 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinism
π(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + t
π1(t + r) does not make any sense in this settingInstead: πA(t + r) (when t : A or r : A)
If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)
If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
Non-determinism[Díaz-Caro,Dowek’12–13]
t + r→ t and t + r→ r Uncontrolled non-determinismπ(t + r)→ t and π(t + r)→ r A projector controlling it
Non-determinism naturally arise by considering some isomorphismsbetween propositions to be equivalences
A ∧ B ≡ B ∧ A We want t + r = r + tπ1(t + r) does not make any sense in this setting
Instead: πA(t + r) (when t : A or r : A)If both have type A, then this is a non-deterministic projector
λ+I A proof system where equivalent propositions get the same proofs
A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ CA⇒ (B ∧ C) ≡ (A⇒ B) ∧ (A⇒ C)
I Curry-Howard correspondence with 2nd order intuitionistic logicI Non-deterministic projector
From non-determinism to probabilities?
7 / 11
From non-determinism to probabilitiesWork-in-progress (in collaboration with G. Dowek)
Premise: The algebraic calculi are too complexDo we really need them?
πA(t + πA(r + s) + s)
πA(r + s)
''t r s
7→
πA(t + πA(r + s) + s)
13
13
13
πA(r + s)12
12
''t r s
∼ 13t +
16r +
12s
8 / 11
From non-determinism to probabilitiesWork-in-progress (in collaboration with G. Dowek)
Premise: The algebraic calculi are too complexDo we really need them?
πA(t + πA(r + s) + s)
πA(r + s)
''t r s
7→
πA(t + πA(r + s) + s)
13
13
13
πA(r + s)12
12
''t r s
∼ 13t +
16r +
12s
8 / 11
From non-determinism to probabilitiesWork-in-progress (in collaboration with G. Dowek)
Premise: The algebraic calculi are too complexDo we really need them?
πA(t + πA(r + s) + s)
πA(r + s)
''t r s
7→
πA(t + πA(r + s) + s)
13
13
13
πA(r + s)12
12
''t r s
∼ 13t +
16r +
12s
8 / 11
From non-determinism to probabilitiesGeneralising for any non-deterministic abstract rewrite system
Definition (Oracle)f (a) = b if a→ b
Ω = set of all the oracles
(if a→ bi with i = 1, . . . , nthere are n oracles
)
E.g. Rewrite system
a
b1 b2
c1 c2
Ω = f , g , h, i, with
f (a) = b1 g(a) = b1f (b2) = c1 g(b2) = c2
h(a) = b2 i(a) = b2h(b2) = c1 i(b2) = c2
9 / 11
From non-determinism to probabilitiesGeneralising for any non-deterministic abstract rewrite system
Definition (Oracle)f (a) = b if a→ b
Ω = set of all the oracles
(if a→ bi with i = 1, . . . , nthere are n oracles
)
E.g. Rewrite system
a
b1 b2
c1 c2
Ω = f , g , h, i, with
f (a) = b1 g(a) = b1f (b2) = c1 g(b2) = c2
h(a) = b2 i(a) = b2h(b2) = c1 i(b2) = c2
9 / 11
From non-determinism to probabilitiesTheorem(Ω,A,P) is a probability space
I Ω is the set of all possible oraclesI A is the set of events (Lebesgue measurable subsets of Ω)I P is the probability function (a Lebesgue measure over A)
Work-in-progress:Translation to/from LinealQ from/to λp
+(1)
Theorem (From LinealQ to λp+)
t→∗∑
i pi .ri ⇒ JtK→∗ JriK with probability pip1+···+pn
Theorem (From λp+ to LinealQ)
t→∗ ri with probability pi , for i = 1, . . . , n ⇒ LtM→∗∑
i pi .Lri M
(1)LinealQ : Lineal in call-by-name, with scalars taken from Q∗
λp+ : λ+ with probability rewriting
10 / 11
From non-determinism to probabilitiesTheorem(Ω,A,P) is a probability space
I Ω is the set of all possible oraclesI A is the set of events (Lebesgue measurable subsets of Ω)I P is the probability function (a Lebesgue measure over A)
Work-in-progress:Translation to/from LinealQ from/to λp
+(1)
Theorem (From LinealQ to λp+)
t→∗∑
i pi .ri ⇒ JtK→∗ JriK with probability pip1+···+pn
Theorem (From λp+ to LinealQ)
t→∗ ri with probability pi , for i = 1, . . . , n ⇒ LtM→∗∑
i pi .Lri M
(1)LinealQ : Lineal in call-by-name, with scalars taken from Q∗
λp+ : λ+ with probability rewriting
10 / 11
From non-determinism to probabilitiesTheorem(Ω,A,P) is a probability space
I Ω is the set of all possible oraclesI A is the set of events (Lebesgue measurable subsets of Ω)I P is the probability function (a Lebesgue measure over A)
Work-in-progress:Translation to/from LinealQ from/to λp
+(1)
Theorem (From LinealQ to λp+)
t→∗∑
i pi .ri ⇒ JtK→∗ JriK with probability pip1+···+pn
Theorem (From λp+ to LinealQ)
t→∗ ri with probability pi , for i = 1, . . . , n ⇒ LtM→∗∑
i pi .Lri M
(1)LinealQ : Lineal in call-by-name, with scalars taken from Q∗
λp+ : λ+ with probability rewriting
10 / 11
Summarising
The long-term aim is to define a computational quantum logic
We haveI A λ-calculus extension able to express quantum programsI A complex type system characterising the structure of the vectorsI A linear non-deterministic model related to linear logicI A Curry-Howard correspondence between λ+ and 2nd order
intuitionistic logicI An easy way to move from non-determinism to probabilities, without
changing the model
We needI To move from probabilities to quantum, without loosing the
connections to logicI No-cloning (Move back to call-by-value [Arrighi,Dowek’08])I Measurement: we need to check for orthogonality
α.M + β.N → M with prob. |α|2, if M ⊥ N
11 / 11
Summarising
The long-term aim is to define a computational quantum logic
We haveI A λ-calculus extension able to express quantum programsI A complex type system characterising the structure of the vectorsI A linear non-deterministic model related to linear logicI A Curry-Howard correspondence between λ+ and 2nd order
intuitionistic logicI An easy way to move from non-determinism to probabilities, without
changing the model
We needI To move from probabilities to quantum, without loosing the
connections to logicI No-cloning (Move back to call-by-value [Arrighi,Dowek’08])I Measurement: we need to check for orthogonality
α.M + β.N → M with prob. |α|2, if M ⊥ N
11 / 11
Summarising
The long-term aim is to define a computational quantum logic
We haveI A λ-calculus extension able to express quantum programsI A complex type system characterising the structure of the vectorsI A linear non-deterministic model related to linear logicI A Curry-Howard correspondence between λ+ and 2nd order
intuitionistic logicI An easy way to move from non-determinism to probabilities, without
changing the model
We needI To move from probabilities to quantum, without loosing the
connections to logicI No-cloning (Move back to call-by-value [Arrighi,Dowek’08])I Measurement: we need to check for orthogonality
α.M + β.N → M with prob. |α|2, if M ⊥ N
11 / 11