Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 www.elsevier.com/locate/entcs

Bases in Diagrammatic Quantum Protocols

Bob Coecke1 ,2 Simon Perdrix3 ,4

Oxford University Computing Laboratory Wolfson Building, Parks Road, OX1 3QD Oxford, UK

Eric´ Oliver Paquette5 ,6

D´epartement d’Informatique et de Recherche Op´erationelle LITQ, Universit´edeMontr´eal, Montr´eal, Canada

Abstract This paper contains two new results:

(i) We amend the notion of abstract basis in a dagger symmetric , as well as its corre- sponding graphical representation, in order to accommodate non-self- dagger compact structures; this is crucial for obtaining a planar diagrammatical representation of the induced dagger compact structure as well as for representing many complementary bases within one diagrammatic calculus.

(ii) We (crucially) rely on these basis structures in a purely diagrammatic derivation of the transfer protocol; this derivation provides interesting insights in the distinct structural resources required for state-transfer and teleportation as models of .

Keywords: categorical semantics, quantum protocols, diagrammatic calculus, abstract bases.

1 Introduction

Categorical axiomatisation of quantum computation and information, a research program initiated by Abramsky and Coecke [1], enables rigorous, abstract, dia-

1 B. C. is supported by EPSRC Advanced Research Fellowship EP/D072786/1 entitled The Structure of Quantum Information and its Ramifications for IT. He thanks Bertfried Fauser for useful comments. 2 Email: [email protected] 3 S. P. is employed on the EC-IST-FP6 STREP 033763 entitled Foundational Structures in Quantum Information and Computation –acronymQICS. 4 Email: [email protected] 5 E.´ O. P. thanks Oxford University Computing Laboratory, Bob Coecke and Mehrnoosh Sadrzadeh for their hospitality during his visit in which part of this work was realised. This visit was supported by EPSRC Advanced Research Fellowship EP/D072786/1. He also thanks Gilles Brassard’s chaire de recherche du Canada en informatique quantique for financing and Michel Boyer for discussions and feedback on some problems that are discussed in the present paper. 6 Email: [email protected]

1571-0661/$ – see front matter © 2008 Elsevier B.V. All rights reserved. doi:10.1016/j.entcs.2008.10.009 132 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 grammatic and automated design of quantum protocols. They showed that dagger compact categories capture essential structures of the quantum mechanical formal- ism including unitarity, (self-)adjointness, trace, Bell-states, and Dirac calculus. These then enable design of the and related protocols [1,4]. In their work Abramsky and Coecke heavily relied on Kelly and Laplaza’s earlier work on coherence for compact categories [16]. A particularly appealing feature of dagger compact categories, already present in Kelly’s earlier work, is that they come with an intuitive diagrammatic calculus, made precise by Selinger in [23], extending the one due to Joyal and Street [13]. A more informal use of diagrammatic notation traces back to Penrose’s work in the 1970’s [20]. Another notable contribution to the categorical axiomatisation of quantum computation and information program, also in [23], is Selinger’s construction of mixed states and completely positive maps. Quantum teleportation involves measurement and operations that depend on measurement outcomes. The dagger compact structure can only handle them in a post-selected manner, that is, by conditioning on classical data. One (ugly) so- lution is to represent classical data syntactically, by ‘indices’ which relate control operations to measurement outcomes [4]. If one wants to represent classical data as explicit categorical structure one needs to go beyond dagger compactness. In [1] Abramsky and Coecke used biproducts for this purpose. However, as argued in [5], the biproduct requirement prevents the passage from the vectorial to the projective realm, a step which is essential to eliminate redundant global phase data. This in particular meant that the approach did not capture the essential decoherence com- ponent of quantum measurements, which transforms superposed states into classical mixtures. This problem was solved in [5]and[23] by introducing density operators. But, non of these additive structures admits elegant diagrammatic representa- tion. On the other hand, the even more abstract classical objects introduced by CoeckeandPavlovicin[9], inspired on Carboni and Walter’s axiomatisation of the in terms of their Frobenius law [3], are expressed entirely in terms of the multiplicative tensor structure. In [7] it was shown by two of the present authors that these classical objects did allow elegant diagrammatic representation: computation proceeds by the purely diagrammatic so-called spider theorem –vari- ants of this theorem also known in other contexts such as topological quantum field theories [17], abstract [18] and representation theory [19,andref- erences therein]. Classical objects moreover admit an operational interpretation in terms of copying and erasing [9]. More precisely, they exploit the fact that while classical data can be arbitrarily copied and erased, quantum data can’t. Formally, classical objects ‘refine’ the dagger compact structures of [1] in the sense that if an object comes with a classical object structure than it also admits a compact struc- ture [8]. Recently, Coecke, Pavlovic and Vicary showed that for finite dimensional Hilbert spaces these classical objects, or more precisely, special co-commutative dag- ger Frobenius comonoids, are in one-to-one correspondence with orthonormal bases [10]. Also recently, Coecke and Duncan showed that they enable to axiomatise the key quantum mechanical notion of complementary [6]. This enabled to reach a milestone in this research program, namely, abstract computation of the B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 133 quantum Fourier transform, the quantum component of Shor’s factoring algorithm. However, all wasn’t that shiny and bright. Firstly, these classical objects forced objects to be self-dual relative to the com- pact structure, that is, A∗ = A. Concretely, a classical object consists of an object A, together with a copying operation δ : A → A ⊗ A and a deleting operation γ : A → I. The induced compact structure is then given by δ ◦ γ† : I → A ⊗ A. But general compact structures are of type I → A∗ ⊗ A. Hence the ones induced by classical objects in addition satisfy A∗ = A. This is problematic for the graphical calculus in which a compact structure depicts as a ‘cup’: A∗ A

