This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Effectus of Quantum Probability on Relational Structures

Octavio Zapata   Department of Computer Science
University College London ocbzapata@gmail.com
Abstract

The notion of effectus from categorical logic is relevant in the emerging field of categorical probability theory. In this context, stochastic maps are represented by maps in the Kleisli category of some probability monad. Quantum homomorphisms from combinatorics and quantum information theory are the Kleisli maps of certain sort of quantum monad. We show that the Kleisli category of this quantum monad is an effectus. This gives rise to notions of quantum validity and conditioning.

1 Introduction

A graph GG consists of a set of vertices V(G)V(G) and a set of edges E(G)V(G)×V(G)E(G)\subseteq V(G)\times V(G). By definition E(G)E(G) is a binary relation on the vertex set V(G)V(G). We write vvv\sim v^{\prime} to denote a pair of adjacent vertices v,vV(G)v,v^{\prime}\in V(G), i.e. a pair (v,v)V(G)×V(G)(v,v^{\prime})\in V(G)\times V(G) in the edge relation (v,v)E(G)(v,v^{\prime})\in E(G). A graph homomorphism GHG\to H is given by a function f:V(G)V(H)f\colon V(G)\to V(H) between vertices preserving edges:

vv in Gf(v)f(v) in Hv\sim v^{\prime}~{}\text{ in }~{}G\quad\Rightarrow\quad f(v)\sim f(v^{\prime})~{}\text{ in }~{}H

Consider the following game involving a given pair of graphs GG and HH, played by Alice and Bob playing against a Verifier. Their goal is to establish the existence of a graph homomorphism from GG to HH. The game is ‘non-local’ which means that Alice and Bob are not allowed to communicate during the game, however they are allowed to agree on a strategy before the game has started. In each round Verifier sends to Alice and Bob vertices v1,v2V(G)v_{1},v_{2}\in V(G), respectively; in response they produce outputs w1,w2V(H)w_{1},w_{2}\in V(H). They win the round if the following conditions hold:

v1=v2w1=w2 and v1v2w1w2v_{1}=v_{2}\Rightarrow w_{1}=w_{2}\qquad\text{ and }\qquad v_{1}\sim v_{2}\Rightarrow w_{1}\sim w_{2}

If there is indeed a graph homomorphism GHG\to H, then Alice and Bob can win any round of the game described above by using such homomorphism as strategy for responding accordingly. Conversely, they can win any round with certainty only when there is a graph homomorphism GHG\to H. A strategy for Alice and Bob in which they win with probability 1 is called a perfect strategy. Hence, the existence of a perfect strategy is equivalent to the existence of a graph homomorphism.

In cases where no classical homomorphism exists, one can use quantum resources in the form of a maximally entangled bipartite state, where Alice and Bob can each perform measurements on their part, to construct perfect strategies. These strategies are called quantum because they use quantum resources.

We write Md()M_{d}(\mathbb{C}) for the set of all d×dd\times d matrices with complex entries (d1d\geq 1), and 𝟙Md()\mathbbm{1}\in M_{d}(\mathbb{C}) for the d×dd\times d identity matrix. Let EMn()E\in M_{n}(\mathbb{C}) and FMm()F\in M_{m}(\mathbb{C}) be two complex square matrices, n,m1n,m\geq 1. Their tensor product is the matrix defined as EF:=(eijF)Mnm()E\otimes F:=(e_{ij}F)\in M_{nm}(\mathbb{C}) if E=(eij)E=(e_{ij}) with i,j=1,,ni,j=1,\dots,n.

Definition 1.1.

A quantum perfect strategy for the homomorphism game from GG to HH consists of a complex unitary vector ψdAdB\psi\in\mathbb{C}^{d_{A}}\otimes\mathbb{C}^{d_{B}} for some dA,dB1d_{A},d_{B}\geq 1 finite, and families (Evw)wV(H)(E_{vw})_{w\in V(H)} and (Fvw)wV(H)(F_{vw})_{w\in V(H)} of dA×dAd_{A}\times d_{A} and dB×dBd_{B}\times d_{B} complex matrices for all vV(G)v\in V(G), satisfying:

  • (1)

    wV(H)Evw=𝟙MdA()\sum_{w\in V(H)}E_{vw}=\mathbbm{1}\in M_{d_{A}}(\mathbb{C}) and wV(H)Fvw=𝟙MdB()\sum_{w\in V(H)}F_{vw}=\mathbbm{1}\in M_{d_{B}}(\mathbb{C});

  • (2)

    wwψ(EvwFvw)ψ=0w\neq w^{\prime}\quad\Rightarrow\quad\psi^{\ast}(E_{vw}\otimes F_{vw^{\prime}})\psi=0;

  • (3)

    vvw≁wψ(EvwFvw)ψ=0v\sim v^{\prime}\land w\not\sim w^{\prime}\quad\Rightarrow\quad\psi^{\ast}(E_{vw}\otimes F_{v^{\prime}w^{\prime}})\psi=0.

Observe that the definition of quantum perfect strategies forgets the two-person aspect of the game and shared state, leaving a matrix-valued relation as the witness for existence of a quantum perfect strategy. Recall perfect strategies are in bijection with graph homomorphisms. This gives rise to the notion of quantum graph homomorphism. This concept was introduced in [14], as a generalisation of the notion of quantum chromatic number from [4]. Analogous results for constraint systems are proved in [7, 12, 2, 3].

Definition 1.2.

A quantum graph homomorphism from GG to HH is an indexed family (Evw)vV(G),wV(H)(E_{vw})_{v\in V(G),w\in V(H)} of d×dd\times d complex matrices, EvwMd()E_{vw}\in M_{d}(\mathbb{C}), for some d1d\geq 1, such that:

  • (1)

    Evw=Evw2=EvwE^{\ast}_{vw}=E^{2}_{vw}=E_{vw} for all vV(G)v\in V(G) and wV(H)w\in V(H);

  • (2)

    wV(H)Evw=𝟙Md()\sum_{w\in V(H)}E_{vw}=\mathbbm{1}\in M_{d}(\mathbb{C}) for all vV(G)v\in V(G);

  • (3)

    (v=vww)(vvw≁w)EvwEvw=0(v=v^{\prime}\land w\neq w^{\prime})\lor(v\sim v^{\prime}\land w\not\sim w^{\prime})\quad\Rightarrow\quad E_{vw}E_{v^{\prime}w^{\prime}}=0.

An important further step is taken in [14]: a construction G𝖬GG\mapsto\mathsf{M}G on graphs is introduced, such that the existence of a quantum graph homomorphism from GG to HH is equivalent to the existence of a graph homomorphism of type G𝖬HG\to\mathsf{M}H. This construction is called the measurement graph, and it turns out to be a graded monad on the category of graphs. The Kleisli morphisms of this monad are exactly the quantum homorphism between graphs of [14, 12, 3]. One can show equivalence between these three different notions: quantum homomorphisms, quantum perfect strategies, and certain kind of (classical) homomorphisms between graphs [2].

Monads are used in formal semantics of functional and probabilistic programming languages. Building on the work of Giry [8], and inspired by algebraic methods in program semantics, the study of various ‘probability’ monads has evolved and became part of a new branch of categorical logic called effectus theory. The main goal of effectus theory is to describe the salient aspects of quantum computation and logic using the language of category theory. This description includes probabilistic and classical logic and computation as special cases [6, 11]. Quantum perfect strategies form a category. In this paper we shall see that the category of quantum perfect strategies, or quantum graph homomorphisms, is an effectus (see Theorem 4.1). However, specialisation of Theorem 4.1 to the case where the underlying category is the category simple undirected graphs (which is the context used in [14, 12]) is impossible as this category does not have a terminal object. This is why we introduce the quantum monad in the context of the more general notion of relational structures rather than that of simple graphs.

2 Preliminaries

Disjoint union is the coproduct in the category 𝐒𝐞𝐭\mathbf{Set} of sets and functions. The disjoint union of two sets X,YX,Y is the defined to be the set

X+Y:={(x,1):xX}{(y,2):yY}.X+Y:=\{(x,1):x\in X\}\cup\{(y,2):y\in Y\}.

