SlideShare a Scribd company logo
Towards a quantum λ-calculus
with quantum control
arXiv:1601.04294
Alejandro Díaz-Caro
UNIVERSIDAD NACIONAL DE QUILMES
Joint work with
Gilles Dowek
Inria & ENS-Cachan
V Congreso Latinoamericano de Matemáticos
Logic and Computability Session
Barranquilla, Colombia, July 14, 2016
Goal
We want a pure functional
extension of lambda calculusi.e. we do not want clasical control / quantum data
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 2 / 26
Overview
Some quantum properties (with dead and alive cats)
Projective measurement
Destructive interference
No-cloning
Entanglement and separability
Expressing those properties in the lambda-calculus
Superpositions, no-cloning and measurement
Examples
Deutsch algorithm
Teleportation algorithm
Projective measurement
α + β
Projective measurement
α + β
|α|2
|β| 2
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 4 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
+
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α + β
α|2
+ |β
2
= 1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
1
2
1
2
+
1
2
+
1
2
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
1
2
1
2
+
1
2
+
1
2
α + β
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
1
2
1
2
+
1
2
+
1
2
3
4
+
1
4
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
1
2
1
2
+
1
2
+
1
2
3
4
+
1
4
5
8
+
3
8
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
1
2
1
2
+
1
2
+
1
2
3
4
+
1
4
5
8
+
3
8
1
√
2
1
√
2
+
1
√
2
+
1
√
2
1
√
2
−
1
√
2
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
Probabilistic vs. Quantum
Destructive interference
Probabilistic
a + b
(a + b = 1)
Quantum
α − β
α|2
+ |−β
2
= 1
1
2
1
2
+
1
2
+
1
2
3
4
+
1
4
5
8
+
3
8
1
√
2
1
√
2
+
1
√
2
+
1
√
2
1
√
2
−
1
√
2
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
No-cloning
Superpositions vs. basis states
There is no universal cloning machine
for quantum states
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 6 / 26
No-cloning
Superpositions vs. basis states
There is no universal cloning machine
for quantum states
α + β
No-cloning
Superpositions vs. basis states
There is no universal cloning machine
for quantum states
α + β
α + β
α ⊗ + β ⊗
=
α + β ⊗ α + β
α2
⊗ +αβ ⊗ +βα ⊗ +β2
⊗
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 6 / 26
Entanglement and separability
Example 1
α ⊗ +β ⊗
=
α + β
Superposed state
⊗
Basis state
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 7 / 26
Entanglement and separability
Example 1
α ⊗ +β ⊗
=
α + β
Superposed state
⊗
Basis stateExample 2
α1α2 ⊗ +α1β1 ⊗ +β2α2 ⊗ +β1β2 ⊗
α1 + β1
Superposed state
⊗ α2 + β2
Superposed state
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 7 / 26
Entanglement and separability
Example 1
α ⊗ +β ⊗
=
α + β
Superposed state
⊗
Basis stateExample 2
α1α2 ⊗ +α1β1 ⊗ +β2α2 ⊗ +β1β2 ⊗
α1 + β1
Superposed state
⊗ α2 + β2
Superposed state
Example 3
α ⊗ + β ⊗
Entangled (and superposed) state
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 7 / 26
Overview
Some quantum properties (with dead and alive cats)
Projective measurement
Destructive interference
No-cloning
Entanglement and separability
Expressing those properties in the lambda-calculus
Superpositions, no-cloning and measurement
Examples
Deutsch algorithm
Teleportation algorithm
Logical linearity vs. algebraic linearity
No-cloning =⇒ logical-linear terms
e.g. λx.x ⊗ x forbidden
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
Logical linearity vs. algebraic linearity
No-cloning =⇒ logical-linear terms
e.g. λx.x ⊗ x forbidden
Another way
No-cloning =⇒ algebraic-linear operators
e.g. M(α. |0 + β. |1 ) → α.M |0 + β.M |1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
Logical linearity vs. algebraic linearity
No-cloning =⇒ logical-linear terms
e.g. λx.x ⊗ x forbidden
Another way
No-cloning =⇒ algebraic-linear operators
e.g. M(α. |0 + β. |1 ) → α.M |0 + β.M |1
What about measurement?
(λx.πx) (α. |0 + β. |1 )
(Measurement operator)
α.(λx.πx) |0 + β.(λx.πx) |1 ← Wrong!
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
Logical linearity vs. algebraic linearity
No-cloning =⇒ logical-linear terms
e.g. λx.x ⊗ x forbidden
Another way
No-cloning =⇒ algebraic-linear operators
e.g. M(α. |0 + β. |1 ) → α.M |0 + β.M |1
What about measurement?
(λx.πx) (α. |0 + β. |1 )
(Measurement operator)
α.(λx.πx) |0 + β.(λx.πx) |1 ← Wrong!
We can use a combination of both:
Logical-linear for abstractions taking superpositions
Algebraic-linear for abstractions taking basis states
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
Key point
We need to distinguish
superposed states
from
basis states
Basis states can be cloned
Superposed states cannot
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 10 / 26
Grammars
First version, without tensor
Types
Ψ := Q | S(Ψ) Qubit types
A := Ψ | Ψ ⇒ A | S(A) Types
Terms
b := x | λxΨ
.t | |0 | |1 Basis terms
v := b | v + v | α.v | 0S(A) Values
t := v | tt | t + t | α.t | πt | ?· Terms
where α ∈ C
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 11 / 26
Two types of linearity
(λxQ
.t) b
Q
→ t[b/x] call-by-base
(λxS(Ψ)
.t)
linear abstraction
u
S(Ψ)
→ t[u/x] call-by-name
(λxQ
.t) (b1 + b2)
S(Q)
→ (λxQ
.t) b1
Q
+(λxQ
.t) b2
Q
linear distribution
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
Two types of linearity
(λxQ
.t) b
Q
→ t[b/x] call-by-base
(λxS(Ψ)
.t)
linear abstraction
u
S(Ψ)
→ t[u/x] call-by-name
(λxQ
.t) (b1 + b2)
S(Q)
→ (λxQ
.t) b1
Q
+(λxQ
.t) b2
Q
linear distribution
Problem?
λxQ⇒Q
.x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
Two types of linearity
(λxQ
.t) b
Q
→ t[b/x] call-by-base
(λxS(Ψ)
.t)
linear abstraction
u
S(Ψ)
→ t[u/x] call-by-name
(λxQ
.t) (b1 + b2)
S(Q)
→ (λxQ
.t) b1
Q
+(λxQ
.t) b2
Q
linear distribution
Problem?
λxQ⇒Q
.x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition)
No problem
It is a function which produces a superposition, is not a superposition
It can be cloned
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
Two types of linearity
(λxQ
.t) b
Q
→ t[b/x] call-by-base
(λxS(Ψ)
.t)
linear abstraction
u
S(Ψ)
→ t[u/x] call-by-name
(λxQ
.t) (b1 + b2)
S(Q)
→ (λxQ
.t) b1
Q
+(λxQ
.t) b2
Q
linear distribution
Problem?
λxQ⇒Q
.x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition)
No problem
It is a function which produces a superposition, is not a superposition
It can be cloned
What about λyS(Q)
.λxQ
.xy ?
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
Two types of linearity
(λxQ
.t) b
Q
→ t[b/x] call-by-base
(λxS(Ψ)
.t)
linear abstraction
u
S(Ψ)
→ t[u/x] call-by-name
(λxQ
.t) (b1 + b2)
S(Q)
→ (λxQ
.t) b1
Q
+(λxQ
.t) b2
Q
linear distribution
Problem?
λxQ⇒Q
.x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition)
No problem
It is a function which produces a superposition, is not a superposition
It can be cloned
What about λyS(Q)
.λxQ
.xy ?
Ok, let’s stay in first order for now
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
Typing applications
Γ t : Ψ ⇒ A ∆ u : Ψ
Γ, ∆ tu : A
⇒E
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
Typing applications
Γ t : Ψ ⇒ A ∆ u : Ψ
Γ, ∆ tu : A
⇒E
What about (λxQ
.t) (b1 + b2)
S(Q)
?
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
Typing applications
Γ t : Ψ ⇒ A ∆ u : Ψ
Γ, ∆ tu : A
⇒E
What about (λxQ
.t) (b1 + b2)
S(Q)
?
Γ t : Ψ ⇒ A ∆ u : S(Ψ)
Γ, ∆ tu : S(A)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
Typing applications
Γ t : Ψ ⇒ A ∆ u : Ψ
Γ, ∆ tu : A
⇒E
What about (λxQ
.t) (b1 + b2)
S(Q)
?
Γ t : Ψ ⇒ A ∆ u : S(Ψ)
Γ, ∆ tu : S(A)
What about ((λxQ
.t) + (λyQ
.u))
S(Q⇒A)
v?
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
Typing applications
Γ t : Ψ ⇒ A ∆ u : Ψ
Γ, ∆ tu : A
⇒E
What about (λxQ
.t) (b1 + b2)
S(Q)
?
Γ t : Ψ ⇒ A ∆ u : S(Ψ)
Γ, ∆ tu : S(A)
What about ((λxQ
.t) + (λyQ
.u))
S(Q⇒A)
v?
Γ t : S(Ψ ⇒ A) ∆ u : S(Ψ)
Γ, ∆ tu : S(A)
⇒ES
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
Example
f : Q ⇒ A g : Q ⇒ A
f + g : S(Q ⇒ A)
S+
I
|0 : Q
Ax|0
|0 : S(Q)
(f + g) |0 : S(A)
⇒ES
⇓
f : Q ⇒ A |0 : Q
Ax|0
f |0 : A
⇒E
g : Q ⇒ A |0 : Q
Ax|0
g |0 : A
⇒E
f |0 + g |0 : S(A)
S+
I
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 14 / 26
Measurement
π(
n
i=1
[αi.]bi) −→ |αk|2
n
i=1 |αi|2
bk
∀i, bi = |0 or bi = |1 .
n
i=1 αi .bi is normal (and hence 1 ≤ n ≤ 2).
k ≤ n
Example
π(i. |0 + 2. |1 )
|0
|1
1
3
2
3
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 15 / 26
Adding tensor products
Intepretation of types
S(Q) vs. Q
Q = {|0 , |1 } ⊆ C2
A ⊗ B = A × B
S(A) = G A
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 16 / 26
Adding tensor products
Intepretation of types
S(Q) vs. Q
Q = {|0 , |1 } ⊆ C2
A ⊗ B = A × B
S(A) = G A
Examples
(1/
√
2. |0 + 1/
√
2. |1 ) ⊗ |0 ∈ S(Q) ⊗ Q
= G({|0 , |1 }) × {|0 , |1 }
= C2
× {|0 , |1 }
1/
√
2. |0 ⊗ |0 + 1/
√
2. |1 ⊗ |1 ∈ S(Q ⊗ Q)
= G({|0 , |1 } × {|0 , |1 })
= G({|0 ⊗ |0 , |0 ⊗ |1 , |1 ⊗ |0 , |1 ⊗ |1 })
= C2
⊗ C2
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 16 / 26
Some information is lost on reduction
Subtyping
{|0 , |1 } ⊂ C2
then Q ≤ S(Q)
G(GA) = GA then S(S(Q)) ≤ S(Q)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
Some information is lost on reduction
Subtyping
{|0 , |1 } ⊂ C2
then Q ≤ S(Q)
G(GA) = GA then S(S(Q)) ≤ S(Q)
{|0 , |1 } × C2
⊂ C2
⊗ C2
then Q ⊗ S(Q) ≤ S(Q ⊗ Q)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
Some information is lost on reduction
Subtyping
{|0 , |1 } ⊂ C2
then Q ≤ S(Q)
G(GA) = GA then S(S(Q)) ≤ S(Q)
{|0 , |1 } × C2
⊂ C2
⊗ C2
then Q ⊗ S(Q) ≤ S(Q ⊗ Q)
|0 ⊗ (|0 + |1 ) : Q ⊗ S(Q)
|0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
Some information is lost on reduction
Subtyping
{|0 , |1 } ⊂ C2
then Q ≤ S(Q)
G(GA) = GA then S(S(Q)) ≤ S(Q)
{|0 , |1 } × C2
⊂ C2
⊗ C2
then Q ⊗ S(Q) ≤ S(Q ⊗ Q)
|0 ⊗ (|0 + |1 ) : Q ⊗ S(Q)
|0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
Some information is lost on reduction
Subtyping
{|0 , |1 } ⊂ C2
then Q ≤ S(Q)
G(GA) = GA then S(S(Q)) ≤ S(Q)
{|0 , |1 } × C2
⊂ C2
⊗ C2
then Q ⊗ S(Q) ≤ S(Q ⊗ Q)
|0 ⊗ (|0 + |1 ) : Q ⊗ S(Q)
|0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q)
Same happens in math!
(X − 1)(X − 2) −→ X2
− 3X + 2
we lost the information that it was a product
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
Some information is lost on reduction
Subtyping
{|0 , |1 } ⊂ C2
then Q ≤ S(Q)
G(GA) = GA then S(S(Q)) ≤ S(Q)
{|0 , |1 } × C2
⊂ C2
⊗ C2
then Q ⊗ S(Q) ≤ S(Q ⊗ Q)
|0 ⊗ (|0 + |1 ) : Q ⊗ S(Q)
|0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q)
Same happens in math!
(X − 1)(X − 2) −→ X2
− 3X + 2
we lost the information that it was a product
Solution: casting
|0 ⊗ (|0 + |1 ) |0 ⊗ |0 + |0 ⊗ |1
⇑
S(Q⊗Q)
Q⊗S(Q) |0 ⊗ (|0 + |1 ) → |0 ⊗ |0 + |0 ⊗ |1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
Full grammars
Types
Q := Q | Q ⊗ Q Basis qubit types
Ψ := Q | S(Ψ) | Ψ ⊗ Ψ Qubit types
A := Ψ | Ψ ⇒ A | S(A) | A ⊗ A Types
Terms
b := x | λxΨ
.t | |0 | |1 | b ⊗ b Basis terms
v := b | v + v | α.v | 0S(A) | v ⊗ v Values
t := v | tt | t + t | α.t | πj t | ?·
| t ⊗ t | head t | tail t | ⇑
S(B⊗C)
S(A) t
Terms
where α ∈ C
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 18 / 26
Measurement of the first j qubits
πj (
n
i=1
[αi .](b1i ⊗ · · · ⊗ bmi ))
−→