A key property of these cups is that ‘boxes’ can be slided along these [4,23]: B∗ A B∗ A

= ∗ A B

But when considering ‘compound wires’ this becomes: B∗ C∗ A B∗ C∗ A

= ∗ A BC and in the case of self-dual compact structure we have B∗ = B, C∗ = C,andin particular, for the compound cup, C ⊗ B = B∗ ⊗ C∗ = B ⊗ C. Secondly, when considering several classical objects at once, the induced com- pact structures do not necessarily coincide, which has severe consequences for the diagrammatic calculus. For example, while in [6] the authors were able to axioma- tise the complementary X-andZ-observables, by no means they could adjoin the Y - on the same footing, exactly because it induces a different compact structure than the X-andZ-observables do – see Lemma 3.7 below. In the conclu- sion to this paper we provide explicit calculations which support this fact. Thirdly, maybe less important to some, is that in FdHilb, the category of finite dimensional Hilbert spaces and linear maps, basis-independence of compact structures requires them to be non-self-dual, something which directly related to the fact that there is no canonical isomorphism of type H→H∗,whereH∗ is either the dual or conjugate Hilbert space. More precisely, there is a basis-independent compact structure of type C →H∗ ⊗H, namely the counterpart to the identity via the canonical correspondence H∗ ⊗H[H  H], while a canonical map of type C →H⊗Hwould induce a canonical one of type H→H∗,whichthereisn’t. In this paper, firstly, we introduce an elaboration on the classical objects of [9], to which we refer as basis structures, which bypasses these problems. While classical 134 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 objects ‘factorise’ compact structures in terms of a comonoid multiplication and its unit, we introduce a third component, namely, a unitary comonoid homomorphism. This homomorphism is an explicit witness for the passage from a space to its dual. A different but equivalent perspective is that in dagger symmetric monoidal cate- gories, classical objects do not refine but are complementary to compact structures. Together they then induce our basis structures. These bases structures allow for the ‘non-trivial duals’, required, for example, to accommodate Selinger’s diagrammatic representation of mixed states and completely positive maps. Whenever dealing with several observables, for example the X-, the Z-aswellastheY -observable, we can model them relative to a unique compact structure. Next, we show that these basis structures enable a diagrammatic description, among other protocols, of Perdrix’ state transfer protocol [21]. State transfer is key to the unification of measurement-only and one-way models of quantum computa- tion [12]. Moreover, state transfer, as a substitute for teleportation, is a key feature for optimising the resources of measurement-only quantum computation [22]. More generally, measurement-based quantum computational models have recently become very prominent within the landscape of quantum computing due to the their great promise for actual implementation [15]. The diagrammatic analysis of both tele- portation and state transfer reveals important structural differences between these two measurement-only quantum computational models. In this paper we chose to present classical data by indices. We do this to stress that, for state transfer, contra teleportation, basis structures are already required even when representing classical data as indices. Since classical objects were specif- ically crafted to represent classical information flow as categorical structure, and since basis structures extend classical objects, we could have easily provided a fully comprehensive purely categorical description of classical data. But then the main point we wanted to stress here wouldn’t have come out as clear.

2 Categorical semantics and graphical language

2.1 Dagger symmetric monoidal category A symmetric monoidal category consists of a category C, a bifunctor −⊗− : C×C → C, a unit object I and natural isomorphisms λA : A  A⊗I, αA,B,C : A⊗(B ⊗C)  (A ⊗ B) ⊗ C and σA,B : A ⊗ B  B ⊗ A satisfying the usual coherence conditions. A †-symmetric monoidal category (†-SMC) [23] is a symmetric monoidal cat- egory together with an involutive, identity-on-objects, contravariant endofunctor † : C→C, which preserves the monoidal structure, i.e.