One can define two functions Xκ1X+Yκ2YX\overset{\kappa_{1}}{\rightarrow}X+Y\overset{\kappa_{2}}{\leftarrow}Y, as κ1(x):=(x,1)\kappa_{1}(x):=(x,1) and κ2:=(y,2)\kappa_{2}:=(y,2), for all xXx\in X and yYy\in Y, respectively. The functions κ1,κ2\kappa_{1},\kappa_{2} are called coprojections. For any pair of functions X𝑝Z𝑞YX\overset{p}{\rightarrow}Z\overset{q}{\leftarrow}Y, the function [p,q]:X+YZ[p,q]\colon X+Y\to Z called cotupling is given by:

[p,q](v):={p(v)vXq(v)vY(vX+Y)[p,q](v):=\begin{cases}p(v)&~{}v\in X\\ q(v)&~{}v\in Y\end{cases}\qquad(v\in X+Y)

If f:AB,g:XYf\colon A\to B,~{}g\colon X\to Y are functions, then the function f+g:A+XB+Yf+g\colon A+X\to B+Y is defined as

f+g:=[κ1f,κ2g].f+g:=[\kappa_{1}\circ f,~{}\kappa_{2}\circ g].

The empty set 0:=0:=\emptyset is the initial object of 𝐒𝐞𝐭\mathbf{Set}, and any choice of a singleton set 1:={}1:=\{\ast\} is terminal in 𝐒𝐞𝐭\mathbf{Set}. The unique function !X:X1!_{X}\colon X\to 1 is given by xx\mapsto\ast for each xXx\in X. Hence, the category 𝐒𝐞𝐭\mathbf{Set} has finite coproducts (+,0)(+,0) and a terminal object 11.

Definition 2.1.

An effectus is category 𝐁\mathbf{B} with finite coproducts (+,0)(+,0) and a terminal object 11, such that for all X,YX,Y objects of 𝐁\mathbf{B}, the following commutative squares are pullbacks:

X+Y\textstyle{X+Y\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}!X+idY\scriptstyle{!_{X}+\mathrm{id}_{Y}}idX+!Y\scriptstyle{\mathrm{id}_{X}+!_{Y}}1+Y\textstyle{1+Y\ignorespaces\ignorespaces\ignorespaces\ignorespaces}id1+!Y\scriptstyle{\mathrm{id}_{1}+!_{Y}}X\textstyle{X\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}!X\scriptstyle{!_{X}}κ1\scriptstyle{\kappa_{1}}1\textstyle{1\ignorespaces\ignorespaces\ignorespaces\ignorespaces}κ1\scriptstyle{\kappa_{1}}X+1\textstyle{X+1\ignorespaces\ignorespaces\ignorespaces\ignorespaces}!X+id1\scriptstyle{!_{X}+\mathrm{id}_{1}}1+1\textstyle{1+1}X+Y\textstyle{X+Y\ignorespaces\ignorespaces\ignorespaces\ignorespaces}!X+!Y\scriptstyle{!_{X}+!_{Y}}1+1\textstyle{1+1}

and the following maps in 𝐁\mathbf{B} are jointly monic:

(1+1)+1\textstyle{(1+1)+1\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}γ1:=[[κ1,κ2],κ2]\scriptstyle{\gamma_{1}:=[[\kappa_{1},\kappa_{2}],\kappa_{2}]}γ2:=[[κ2,κ1],κ2]\scriptstyle{\gamma_{2}:=[[\kappa_{2},\kappa_{1}],\kappa_{2}]}1+1\textstyle{1+1}

Joint monicity of γ1,γ2\gamma_{1},\gamma_{2} means that given maps f,g:X(1+1)+1f,g\colon X\to(1+1)+1, we have:

γ1f=γ1gγ2f=γ2gf=g\gamma_{1}\circ f=\gamma_{1}\circ g~{}\wedge~{}\gamma_{2}\circ f=\gamma_{2}\circ g\quad\Rightarrow\quad f=g

.

The category 𝐒𝐞𝐭\mathbf{Set} is the effectus used for modelling classical (deterministic, Boolean) computations. The following result is well-known (see, e.g. [11, Example 4.7]).

Theorem 2.1.

The category 𝐒𝐞𝐭\mathbf{Set} is an effectus.

Proof.

We know how pullbacks are constructed in 𝐒𝐞𝐭\mathbf{Set}. For the first pullback condition from Definition 2.1, let PP be the set of pairs (x,y)(X+1)×(1+Y)(x,y)\in(X+1)\times(1+Y) such that (!X+id1)(x)=(id1+!Y)(y)(!_{X}+\mathrm{id}_{1})(x)=(\mathrm{id}_{1}+!_{Y})(y). Note that we have:

(X+1)×(1+Y)(X×1)+(1×1)+(X×Y)+(1×Y)(X+1)\times(1+Y)\cong(X\times 1)+(1\times 1)+(X\times Y)+(1\times Y)

Let X+1=X+{1}X+1=X+\{1\} and 1+Y={0}+Y1+Y=\{0\}+Y. By cases:

  • (1)

    (x,y)X×{0}(x,y)\in X\times\{0\} implies (x,y)=(x,0)(x,y)=(x,0), and so (!X+id1)(x)=0=(id1+!Y)(0)(!_{X}+\mathrm{id}_{1})(x)=0=(\mathrm{id}_{1}+!_{Y})(0) for all xXx\in X, thus X×1PX\times 1\subseteq P;

  • (2)

    (x,y){1}×{0}(x,y)\in\{1\}\times\{0\} implies (!X+id1)(1)=10=(id1+!Y)(0)(!_{X}+\mathrm{id}_{1})(1)=1\neq 0=(\mathrm{id}_{1}+!_{Y})(0), so 1×1P1\times 1\not\subseteq P;

  • (3)

    (x,y)X×Y(x,y)\in X\times Y implies (!X+id1)(x)(id1+!Y)(y)(!_{X}+\mathrm{id}_{1})(x)\neq(\mathrm{id}_{1}+!_{Y})(y), so X×YPX\times Y\not\subseteq P;

  • (4)

    (x,y){1}×Y(x,y)\in\{1\}\times Y implies (x,y)=(1,y)(x,y)=(1,y), and so (!X+id1)(1)=1=(id1+!Y)(y)(!_{X}+\mathrm{id}_{1})(1)=1=(\mathrm{id}_{1}+!_{Y})(y) for all yYy\in Y, thus 1×YP1\times Y\subseteq P.

Hence, the pullback PP is indeed given by (X×1)+(1×Y)X+Y(X\times 1)+(1\times Y)\cong X+Y.

For the second pullback condition from Definition 2.1, take 1={0}1=\{0\} and consider the set of pairs (w,0)(X+Y)×1(w,0)\in(X+Y)\times 1 such that (!X+!Y)(w)=κ1(0)(!_{X}+!_{Y})(w)=\kappa_{1}(0). Note that (X+Y)×1(X×1)+(Y×1)(X+Y)\times 1\cong(X\times 1)+(Y\times 1). By cases:

  • (1)

    if (w,0)X×1(w,0)\in X\times 1 then (!X+!Y)(w)=0=κ1(0)(!_{X}+!_{Y})(w)=0=\kappa_{1}(0) for all wXw\in X;

  • (2)

    if (w,0)Y×1(w,0)\in Y\times 1 then (!X+!Y)(w)=10=κ1(0)(!_{X}+!_{Y})(w)=1\neq 0=\kappa_{1}(0) for all wYw\in Y.

Thus the pullback is indeed given by X×1XX\times 1\cong X.

For the joint monicity requirement from Definition 2.1, we consider sets 1+1+1{a,b,c}1+1+1\cong\{a,b,c\} and 1+1{0,1}1+1\cong\{0,1\}, and functions γ1,γ2:1+1+11+1\gamma_{1},\gamma_{2}\colon 1+1+1\rightrightarrows 1+1 defined as:

γ1(a)=0γ1(b)=γ1(c)=1γ2(a)=γ2(c)=1γ2(b)=0\gamma_{1}(a)=0\quad\quad\gamma_{1}(b)=\gamma_{1}(c)=1\qquad\qquad\gamma_{2}(a)=\gamma_{2}(c)=1\quad\quad\gamma_{2}(b)=0

Further assume we have functions f,g:X1+1+1f,g\colon X\rightrightarrows 1+1+1 such that:

γ1f=γ1gγ2f=γ2g\gamma_{1}\circ f=\gamma_{1}\circ g\qquad\qquad\qquad\gamma_{2}\circ f=\gamma_{2}\circ g

We need to show that f=gf=g. Suppose that fgf\neq g. Then f(x)g(x)f(x)\neq g(x) for some xXx\in X. Assuming the existence of such xx, we arrive to the following contradictions:

  • f(x)=ag(x){b,c}γ1(f(x))γ1(g(x))f(x)=a\Rightarrow g(x)\in\{b,c\}\Rightarrow\gamma_{1}(f(x))\neq\gamma_{1}(g(x))

  • f(x)=bg(x){a,c}γ2(f(x))γ2(g(x))f(x)=b\Rightarrow g(x)\in\{a,c\}\Rightarrow\gamma_{2}(f(x))\neq\gamma_{2}(g(x))

  • f(x)=cg(x){a,b}γ1(f(x))γ1(g(x))f(x)=c\Rightarrow g(x)\in\{a,b\}\Rightarrow\gamma_{1}(f(x))\neq\gamma_{1}(g(x)) if g(x)=ag(x)=a, or γ2(f(x))γ2(g(x))\gamma_{2}(f(x))\neq\gamma_{2}(g(x)) if g(x)=bg(x)=b

Hence it must be the case that f=gf=g, and so γ1,γ2\gamma_{1},~{}\gamma_{2} are jointly monic. ∎

There are many examples of categories that are effectuses (for more, see [6]):

  • Topological spaces with continuous maps between them.

  • Rings (with multiplicative identity) and ring homomorphisms.

  • Measurable spaces with measurable functions.

  • CC^{\ast}-algebras with completely positive unital maps.

  • Extensive categories: 𝐁\mathbf{B} is extensive if it has finite coproducts and

    𝐁/X×𝐁/Y𝐁/(X+Y)\mathbf{B}/X\times\mathbf{B}/Y\simeq\mathbf{B}/(X+Y)

    for all X,YX,Y objects of 𝐁\mathbf{B}. (Every topos is extensive.)

3 Effectus of discrete probability measures

For any set XX and any point xXx\in X, let 𝟏x:X{0,1}\mathbf{1}_{x}\colon X\to\{0,1\} denote the indicator function at xx:

𝟏x(x):={1x=x0xx(xX)\mathbf{1}_{x}(x^{\prime}):=\begin{cases}1&x=x^{\prime}\\ 0&x\neq x\end{cases}\qquad(x^{\prime}\in X)

A convex combination of elements of the set XX is an expression:

λ1𝟏x1++λn𝟏xn\lambda_{1}\mathbf{1}_{x_{1}}+\cdots+\lambda_{n}\mathbf{1}_{x_{n}}

with n1n\geq 1, xiXx_{i}\in X, λi[0,1]\lambda_{i}\in[0,1], and λ1++λn=1\lambda_{1}+\cdots+\lambda_{n}=1. Let D(X)D(X) be the set of all convex combinations of elements of XX. The elements of the set D(X)D(X) are called states or distributions on XX. The indicator function is a distribution 𝟏xD(X)\mathbf{1}_{x}\in D(X), for every xXx\in X. A distribution ipi𝟏xiD(X)\sum_{i}p_{i}\mathbf{1}_{x_{i}}\in D(X) can be represented by a function p:X[0,1]p\colon X\to[0,1] with finitely many non-zero values, satisfying:

xXp(x)=1\sum_{x\in X}p(x)=1

Functions like this are called discrete probability measures. If range(p)={x1,,xn},n1\mathrm{range}(p)=\{x_{1},\dots,x_{n}\},~{}n\geq 1, then the assignment p(xi)pip(x_{i})\mapsto p_{i} gives the bijective correspondence between these two equivalent representations of distributions, i.e. as convex combinations or as discrete probability measures.

Distributions on XX can be pushforwarded along a function f:XYf\colon X\to Y to get distributions on YY:

xXpx𝟏xxXpx𝟏f(x)\sum_{x\in X}p_{x}\mathbf{1}_{x}\qquad\mapsto\qquad\sum_{x\in X}p_{x}\mathbf{1}_{f(x)}

That is, we have a function D(f):D(X)D(Y)D(f)\colon D(X)\to D(Y) defined for any pD(X)p\in D(X) as:

D(f)(p)(y):=xf1(y)p(x)(yY)D(f)(p)(y):=\sum_{x\in f^{-1}(y)}p(x)\qquad(y\in Y)

For every set XX, the function ηX:XD(X)\eta_{X}\colon X\to D(X) is defined as:

ηX(x):=𝟏x(xX)\eta_{X}(x):=\mathbf{1}_{x}\qquad(x\in X)

The function μX:D2(X)D(X)\mu_{X}\colon D^{2}(X)\to D(X) is given by the expectation-value of evaluation functions pp(x)p\mapsto p(x) with respect to some distribution of distributions PD2(X)P\in D^{2}(X), i.e.

μX(P)(x):=pD(X)P(p)p(x)(xX)\mu_{X}(P)(x):=\sum_{p\in D(X)}P(p)\cdot p(x)\qquad(x\in X)

The usual naturality and commutativity requirements are satisfied by these functions, so there is a [0,1][0,1]-valued discrete distributions monad D=(D,η,μ)D=(D,\eta,\mu) on 𝐒𝐞𝐭\mathbf{Set}.

The Kleisli category 𝒦(D)\mathcal{K}(D) of the distribution monad DD has sets as objects, and functions of type XD(Y)X\to D(Y) as morphisms of type XYX\to Y in 𝒦(D)\mathcal{K}(D). The identity morphism XXX\to X in 𝒦(D)\mathcal{K}(D) is given by ηX\eta_{X}. We define the Kleisli extension c:D(X)D(Y)c_{\ast}\colon D(X)\to D(Y) of any Kleisli morphism c:XD(Y)c\colon X\to D(Y) as c:=μYD(c)c_{\ast}:=\mu_{Y}\circ D(c). That is, for all pD(X)p\in D(X):

c(p)(y)=xXp(x)c(x)(y)(yY)c_{\ast}(p)(y)=\sum_{x\in X}p(x)\cdot c(x)(y)\qquad(y\in Y)

Composition of Kleisli maps c:XD(Y)c\colon X\to D(Y) and d:YD(Z)d\colon Y\to D(Z), is given using Klesli extension (to simplify notation) as:

X\textstyle{X\ignorespaces\ignorespaces\ignorespaces\ignorespaces}dc\scriptstyle{d_{\ast}\circ\ c\quad}=μZD(d)c\scriptstyle{\quad=~{}\mu_{Z}\circ D(d)\circ c}D(Z)\textstyle{D(Z)}

For any set function f:XYf\colon X\to Y, one can define a Kleisli map:

X\textstyle{X\ignorespaces\ignorespaces\ignorespaces\ignorespaces}f^:=ηYf\scriptstyle{\hat{f}~{}:=~{}\eta_{Y}\circ f}=D(f)ηX\scriptstyle{\quad=~{}D(f)\circ\eta_{X}}D(Y)\textstyle{D(Y)}

given by naturality of η\eta.

The category 𝒦(D)\mathcal{K}(D) has finite coproducts (0,+)(0,+) given by the empty set 0:=0:=\emptyset, and disjoint union X1+X2X_{1}+X_{2} with coprojections:

Xiκi^:=η(X1+X2)κi=D(κi)ηXiD(X1+X2)(i=1,2)\lx@xy@svg{\hbox{\raise 0.0pt\hbox{\kern 8.49934pt\hbox{\ignorespaces\ignorespaces\ignorespaces\hbox{\vtop{\kern 0.0pt\offinterlineskip\halign{\entry@#!@&&\entry@@#!@\cr&\crcr}}}\ignorespaces{\hbox{\kern-8.49934pt\raise 0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\raise 0.0pt\hbox{$\textstyle{X_{i}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$}}}}}}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces{}{\hbox{\lx@xy@droprule}}\ignorespaces\ignorespaces\ignorespaces{\hbox{\kern 27.16385pt\raise 7.87666pt\hbox{{}\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\hbox{\hbox{\kern 0.0pt\raise-2.34557pt\hbox{$\scriptstyle{\hat{\kappa_{i}}~{}:=~{}\eta_{(X_{1}+X_{2})}\circ\kappa_{i}}$}}}\kern 3.0pt}}}}}}\ignorespaces\ignorespaces\ignorespaces{\hbox{\kern 28.83594pt\raise-6.83595pt\hbox{{}\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\hbox{\hbox{\kern 0.0pt\raise-1.41405pt\hbox{$\scriptstyle{\quad=~{}D(\kappa_{i})\circ\eta_{X_{i}}}$}}}\kern 3.0pt}}}}}}\ignorespaces{\hbox{\kern 98.49934pt\raise 0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\lx@xy@tip{1}\lx@xy@tip{-1}}}}}}{\hbox{\lx@xy@droprule}}{\hbox{\lx@xy@droprule}}{\hbox{\kern 98.49934pt\raise 0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\raise 0.0pt\hbox{$\textstyle{D(X_{1}+X_{2})}$}}}}}}}\ignorespaces}}}}\ignorespaces\qquad(i=1,2)

The following result is well-known, see e.g. [10, Proposition 6.4].

Lemma 3.1.

The distribution monad DD is affine, i.e. D(1)1D(1)\cong 1. Moreover, D(1+1)[0,1]D(1+1)\cong[0,1].

Proof.

An element pD(1)p\in D(1) can be regarded as a function p:1[0,1]p\colon 1\to[0,1] such that x1p(x)=1\sum_{x\in 1}p(x)=1. Therefore, it must be the case that pp is the constant function 11. Thus D(1)={1}1D(1)=\{1\}\cong 1. Now, a [0,1][0,1]-valued distribution over a 22-element set consists of a choice of p[0,1]p\in[0,1] for one element and 1p1-p for the other element. Hence D(1+1)[0,1]D(1+1)\cong[0,1]. ∎

Proposition 3.1.

𝒦(D)\mathcal{K}(D) has a terminal object.

Proof.

By Lemma 3.1, any choice of a singleton set 11 in 𝐒𝐞𝐭\mathbf{Set} is a terminal object in 𝒦(D)\mathcal{K}(D). We have unique arrows:

X\textstyle{X\ignorespaces\ignorespaces\ignorespaces\ignorespaces}!^X:=η1!X\scriptstyle{\hat{!}_{X}~{}:=~{}\eta_{1}\circ!_{X}}=D(!X)ηX\scriptstyle{\qquad=~{}D(!_{X})\circ\eta_{X}}D(1)\textstyle{D(1)}

for any XX in 𝐒𝐞𝐭\mathbf{Set}. Since 1D(1)1\cong D(1), the unit η1:1D(1)\eta_{1}\colon 1\to D(1) and the identity function id1:11\mathrm{id}_{1}\colon 1\to 1 are equal η1=id1\eta_{1}=\mathrm{id}_{1}. Therefore, we have !^X=!X\hat{!}_{X}=!_{X} for all XX in 𝐒𝐞𝐭\mathbf{Set}. ∎

Proposition 3.2.

𝒦(D)\mathcal{K}(D) has pullbacks.

Proof.

Assume we have the following commutative diagram:

A\textstyle{A\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}d\scriptstyle{d}c\scriptstyle{c}u\scriptstyle{u}P\textstyle{P\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}i\scriptstyle{i}h\scriptstyle{h}Y\textstyle{Y\ignorespaces\ignorespaces\ignorespaces\ignorespaces}g\scriptstyle{g}X\textstyle{X\ignorespaces\ignorespaces\ignorespaces\ignorespaces}f\scriptstyle{f}Z\textstyle{Z}

where all the arrows live in 𝒦(D)\mathcal{K}(D), and the dashed arrow means that uu is uniquely defined. That is, we have a function u:AD(P)u\colon A\rightarrow D(P) which is determined in a unique way by Kleisli maps:

c:AD(X)\displaystyle c\colon A\rightarrow D(X)\quad f:XD(Z)\displaystyle f\colon X\rightarrow D(Z)\quad h:PD(X)\displaystyle h\colon P\rightarrow D(X)
d:AD(Y)\displaystyle d\colon A\rightarrow D(Y)\quad g:YD(Z)\displaystyle g\colon Y\rightarrow D(Z)\quad i:PD(Y)\displaystyle i\colon P\rightarrow D(Y)

satisfying the following four equations:

hu\displaystyle h_{\ast}\circ u =\displaystyle= c\displaystyle c (1)
iu\displaystyle i_{\ast}\circ u =\displaystyle= d\displaystyle d (2)
fc\displaystyle f_{\ast}\circ c =\displaystyle= gd\displaystyle g_{\ast}\circ d (3)
fh\displaystyle f_{\ast}\circ h =\displaystyle= gi\displaystyle g_{\ast}\circ i (4)

In that case, we have that PP is the pullback of gg along ff in 𝒦(D)\mathcal{K}(D). ∎

The following and last result is well-known, see e.g. [11, Example 4.7].

Theorem 3.1.

The Kleisli category 𝒦(D)\mathcal{K}(D) of the distribution monad DD on sets is an effectus.

Proof.

We need to check two pullback conditions and one joint monicity requirement for the Kleisli category 𝒦(D)\mathcal{K}(D). We start with the first pullback from Definition 2.1. We assume to have the following Kleisli maps:

c:AD(X+1)\displaystyle c\colon A\rightarrow D(X+1)\quad f:X+1D(1+1)\displaystyle f\colon X+1\rightarrow D(1+1)\quad h:X+YD(X+1)\displaystyle h\colon X+Y\rightarrow D(X+1)
d:AD(1+Y)\displaystyle d\colon A\rightarrow D(1+Y)\quad g:1+YD(1+1)\displaystyle g\colon 1+Y\rightarrow D(1+1)\quad i:X+YD(1+Y)\displaystyle i\colon X+Y\rightarrow D(1+Y)

where:

f:=D(!X+id1)ηX+1\displaystyle f:=D(!_{X}+\mathrm{id}_{1})\circ\eta_{X+1} h:=D(idX+!Y)ηX+Y\displaystyle h:=D(\mathrm{id}_{X}+!_{Y})\circ\eta_{X+Y}
g:=D(id1+!Y)η1+Y\displaystyle g:=D(\mathrm{id}_{1}+!_{Y})\circ\eta_{1+Y} i:=D(!X+idY)ηX+Y\displaystyle i:=D(!_{X}+\mathrm{id}_{Y})\circ\eta_{X+Y}

By definition of Kleisli extension we have:

f=μ1+1D(f)=μ1+1D(D(!X+id1)ηX+1)=μ1+1D(η1+1(!X+id1))=μ1+1D(η1+1)D(!X+id1)=D(!X+id1)\begin{split}f_{\ast}&=\mu_{1+1}\circ D(f)\\ &=\mu_{1+1}\circ D(D(!_{X}+\mathrm{id}_{1})\circ\eta_{X+1})\\ &\overset{\star}{=}\mu_{1+1}\circ D(\eta_{1+1}\circ(!_{X}+\mathrm{id}_{1}))\\ &=\mu_{1+1}\circ D(\eta_{1+1})\circ D(!_{X}+\mathrm{id}_{1})\\ &=D(!_{X}+\mathrm{id}_{1})\end{split}

where the marked equality =\overset{\star}{=} follows from naturality of η\eta, and the last one from the axioms of monads. Similarly, we have:

g=D(id1+!Y)h=D(idX+!Y)i=D(!X+idY)\begin{split}g_{\ast}&=D(\mathrm{id}_{1}+!_{Y})\\ h_{\ast}&=D(\mathrm{id}_{X}+!_{Y})\\ i_{\ast}&=D(!_{X}+\mathrm{id}_{Y})\end{split}

Therefore, equation (4) above holds:

fh=D(!X+id1)h=D(!X+id1)D(idX+!Y)ηX+Y=D((!X+id1)(idX+!Y))ηX+Y=D((id1+!Y)(!X+idY))ηX+Y=D(id1+!Y)D(!X+idY)ηX+Y=gi\begin{split}f_{\ast}\circ h&=D(!_{X}+\mathrm{id}_{1})\circ h\\ &=D(!_{X}+\mathrm{id}_{1})\circ D(\mathrm{id}_{X}+!_{Y})\circ\eta_{X+Y}\\ &=D((!_{X}+\mathrm{id}_{1})\circ(\mathrm{id}_{X}+!_{Y}))\circ\eta_{X+Y}\\ &\overset{\star}{=}D((\mathrm{id}_{1}+!_{Y})\circ(!_{X}+\mathrm{id}_{Y}))\circ\eta_{X+Y}\\ &=D(\mathrm{id}_{1}+!_{Y})\circ D(!_{X}+\mathrm{id}_{Y})\circ\eta_{X+Y}\\ &=g_{\ast}\circ i\end{split}

where the marked equality =\overset{\star}{=} follows from the fact that both squares in the definition of effectus (see Definition 2.1) commute in every category with finite coproducts and a terminal object.

Let X+1=X+{1}X+1=X+\{1\} and 1+Y={0}+Y1+Y=\{0\}+Y. Further suppose the Kleisli maps c:AD(X+{1})c\colon A\to D(X+\{1\}) and d:AD({0}+Y)d\colon A\to D(\{0\}+Y) satisfy equation (3) above. More concretely, suppose:

D(!X+idY)(c(a))=D(idX+!Y)(d(a))D({0}+{1})D(!_{X}+\mathrm{id}_{Y})(c(a))=D(\mathrm{id}_{X}+!_{Y})(d(a))\quad\in\quad D(\{0\}+\{1\}) (5)

for all aAa\in A. Specifically, this equation (5) expanded and evaluated says that:

D(!X+idY)(c(a))(0)=(5)D(idX+!Y)(d(a))(0)=y(idX+!Y)1(0)d(a)(y)=d(a)(0)[0,1]\begin{split}D(!_{X}+\mathrm{id}_{Y})(c(a))(0)&\overset{\eqref{eq:proof2.1}}{=}D(\mathrm{id}_{X}+!_{Y})(d(a))(0)\\ &=\sum_{y\in(\mathrm{id}_{X}+!_{Y})^{-1}(0)}d(a)(y)\\ &=d(a)(0)\quad\in\quad[0,1]\end{split} (6)
D(!X+idY)(c(a))(1)=x(!X+idY)1(1)c(a)(x)=c(a)(1)[0,1]\begin{split}D(!_{X}+\mathrm{id}_{Y})(c(a))(1)&=\sum_{x\in(!_{X}+\mathrm{id}_{Y})^{-1}(1)}c(a)(x)\\ &=c(a)(1)\quad\in\quad[0,1]\end{split} (7)

Thus:

d(a)(0)+c(a)(1)=1\begin{split}d(a)(0)+c(a)(1)=1\end{split} (8)

We have:

xXu(a)(x)+yYu(a)(y)=defxXc(a)(x)+yYd(a)(y)=!X(x)=0c(a)(x)+!Y(y)=1d(a)(y)=D(!X+idY)(c(a))(0)+D(!X+idY)(c(a))(1)=d(a)(0)+c(a)(1)=1\begin{split}\sum_{x\in X}u(a)(x)+\sum_{y\in Y}u(a)(y)&\overset{\textrm{def}}{=}\sum_{x\in X}c(a)(x)+\sum_{y\in Y}d(a)(y)\\ &=\sum_{!_{X}(x)=0}c(a)(x)+\sum_{!_{Y}(y)=1}d(a)(y)\\ &=D(!_{X}+\mathrm{id}_{Y})(c(a))(0)+D(!_{X}+\mathrm{id}_{Y})(c(a))(1)\\ &\overset{\star}{=}d(a)(0)+c(a)(1)\\ &{=}1\end{split}

where the marked equality =\overset{\star}{=} follows from (6) and (7), and the last equality from (8). Hence uu is well-defined. We still need to check (1) and (2) above, which in this case amounts to show that:

D(idX+!Y)u=cD(!X+idY)u=d\begin{split}D(\mathrm{id}_{X}+!_{Y})\circ u&=c\\ D(!_{X}+\mathrm{id}_{Y})\circ u&=d\end{split}

For all aAa\in A, we have indeed:

D(idX+!Y)(u(a))(x)=x(idX+!Y)1(x)u(a)(x)=u(a)(x)=defc(a)(x)D(idX+!Y)(u(a))(1)=y(idX+!Y)1(1)u(a)(y)=yYu(a)(y)=defyYd(a)(y)=c(a)(1)\begin{split}D(\mathrm{id}_{X}+!_{Y})(u(a))(x)&=\sum_{x^{\prime}\in(\mathrm{id}_{X}+!_{Y})^{-1}(x)}u(a)(x^{\prime})\\ &=u(a)(x)\\ &\overset{\textrm{def}}{=}c(a)(x)\\ D(\mathrm{id}_{X}+!_{Y})(u(a))(1)&=\sum_{y\in(\mathrm{id}_{X}+!_{Y})^{-1}(1)}u(a)(y)\\ &=\sum_{y\in Y}u(a)(y)\\ &\overset{\textrm{def}}{=}\sum_{y\in Y}d(a)(y)\\ &=c(a)(1)\end{split}
D(!X+idY)(u(a))(y)=y(!X+idY)1(y)u(a)(y)=u(a)(y)=defd(a)(y)D(!X+idY)(u(a))(0)=x(!X+idY)1(0)u(a)(x)=xXu(a)(x)=defxXc(a)(x)=d(a)(0).\begin{split}D(!_{X}+\mathrm{id}_{Y})(u(a))(y)&=\sum_{y^{\prime}\in(!_{X}+\mathrm{id}_{Y})^{-1}(y)}u(a)(y^{\prime})\\ &=u(a)(y)\\ &\overset{\textrm{def}}{=}d(a)(y)\\ D(!_{X}+\mathrm{id}_{Y})(u(a))(0)&=\sum_{x\in(!_{X}+\mathrm{id}_{Y})^{-1}(0)}u(a)(x)\\ &=\sum_{x\in X}u(a)(x)\\ &\overset{\textrm{def}}{=}\sum_{x\in X}c(a)(x)\\ &=d(a)(0).\end{split}

By definition, u:AD(X+Y)u\colon A\to D(X+Y) is the unique Kleisli map satisfying the needed requirements. This completes the proof of the first pullback condition for 𝒦(D)\mathcal{K}(D).

For the second pullback from Definition 2.1, let 1:={0}1:=\{0\} and 1:={1}1:=\{1\} be two distinct (choices of) singleton sets, and let D(1){𝟏0}D(1)\cong\{\mathbf{1}_{0}\}. Consider Kleisli maps !A:A{𝟏0}!_{A}\colon A\to\{\mathbf{1}_{0}\} and c:AD(X+Y)c\colon A\to D(X+Y) such that:

D(!X+!Y)c=D(κ1)!AD(!_{X}+!_{Y})\circ c=D(\kappa_{1})\circ\ !_{A} (9)

Since c(a)=xpx𝟏x+ypy𝟏yD(X+Y)c(a)=\sum_{x}p_{x}\mathbf{1}_{x}+\sum_{y}p_{y}\mathbf{1}_{y}\in D(X+Y) with xpx+ypy=1[0,1]\sum_{x}p_{x}+\sum_{y}p_{y}=1\in[0,1] for all aAa\in A, we have that the left-hand side of equation (9) expands to:

D(!X+!Y)(c(a))=xpx𝟏0+ypy𝟏1D(!_{X}+!_{Y})(c(a))=\sum_{x}p_{x}\mathbf{1}_{0}+\sum_{y}p_{y}\mathbf{1}_{1}

The right-hand side of equation (9)expands to:

D(κ1)(!A(a))=D(κ1)(𝟏0)=𝟏κ1(0)=𝟏0\begin{split}D(\kappa_{1})(!_{A}(a))&\overset{}{=}D(\kappa_{1})(\mathbf{1}_{0})\\ &=\mathbf{1}_{\kappa_{1}(0)}\\ &=\mathbf{1}_{0}\end{split}

Hence xpx=1\sum_{x}p_{x}=1, and so c(a)D(X)c(a)\in D(X). Let u:AD(X)u\colon A\to D(X) be defined as u(a)(x):=c(a)(x)u(a)(x):=c(a)(x). By definition, the Kleisli map u:AD(X)u\colon A\to D(X) is the unique arrow satisfying the needed requirements.

Now we prove that the maps γ1,γ2:(1+1)+11+1\gamma_{1},\gamma_{2}\colon(1+1)+1\rightrightarrows 1+1 in are jointly monic in 𝒦(D)\mathcal{K}(D). This part is taken exactly from [11, Example 4.7]. Let σ,τD(1+1+1)\sigma,\tau\in D(1+1+1) be distributions such that

D(γ1)(σ)=D(γ1)(τ)D(γ2)(σ)=D(γ2)(τ)\begin{split}D(\gamma_{1})(\sigma)&=D(\gamma_{1})(\tau)\\ D(\gamma_{2})(\sigma)&=D(\gamma_{2})(\tau)\end{split} (10)

in D(1+1)D(1+1). Assume 1+1+1={a,b,c}1+1+1=\{a,b,c\} and 1+1={0,1}1+1=\{0,1\}. We have the following convex combinations for σ\sigma in D(1+1)D(1+1):

D(γ1)(σ)=σ(a)𝟏0+(σ(b)+σ(c))𝟏1D(γ2)(σ)=σ(b)𝟏0+(σ(a)+σ(b))𝟏1\begin{split}D(\gamma_{1})(\sigma)&=\sigma(a)\mathbf{1}_{0}+(\sigma(b)+\sigma(c))\mathbf{1}_{1}\\ D(\gamma_{2})(\sigma)&=\sigma(b)\mathbf{1}_{0}+(\sigma(a)+\sigma(b))\mathbf{1}_{1}\end{split}

Similarly for τ\tau:

D(γ1)(τ)=τ(a)𝟏0+(τ(b)+τ(c))𝟏1D(γ2)(τ)=τ(b)𝟏0+(τ(a)+τ(b))𝟏1\begin{split}D(\gamma_{1})(\tau)&=\tau(a)\mathbf{1}_{0}+(\tau(b)+\tau(c))\mathbf{1}_{1}\\ D(\gamma_{2})(\tau)&=\tau(b)\mathbf{1}_{0}+(\tau(a)+\tau(b))\mathbf{1}_{1}\end{split}

Hence, by the first equation in (10), we have σ(a)=τ(a)\sigma(a)=\tau(a). Similarly, by the second equation in (10), we have σ(b)=τ(b)\sigma(b)=\tau(b). We still need to show that σ(c)=τ(c)\sigma(c)=\tau(c). Since σ(a)+σ(b)+σ(c)=1=τ(a)+τ(b)+τ(c)\sigma(a)+\sigma(b)+\sigma(c)=1=\tau(a)+\tau(b)+\tau(c), then:

σ(c)=1(σ(a)+σ(b))=1(τ(a)+τ(b))=τ(c)\begin{split}\sigma(c)&=1-(\sigma(a)+\sigma(b))\\ &=1-(\tau(a)+\tau(b))\\ &=\tau(c)\end{split}

4 Effectus of projection-valued measures

A simple undirected graph GG is a relational structure with a single, binary irreflexive and symmetric relation E(G)E(G) that we have been written as \sim in infix notation. Relational structures are more general. A relational structure 𝒜=(A,R(𝒜))\mathscr{A}=(A,R(\mathscr{A})) consists of a set AA together with an indexed family R(𝒜)=(Ri𝒜)iIR(\mathscr{A})=(R^{\mathscr{A}}_{i})_{i\in I} of relations Ri𝒜AkiR^{\mathscr{A}}_{i}\subseteq A^{k_{i}} with II a set of indices, and ki1k_{i}\geq 1 for all iIi\in I. A homomorphism of relational structures 𝒜\mathscr{A}\to\mathscr{B} is a function f:ABf\colon A\to B between the underlying sets, preserving all relations: (x1,,xk)R𝒜(f(x1),,f(xk))R(x_{1},\dots,x_{k})\in R^{\mathscr{A}}\Rightarrow(f(x_{1}),\dots,f(x_{k}))\in R^{\mathscr{B}} for all (x1,,xk)Ak(x_{1},\dots,x_{k})\in A^{k} and all R𝒜R(𝒜)R^{\mathscr{A}}\in R(\mathscr{A}) with arity k1k\geq 1. There is a category 𝐑𝐒𝐭𝐫\mathbf{RStr} of relational structures and homomorphisms between them.

We write Proj(d)Md()\mathrm{Proj}(d)\subseteq M_{d}(\mathbb{C}) for the set of all d×dd\times d complex matrices that are both self-adjoint and idempotent, i.e. Proj(d)={aMd():a=a2=a}\mathrm{Proj}(d)=\{a\in M_{d}(\mathbb{C}):a^{\ast}=a^{2}=a\} for all d1d\geq 1. The elements of Proj(d)\mathrm{Proj}(d) are called dd-dimensional projections. For every d1d\geq 1, the identity matrix is a projection 𝟙Proj(d)\mathbbm{1}\in\mathrm{Proj}(d).

For every relational structure 𝒜=(A,R(𝒜))\mathscr{A}=(A,R(\mathscr{A})) and every positive integer d1d\geq 1, define a relational structure Qd(𝒜)=(Qd(A),R(Qd(𝒜))Q_{d}(\mathscr{A})=(Q_{d}(A),R({Q_{d}(\mathscr{A})}), where

Qd(A):={xApx𝟏x:pxProj(d),xApx=𝟙}Q_{d}(A):=\{\sum_{x\in A}p_{x}\mathbf{1}_{x}:p_{x}\in\mathrm{Proj}(d),\sum_{x\in A}p_{x}=\mathbbm{1}\}

and every kk-ary relation RQd(𝒜)Qd(A)kR^{Q_{d}(\mathscr{A})}\subseteq Q_{d}(A)^{k} in R(Qd(𝒜))R(Q_{d}(\mathscr{A})) is defined as the set of kk-tuples (p1,,pk)(p_{1},\dots,p_{k}) of projection-valued distributions p1,,pkQd(A)p_{1},\dots,p_{k}\in Q_{d}(A) satisfying:

  • (1)

    pi(x)p_{i}(x) and pj(x)p_{j}(x^{\prime}) commute for all x,xAx,x^{\prime}\in A

  • (2)

    (x1,,xk)R𝒜(x_{1},\dots,x_{k})\notin R^{\mathscr{A}} implies i=1kpi(xi)=0\prod_{i=1}^{k}p_{i}(x_{i})=0 for all (x1,,xk)Ak(x_{1},\dots,x_{k})\in A^{k}

There cannot be infinitely many projections resolving the dd-dimensional identity. Therefore, every projection-valued distribution pQd(A),p:AProj(d)p\in Q_{d}(A),~{}p\colon A\to\mathrm{Proj}(d), has finitely manny non-zero values. These distributions are projection-valued measures (PVMs) from functional analysis and quantum theory [9, 5].

For any homomorphism f:𝒜f\colon\mathscr{A}\rightarrow\mathscr{B}, we define the homomorphism Qd(f):Qd(𝒜)Qd()Q_{d}(f)\colon Q_{d}(\mathscr{A})\rightarrow Q_{d}(\mathscr{B}) as

Qd(f)(p)(y):=xf1(y)p(x)(yB)Q_{d}(f)(p)(y):=\sum_{x\in f^{-1}(y)}p(x)\qquad(y\in B)

or, equivalently, as Qd(f)(p):=xpx𝟏f(x)Qd()Q_{d}(f)(p):=\sum_{x}p_{x}\mathbf{1}_{f(x)}\in Q_{d}(\mathscr{B}). This definition preserves composites and identities, so there is a functor Qd:𝐑𝐒𝐭𝐫𝐑𝐒𝐭𝐫Q_{d}\colon\mathbf{RStr}\rightarrow\mathbf{RStr} for every d={1,2,}d\in\mathbb{N}=\{1,2,\dots\} (see [2] for more details).

Note that Proj(1){0,1}1+1\mathrm{Proj}(1)\cong\{0,1\}\cong 1+1. We define η𝒜:𝒜Q1(𝒜)\eta_{\mathscr{A}}\colon\mathscr{A}\rightarrow Q_{1}(\mathscr{A}) to be the indicator function 𝟏x\mathbf{1}_{x} at xAx\in A: η𝒜(x)(x)=1\eta_{\mathscr{A}}(x)(x^{\prime})=1 if x=xx=x^{\prime} and η𝒜(x)(x)=0\eta_{\mathscr{A}}(x)(x^{\prime})=0 if xxx\neq x^{\prime}. Next we use the tensor product of matrices. For all d,d1d,d^{\prime}\geq 1, let μ𝒜d,d:QdQd(𝒜)Qdd(𝒜)\mu^{d,d^{\prime}}_{\mathscr{A}}\colon Q_{d}Q_{d^{\prime}}(\mathscr{A})\rightarrow Q_{dd^{\prime}}(\mathscr{A}) be defined for any P:Qd(A)Proj(d)P\colon Q_{d^{\prime}}(A)\to\mathrm{Proj}(d) as:

μ𝒜d,d(P)(x):=pQd(A)P(p)p(x)(xA)\mu^{d,d^{\prime}}_{\mathscr{A}}(P)(x):=\sum_{p\in Q_{d^{\prime}}(A)}P(p)\otimes p(x)\qquad(x\in A)

These maps η𝒜,μ𝒜d,d\eta_{\mathscr{A}},~{}\mu^{d,d^{\prime}}_{\mathscr{A}} are components of natural transformations η:1Q1,μd,d:QdQdQdd\eta\colon 1\Rightarrow Q_{1},~{}\mu^{d,d^{\prime}}\colon Q_{d}Q_{d^{\prime}}\Rightarrow Q_{dd^{\prime}} satisfying the axioms of graded monads [13]:

μ𝒜d,1Qd(η𝒜)=idQd(𝒜)=μ𝒜1,dηQd(𝒜)andμ𝒜d,dd′′Qd(μ𝒜d,d′′)=μ𝒜dd,d′′μQd′′(𝒜)d,d\mu^{d,1}_{\mathscr{A}}\circ Q_{d}(\eta_{\mathscr{A}})=\mathrm{id}_{Q_{d}(\mathscr{A})}=\mu^{1,d}_{\mathscr{A}}\circ\eta_{Q_{d}(\mathscr{A})}\quad\text{and}\quad\mu^{d,d^{\prime}d^{\prime\prime}}_{\mathscr{A}}\circ Q_{d}(\mu^{d^{\prime},d^{\prime\prime}}_{\mathscr{A}})=\mu^{dd^{\prime},d^{\prime\prime}}_{\mathscr{A}}\circ\mu^{d,d^{\prime}}_{Q_{d^{\prime\prime}}(\mathscr{A})}

Given 𝒜,\mathscr{A},\mathscr{B} relational structures, 𝒜+\mathscr{A}+\mathscr{B} is the relational structure over the set A+BA+B where the kk-ary relation R𝒜+R^{\mathscr{A}+\mathscr{B}} is defined as all the tuples (x1,,xk)(A+B)k(x_{1},\dots,x_{k})\in(A+B)^{k} satisfying either (x1,,xk)R𝒜(x_{1},\dots,x_{k})\in R^{\mathscr{A}} or (x1,,xk)R(x_{1},\dots,x_{k})\in R^{\mathscr{B}}. Also, we have the structure 0 over the empty set =0\emptyset=0 with no relations. Further we have a structure 11 over some singleton set 1={}1=\{\ast\} with the universal relation of arity kk, i.e. one has R1:=1k=1××1R^{1}:=1^{k}=1\times\cdots\times 1. Like the distribution monad DD, the quantum monad QdQ_{d} is also an affine monad since Qd(1)1Q_{d}(1)\cong 1. The following result is immediate:

Proposition 4.1.

𝒦(Qd)\mathcal{K}(Q_{d}) has a terminal object and finite coproducts.

Recall that semirings are rings without all additive inverses. That is, a semiring consists of a set SS and two binary operations +,:S×SS+,\cdot\colon S\times S\to S called addition and multiplication, such that (S,+)(S,+) is a commutative monoid, (S,)(S,\cdot) is a monoid, and there is a distributive law of multiplication over addition. A partial semiring is a semiring where at least one binary operation is partially defined, i.e. the binary operation is a partial function. The real unit interval [0,1][0,1] is a partial semiring with addition x+yx+y defined only when x+y1x+y\leq 1. For any d1d\geq 1, the set of dd-dimensional projections Proj(d)\mathrm{Proj}(d) is a partial semiring with addition p+qp+q defined only when pq=0p\cdot q=0.

Theorem 4.1.

The Kleisli category 𝒦(Qd)\mathcal{K}(Q_{d}) of the quantum monad QdQ_{d} is an effectus.

Proof.

The proof of Theorem 3.1 works for any SS-valued distributions monad with SS partial semiring since we did not use any fact about the unit interval [0,1][0,1] that do not hold for any other partial semiring. There we saw the details for S=[0,1]S=[0,1], and here we leave those for S=Proj(d)S=\mathrm{Proj(d)} to the reader. Similarly, the two pullback conditions and one joint monicity requirement from Definition 2.1 hold for the Kleisli category 𝒦(Qd)\mathcal{K}(Q_{d}) forgetting the homomorphism part (i.e. preserving relations). Thus, all that carries the same at the level of sets. Now we mention the parts about homomorphism. Let u:𝒫Qd(𝒜+)u\colon\mathscr{P}\to Q_{d}(\mathscr{A}+\mathscr{B}) be the Kleisli map defined (in the first pullback condition) for each aPa\in P as u(a)(x):=c(a)(x)Proj(d)u(a)(x):=c(a)(x)\in\mathrm{Proj}(d) for all xAx\in A, and u(a)(y):=d(a)(y)Proj(d)u(a)(y):=d(a)(y)\in\mathrm{Proj}(d) for all yBy\in B, where c:𝒫Qd(𝒜+1)c\colon\mathcal{P}\rightarrow Q_{d}(\mathscr{A}+1) and d:𝒫Qd(1+)d\colon\mathcal{P}\rightarrow Q_{d}(1+\mathscr{B}) are given homomorphisms. This Kleisli map uu is homomorphism by definition, since both cc and dd are homomorphisms by assumption. For the second pullback condition, now we suppose to have a homomorphism c:𝒫Qd(𝒜+)c\colon\mathcal{P}\rightarrow Q_{d}(\mathscr{A}+\mathscr{B}) and define u:𝒫Qd(𝒜)u\colon\mathcal{P}\rightarrow Q_{d}(\mathscr{A}) as u(a)(x):=c(a)(x)u(a)(x):=c(a)(x) for all aPa\in P and xAx\in A. Once again, here we have that uu is homomorphism by definition since cc is homomorphism by assumption. ∎

5 Quantum probabilistic reasoning

States in 𝒦(D)\mathcal{K}(D) are discrete probability measures. In 𝒦(Qd)\mathcal{K}(Q_{d}), states are quantum measurments (PVMs) also known as sharp observables [9]. We shall start describing what is the situation with respect to states and predicates in general for an arbitrary effectus 𝐁\mathbf{B}. Formally, a state on XX is a morphism in 𝐁\mathbf{B} with type 1X1\to X. A predicate on XX is a morphism in 𝐁\mathbf{B} with type X1+1X\to 1+1. There is an adjunction:

Pred(𝐁)op\textstyle{\mathrm{Pred}(\mathbf{B})^{\mathrm{op}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}Stat\scriptstyle{\mathrm{Stat}}\textstyle{\top}Stat(𝐁)\textstyle{\mathrm{Stat}(\mathbf{B})\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}Pred\scriptstyle{\mathrm{Pred}}𝐁\textstyle{\mathbf{B}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}

where 𝐁Stat(𝐁)\mathbf{B}\rightarrow\mathrm{Stat}(\mathbf{B}) and 𝐁Pred(𝐁)op\mathbf{B}\rightarrow\mathrm{Pred}(\mathbf{B})^{\mathrm{op}} are the functors defined on objects as Stat(X):=𝐁(1,X)\mathrm{Stat}(X):=\mathbf{B}(1,X) and Pred(X):=𝐁(X,1+1)\mathrm{Pred}(X):=\mathbf{B}(X,1+1), for any XX object of 𝐁\mathbf{B}; the action of these functors on a given morphism f:XYf\colon X\rightarrow Y in 𝐁\mathbf{B} produce morphisms Stat(f):Stat(X)Stat(Y)\mathrm{Stat}(f)\colon\mathrm{Stat}(X)\rightarrow\mathrm{Stat}(Y) and Pred(f):Pred(Y)Pred(X)\mathrm{Pred}(f)\colon\mathrm{Pred}(Y)\rightarrow\mathrm{Pred}(X) called state and predicate transformer defined by compositon in 𝐁\mathbf{B} as Stat(f)(p):=fp\mathrm{Stat}(f)(p):=f\circ p and Pred(f)(q):=qf\mathrm{Pred}(f)(q):=q\circ f, for any pStat(X)p\in\mathrm{Stat}(X) and qPred(Y)q\in\mathrm{Pred}(Y).

Morphisms in Pred(1)=Stat(1+1)=𝐁(1,1+1)\mathrm{Pred}(1)=\mathrm{Stat}(1+1)=\mathbf{B}(1,1+1) are called scalars. For probability theory, scalars are probabilities 𝒦(D)(1,1+1)[0,1]\mathcal{K}(D)(1,1+1)\cong[0,1]. Given a state pStat(X)p\in\mathrm{Stat}(X) and a predicate qPred(X)q\in\mathrm{Pred}(X) on the same object XX of 𝐁\mathbf{B}, we have by definition Stat(q)(p)=Pred(p)(q)=qp\mathrm{Stat}(q)(p)=\mathrm{Pred}(p)(q)=q\circ p. At the level of sets, scalars for the quantum case are projections 𝒦(Qd)(1,1+1)Proj(d)\mathcal{K}(Q_{d})(1,1+1)\cong\mathrm{Proj}(d). Thus, predicates are assignments of projections. Now, let’s consider Proj(d)\mathrm{Proj}(d) as relational structure of projections with a kk-ary relation RProj(d)R^{\mathrm{Proj}(d)} given by (p1,,pk)RProj(d)(p_{1},\dots,p_{k})\in R^{\mathrm{Proj}(d)} if and only if the projections p1,,pkp_{1},\dots,p_{k} pairwise commute: pipj=pjpip_{i}\cdot p_{j}=p_{j}\cdot p_{i} for all i,j=1,,ki,j=1,\dots,k.

Proposition 5.1.

Let 𝒜=(A,R𝒜)\mathscr{A}=(A,R^{\mathscr{A}}) be a relational structure. Then:

  • a state on 𝒜\mathscr{A} is a PVM pQd(𝒜)p\in Q_{d}(\mathscr{A}) on the underlying set AA;

  • a predicate q:𝒜Proj(d)q\colon\mathscr{A}\to\mathrm{Proj}(d) is an assignment of projections q:AProj(d)q\colon A\to\mathrm{Proj}(d) such that points appearing in some tuple in the relation R𝒜R^{\mathscr{A}} get assigned commuting projections, i.e. projections q(xi),q(xj)Proj(d)q(x_{i}),q(x_{j})\in\mathrm{Proj}(d) commute if there exists 𝐱Ak\mathbf{x}\in A^{k} such that:

    𝐱=(x1,,xi,,xj,,xk),𝐱R𝒜\mathbf{x}=(x_{1},\dots,x_{i},\dots,x_{j},\dots,x_{k}),\quad\mathbf{x}\in R^{\mathscr{A}}

Given a PVM and an assignment of commuting projections, we can compute their validity, or expected value, of the projections in the measure.

Proposition 5.2.

Let p=(px:xA),pxProj(d),p=(p_{x}:x\in A),~{}p_{x}\in\mathrm{Proj}(d), be a PVM and q=(qx:xA),qxProj(d),q=(q_{x}:x\in A),~{}q_{x}\in\mathrm{Proj}(d^{\prime}), a collection of pairwise commuting projections.

  • Validity of qq in pp is the projection pqProj(dd)p\models q\in\mathrm{Proj}(dd^{\prime}) defined as:

    pq:=xApxqx\begin{split}p\models q&:=\sum_{x\in A}p_{x}\otimes q_{x}\end{split}
  • Conditioning pp given qq is the PVM p|qQdd(𝒜)p|_{q}\in Q_{dd^{\prime}}(\mathscr{A}) defined if validity pqp\models q is non-zero as:

    p|q=(pxqxpq:xA)p|_{q}=\left(\frac{p_{x}\otimes q_{x}}{p\models q}:x\in A\right)

The rows of the following table correspond to scalars, states, predicates, and validity in three different effectuses (deterministic, probabilistic, quantum):

𝐄𝐟𝐟𝐞𝐜𝐭𝐮𝐬\mathbf{Effectus} 𝐒𝐞𝐭\mathbf{Set} 𝒦(D)\mathcal{K}(D) 𝒦(Qd)\mathcal{K}(Q_{d})
11+11\to 1+1 b{0,1}b\in\{0,1\} p[0,1]p\in[0,1] EProj(d)E\in\mathrm{Proj}(d)
1X1\to X xXx\in X (px)xX,px=1(p_{x})_{x\in X},~{}\sum p_{x}=1 (Ex)xX,Ex=𝟙(E_{x})_{x\in X},~{}\sum E_{x}=\mathbbm{1}
X1+1X\to 1+1 SXS\subseteq X f:X[0,1]f\colon X\to[0,1] q:XProj(d)q\colon X\to\mathrm{Proj}(d)
1X1+11\to X\to 1+1 xSx\in S pxf(x)\sum p_{x}\cdot f(x) Exq(x)\sum E_{x}\otimes q(x)

Acknowledgements

We thank Samson Abramsky, Rui Soares Barbosa, Aleks Kissinger, Sandra Palau, Matteo Sammartino, and Fabio Zanasi, as well as anonymous referees for all the wise comments.

References

  • [1]
  • [2] Samson Abramsky, Rui Soares Barbosa, Nadish de Silva & Octavio Zapata (2017): The Quantum Monad on Relational Structures. In: LIPIcs-Leibniz International Proceedings in Informatics, 83, Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 10.4230/LIPIcs.MFCS.2017.35.
  • [3] Albert Atserias, Laura Mančinska, David E Roberson, Robert Šámal, Simone Severini & Antonios Varvitsiotis (2018): Quantum and non-signalling graph isomorphisms. Journal of Combinatorial Theory, Series B, 10.1016/j.jctb.2018.11.002.
  • [4] Peter J Cameron, Ashley Montanaro, Michael W Newman, Simone Severini & Andreas Winter (2007): On the quantum chromatic number of a graph. The electronic journal of combinatorics 14(1), p. 81. Available at https://arxiv.org/abs/quant-ph/0608016.
  • [5] Mou-Hsiung Chang (2015): Quantum Stochastics. Cambridge Series in Statistical and Probabilistic Mathematics, Cambridge University Press, 10.1017/CBO9781107706545.
  • [6] Kenta Cho, Bart Jacobs, Bas Westerbaan & Abraham Westerbaan (2015): An introduction to effectus theory. arXiv preprint. Available at https://arxiv.org/abs/1512.05813.
  • [7] Richard Cleve & Rajat Mittal (2014): Characterization of binary constraint system games. In: International Colloquium on Automata, Languages, and Programming, Springer, pp. 320–331, 10.1007/978-3-662-43948-7.
  • [8] Michele Giry (1982): A categorical approach to probability theory. In: Categorical aspects of topology and analysis, Springer, pp. 68–85, 10.1007/BFb0092872.
  • [9] Teiko Heinosaari & Mário Ziman (2011): The mathematical language of quantum theory: from uncertainty to entanglement. Cambridge University Press, 10.1017/CBO9781139031103.
  • [10] Bart Jacobs (2011): Probabilities, distribution monads, and convex categories. Theoretical Computer Science 412(28), pp. 3323–3336, 10.1016/j.tcs.2011.04.005.
  • [11] Bart Jacobs (2015): New directions in categorical logic, for classical, probabilistic and quantum logic. Logical Methods in Computer Science (LMCS) 11(3), 10.2168/LMCS-11(3:24)2015.
  • [12] Laura Mančinska & David E Roberson (2016): Quantum homomorphisms. Journal of Combinatorial Theory, Series B 118, pp. 228–267, 10.1016/j.jctb.2015.12.009.
  • [13] Stefan Milius, Dirk Pattinson & Lutz Schröder (2015): Generic trace semantics and graded monads. In: LIPIcs-Leibniz International Proceedings in Informatics, 35, Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 10.4230/LIPIcs.CALCO.2015.253.
  • [14] David E Roberson: Variations on a theme: Graph homomorphisms. PhD’s thesis, University of Waterloo, 2013. Available at http://hdl.handle.net/10012/7814.