A dagger on a category is a contravariant functor that is the identity on objects and involutive: each has with , and . A morphism is unitary if .
A symmetric monoidal category is compact closed if every object has a dual object with morphisms (the cup) and (the cap) satisfying the snake equations
with associators and unitors suppressed. In string diagrams these say that a wire bent into an S shape can be pulled straight. A dagger compact category is a symmetric monoidal category with a dagger such that , the associators, unitors and swap are unitary, and every object has a cup and a cap with — the cap is the dagger of the cup, read in the other order.
In , the dagger is the Hermitian adjoint, is the dual space (identified with via a chosen basis when convenient), the cup is the unnormalised maximally entangled state and the cap is . Bending a wire turns a map into its transpose, and the snake equations are the algebraic core of teleportation: Abramsky and Coecke used this structure to give an abstract account of teleportation and entanglement swapping. The axioms in the form above follow Selinger, who also showed that the completely positive maps form a dagger compact category built from any dagger compact category; the coherence theory of compact closed categories goes back to Kelly and Laplaza. A textbook account is Heunen and Vicary.