(g ◦ f)† = f † ◦ g† f †† = f (f ⊗ g)† = f † ⊗ g†

† −1 † −1 † −1 and also αA,B,C = αA,B,C, λA = λA and σA,B = σA,B, that is, the natural isomor- phisms of the structures are ‘unitary’. Indeed, in a †-SMC, a f : A → B is unitary if it is an isomorphism such that f −1 = f †. In what follows, for convenience, we will take α, λ and ρ to be strict. B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 135 Example 2.1 The category FdHilb, of finite dim. Hilbert spaces, linear maps and tensor products, is a †-SMC, where (−)† is the adjoint.

A rigorous graphical language for symmetric monoidal categories has been in- troduced by Joyal and Street [13] and extended to †-SMCs by Selinger [23]. Such a graphical calculus is handy not only to get a representation of the information flow but is also a powerful proof technique. Indeed, in a †-SMC (and richer structures which we introduce below), an equation holds if and only if there is an equality between their respective graphical representations [13,23]. Elementary components of this calculus are as follows: - The identity 1I : I → I is represented by the empty picture. - A morphism f : A1 ⊗...⊗An → B1 ⊗...⊗Bm and the identity 1A : A → A are depicted respectively as B1 Bm ... A

f 1A = ... A A A1 An -Thecompositeg ◦ f : A → C for f : A → B and g : B → C and tensor f ⊗ g : A ⊗ C → B ⊗ D for f : A → B and g : C → D are graphically represented as

C C B ⊗ D B D g g ◦ f f ⊗ g = f g = B f A ⊗ C A C A A

-GivenA and B, a component of the symmetry natural isomorphism σA,B : A ⊗ B → B ⊗ A and the dagger of a morphism f : A → B are depicted as B A BA A A

σA,B = f † = f

A B BA B B that is, (−)† is graphically represented by ‘vertical reflection’. - Finally, for g ◦ f and f ⊗ g as above, (g ◦ f)† and (f ⊗ g)† are depicted as A A A ⊗ C A C g g ◦ f f ⊗ g = f g = B f B ⊗ D B D C C 136 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 2.2 Dagger compact structure

The following definition of †-compact structure ‘localises’ the †-compact categories that are key to Abramsky and Coecke’s derivation of quantum teleportation in [1].

∗ Definition 2.2 A †-compact structure in a †-SMC is a pair (A, A : A ⊗ A → I) such that † (A ⊗ 1A) ◦ (1A ⊗ σA,A∗ ) ◦ (1A ⊗ A)=1A or, graphically, A A = A AA

Example 2.3 The conjugate Hilbert space H∗ of a Hilbert space H is the Hilbert space with the same vectors as H but with scalar multiplication and inner-product conjugated, that is, explicitly,

c •H∗ ψ =¯c •H ψ and ψ | φH∗ = φ | ψH .

∗ In FdHilb, for any H∈|FdHilb|,(H,H : H⊗H → C)isa†-compact structure where H∗ is the conjugate space of H,and

∗ H : H⊗H → C :: ei ⊗ e¯j →ei|ej .

Definition 2.4 A †-compact category is a †-SMC where each object A comes with a †-compact structure, and where the †-compact structures on an object A and its ∗ dual A are connected by A∗ = A ◦ σA∗,A, which depicts as

A A∗ = ∗ A A A∗ A The graphical language of †-SMCs can be extended to †-compact categories as follows [23]. The identity 1A∗ is represented as an arrow with opposite orientation and labeled by A:

= A∗ A ∗ ∗ and X : X ⊗ X → I with X ∈{A, A } and their adjoints depict as:

A A∗ = = A A AA AA B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 137 AA AA = A = A A A∗

The axiomatic requirements for †-compact categories depict as:

A = = A A A

Definition 2.5 A †-compact category is strict if (A ⊗ B)∗ = B∗ ⊗ A∗ and

A⊗B = A ◦ (1A ⊗ B ⊗ 1A∗ ) , diagrammatically this is

= A ⊗ B BA

In any compact category, the assignment (−)∗ on objects can be extended to a contravariant whose assignment on maps f : A → B to

∗ ∗ ∗ f : B → A := (1A∗ ⊗ B) ◦ (1A∗ ⊗ f ⊗ 1B∗ ) ◦ (ηA ⊗ 1B∗ ) .

Such a mapping is depicted as: A A A

f ∗ = f = f

B B B

†∗ ∗† Moreover, we can define a covariant functor (−)∗ := (−) =(−) whose as- signment on morphisms is given by B B B

f∗ = f = f

A A A Thus, given an f : A → B, we get the following graphical notation [23]: 138 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152

