Professional Documents
Culture Documents
Talk Given at Nancy
Talk Given at Nancy
to Quantum computing
Alejandro Díaz-Caro
UNIVERSIDAD NACIONAL DE QUILMES
& CONICET / UNIVERSIDAD de BUENOS AIRES
Buenos Aires, Argentina
But, how?
Linear in the algebraic sense. . .
f (v + w ) = f (v ) + f (w )
f (a.v ) = a.f (v )
Γ ⊢ A Γ ⊢ A sum Γ ⊢ A prod
Γ⊢A Γ⊢A
Γ ⊢ A Γ ⊢ A sum Γ ⊢ A prod
Γ⊢A Γ⊢A
Now some proofs cannot be reduced, e.g.
π1 π2
Γ⊢A Γ⊢B
&
Γ ⊢ A & B prodi
Γ ⊢ A&B
&e
Γ⊢A
Γ ⊢ A Γ ⊢ A sum Γ ⊢ A prod
Γ⊢A Γ⊢A
Now some proofs cannot be reduced, e.g.
π1 π2
Γ⊢A Γ⊢B
&
Γ ⊢ A & B prodi
Γ ⊢ A&B
&e
Γ⊢A
Mult Add PL
Truth 1 ⊤ ⊤
Falsehood 0 ⊥
Implication ⊸ ⇒
Conjunction ⊗ & ∧
Disjunction ⊕ ∨
Mult Add PL
Truth 1 ⊤ ⊤
Falsehood 0 ⊥
Implication ⊸ ⇒
Conjunction ⊗ & ∧
Disjunction ⊕ ∨
Proof-terms (a is scalar from some semiring (S, +, ·))
introductions eliminations connective
t =x |t +t |a•t | a.⋆ | t;t (1)
| λx.t | tt (⊸)
|t ⊗t | let x ⊗ y = t in t (⊗)
| ⟨⟩ (⊤)
| err(t) (0)
| ⟨t, t⟩ | π1 (t) | π2 (t) (&)
| inl(t) | inr(t) | match t {(x 7→ t) (y 7→ t)} (⊕)
Alejandro Díaz-Caro From Intuitionistic Linear Logic to Quantum computing 3 / 20
The LS -calculus
Some rules
Some deduction rules
Γ⊢t:A ∆⊢u:B ⊗ Γ ⊢ t : A ⊗ B ∆, x : A, y : B ⊢ u : C
i ⊗e
Γ, ∆ ⊢ t ⊗ u : A ⊗ B Γ, ∆ ⊢ let x ⊗ y = t in u : C
Γ⊢t:A Γ⊢u:B Γ ⊢ t : A&B Γ ⊢ t : A&B
&i &e1 &e2
Γ ⊢ ⟨t, u⟩ : A & B Γ ⊢ π1 (t) : A Γ ⊢ π2 (t) : B
Some reduction rules
(a.⋆);t−→ a•t
a. ⋆ + b.⋆−→ (a + b).⋆
a • b.⋆−→ (a · b).⋆
Γ⊢t:A ∆⊢u:B ⊗ Γ ⊢ t : A ⊗ B ∆, x : A, y : B ⊢ u : C
i ⊗e
Γ, ∆ ⊢ t ⊗ u : A ⊗ B Γ, ∆ ⊢ let x ⊗ y = t in u : C
Γ⊢t:A Γ⊢u:B Γ ⊢ t : A&B Γ ⊢ t : A&B
&i &e1 &e2
Γ ⊢ ⟨t, u⟩ : A & B Γ ⊢ π1 (t) : A Γ ⊢ π2 (t) : B
Some reduction rules π1 π2 π3 π4
Γ⊢A Γ⊢B Γ⊢A Γ⊢B
&i &
Γ ⊢ A&B Γ ⊢ A & B sumi
(a.⋆);t−→ a•t Γ ⊢ A&B
a. ⋆ + b.⋆−→ (a + b).⋆
a • b.⋆−→ (a · b).⋆ π1 π3 π2 π4
⟨t1 , t2 ⟩+⟨u1 , u2 ⟩−→ ⟨t1 +u2 , t2 +u2 ⟩ −→ Γ ⊢ A Γ ⊢ A sum Γ ⊢ B Γ ⊢ B sum
Γ⊢A Γ⊢B
&i
Γ ⊢ A&B
Γ⊢t:A ∆⊢u:B ⊗ Γ ⊢ t : A ⊗ B ∆, x : A, y : B ⊢ u : C
i ⊗e
Γ, ∆ ⊢ t ⊗ u : A ⊗ B Γ, ∆ ⊢ let x ⊗ y = t in u : C
Γ⊢t:A Γ⊢u:B Γ ⊢ t : A&B Γ ⊢ t : A&B
&i &e1 &e2
Γ ⊢ ⟨t, u⟩ : A & B Γ ⊢ π1 (t) : A Γ ⊢ π2 (t) : B
Some reduction rules π1 π2 π3 π4
Γ1 ⊢ A ∆1 ⊢ B Γ 2 ⊢ A ∆2 ⊢ B
⊗i ⊗i
Ξ⊢A⊗B Ξ⊢A⊗B
(a.⋆);t−→ a•t sum
Ξ⊢A⊗B
a. ⋆ + b.⋆−→ (a + b).⋆
a • b.⋆−→ (a · b).⋆ Ξ = Γ1 , ∆1 = Γ2 , ∆2
⟨t1 , t2 ⟩+⟨u1 , u2 ⟩−→ ⟨t1 +u2 , t2 +u2 ⟩
let x ⊗ y = (t + u) in v −→ (let x ⊗ y = t in v ) + (let x ⊗ y = u in v )
Definition (Equivalence)
t≡r iff ∃s s.t. t →∗ v ∗← r .
1. (t1 + t2 ) + t3 ≡ t1 + (t2 + t3 ) 5. a • b • t ≡ (a · b) • t
2. t1 + t2 ≡ t2 + t1 6. 1 • t ≡ t
3. t + 0A ≡ t 7. a • (t1 + t2 ) ≡ a • t1 + a • t2
4. t + (−1) • t ≡ 0A 8. (a + b) • t ≡ a • t + b • t
Alejandro Díaz-Caro From Intuitionistic Linear Logic to Quantum computing 6 / 20
Matrices
Theorem (Matrices)
A, B ∈ V
d(A) = m
⇒∃ ⊢t:A⇒B s.t. ∀v ∈ S m tvA = Mv
d(B) = n
M ∈ S m×n
Example
a b
c d is expressed as t = λx.((π1 (x);⟨a.⋆, b.⋆⟩) + (π2 (x);⟨c.⋆, d.⋆⟩))
Example
a b
c d is expressed as t = λx.((π1 (x);⟨a.⋆, b.⋆⟩) + (π2 (x);⟨c.⋆, d.⋆⟩))
t ⟨e.⋆, f .⋆⟩ → π1 ⟨e.⋆, f .⋆⟩;⟨a.⋆, b.⋆⟩ + π2 ⟨e.⋆, f .⋆⟩;⟨c.⋆, d.⋆⟩
→∗ (e.⋆);⟨a.⋆, b.⋆⟩ + (f .⋆);⟨c.⋆, d.⋆⟩
t(1. ⋆ + 2.⋆) −→∗ λy .y 3.⋆ (t1.⋆) + (t2.⋆) −→∗ λy .(y 1.⋆) + (y 2.⋆)
t(1. ⋆ + 2.⋆) −→∗ λy .y 3.⋆ (t1.⋆) + (t2.⋆) −→∗ λy .(y 1.⋆) + (y 2.⋆)
t(1. ⋆ + 2.⋆) −→∗ λy .y 3.⋆ (t1.⋆) + (t2.⋆) −→∗ λy .(y 1.⋆) + (y 2.⋆)
Corollary
Let A, B ∈ V, d(A) = m, d(B) = n, and ⊢ t : A ⊸ B, then
F : Sm → Sn
u 7→ tu A
is linear.
Γ⊢A Γ⊢B ∧ Γ ⊢ A ∧ B Γ, A ⊢ C Γ ⊢ A ∧ B Γ, B ⊢ C
i ∧e1 ∧e2
Γ⊢A∧B Γ⊢C Γ⊢C
π1 π2
Γ⊢A Γ⊢B ∧ π3
i −→ (π1 /A)π3
Γ⊢A∧B Γ, A ⊢ C
∧e1
Γ⊢C
Example 2
Γ⊢A Γ ⊢ A tonk B Γ, B ⊢ C
tonki tonke
Γ ⊢ A tonk B Γ⊢C
π1
Γ⊢A π2
tonki
Γ ⊢ A tonk B Γ, B ⊢ C
tonke
Γ⊢C
Γ⊢A Γ ⊢ A tonk B Γ, B ⊢ C
tonki tonke
Γ ⊢ A tonk B Γ⊢C
π1
Γ⊢A π2
tonki
Γ ⊢ A tonk B Γ, B ⊢ C
tonke
Γ⊢C
Excessiveness
Γ ⊢ A Γ ⊢ B ⌣i Γ ⊢ A ⌣ B Γ, A ⊢ C Γ, B ⊢ C
⌣e
Γ⊢A⌣B Γ⊢C
π1 π2
Γ ⊢ A Γ ⊢ B ⌣i π3 π4 (π1 /A)π3
Γ⊢A⌣B Γ, A ⊢ C Γ, B ⊢ C
⌣e (π2 /A)π4
Γ⊢C
In PL
Γ⊢A Γ⊢B ⊙
i
Γ⊢A⊙B
Γ ⊢ A ⊙ B Γ, A ⊢ C Γ ⊢ A ⊙ B Γ, B ⊢ C Γ⊢A⊙B Γ, A ⊢ C Γ, B ⊢ C
⊙e1 ⊙e2 ⊙e
Γ⊢C Γ⊢C Γ⊢C
In PL
Γ⊢A Γ⊢B ⊙
i
Γ⊢A⊙B
Γ⊢A⊙B Γ⊢A⊙B Γ⊢A⊙B Γ, A ⊢ C Γ, B ⊢ C
⊙e1 ⊙e2 ⊙e
Γ⊢A Γ⊢B Γ⊢C
In PL
Γ⊢A Γ⊢B ⊙
i
Γ⊢A⊙B
Γ⊢A⊙B Γ⊢A⊙B Γ⊢A⊙B Γ, A ⊢ C Γ, B ⊢ C
⊙e1 ⊙e2 ⊙e
Γ⊢A Γ⊢B Γ⊢C
Definition (Qubits: Qn )
Q0 = 1 Qn+1 = Qn ⊙ Qn
Definition (Norm)
Let t closed irreductible proof of Qn .
▶ If n = 0, t = a.⋆ ∥t∥2 = |a|2
▶ If n = n′ + 1, t = [t1 , t2 ] ∥t∥2 = ∥t1 ∥2 + ∥t2 ∥2
Definition (Qubits: Qn )
Q0 = 1 Qn+1 = Qn ⊙ Qn
Definition (Norm)
Let t closed irreductible proof of Qn .
▶ If n = 0, t = a.⋆ ∥t∥2 = |a|2
▶ If n = n′ + 1, t = [t1 , t2 ] ∥t∥2 = ∥t1 ∥2 + ∥t2 ∥2
u
Convention u closed irreductible proof of Qn =⇒ alternative expression of the n-qubit ∥u∥ .
Example: √12 |0⟩ + √12 |1⟩ can be expressed by [ √12 .⋆, √12 .⋆] or by [1.⋆, 1.⋆].
Definition (Qubits: Qn )
Q0 = 1 Qn+1 = Qn ⊙ Qn
Definition (Norm)
Let t closed irreductible proof of Qn .
▶ If n = 0, t = a.⋆ ∥t∥2 = |a|2
▶ If n = n′ + 1, t = [t1 , t2 ] ∥t∥2 = ∥t1 ∥2 + ∥t2 ∥2
u
Convention u closed irreductible proof of Qn =⇒ alternative expression of the n-qubit ∥u∥ .
Example: √12 |0⟩ + √12 |1⟩ can be expressed by [ √12 .⋆, √12 .⋆] or by [1.⋆, 1.⋆].
Definition (Bits: B)
B=1⊕1 0 = inl(1.⋆) 1 = inr(1.⋆)
Convention Proofs of bits are taken modulo normalization.
a • 0 with a ̸= 0 represents the Boolean 0 a • 1 with a ̸= 0 represents the Boolean 1
Definition (Bits: B)
B=1⊕1 0 = inl(1.⋆) 1 = inr(1.⋆)
Convention Proofs of bits are taken modulo normalization.
a • 0 with a ̸= 0 represents the Boolean 0 a • 1 with a ̸= 0 represents the Boolean 1
Example
meas′1 [a.⋆, b.⋆]
2
|b|2
Reduces to a.0 with probability |a|2|a|
+|b|2 Reduces to b.1 with probability |a|2 +|b|2
Definition (⊢ U : (B ⊸ B) ⊸ Q2 ⊸ Q2 )
⊙ ⊙
U = λf .λq. M0 π1 (π1 q) + M1 π2⊙ (π1⊙ q) + M2 π1⊙ (π2⊙ q) +
⊙ ⊙
M3 π2 (π2 q)
Example
⊢f :B⊸B
▶ If f constant function, Deutsch f −→∗(1) a • 0, for some scalar a,
▶ If f if not constant, Deutsch f −→∗(1) a • 1 for some scalar a.
Definition (S-semimodule)
(A, +) commutative monoid with additive identity 0 and • : S × A → A satisfying:
(s · s ′ ) • a = s • (s ′ • a) 1•a=a
′ ′
s • (a + a ) = (s • a) + (s • a ) s •0=0•a=0
′ ′
(s + s ) • a = (s • a) + (s • a)
J⊤K = {∗}
▶ Moreover, we have shown that every term of type A ⊸ B is linear in the algebraic sense.
▶ We have shown how to use its lack of harmony to encode the quantum measurement.