Dagger Symmetric Monoidal Category
Total Page:16
File Type:pdf, Size:1020Kb
Tutorial on dagger categories Peter Selinger Dalhousie University Halifax, Canada FMCS 2018 1 Part I: Quantum Computing 2 Quantum computing: States α state of one qubit: = 0. • β ! 6 α β state of two qubits: . • γ δ ac a c ad separable: = . • b ! ⊗ d ! bc bd otherwise entangled. • 3 Notation 1 0 |0 = , |1 = . • i 0 ! i 1 ! |ij = |i |j etc. • i i⊗ i 4 Quantum computing: Operations unitary transformation • measurement • 5 Some standard unitary gates 0 1 0 −i 1 0 X = , Y = , Z = , 1 0 ! i 0 ! 0 −1 ! 1 1 1 1 0 1 0 H = , S = , T = , √2 1 −1 ! 0 i ! 0 √i ! 1 0 0 0 I 0 0 1 0 0 CNOT = = 0 X ! 0 0 0 1 0 0 1 0 6 Measurement α|0 + β|1 i i 0 1 |α|2 |β|2 α|0 β|1 i i 7 Mixed states A mixed state is a (classical) probability distribution on quantum states. Ad hoc notation: 1 α 1 α + ′ 2 β ! 2 β′ ! Note: A mixed state is a description of our knowledge of a state. An actual closed quantum system is always in a (possibly unknown) “pure” (= non-mixed) state. 8 Density matrices (von Neumann) α Represent the pure state v = C2 by the matrix β ! ∈ αα¯ αβ¯ 2 2 vv† = C × . βα¯ ββ¯ ! ∈ Represent the mixed state λ1 {v1} + ... + λn {vn} by λ1v1v1† + ... + λnvnvn† . This representation is not one-to-one, e.g. 1 1 1 0 1 1 0 1 0 0 .5 0 + = + = 2 0 ! 2 1 ! 2 0 0 ! 2 0 1 ! 0 .5 ! 1 1 1 1 1 1 1 .5 .5 1 .5 −.5 .5 0 + = + = 2 √2 1 ! 2 √2 −1 ! 2 .5 .5 ! 2 −.5 .5 ! 0 .5 ! But these two mixed states are indistinguishable. 9 Quantum operations on density matrices Unitary: v Uv vv Uvv U A UAU 7 † 7 † † 7 † → → → Measurement: α αα¯ αβ¯ a b β ! βα¯ ββ¯ ! c d ! 0 1 0 1 0 1 |α|2 |β|2 αα¯ ββ¯ a d α 0 αα¯ 0 0 0 a 0 0 0 0 ! β ! 0 0 ! 0 ββ¯ ! 0 0 ! 0 d ! 10 Quantum operations A quantum operation is a map from mixed states to mixed states that is physically possible. Mathematically, it is a function from density matrices to density matrices that is: (1) linear (2) positive: A positive F(A) positive (3) completely positive: ⇒F idn positive for all n ⊗ (4) trace non-increasing: A positive tr F(A) tr(A) ≤ ⇒ Theorem: The above conditions are necessary and sufficient for F to be physically possible. In particular, unitary transformations and measurements are both special cases. 11 Characterization of completely positive maps Cn n Cm m Let F : × × be a linear map. We define its characteristic matrix as → F(E ) F(E ) 11 ··· 1n . χF = . .. F(En1) F(Enn) ··· Theorem (Characteristic matrix; Choi’s theorem). F is completely positive if and only if χF is positive. Another, better-known characterization is the following: Theorem (Kraus representation theorem): F is completely positive if and only if it can be written in the form F(A)= BiABi†, for some matrices Bi. Xi 12 Part II: Dagger categories 13 “Untyped” quantum mechanics All countably-based Hilbert spaces are isomorphic. Therefore, in physics, one often works in a single fixed Hilbert space . Let H f : . H H Then one also has: → f : (the adjoint) † H H f∗ : ∗ ∗ (the transpose) H → H f¯ : ∗ ∗ (the conjugate) H → H → 14 Objects Hilbert spaces form a category. Recognizing more than one object makes the notation much clearer. f : A B f† : B A (the adjoint) → f∗ : B∗ A∗ (the transpose) → f¯ : A∗ B∗ (the conjugate) → Examples: → a self-adjoint operator (f = f) must be of type A A • † a unitary operator (f = f−1) can be of type A B→ • † an idempotent (f f = f) must be of type A →A • ◦ → 15 Dagger categories Definition. A dagger category is a category C together with an involutive, identity-on-objects, contravariant functor : C C. † Concretely: → operation: • f : A B f† : B A → equations: → • id† = id , (g f) = f g , f = f A A ◦ † † ◦ † †† This notion has appeared in the literature many times, e.g., [Puppe 1962], [Doplicher and Roberts 1989]. More recently popularized by [Abramsky and Coecke 2004]. 16 In a dagger category: A morphism f : A B is called unitary if f f = id and • † ◦ A f f = id . ◦ † B → A morphism f : A A is called self-adjoint or hermitian if • f = f . † → A morphism f : A A is called positive if there exists C and • h : A C such that f = h h. → † ◦ → 17 Dagger symmetric monoidal categories Definition. A dagger symmetric monoidal category is a symmetric monoidal category with a dagger structure, satisfying the following additional equations: for all f : A B, g : B C, and h : C D: → → (f h)† =→f† h† : B D A C, ⊗ −1⊗ ⊗ ⊗ αA,B,C† = αA,B,C : A (B C) (A B) C, −1 ⊗ →⊗ ⊗ ⊗ λA† = λA : I A A, −1 ⊗ → σ† = σ : B A A B. A,B A,B ⊗ → ⊗ Examples: Sets and relations, Hilbert→ spaces and linear functions. 18 Dagger traced monoidal categories Definition. A dagger traced monoidal category is a dagger symmetric monoidal category with a natural family of trace operators TrX : (A X, B X) (A, B), ⊗ ⊗ satisfying the usual three trace axioms→ and: X X Tr (f†) = (Tr f)†. Examples: Sets and relations; Hilbert spaces and linear functions. 19 Compact closed categories A compact closed category is a symmetric monoidal category with the following additional structure: a new operations on objects: • A∗ additional morphisms: • η : I A A (unit) A ∗ ⊗ ǫA : A A∗ I (counit) →⊗ equations: → • −1 −1 λA (ǫA idA) αA,A ,A (idA ηA) ρA = idA −1 ◦ ⊗ ◦ ∗ ◦ ⊗ ◦ ρ (idA ǫA) αA ,A,A (ηA idA ) λA = idA . A∗ ◦ ∗ ⊗ ◦ ∗ ∗ ◦ ⊗ ∗ ◦ ∗ From this, one can define: f∗ : B∗ A∗, given f : A B. 20 → → Dagger compact closed categories Definition. A dagger compact closed category is a compact closed, dagger symmetric monoidal category also satisfying ǫ† I A A A ⊗ ∗ σ ηA A,A∗ A A. ∗ ⊗ Examples: Sets and relations, Hilbert spaces and linear functions. Theorem (essentially Joyal, Street, and Verity): every dagger traced monoidal category can be fully and faithfully embedded in a dagger compact closed category. Conversely, any full an faithful subcategory of a dagger compact closed category is dagger traced monoidal. 21 Categorical quantum mechanics A surprising amount of quantum mechanics can be done from the axioms of a dagger compact closed category (i.e., without assuming anything a priori about the complex numbers). One can express e.g. scalars and vectors, inner products, projections, unitary maps, and self-adjoint operators, measurement and the Born rule, quantum protocols, and much more. 22 Graphical language of dagger traced monoidal categories A Object A A B Morphism f : A B f → A Identity idA : A A → A B C Composition g f f g ◦ B A Dagger f† : B A f → In the graphical language, the adjoint is the “mirror image” of a box (or diagram). 23 Graphical language, continued C g D Tensor product f g ⊗ A B f B A Symmetry σ A,B A B X X Trace TrX f A f B 24 A Dual A∗ A Unit ηA : I A∗ A ⊗ A → A Counit ǫA : A A∗ I ⊗ A → 25 If f : A B, then f, f† : B A, f : A∗ B∗, and f∗ : B∗ A∗ are ∗ graphically represented as follows: → → → → A B B A f = f f† = f A B B A f = f∗ = ∗ f f Here f = (f†)∗ = (f∗)†. ∗ 26 Theorem [Kelly/Laplaza 1980, Joyal/Street/Verity 1996, Selinger 2005]. A well-typed equation between morphisms in the language of dagger traced monoidal (or dagger compact closed) categories follows from the axioms if and only if it holds, up to graph isomorphism, in the graphical language. 27 Quantum mechanics, graphically Let C be a dagger compact closed category. Scalars. a scalar is a morphism φ : I I, graphically φ . Note that for scalars, → φ φ ψ = = ψ φ ψ Vectors. A vector of type A is a morphism f : I A, graphically A f . → Inner product. Given two vectors f, g : I A, their inner product f | g is the scalar f† g: h i ◦ → A g f 28 Matrices An (A B-)matrix is a morphism I A B. × ∗ ⊗ → The matrix of a map f : A B is pfq : I A B, defined as ∗ ⊗ follows: → → A B f pfq = A 29 Positive maps and matrices A morphism f : A A is positive if it is of the form f = g g, for † ◦ some B and g : A B. → → A g B g A A positive matrix is the matrix of a positive map, i.e., it is of the form B A k A g B g A = A B A k where k = g†. 30 Completely positive map By Choi’s theorem, a morphism f : A A B B in Hilbert ∗ ⊗ ∗ ⊗ spaces is completely positive if it is of the form → A B C k f = . C A k B In an arbitrary dagger compact closed category, Choi’s theorem becomes a definition. 31 Remark A completely positive map A B C k C A k B applied to a positive matrix B A h B A h yields a positive matrix. 32 The CPM contruction Definition. Let C be a dagger compact closed category. The category CPM(C) of completely positive maps over C has: the same objects as C, • a morphism f : A B in CPM(C) is a completely positive • map f : A A B B in C.