B B B

f f = f∗

A A A

A A A A

f † = f f = f ∗

B B B B

∗ ◦ that is, (−)∗ is graphically represented by horizontal reflection and (−) by 180 † ∗ rotation. This captures (−) =((−) )∗ and similar equations.

3 Bases axiomatisation

3.1 Cloning vs copying The no-cloning theorem [25], a well-known result of quantum information theory, states that for any Hilbert space of finite dimension greater than two, there is no quantum evolution f : H→H⊗Hsuch that for any |φ∈H, f(|φ)=|φ⊗|φ. Despite of the no-cloning theorem, copying is allowed by quantum mechanics: for a given orthonormal basis {ek,k ∈ K}, the linear operator δ : H→H⊗H:: ek → † ek ⊗ ek is an isometry (i.e. δ ◦ δ =1H), thus a valid quantum evolution. Here, the only vectors that are truly copied are the basis vectors. Coecke and Pavlovic [9] relied on this fact when axiomatising bases as †-Frobenius structures. Definition 3.1 A †-Frobenius structure in a †-SMC is an internal co-commutative comonoid (A, δA : A → A ⊗ A, γA : A → I) such that

† † † δA ◦ δA =1A and δA ◦ δA =(δA ⊗ 1A) ◦ (1A ⊗ δA) .

The structural morphisms therein are diagrammatically represented as [7]:

A ⊗ A AA

δA = γA = A A A A

A A A δA = = γA A ⊗ A A A A and their axiomatic conditions depict as: B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 139

== = = A A A A A A A

A = =

A A AA

Example 3.2 Let {|0 , |1} be the so-called standard basis of H2, the Hilbert space of dimension 2. Let

δstd : H2 →H2 ⊗H2 :: |j →|jj and γstd : H2 → C :: |j → 1 . (1)

Then (H2,δstd,γstd)isa†-Frobenius structure in FdHilb. Theorem 3.3 [10] There is a one-to-one correspondence between †-Frobenius struc- ture and orthonormal bases in FdHilb; this correspondence is established by eqs.(1). Thus, †-Frobenius structures truly axiomatise orthonormal bases.

Definition 3.4 Let (A, δA,γA)and(B,δB ,γB)betwo†-Frobenius structures, then f : A → B is a partial map if δB ◦ f =(f ⊗ f) ◦ δA, diagrammatically B B BB f f = f A A

Moreover, it is a total map if also γB ◦ f = γA, which depicts as

B = f A A

Finally, it is a permutation if, in addition to the previous, f is unitary. Carboni and Walters showed in [3] that in the category of finite sets, relations and the cartesian product, for a ‘suitably restricted’ notion of †-Frobenius structures, these partial and total maps, and permutations, correspond to the usual notion. As a consequence of Theorem 3.3, for arbitrary †-Frobenius structures, in FdHilb these partial and total maps, and permutations, correspond to the usual notion – a simple computation easily demonstrates this. They map the basis vectors of one classical structure on the basis vectors of the other classical structure. 140 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152

Definition 3.5 Let (A, δA,γA)bea†-Frobenius structure, then a unitary mor- phism f : A → A is a phase map if

(f ⊗ 1A) ◦ δA = δA ◦ f =(1A ⊗ f) ◦ δA , this is A A AAAA f f = = f A A A FdHilb ⊗ ◦ ◦ |  | In the equality (f 1H) δH = δH f implies for f = ij fij i j that i fij|ik = i fij|ii for all k, hence ((fij)ij) must be diagonal. Unitarity assures that all these diagonal elements are of the form eiθ, hence the name ‘phase map’.

Lemma 3.6 [8] In a †-SMC, whenever (A, δA,γA) is a †-Frobenius structure, then † ∗ (A, A := γA ◦ δA) is a †-compact structure, with A = A. Proof.

= =

A A A 2

So †-Frobenius structure ‘factorises’ †-compact structure. However, this forces A∗ = A. 7 As a consequence, a †-compact category in which the †-compact structure factorises as †-Frobenius structure cannot be strict! (in the sense of Definition 2.5)

Lemma 3.7 In a †-SMC, if (A, δA,γA) is a †-Frobenius structure, and U : A → A † † is unitary, then (A, (U ⊗ U) ◦ δA ◦ U ,γA ◦ U ) is also a †-Frobenius structure. These two †-Frobenius structures induce the same †-compact structure if and only if U∗ = U.

† † Proof. The †-compact structure induced by (A, (U ⊗ U) ◦ δA ◦ U ,γA ◦ U )is

U U U U U U U U = = = U U

