Spans in Quantum Theory

John C. Baez

for Deep Beauty Princeton University October 3, 2007

figures by Aaron Lauda

for more, see: http://math.ucr.edu/home/baez/span/ Quantizing gravity is tough. But:

Quantum theory will make more sense when seen as part of a theory of spacetime.

Why? Quantum theory seems ‘weird’ because — seen from the eyes of theory — Hilbert spaces and operators behave less like sets and functions than manifolds describing choices of ‘space’ and describing choices of ‘spacetime’:

X O O O O T O O O O  Y object • • → •

SET set function between THEORY sets Set

QUANTUM Hilbert space operator between THEORY Hilbert spaces Hilb (state) (process)

GENERAL manifold between RELATIVITY manifolds nCob (space) (spacetime) The category Set is ‘cartesian’, while Hilb and nCob are ‘dagger compact’.

This means that Set is a mathematical universe in which classical logic applies, while a very different sort of logic reigns in nCob and Hilb. In a cartesian category:

We can freely duplicate and delete information. • We cannot reverse most processes. • We do not have generalized Bell states. •

In a :

We cannot freely duplicate and delete information. • Every process T has a ‘reverse version’, T . • † We have generalized Bell states. • How can we bridge the chasm between the classical world of cartesian categories and the quantum world of dagger compact categories?

We can bridge it with the concept of a ‘’:

T @ p }} @@ p }} @ 0 }} @@ }~ } @ X Y We’ll see that any cartesian category C with pullbacks gives a dagger compact category Span(C).

This construction is a modern version of matrix mechanics!

But first, recall the original idea of matrix mechanics... Heisenberg used matrices with complex entries to describe processes in quantum mechanics:

/ ? i/  / ?  /  • ? • /   • /  //  ?  /   / ? / / ?  /   /   / ?  //  ?  /  / ? /   / ?  //   /  / ? / /  ? /   ?  //  / ?  /  /  ?  //  ?  /  /  /  / ? //   ?  / i /  ?  / T  /  ? // j  /  ?  /   ? //  / /   ? /  /  ? /   / ? //    ? /  / ? /  /  //    ? /  / ? /   /  ? //   /  ? /    j • • • For each input state i and output state j, the process T gives a complex number, the amplitude to go from i to j: i T C j ∈ To compose processes, we sum over paths:

O ? O i? o ? O  ? o o  • ? O  • ?? o  • O O  ? o  ? O ?? o  ? O  ? o o ? O o??  ?  O O o ??   O o o ?  ? oO ??  ? o O ?? i  ? o O O  ? T  ?o o O  ?? j  o  O ?  o ?  O ?? o ? O O ??  o o ?  O ?  o ?  O ? o o  O ?O ? j j O O  S ooo ? O  ? k oo  • ? O • ? ooo  • ? O  ? oo  O O  ooo ? O ?oo  ? O ooo ?  ?  O O ooo ?  ? O oo ?  ? ooo O ?  oo O  ? ooo O O  ?  o?o O ?  ooo ? O ? oo  O  ooo ?  O ?  oo ?  O O ?  ooo ? O ? k o  O • • • (ST )i = Sj T i k k × j j X In the continuum , such sums become path integrals. Matrix mechanics also works with other rigs (= rings without negatives) replacing the complex numbers:

[0, ) with its usual + and • ∞ × i Now Tj gives the probability to go from i to j.

T, F with OR as + and AND as • { } × i Now Tj gives the possibility to go from i to j.

RMIN = R + with MIN as + and + as • ∪ { ∞} × i Now Tj gives the cost, or action, to go from i to j. I did matrix multiplication in RMIN to find the cheapest flight here:

W O W W RIV ERSIDE g go O W W o OO g g g o O O W W o OO g g o • O W W o OOOg g o • O o W W g g OO o O o W W W g g OOOo o o oO g g gW W o OO o O g g W W o OOO o gOgO oW W OO o g g O o W W OOO o g g g O o W W O o og g O o o gW O W W o O NEW ARK O O W W o O O gg o O W W o O ggggg o • O W W Wo • Ogggg o O o o W W ggggg O o O o W W ggggg O o o o O gggg W W W o O o O O ggggg W W o O O o o gggg O o W W O o ggggg O o W W O o ggg O o o W W O P RINCET ON O o W W WO • • In nature, the continuum limit of this sort of calculation gives the principle of least action.

For more on the analogy RMIN : C :: classical mechanics : quantum mechanics read about ‘idempotent analysis’. i Perhaps the most fundamental example is when Tj is the set of ways to go from i X to j Y : ∈ ∈ i X ?? /  O ?? /   O • ? • //   • O ?? /   O ?? /   ? //   O ?? /   O ?? /   O ? //   O ?? /  O ??  /  ??  //  O ?  /  O ??  /  O ?? // T O  ?  / O  ??  /  ??  // O  ?  / O  ?? / O  ?? / O   ? // O   ?? /   ?? / O   ? // O   ?? / O   ?? / O   ? //    ? Y   j • • • However, now the matrix T has entries taking values not in a rig but in a category: the category Set.

So, in this example we have ‘categorified’ matrix mechanics! Set is a categorified rig, with disjoint union as + and cartesian product as . We use this to multiply matri- ces of sets. If we multiply× these:

WW g X WWWWW ggggg O WWWWW ggggg O • WWWW • gggg • WWWWW ggggg T O ggWgWgWgWW O ggggg WWWWW O ggggg WWWWW  ggggg WWWWW ggggg WWWW WWWW o Y WWWWW oo O WWWW ooo O • WoWoWWW • • O ooo WWWW S oo WWWWW O ooo WWWW O oo WWWWW  ooo WWWW Z oo WWWWW • • • we get this:

