vectorial types, non-determinism and probabilistic systems: towards a computational quantum logic

43
Vectorial types, non-determinism and probabilistic systems Towards a computational quantum logic Alejandro Díaz-Caro Université Paris-Ouest Nanterre INRIA Paris – Rocquencourt Quantum Computing at Nancy March 21, 2013

Upload: alejandro-diaz-caro

Post on 18-Dec-2014

1.303 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 2: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 3: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 4: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 5: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 6: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 7: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 8: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 9: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 10: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 11: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 12: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 13: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 14: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 15: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 16: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 17: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 18: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 19: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 20: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 21: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 22: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 23: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 24: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 25: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 26: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 27: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 28: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 29: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 30: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 31: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 32: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 33: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 34: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 35: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 36: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 37: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 38: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 39: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 40: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 41: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 42: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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

Page 43: Vectorial types, non-determinism and probabilistic systems: Towards a computational quantum logic

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