7 Note that this does not obstruct modelling bases in FdHilb. The reason of this is that there is no unique dagger compact structure on FdHilb but that many different ones can be chosen. Those include the ones wherewe‘pick’H∗ to be the conjugate space as well as the ones where we ‘pick’ H∗ to be H itself. B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 141 ∗ and U ◦ U =1A if and only if U∗ = U. 2

In FdHilb the equation U∗ = U implies that the matrix representation of U only involves real numbers. It then easily follows that the X-, Y -andZ-bases, i.e.,

{|0 + |1, |0−|1} {|0 + i|1, |0−i|1} {|0, |1}

cannotbecastas†-Frobenius structures which share the same compact structure, since transforming them in each other requires complex matrix entries.

3.2 Dagger dual Frobenius structure We now introduce a different ‘factorisation’ of compact structures, as †-dual Frobe- nius structure. ThisdoesnotimposeA∗ = A. Intuitively, the axiomatisation of bases in a dagger compact category implies that every object A has two duals: - First, the object A∗ which comes from the †-compact structure and - The object A itself as it is self-dual when equipped with a †-Frobenius structure (A, δA,γA) (see lemma 3.6). These two duals of A areisomorphic[16]. Instead of requiring A = A∗ as was done in [9,8], we make this isomorphism – the dualiser between A and A∗ – explicit.

Definition 3.8 A †-dual Frobenius structure in a †-SMC is a quadruple

∗ (A, δA : A → A ⊗ A, γA : A → I,dA : A → A )

such that

• (A, δA,γA)isa†-Frobenius structure.

• dA is unitary.

Theorem 3.9 For a given †-SMC,

(i) If (A, δA,γA) is a †-Frobenius structure and (A, A) is a †-compact structure, then (A, δA,γA,dA) is a †-dual Frobenius structure, where

† † † dA := (γA ⊗ 1A∗ ) ◦ (δA ⊗ 1A∗ ) ◦ (1A ⊗ A) ,

that is, graphically,

∗ A∗ A

dA := A A A

(ii) If (A, δA,γ,dA) is a †-dual Frobenius structure then (A, δA,γA) is a †-Frobenius 142 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152

structure and (A, A) is a †-compact structure, where

† † A := γA ◦ δA ◦ (1A ⊗ dA))

which is

A = dA ∗ A A A A∗

† † Proof. (i) Unitarity of dA means dA ◦dA =1A and dA ◦dA =1A∗ which holds since

A A A A dA

= = = dA

A A A A A

A∗ A A∗

dA A = = = A dA A ∗ ∗ ∗ A A A

(ii) We have †-compactness for (A, A)since

A A dA A A = = = A dA A A A A B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 143 2 Definition 3.10 A †-compact category with bases is a †-SMC such that every object A comes with †-dual Frobenius structure

∗ (A, δA : A → A ⊗ A, γA : A → I,dA : A → A ) , and where the †-dual Frobenius structures on object A and its dual A∗ are connected † by the fact that dA∗ = dA and that dA is a permutation. Lemma 3.11 A †-compact category with bases is ‘indeed’ a †-compact category. † † Proof. For each object A,letA := γA ◦ δA ◦ (1A ⊗ dA); according to Thm. 3.9 this entails that (A, A)isa†-compact structure. Moreover, A∗ = A ◦ σA∗,A since

dA∗

dA∗ dA∗ dA∗ dA = dA∗ = dA∗ = dA∗ =

∗ ∗ A A A∗ A A∗ A A∗ A A A where the two first steps use the fact that dA∗ is a function and the third one uses unitarity of dA∗ . 2

The graphical language for †-compact categories can now be extended to †- compact categories with bases: - First, the dualiser depicts as: A A

dA = A A -The†-dual Frobenius structure ‘factorises’ the †-compact structure:

= A A - Finally, the coherence conditions are those of the †-Frobenius structures and:

= , = and =

A A AAAA

Definition 3.12 A strict †-compact category with bases is a †-compact category 144 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 with bases which is such that for any objects A and B we have

dA⊗B =(dB ⊗ dA) ◦ σA,B and also

δA⊗B =(1A ⊗ σA,B ⊗ 1B) ◦ (δA ⊗ δB)andγA⊗B = γA ⊗ γB .

Graphically, these are

B A , , and = = =

A ⊗ B A B A ⊗ B A B A ⊗ B AB

Lemma 3.13 Astrict†-compact category with bases is ‘indeed’ strict. Proof. Since

= = = A ⊗ BA⊗ B AB A B we indeed obtain strictness as in Defn. 2.5. 2

3.3 Spider theorem for basis structures The spider theorem for †-Frobenius structures of [7] also holds in †-compact cate- gories with bases provided we allow the spider’s legs to be directed. Hence a spider now takes the form

...

...

where the diamonds either represent an up- or a down-arrow. There are six special cases, namely

