Two linearities for quantum computing in the lambda calculus Alejandro Díaz-Caro U NIVERSIDAD N ACIONAL DE Q UILMES & I NSTITUTO DE C IENCIAS DE LA C OMPUTACION / CONICET Buenos Aires, Argentina Combining Viewpoints in Quantum Theory 19-22 March 2018 – Edinburgh, UK
Joint work with Gilles Dowek (Paris, France) Juan Pablo Rinaldi (Rosario, Argentina) Ongoing works with Octavio Malherbe (Montevideo, Uruguay) Ignacio Grimma (Rosario, Argentina) Pablo E. Martínez López (Quilmes, Argentina)
Motivation We are interested in the most natural way of forbidding duplication in quantum lambda calculus (with quantum control) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 1 / 20
Motivation Two approaches in the literature to deal with no cloning Linear-logic approach Linear-algebra approach & & e.g. f ( α | 0 � + β | 1 � ) → α f ( | 0 � ) + β f ( | 1 � ) e.g. λ x . ( x ⊗ x ) is forbidden Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 2 / 20
Motivation Measurement & & The linear-algebra approach does . . . but the linear-logic not make sense here. . . one, does e.g. ( λ x .π x ) ( α. | 0 � + β. | 1 � ) − → α. ( λ x .π x ) | 0 � + β. ( λ x .π x ) | 1 � Wrong! (Measurement operator) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 3 / 20
Key point We need to distinguish superposed states from basis states using types Basis states can be cloned Superposed states cannot Functions receiving superposed states, cannot clone its argument Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 4 / 20
Grammars First version, without tensor Types Ψ := B | S (Ψ) Qubit types A := Ψ | Ψ ⇒ A | S ( A ) Types Terms t := x | λ x Ψ . t | | 0 � | | 1 � | tt | π t | ? t · t | ( t + t ) | α. t | � 0 S ( A ) � �� � � �� � basis terms linear combinations where α ∈ C Intuition If A is a set of terms, S ( A ) is its span S ( B ) = C 2 e.g. B = {| 0 � , | 1 �} Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 5 / 20
Two kinds of linearity ( λ x B . t ) b → t [ b / x ] call-by-base ���� B ( λ x S (Ψ) . t ) u → t [ u / x ] call-by-name ���� � �� � S (Ψ) linear abstraction ( λ x B . t ) ( b 1 + b 2 ) ( λ x B . t ) b 1 +( λ x B . t ) b 2 → linear distribution ���� ���� � �� � B B S ( B ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 6 / 20
Typing applications Γ ⊢ t : Ψ ⇒ A ∆ ⊢ u : Ψ ⇒ E Γ , ∆ ⊢ tu : A What about ( λ x B . t ) ( b 1 + b 2 ) ? � �� � S ( B ) Γ ⊢ t : Ψ ⇒ A ∆ ⊢ u : S (Ψ) Γ , ∆ ⊢ tu : S ( A ) What about (( λ x B . t ) + ( λ y B . u )) v ? � �� � S ( B ⇒ A ) Γ ⊢ t : S (Ψ ⇒ A ) ∆ ⊢ u : S (Ψ) ⇒ ES Γ , ∆ ⊢ tu : S ( A ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 7 / 20
Quantum conditional (? t · r ) | 1 � − → t (? t · r ) | 0 � − → r Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 8 / 20
Quantum conditional (? t · r ) | 1 � − → t (? t · r ) | 0 � − → r (? t · r )( α. | 1 � + β. | 0 � ) − → α. (? t · r ) | 1 � + β. (? t · r ) | 0 � − → α. t + β. r Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 8 / 20
Quantum conditional (? t · r ) | 1 � − → t (? t · r ) | 0 � − → r (? t · r )( α. | 1 � + β. | 0 � ) − → α. (? t · r ) | 1 � + β. (? t · r ) | 0 � − → α. t + β. r Ax Ax ⊢ | 1 � : B ⊢ | 0 � : B S α S α I I ⊢ α. | 1 � : S ( B ) ⊢ β. | 0 � : S ( B ) ⊢ t : A ⊢ r : A S + If I ⊢ α. | 1 � + β. | 0 � : S ( S ( B )) ⊢ ? t · r : B ⇒ A � � ⊢ ? t · r : S ( B ⇒ A ) ⊢ α. | 1 � + β. | 0 � : S ( B ) ⇒ ES ⊢ (? t · r )( α. | 1 � + β. | 1 � ) : S ( A ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 8 / 20
Quantum conditional (? t · r ) | 1 � − → t (? t · r ) | 0 � − → r (? t · r )( α. | 1 � + β. | 0 � ) − → α. (? t · r ) | 1 � + β. (? t · r ) | 0 � − → α. t + β. r Ax Ax ⊢ | 1 � : B ⊢ | 0 � : B S α S α I I ⊢ α. | 1 � : S ( B ) ⊢ β. | 0 � : S ( B ) ⊢ t : A ⊢ r : A S + If I ⊢ α. | 1 � + β. | 0 � : S ( S ( B )) ⊢ ? t · r : B ⇒ A � � ⊢ ? t · r : S ( B ⇒ A ) ⊢ α. | 1 � + β. | 0 � : S ( B ) ⇒ ES ⊢ (? t · r )( α. | 1 � + β. | 1 � ) : S ( A ) H = λ x B . ( 1 . | 0 � + 1 √ √ . (? −| 1 �·| 1 � ) x ) 2 2 → ( 1 . | 0 � + 1 → ( 1 . | 0 � − 1 H | 0 � − √ √ . | 1 � ) H | 1 � − √ √ . | 1 � ) 2 2 2 2 Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 8 / 20
Measurement � b k π ( α 1 . b 1 + α 2 . b 2 ) − → � | α k | 2 | α 1 | 2 + | α 2 | 2 Where b i ∈ {| 0 � , | 1 �} . Example | 0 � � 1 � π ( i . | 0 � + 2 . | 1 � ) 5 | 1 � � 4 � 5 Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 9 / 20
Adding tensor product Interpretation of types � B � = {| 0 � , | 1 �} ⊆ C 2 � A × B � = � A � × � B � � S ( A ) � = G � A � G ( B 1 × B 2 ) ≃ G ( B 1 ) ⊗ G ( B 2 ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 10 / 20
Adding tensor product Interpretation of types � B � = {| 0 � , | 1 �} ⊆ C 2 � A × B � = � A � × � B � � S ( A ) � = G � A � G ( B 1 × B 2 ) ≃ G ( B 1 ) ⊗ G ( B 2 ) Examples: G ( {| 0 � , | 1 �} × {| 0 � , | 1 �} ) = G{ ( | 0 � , | 0 � ) , ( | 0 � , | 1 � ) , ( | 1 � , | 0 � ) , ( | 1 � , | 1 � ) } ≃ G{| 00 � , | 01 � , | 10 � , | 11 �} = C 4 = C 2 ⊗ C 2 = G{| 0 � , | 1 �} ⊗ G{| 0 � , | 1 �} √ √ ) ∈ {| 0 � , | 1 �} × C 2 ( | 0 � , ( 1 / 2 . | 0 � + 1 / 2 . | 1 � ) ���� � �� � B S ( B ) ∈ C 2 ⊗ C 2 √ √ 1 / 2 . ( | 0 � , | 0 � ) + 1 / 2 . ( | 0 � , | 1 � ) � �� � S ( B × B ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 10 / 20
Some information is lost on reduction Subtyping {| 0 � , | 1 �} ⊂ C 2 then B ≤ S ( B ) G ( G A ) = G A then S ( S ( B )) ≤ S ( B ) {| 0 � , | 1 �} × C 2 ⊂ C 2 ⊗ C 2 then B × S ( B ) ≤ S ( B × B ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 11 / 20
Some information is lost on reduction Subtyping {| 0 � , | 1 �} ⊂ C 2 then B ≤ S ( B ) G ( G A ) = G A then S ( S ( B )) ≤ S ( B ) {| 0 � , | 1 �} × C 2 ⊂ C 2 ⊗ C 2 then B × S ( B ) ≤ S ( B × B ) ( | 0 � , | 0 � + | 1 � ) : B × S ( B ) ( | 0 � , | 0 � ) + ( | 0 � , | 1 � ) : S ( B × B ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 11 / 20
Some information is lost on reduction Subtyping {| 0 � , | 1 �} ⊂ C 2 then B ≤ S ( B ) G ( G A ) = G A then S ( S ( B )) ≤ S ( B ) {| 0 � , | 1 �} × C 2 ⊂ C 2 ⊗ C 2 then B × S ( B ) ≤ S ( B × B ) ( | 0 � , | 0 � + | 1 � ) : B × S ( B ) ( | 0 � , | 0 � ) + ( | 0 � , | 1 � ) : S ( B × B ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 11 / 20
Some information is lost on reduction Subtyping {| 0 � , | 1 �} ⊂ C 2 then B ≤ S ( B ) G ( G A ) = G A then S ( S ( B )) ≤ S ( B ) {| 0 � , | 1 �} × C 2 ⊂ C 2 ⊗ C 2 then B × S ( B ) ≤ S ( B × B ) ( | 0 � , | 0 � + | 1 � ) : B × S ( B ) ( | 0 � , | 0 � ) + ( | 0 � , | 1 � ) : S ( B × B ) Sure! We are distributing! X 2 − 3 X + 2 ( X − 1 )( X − 2 ) − → we lost the information that it was a product Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 11 / 20
Some information is lost on reduction Subtyping {| 0 � , | 1 �} ⊂ C 2 then B ≤ S ( B ) G ( G A ) = G A then S ( S ( B )) ≤ S ( B ) {| 0 � , | 1 �} × C 2 ⊂ C 2 ⊗ C 2 then B × S ( B ) ≤ S ( B × B ) ( | 0 � , | 0 � + | 1 � ) : B × S ( B ) ( | 0 � , | 0 � ) + ( | 0 � , | 1 � ) : S ( B × B ) Sure! We are distributing! X 2 − 3 X + 2 ( X − 1 )( X − 2 ) − → we lost the information that it was a product Solution: casting ( | 0 � , | 0 � + | 1 � ) ( | 0 � , | 0 � ) + ( | 0 � , | 1 � ) � ⇑ ℓ ( | 0 � , | 0 � + | 1 � ) → ( | 0 � , | 0 � ) + ( | 0 � , | 1 � ) Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 11 / 20
Full grammars Types Ψ := B | S (Ψ) | Ψ × Ψ Qubit types A := Ψ | Ψ ⇒ A | S ( A ) | A × A Types Terms t := x | λ x Ψ . t | | 0 � | | 1 � | tt | π j t | ? t · t | ( t + t ) | α. t | � 0 S ( A ) | t × t | head t | tail t |⇑ r t |⇑ ℓ t where α ∈ C Alejandro Díaz-Caro Two linearities for quantum computing in the lambda calculus 12 / 20
Recommend
More recommend