i∈P



|αi |2
n
i=1
|αi |2






j
h=1
bhk ⊗
i∈P




αi
i∈P
|αi |2



 .(bj+1,i ⊗ · · · ⊗ bmi )
P ⊆ N≤n
, such that
∀i ∈ P, ∀h ≤ j,
bhi = bhk .
Example
π2( 2.(|0 ⊗ |1 ⊗ |1 ) + |0 ⊗ |1 ⊗ |0 + 3.(|1 ⊗ |1 ⊗ |1 ) )
|0 ⊗ |1 ⊗ ( 2√
5
. |1 + 1√
5
. |0 ) |1 ⊗ |1 ⊗ (1. |1 )
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 19 / 26
Overview
Some quantum properties (with dead and alive cats)
Projective measurement
Destructive interference
No-cloning
Entanglement and separability
Expressing those properties in the lambda-calculus
Superpositions, no-cloning and measurement
Examples
Deutsch algorithm
Teleportation algorithm
Deutsch algorithm
Preliminaries
Hadamard
H |0 =
1
√
2
|0 +
1
√
2
|1 H |1 =
1
√
2
|0 −
1
√
2
|1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
Deutsch algorithm
Preliminaries
Hadamard
H |0 =
1
√
2
|0 +
1
√
2
|1 H |1 =
1
√
2
|0 −
1
√
2
|1
H = λxQ
.1/
√
2.(|0 + x?−|1 ·|1 )
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
Deutsch algorithm
Preliminaries
Hadamard
H |0 =
1
√
2
|0 +
1
√
2
|1 H |1 =
1
√
2
|0 −
1
√
2
|1
H = λxQ
.1/
√
2.(|0 + x?−|1 ·|1 )
Oracle
A “black box” implementing a function f : {0, 1} → {0, 1}
Uf (|x ⊗ |y ) = |x ⊗ |y ⊕ f (x)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
Deutsch algorithm
Preliminaries
Hadamard
H |0 =
1
√
2
|0 +
1
√
2
|1 H |1 =
1
√
2
|0 −
1
√
2
|1
H = λxQ
.1/
√
2.(|0 + x?−|1 ·|1 )
Oracle
A “black box” implementing a function f : {0, 1} → {0, 1}
Uf (|x ⊗ |y ) = |x ⊗ |y ⊕ f (x)
not = λxQ
.x?|0 ·|1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
Deutsch algorithm
Preliminaries
Hadamard
H |0 =
1
√
2
|0 +
1
√
2
|1 H |1 =
1
√
2
|0 −
1
√
2
|1
H = λxQ
.1/
√
2.(|0 + x?−|1 ·|1 )
Oracle
A “black box” implementing a function f : {0, 1} → {0, 1}
Uf (|x ⊗ |y ) = |x ⊗ |y ⊕ f (x)
not = λxQ
.x?|0 ·|1
Uf = λxQ⊗Q
.(head x) ⊗ ((tail x)?not(f (head x))·f (head x))
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
Deutsch algorithm
Goal:
Given an oracle Uf determine whether f is constant or not
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
Deutsch algorithm
Goal:
Given an oracle Uf determine whether f is constant or not
|0 H
Uf
H
|1 H
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
Deutsch algorithm
Goal:
Given an oracle Uf determine whether f is constant or not
|0 H
Uf
H ± |f (0) ⊕ f (1)
|1 H
1√
2
|0 − 1√
2
|1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
Deutsch algorithm
Goal:
Given an oracle Uf determine whether f is constant or not
|0 H
Uf
H ± |f (0) ⊕ f (1)
|1 H
1√
2
|0 − 1√
2
|1
If f constant, f (0) ⊕ f (1) = 0
± |0 ⊗
1
√
2
|0 −
1
√
2
|1
If f not constant, f (0) ⊕ f (1) = 1
± |1 ⊗
1
√
2
|0 −
1
√
2
|1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
Deutsch in λ
|0 H
Uf
H ± |f (0) ⊕ f (1)
|1 H
1√
2
|0 − 1√
2
|1
not = λxQ
.x?|0 ·|1
H = λxQ
.1/
√
2.(|0 + x?−|1 ·|1 )
Hboth = λxQ⊗Q
.(H(head x)) ⊗ (H(tail x))
Uf = λxQ⊗Q
.(head x) ⊗ ((tail x)?not(f (head x))·f (head x))
H1 = λxQ⊗Q
.(H(head x)) ⊗ (tail x)
Deutschf = π1(⇑
S(Q⊗Q)
S(S(Q)⊗Q) H1(Uf ⇑
S(Q⊗Q)
S(Q⊗S(Q))⇑
S(Q⊗S(Q))
S(S(Q)⊗S(Q)) Hboth(|0 ⊗ |1 )
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 23 / 26
Deutsch in λ
|0 H
Uf
H ± |f (0) ⊕ f (1)
|1 H
1√
2
|0 − 1√
2
|1
not = λxQ
.x?|0 ·|1
H = λxQ
.1/
√
2.(|0 + x?−|1 ·|1 )
Hboth = λxQ⊗Q
.(H(head x)) ⊗ (H(tail x))
Uf = λxQ⊗Q
.(head x) ⊗ ((tail x)?not(f (head x))·f (head x))
H1 = λxQ⊗Q
.(H(head x)) ⊗ (tail x)
Deutschf = π1(⇑
S(Q⊗Q)
S(S(Q)⊗Q) H1(Uf ⇑
S(Q⊗Q)
S(Q⊗S(Q))⇑
S(Q⊗S(Q))
S(S(Q)⊗S(Q)) Hboth(|0 ⊗ |1 )
Deutschf : Q ⊗ Q ⇒ Q ⊗ S(Q)
Deutschid −→∗
(1) π1(1/
√
2. |1 ⊗ |0 − 1/
√
2. |1 ⊗ |1 )
−→(1) |1 ⊗ (1/
√
2. |0 − 1/
√
2. |1 )
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 23 / 26
Teleportation
Goal:
To send a qubit, using an entangled pair, by sending only two bits
of information
Alice
|ψ • H
β00
Zb1
notb2 |ψ
Bob
where β00 = 1√
2
|0 ⊗ |0 + 1√
2
|1 ⊗ |1
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 24 / 26
Teleportation in λ
Alice
|ψ • H
β00
Zb1
notb2 |ψ
Bob
Teleportation : S(Q) ⇒ S(Q)
Teleportation q −→(1) q
Alice =
λxS(Q)⊗S(Q⊗Q)
.π2(⇑
S(Q⊗Q⊗Q)
S(S(Q)⊗Q⊗Q) H3
1 (cnot3
12 ⇑
S(Q⊗Q⊗Q)
S(Q⊗S(Q⊗Q))⇑
S(Q⊗S(Q⊗Q))
S(S(Q)⊗S(Q⊗Q)) x))
Ub
= λbQ
.λxQ
.b?Ux·x
Bob = λxQ⊗Q⊗Q
.Zhead x
nothead tail x
.(tail tail x)
β00 = 1/
√
2. |0 ⊗ |0 + 1/
√
2. |1 ⊗ |1
Teleportation = λqS(Q)
.Bob (⇑
S(Q⊗Q⊗Q)
S(Q⊗Q⊗S(Q)) Alice x ⊗ β00)
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 25 / 26
Summarising
Extension of (pure) first-order lambda-calculus for
quantum computing
Logical-linearity and algebraic-linearity both used for
no-cloning
Denotational semantics:
Types: sets of vectors or vector spaces
Terms: vectors
If Γ t : A then t φΓ
⊆ A
Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 26 / 26

More Related Content

What's hot

1514 concept of a limit
1514 concept of a limit1514 concept of a limit
1514 concept of a limit
Dr Fereidoun Dejahang
 
On the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsOn the Numerical Solution of Differential Equations
On the Numerical Solution of Differential Equations
Kyle Poe
 
A new approach in specifying the inverse quadratic matrix in modulo-2 for con...
A new approach in specifying the inverse quadratic matrix in modulo-2 for con...A new approach in specifying the inverse quadratic matrix in modulo-2 for con...
A new approach in specifying the inverse quadratic matrix in modulo-2 for con...Anax Fotopoulos
 
no U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithm
no U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithmno U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithm
no U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithm
Christian Robert
 
qlp
qlpqlp
Time series modelling arima-arch
Time series modelling  arima-archTime series modelling  arima-arch
Time series modelling arima-arch
jeevan solaskar
 
NIACFDS2015-09-29_HiroNishikawa_HNS20
NIACFDS2015-09-29_HiroNishikawa_HNS20NIACFDS2015-09-29_HiroNishikawa_HNS20
NIACFDS2015-09-29_HiroNishikawa_HNS20Hiroaki Nishikawa
 
Time series Modelling Basics
Time series Modelling BasicsTime series Modelling Basics
Time series Modelling Basics
Ashutosh Kumar
 
A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...
A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...
A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...
Carlo Lancia
 
Anomaly Detection in Sequences of Short Text Using Iterative Language Models
Anomaly Detection in Sequences of Short Text Using Iterative Language ModelsAnomaly Detection in Sequences of Short Text Using Iterative Language Models
Anomaly Detection in Sequences of Short Text Using Iterative Language Models
Cynthia Freeman
 
Numerical solution of ordinary differential equation
Numerical solution of ordinary differential equationNumerical solution of ordinary differential equation
Numerical solution of ordinary differential equation
Dixi Patel
 
Chapter 2 dynamic characteristics of instruments
Chapter 2 dynamic characteristics of instrumentsChapter 2 dynamic characteristics of instruments
Chapter 2 dynamic characteristics of instruments
talbachew tadesse nadew
 
Gauss Elimination Method With Partial Pivoting
Gauss Elimination Method With Partial PivotingGauss Elimination Method With Partial Pivoting
Gauss Elimination Method With Partial Pivoting
SM. Aurnob
 
Nonnegative Matrix Factorization with Side Information for Time Series Recove...
Nonnegative Matrix Factorization with Side Information for Time Series Recove...Nonnegative Matrix Factorization with Side Information for Time Series Recove...
Nonnegative Matrix Factorization with Side Information for Time Series Recove...
Paris Women in Machine Learning and Data Science
 
Metropolis-Hastings MCMC Short Tutorial
Metropolis-Hastings MCMC Short TutorialMetropolis-Hastings MCMC Short Tutorial
Metropolis-Hastings MCMC Short Tutorial
Ralph Schlosser
 
Time series Analysis
Time series AnalysisTime series Analysis
Time series Analysis
Mahak Vijayvargiya
 
Braneworld Cosmology and Tachyon Inflation - RSII Numerical Models
Braneworld Cosmology and Tachyon Inflation - RSII Numerical ModelsBraneworld Cosmology and Tachyon Inflation - RSII Numerical Models
Braneworld Cosmology and Tachyon Inflation - RSII Numerical Models
Milan Milošević
 

What's hot (20)

Chapter06
Chapter06Chapter06
Chapter06
 
1514 concept of a limit
1514 concept of a limit1514 concept of a limit
1514 concept of a limit
 
On the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsOn the Numerical Solution of Differential Equations
On the Numerical Solution of Differential Equations
 
A new approach in specifying the inverse quadratic matrix in modulo-2 for con...
A new approach in specifying the inverse quadratic matrix in modulo-2 for con...A new approach in specifying the inverse quadratic matrix in modulo-2 for con...
A new approach in specifying the inverse quadratic matrix in modulo-2 for con...
 
no U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithm
no U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithmno U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithm
no U-turn sampler, a discussion of Hoffman & Gelman NUTS algorithm
 
qlp
qlpqlp
qlp
 
Time series modelling arima-arch
Time series modelling  arima-archTime series modelling  arima-arch
Time series modelling arima-arch
 
NIACFDS2015-09-29_HiroNishikawa_HNS20
NIACFDS2015-09-29_HiroNishikawa_HNS20NIACFDS2015-09-29_HiroNishikawa_HNS20
NIACFDS2015-09-29_HiroNishikawa_HNS20
 
Chapter v
Chapter vChapter v
Chapter v
 
Time series Modelling Basics
Time series Modelling BasicsTime series Modelling Basics
Time series Modelling Basics
 
A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...
A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...
A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water netw...
 
Anomaly Detection in Sequences of Short Text Using Iterative Language Models
Anomaly Detection in Sequences of Short Text Using Iterative Language ModelsAnomaly Detection in Sequences of Short Text Using Iterative Language Models
Anomaly Detection in Sequences of Short Text Using Iterative Language Models
 
Numerical solution of ordinary differential equation
Numerical solution of ordinary differential equationNumerical solution of ordinary differential equation
Numerical solution of ordinary differential equation
 
Chapter 2 dynamic characteristics of instruments
Chapter 2 dynamic characteristics of instrumentsChapter 2 dynamic characteristics of instruments
Chapter 2 dynamic characteristics of instruments
 
Gauss Elimination Method With Partial Pivoting
Gauss Elimination Method With Partial PivotingGauss Elimination Method With Partial Pivoting
Gauss Elimination Method With Partial Pivoting
 
Nonnegative Matrix Factorization with Side Information for Time Series Recove...
Nonnegative Matrix Factorization with Side Information for Time Series Recove...Nonnegative Matrix Factorization with Side Information for Time Series Recove...
Nonnegative Matrix Factorization with Side Information for Time Series Recove...
 
Metropolis-Hastings MCMC Short Tutorial
Metropolis-Hastings MCMC Short TutorialMetropolis-Hastings MCMC Short Tutorial
Metropolis-Hastings MCMC Short Tutorial
 
Randomization
RandomizationRandomization
Randomization
 
Time series Analysis
Time series AnalysisTime series Analysis
Time series Analysis
 
Braneworld Cosmology and Tachyon Inflation - RSII Numerical Models
Braneworld Cosmology and Tachyon Inflation - RSII Numerical ModelsBraneworld Cosmology and Tachyon Inflation - RSII Numerical Models
Braneworld Cosmology and Tachyon Inflation - RSII Numerical Models
 

Similar to Towards a quantum lambda-calculus with quantum control

A lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controlsA lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controls
Alejandro Díaz-Caro
 
Typing quantum superpositions and measurement
Typing quantum superpositions and measurementTyping quantum superpositions and measurement
Typing quantum superpositions and measurement
Alejandro Díaz-Caro
 
MVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priorsMVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priors
Elvis DOHMATOB
 
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
The Statistical and Applied Mathematical Sciences Institute
 
Feedback Particle Filter and its Applications to Neuroscience
Feedback Particle Filter and its Applications to NeuroscienceFeedback Particle Filter and its Applications to Neuroscience
Feedback Particle Filter and its Applications to Neuroscience
mehtapgresearch
 
Numerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic EquationNumerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic Equation
payalpriyadarshinisa1
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
Luckshay Batra
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
Vlad Patryshev
 
Pydata Katya Vasilaky
Pydata Katya VasilakyPydata Katya Vasilaky
Pydata Katya Vasilaky
knv4
 
MCMC and likelihood-free methods
MCMC and likelihood-free methodsMCMC and likelihood-free methods
MCMC and likelihood-free methods
Christian Robert
 
Programacion Cuadratica
Programacion CuadraticaProgramacion Cuadratica
Programacion Cuadraticapaquitootd
 
Programacion Cuadratica
Programacion CuadraticaProgramacion Cuadratica
Programacion Cuadraticapaquitootd
 
Machine Learning - Regression model
Machine Learning - Regression modelMachine Learning - Regression model
Machine Learning - Regression model
RADO7900
 
Planning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision ProcessesPlanning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision Processes
ahmad bassiouny
 
Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's Algorithm
Tanmay Baranwal
 
usingqcomp.pptx
usingqcomp.pptxusingqcomp.pptx
usingqcomp.pptx
MazharIqbal762482
 
Logic design basics
Logic design basicsLogic design basics
Logic design basics
harishnn
 
Type and proof structures for concurrency
Type and proof structures for concurrencyType and proof structures for concurrency
Type and proof structures for concurrency
Facultad de Informática UCM
 
The Logic of Quantum Physics
The Logic of Quantum PhysicsThe Logic of Quantum Physics
The Logic of Quantum Physics
Rishi Banerjee
 
Damiano Pasetto
Damiano PasettoDamiano Pasetto

Similar to Towards a quantum lambda-calculus with quantum control (20)

A lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controlsA lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controls
 
Typing quantum superpositions and measurement
Typing quantum superpositions and measurementTyping quantum superpositions and measurement
Typing quantum superpositions and measurement
 
MVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priorsMVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priors
 
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
 
Feedback Particle Filter and its Applications to Neuroscience
Feedback Particle Filter and its Applications to NeuroscienceFeedback Particle Filter and its Applications to Neuroscience
Feedback Particle Filter and its Applications to Neuroscience
 
Numerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic EquationNumerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic Equation
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
 
Pydata Katya Vasilaky
Pydata Katya VasilakyPydata Katya Vasilaky
Pydata Katya Vasilaky
 
MCMC and likelihood-free methods
MCMC and likelihood-free methodsMCMC and likelihood-free methods
MCMC and likelihood-free methods
 
Programacion Cuadratica
Programacion CuadraticaProgramacion Cuadratica
Programacion Cuadratica
 
Programacion Cuadratica
Programacion CuadraticaProgramacion Cuadratica
Programacion Cuadratica
 
Machine Learning - Regression model
Machine Learning - Regression modelMachine Learning - Regression model
Machine Learning - Regression model
 
Planning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision ProcessesPlanning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision Processes
 
Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's Algorithm
 
usingqcomp.pptx
usingqcomp.pptxusingqcomp.pptx
usingqcomp.pptx
 
Logic design basics
Logic design basicsLogic design basics
Logic design basics
 
Type and proof structures for concurrency
Type and proof structures for concurrencyType and proof structures for concurrency
Type and proof structures for concurrency
 
The Logic of Quantum Physics
The Logic of Quantum PhysicsThe Logic of Quantum Physics
The Logic of Quantum Physics
 
Damiano Pasetto
Damiano PasettoDamiano Pasetto
Damiano Pasetto
 

More from Alejandro Díaz-Caro

Affine computation and affine automaton
Affine computation and affine automatonAffine computation and affine automaton
Affine computation and affine automaton
Alejandro Díaz-Caro
 
Simply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphismsSimply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphisms
Alejandro Díaz-Caro
 
The probability of non-confluent systems
The probability of non-confluent systemsThe probability of non-confluent systems
The probability of non-confluent systems
Alejandro Díaz-Caro
 
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Alejandro Díaz-Caro
 
Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...Alejandro Díaz-Caro
 
Non determinism through type isomophism
Non determinism through type isomophismNon determinism through type isomophism
Non determinism through type isomophism
Alejandro Díaz-Caro
 
Call-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type discipline
Alejandro Díaz-Caro
 
Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"
Alejandro Díaz-Caro
 
Linearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value settingLinearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value setting
Alejandro Díaz-Caro
 
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculusA type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
Alejandro Díaz-Caro
 
Slides QuAND 2011
Slides QuAND 2011Slides QuAND 2011
Slides QuAND 2011
Alejandro Díaz-Caro
 
Equivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculiEquivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculi
Alejandro Díaz-Caro
 

More from Alejandro Díaz-Caro (12)

Affine computation and affine automaton
Affine computation and affine automatonAffine computation and affine automaton
Affine computation and affine automaton
 
Simply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphismsSimply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphisms
 
The probability of non-confluent systems
The probability of non-confluent systemsThe probability of non-confluent systems
The probability of non-confluent systems
 
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
 
Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...
 
Non determinism through type isomophism
Non determinism through type isomophismNon determinism through type isomophism
Non determinism through type isomophism
 
Call-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type discipline
 
Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"
 
Linearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value settingLinearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value setting
 
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculusA type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
 
Slides QuAND 2011
Slides QuAND 2011Slides QuAND 2011
Slides QuAND 2011
 
Equivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculiEquivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculi
 

Recently uploaded

Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
 
nodule formation by alisha dewangan.pptx
nodule formation by alisha dewangan.pptxnodule formation by alisha dewangan.pptx
nodule formation by alisha dewangan.pptx
alishadewangan1
 
Deep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless ReproducibilityDeep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless Reproducibility
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Toxic effects of heavy metals : Lead and Arsenic
Toxic effects of heavy metals : Lead and ArsenicToxic effects of heavy metals : Lead and Arsenic
Toxic effects of heavy metals : Lead and Arsenic
sanjana502982
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...
Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...
Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...
Studia Poinsotiana
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Columbia Weather Systems
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
moosaasad1975
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
Richard Gill
 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Ana Luísa Pinho
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Erdal Coalmaker
 
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
Wasswaderrick3
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
Scintica Instrumentation
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
yqqaatn0
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
Nistarini College, Purulia (W.B) India
 
in vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptxin vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptx
yusufzako14
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
RenuJangid3
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
 
erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
muralinath2
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
 

Recently uploaded (20)

Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
 
nodule formation by alisha dewangan.pptx
nodule formation by alisha dewangan.pptxnodule formation by alisha dewangan.pptx
nodule formation by alisha dewangan.pptx
 
Deep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless ReproducibilityDeep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless Reproducibility
 
Toxic effects of heavy metals : Lead and Arsenic
Toxic effects of heavy metals : Lead and ArsenicToxic effects of heavy metals : Lead and Arsenic
Toxic effects of heavy metals : Lead and Arsenic
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...
Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...
Salas, V. (2024) "John of St. Thomas (Poinsot) on the Science of Sacred Theol...
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
 
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
 
in vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptxin vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptx
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
 
erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
 

Towards a quantum lambda-calculus with quantum control

  • 1. Towards a quantum λ-calculus with quantum control arXiv:1601.04294 Alejandro Díaz-Caro UNIVERSIDAD NACIONAL DE QUILMES Joint work with Gilles Dowek Inria & ENS-Cachan V Congreso Latinoamericano de Matemáticos Logic and Computability Session Barranquilla, Colombia, July 14, 2016
  • 2. Goal We want a pure functional extension of lambda calculusi.e. we do not want clasical control / quantum data Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 2 / 26
  • 3. Overview Some quantum properties (with dead and alive cats) Projective measurement Destructive interference No-cloning Entanglement and separability Expressing those properties in the lambda-calculus Superpositions, no-cloning and measurement Examples Deutsch algorithm Teleportation algorithm
  • 5. Projective measurement α + β |α|2 |β| 2 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 4 / 26
  • 6. Probabilistic vs. Quantum Destructive interference Probabilistic + Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 7. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 8. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α + β α|2 + |β 2 = 1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 9. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 10. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 1 2 1 2 + 1 2 + 1 2 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 11. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 1 2 1 2 + 1 2 + 1 2 α + β Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 12. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 1 2 1 2 + 1 2 + 1 2 3 4 + 1 4 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 13. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 1 2 1 2 + 1 2 + 1 2 3 4 + 1 4 5 8 + 3 8 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 14. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 1 2 1 2 + 1 2 + 1 2 3 4 + 1 4 5 8 + 3 8 1 √ 2 1 √ 2 + 1 √ 2 + 1 √ 2 1 √ 2 − 1 √ 2 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 15. Probabilistic vs. Quantum Destructive interference Probabilistic a + b (a + b = 1) Quantum α − β α|2 + |−β 2 = 1 1 2 1 2 + 1 2 + 1 2 3 4 + 1 4 5 8 + 3 8 1 √ 2 1 √ 2 + 1 √ 2 + 1 √ 2 1 √ 2 − 1 √ 2 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 5 / 26
  • 16. No-cloning Superpositions vs. basis states There is no universal cloning machine for quantum states Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 6 / 26
  • 17. No-cloning Superpositions vs. basis states There is no universal cloning machine for quantum states α + β
  • 18. No-cloning Superpositions vs. basis states There is no universal cloning machine for quantum states α + β α + β α ⊗ + β ⊗ = α + β ⊗ α + β α2 ⊗ +αβ ⊗ +βα ⊗ +β2 ⊗ Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 6 / 26
  • 19. Entanglement and separability Example 1 α ⊗ +β ⊗ = α + β Superposed state ⊗ Basis state Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 7 / 26
  • 20. Entanglement and separability Example 1 α ⊗ +β ⊗ = α + β Superposed state ⊗ Basis stateExample 2 α1α2 ⊗ +α1β1 ⊗ +β2α2 ⊗ +β1β2 ⊗ α1 + β1 Superposed state ⊗ α2 + β2 Superposed state Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 7 / 26
  • 21. Entanglement and separability Example 1 α ⊗ +β ⊗ = α + β Superposed state ⊗ Basis stateExample 2 α1α2 ⊗ +α1β1 ⊗ +β2α2 ⊗ +β1β2 ⊗ α1 + β1 Superposed state ⊗ α2 + β2 Superposed state Example 3 α ⊗ + β ⊗ Entangled (and superposed) state Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 7 / 26
  • 22. Overview Some quantum properties (with dead and alive cats) Projective measurement Destructive interference No-cloning Entanglement and separability Expressing those properties in the lambda-calculus Superpositions, no-cloning and measurement Examples Deutsch algorithm Teleportation algorithm
  • 23. Logical linearity vs. algebraic linearity No-cloning =⇒ logical-linear terms e.g. λx.x ⊗ x forbidden Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
  • 24. Logical linearity vs. algebraic linearity No-cloning =⇒ logical-linear terms e.g. λx.x ⊗ x forbidden Another way No-cloning =⇒ algebraic-linear operators e.g. M(α. |0 + β. |1 ) → α.M |0 + β.M |1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
  • 25. Logical linearity vs. algebraic linearity No-cloning =⇒ logical-linear terms e.g. λx.x ⊗ x forbidden Another way No-cloning =⇒ algebraic-linear operators e.g. M(α. |0 + β. |1 ) → α.M |0 + β.M |1 What about measurement? (λx.πx) (α. |0 + β. |1 ) (Measurement operator) α.(λx.πx) |0 + β.(λx.πx) |1 ← Wrong! Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
  • 26. Logical linearity vs. algebraic linearity No-cloning =⇒ logical-linear terms e.g. λx.x ⊗ x forbidden Another way No-cloning =⇒ algebraic-linear operators e.g. M(α. |0 + β. |1 ) → α.M |0 + β.M |1 What about measurement? (λx.πx) (α. |0 + β. |1 ) (Measurement operator) α.(λx.πx) |0 + β.(λx.πx) |1 ← Wrong! We can use a combination of both: Logical-linear for abstractions taking superpositions Algebraic-linear for abstractions taking basis states Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 9 / 26
  • 27. Key point We need to distinguish superposed states from basis states Basis states can be cloned Superposed states cannot Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 10 / 26
  • 28. Grammars First version, without tensor Types Ψ := Q | S(Ψ) Qubit types A := Ψ | Ψ ⇒ A | S(A) Types Terms b := x | λxΨ .t | |0 | |1 Basis terms v := b | v + v | α.v | 0S(A) Values t := v | tt | t + t | α.t | πt | ?· Terms where α ∈ C Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 11 / 26
  • 29. Two types of linearity (λxQ .t) b Q → t[b/x] call-by-base (λxS(Ψ) .t) linear abstraction u S(Ψ) → t[u/x] call-by-name (λxQ .t) (b1 + b2) S(Q) → (λxQ .t) b1 Q +(λxQ .t) b2 Q linear distribution Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
  • 30. Two types of linearity (λxQ .t) b Q → t[b/x] call-by-base (λxS(Ψ) .t) linear abstraction u S(Ψ) → t[u/x] call-by-name (λxQ .t) (b1 + b2) S(Q) → (λxQ .t) b1 Q +(λxQ .t) b2 Q linear distribution Problem? λxQ⇒Q .x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
  • 31. Two types of linearity (λxQ .t) b Q → t[b/x] call-by-base (λxS(Ψ) .t) linear abstraction u S(Ψ) → t[u/x] call-by-name (λxQ .t) (b1 + b2) S(Q) → (λxQ .t) b1 Q +(λxQ .t) b2 Q linear distribution Problem? λxQ⇒Q .x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition) No problem It is a function which produces a superposition, is not a superposition It can be cloned Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
  • 32. Two types of linearity (λxQ .t) b Q → t[b/x] call-by-base (λxS(Ψ) .t) linear abstraction u S(Ψ) → t[u/x] call-by-name (λxQ .t) (b1 + b2) S(Q) → (λxQ .t) b1 Q +(λxQ .t) b2 Q linear distribution Problem? λxQ⇒Q .x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition) No problem It is a function which produces a superposition, is not a superposition It can be cloned What about λyS(Q) .λxQ .xy ? Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
  • 33. Two types of linearity (λxQ .t) b Q → t[b/x] call-by-base (λxS(Ψ) .t) linear abstraction u S(Ψ) → t[u/x] call-by-name (λxQ .t) (b1 + b2) S(Q) → (λxQ .t) b1 Q +(λxQ .t) b2 Q linear distribution Problem? λxQ⇒Q .x(|0 +|1 ) : (Q ⇒ Q) ⇒ Q Non-linear! (not a superposition) No problem It is a function which produces a superposition, is not a superposition It can be cloned What about λyS(Q) .λxQ .xy ? Ok, let’s stay in first order for now Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 12 / 26
  • 34. Typing applications Γ t : Ψ ⇒ A ∆ u : Ψ Γ, ∆ tu : A ⇒E Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
  • 35. Typing applications Γ t : Ψ ⇒ A ∆ u : Ψ Γ, ∆ tu : A ⇒E What about (λxQ .t) (b1 + b2) S(Q) ? Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
  • 36. Typing applications Γ t : Ψ ⇒ A ∆ u : Ψ Γ, ∆ tu : A ⇒E What about (λxQ .t) (b1 + b2) S(Q) ? Γ t : Ψ ⇒ A ∆ u : S(Ψ) Γ, ∆ tu : S(A) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
  • 37. Typing applications Γ t : Ψ ⇒ A ∆ u : Ψ Γ, ∆ tu : A ⇒E What about (λxQ .t) (b1 + b2) S(Q) ? Γ t : Ψ ⇒ A ∆ u : S(Ψ) Γ, ∆ tu : S(A) What about ((λxQ .t) + (λyQ .u)) S(Q⇒A) v? Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
  • 38. Typing applications Γ t : Ψ ⇒ A ∆ u : Ψ Γ, ∆ tu : A ⇒E What about (λxQ .t) (b1 + b2) S(Q) ? Γ t : Ψ ⇒ A ∆ u : S(Ψ) Γ, ∆ tu : S(A) What about ((λxQ .t) + (λyQ .u)) S(Q⇒A) v? Γ t : S(Ψ ⇒ A) ∆ u : S(Ψ) Γ, ∆ tu : S(A) ⇒ES Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 13 / 26
  • 39. Example f : Q ⇒ A g : Q ⇒ A f + g : S(Q ⇒ A) S+ I |0 : Q Ax|0 |0 : S(Q) (f + g) |0 : S(A) ⇒ES ⇓ f : Q ⇒ A |0 : Q Ax|0 f |0 : A ⇒E g : Q ⇒ A |0 : Q Ax|0 g |0 : A ⇒E f |0 + g |0 : S(A) S+ I Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 14 / 26
  • 40. Measurement π( n i=1 [αi.]bi) −→ |αk|2 n i=1 |αi|2 bk ∀i, bi = |0 or bi = |1 . n i=1 αi .bi is normal (and hence 1 ≤ n ≤ 2). k ≤ n Example π(i. |0 + 2. |1 ) |0 |1 1 3 2 3 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 15 / 26
  • 41. Adding tensor products Intepretation of types S(Q) vs. Q Q = {|0 , |1 } ⊆ C2 A ⊗ B = A × B S(A) = G A Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 16 / 26
  • 42. Adding tensor products Intepretation of types S(Q) vs. Q Q = {|0 , |1 } ⊆ C2 A ⊗ B = A × B S(A) = G A Examples (1/ √ 2. |0 + 1/ √ 2. |1 ) ⊗ |0 ∈ S(Q) ⊗ Q = G({|0 , |1 }) × {|0 , |1 } = C2 × {|0 , |1 } 1/ √ 2. |0 ⊗ |0 + 1/ √ 2. |1 ⊗ |1 ∈ S(Q ⊗ Q) = G({|0 , |1 } × {|0 , |1 }) = G({|0 ⊗ |0 , |0 ⊗ |1 , |1 ⊗ |0 , |1 ⊗ |1 }) = C2 ⊗ C2 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 16 / 26
  • 43. Some information is lost on reduction Subtyping {|0 , |1 } ⊂ C2 then Q ≤ S(Q) G(GA) = GA then S(S(Q)) ≤ S(Q) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
  • 44. Some information is lost on reduction Subtyping {|0 , |1 } ⊂ C2 then Q ≤ S(Q) G(GA) = GA then S(S(Q)) ≤ S(Q) {|0 , |1 } × C2 ⊂ C2 ⊗ C2 then Q ⊗ S(Q) ≤ S(Q ⊗ Q) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
  • 45. Some information is lost on reduction Subtyping {|0 , |1 } ⊂ C2 then Q ≤ S(Q) G(GA) = GA then S(S(Q)) ≤ S(Q) {|0 , |1 } × C2 ⊂ C2 ⊗ C2 then Q ⊗ S(Q) ≤ S(Q ⊗ Q) |0 ⊗ (|0 + |1 ) : Q ⊗ S(Q) |0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
  • 46. Some information is lost on reduction Subtyping {|0 , |1 } ⊂ C2 then Q ≤ S(Q) G(GA) = GA then S(S(Q)) ≤ S(Q) {|0 , |1 } × C2 ⊂ C2 ⊗ C2 then Q ⊗ S(Q) ≤ S(Q ⊗ Q) |0 ⊗ (|0 + |1 ) : Q ⊗ S(Q) |0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
  • 47. Some information is lost on reduction Subtyping {|0 , |1 } ⊂ C2 then Q ≤ S(Q) G(GA) = GA then S(S(Q)) ≤ S(Q) {|0 , |1 } × C2 ⊂ C2 ⊗ C2 then Q ⊗ S(Q) ≤ S(Q ⊗ Q) |0 ⊗ (|0 + |1 ) : Q ⊗ S(Q) |0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q) Same happens in math! (X − 1)(X − 2) −→ X2 − 3X + 2 we lost the information that it was a product Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
  • 48. Some information is lost on reduction Subtyping {|0 , |1 } ⊂ C2 then Q ≤ S(Q) G(GA) = GA then S(S(Q)) ≤ S(Q) {|0 , |1 } × C2 ⊂ C2 ⊗ C2 then Q ⊗ S(Q) ≤ S(Q ⊗ Q) |0 ⊗ (|0 + |1 ) : Q ⊗ S(Q) |0 ⊗ |0 + |0 ⊗ |1 : S(Q ⊗ Q) Same happens in math! (X − 1)(X − 2) −→ X2 − 3X + 2 we lost the information that it was a product Solution: casting |0 ⊗ (|0 + |1 ) |0 ⊗ |0 + |0 ⊗ |1 ⇑ S(Q⊗Q) Q⊗S(Q) |0 ⊗ (|0 + |1 ) → |0 ⊗ |0 + |0 ⊗ |1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 17 / 26
  • 49. Full grammars Types Q := Q | Q ⊗ Q Basis qubit types Ψ := Q | S(Ψ) | Ψ ⊗ Ψ Qubit types A := Ψ | Ψ ⇒ A | S(A) | A ⊗ A Types Terms b := x | λxΨ .t | |0 | |1 | b ⊗ b Basis terms v := b | v + v | α.v | 0S(A) | v ⊗ v Values t := v | tt | t + t | α.t | πj t | ?· | t ⊗ t | head t | tail t | ⇑ S(B⊗C) S(A) t Terms where α ∈ C Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 18 / 26
  • 50. Measurement of the first j qubits πj ( n i=1 [αi .](b1i ⊗ · · · ⊗ bmi )) −→   i∈P    |αi |2 n i=1 |αi |2       j h=1 bhk ⊗ i∈P     αi i∈P |αi |2     .(bj+1,i ⊗ · · · ⊗ bmi ) P ⊆ N≤n , such that ∀i ∈ P, ∀h ≤ j, bhi = bhk . Example π2( 2.(|0 ⊗ |1 ⊗ |1 ) + |0 ⊗ |1 ⊗ |0 + 3.(|1 ⊗ |1 ⊗ |1 ) ) |0 ⊗ |1 ⊗ ( 2√ 5 . |1 + 1√ 5 . |0 ) |1 ⊗ |1 ⊗ (1. |1 ) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 19 / 26
  • 51. Overview Some quantum properties (with dead and alive cats) Projective measurement Destructive interference No-cloning Entanglement and separability Expressing those properties in the lambda-calculus Superpositions, no-cloning and measurement Examples Deutsch algorithm Teleportation algorithm
  • 52. Deutsch algorithm Preliminaries Hadamard H |0 = 1 √ 2 |0 + 1 √ 2 |1 H |1 = 1 √ 2 |0 − 1 √ 2 |1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
  • 53. Deutsch algorithm Preliminaries Hadamard H |0 = 1 √ 2 |0 + 1 √ 2 |1 H |1 = 1 √ 2 |0 − 1 √ 2 |1 H = λxQ .1/ √ 2.(|0 + x?−|1 ·|1 ) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
  • 54. Deutsch algorithm Preliminaries Hadamard H |0 = 1 √ 2 |0 + 1 √ 2 |1 H |1 = 1 √ 2 |0 − 1 √ 2 |1 H = λxQ .1/ √ 2.(|0 + x?−|1 ·|1 ) Oracle A “black box” implementing a function f : {0, 1} → {0, 1} Uf (|x ⊗ |y ) = |x ⊗ |y ⊕ f (x) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
  • 55. Deutsch algorithm Preliminaries Hadamard H |0 = 1 √ 2 |0 + 1 √ 2 |1 H |1 = 1 √ 2 |0 − 1 √ 2 |1 H = λxQ .1/ √ 2.(|0 + x?−|1 ·|1 ) Oracle A “black box” implementing a function f : {0, 1} → {0, 1} Uf (|x ⊗ |y ) = |x ⊗ |y ⊕ f (x) not = λxQ .x?|0 ·|1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
  • 56. Deutsch algorithm Preliminaries Hadamard H |0 = 1 √ 2 |0 + 1 √ 2 |1 H |1 = 1 √ 2 |0 − 1 √ 2 |1 H = λxQ .1/ √ 2.(|0 + x?−|1 ·|1 ) Oracle A “black box” implementing a function f : {0, 1} → {0, 1} Uf (|x ⊗ |y ) = |x ⊗ |y ⊕ f (x) not = λxQ .x?|0 ·|1 Uf = λxQ⊗Q .(head x) ⊗ ((tail x)?not(f (head x))·f (head x)) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 21 / 26
  • 57. Deutsch algorithm Goal: Given an oracle Uf determine whether f is constant or not Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
  • 58. Deutsch algorithm Goal: Given an oracle Uf determine whether f is constant or not |0 H Uf H |1 H Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
  • 59. Deutsch algorithm Goal: Given an oracle Uf determine whether f is constant or not |0 H Uf H ± |f (0) ⊕ f (1) |1 H 1√ 2 |0 − 1√ 2 |1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
  • 60. Deutsch algorithm Goal: Given an oracle Uf determine whether f is constant or not |0 H Uf H ± |f (0) ⊕ f (1) |1 H 1√ 2 |0 − 1√ 2 |1 If f constant, f (0) ⊕ f (1) = 0 ± |0 ⊗ 1 √ 2 |0 − 1 √ 2 |1 If f not constant, f (0) ⊕ f (1) = 1 ± |1 ⊗ 1 √ 2 |0 − 1 √ 2 |1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 22 / 26
  • 61. Deutsch in λ |0 H Uf H ± |f (0) ⊕ f (1) |1 H 1√ 2 |0 − 1√ 2 |1 not = λxQ .x?|0 ·|1 H = λxQ .1/ √ 2.(|0 + x?−|1 ·|1 ) Hboth = λxQ⊗Q .(H(head x)) ⊗ (H(tail x)) Uf = λxQ⊗Q .(head x) ⊗ ((tail x)?not(f (head x))·f (head x)) H1 = λxQ⊗Q .(H(head x)) ⊗ (tail x) Deutschf = π1(⇑ S(Q⊗Q) S(S(Q)⊗Q) H1(Uf ⇑ S(Q⊗Q) S(Q⊗S(Q))⇑ S(Q⊗S(Q)) S(S(Q)⊗S(Q)) Hboth(|0 ⊗ |1 ) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 23 / 26
  • 62. Deutsch in λ |0 H Uf H ± |f (0) ⊕ f (1) |1 H 1√ 2 |0 − 1√ 2 |1 not = λxQ .x?|0 ·|1 H = λxQ .1/ √ 2.(|0 + x?−|1 ·|1 ) Hboth = λxQ⊗Q .(H(head x)) ⊗ (H(tail x)) Uf = λxQ⊗Q .(head x) ⊗ ((tail x)?not(f (head x))·f (head x)) H1 = λxQ⊗Q .(H(head x)) ⊗ (tail x) Deutschf = π1(⇑ S(Q⊗Q) S(S(Q)⊗Q) H1(Uf ⇑ S(Q⊗Q) S(Q⊗S(Q))⇑ S(Q⊗S(Q)) S(S(Q)⊗S(Q)) Hboth(|0 ⊗ |1 ) Deutschf : Q ⊗ Q ⇒ Q ⊗ S(Q) Deutschid −→∗ (1) π1(1/ √ 2. |1 ⊗ |0 − 1/ √ 2. |1 ⊗ |1 ) −→(1) |1 ⊗ (1/ √ 2. |0 − 1/ √ 2. |1 ) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 23 / 26
  • 63. Teleportation Goal: To send a qubit, using an entangled pair, by sending only two bits of information Alice |ψ • H β00 Zb1 notb2 |ψ Bob where β00 = 1√ 2 |0 ⊗ |0 + 1√ 2 |1 ⊗ |1 Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 24 / 26
  • 64. Teleportation in λ Alice |ψ • H β00 Zb1 notb2 |ψ Bob Teleportation : S(Q) ⇒ S(Q) Teleportation q −→(1) q Alice = λxS(Q)⊗S(Q⊗Q) .π2(⇑ S(Q⊗Q⊗Q) S(S(Q)⊗Q⊗Q) H3 1 (cnot3 12 ⇑ S(Q⊗Q⊗Q) S(Q⊗S(Q⊗Q))⇑ S(Q⊗S(Q⊗Q)) S(S(Q)⊗S(Q⊗Q)) x)) Ub = λbQ .λxQ .b?Ux·x Bob = λxQ⊗Q⊗Q .Zhead x nothead tail x .(tail tail x) β00 = 1/ √ 2. |0 ⊗ |0 + 1/ √ 2. |1 ⊗ |1 Teleportation = λqS(Q) .Bob (⇑ S(Q⊗Q⊗Q) S(Q⊗Q⊗S(Q)) Alice x ⊗ β00) Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 25 / 26
  • 65. Summarising Extension of (pure) first-order lambda-calculus for quantum computing Logical-linearity and algebraic-linearity both used for no-cloning Denotational semantics: Types: sets of vectors or vector spaces Terms: vectors If Γ t : A then t φΓ ⊆ A Alejandro Díaz-Caro (UNQ) Towards a quantum lambda calculus with quantum control 26 / 26