= = =

= = = B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 145 in which we can drop the dot. However, in the six cases

the presence of the dot is essential.

Theorem 3.14 (oriented spider) Let A and A∗ be objects in a †-compact cate- gory with bases. Then, in the graphical representation, each ‘connected’ diagram Ξ obtained from †-SMC structure and the †-dual Frobenius structure both on A and A∗ is equal to a ‘spider with directed legs’, of which the inputs/outputs have the same orientation as the inputs/outputs of Ξ.

Hence, every such ‘connected’ diagram only depends on its number of inputs, it’s number of outputs, and the directions of the arrows at these inputs and outputs.

4Protocols

4.1 The quantum teleportation protocol

The quantum teleportation protocol [2] involves three qubits a, b, c and two parties Alice and Bob. At the start of the protocol: - The pair (a, b) is in state |00 + |11, and qubit a is in Alice’s possession while qubit b is in Bob’s possession. - Qubit c is in an unknown state |φ and in Alice’s possession. To realise the protocol, the following steps are taken: (i) Alice performs a Bell basis measurement on her pair of qubits (c, a), (ii) Alice sends the classical outcome x of this measurement to Bob, and,

(iii) Bob applies a particular – on x depending – unitary operation Ux. As a result qubit b will now be the unknown state |φ. The unitary transformation Ux applied by Bob is one of the Pauli operators, and the Bell measurement applied by Alice is composed of four projectors {Px}x=0..3, such that for any x,

† † † Px =(Ux ⊗ 1H) ◦ (δstd ◦ γstd) ◦ (γstd ◦ δstd) ◦ (Ux ⊗ 1H)

Thus, the protocol of teleportation can be described in the graphical language of †-SMC with †-Frobenius structures: 146 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 |φ

Ux Ux Ux

{Px}

Ux

|φ |00 + |11 where we used following diagrammatic notation:

:=

Note here in particular, as compared to the presentation in [1], that all arrows point in the direction of the actual physical flow of time. It are the ‘dots’ (= dualisers) which enable it. Lemma 3.6 provides a both intuitive and rigorous proof of correctness for teleportation:

Ux Ux

= =

Ux Ux

This diagrammatic proof very much resembles ‘yanking a rope’ as it was the case in the original diagrammatic proof in [1] for correctness of the teleportation protocol, with as only difference the ‘annihilation’ of the two dots involved (see §4.4 below). Formally however, our proof is not based on †-compact structures but on †-Frobenius structures. This presentation enables easy comparison of the teleportation protocol with the following one.

4.2 The quantum state transfer protocol The state transfer involves only two qubits (a, b). At the start of the protocol: - Qubit a is an unknown state |φ, and, - Qubit b is in state |0 + |1. To realise the protocol, the following steps are taken: (i) Qubits a and b are measured according to the parity measurement, (ii) Qubit a is measured in the diagonal basis, and,

(iii) A unitary operation Uxy is applied on qubit b, depending on the classical out- B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 147 comes x, y of the previous two measurements. As a result qubit b will now be the unknown state |φ. A parity measurement is a partial measurement. The state of the measured 2-qubit system is not projected on a vector, but on a plane: either on the even plane spanned by |00 and |11 or on the odd plane spanned by |01 and |10. The projectors are, for x ∈{0, 1},

† † πx =(1H ⊗ fx) ◦ δstd ◦ δstd ◦ (1H ⊗ fx)

where fx is a permutation. A diagonal basis measurement is a 1-qubit measurement described by the following projectors, for y ∈{0, 1} and gy unitary phase maps,

 † † Py = gy ◦ γstd ◦ γstd ◦ gy .

In the graphical language of †-SMC with †-Frobenius structures we obtain:

gy gy

|φ gy fx Uxy  {PY } fx {Px}

|φ |0 + |1

fx

The †-Frobenius structure and the properties of the permutations and phase mor- phisms provide a diagrammatic proof of the state transfer: 148 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152

gy gy gy gy

gy fx gy gy gy

fx = = = =

fx fx

4.3 Unifying state transfer and teleportation In sections 4.1 and 4.2, the graphical calculus for †-SMC with †-Frobenius structures has been used to give a diagrammatic representation and proof of both teleportation and state transfer. State transfer was initially introduced to optimise the resources of measurement-only quantum computation [21]: while teleportation requires three qubits state transfer requires only two qubits. The diagrammatic representation of these two protocols leads to a better understanding of the foundational struc- tures of measurement-only quantum computation: one can transform teleportation into state transfer and vice versa just by applying the Frobenius equation as it is illustrated in the following diagram

=