WWWW o ggg X WWWWW oo ggggg O WWWW ooo gggg O • WoWoWWW • ggggg • O ooo WWWW gggg ST oo ggggWgWWWW O ooo gggg WWWW O oo ggggg WWWWW  ooo ggggg WWWWW Z googggg WWWW • • • where (ST )i = Sj T i k k × j j G A Set-valued matrix is the same as a ‘span’ of sets:

T @ p }} @@ p }} @ 0 }} @@ }~ } @ X Y Think of T as a set of ‘paths’ from points of X to points of Y . Each path t T goes from some point p(t) = i to ∈ some point p0(t) = j:

O gg X OOO ooo t gggg i O OO oo ggggg O • OOO ooo • ggggg • O OOOooo ggggg T ooOO ggggg O ooo OOOgggg O oo ggggg OO  ooo gggg OOO Y j gogggg O • • • To get a matrix of sets from a span of sets, define: i T = t T : p(t) = i, p0(t) = j j { ∈ } Multiplying matrices of sets is the same as ‘composing spans’ in Set. Given spans like this:

T @ S ? p }} @@ p q ~~ ?? q }} @ 0 ~ ? 0 }} @@ ~~ ?? }~ } @ ~ ~ ? X Y Z we compose them as follows:

STC zz CC zz CC zz CC z} z C! T D S ? p }} DD p q {{ ?? q }} DD 0 {{ ? 0 }} DD {{ ?? }~ } D! {} { ? X Y Z where ST is defined using a ‘pullback’:

ST = (s, t) S T : q(s) = p0(t) { ∈ × } In words: a path in ST is a path s S and a path t T , such that s starts where t ends. ∈ ∈ Cobordism are examples of spans in Diffop, the opposite of the category of manifolds with boundary, since a cobordism: X O O O T O O  Y is really a diagram like this in Diff:

> T @_ p }} @@ p }} @ 0 }} @@ }} @ X Y Diffop doesn’t have all pullbacks, but it has enough to compose cobordisms: X O T O Y O O S O  Z So, we’ve seen:

Spans are a categorified version of matrix mechanics. • A cobordism is a specially nice span in Diffop. •

This suggests that the common features of nCob and Hilb are features of categories of spans.

This is true!

To make this precise, we’ll use the concept of a ‘dagger compact category’. Suppose C is any category with pullbacks. Then we can form a category Span(C), in which: an object is an object of C; • a morphism T : X Y is an isomorphism class of • spans

T @ p }} @@ p }} @ 0 }} @@ }~ } @ X Y where two spans T1, T2 are isomorphic if there’s a commutative diagram:

/ T1 OO ∼ o T2  OOoOoo ?? p  ooo OOO ?? p0 1  ooo OOO ?? 2  ooop OOO ??  ooo 2 p OOO ??  ooo 10 OOO ? X ow o O' Y We compose in Span(C) via pullback, as sketched already. In this situation Span(C) is always a ‘’. In other words, each span T : X Y :

T @ p }} @@ p }} @ 0 }} @@ }~ } @ X Y has an ‘adjoint’ T † : Y X given by switching input and output:

T A p ~ AA p 0 ~~ AA ~~ AA ~ ~ A Y X The axioms of a dagger category hold:

1X† = 1X (ST )† = T †S† T †† = T The dagger operation on spans makes nCob into a dagger category where the adjoint of

X T  Y is

Y

T †  X

When C = Set, spans are Set-valued matrices and T † : X Y is just the of T : Y X. Next suppose C is also ‘cartesian’, i.e. has cartesian products and a terminal object 1. Then Span(C) is a symmetric , where the of two spans:

T 1 @ p1 || @@ p10 || @ || @@ |~ | @ X1 Y1 and

T 2 @ p2 || @@ p20 || @ || @@ |~ | @ X2 Y2 is given by ‘doing them in parallel’: T T 1 O2 p1 p2 nnn OOOp10 p20 nnn × OO × ×nnn OOO nw nn OO' X X Y Y 1 × 2 1 × 2 When C = Diffop, this tensor product on Span(C) includes the usual tensor product of cobordisms as a special case:

X X X X 1 2 1 × 2 T1 T2 T1 T2   ×  Y Y Y Y 1 2 1 × 2 Note that in Diffop is disjoint union! × When C = Set, the tensor product on Span(C) is the more or less obvious ‘tensor product’ of set-valued matrices. A symmetric monoidal category is ‘compact’ if every object X has a object X ∗ with counit and unit

e : X∗ X 1, i : 1 X X∗ X ⊗ → X → ⊗ satisfying the ‘zig-zag identities’.

In nCob, X∗ is X with its orientation reversed. We have: X∗ X eX = iX = X X∗ and zig-zag identities look like this:

X X X∗ X∗

= =

X X X∗ X∗ In Hilb, X∗ is the dual Hilbert space. We have:

eX : X∗ X C iX : C X X∗ ` ⊗ψ → `(ψ) c → c⊗1 ⊗ 7→ 7→ X and the zig-zag identities say familiar things about linear algebra.

In quantum theory, the unit iX describes a ‘generalized ’. The zig-zag identities are fundamental in Abramsky and Coecke’s treatment of quantum telepor- tation. A ‘dagger compact category’ is a dagger category that is also compact, with some extra equations relating the two structures — see the papers by Abramsky & Coecke and Selinger for the precise definition. One can show:

THEOREM. If C is a cartesian category with pullbacks, Span(C) is a dagger compact category.

This result illustrates how the span construction, as a generalized version of matrix mechanics, relates ‘classical’ categories like Set to ‘quantum’ categories like nCob and Hilb.

There’s much more to say, but perhaps not now!