where, for reasons of clarity, all unitary transformations are taken to be identity. While state transfer requires less ancillary qubits than teleportation, it needs more structural resources in the sense that the unitary transformations fx and gy have to be permutations and phase morphisms respectively. Also, while for telepor- tation we could rely on compact structure only, as in [1], for state transfer, even in post-selected form, the use of Frobenius structures (= a base)isessential.

4.4 Flow of information Our diagrammatic proofs of teleportation and state transfer rely on †-Frobenius structures in †-SMCs rather than on †-compact structure. However, compactness allows both Joyal, Street and Verity’s construction of the trace [14]aswellas Selinger’s CPM construction [23]. One can use †-compact categories with bases B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 149 in order to take advantage of both axiomatisations. In such a categorical frame- work the diagrammatic proofs of teleportation due to Abramsky and Coecke based on compact structure can be converted into the one presented in this paper using basis structures, and vice versa.

Lemma 4.1 In a †-compact category with bases, for any object A we have

† † † † † (dA ⊗ 1A) ◦ A∗ = δA ◦ γA =(1A ⊗ dA) ◦ A

that is, graphically,

==

Note that while equality of the left and the right picture reflects a fact derivable in compact categories for arbitrary morphisms – involving the transposed (−)∗ – the picture in the middle can only be given meaning for basis structure. We have:

Ux Ux Ux Ux

= = = =

Ux Ux Ux Ux

Note in particular that in

=

the directions of the arrows in picture on the left can be interpreted as • the physical flow of information, since they respect causal ordering, while the directions of the arrows in picture on the right, which do not respect causal ordering, can be interpreted as • the logical flow of information. This logical flow of information guides the unknown input state to where it will end up at the end of the protocol. Having both compact structure and Frobenius structure available enables interchange between these two complementary views. 150 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 5Conclusion

We introduced non-self-dual basis structures. Previous accounts introduced abstract bases by factoring a given necessarily self-dual †-compact structure in a copying- deleting pair:

=

Our account introduced abstract bases by factoring an arbirtary (not necessar- ily self-dual) †-compact structure in a †-compact structure in a copying-deleting- dualiser triple:

=

In the light of the correspondence between copying-deleting pairs and orthonormal bases in FdHilb which was established in [10] it are the latter which, given a †- compact structure, produce all orthonormal bases as its factorisations. Indeed, if, forexample,weconsiderthe†-compact structure

 : C →H2 ⊗H2 :: 1 →|00 + |11 then its factorisations produce the Z-basis a the X-basis, respectively as ⎧ ⎨ |0 →|00 H →H ⊗H † C →H →|  |  δZ : 2 2 2 :: ⎩ γZ : 2 :: 1 0 + 1 |1 →|11 ⎧ ⎨ |0 + |1 → √1 (|0 + |1) ⊗ (|0 + |1) √ 2 † → |  δX :: ⎩ γX :: 1 2 0 |0−|1 → √1 (|0−|1) ⊗ (|0−|1) 2 but not the Y -basis. We verify this now explicitly. Consider ⎧ ⎨ |0 + i|1 → √1 (|0 + i|1) ⊗ (|0 + i|1) H →H ⊗H 2 δY : 2 2 2 :: ⎩ |0−i|1 → √1 (|0−i|1) ⊗ (|0−i|1) 2 which copies the Y -basis together with the uniform deleting operation √ † 1 1 γY :: 1 → √ (|0 + i|1)+√ (|0−i|1)= 2|0 , 2 2 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152 151 which is the only one that yields a †-Frobenius structure together with δY .The induced †-compact structure is now

  : C →H2 ⊗H2 :: 1 →|00−|11 so not equal to . 8 However, relative to the fixed †-compact structure  we can define a dualiser as

=

that is, explicitly ⎧ ⎨ |0 →|0 H →H dY : 2 2 :: ⎩ , |1 →−|1 that is, the Z-gate. Adjoining dualisers only requires a minor refinement of the spider-theorem: the spider’s legs are now oriented. And the dualiser allows to retain planarity in the graphical calculus by comprehending symmetry:

=

A ⊗ B AB

That the structures introduced in this paper are by no means ad hoc is witnesses by the fact that very similar ones have recently occurred in a variety contexts: conformal field theory [11, and follow-up papers], theory of group representations [19, and references therein] and categorical representation of C*-algebras [24]. It would be worthwhile to investigate the connections between all of these.

References

[1] S. Abramsky and B. Coecke. A categorical semantics of quantum protocols. In Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, LICS 2004, pages 415–425. IEEE Computer Society Press, 2004.

[2] C. H. Bennett, G. Brassard, C. Cr´epeau, R. Jozsa, A. Peres, and W. K. Wootters. Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels. Physical Review Letters, 70:1895–1899, 1993.

[3] A. Carboni and R. F. C. Walters. Cartesian bicategories I. Advances in Mathematics, 49:11–32, 1987.

[4] B. Coecke. Kindergarten quantum mechanics. In Quantum Theory: Reconsiderations of the Foundations III, pages 81–98. AIP Press, 2005. arXiv:quant-ph/0510032.

8  The general form of a †-Frobenius structure representing the Y -axis is obtained by setting δY (|0+i|1)=  iθ   δY (|0 + i|1), δY (|0−i|1)=e · δY (|0−i|1), γY (|0 + i|1)=γY (|0 + i|1)andγY (|0−i|1)= −iθ   e · γY (|0−i|1), for which one straightforwardly verifies that there is no θ such that δY ◦ γY = . 152 B. Coecke et al. / Electronic Notes in Theoretical Computer Science 218 (2008) 131–152

[5] B. Coecke. De-linearizing linearity: projective quantum axiomatics from strong compact closure. Electronic Notes in Theoretical Computer Science, 170:49–72, 2007. arXiv:quant-ph/0506134.v2.

[6] B. Coecke and R. Duncan. Interacting quantum observables. In Proceedings of the 35th International Colloquium on Automata, Languages and Programming, ICALP 2008. Lecture Notes in Computer Science, 2008. to appear.

[7] B. Coecke and E. O. Paquette. Generalized measurements and Naimarks theorem without sums. In P. Selinger, editor, Proceedings of Quantum Programming Languages IV, 2006. arXiv:quant- ph/0608072.v2.

[8]B.Coecke,E.O.Paquette,andD.Pavlovic. Semantic Techniques in Quantum Computation, S. Gay and I. Mackie, Eds., chapter Classical and quantum structures. Cambridge University Press, 2008. to appear.

[9] B. Coecke and D. Pavlovic. The Mathematics of Quantum Computation and Technology, G. Chen, L. Kauffman and S. Lamonaco, Eds., chapter Quantum measurements without sums, pages 567–604. CRC Applied Mathematics Nonlinear Science, Taylor and Francis, 2007. arXiv:quant-ph/0608035.

[10] B. Coecke, D. Pavlovic, and J. Vicary. Commutative dagger Frobenius algebras in FdHilb are bases. Oxford University Computing Laboratory Research Report RR-08-03, 2008.

[11] J. Fuchs, I Runkel, and C Schweigert. TFT construction of RCFT correlators I: Partition functions. Nuclear Physics B, 646:353–497, 2002. hep-th/0204148.

[12] Ph. Jorrand and S. Perdrix. Unifying quantum computation with projective measurements only and one-way quantum computation. In Quantum Informatics 2004, Proceedings of the SPIE, volume 5833, pages 44–51, 2005.

[13] A. Joyal and R. Street. The geometry of tensor calculus I. Advances in Mathematics, 88:55–112, 1991.

[14] A. Joyal, R. Street, and D. Verity. Traced monoidal categories. Mathematical Proceedings of the Cambridge Philosophical Society, 3:447–468, 1996.

[15] R. Jozsa. An introduction to measurement based quantum computation. arXiv:quant-ph/0508124v2.

[16] G. M. Kelly and M. L. Laplaza. Coherence for compact closed categories. Journal of Pure and Applied Algebra, 19:194–213, 1980.

[17] J. Kock. Frobenius Algebras and 2D Topological Quantum Field Theories. Cambridge UP, 2003.

[18] S. Lack. Composing PROPs. Theory and Applications of Categories, 13:147–163, 2004.

[19] S. E. Morrison. A diagrammatic category for the representation theory of Uq(sln). PhD thesis, University of California at Berkeley, 2007.

[20] R. Penrose. Applications of negative dimensional tensors. In Combinatorial Mathematics and its Applications, pages 221–244. Academic Press, 1971.

[21] S. Perdrix. State transfer instead of teleportation in measurement-based quantum computation. International Journal of Quantum Information, 3:219–223, 2005.

[22] S. Perdrix. Towards minimal resources of measurement-based quantum computation. New Journal of Physics, 9 206, June 2007.

[23] P. Selinger. Dagger compact closed categories and completely positive maps. In Proceedings of the 3rd International Workshop on Quantum Programming Languages (QPL 2005), Chicago, volume 170, pages 139–163. ENTCS, 2007.

[24] J. Vicary. Categorical formulation of C*-algebras. In Proceedings of the Quantum Physics and Logic/Development of Computational Models Joint Workshop (QPL-DCM), B. Coecke. Ed., Electronic Notes in Theoretical Computer Science. Elsevier, 2008. to appear.

[25] W. K. Wootters and W. H. Zurek. A single quantum cannot be cloned. Nature, 299:802–803, 1982.