Elham Kashe

Christine Tasson

Stephan Merz

Florian

David

Adrien Baptiste

Pierre Charles

Ma Hieu

Margaux Prisca

m'intéresser dans ce sujet peu

Introduction (fr)

L'informatique quantique est un modèle de calcul capable de supplanter un ordinateur classique pour e ectuer certaines tâches. L'exemple le plus probant est l'algorithme de Shor qui permet de factoriser un nombre en ses facteurs premiers en un temps exponentiellement moins long que le meilleur algorithme classique connu. L'algorithme de Grover permet également un gain quadratique pour la recherche d'un élément dans une structure de données non-triée, et pléthore d'algorithmes dérivés de celui-ci perme ent une même amélioration pour le problème qu'ils résolvent. Une des principales a entes de ce modèle, étant lui-même quantique, est de perme re de simuler e cacement d'autres systèmes quantiques. On peut encore trouver des applications dans la recherche d'un optimum, ou encore dans la cryptographie.

Pour pouvoir raisonner dans ce modèle de calcul, et e ectuer des tâches complexes, il est nécessaire d'avoir des langages de plus haut niveau que l'implémentation physique du processus. Un parallèle est possible avec l'informatique classique: Les circuits booléens, qui utilisent des portes logiques telles que ET, OU, OUexclusif…, ont été une abstraction nécessaire à l'électronique sous-jacente. Une telle abstraction a plusieurs avantages. Premièrement, elle permet à l'utilisateur de se débarasser d'une certaine surcharge de travail inutile, tout en réduisant sa propension à faire des erreurs.

i plus est, plus un langage est bas-niveau, et plus il voit ses paradigmes dictés par la nécessité de l'implémentation physique. À ce titre, un langage de plus haut niveau utilisera des paradigmes jugés plus utiles et compréhensibles par l'utilisateur (d'où la simplicité d'utilisation déjà remarquée), mais en plus il sera plus portable, le langage ne changeant pas entre les di érents processeurs.

Les circuits quantiques sont un langage graphique qui permet une première abstraction. Les unités du calcul quantique, appelés bits quantiques ou qubits, sont représentés comme parcourant un l, et des portes quantiques qui perme ent le calcul altèrent leur valeur. Ces portes peuvent être combinées comme dans cet exemple (lu par convention de gauche à droite):

⊕ ⊕ ⊕ H H S H T H X ⊕ ⊕ ⊕ H T H X ⊕ ⊕ X ⊕ S S

S X H

commuter, peu importe celui qui est appliqué en premier:

f g = f g = f g
ou encore comment réagissent les processus lorsque l'on échange les qubits sur lesquels ils sont appliqués: g f = g f Ces transformations sont évidentes dans le langage graphique, plus qu'elles ne le sont dans le langage algébrique:

(f ⊗ id) • (id ⊗ g) = f ⊗ g = (g ⊗ id) • (id ⊗ f ) et (g ⊗ f ) • σ = σ • (f ⊗ g)
où σ représente l'échange de qubits.

Ce sont les equations qui sous-tendent les PROPs, un cas particulier des catégories monoïdales, issue de la théorie des catégories et qui permet de formaliser la notion de langage graphique. C'est justement de considérations catégoriques dont naquit le ZX-Calculus, le langage graphique qui est au centre de ce e thèse.

Il a été introduit en 2008 par Bob Coecke et Ross Duncan [START_REF] Coecke | Interacting quantum observables: Categorical algebra and diagrammatics[END_REF] avec pour fondement la complémentarité d'observables quantiques, un paradigme a priori indépendent de l'implémentation physique des évolutions quantiques représentées. Là aussi, les qubits sont représentés comme traversant des ls qui relient les générateurs du langage pour former ce que l'on appelle un diagramme. Dans toute la thèse, les diagrammes sont lus du haut vers le bas.

Le langage contient trois générateurs dont deux sont duaux l'un-de-l'autre et peuvent avoir un paramètre sous la forme d'un angle: … … α et … … α . Ceux-ci peuvent prendre un nombre arbitraire de ls en entrée et en sortie. Le troisième générateur est binaire, et permet de transformer l'un des deux précédents opérateurs en l'autre.

Dans ce langage, un l, lorsqu'il est droit représente l'identité , mais il peut aussi être courbé: et . Ces diagrammes ont une signi cation particulière. Le premier représente l'état EPR |00 + |11 , tandis que le second représente le projecteur associé 00|+ 11|, qui physiquement correspond à l'un des résultats possibles lors d'une mesure de Bell sur deux qubits. L'un des atouts du ZX-Calculus est justement l'existence de ces deux diagrammes, qui forment ce que l'on appelle une structure compacte:

= =
i plus est, ces deux diagrammes réagissent bien avec les autres générateurs:

… … α = α … … … … α =
isomorphisme de graphe (qui préserve entrées et sorties) préserve l'évolution quantique qui est représentée. C'est un des très gros avantages du ZX-Calculus, et qui en fait un langage plus haut-niveau que les circuits quantiques. Les applications du langage graphique connues à ce jour sont très variées. Il peut être utilisé pour raisonner sur un modèle d'informatique quantique appelé MBQC (Measurement-Based antum Computing) [START_REF] Duncan | Rewriting measurement-based quantum computations with generalised ow[END_REF][START_REF] Duncan | A graphical approach to measurement-based quantum computing[END_REF][START_REF] Horsman | antum picturalism for topological cluster-state computing[END_REF] ou sur la correction d'erreurs quantiques [DL14, DG18, CKR + 16]. Il se trouve notamment que les générateurs du langage sont très proches des primitives du "la ice surgery", un modèle pour la réalisation d'ordinateurs quantiques universels avec correction d'erreur [START_REF] De | e ZX-calculus is a language for surface code la ice surgery[END_REF][START_REF] Niel De Beaudrap | Pauli fusion: a computational model to realise quantum transformations from ZX terms[END_REF]. Le ZX-Calculus a permis des améliorations dans la simpli cation de circuits quantiques [START_REF] Duncan | Graph-theoretic simpli cation of quantum circuits with the ZX-calculus[END_REF][START_REF] Kissinger | Reducing T-count with the ZX-calculus[END_REF] dans le projet PyZX [KvdW18], et peut être utilisé pour faire de la véri cation, par exemple de protocoles [START_REF] Hillebrand | antum protocols involving multiparticle entanglement and their representations[END_REF][START_REF] Zamdzhiev | An abstract approach towards quantum secret sharing[END_REF].

Comme on l'a vu, di érents diagrammes peuvent représenter la même évolution quantique, de la même fac ¸on que di érentes compositions de matrices peuvent donner le même résultat. Dans le calcul matriciel, on sait réduire n'importe quelle composition de matrices obtenue avec • et ⊗ à une unique matrice. Une telle réduction ne sera pas possible dans le ZX-Calculus, car un générateur seul n'est pas su samment expressif. On peut néanmoins donner un ensemble de transformations autorisées entre un diagramme du ZX-Calculus et un autre. Idéalement, ces règles devraient être intuitives et su samment peu nombreuses pour qu'un être humain puisse les retenir.

Les règles fondamentales du ZX-Calculus sont issues de la théorie des catégories, et utilisent des structures bien connues du domaine, telles les algèbres de Frobenius ou les algèbres de Hopf. Ce e démarche est également utilisée pour décrire des structures tout aussi fondamentales en algèbre linéaire, pour représenter par exemple des ots de signal [START_REF] Baez | Categories in control[END_REF], avec un langage nommé IH, un proche parent du ZX-Calculus [START_REF] Bonchi | Interacting Hopf algebras[END_REF][START_REF] Zanasi | Interacting Hopf Algebras -the theory of linear systems[END_REF]. Pour être plus précis, le premier formalise une restriction du second.

Pour s'assurer de la véracité d'une dérivation (une suite d'applications des règles de transformation), on peut utiliser un assistant de peuve appelé antomatic [KDD + 11, KZ15] développé par la communauté et qui permet de manipuler des diagrammes de cordes tels que ceux du ZX-Calculus ainsi que de spéci er les règles de calcul autorisées.

Se pose alors la question de la complétude : Si deux diagrammes représentent la même évolution quantique, est-il possible de transformer l'un en l'autre en utilisant uniquement les transformations graphiques autorisées ? Un tel résultat est essentiel. Il implique que la théorie quantique est entièrement capturée par le langage, le rendant ainsi autosu sant. Il n'est alors plus nécessaire de garder en tête la théorie mathématique des espaces de Hilbert sous-jacente, et tout raisonnement sur le quantique peut être mené au sein du langage uniquement.

C'est à ce e question qu'essaie de répondre ce e thèse. Le problème étant ardu, il a été étudié pour des restrictions du langage, appelés fragments. On appelle "fragment π p " la restriction du ZX-Calculus où les paramètres de … … α et … … α sont des multiples de π p . Bien sûr, des axiomatisations di érentes peuvent être donnés pour di érentes restrictions. On va donc distinguer les diagrammes du fragment π p , aussi noté ZX[ π p ], et les axiomatisations R. En les combinant, on obtient ZX[ π p ]/R, le langage obtenu en quotientant le fragment π p du ZX-Calculus par la théorie équationnelle R. Le premier fragment pour lequel un résultat de complétude a été donné est ZX[ π 2 ] [Bac14a], aussi appelé le stabiliseur du ZX-Calculus, ou encore Cli ord. Un résultat ana-logue existe pour les circuits [START_REF] Selinger | Generators and Relations for n-qubit Cli ord Operators[END_REF]. S'est ensuivi un résultat similaire pour le fragment π du langage ZX[π] [START_REF] Duncan | Pivoting makes the ZX-calculus complete for real stabilizers[END_REF], avec un ensemble d'axiomes légèrement di érent. Malheureusement, ces fragments ne sont pas universels, ni même approximativement (certaines évolutions quantiques ne peuvent être représentées, même de fac ¸on approchée, par des diagrammes de ces fragments). Ceux-ci sont même simulables e cacement par un ordinateur classique [START_REF] Aaronson | Improved simulation of stabilizer circuits[END_REF]. L'intérêt s'est donc ensuite porté vers le fragment ZX[ π 4 ], aussi appelé Cli ord+T, qui lui, est approximativement universel [START_REF] Shi | Both To oli and controlled-not need li le help to do universal quantum computing[END_REF]. Un premier résultat a été donné pour le cas particulier de diagrammes sur un seul l [START_REF] Backens | e ZX-calculus is complete for the single-qubit clif-ford+t group[END_REF], lui-même dérivé du résultat sur les circuits [START_REF] Matsumoto | Representation of antum Circuits with Cli ord and π/8 Gates[END_REF]. Dans les circuits, on peut également citer la complétude des diagrammes "CNot-dihedraux" [START_REF] Ma Hew | A nite presentation of CNOT-dihedral operators[END_REF] qui sont une restriction de Cli ord+T, et la complétude des circuits Cli ord+T sur deux qubits [START_REF] Selinger | Relations for Cli ord+T operators on two qubits[END_REF], redémontré dans le ZX-Calculus mais en sortant du fragment [START_REF] Coecke | ZX-rules for 2-qubit Cli ord+T quantum circuits[END_REF].

Parallèlement au développement du ZX-Calculus, un autre langage graphique, proche cousin du premier, a vu le jour : le ZW-Calculus [START_REF] Coecke | e compositional structure of multipartite quantum entanglement[END_REF]. Celui-ci jouit également d'une structure compacte, et donc de ce résultat puissant sur la conservation de la sémantique par isomorphisme de graphe. Ce langage se base lui sur l'interaction entre deux classes d'états quantiques fondamentalement di érents, à savoir les états GHZ et les états W. Une autre di érence agrante avec le ZX-Calculus, est que le ZW-Calculus jouit d'une forme normale relativement naturelle. Cela a notamment permis la recherche d'axiomatisations complétes pour des fragments du langages [START_REF] Hadzihasanovic | A diagrammatic axiomatisation for qubit entanglement[END_REF][START_REF] Hadzihasanovic | e Algebra of Entanglement and the Geometry of Composition[END_REF][START_REF] Hadzihasanovic | Two complete axiomatisations of pure-state qubit quantum computing[END_REF].

Dans ce e thèse, nous faisons le lien entre les deux langages graphiques, ce qui permet notamment de simpli er la recherche d'axiomatisation complète pour le ZX-Calculus. Le premier résultat présenté dans ce e thèse concerne ZX[ π 4 ] [JPV18a], dont la complétude est obtenue par un système de traduction de ZX[ π 4 ] vers une extension du ZW-Calculus notée ZW1 / √ 2 , ce qui permet le transport de la propriété de complétude. Pour ce faire, nous passons par un langage intermédiaire appelé ∆ZX, qui est une extension du ZX-Calculus avec un générateur supplémentaire [START_REF] Vilmart | A ZX-calculus with triangles for To oli-Hadamard, Clif-ford+T, and beyond[END_REF]. Celui-ci est intéressant en lui-même car ∆ZX[π] capture le fragment "To oli-Hadamard" de la mécanique quantique.

Nous montrons ensuite que l'axiomatisation utilisée avec ZX[ π 4 ] est en réalité plus forte que cela, car elle permet aussi la complétude pour une restriction plus large des diagrammes du ZX-Calculus, appelés diagrammes linéaires à constantes dans Cli ord+T, et dénotée ZX[ α, π 4 ] [START_REF] Jeandel | Diagrammatic reasoning beyond Cli ord+T quantum mechanics[END_REF]. Encore une fois, nous passons par le langage intermédiaire ∆ZX[ α, π], et la combinaison des deux permet d'obtenir une axiomatisation complète pour ∆ZX[ α, π 4 ]. Ce résultat puissant de complétude sur les diagrammes linéaires, bien que non constructif, permet de déterminer pour un grand nombre d'égalités dans des fragments plus grands que ZX[ π 4 ] qu'elles sont dérivables. En utilisant ce résultat, un autre système de traduction entre le ZX-Calculus et un fragment plus grand du ZW-Calculus, ainsi qu'une méthode de réduction de certains diagrammes vers leur décomposition en valeurs singulières (SVD) [START_REF] Vilmart | A near-optimal axiomatisation of ZX-calculus for pure qubit quantum mechanics[END_REF], nous prouvons ensuite la complétude du langage sans restriction ZX pour un ensemble d'axiomes étonnament plus petit que celui de ZX[ π 4 ]. Il est bon de noter que les langages graphiques évoqués jusqu'à présent sont faits pour la mécanique quantique pure, c'est à dire sans interaction avec l'extérieur. Pour prendre en compte ce e interaction, on représente les évolutions quantiques par des CPM (completely positive maps), et on peut rajouter au langage un générateur qui représente la trace partielle. Nous montrons comment rendre un langage graphique complet pour les CPM s'il l'est déjà pour la mécanique quantique pure. En particulier, on peut trouver aisément des axiomatisations complètes pour ZX et sa restriction à Cli ord ZX [ π 2 ] [CJPV19]. En n, en dernier lieu, nous donnons une construction pour une forme normale, valable dans n'importe quel fragment du ZX-Calculus qui contient π 4 [START_REF] Jeandel | A generic normal form for ZX-diagrams and application to the rational angle completeness[END_REF]. Cela nous permet de reprouver les deux précédents résultats de complétude sans utiliser le ZW-Calculus, mais également de trouver des axiomatisations complètes pour d'autres fragments, notamment ZX[ π 2 n ] le fragment des dyadiques, et ZX[πQ] le fragment des rationnels.

Le diagramme suivant représente les di érents langages (constitués d'un fragment et d'une théorie équationnelle) considérés dans la thèse, les èches représentant les dépendances pour la preuve de complétude. Les résultats de complétude obtenus par forme normale sont représentés avec une èche qui boucle sur le langage. Les langages dont la complétude est considérée comme acquise sont les quatre du haut, vers lesquels ne pointe aucune èche.

ZX[

Introduction

antum computing is a computational model capable of supplanting a conventional computer to perform certain tasks.

e most convincing example is Shor's algorithm, which allows for number factoring into its prime factors in an exponentially shorter time than the best known classical algorithm. Grover's algorithm also allows a quadratic gain for searching for an element in a unsorted data structure, and a plethora of algorithms derived from it allow the same improvement for the problem they solve. One of the main expectations of this model, being itself a quantum model, is to allow other quantum systems to be e ectively simulated. Applications can still be found in the search for an optimum, or in cryptography.

To be able to reason in this calculation model, and perform complex tasks, it is necessary to have languages of a higher level than the physical implementation of the process. A parallel is possible with classical computing: Boolean circuits, which use logic gates such as AND, OR, XOR…, have been a necessary abstraction to the underlying electronics. Such an abstraction has several advantages. First, it allows the user to get rid of a certain amount of unnecessary overload, while reducing the user's propensity to make mistakes. Moreover, the lower the level of a language, the more it sees its paradigms dictated by the need for physical implementation. As such, a higher level language will use paradigms considered more useful and understandable by the user (hence the simplicity of use already noted), but in addition it will be more portable, the language not changing between di erent processors.

antum circuits are a graphical language that allows for a rst abstraction. e units of quantum computation, called quantum bits or qubits, are represented as running through a wire, and quantum gates that allow computation alter their value. ese gates can be combined as in this example (read by convention from le to right):

⊕ ⊕ ⊕ H H S H T H X ⊕ ⊕ ⊕ H T H X ⊕ ⊕ X ⊕ S S

S X H

e language remains fairly low-level: its use on large-scale projects is heavy, and the choices in its operators remain strongly dictated by physics. However, there are some interesting elements for a graphical language. In particular, that two independent processes, i.e. acting on di erent qubits, can commute, no ma er which one is applied rst:

f g = f g = f g
or how the processes react when exchanging the qubits on which they are applied:

g f = g f
ese transformations are evident in the graphical language, more so than they are in the algebraic language:

(f ⊗ id) • (id ⊗ g) = f ⊗ g = (g ⊗ id) • (id ⊗ f ) and (g ⊗ f ) • σ = σ • (f ⊗ g)
where σ represents the exchange of qubits.

ese are the equations that underlie PROPs, a particular case of monoidal categories, stemming from category theory and which formalises the notion of graphic language. It was precisely from categorical considerations that ZX-Calculus, the graphical language that is at the heart of this thesis, was born.

It was introduced in 2008 by Bob Coecke and Ross Duncan [START_REF] Coecke | Interacting quantum observables: Categorical algebra and diagrammatics[END_REF], based on the complementarity of quantum observables, a priori a paradigm independent of the physical implementation of the quantum evolutions represented. Again, qubits are represented as passing through wires that connect the language generators to form what is called a diagram. roughout the thesis, the diagrams are read from top to bo om.

e language contains three generators, two of which are dual and can have a parameter in the form of an angle: … … α and … … α . ese can take an arbitrary number of input and output wires. e third generator is binary, and allows to transform one of the two previous operators into the other.

In this language, a wire, when straight, represents the identity , but it can also be curved: and . ese diagrams have a particular meaning. e rst represents the EPR state |00 + |11 , while the second represents the associated projector 00| + 11|, which physically corresponds to a possible result of a Bell measurement on two qubits. One of the advantages of the ZX-Calculus is precisely the existence of these two diagrams, which form what is called a compact structure:

= =
Moreover, these two diagrams react well with the other generators:

… … α = α … … … … α = α … … =
anks to these equations in particular, we can consider any diagram of the ZX-Calculus as an open graph (inputs and outputs are xed), such that any graph isomorphism (which preserves inputs and outputs) preserves the quantum evolution that is represented. is is one of the very big advantages of the ZX-Calculus, a feature that makes it a higher level language than quantum circuits.

e applications of the graphic language known to date are very varied. It can be used to reason about a quantum computing model called MBQC (Measurement-Based antum Computing) [START_REF] Duncan | Rewriting measurement-based quantum computations with generalised ow[END_REF][START_REF] Duncan | A graphical approach to measurement-based quantum computing[END_REF][START_REF] Horsman | antum picturalism for topological cluster-state computing[END_REF] or about quantum error correction [DL14, DG18, CKR + 16]. In particular, the language generators are very close to the primitives of "la ice surgery", a model for the realization of universal quantum computers with error correction [START_REF] De | e ZX-calculus is a language for surface code la ice surgery[END_REF][START_REF] Niel De Beaudrap | Pauli fusion: a computational model to realise quantum transformations from ZX terms[END_REF]. e ZX-Calculus has allowed improvements in quantum circuit simpli cation [START_REF] Duncan | Graph-theoretic simpli cation of quantum circuits with the ZX-calculus[END_REF][START_REF] Kissinger | Reducing T-count with the ZX-calculus[END_REF] in the PyZX project [KvdW18], and can be used to perform veri cation, for example of protocols [START_REF] Hillebrand | antum protocols involving multiparticle entanglement and their representations[END_REF][START_REF] Zamdzhiev | An abstract approach towards quantum secret sharing[END_REF].

As we have seen, di erent diagrams can represent the same quantum evolution, in the same way that di erent matrix compositions can yield the same result. In matrix calculation, we know how to reduce any matrix composition obtained with • and ⊗ to a single matrix. Such a reduction will not be possible in the ZX-Calculus, as a single generator is not su ciently expressive. However, a set of allowed transformations can be given between one diagram of the ZX-Calculus and another. Ideally, these rules should be intuitive and su ciently su ciently limited in number to be remembered by the user.

e fundamental rules of ZX-Calculus are derived from category theory, and use structures well known in the eld, such as Frobenius algebras or Hopf algebras. is approach is also used to describe equally fundamental structures in linear algebra, for example to represent signal ows [START_REF] Baez | Categories in control[END_REF], with a language named IH, a close relative of the ZX-Calculus [START_REF] Bonchi | Interacting Hopf algebras[END_REF][START_REF] Zanasi | Interacting Hopf Algebras -the theory of linear systems[END_REF]. To be more precise, the former formalises a restriction of the la er.

To ensure the soundness of a derivation (a sequence of application of transformation rules), we can use a proof assistant called antomatic [KDD + 11, KZ15] developed by the community and which allows to handle string diagrams such as those of the ZX-Calculus as well as to specify the allowed calculation rules. e question of completeness then arises: If two diagrams represent the same quantum evolution, is it possible to transform one into the other using only the authorised graphical transformations? Such a result is essential. It implies that quantum theory is entirely captured by the language, making it self-su cient. It is then no longer necessary to keep in mind the mathematical theory of the underlying Hilbert spaces, and any reasoning about quantum can be conducted within the language alone. is thesis a empts to answer this question. e problem being di cult, it has been studied rst for language restrictions, called fragments. e restriction of the ZX-Calculus where the parameters of … … α and … … α are multiples of π p is called a " π pfragment". Of course, di erent axiomatisations can be given for di erent restrictions. We will therefore distinguish the diagrams of the π p -fragment, also denoted ZX[ π p ], and the axiomatisations R. By combining them, we obtain ZX[ π p ]/R, the language obtained by quotienting the π p -fragment of the ZX-Calculus by the equational theory R. e rst fragment for which a completeness result has been given is ZX[ π 2 ] [Bac14a], also called the stabiliser ZX-Calculus, or Cli ord ZX-Calculus. A result for the analogous fragment exists for the circuits [START_REF] Selinger | Generators and Relations for n-qubit Cli ord Operators[END_REF]. A similar result followed for the π-fragment of the ZX-Calculus [START_REF] Duncan | Pivoting makes the ZX-calculus complete for real stabilizers[END_REF], with a slightly di erent set of axioms. Unfortunately, these fragments are not universal, not even approximately (some quantum evolutions cannot be represented, even approximately, by diagrams of these fragments). Moreover, these fragments can even be e ciently simulated by a classical computer.

Interest then turned to the fragment ZX[ π 4 ], also called Cli ord+T, which is approximately universal [START_REF] Shi | Both To oli and controlled-not need li le help to do universal quantum computing[END_REF]. A rst result was given for the particular case of diagrams on a single wire [START_REF] Backens | e ZX-calculus is complete for the single-qubit clif-ford+t group[END_REF], itself derived from the result on quantum circuits [START_REF] Matsumoto | Representation of antum Circuits with Cli ord and π/8 Gates[END_REF].

As for circuits, we can also mention the completeness of the "CNot-dihedral" diagrams [START_REF] Ma Hew | A nite presentation of CNOT-dihedral operators[END_REF] which are a restriction of Cli ord+T, as well as the completeness of the Clif-ford+T circuits on two qubits [START_REF] Selinger | Relations for Cli ord+T operators on two qubits[END_REF], restated in the ZX-Calculus but with axioms that require the derivation to be carried outside the fragment [START_REF] Coecke | ZX-rules for 2-qubit Cli ord+T quantum circuits[END_REF].

In parallel with the development of the ZX-Calculus, another graphical language, close cousin of the rst, has emerged: ZW-Calculus [START_REF] Coecke | e compositional structure of multipartite quantum entanglement[END_REF]. It also has a compact structure, and therefore the same powerful result on the conservation of semantics by graph isomorphism. is language is based on the interaction between two fundamentally different classes of quantum states, namely GHZ states and W states. Another obvious di erence with ZX-Calculus is that ZW-Calculus has a relatively natural notion of normal form. is made it possible to search for complete axiomatisations for fragments of the language [START_REF] Hadzihasanovic | A diagrammatic axiomatisation for qubit entanglement[END_REF][START_REF] Hadzihasanovic | e Algebra of Entanglement and the Geometry of Composition[END_REF][START_REF] Hadzihasanovic | Two complete axiomatisations of pure-state qubit quantum computing[END_REF].

In this thesis, we make the link between the two graphical languages, which simpli es the search for complete axiomatisations for the ZX-Calculus. e rst result presented in this thesis concerns ZX[ π 4 ] [JPV18a], whose completeness is obtained by a translation system of ZX[ π 4 ] towards an extension of the ZW-Calculus ZW1 / √ 2 and back, which allows the transport of the completeness property. To do this, we go through an intermediate language called ∆ZX, which is an extension of the ZX-Calculus with an additional generator [START_REF] Vilmart | A ZX-calculus with triangles for To oli-Hadamard, Clif-ford+T, and beyond[END_REF]. is one is interesting in itself because ∆ZX[π] captures the "To oli-Hadamard"-fragment of quantum mechanics.

We then show that the axiomatisation used with ZX[ π 4 ] is actually stronger than that, because it also allows completeness for a broader restriction of the ZX-Calculus diagrams, called linear diagrams with constants in Cli ord+T, and denoted ZX[ α, π 4 ] [START_REF] Jeandel | Diagrammatic reasoning beyond Cli ord+T quantum mechanics[END_REF]. Once again, we go through the intermediate language ∆ZX[ α, π], and the combination of the two allows us to obtain a complete axiomatisation for ∆ZX[ α, π 4 ]. is powerful result of completeness on linear diagrams, although not constructive, allows to determine for a large number of equations in fragments broader than ZX[ π 4 ] that they are derivable.

Using this result, another translation system between the ZX-Calculus and a larger fragment of the ZW-Calculus, as well as a method for reducing some diagrams to their singular value decomposition (SVD) [START_REF] Vilmart | A near-optimal axiomatisation of ZX-calculus for pure qubit quantum mechanics[END_REF], we then prove the completeness of the unrestricted language ZX, surprisingly with a smaller set of axioms than that of ZX[ π 4 ]. It is worth noting that the graphical languages mentioned so far are designed for pure quantum mechanics, i.e. without interaction with the outside world. To take into account this interaction, we can add to the language a generator which represents the partial trace. We show how to make a graphical language for CPMs complete if it is already complete for pure quantum mechanics. In particular, complete axiomatisations for ZX and its restriction to Cli ord ZX [ π 2 ] [CJPV19] can be easily found. Finally, we give a construction for a normal form, valid in any fragment of the ZX-Calculus that contains π 4 [START_REF] Jeandel | A generic normal form for ZX-diagrams and application to the rational angle completeness[END_REF]. is allows us to recover the two previous completeness results without using the ZW-Calculus, but also to nd complete axiomatisations for other fragments, including ZX[ π 2 n ], the dyadic fragment, and ZX[πQ], the rational fragment.

e following diagram represents the di erent languages (consisting of a fragment and an equational theory) considered in the thesis, the arrows representing the dependencies for the proofs of completeness.

e completeness results obtained by normal Introduction form are represented with an arrow looping on the language. e languages whose completeness is taken for granted are the top four, to which no arrows point, for they were proven in the literature [START_REF] Backens | e ZX-calculus is complete for stabilizer quantum mechanics[END_REF][START_REF] Duncan | Pivoting makes the ZX-calculus complete for real stabilizers[END_REF][START_REF] Hadzihasanovic | A diagrammatic axiomatisation for qubit entanglement[END_REF][START_REF] Hadzihasanovic | e Algebra of Entanglement and the Geometry of Composition[END_REF].

ZX[ π 2 ]/ ZXπ /2 ZX[π]/ ZX π ZW/ ZW ZW[C]/ ZW C ZW1 / √ 2 / ZW1 / √ 2 ∆ZX[π]/ ∆ π ∆ZX[ α, π]/ ∆ + π ZX[ π 4 ]/ ZXπ /4 ∆ZX[ α, π 4 ]/ ∆π /4 ZX/ ZX ZX / ZX ZX[ π 2 ] / ZX π /2 ZX[ α, π 2 n ]/ ZXπ /4 ZX[ α, πQ]/ ZX Q ZX[ α, π 4 ]/ ZXπ /4
During this thesis, I participated in the design of the graphical language called Y-Calculus [START_REF] Jeandel | Y-calculus: A language for real matrices derived from the zx-calculus[END_REF], a variant of ZX-Calculus con ned to the representation of real quantum evolutions. We have given a complete set of axioms for its stabiliser fragment. Since there is a translation system between the ZX-Calculus and the Y-Calculus, it is absolutely possible to complete the la er for other fragments, now that similar results exist in the ZX-Calculus. However, we will not deal with the case of the Y-Calculus in this thesis.

I also participated in [START_REF] Jeandel | ZX-calculus: Cyclotomic supplementarity and incompleteness for Clif-ford+T quantum mechanics[END_REF], which introduces two equations of the ZX-Calculus that will be mentioned or even used as axioms in the thesis, but here again we will not dwell on the aspects treated in the paper.

Part I

Background

Chapter 1

Standard antum Mechanics

antum mechanics [START_REF] Feynman | antum mechanics[END_REF] is one of the two prominent physical models that arose during the rst decades of the XX th century, the other being relativity. It was created to explain experiments where the now called classical physics fell short, such as black body radiation, or the photoelectric e ect [START_REF] Planck | Ueber das Gesetz der Energieverteilung im Normalspectrum[END_REF][START_REF] Einstein | Über einen die Erzeugung und Verwandlung des Lichtes betre enden heuristischen Gesichtspunkt[END_REF]. e core di erence with the classical model is that some quantities of a system -such as energy, momentum … -are restricted to discrete values, as opposed to continuous ones in the classical model. So far, this theory has proven to be extremely robust and precise [START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF].

It has already had applications in several domains of physics, and can also be used to perform transistor and laser computations. Indeed, these can be used to store, process and communicate information. We review in this chapter the fundamentals of quantum mechanics, which we can nd e.g. in [vN32] or [START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF].

Pure antum States

De nition 1.1.1 (Hilbert Space): A Hilbert space H is a vector space over K (where K is either C or R), equipped with an inner product, that is, a function . . : H×H → K with the following properties:

• x y = y x
• It is linear in its rst argument:

x 1 + λx 2 y = x 1 y + λ x 2 y • x → x x is positive de nite: x x > 0 if x = 0 x x = 0 if x = 0
In this context, it is conventional to de ne a norm by . := x → x x , which is realvalued. e inner product makes H a metric space, in which we can de ne the distance between two elements a and b as d(a, b) := ab . A Hilbert space is further assumed to be complete, i.e. any sequence (a n ) n∈N such that lim n→∞ d(a n , a n+1 ) = 0 converges in H.

Pure antum States

Postulate 1.1.2. Each physical system is associated with a complex Hilbert space H with inner product . . , and topologically separable in the sense that it admits a countable orthonormal basis. Rays (that is, subspaces of complex dimension 1) in H are associated with quantum states of the system.

Hence, any quantum state ψ can be represented by a vector over the Hilbert space H, of norm one i.e. ψ ψ = 1. Two such vectors are equivalent if they only di er by a phase factor: Indeed, if |ψ 1 is equivalent to |ψ 2 by de nition of rays, there exists λ ∈ C such that |ψ 1 = λ |ψ 2 . However the constraint on the norm gives:

1 = ψ 1 ψ 1 = |λ| 2 ψ 2 ψ 2 = |λ| 2 which implies λ = e iθ for some θ ∈ R. Example 1.1.3. In C 2 , 1 2 1 √ 3 ∼ e iφ 2 1 √ 3
where φ ∈ R is an arbitrary angle, and ∼ is the equivalence relation.

A useful notation, introduced by Dirac, and consistent with the inner product notation is the so-called Dirac notation, or braket notation. In this notation, a vector is denoted with |. , called ket, and its dagger (in nite dimension, the conjugate transpose) is .| := |. † , called bra, and de ned for every element of H as:

ψ| : H → K |φ → ψ φ Hence, ψ| • |φ = ψ φ .
A building block of nite-dimensional quantum mechanics is a quantum object of dimension d, called a qudit. A qudit state will be represented as a vector of C d . It is fairly easy to see that the set of vectors ( e i ) 0≤i<d -where e i ∈ C d is the vector with 0s everywhere except for the ith component which is a 1 -forms a basis for C d . e vectors e i will be denoted in the Dirac notation |i := e i . is forms the so-called canonical basis or standard basis. en, any qudit state can be expressed as a linear combination of the vectors in this basis: |ψ = d i=0 α i |i . e vectors of the canonical basis can be seen as classical states. Any state that is not a basis vector is then said to be in a superposition of the (or some) classical states.

e coe cients in the linear combination are called amplitudes, and are linked to the measurement outcomes of the system, as we will describe later.

Of primary interest for us will be the case where d = 2. e base component is then called qubit, and it is a linear combination of |0 and |1 . Several very simple quantum objects are qubits: the electron spin, the photon polarisation, the fermion position … [NC10, BK02] Moreover, the two classical states |0 and |1 can be identi ed with the states of a classical bit. A bit is hence a qubit which is not allowed superposition.

When working with qubits, we may also consider two other bases: (|+ , |-) and (|i , |-i ) where:

|+ := |0 + |1 √ 2 |i := |0 + i |1 √ 2 |-:= |0 -|1 √ 2 |-i := |0 -i |1 √ 2
It is to be noted that the three bases (|0 , |1 ), (|+ , |-) and (|i , |-i ) are all orthonormal.

Composite Systems

Postulate 1.2.1. e state space of a composite physical system is the tensor product (denoted . ⊗ .) of the state spaces of the component physical systems. Moreover, if we have systems numbered 1 through n, and system number i is prepared in the state |ψ i , then the joint state of the total system is

|ψ 1 ⊗ |ψ 2 ⊗ . . . ⊗ |ψ n .
e tensor product is a bilinear operator from

H A × H B → H A ⊗ H B : (ϕ 1 + λϕ 2 ) ⊗ ψ = ϕ 1 ⊗ ψ + λϕ 2 ⊗ ψ ψ ⊗(ϕ 1 + λϕ 2 ) = ψ ⊗ ϕ 1 + λψ ⊗ ϕ 2 If two
B , then {|i A ⊗ |i B } is a basis of H A ⊗ B . In particular, if H A and H B are nite dimensional, then dim(H A ⊗ B ) = dim(H A ) × dim(H B ).
In the Dirac notation, when there is no ambiguity, it is customary to write a tensor product as the concatenation of the two kets: |ψφ := |ψ ⊗ |φ . For instance, in the qubit case, |01 represents a state on two qubits, the rst of which is in state 0 and the second in state 1. In terms of vectors, if |j ∈ H B , then |ij := |i ⊗ |j = e i×dim(H B )+j , i.e. the vector with 0 entries everywhere except 1 for the (i × dim(H B ) + j)th. By bilinearity of ⊗, this completely de nes the tensor product. For instance, in C 2 ⊗ C 3 : ( e 0 + 2 e 1 ) ⊗( e 0 + e 2 ) = e 0 ⊗ e 0 + e 0 ⊗ e 2 + 2 e 1 ⊗ e 0 + 2 e 1 ⊗ e 2 = e 0 + e 2 + 2 e 3 + 2 e 5 i.e.

1 2 ⊗   1 0 1   =         1 0 1 2 0 2        
A state on a composite system cannot always be decomposed as a tensor product of the two subsystems. When this is the case, the composite state is called entangled. e easiest and most famous example is the state |00 +|11 √ 2

. It can be shown that there is no pair of one-qubit states |ψ 1 and |ψ 2 such that |00 +|11 √ 2

= |ψ 1 ⊗ |ψ 2 . is particular state has a special name: it is called the EPR state. It is due to Einstein, Podolsky and Rosen, who thought they had found a paradox in the theory of quantum mechanics [START_REF] Einstein | Can quantummechanical description of physical reality be considered complete?[END_REF]. e two particles in this state are dependant to one-another and any 1.3. Operators operation on one of them a ects the state as a whole. Speci cally, during a measurement in the standard basis (see Section 1.4), if the measurement of the rst qubit yields x ∈ {0, 1}, then the measurement of the second one automatically yields the same result x, no ma er how far the two particles are from one another. is violates the principle of locality.

e EPR state is one of the four Bell states, which are the four maximally entangled two qubit states: |00 ±|11 √ 2 and |01 ±|10

√ 2 [START_REF] Bell | On the Einstein Podolsky Rosen paradox[END_REF]. It is also a particular case of the GHZ states, of the form

|0 n +|1 n √ 2
where |x n represents a register of n qubits in the state |x [START_REF] Daniel | Going beyond bell's theorem[END_REF].

Operators

e state of a quantum system can evolve through time.

is is modelled as applying a linear map to the state: |f ψ := f (|ψ ). e neutral element for the composition of maps • is the identity. We denote by id H the identity on H. Notice that if dim(H) = 1, then H = C, so id C = 1 . e subscript of id can be neglected when it is clear from the context.

De nition 1.3.1 (Linear Map): A linear map f : H 1 → H 2 is a map such that: ∀x, y ∈ H 1 , ∀λ ∈ C, f (x + λy) = f (x) + λf (y)
One can de ne a norm on linear maps [START_REF] Aliprantis | In nite-dimensional analysis[END_REF].

De nition 1.3.2 (Norm): Let f be a linear map. We de ne f as:

f := sup |ψ =0
f |ψ |ψ Linear maps can be composed by the tensor product. If f A and f B act respectively on Hilbert spaces H A and H B , then f A ⊗ f B acts on the composite space H A ⊗ B , such that, if |ψ A and |ψ B are elements of respectively H A and H B , then

(f A ⊗ f B ) |ψ A ψ B = (f A |ψ A ) ⊗(f B |ψ B ).
Similarly to quantum states, maps on nite dimensional Hilbert spaces can be expressed using the Dirac notation:

f = |ψ i φ j |, where |ψ i φ j | := |ψ i • φ j | and • is the matrix composition. If f A = ψ (A) i φ (A) j and f B = ψ (B) i φ (B) j , then the tensor product is expressed f A ⊗ f B = ψ (A) i ψ (B) k φ (A) j φ (B)
.

Example 1.3.3. Given (x i ) an orthonormal basis of the nite dimensional Hilbert space H, the identity id in H can be expressed as id = |x i x i |. It is convenient to work with an orthonormal basis (x i ) since:

x i x j = δ ij = 0 if i = j 1 if i = j Hence, if f : H 1 → H 2 = α ij |x i y j | and g : H 2 → H 3 = β k |z k x | with (x i ) an orthonormal basis of H 2 , then the composition g • f has a simple expression: g • f = k, β k |z k x | i,j α ij |x i y j | = i,j,k, α ij β k |z k x x i δ i, y j | = i,j,k α ij β ki |z k y j |
e next postulate dictates how a closed quantum system evolves, and needs the following notions:

De nition 1.3.4 (Adjoint and Unitary Operator): Let A : H 1 → H 2 be a linear operator.

e adjoint map A † : H 2 → H 1 is uniquely de ned as the linear map such that for all x, y ∈ C, Ax y = x A † y .

A unitary operator U : H → H on a Hilbert space H is a linear map such that

U U † = U † U = id.
Notice that for any |x , U |x = |x , which implies that U = 1 for any unitary U .

Postulate 1.3.5. e evolution of a closed quantum system is described by a unitary transformation. at is, the state |ψ of the closed system at time t 0 is related to the state |ψ of the system at time t 1 by a unitary operator U :

|ψ = U |ψ
During a computation, it could be interesting to initialise new qubits on the y. e system cannot be seen as evolving unitarily in this case, since one would end up with more qubits than at the start. Instead, this can be modelled as making the system undergo an isometry.

De nition 1.3.6 (Isometry): An isometry f : H 1 → H 2 is a linear map such that ∀x, y, f x f x = x x , or equivalently, such that

f † • f = id.
Notice that if f is an isometry, then in general f † is not. For instance |0 is an isometry: 0 0 = 1 = id 0 but clearly not a unitary transformation: |0 0| = id.

An interesting set of operators on qubits that is useful to point out is the set of controlled operators (on qubits). Let U be an operator on n qubits. e operator "controlled U ", denoted ΛU , is an operator on n + 1 qubits, uniquely de ned as:

ΛU = |0 0| ⊗ id + |1 1| ⊗ U
e rst qubit in ΛU is called the control qubit. Indeed, if a classical bit is sent on this qubit, U is applied on the n other qubits i the control bit is 1. Conversely, if an operator

V is such that V • (|0 ⊗ id) = |0 ⊗ id and V • (|1 ⊗ id) = |1 ⊗ v, then V is a controlled operator (V = Λv).

Observables and Measurements

Not all quantities in a quantum state can be measured. ose that can be are called observables. For instance, the polarisation of a photon, the spin of an electron, the position and the momentum of a particle are all observables [START_REF] Knöchlein | Photo-and electroproduction of eta mesons[END_REF][START_REF] Dirac | e quantum theory of the electron[END_REF][START_REF] Carmeli | On the coexistence of position and momentum observables[END_REF].

Postulate 1.4.1. e observables of a quantum system are the self-adjoint (A = A † ) operators on H.

Observables and Measurements

A very important set of observables for the qubit case are the Pauli matrices:

X = 0 1 1 0 Y = 0 -i i 0 Z = 1 0
0 -1 Linear combinations of Pauli matrices with the identity and real coe cients (x 0 id + x 1 X + x 2 Y + x 3 Z with x i ∈ R) can represent any 2×2 self-adjoint matrix, i.e. they span all the one-qubit observables. Also, the group generated by the Pauli matrices using the composition • is called the Pauli group. is group is easily extended to n qubits:

De nition 1.4.2 (Pauli Group):
e Pauli group G 1 is de ned as G 1 := X, Y, Z , the group generated by ({X, Y, Z}, •). For any n ∈ N * := {n ∈ N | n = 0}, the Pauli group on n qubits G n is de ned as

G n := {O 1 ⊗ • • • ⊗ O n | O i ∈ G 1 }.
Remark 1.4.3. e Pauli matrices of G 1 can be expressed using the Dirac notation:

X = k∈{0,1} |k ⊕ 1 k| Y = i k∈{0,1} (-1) k |k ⊕ 1 k| Z = k∈{0,1} (-1) k |k k|
where ⊕ is the XOR operation.

en, given an observable, one can perform the measurement of a quantum state, in the following way [START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF]:

Postulate 1.4.4.
antum measurements are described by a collection {M m } of measurement operators. ese operators act on the state space of the system being measured, and satisfy en

p(0) = ψ| M † 0 M 0 |ψ = (α 0| + β 1|) |0 0| (α |0 + β |1 ) = |α| 2 . Similarly, p(1) = |β| 2 .
As explained in the postulate, the quantum state collapses a er measurement in a new state that depends on the outcome of the measurement.

Example 1.4.6. Consider a series of two measurements of the same qubit, the rst in the diagonal basis (|+ , |-) and the second in the computational basis (|0 , |1 ). A er the rst measurement, the qubit will either be in the state

|+ := |0 +|1 √ 2 or |-:= |0 -|1 √
2 , with some probability. However, both |+ and |-will have probabilities 1 2 to collapse to state |0 and 1 2 to collapse to state |1 a er the second measurement. Hence, all information has been erased a er the two measurements.

We have now presented all the postulates of quantum mechanics, that are valid in nite dimensions as well as in in nite dimensions. In the rest of the thesis, we will only consider nite dimensional systems.

Non-Isolated Systems

Up to Section 1.3, we had described how a quantum system behaves in the ideal case, when it is isolated. When parts of the system are measured, it is not isolated any more. In particular, when measuring parts of an entangled pure state (as described in Section 1.1), we end up with a state that is not pure any more, but is rather a probabilistic distribution over pure quantum states, called a mixed state. Mixed states can be modelled by density matrices.

is requires that the rest of the formalism adapts to this generalisation of quantum states.

De nition 1.5.1 (Mixed States): A mixed state ρ is of the form ρ = p i |ψ i ψ i |. e coe cient p i represents the probability that the system is in the pure state |ψ i . In order to represent a probability distribution, all the p i must be non-negative and add up to 1.

Of course, a pure state |ψ in this formalism is a particular case of mixed state, and will be represented by |ψ ψ|. Notice that ρ is a Hermitian matrix:

ρ † = ( p i |ψ i ψ i |) † = p i |ψ i ψ i | = ρ. A composite system of two mixed states, ρ 1 = p i |ψ i ψ i | and ρ 2 = q j |φ j φ j |, is again the tensor product of the two: ρ 1 ⊗ ρ 2 := p i q j |ψ i φ j ψ i φ j |.
Pure operators (i.e. operators that map a pure state to another pure state) can still be applied to a mixed state, in the form of a superoperator, i.e. a linear operator that maps a linear map to another linear map.

De nition 1.5.2:

e pure operator U de nes the superoperator ρ → U • ρ • U † for mixed states.

Notice that the operator preserves the Hermitian structure of the state.

e measurement postulate can be logically extended as follows:

De nition 1.5.3: e expectation value of an observable A for a system in a mixed state ρ = p i |ψ i ψ i | is given by the weighted sum of inner products:

p i ψ i | A |ψ i .
is value can be computed as being tr(Aρ), where tr is the trace operator. e trace operator is complex-valued and linear. It has the property that tr(AB) = tr(BA) whenever AB and BA are square matrices, and if id is the identity in H, then tr(id) = dim(H).

p i ψ i | A |ψ i = tr p i ψ i | A |ψ i = p i tr ( ψ i Aψ i ) = p i tr (|Aψ i ψ i |) = tr A p i |ψ i ψ i | = tr(Aρ)
is time, the trace can be expressed as a superoperator, using the Dirac notation. Given (x i ) an orthonormal basis of the considered nite Hilbert space:

tr = ρ → x i | ρ |x i 29

Pure antum Circuits

Similarly to boolean circuits, quantum circuits were introduced both as a model for the potential physical implementations of quantum processes, as well as a means to reason on said processes. We give here a presentation of the circuits for pure qubit quantum mechanics. Hence, the maps we are going to represent are unitaries from H to H where dim(H) is a power of 2. e qubits will be represented as wires, and quantum gates will be applied on them. e operations applied to a quantum state have to be unitary, so some gates usually employed in quantum circuits are derived from reversible boolean circuits, such as the Not gate, the CNot gate and the To oli gate. To these are added phase-inducing gates such as the Hadamard gate or the R Z gate. e usual quantum gates used in quantum circuits are summarised in Table 1.1. e map . associates to any quantum gate a linear map from and to Hilbert spaces. e gates can then be composed in parallel or in sequence.

e parallel composition corresponds to the tensor product ⊗:

D 1 … … D 2 … … = D 1 … … ⊗ D 2 … …
while the sequential composition corresponds to the usual composition of maps •:

D 1 … … D 2 … = D 2 … … • D 1 … …
Notice that all the gates whose names begin with "C" are controlled operators: CNot represents a controlled Not, CZ a controlled R Z (π), CCNot a controlled controlled Not (that is an operator that controls CNot), and CSwap a controlled Swap.

All these gates and the two compositions are used to represent unitaries. However, one can extend the formalism with qubit initialisations. Here, some qubits can be given the value |0 at the beginning of the computation. We represent it as |0

, with interpretation |0 = |0 . Notice that other states can be obtained by composition of |0 and unitary gates. For instance, |+ can be obtained with |0 H , while the EPR pair (seen in Section 1.2) can be constructed with the following circuit: As already noticed, using qubit initialisation allows one to represent not only unitary transformations but actually isometries. Now back to the unitary transformations. All the gates in Table 1.1 (with the two compositions) are enough to represent any unitary f : H → H (where dim(H) is a power of two).

⊕ H |0 |0 Gate Representation Interpretation . Identity x∈{0,1} |x x| X, Not X or ⊕ x∈{0,1} |x⊕1 x| Z-rotation, R Z R Z (α)
De nition 1.6.1 (Universality): A set of gates su cient to represent any unitary is called universal. A set of gates that can approximate any unitary with arbitrary precision is called approximately universal.

In other words, a set of gates S is universal if, for any unitary U , there exists a circuit D composed only of gates of S such that U = D . S is approximately universal if, for any unitary U and any > 0 there exists a circuit D composed of gates of S and such that U -D ≤ .

Actually, the set of gates in Table 1.1 is more than you need to get the universality. Indeed, the gate set (CNot, R Z , H) is universal [START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF]. Notice that the gate R Z is parametrised by an angle α which can take values in R. Hence, there is actually an in nite number of gates in the gate set.

One can restrict these angles. For instance, by only allowing rotations of angle π 2 , one gets the gate set (CNot, R Z ( π 2 ), H), also called Cli ord, for it exactly represents the 1.7. Encoding Cli ord group, de ned as:

De nition 1.6.2 (Cli ord group, Stabiliser group): e Cli ord group, also called stabiliser group, is the set of unitaries that stabilise the Pauli group:

C n := {f : H → H | ∀x ∈ G n , f •x•f † ∈ G n , f f † = f † f = id} where H := C 2 n .
However, the Cli ord group is not universal, even approximately, and can be eciently simulated on a classical computer [START_REF] Aaronson | Improved simulation of stabilizer circuits[END_REF].

ere is an in-between, though. ere exist nite sets of gates that are approximately universal. For instance, the gate set (CNot, R Z ( π 4 ), H) [START_REF] Shi | Both To oli and controlled-not need li le help to do universal quantum computing[END_REF]. e gate R Z ( π 4 ) is o en referred to as the T gate. Since

T 2 := T • T = R Z ( π
2 ), one can see this new gate set as the Cli ord gate set to which the T gate has been added. As such, it is commonly referred to as Cli ord+T.

ere exist other interesting universal gate sets. For instance, the To oli gate (with ancillae) is already universal for reversible boolean circuits, and it so happens that adding any basis-changing single-qubit real gate (e.g. Hadamard) to To oli makes the resulting gate set approximately universal for encoded quantum computing [START_REF] Shi | Both To oli and controlled-not need li le help to do universal quantum computing[END_REF].

is new notion of encoded (approximate) universality is slightly di erent from the one de ned in De nition 1.6.1, in that there is an encoding of data in the usual framework (complex numbers), in a less expressive se ing (here the real numbers).

Encoding

In [START_REF] Aharonov | A simple proof that To oli and Hadamard are quantum universal[END_REF], it is shown how to encode a complex quantum state with a real quantum state. Any quantum state |ψ can be decomposed as its real and imaginary parts |ψ = |ψ +i |ψ with respect to the computational basis. We can then embed this in a larger real quantum state

|ψ enc := |ψ ⊗ |0 + |ψ ⊗ |1 .
is can also be done for operators, where

U := U + iU is encoded in U enc := U ⊗(|0 0| + |1 1|) + U ⊗(|1 0| -|0 1|).
It is then shown that (To oli, H) represent exactly the encoded versions of a complex approximately universal gate set, namely (ΛR Z ( π 2 ), H), and hence encodes it. is idea of encoding data of a certain type (actually a ring) with data of a more restrictive type (a smaller ring) can be generalised. In the following, we restrict to the nite dimensional case.

De nition 1.7.1 (Linear Maps over a Ring): Let R be a subring of C. We denote M n,m (R) the set of linear maps from R n to R m for n, m ∈ N. Any element of M n,m (R) can be represented as a matrix over the ring R.

Now we can give a de nition of an encoding:

De nition 1.7.2: Let R 1 ⊆ R 2 be two subrings of C. We say that R 1 encodes R 2 if there exists a homomorphism ψ : R 2 → M n,n (R 1 ) (called the encoding) with a le inverse Θ, i.e. Θ • ψ = id (called the decoding). e homomorphism ψ, even though de ned only on R 2 , extends naturally to a family of homomorphisms ψ mp : M m,p (R 2 ) → M mn,pn (R 1 ). is amounts to replacing every component c in M ∈ M m,p (R 2 ) by the n × n matrix ψ(c).

Even though the encoding is de ned on rings, we will extensively use elds for intermediate results.

A common occurrence of an encoding is when the second ring is an algebraic extension of the rst one. Let R be a subring of C, and α be an R-algebraic integer: We denote P α ∈ R[X] the smallest monic (its leading coe cient is 1) polynomial such that P α (α) = 0. We denote d α the degree of the polynomial P α . R 2 here is R[α], that is, the smallest ring containing both R and α.

Let K be the smallest eld containing R. en it is well known that K[α] is also a eld. K[α] can be seen as a vector space over K of dimension d α , where (α i ) 0≤i<dα constitutes a basis, i.e. any element x of K[α] can be expressed as a linear combination of powers of α, with coe cients in K.

For all x ∈ K[α], we de ne ψ 0 (x) = (y → xy) T . e map y → xy being linear, it can be represented as a d α × d α matrix, and can be transposed. e transpose does not change much, it merely makes the decoding part more natural (see the example below).

e map ψ 0 (1) is obviously the identity matrix. More interestingly,

ψ 0 (α) = M :=     0 1 1 a 0 a 1 • • • a dα-1     where P α (X) = X dα - dα-1 k=0 a k X k .
Lemma 1.7.3. ψ 0 is a homomorphism, i.e. for any x, y ∈ K[α], ψ 0 (x+y) = ψ 0 (x)+ψ 0 (y) and ψ 0 (xy) = ψ 0 (x) • ψ 0 (y).

One rst consequence of this lemma is that

ψ 0 (α k ) = ψ 0 (α) k = M k . Lemma 1.7.4. Any x ∈ K[α] can be uniquely wri en x = dα-1 k=0 x k α k with x k ∈ K.
Together, the last two lemmas imply that any element x = dα-1 k=0

x k α k of K[α] maps to ψ 0 (x) = dα-1 k=0 x k M k .
Let us now show that ψ 0 has a le inverse Θ 0 . First, notice that, inductively,

M k = 0 (dα-k)×k I dα-k A k B k ,
x k α k ∈ K[α]: e T 0 ψ 0 (x)θ = e T 0 ψ 0 dα-1 k=0 x k α k θ = dα-1 k=0 x k e T 0 M k θ = dα-1 k=0 x k e T k θ = dα-1 k=0 x k α k = x Θ 0 := X → e T 0
Xθ is then a le inverse of ψ 0 , in the sense that Θ 0 • ψ 0 = id. ese results can be generalised to M(K[α]) in the following way. Any X in M(K[α]) can be wri en X = dα-1 k=0 X k α k where X k ∈ M(K). We de ne

ψ : dα-1 k=0 X k α k → dα-1 k=0 X k ⊗ M k
Again, ψ is a homomorphism, and it has a le inverse Θ, de ned as

Θ : X → (I ⊗ e T 0 ) • X • (I ⊗ θ)
where I are identity matrices of adequate dimension.

Actually, we have a slightly stronger result:

Lemma 1.7.5. For any element X ∈ M(K[α]), we have ψ(X)

• (I ⊗ θ) = X ⊗ θ.
It is pre y obvious that restricting ψ to M(R[α]), and Θ accordingly, the results hold, and ψ becomes an encoding, with decoding Θ. Hence, M(R[α]) can be encoded by M(R).

Example 1.7.6. C can be encoded by R, since C = R[i]. e encoding ψ is:

ψ : A + iB → A ⊗ 1 0 0 1 + B ⊗ 0 1 -1 0 since i is a root of X 2 + 1.
We recover the transpose of the encoding de ned in [START_REF] Aharonov | A simple proof that To oli and Hadamard are quantum universal[END_REF] and presented at the beginning of the section. θ is given by θ

= 1 √ 2 1 i .
In terms of circuits, we have ψ U

… … = U enc … …
and Lemma 1.7.5 translates as:

U enc … … H R Z ( π 2 ) |0 H R Z ( π 2 ) |0 = U … …
Hence we can recover U from U enc by applying the appropriate state on the additional qubits, and then discarding them. is is the reason why we used the transpose in the de nition of ψ 0 .

is AC09]. e purpose of Category eory is to study "universal" properties and constructions, i.e. that only depend on the structure -the category -and not on the particular elements (objects and arrows) inside the category. Hence, the aim of Categorical antum Mechanics is to reveal the fundamental structures of quantum mechanics and quantum computation, as well as to provide powerful tools for the study and development of quantum information technologies.

In this chapter we describe some usual notions in category theory [START_REF] Mac | Categories for the Working Mathematician[END_REF][START_REF] Barr | Category eory for Computing Science[END_REF]. We then present results of categorical quantum mechanics, as well as the state of the art of the ZX and ZW Calculi at the beginning of the thesis.

Categories

De nition 2.1.1 (Category): A category consists of a collection of objects and arrows between objects, with a binary operator • between some arrows. Let f be an arrow from A to B. We may write f : A → B or A f → B. A is called the domain of f , and B its codomain. To qualify for being a category, the following axioms must be met: • For any object A in the category, there exists an arrow id A : A → A, called the identity on A, such that:

-∀A f → B, f • id A = f -∀B g → A, id A • g = g •
e composition is associative: in the con guration

A f → B g → C h → D, we have (h • g) • f = h • (g • f ).
Example 2.1.2. Taking sets as objects and functions between sets as arrows forms a category, named Set.

When reasoning about categories, it is customary to draw diagrams, that is, oriented graphs where the vertices are objects and edges are arrows. A diagram is said to be commutative if, for any pair of vertices a and b, any two directed paths from a to b are equal. For instance, the associativity of • can be stated as saying that the following diagram commutes:

A B C D f g h g • f h • g
Arrows in a category will be referred to as morphisms. We can de ne the collection of morphisms between two objects in a category:

Hom C (A, B) or C[A, B].
It may be useful to de ne the collection of objects of a category C: Ob(C). Also, the collection of arrows of C is referred to as Ar(C).

Arrows that have a le and right inverse are of particular interest.

De nition 2.1.3 (Isomorphism): Let C be a category, and A, B ∈ Ob(C). If f : A → B and g : B → A are such that g • f = id A and f • g = id B , then f and g are isomorphisms, g is an inverse of f (and vice-versa). Both f and g can be called invertible, and A and B are said to be isomorphic. g can be wri en f -1 .

Notice that for any object A of a category, id A is an isomorphism. To more easily de ne some concepts, it is customary to introduce the product category and the dual of a category. • Morphisms are ordered pairs (f : A → A , g : B → B ) where f is a morphism of C and g of D.

• Composition is such that (f, g) • (f , g ) := (f • f , g • g ) whenever it makes sense.

De nition 2.1.5 (Dual of a Category): Let C be a category. e category C op , called dual or opposite category of C, is de ned as:

• Ob(C op ) = Ob(C). • If f : A → B is in C, then f op : B → A is in C op . • e composition is such that g op • f op := (f • g) op .
e dual of a category is basically the category where all the arrows are reversed. en, some concepts can simply be de ned as some other concepts in the dual category (they are dual concepts). For instance, initial and terminal objects:

De nition 2.1.6 (Initial and Terminal Objects): An object T of a category C is called terminal if, for every object A in C, there is exactly one arrow A → T .

An initial object of a category C is a terminal object in C op . It is an object which has exactly one arrow to each of the objects of C.

Notice that the only arrow to a terminal object (resp. from an initial object) is the identity.

If a category has no terminal object, it is possible to construct one (either add a terminal object, or make an object that is already in the category terminal).

De nition 2.1.7 (A ne Completion): Let C be a category with no terminal object. e category C ! , called a ne completion, is de ned as:

• e objects of C ! are the objects of C with an (additional) object T .

• All arrows of C are arrows of C ! .

• For all objects A in C ! , we add an arrow ! A : A → T .

• We impose ! T = id T and

! B • f = ! A for all f : A → B.
is construction makes the object T terminal. Indeed, let f : A → T be a morphism. We can show that f is necessarily ! A :

• If T / ∈ Ob(C), then by construction, ! A is the only morphism from A to T , so f =! A . • If T ∈ Ob(C): f = id T • f = ! T • f = ! A .
Hence, there is exactly one arrow from any object to T .

De nition 2.1.8 (Pushout): Let f, g be two arrows of a category C in the con guration

B f ← A g → C. A pushout of (f, g) is a commutative diagram A B C D f g 2 g f 2
such that for any other commutative diagram built on (f, g)

A B C D f g 2 g f 2
there exists a unique arrow u : D → D such that u • g 2 = g 2 and u • f 2 = f 2 i.e. such that the following diagram commutes:

A B C D D f g 2 g f 2 u f 2
g 2 e object D in the pushout is uniquely de ned up to isomorphism. It may be referred to as the coproduct of B and C over A, and wri en B A C. Also, if a diagram is a pushout, it is customary to signal it with the symbol over the coproduct: In particular, if A is the intersection of B and C, and if f and g are the usual inclusions, the pushout can be taken as the union of B and C.

Functors

A pullback is the dual of a pushout, i.e. a pullback in a category C is a pushout in C op . We will not de ne the concept further, for we do not need it in the following.

Functors

So far, we have seen what constitutes a category, as well as some constructions on categories. We will now see how to link di erent categories together.

A morphism between categories that preserves the structure is called a functor:

De nition 2.2.1 (Functor): A functor F : C → D between the categories C and D is a map that:

• Assigns to each object A of C an object F (A) of D • Assigns to each arrow A f → B of C an arrow F (A) F (f ) → F (B) of D • Preserves identities: for each object A of C, F (id A ) = id F (A) • Preserves composition: F (g • f ) = F (g) • F (f ) whenever g • f is de ned in C
We call a bifunctor a functor from a product category to a category. For instance, Hom C actually de nes a bifunctor Hom C (•, •) : C op × C → Set, as follows:

• objects (A, B) of C op × C i.e. pairs of objects A and B of C are mapped to

Hom C (A, B) • morphisms (f op : A → A , g : B → B ) of C op ×C are mapped to the morphisms Hom C (A, B) → Hom C (A , B ) : q → g • q • f
Since we are going in the following to consider several di erent categories, we will end up using functors a lot to go from one to the other. Two properties of functors we will largely be interested in are fullness and faithfulness:

De nition 2.2.2 (Fullness): A functor F : C → D is full if: ∀A, B ∈ Ob(C), ∀g : F (A) → F (B), ∃f : A → B, g = F (f )
is property can be seen as a kind of surjectivity: for any arrow of D whose domain and codomain are a ained by F , there exists at least one preimage by F in C. Of course, if B is not a ained by F , none of the arrows in Hom(A, B) and Hom(B, C) can have a preimage by F , for any objects B and C in D.

De nition 2.2.3 (Faithfulness

): A functor F : C → D is faithful if: ∀A, B ∈ Ob(C), ∀f, g : A → B, F (f ) = F (g) =⇒ f = g
Again, faithfulness is a bit more subtle than injectivity. Two arrows between the same objects are equal in the image of F if and only if they are equal in C. However, it can happen that f : A → B and g : C → D are mapped to the same arrow if either A = C or B = D.

De nition 2.2.4 (Subcategory): A subcategory S of the category C is a category with the same composition (. • .), such that all the objects of S are objects of C (with the same identities), and that all the arrows of S are arrows of C.

ere is an obvious functor I from S to C which maps the objects and arrows of S to the same objects and arrows in C, called the inclusion functor. Notice that this functor is necessarily faithful. Now, suppose we want to consider some categories as objects, and functors between the categories as arrows. We would then end up with a "meta category" (functors can be composed, the composition is associative, and the identity functor exists for any category). Although, one has to be careful when doing so, for we want to avoid the category version of Russell's paradox: should the category of all categories be an object of itself?

To avoid this problem, we only de ne Cat as the category of all small categories, a small category being a category where both the collections of objects and arrows constitute sets. Now, interestingly, the constructions of the previous section can be applied to categories of small categories. Indeed, it is sometimes possible to perform the pushout of two functors, or to consider some categories as terminal objects in some larger categories. For instance the category, o en denoted 1, with a single object 1 and single arrow id 1 : 1 → 1, is a terminal object in the category of categories Cat.

PROPs

e categories we are going to consider in the next section and in Part II are called PROPs (for product and permutations). ese are strict monoidal categories generated by a single object. e reason monoidal categories are interesting for us is that they bene t from a very natural graphical interpretation. In these categories, we have two compositions: the usual composition of categories •, which performs the sequential composition, and a new composition called tensor product and denoted ⊗, which performs a kind of parallel composition. In general (for so-called relaxed monoidal categories), the tensor product is not directly associative, but only up to isomorphism. We will not consider the relaxed monoidal categories, but only the strict monoidal categories, where ⊗ really is associative.

PROPs

De nition 2.3.1 (Monoidal Category): A (strict) monoidal category C is a category with additional bifunctor (. ⊗ .) : C × C → C called tensor product (we may denote A ⊗ B the objects of C × C), and a particular object I such that:

• ⊗ is associative: (A ⊗ B) ⊗ C = A ⊗(B ⊗ C) and (f ⊗ g) ⊗ h = f ⊗(g ⊗ h)
• I is the neutral element for ⊗:

A ⊗ I = I ⊗ A = A • (f 2 ⊗ g 2 ) • (f 1 ⊗ g 1 ) = (f 2 • f 1 ) ⊗(g 2 • g 1 )
where the le hand side is de ned if the right hand side is C is a strict braided monoidal category if moreover, for any objects A and B, there is an isomorphism σ A,B : A ⊗ B → B ⊗ A, called braiding, such that:

• ∀f : A → B, g : C → D, (g ⊗ f ) • σ A,C = σ B,D • (f ⊗ g) • σ A ⊗ B,C = (σ A,C ⊗ id B ) • (id A ⊗ σ B,C ) • σ A,B ⊗ C = (id B ⊗ σ A,C ) • (σ A,B ⊗ id C )
C is called strict symmetric monoidal category if moreover:

• ∀A, B ∈ Ob(C), σ B,A • σ A,B = id A ⊗ B
As announced, monoidal categories bene t from a nice graphical presentation, i.e. with string diagrams [START_REF] Selinger | A survey of graphical languages for monoidal categories[END_REF]. In string diagrams, objects are represented as wires (with the object variable wri en as a label on the wires), and morphisms are represented as a distinct symbol with input wires the domain and with output wires the codomain.

e generic symbol will simply be a box with the name of the morphism variable. For instance, a morphism f : A → B can be wri en:

f A B
Notice, rst, that we took the convention that the diagrams are read from top to bo om. Secondly, notice that we label wires and boxes by respectively object variables and morphism variables.

is meta-notation allows us to treat for instance A ⊗ B as either two objects side by side (which is the string-diagrammatic representation of the tensor product), or as a single object. More generally, we have:

A ⊗ B = A B and f A B g C D = f ⊗g A⊗C B⊗D = f ⊗g C D A B
Since I is a neutral element for ⊗, one can interpret it as "no wire". I can be seen as the empty space between and around wires. If a morphism h : I → A has domain I, it can be represented as: h A Of course, the composition • amounts to plugging two processes if the type matches:

f A g B C = g • f A C
e last axiom of the monoidal category is called the bifunctorial law or interchange law and states that:

f 2 •f 1 g 2 •g 1 = f 2 ⊗g 2 f 1 ⊗g 1 f 1 f 2 =: g 1 g 2
In a braided monoidal category, the braiding σ A,B is usually represented by , so that

A B = A B
. e axioms of the braiding are given by: = A B . To use the graphical representation for computation, we have to make sure that it does not allow to do less or more than the category itself. is is called coherence and shown in [START_REF] Joyal | e geometry of tensor calculus, i[END_REF][START_REF] Selinger | A survey of graphical languages for monoidal categories[END_REF]. eorem 2.3.2 (Coherence for Monoidal, Braided and Symmetric Categories). A wellformed equation between morphisms in the language of monoidal (resp. braided monoidal, resp. symmetric monoidal) categories follows from the axioms of monoidal (resp. braided monoidal, resp. symmetric monoidal) categories if and only if it holds, up to planar isotopy (resp. up to isotopy in 3 dimensions, resp. up to isomorphism of diagrams), in the language of string diagrams. e graphical language is very interesting for making some axioms obvious. A rst example is the interchange law above. We give another example (which actually also uses the interchange law):

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

Notice however that

Proposition 2.3.3. Let C be a monoidal category, and to morphisms f : A → I and g : I → B. en:

f ⊗ g = g • f = g ⊗ f 2.3. PROPs

Proof

Using the axioms of monoidal categories, we have:

f ⊗ g = (id I • f ) ⊗(g • id I ) = (id I ⊗ g) • (f ⊗ id I ) = g • f = (g ⊗ id I ) • (id I ⊗ f ) = (g • id I ) ⊗(id I • f ) = g ⊗ f
Pictorially, thanks to the coherence eorem 2.3.2, we directly have:

g f A B = g f A B = g f A B
In an arbitrary strict monoidal category, the objects can be very di erent, so it is important to keep track of the objects on all the wires, to make sure we are not mistyping.

is can quickly be cumbersome, although there is a case where this becomes useless: if the strict monoidal category C is generated by a single object.

is is the case for instance in quantum circuits, where the wires can only represent a qubit.

ese are, in a sense, the "smallest interesting (non-trivial) monoidal categories". Let us have a glimpse of what they look like. Let C be such a strict monoidal category. First, as a monoidal category, it has an identity object I. For C to be non-trivial (since

I ⊗ I = I)
, it should also have an additional object X. By the axioms of monoidal category, X ⊗ X should also be in C. Inductively,

n X ⊗ • • • ⊗ X for any n ∈ N * should be in C. We may denote X ⊗ n := n X ⊗ • • • ⊗ X.
Recall that I is "no wire", whereas X ⊗ n represents n parallel wires. Hence, it is customary to identify I with X ⊗ 0 . Such a monoidal category, if it is strict symmetric, is called a PROP [START_REF] Lack | Composing PROPs[END_REF].

De nition 2.3.4 (PROP): A PROP is a strict symmetric monoidal category whose objects are freely generated by a single object and ⊗.

Equivalently, a PROP can be de ned as a strict symmetric monoidal category whose objects are all natural integers N.

Indeed, it su ces to identify X ⊗ n with n. is is made even clearer with the convention that denotes the generating object by 1. en n := n 1 ⊗ • • • ⊗ 1, and the morphisms are of the form f : n → m with n, m ∈ N. e identity on the object n is denoted id n . From now on we will not label the wires that represent 1. However, we may still use n to represent a bundle of n wires.

Example 2.3.5.

e collection of quantum circuits can be seen as a PROP if the Swap gate is allowed and taken to be σ 1,1 . For instance, take the gate set (CNot, Swap, H, R Z (α)). e quantum circuits built with it constitute a PROP where the morphisms are CNot : 2 → 2, Swap : 2 → 2, H : 1 → 1, R Z (α) : 1 → 1, and all the parallel and sequential compositions of these gates. Notice that stating that it constitutes a PROP gives an equational theory on the circuits. For instance, we have Swap • Swap = id 2 .

We are ge ing closer to the focus of the thesis, since we can already de ne a category whose graphical interpretation is a language for quantum mechanics. We can specify even further though. Notice that even though the following de nitions are re nements over PROPs, many of the concepts are valid in some more general categories.

De nition 2.3.6 ( †-PROP): A category C is a †-PROP if it is a PROP such that for any morphism f : n → m there exists a morphism f † : m → n, and such that:

• id † A = id A • (g • f ) † = f † • g † • (g ⊗ f ) † = g † ⊗ f † • (f † ) † = f • σ † n,m = σ m,n Equivalently, C is a †-PROP if there is a functor † : C op → C, compatible with ⊗,
which is the identity on the objects and which is an involution, i.e., † • † = id C .

ere is now enough background to categorically de ne unitary morphisms, which is in the core of quantum mechanics, as well as self-adjoint morphisms.

De nition 2.3.7 (Unitary Morphism

): A morphism f in a †-PROP is called unitary if it is an isomorphism and if f † = f -1 . De nition 2.3.8 (Self-Adjoint Morphism): A morphism f in a †-PROP is called self- adjoint if f = f † .
e axioms of PROP (or symmetric monoidal category) allow us to move things around, or loosing and straightening wires, but they do not allow us to bend them backwards for instance. If we want to have real freedom on how to move morphisms around, we should be able to perform something like this:

= .

is is allowed by compact-closed PROPs.

De nition 2.3.9 ( †-Compact PROP): A compact-closed †-PROP is a †-PROP with two morphisms n : 2n → 0 and η n : 0 → 2n for each object n, such that: := 1 n e presence of a compact structure, i.e. two morphisms n and η n that satisfy the snake equations, allow for a very important result, called the map/state duality.

• n = η † n • (id n ⊗ n ) • (η n ⊗ id n ) = id n = ( n ⊗ id n ) • (id n ⊗ η n ) • σ n,n • η n = η n • η n+1 = (id ⊗ η n ⊗ id) • η 1 e last
Proposition 2.3.10 (Map/State Duality). In any †-compact PROP, there exists an isomorphism from n → m maps to 0 → n + m states.

Proof

Since we are in a †-compact PROP, there exist two morphisms η n and n for any n ∈ N, which satisfy the snake equations. en, for n, m ∈ N, we de ne:

ψ n,m : Hom(n, m) → Hom(0, m + n) f → (f ⊗ id n ) • η n ψ n,m : Hom(0, m + n) → Hom(n, m) f → (id m ⊗ n ) • (f ⊗ id n ) Pictorially: ψ n,m f n m = f n m and ψ n,m f n m = f n m
. We then check that ψ n,m and ψ n,m are inverse to each other (i.e. ψ n,m = ψ -1 n,m ), making them isomorphisms:

ψ n,m • ψ n,m f n m = ψ n,m f n m = f n m = f n m
for any f : n → m, thanks to snake equations. We similarly have ψ n,m • ψ n,m = id.

We now have all the overall structure we need. Before we dive into the di erent interesting internal structure, we de ne functors between the di erent categories we handle.

De nition 2.3.11 (PROP Functors): A PROP-functor F : C → D is a functor between PROPs which is compatible with ⊗, that is:

• F (0) = 0 • ∀n, m ∈ N, F (n + m) = F (n) + F (m) • ∀f : n → m, g : p → q, F (f ⊗ g) = F (f ) ⊗ F (g) • F (σ n,m ) = σ F (n),F (m)
A †-PROP-functor F is a PROP-functor which "commutes" with the †-functor, i.e.:

• ∀f : n → m, F (f † ) = F (f ) †
A †-compact-PROP-functor further preserves the compact structure:

• ∀n ∈ N, F (η n ) = η F (n)
Here, we did not describe how the functor transforms the object 1. In particular, it is not necessary that F (1) = 1, as one might want the functor F to act on objects as F (n) = 2n for instance.

Monoids, Comonoids, and their Interactions

We are now interested in some particular structures that one can have in a PROP. All the structures presented in this section are pre y common in monoidal category theory [START_REF] Mac | Categories for the Working Mathematician[END_REF]. e simplest are the monoid and its dual, the comonoid.

De nition 2.4.1 (Monoid): Let C be a PROP. A monoid is a pair of morphisms (µ, υ), where µ : 2n → n is called multiplication, and υ : 0 → n is called unit, and such that:

• µ • (µ ⊗ id n ) = µ • (id n ⊗ µ) • µ • (υ ⊗ id n ) = id n • µ • (id n ⊗ υ) = id n e monoid is called commutative if moreover: • µ • σ n,n = µ
With string diagrams, we usually represent the pair (µ, υ) by

, . e axioms of a monoid are given by:

(M 1) = = (M 2) =
and the monoid is commutative if:

(M C) = Example 2.
: 2n i → n i , i : 0 → n i 1≤i≤n is a list of monoids, then 1 n … … … : 2 n i → n i , 1 n … : 0 → n i is a commutative monoid.
A very important notion for the following is the the monoid in the dual category.

De nition 2.4.4 (Comonoid): Let C be a PROP. A pair of morphisms (ν, τ ) forms a comonoid if it forms a monoid in C op . If moreover the monoid is commutative, the comonoid is called cocommutative.

In terms of string diagrams, a pair of morphisms , is a comonoid if they respect the upside-down version of the axioms of a monoid:

(CoM 1) = = (CoM 2) =
Example 2.4.5. In the PROP B de ned in Example 2.4.2, we have two arrows: copy : 1 → 2 and discard : 1 → 0, such that ∀x : 0 → 1, copy •x = x ⊗ x and discard •x = id 0 e pair (copy, discard) forms a cocommutative comonoid.

We now have two very essential structures in a PROP. In the following we are interested in how such structures can interact. e rst is when they form a bialgebra.

De nition 2.4.6 (Bialgebra): A bialgebra in a PROP is a quadruple (µ, υ, ν, τ ) such that:

• (µ, υ) forms a monoid • (ν, τ ) forms a comonoid • ν • µ = (µ ⊗ µ) • (id ⊗ σ n,n ⊗ id) • (ν ⊗ ν) • ν • υ = υ ⊗ υ • τ • µ = τ ⊗ τ • τ • υ = id 0
With string diagrams, when they form a bialgebra, it is common to distinguish the monoid and the comonoid by using two di erent colours. e quadruple , , , is a bialgebra if , forms a monoid, , forms a comonoid, and:

(B1) = (B2) = (B3) = (B4) =
Example 2.4.7. In the PROP B described in Examples 2.4.2 and 2.4.5, the quadruple (⊕, false, copy, discard) forms a bialgebra. Indeed, xoring two booleans then copying the result is equivalent to copying the two booleans rst and then xoring each pair of copies, copying the boolean false results in having two copies of false, xoring two booleans and discarding the result is equivalent to discarding both booleans, and nally, discarding a boolean that was just initialised to false amounts in doing nothing.

Re ning further on the bialgebra structure, we get the concept of Hopf algebra.

De nition 2.4.8 (Hopf Algebra): A bialgebra (µ, υ, ν, τ ) is called a Hopf algebra if there exists α : n → n, called antipode, such that:

• µ • (α ⊗ id n ) • ν = υ • τ = µ • (id n ⊗ α) • ν
Using string diagrams, if we represent the antipode α by , then the axiom translates as:

(H) = =
Example 2.4.9. e quadruple (⊕, false, copy, discard) forms a Hopf algebra with antipode the identity. Indeed, we already know it forms a bialgebra, and if we xor two copies of the same value, the result is always false.

e other potential interaction of monoids and comonoids is the Frobenius algebra.

De nition 2.4.10 (Frobenius Algebra): A (commutative) Frobenius algebra in a PROP is a quadruple (µ, υ, ν, τ ) such that:

• (µ, υ) forms a (commutative) monoid • (ν, τ ) forms a (cocommutative) comonoid • (µ ⊗ id n ) • (id n ⊗ ν) = ν • µ = (id n ⊗ µ) • (ν ⊗ id n ) A Frobenius algebra is called special if moreover: • µ • ν = id n
In the case where the PROP is a †-PROP, one can de ne a (special) (commutative) †-Frobenius monoid as a pair (µ, υ) such that (µ, υ, µ † , υ † ) is a (special) (commutative) Frobenius algebra. e last two axiom are made clearer when using string diagrams, where the colour is taken to be the same for the monoid and the comonoid (the reason for this is given by eorem 2.4.17 in the following):

(F ) = =
and the specialness:

(F s) =
Example 2.4.11. is time, let B be the full sub-PROP of Rel generated by B := {true, false}.

Its morphisms are binary relations between tensors of 1 := B. One morphism of B is copy : 1 → 2 which relates any boolean to two copies of itself, i.e. ∀x : 0 → 1, (x, x ⊗ x) ∈ copy. Together with the morphism discard : 1 → 0, for which ∀x : 0 → 1, (x, id 0 ) ∈ discard, they form a comonoid (similarly to their counterparts in Set). However, there are two more morphisms in B , which we will denote respectively by copy op and discard op , de ned by: ∀x : 0 → 1, (x ⊗ x, x) ∈ copy op and (id 0 , x) ∈ discard op e couple (copy op , discard op ) forms a monoid, and actually, the tuple:

(copy op , discard op , copy, discard)

forms a Frobenius algebra.

Remark 2.4.12. A commutative Frobenius algebra on object 1 induces a compact structure, that is some n : 2n → 0 and η n : 0 → 2n that satisfy the axioms

(id n ⊗ n ) • (η n ⊗ id n ) = id n = ( n ⊗ id n ) • (id n ⊗ η n ) and σ n,n • η n = η n .
De ne for instance n inductively as:

1 := τ • µ i.e. and n := 1 • (id ⊗ n-1 ⊗ id)
and similarly η n as:

η 1 := ν • υ i.e. and η n := (id ⊗ η n-1 ⊗ id) • η n e axiom σ n,n • η n = η n is obviously satis ed by cocommutativity of ν. e axiom id = ( 1 ⊗ id) • (id ⊗ η 1 ) is satis ed: = = Similarly, the axiom (id ⊗ 1 ) • (η 1 ⊗ id) = id is satis ed. It is then routine to show that the generalised axiom (id n ⊗ n ) • (η n ⊗ id n ) = id n = ( n ⊗ id n ) • (id n ⊗ η n ) is also satis ed.
Conversely, we can suppose we have a compact structure that reacts well with our multiplication and comultiplication, and see what we can get from here:

Remark 2.4.13. Suppose we have a monoid (µ : 2 → 1, υ : 0 → 1), and there exists ν : 1 → 2 and η : 0 → 2 (represented by

) such that:

(µ ⊗ id) • (id ⊗ η) = ν = (id ⊗ µ) • (η ⊗ id) i.e. = =
Notice that so far, the only assumptions on ν are that it is a 1 → 2 morphism, and that it satis es the two equations just above. en the Frobenius axioms can be deduced from associativity of (µ, υ):

= = = = = =
We can even show that η = ν • υ:

= =
However we do not have a Frobenius algebra, for there is no counit (and hence no comonoid). is can be patched if there exists τ : 1 → 0 such that:

(τ ⊗ id) • η = υ = (id ⊗ τ ) • η i.e. = =
en:

= = =
And similarly for the le counit. Coassociativity can be obtained thanks to:

= = =
Also, thanks to the previous remark, we can build a morphism : 2 → 0 such that it forms a compact structure together with η.

is shows how closely related associativity and the Frobenius axioms are.

Remark 2.4.14. A Frobenius algebra is special i = . Indeed, if the algebra is special, this equation is obvious, but we can also recover specialness from it:

= = = = =
When working with a special commutative Frobenius algebra in a PROP -which is a strict monoidal category -, it is tempting to do some simpli cations.

De nition 2.4.15 (Spider): In a PROP, the family (s It so happens that the spiders capture the special commutative Frobenius algebras, as spelt out in [START_REF] Lack | Composing PROPs[END_REF] and graphically in [START_REF] Coecke | POVMs and Naimark's theorem without sums[END_REF].

(n,m) : n → m) n,m∈N is called a spider if: • ∀k ≥ 1, (id m ⊗ s (k+p,q) ) • (s (n,m+k) ⊗ id p ) = s (n+p,m+q) • ∀k ≥ 1, (s (n+k,m) ⊗ id q ) • (id n ⊗ s (p,k+q) ) = s (n+p,m+q) • σ q,m • s (p+n,q+m) • σ n,p = s (n+p,m+q) • s (1,1) = id
Proposition 2.4.16 (Normal Form). Let µ n be inductively de ned as:

µ 0 = υ, µ n = µ • (µ n-1 ⊗ id) i.e. µ n = … n
Similarly, ν n is inductively de ned as:

ν 0 = τ, ν n = (ν n-1 ⊗ id) • ν i.e. ν n = … n If f : n → m
is a morphism generated from the special commutative Frobenius algebra (µ, υ, ν, τ ), and the symmetric monoidal structure maps σ n,m , and if the graphical representation of f is connected, then we have:

f = ν m • µ n i.e. f = … … eorem 2.4.17 (Spider ↔ Special Commutative Frobenius Algebra).
e family (ν m •µ n ) n,m∈N forms a spider family. Conversely, given a spider family (s (n,m) : n → m) n,m∈N , the quadruple (s (2,1) , s (0,1) , s (1,2) , s (1,0) ) forms a special commutative Frobenius algebra.

e axioms of a Frobenius algebra can be more powerful than (B1). Under the right assumption, the axioms of Frobenius algebras implies (B1):

Proposition 2.4.18. In a Frobenius algebra , , , :

= ⇐⇒ = Proof [⇒]: = = = = [⇐]: = = = = =
Notice that any special commutative Frobenius algebra meets the previous conditions, but it was already known from eorem 2.4.17.

PROPs for antum Mechanics

It is now time to apply the introduced notions to quantum mechanics. In [START_REF] Abramsky | Categorical quantum mechanics[END_REF], the framework of choice was the †-compact PROPs. is follows from the observation that the Hilbert spaces of dimension the powers of some d and linear maps form a †-compact PROP.

De nition 2.5.1 (FdHilb): We de ne FdHilb as the monoidal category of nite dimensional Hilbert spaces. Its objects are C n and its arrows are linear maps. e object

C n ⊗ C m can be seen as C nm , and if f = a i |x i y i | and g = b i |x i y i | then f ⊗ g := a i b j x i x j y i y j . is monoidal category is symmetric: for any n, m ∈ N, σ C n ,C m := i∈{0,...,n-1} j∈{0,...,m-1} |ji ij| are such that σ C n ,C m • σ C m ,C n = id C nm .
is serves as the framework for the categories where the dimension of the Hilbert spaces are the powers of a single integer d.

:= {0, • • • , d -1} so that {|0 , • • • , |d -1 } is an orthonormal basis of C d .
e identity on n is given by:

id n := x∈B n
|x x| e axioms of strict monoidal category are obviously satis ed. For the category to be symmetric, we need a braiding that is essentially self-inverse. We de ne σ n,m as:

σ n,m := x∈B n y∈B m |y x x y| en, if f =
f xy |y x| and g = g zw |w z|, we get (ignoring some subscripts for simplicity):

(g ⊗ f ) • σ = f xy g zw |w y z x| |y x x y| = f xy g zw |w y x z| = |y x x y| f xy g zw |y w x z| = σ • (f ⊗ g
) e other axioms of braided and symmetric monoidal categories are more easily satis ed.

It is then routine to show that

Qudit is a †-PROP if ( f xy |y x|) † := f xy |x y|.
It remains to prove that Qudit is compact-closed. Take η n :=

x∈B n |x x . n is imposed by n = η † n = x∈B n
xx|. e equation σ n,n • η n = η n is obviously satis ed. e snake equation also is:

(id n ⊗ n ) • (η n ⊗ id n ) = x,y∈B n |x x y y| z,w∈B n |z z w w| = x∈B n |x x| = id n
and similarly for the second equation. In conclusion, Qudit is a †-compact PROP.

We can now discuss the di erent structures (monoid, Frobenius algebras and †-Frobenius monoids, bialgebras, Hopf algebras) in the category Qudit. A rst result shows that any commutative †-Frobenius monoid exactly corresponds to an orthonormal basis in Qudit [CPV12]. eorem 2.5.4 ( †-Frobenius Monoid ↔ Basis). Let (|i ) 0≤i<d be an orthonormal basis of C d , and µ := |i i i| and υ := |i . en (µ, υ) forms a special commutative †-Frobenius monoid.

Conversely, if (µ, υ) forms any special commutative †-Frobenius monoid on object 1, then there exists an orthonormal basis (|i ) 0≤i<d such that µ = |i i i| and υ = |i . Hence, using the Spider eorem 2.4.17, together with eorem 2.5.4, one can deduce that spider families exactly represent orthonormal bases. We now want to extend the notion of spider family by integrating morphisms that react well with the underlying Frobenius algebra. is will lead to the notion of phase group. It is introduced in [CD11], but we take in the following approach a detour to what we call the diagonal morphisms (also called pre-phase in [START_REF] Duncan | Interacting Frobenius algebras are Hopf[END_REF]).

De nition 2.5.5 (Diagonal Morphisms): Let (µ, υ) be a monoid on object n. A morphism f : n → n is called diagonal (with respect to (µ, υ)), if:

µ • (f ⊗ id n ) = f • µ = µ • (id n ⊗ f ) i.e. f f f = = If f is a diagonal morphism that is unitary (i.e. f • f † = id n = f † • f ), then f is called a phase shi .
Proposition 2.5.6. e set of diagonal morphisms (with respect to (µ, υ) on object n) forms a commutative monoid with •, i.e. for any diagonal morphisms f and g, f

• g is a diagonal morphism, we have f • g = g • f , id n is a diagonal morphism, and obviously f • id n = f = id n • f and • is associative.
As a consequence, the set of invertible diagonal morphisms forms an abelian group (or commutative group).

e set of phase shi s (with respect to (µ, υ)) forms an abelian group, called phase group.

Proof

First, notice that for any diagonal morphism f : n → n there is a morphism

f : 0 → n such that f = µ • (f ⊗ id n ). Indeed: f f = f = so f = f • υ. Conversely, it is easy to check that for any f : 0 → n, then µ • (f ⊗ id n ) is a diagonal morphism (by associativity
). e identity is obviously a diagonal morphism, which is the neutral element for •.

e composition of two diagonal morphisms is a diagonal morphism:

f f = g g f = g
As a result, the set of diagonal morphisms forms a monoid with •. e monoid is commutative by commutativity of µ. e results for invertible and unitary diagonal morphisms directly follow.

rough this proof, we actually get a characterisation of diagonal morphisms. ese are exactly the morphisms that can be expressed as µ

• (f ⊗ id n ) for f : 0 → n.
Now, back to the Frobenius algebras, it is fairly easy to see that we can extend the notion of normal form in a special commutative Frobenius algebra.

Corollary 2.5.7. Let (µ, υ, ν, τ ) be a special commutative Frobenius algebra on object 1. If f : n → m is a morphism generated from the special commutative Frobenius algebra (µ, υ, ν, τ ), the set of diagonal morphisms {h i } i and the symmetric monoidal structure maps σ n,m , and if the graphical representation of f is connected, then we have:

f = ν m • i h i • µ n i.e. f = … … h0•h1• • • • Proof e only technical point is to prove that if f is a diagonal morphism w.r.t. µ, then it is a "codiagonal morphism" w.r.t. ν: f = f = f f =
the rest is obvious by application of Proposition 2.4.16 and the axiom of diagonal morphisms and the result of "codiagonal" morphism.

We therefore get a natural extension of the spider families that include diagonal morphisms.

De nition 2.5.8 (Extended Spider): Let ∆ be the set of diagonal morphisms w.r.t. a monoid (µ, υ) on object 1. e family of morphisms (s Corollary 2.5.9 (Extended Spider). e family

(n,m) δ : n → m) n,m∈N δ∈∆ is called an extended spider if: • ∀k ≥ 1, (id m ⊗ s (k+p,q) δ 2 ) • (s (n,m+k) δ 1 ⊗ id p ) = s (n+p,m+q) δ 1 •δ 2 • ∀k ≥ 1, (s (n+k,m) δ 1 ⊗ id q ) • (id n ⊗ s (p,k+q) δ 2 ) = s (n+p,m+q) δ 1 •δ 2 • σ q,m • s (p+n,q+m) δ • σ n,p = s (n+p,m+q) δ • s (1,1) δ = δ In string diagram representation, for k ≥ 1: n ...
(ν m • δ • µ n ) n,m∈N δ∈∆
, where ∆ is the set of diagonal morphisms w.r.t. (µ, υ) on object 1, forms an extended spider family. Conversely, given ∆ a set of morphisms, and an extended spider family (s

(n,m) δ : n → m) n,m∈N δ∈∆ , the quadruple (s (2,1) id , s (0,1) id , s (1,2) id , s (1,0)
id ) forms a special commutative Frobenius algebra with ∆ the set of diagonal morphisms w.r.t. (s

(2,1) id , s (0,1) id ).
e notion of extended spider was led by a type of morphisms that interact well with a monoid. We give another example of morphisms that interact in a particular way with monoids.

De nition 2.5.10 (Morphism of Monoids): Let (µ, υ) and (µ , υ ) be two monoids on objects respectively n and m. A morphism f : n → m is called a morphism of monoids if:

f • µ = µ • (f ⊗ f ) and f • υ = υ i.e. f = f f and f = If moreover n = m and (µ, υ) = (µ , υ ), we call f an endomorphism of monoids.
Notice that if f is invertible, one can express one monoid entirely as the other monoid together with f and f -1 . Moreover, in this case the second equality is provable: We know how to characterise an orthonormal basis as a special commutative †-Frobenius monoid, we have de ned a family of morphisms that react speci cally well with a given orthonormal basis, and we have a compact way to express them by means of spiders. We will show in the next sections how to build two graphical languages for quantum computing: the so-called ZX-Calculus and ZW-Calculus; but before this we want to discuss a particular property that such a language can have, and which is directly related to the algebras explored previously.

f = f = f f f -1 = f f -1 = f f -1 = Interestingly,

Universality and Completeness

In the following, we are going to de ne and study graphical languages for quantum mechanics. A graphical language L is a PROP, where the morphisms are string diagrams, and are called diagrams.

De nition 2.6.1 (Graphical Language): A graphical language L/R is a PROP L presented by a set of generators and a set of equations R together with a function . :

L → S called the standard interpretation of L/R in S. L/R is said to represent S. L/R is said to be sound if . de nes a functor . : L/R → S.
Hence, a graphical language for quantum mechanics if there is a function . from the language to Qudit, which gives to all the diagrams an interpretation as a quantum operator. We always consider that the standard interpretation is the identity on the objects (i.o.o.).

If the language can represent any quantum operator, it is called universal.

De nition 2.6.2 (Universality): For a xed d, a graphical language L for qudits is called universal if:

∀f ∈ Qudit, ∃D ∈ L, D = f Equivalently, L is universal if the functor L . → Qudit is full.
Notice that L is universal should be equivalent to . is surjective. However, since the standard interpretation . is i.o.o., and since N = Ob(L) = Ob(Qudit) by de nition of PROPs, . is full ⇐⇒ . is surjective.

In general, two di erent morphisms can represent the same quantum operator. is is dealt with by the set R of equalities between diagrams, that can be applied locally. Such a set is called a monoidal theory or an axiomatisation, and it de nes an equivalence relation between morphisms. If D 1 is equivalent to D 2 under this equivalence relation, we may denote R D 1 = D 2 , and we have:

• R D 1 ⊗ D = D 2 ⊗ D • R D ⊗ D 1 = D ⊗ D 2 • R D 1 • D = D 2 • D • R D • D 1 = D • D 2
for any diagram D whenever it makes sense.

Obviously, for a given set of generators, di erent axiomatisations can yield di erent languages. is is why we denote a graphical language as L/R. is can also be seen as the language obtained by taking the diagrams of L modulo the equivalence relation R.

e completeness is a crucial question for a graphical language.

De nition 2.6.3 (Completeness): Let L/R be a graphical language for quantum mechanics, with standard interpretation . : L/R → Qudit. We say that L/R is complete if for any two diagrams D 1 and D 2 , we have:

D 1 = D 2 =⇒ R D 1 = D 2
Equivalently, the language L/R is complete if the functor . is faithful. is is fundamental. If the language is complete, then whenever two diagrams represent the same quantum operator, they can be turned into one another solely using the axiomatisation R. It means the language completely captures quantum mechanics, and any computation can be conducted entirely inside the graphical language.

e notion of completeness can be extended to sub-PROPs of Qudit (i.e. subcategories of Qudit that are also PROPs). However, one has to be careful that some of these sub-PROPs do not allow approximate universality.

De nition 2.6.4 (Approximately Universal Sub-PROP):

Let C be a sub-PROP of Qudit. C is approximately universal if:

∀f : n → m ∈ Qudit, ∃(g p : n → m) p∈N ∈ C N , ∀ε > 0, ∃N ∈ N, (p ≥ N ) =⇒ ( f -ι(g p ) < ε)
where ι : C → Qudit is the inclusion functor, and with . de ned in Section 1.3. In other word, C is approximately universal if its morphisms can approach any morphism of Qudit with arbitrary precision.

is is permi ed because the arrows of Qudit form a topological space. In the thesis, we will mainly be interested in the category Qubit and languages that represent it. An important sub-PROP of Qubit is Stab.

De nition 2.6.5 (Stab): Stab is de ned as the sub-PROP of Qubit whose morphisms are generated by:

• S (n,m) : n → m := |0 m 0 n | + i |1 m 1 n | • H : 1 → 1 := |+ 0| + |-1|
is PROP is a †-compact PROP (one can recover the compact structure of FdHilb for instance with η := (S (1,1) ⊗ S (1,1) ) • S (1,2) • S (0,1) and := η † ) . It is very close to the stabiliser or Cli ord group in the following sense: It is equivalent to a scaled stabiliser group with initialisation and post-selected measure.

Proposition 2.6.6.

∀f : n → m ∈ Stab, ∃g ∈ C p , x ∈ C, f = x id m ⊗ 0 p-m • g • id n ⊗ 0 p-n

Proof

We are going to proceed by induction. We need to show the result on the two generators S (n,m) and H, and then on the two compositions • and ⊗. Since the result will be proven to be preserved by compositions, we can break S (n,m) into smaller parts.

Let us rst de ne the following morphisms:

µ := S (1,1) 3 • S (2,1) υ := S (1,1) 3 • S (0,1) ν := S (1,2) • S (1,1) 3 τ := S (1,0) • S (1,1) 3
One can notice that (µ, υ, ν, τ ) forms a Frobenius algebra. We can de ne µ n and ν n for arbitrary n by: m) , we can show it for S (1,1) , µ, ν, υ and τ . Remember that the gate set (CNot, R Z ( π 2 ), H) exactly synthesises the Cli ord group. H and S (1,1) are already in C 1 . One can check that:

µ 0 := υ µ n+1 := µ • (µ n ⊗ id) ν 0 := τ ν n+1 := (ν n ⊗ id) • ν One can check that µ n = |0 0 n | + |1 1 n | and ν n = |0 n 0| + |1 n 1|, so that S (n,m) = ν m • S (1,1) • µ n . Now instead of showing the result for S (n,
µ = (id ⊗ 0|) • CNot ν = CNot • (id ⊗ |0 ) υ = √ 2H |0 τ = √ 2 0| H which means that H, S (1,1) , µ, ν, υ and τ are of the form x (id m ⊗ 0 p-m |)•g•(id n ⊗ |0 p-n ) with g Cli ord.
It remains to show that the two compositions preserve this structure.

Suppose

f i = x i g i |0 p i -n i 0 p i -m i | ni mi
. en:

f 1 f 2 = x 1 x 2 g 2 |0 p 2 -n 2 0 p 2 -m 2 | g 1 |0 p 1 -n 1 0 p 1 -m 1 | = x 1 x 2 g 2 0 p 1 +p 2 -(m 1 +m 2 ) g 1 0 p 1 +p 2 -(n 1 +n 2 )
where g 2

g 1 ∈ C p 2 +p 1 -m 1 if g i ∈ C p i . f 2 f 1 = x 1 x 2 g 2 |0 p 2 -n 2 0 p 2 -m 2 | g 1 |0 p 1 -n 1 0 p 1 -m 1 | = x 1 x 2 g 2 g 1 0 p 1 +p 2 -(n 1 +n 2 ) 0 p 1 +p 2 -(m 1 +m 2 ) where g 2 g 1 ∈ C p 2 +p 1 if g i ∈ C p i .
Hence, by composition, S (n,m) can be put in the wanted form, and by induction, any morphism of Stab can be put in this form.

Stab is not approximately universal. If it were, then so would be the Cli ord group.

In this thesis we will also be interested in another sub-PROP of Qubit.

De nition 2.6.7 (Clifford+T): Clifford+T is de ned as the sub-PROP of Qubit whose morphisms are generated by:

• T (n,m) : n → m := |0 m 0 n | + e i π 4 |1 m 1 n | • H : 1 → 1 := |+ 0| + |-1|
Again, this PROP is †-compact, and it is equivalent to a scaled Cli ord+T group with initialisation and post-selected measure. As we will show in Section 3.10 ( eorem 3.10.2), this sub-PROP is approximately universal, though it can be inferred from a analogous result on quantum circuits [START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF].

We can also de ne a whole family of sub-PROPs of Qudit, indexed by a ring R.

De nition 2.6.8 (Qudit R ): Let R be a subring of C. Qudit R is the sub-PROP of Qudit, such that its morphisms are linear maps of the form

f xy |y x| where f xy ∈ R. Remark 2.6.9. If R is closed under conjugation, then Qudit R is †-compact. Of course, if R is dense in C, then Qudit R is approximately universal. Proposition 2.6.10. Clifford+T = Qubit Z[ 1 2 ,e i π
4 ] Notice that it makes Clifford+T approximately universal. Again, this proposition will be proven in Section 3.10.

In the two following sections, we are going to de ne two graphical languages for quantum computing, which will use the previous structures ((co)monoids, bialgebras, Hopf algebras, Frobenius algebras …). Although these were de ned in the general case on any object, in the following graphical languages, they are de ned on object 1.

e ZX-Calculus

e premise of the ZX-calculus follows logically from the previous work on orthonormal basis. is language depicts how two such bases interact. To do so, we need to carefully select the them. Since we want to capture the most of quantum mechanics, it makes sense to take them as "far apart" from each other as possible.

De nition 2.7.1 ([CD11] Unbiasedness, Complementarity): Let {|i } i be an orthonor- mal basis of C d . A quantum state |ψ on C d is called unbiased w.r.t. {|i } i if: ∀ |i , |j , | i ψ | = | j ψ |
Two orthonormal bases are complementary or mutually unbiased if each vector of one basis is unbiased w.r.t. the other.

More informally, a state is unbiased w.r.t. a basis if measuring the state in this basis yields all the states in said basis with equal probabilities.

e two mutually unbiased bases each form a †-Frobenius monoid, and their interaction yields an interesting structure [START_REF] Coecke | Interacting quantum observables: Categorical algebra and diagrammatics[END_REF][START_REF] Duncan | Interacting Frobenius algebras are Hopf[END_REF], which is a variant of structures seen in Section 2.4.

De nition 2.7.2 (Scalar, Scaled Algebra): In a PROP, we call any morphism κ : 0 → 0 a scalar. It is called invertible if there exists a scalar κ -1 such that κ ⊗ κ -1 = id 0 .

We say that some tuple

(f 0 ⊗κ 0 , • • • , f n ⊗κ n ) of morphisms f i with invertible scalars κ i : 0 → 0 forms a scaled algebra if (f 0 , • • • , f n ) forms an algebra.
Such an algebra can be a monoid, a bialgebra, a Hopf algebra, a Frobenius algebra, … Proposition 2.7.3 (Complementarity ↔ Bialgebra/Hopf). Let (µ , υ ) and (µ , υ ) be two special commutative †-Frobenius monoids representing complementary bases in Qudit.

en, both (µ , υ , µ † , υ † ) and (µ , υ , µ † , υ † ) form scaled bialgebras. Furthermore, υ = (υ † ⊗ id) • µ † • υ and υ † = υ † • µ • (υ ⊗ id) if and only if (µ , υ , µ † , υ † ) forms a scaled Hopf algebra with antipode α = (υ † • µ ) ⊗ id • id ⊗(µ † • υ ) .

e ZX-Calculus

Let us rst see what the resulting equations are, and we will try to x the scalars in the morphisms a erwards.

If we represent (µ , υ , µ † , υ † ) as , , , and similarly for (µ , υ , µ † , υ † ),

the rst scaled bialgebra we get is given by:

= = =
e second result of Proposition 2.7.3 states, with the right scalars, that:

= ⇐⇒ = and =
where := represents the antipode.

Notice that the compact structures induced by (µ , υ ) and (µ , υ ) are mixed in the condition for the Hopf algebra, as well as in the antipode. When the two coincide, that is when = , then we directly get that (µ , υ , µ † , υ † ) forms a scaled Hopf algebra with antipode the identity. However, the two do not coincide in general [START_REF] Coecke | Bases in diagrammatic quantum protocols[END_REF], but if d = 2 (i.e. we are in Qubit), then they do.

Notice also that we ignored temporarily the scalar equation of the bialgebra. is is merely because it uses a non-trivial scalar. Let us de ne µ n and µ † n as in Proposition 2.4.16. en de ne the scalar

ς n := υ † • µ n • µ † n • υ .
Using the spider notation, this scalar is represented as n ... . en, in Qudit, we have:

ς ⊗d-1 1 ⊗ ς d+1 = id 0 i.e. d+1 ... ... d-1 = is equation basically gives an inverse of ς 1 for ⊗. Let us write ς -1 1 := ς ⊗d-2 1 ⊗ ς d+1
. en, all of the scalars in the previous scaled bialgebras come from the fact that

(µ ⊗ς 1 , υ ⊗ς -1 1 , µ † , υ † ) forms an actual bialgebra.
e ZX-Calculus is then a calculus of two interacting mutually unbiased bases, Z and X, with phases for both. e reason for taking phase shi s and not more generally diagonal morphisms is two-fold: rst, it is driven by quantum mechanics, where the operators are unitary; second, the phases form a group, which is easier to manipulate than a monoid. Particularly, every phase shi has a dagger that is also a phase shi .

In the following, we restrict the language to the qubit case, that is, when d := dim(H) = 2. In this case, the two compact structures coincide, and the phase shi s w.r.t. the basis {|0 , |1 } are of the form e iγ (|0 0| + e iα |1 1|). e global phase e iγ is sometimes ignored, and it turns out, it can be represented otherwise:

e iγ = + 3 + -3 0 3 + 1 3 +| + e iπ -| |0 0| + e iγ |1 1| (|0 + |1 )
so we only give a generator for |0 0| + e iα |1 1|, and we identify it with α, the value of the phase shi . Of course, we do this for both bases.

Proposition 2.7.4. Two mutually unbiased bases, {|0 , |1 } and {|+ , |-}, together with their respective phase shi s, are su cient to create a language that can represent any linear map in Qubit.

Proof

First, notice that we can represent any complex number ρe iθ ∈ C: there exists n ∈ N and γ ∈ R such that ρe iθ = 2 n+1 cos (γ) e iθ , which can be represented by:

[( 0| + 1|)(|0 + |1 )] ⊗ n ( +| + e -iγ -|)(|0 + e iγ |1 )( +| + e iπ -|)(|0 + e iθ |1 )
Also, any unitary can be represented. (CNot, R Z , H) is a universal set of gates for unitaries, and each of these gates can be implemented:

CNot = ((|0 00| + |1 11|) ⊗ id ⊗( 0| + 1|)) (id ⊗(|++ +| + |---|) ⊗(|+ + |-)) R Z (α) = |0 0| + e iα |1 1| H = e -i π 4 (|0 0| + i |1 1|)(|+ +| + i |--|)(|0 0| + i |1 1|)
Now, let |ψ : 0 → n be an n qubit state, i.e. |ψ ∈ C 2 n . en, there exists a unitary

U : n → n such that |ψ = 1 √ 2 n ||ψ | U √ 2 n |0 n . It can be represented since 1 √ 2 n ||ψ | ∈ C, U is unitary, and √ 2 n |0 n = (|+ + |-) ⊗ n .
Finally, given an arbitrary map D : n → m, we have

D = (id n ⊗ n ) ([(D ⊗ id n )η n ] ⊗ id n ),
where n and η n are the morphisms obtained from the two bases thanks to Remark 2.4.12 and the fact that in the qubit case, these compact structures coincide. Since

(D ⊗ id n )η n is a state 0 → n + m, it is representable, so D is representable.
However, we add to the language one last generator: the Hadamard gate H. is generator comes in handy for it allows to transform one basis into the other. As seen in the proof of Proposition 2.7.4, it can be wri en as a composition of phase shi s [START_REF] Duncan | Graphs states and the necessity of Euler decomposition[END_REF]:

H := e -i π 4 (|0 0| + i |1 1|) • (|+ +| + i |--|) • (|0 0| + i |1 1|)
Notice that H quali es as an involutive morphism of monoids: it allows to change the basis {|0 , |1 } to {|+ , |-} and vice-versa, so H 2 = id.

We nally have all the generators of the ZX-Calculus, and we can now give a formal de nition [START_REF] Coecke | Interacting quantum observables: Categorical algebra and diagrammatics[END_REF][START_REF] Coecke | Picturing antum Processes: A First Course in antum eory and Diagrammatic Reasoning[END_REF]. Where α ∈ R. e PROP structure is provided by σ : 2 → 2 ::

; and the compact structure by : 2 → 0 :: and η : 0 → 2 :: . e functor † is such that:

• R (n,m) Z (α) † = R (m,n) Z (-α) • R (n,m) X (α) † = R (m,n) X (-α) • H † = H
e language comes with a PROP-functor . : ZX → Qubit, called the standard interpretation, and given by:

• R (n,m) Z (α) = |0 m 0 n | + e iα |1 m 1 n | • R (n,m) X (α) = |+ m + n | + e iα |-m -n | • H = |+ 0| + |-1| • σ = i,j∈{0,1} |ji ij| • η = |00 + |11 • = 00| + 11|
Whatever the axiomatisation chosen for the ZX-Calculus, we always consider that whenever two diagrams are isomorphic, then they are equal.

By convention, when the parameter of R Z or R X is 0, we may omit it.

Remark 2.7.6. We did not give a speci c monoidal theory to the language yet. is omission is conscious.

e axiomatisation varies from one restriction of the language to the other, hence several will be given throughout the thesis. Of course, the study of the algebras in what precedes was not done in vain. Most of the axioms for Frobenius algebras and Hopf algebras will be found in every axiomatisation.

What always appears in a ZX-axiomatisation is that two isomorphic diagrams are equal. Take it as a feature of the language so important that it is part of the "freest" version of the ZX-Calculus considered. is captures essential equations of †-compact PROPs, but also things like:

= = α α
Remark 2.7.7. e ZX-Calculus does not only have a morphism of monoid, H, but also two non-trivial endomorphisms of monoid. Indeed π is an endomorphism of monoid for , and similarly π for , . is trait appeared in early axiomatisations, but was proven to be derivable from other axioms [START_REF] Backens | A simpli ed stabilizer ZX-calculus[END_REF].

is language is universal for Qubit [START_REF] Coecke | Interacting quantum observables: Categorical algebra and diagrammatics[END_REF], although it is interesting to study some of its restrictions, called fragments.

De nition 2.7.8 (Fragment of the ZX-Calculus): Let F be an additive subgroup of R. e fragment F of the ZX-Calculus is the restriction of the language where the morphisms are generated by {R

(n,m) Z (α), R (n,m) X (α), H | α ∈ F }. We may write the resulting language ZX[F ]. Also, if F is generated by a nite set of numbers {a 0 , • • • , a n }, we may denoted ZX[a 0 , • • • , a n ]
the resulting language. By contrast, ZX is the unrestricted ZX-Calculus, i.e. where the angles are in R.

Of course, axiomatisations can be applied to fragments of the language, provided all the phase shi s in the set of rules are part of the fragment. We hence denote by ZX[F ]/R the language resulting of the equivalence relation R applied to the fragment F of the ZX-Calculus. In this case, when an axiom of R displays unconstrained phase shi s (see e.g. (S) in Figure 2.1), it is assumed for all the phase shi s in the fragment F .

A rst example of an axiomatisation of the ZX-Calculus is the set of rules ZXπ /2 , given in Figure 2.1. is axiomatisation, partially introduced in [START_REF] Coecke | Interacting quantum observables: Categorical algebra and diagrammatics[END_REF], completed in [START_REF] Duncan | Graphs states and the necessity of Euler decomposition[END_REF][START_REF] Backens | Making the stabilizer ZX-calculus complete for scalars[END_REF], and simpli ed in [START_REF] Backens | A simpli ed stabilizer ZX-calculus[END_REF], was proven to be complete for • Each vertex in G is a green node with scalar in D G connected to an output.

ZX[ π 2 ] [Bac14a]. … = α+β β … α … (S) … … … … = (I g ) = (I r ) = (CP) = (B) = (IV) π 2 π 2 -π 2 = (HD) α … = α … … … (H) π = π (Z)
• Each edge between v 1 and v 2 in G is a wire with between the corresponding nodes.

For instance, if G = , then D G = . Of course, the diagram is built so that D G = |G .
rough a strategy known as pivoting [START_REF] Duncan | Pivoting makes the ZX-calculus complete for real stabilizers[END_REF] that uses the rules of ZXπ /2 , one can reduce a diagram of ZX[ π 2 ] to a graph state with additional 1-qubit morphisms on the outputs. ese morphisms are identi ed as being elements of C 1 , i.e. the stabiliser of the one-qubit Pauli group G 1 . is reduced form is not unique, but it is up to local complementations, which are derivable using the rules in ZXπ /2 . In ZX, a local complementation is the following transformation:

N (v) … … … … -π 2 = v π 2 N (v) … … … … v π 2
where N (v) denotes the neighbourhood of node v and N (v) the complementary of the subgraph N (v), that is u 1 and u 2 share an edge in N (v) i they do not in N (v).

ZX[ π 2 ]/ ZXπ /2 is complete, however the diagrams of ZX[ π 2 ] exactly represent mor- phisms of Stab [Bac14a, Bac15].
Proposition 2.7.11. e functor . : ZX[ π 2 ]/ ZXπ /2 → Stab is full and faithful. Hence, this language is not (approximately) universal for quantum mechanics. Actually, it has been proven that this axiomatisation does not make the unrestricted ZX-Calculus complete [START_REF] Schröder | e ZX-calculus is incomplete for quantum mechanics[END_REF]. eorem 2.7.12. e functor ZX/ ZXπ /2 → Qubit is not faithful. Because of this, one might want to nd a middle ground: a complete axiomatisation for an approximately universal fragment of the ZX-Calculus. Such a fragment would allow for computational speed-ups, while at the same time simplifying the search for a complete axiomatisation. A natural candidate for such a fragment would ZX[ π 4 ], for the functor ZX[ π 2 ] → Clifford+T is full, and Clifford+T is approximately universal. A rst partial answer was found, for one-qubit Cli ord+T unitaries [START_REF] Backens | e ZX-calculus is complete for the single-qubit clif-ford+t group[END_REF].

Proposition 2.7.13. Consider two morphisms f : 1 → 1 and g : 1 → 1 generated by binary operators of ZX[ π 4 ] i.e. by (R

(1,1) Z (π/4), R

(1,1) X (π/4), H), and consider the equation:

= (K) π α π α π -α en: f = g =⇒ ZXπ /2 +(K) f = g
where ZXπ /2 +(K) denotes the set of rules ZXπ /2 enriched with the equation (K).

One of the main results of the thesis is to provide a complete axiomatisation for the many-qubit Cli ord+T diagrams. We will also explore some other languages and axiomatisations. Every time, a rst step towards completeness will be to recover one known axiomatisation from which some useful lemmas can be derived. e simplest axiomatisation of the ZX-Calculus is not for the Cli ord fragment, but for the real stabiliser [START_REF] Duncan | Pivoting makes the ZX-calculus complete for real stabilizers[END_REF]. In this axiomatisation, denoted ZX π , the only novelty is that (HD) is replaced by: π = (HL) i.e. ZX π := ZXπ /2 \{(HD)} ∪ {(HL)}.

Most axiomatisations for the ZX-Calculus (all of those that are presented in this thesis) have the axiom (H), and are powerful enough to prove that is involutive, i.e. = . In this case, colour-swapping preserves the equality.

Proposition 2.7.14. Let F be a fragment, and . ↔ : ZX[F ] → ZX[F ] the interpretation inductively de ned as:

n ... ... m α → n ... ... m α n ... ... m α → n ... ... m α → → → → → D 2 • D 1 → D 2 ↔ • D 1 ↔ D 1 ⊗ D 2 → D 1 ↔ ⊗ D 2 ↔ If an axiomatisation R is such that R (H), = , then: R D 1 = D 2 ⇐⇒ R D 1 ↔ = D 2 ↔ Proof
We can show inductively that for any

ZX[F ]-diagram D, R D ↔ = D
m α • R ↔ = = • R ↔ = = • R ↔ = = = • R ↔ = = = • R ↔ = = = • R D 2 • D 1 ↔ = D 2 ↔ • D 1 ↔ = D 2 … D 1 … … = D 2 … D 1 … … = D 2 •D 1 … … • R D 1 ⊗ D 2 ↔ = D 1 ↔ ⊗ D 2 ↔ = D 1 … … D 2 … … = D 1 ⊗D 2 … … en, if R D 1 = D 2 , we obviously have: R D 1 ↔ = D 1 … … = D 2 … … = D 2 ↔
is is the case when (H), (I r ) and (I g ) are given in the axiomatisation:

Lemma 2.7.15. If R (H), (I r ), (I g ), then colour-swapping preserves the equality, since:

= (Ir) = (H) = (Ig)
and thanks to Proposition 2.7.14.

In all the axiomatisations that we are going to give in this these, colour-swapping of diagrams generated by R Z , R X and H can always be proven. Hence, when referring to an axiom or a lemma, we will either signify the equation itself, or its colour-swapped version.

en, we provide in Figure 2.2 some useful equations between ZX-diagrams as well as their dependencies. If there is an arrow eq 1 → eq 2 , it means that eq 1 is used to derive eq 2 .

e spider rules (S) and (I), the colour-change rule (H), which together with (I) allows for colour-swapping, and the biagebra rule (B), are always supposed to be in the axiomatisations.

Proposition 2.7. [START_REF] Ckr + | [END_REF]. In an oriented graph, let us denote Γ -(v) the incoming neighbourhood of vertex v. In Figure 2.2, for any eq in the set of vertices, either Γ -(eq) = ∅ and the equation is considered as an axiom for its neighbours, or eq is derivable using Γ -(eq) (assumed as axioms), and rules (S), (B), (I) and (H), i.e.: (S), (B), (I), (H), Γ -(eq) eq.

Remark 2.7.17. Notice that having a cycle in the graph (between (CP) and (Hopf)) is not a problem. is simply means that in a se ing where one has (S), (I), (B) and (H), then (CP) and (Hopf) are equivalent.

(CP) = (Hopf) = (s2) π π π … … = (πdist) (HL) (HD) (IV) α π β π α+β π = (s+) α = (sα) (K) π = (sπ) = (I ⊗ ) 1 -π 2 = (|i ) π 2 -π 2
= (S) = (B) = (S) = (Hopf) = (I) = (S)
• For the proof that (S), (I), (CP), (Hopf), (I ⊗ ) (IV), notice that in (I ⊗ ), if 1 is nonempty, there exists a diagram 1 such that 1 = 1

. Indeed, there is necessarily at least one wire in 1 , because the only non-empty, wireless scalars are R (0,0) Z (α) and R (0,0) X (α), both of which have interpretation 1 + e iα = 1. Hence, one can use (I r ) and (S) to create the node : = . en:

= 1 = (CP) 1 = (Hopf) 1 = (I) (S) 1 = • (S), (CP) (s2): = (S) = (CP) = (S)
• (HD), (S), (IV), (Hopf), (H) (HL): First:

= (HD) -π 2 π 2 π 2 = (S) (IV) -π 2 π = (Hopf) -π 2 π
(2.1) en:

π 2 = (S) (IV) -π 2 π = (CP) -π 2 π = (2.1) = (CP) = (H) (2.2)
Hence:

-

π 2 = (S) (IV) π 2 π 2 π 2 = (CP) π 2 π 2 π 2 = (2.2) = (IV)
(2.3) Finally:

= (2.1) -π 2 π = (2.3) π = (IV) π
• (B), (H), (S), (Hopf), (HL) (πdist): First:

= (B) = (H) = (B) (2.4) = (H) (S) = (H) (Hopf) en: π = (S) (B) π = (HL) = (2.4) = (HL) (S) π π • (HL), (CP), (H) (sπ): π = (HL) = (CP) = (H)
• (S), (CP), (H), (πdist) (s+): • (H), (HD), (S), (IV), (CP) (|i ):

-

π 2 = (H) -π 2 = (HD) (S) (IV) π 2 -π 2 = (CP) (S) π 2 -π 2
Moreover, the two axiomatisations ZXπ /2 and ZX π allow multiplication of all the phase shi s by -1: Lemma 2.7.18. For an arbitrary fragment F , let . -1 : ZX[F ] → ZX[F ] be the interpretation that multiplies all the angles by -1. en:

∀D 1 , D 2 ∈ ZX[ π 2 ], ZXπ /2 D 1 = D 2 ⇐⇒ ZXπ /2 D 1 -1 = D 2 -1 ∀D 1 , D 2 ∈ ZX[π], ZX π D 1 = D 2 ⇐⇒ ZX π D 1 -1 = D 2 -1

Proof

We can show that all the axioms hold under interpretation . -1 . All cases except (HD) in ZXπ /2 are trivial. anks to Proposition 2.7.16, ZXπ /2 (πdist), hence:

-π 2 π 2 -π 2 = (S) -π 2 π 2 π 2 π = (πdist) -π 2 π 2 π 2 π π = (S) π 2 π 2 -π 2 = (HD)
Remark 2.7.19. In the ZX-Calculus, we consider the angles to be in R/2πZ, although it is actually provable provided we have the adequate axioms or lemmas (in particular (HL) and (Hopf)):

2π = (S) π π = (HL) = (S) = (H) = (Hopf) = (H) (S)

e GHZ/W-Calculus

Contrarily to the ZX-Calculus, the two interacting monoids in the GHZ/W-Calculus are very di erent. e generators of the language are initially motivated by equivalence classes of entanglement on three qubits. It was later shown that it formed a ing language for fermionic quantum computing [START_REF] Hadzihasanovic | A diagrammatic axiomatisation of fermionic quantum circuits[END_REF].

De nition 2.8.1 (LOCC, SLOCC): Let |ψ and |φ be two states on n qubits. We say that |ψ and |φ are LOCC-equivalent if one can be turned into the other by application of local unitaries, that is, the tensor product of one-qubit unitaries: U = U 1 ⊗ . . . ⊗ U n with U † i U i = id for all i. If we drop the unitarity requirement (but keep invertibility), we get the SLOCC-equivalence: e two n-qubit states |ψ and |φ are SLOCC-equivalent if they can be turned into one-another by invertible local operators:

O = O 1 ⊗ . . . ⊗ O n such that all the O i are invertible.
Notice that SLOCC is more permissive, and hence results in a smaller number of equivalence classes. Yet, this number is in nite for states on 4 qubits and more. A state on two qubits can either be entangled or not.

ere is only one equivalence class for each case. For a three-partite entangled state, however, there are two classes of states that are entangled on three qubits [START_REF] Dür | ree qubits can be entangled in two inequivalent ways[END_REF]. Representatives of these two classes are the so-called GHZ state |000 + |111 , and W state |001 + |010 + |100 .

e GHZ/W-Calculus was hence introduced as a graphical language making these two classes interact [START_REF] Coecke | e compositional structure of multipartite quantum entanglement[END_REF]. In [START_REF] Hadzihasanovic | A diagrammatic axiomatisation for qubit entanglement[END_REF], the language was made complete for a nonuniversal sub-PROP of Qubit, and later was made complete for Qubit (and actually also a lot of its sub-PROPs) [START_REF] Hadzihasanovic | Two complete axiomatisations of pure-state qubit quantum computing[END_REF]. Although an embryo of the language exists for qudits [START_REF] Hadzihasanovic | e Algebra of Entanglement and the Geometry of Composition[END_REF], here, we only give its description for qubits.

First of all we need multiplications and co-multiplications, given by the states GHZ and W. Notice here that the choice was made to take an arbitrary complex number r as argument (actually an arbitrary ring element), instead of a phase. As a result, the diagonal morphisms are not necessarily phase shi s, however this choice simpli es some calculations, such as the normal form of a ZW-diagram. e second monoid is formed from the W state. Notice that the W state is the sum of the three 3-qubit states of Hamming weight 1:

|001 + |010 + |100 = x∈{0,1} 3 |x|=1 |x
where the Hamming weight |s| of a string s is the number of non-zero symbols in s. It is then fairly natural to de ne 1-and 2-qubit W states as |1 and |01 + |10 . ese will help de ne a monoid. Indeed, if we take the following string diagram representations:

: |1 : |0 1| + |1 0| : |0 01| + |0 10| + |1 00|
then the pair , forms a monoid. We also de ne the upside-down version of these three generators as representing the transpose of the associated linear map. It is actually possible to de ne a degenerate version of a spider family that ts the W states.

Notice that is an involutive endomorphism for the monoid , , and more interestingly, for any complex number r, r is an endomorphism for , . e W-monoid does not de ne a †-Frobenius monoid. is is a rst hint to the fact that the interactions of the two structures are not usual. For instance, the two pairs , and , satisfy the axioms of Hopf algebras with identity as the antipode:

= = = = = 2.8.
e GHZ/W-Calculus Notice however that it is not a proper Hopf algebra, for , is not a comonoid. Now, because , is not a †-Frobenius monoid, we have not speci ed how it reacts with , , although two equations have already been found above. ese seem to indicate that there is some sort of bialgebra between the two. However it does not function with the usual swap σ. Interestingly, there exists a "degenerate" swap σ :

2 → 2 such that , , , satis es the axioms of Hopf algebra with antipode -1 :

= σ = -1
Again, this is not a proper Hopf algebra, for σ cannot be considered as a proper swap.

For the biagebra to function, σ must represent the map

|00 00| + |01 10| + |10 01| - |11 11| = (-1) ij
|ji ij|, and it does not satisfy all the axioms of PROP. For instance,

σ • η = η and in general (id ⊗ f ) • σ = σ • (f ⊗ id).
It does satisfy, however, equalities that are known as the (modi ed) Reidemeister moves:

σ = σ σ σ = = σ σ σ σ σ σ
In the following, the morphism σ will be denoted .

De nition 2.8.2 (ZW-Calculus): e qubit ZW-Calculus, or ZW, is a †-compact graphical language, with the following set of generators:

• Z (n,m) (r) : n → m :: n ... ... m r • W (n,m) : n → m :: n ... ... m • σ : 2 → 2 :: where r ∈ C.
e PROP structure is provided by σ : 2 → 2 ::

; and the compact structure by : 2 → 0 :: and η : 0 → 2 :: . e functor † is such that:

• Z (n,m) (r) † = Z (m,n) (r) • W (n,m) † = W (m,n) • σ † = σ
e language comes with a PROP-functor . : ZW → Qubit, called the standard interpretation, and given by:

• Z (n,m) (r) = |0 m 0 n | + r |1 m 1 n | • W (n,m) = x∈{0,1} m y∈{0,1} n |x•y|=1 |x y| • σ = i,j∈{0,1} (-1) ij |ji ij| • σ = i,j∈{0,1}
|ji ij|

• η = |00 + |11 • = 00| + 11|
where x • y is the concatenation of x and y, and |.| is the Hamming weight, i.e. the number of non-zero symbols in a word. Hence, |x • y| = 1 means that there is only one symbol 1 in both x and y.

We can consider fragments of the PROP where the parameters of Z (n,m) are restricted to a ring R ⊆ C that is closed under conjugation. Such a fragment will be denoted

ZW[R].
To each is associated an axiomatisation ZW R , given in Figure 2.3.

Here, we cannot use the result that every graph isomorphism between diagrams preserves the semantics if we consider the nodes as non-oriented, precisely because σ in some sense has to be considered as a swap. Particularly, = . However, what remains true is that any graph isomorphism between two σ -free ZW-diagrams preserves the semantics. Alternatively, if σ is understood to be an oriented node, any graph isomorphism that respects the symmetries of σ preserves the semantics. e axiomatisation presented here has been sightly simpli ed from the one found in [START_REF] Hadzihasanovic | Two complete axiomatisations of pure-state qubit quantum computing[END_REF]. Particularly, the rule 4a allows us to derive:

s r = (1b) s r = (6a) (3a) s r = (4a) r+s = (1b)
r+s e axiomatisation has the powerful property:

eorem 2.8.3 (Completeness of the ZW-Calculus [HNW18]). For any subring R of C, ZW[R]/ ZW R is complete, i.e. . : ZW[R]/ ZW R → Qubit is faithful.
Historically, the ZW-Calculus was not given with parameters in a ring, but merely in {-1, 1} [START_REF] Hadzihasanovic | A diagrammatic axiomatisation for qubit entanglement[END_REF]. We denote this particular restriction ZW. Of course the rule 4 has no meaning in this se ing, and is replaced by the rule 4 give in Figure 2 [START_REF] Hadzihasanovic | A diagrammatic axiomatisation for qubit entanglement[END_REF]). e restriction ZW/ ZW is complete, i.e. . : ZW/ ZW → Qubit is faithful.

.4. = 0b r • • • • • • • • • r • • • = 0a • • • • • • • • • • • • = 1b r s • • • • • • • • • • • • . . . • • • rs • • • = 1a • • • • • • • • • • • • • • • • • • = = 2a 2b 2c = -1 = = 3a 3b r r r = 4a r s r+s 4b = 0 4c = = = 6a 6b r = = = 5a 5b 5c = X = 7 … … … … -1 = R 3 R 2 =

Sketch of Proof

e proof for both theorems rely on normal forms. First of all, if the parameters are only in {-1, 1} let us inductively give syntactic sugar such as to recover a ring, the smallest containing -1 and 1, that is Z:

• -1 and 1 are already de ned

• := -1 0 • If n ≥ 2: := n n+1 • If n ≤ -2: := n n-1 -1
Now that we have an arbitrary ring R in any case, let us give the normal form. Again, we use the map/state duality, so that the normal form can be given only for states. A state |ψ on n quits can always be wri en as |ψ = r i b

(i) 1 • • • b (i) n
. e normal form of the state |ψ is then:

r1 rq r2 … …
where the node with parameter r i is connected to the j th output i b (i) j = 1. e proof then amounts to showing that all the generators can be put in normal form, and that the two compositions of diagrams in normal form can be put in normal form. Some of the axioms, such as rule X, have purposely been chosen so that this can be done. e ZW-Calculi are hence complete, but they are not universal, unless R = C. However, ZW[R] exactly represents a sub-PROP of Qubit.

Proposition 2.8.5. e functor . :

ZW[R]/ ZW R → Qubit R is full and faithful. Hence, if R is dense in C, then ZW[R]
represents an approximately universal fragment of Qubit.

Part II ZX-Calculus

Chapter 3

Cli ord+T

We have seen that the set of axioms ZXπ /2 is not complete for the unrestricted ZX-Calculus ZX, but that a simple patch can be done to achieve completeness for one-qubit unitaries of, arguably, the simplest approximately universal fragment of quantum mechanics: Cli ord+T. In this chapter, we provide a complete axiomatisation for the manyqubit ZX-diagrams of Cli ord+T ZX[ π 4 ], and we prove the completeness thanks to the language ZW/ ZW which is complete. To do so, we rst need to alter the la er language to t our needs while preserving the completeness. We de ne an intermediary language, ∆ZX, for which we provide an axiomatisation. We then prove it to be complete for a fragment (the π-fragment), thanks to a back and forth system of interpretations between ∆ZX and ZW, that appears to have the same expressive power. Finally, by showing that all the generators of ∆ZX can be expressed in ZX[ π 4 ], we derive a new set of axioms, that we prove to be complete for Cli ord+T, again using a back-and-forth system of interpretations between ∆ZX[π] and ZX[

e Triangle

A key point in the proof of completeness for ZX[ π 4 ] is the link (the two interpretations) between the two languages.

e ZX-diagrams can easily represent the GHZ state, as well as any 3-qubit state that is SLOCC-equivalent to the GHZ state.

e di culty is to represent the W state with a ZX-diagram. Diagrammatically, the white spider of the ZW-Calculus is easily represented in the ZX-Calculus (recall that in ZW the parameters are only -1 and 1). e black spider is the troublesome one.

From a Morphism of Monoids in ZW

Recall that , forms a comonoid in the ZW-Calculus. A rst approach could be to try and build the (co)diagonal morphisms for this comonoid. By the proof of Proposition 2.5.6, these diagonal morphisms are exactly of the form

f . If f : 1 → 0 is 3.1. e Triangle generic, i.e. f = x 0| + y 1|, then f = x y 0 x .
When either x or y is null, then the map is colinear to either the identity or |0 1|, both of which are easily expressible in the ZX-Calculus, up to a global scalar. In the general case, however, things get trickier, and the map cannot be expressed as a Cli ord map times a scalar. For instance, let us consider the case x = y = 1. Let t denote the map = 1 1 0 1 .

Interestingly, it has been noted that is not only a diagonal morphism w.r.t. , but also a morphism of monoids [vdW]. Consider the following diagram in ZW/ ZW:

One can check that its interpretation is |1 11|+|0 ( 00|+ 01|+ 10|). In other words, it acts as an And gate for the canonical basis. By completeness, the pair , forms a monoid. en:

Proposition 3.1.1. In ZW/ ZW, the morphism is a morphism of monoids between , and , .

Proof

One can check that all the equations of morphism of monoids are sound. By completeness of ZW/ ZW, they are provable in the language:

ZW = , =

De nition of the Triangle

ΛH := -π 4 -π 2 π 4 π 2
en, using the fact that

-π 2 = e i -π 4 π 2
, one can show:

ΛH = -π 4 -π 2 π 4 π 2 = e i -π 4 π 4 π 4 π 2 = 1 1 √ 2 0 1 √ 2
Finally, we need to "control" the scalar √ 2, which we can do since

-π 4 -π 4 = e i -π 4 1 0 0 √ 2 , so π 4 π 4 π 2 -π 4 -π 4 = 1 1 0 1 . Using a diagram of ZX[ π 4 ],
we can now represent a non-trivial non-unitary matrix whose entries are in {0, 1}. As we will see in the following, this gives us access to the expressive power of the W SLOCC-equivalence class. In the following, this diagram will be so useful that we gave it a syntactic sugar:

:= π 4 π 4 π 2 -π 4 -π 4
Of course, being in a †-compact PROP, we can de ne the upside-down triangle as:

:=
Notice that this node is oriented, i.e. the upside-down triangle is not equal to the triangle. is is due to the fact that its interpretation is not a symmetric matrix. Another diagram of ZX[ π 4 ] with the same interpretation was found in [START_REF] Coecke | Picturing antum Processes: A First Course in antum eory and Diagrammatic Reasoning[END_REF]:

-π 4 π 4 π 4 -π 4 π = π 4 π 4 π 2 -π 4 -π 4 81 3.2. e ZW1 / √ 2 Extension
A Building Block e triangle can then be used as a building block for di erent larger diagrams. For instance, consider the following diagram: We may call this diagram transistor, for it acts as a switch, controlled by an additional wire. e last two diagrams can prove very useful to perform high order controlled operations. For instance, a CCNot can be represented by:

π 3.2 e ZW 1 / √ 2 Extension
We would also want to build a functor F : ZX[ π 4 ] → ZW which preserves all the information. However we cannot have F (.) = . , because . : ZW → Qubit Z , while . :

ZX[ π 4 ] → Qubit Z 1 √ 2
,e i π 4 . We will need to use an encoding. Recall that for any subring R of C, if α is an R-algebraic integer, there exists an encoding ψ : M(R[α]) → M(R). However, 1 / √ 2 cannot be an algebraic integer. Instead, we will de ne a simple extension of ZW that can represent morphisms of 1 De nition 3.2.1 (ZW1 / √ 2 and ZW1 / √ 2 ): We de ne the graphical language ZW1 / √ 2 as the language with the same generators as ZW, with the additional generator:

√ 2 N Qubit Z , i.e. of
• d : 0 → 0 :: e functor . is extended to ZW1 / √ 2 with:

• d = 1 √ 2
e associated axiomatisation ZW1 / √ 2 is de ned as:

• ZW ∪ = iv , = z Proposition 3.2.2. e functor . : ZW1 / √ 2 / ZW1 / √ 2 → 1 √ 2
N Qubit Z is full and faithful.

Proof

Let D 1 and D 2 be two diagrams of ZW1 / √ 2 such that D 1 = D 2 . We can rewrite D 1 and D 2 as D i = d i ⊗( ) ⊗ n i for some integers n i and diagrams d i of the ZW that do not use the symbol.

We rst assume

D i = 0. Notice then that n 1 = n 2 mod 2. Indeed D 1 = D 2 =⇒ d 1 √ 2 n 1 = d 2 √ 2 n 2
. Since d i are matrices over Z, n 1 and n 2 are either both odd or both even.

First, assume n i = 0 mod 2. From (iv), we get that ZW1 / √

2 d i = D i ⊗ ⊗ n i 2 . W.l.o.g. assume n 1 ≤ n 2 . en d 1 ⊗ ⊗ n 2 -n 1 2 = 2 n 2 -n 1 2 d 1 = 2 n 2 2 D 1 = d 2 . Since d 1 ⊗ ⊗ n 2 -n 1 2
and d 2 are ZW-diagrams and have the same interpretation, thanks to the completeness of the ZW-Calculus,

ZW1 / √ 2 d 1 ⊗ ⊗ n 2 -n 1 2 = d 2 , which implies ZW1 / √ 2 d 1 ⊗ ⊗ n 2 -n 1 2 ⊗( ) ⊗ n 2 = d 2 ⊗( ) ⊗ n 2 i.e. ZW1 / √ 2 D 1 = D 2 . Now, we can easily show ZW1 / √ 2 D 1 ⊗ = D 2 ⊗ ⇐⇒ ZW1 / √ 2 D 1 = D 2 , proving the result when n i = 1 mod 2: ZW1 / √ 2 D 1 ⊗ = D 2 ⊗ =⇒ ZW1 / √ 2 D 1 ⊗ = D 2 ⊗ =⇒ iv ZW1 / √ 2 D 1 = D 2 =⇒ ZW1 / √ 2 D 1 ⊗ = D 2 ⊗ Finally, if D 1 = D 2 = 0, then d i = 0. By completeness, ZW d 1 = d 2 and ZW d i ⊗ = d i . Hence, using (iv) n i times, ZW1 / √ 2 d i = d i ⊗ = d i ⊗ ( ) ⊗ n i = d i ⊗( ) ⊗ n i = D i , so ZW1 / √ 2 D 1 = d 1 = d 2 = D 2 .

e ∆ZX-Calculus

Interpreting the W-state using the Triangle

To make a link between the two languages, we rst need a functor from

ZW1 / √ 2 to ZX[ π 4 ]. is should be pre y straightforward, since 1 √ 2 N M (Z) ⊂ M Z 1 2 , e i π 4
. e main di culty is the representation in ZX[ π 4 ] of the W spider. First of all, using the spider rule, we can always decompose the W spider as a composition of W nodes of arity 1, 2 and 3.

e interpretation of the three-legged W node is yet again an example of the use of the triangle. Indeed:

= 0 1 1 0 1 0 0 0 = 1 1 ⊗ 0 1 1 0 •     1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0     •     1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0    
ese can be represented as

π } CNot } √ 2 +| ⊗ Not Λ(|0 0|)
. is diagram can be simpli ed using ZXπ /2 :

π π = π

An extension of the ZX-Calculus

Hence, the functor from ZW1 / √ 2 to ZX[ π 4 ] would translate any white node to a 0 or πgreen node, while the black nodes would be mapped to either π-red nodes or the above diagram. It turns out, the only occurrences of π 2 and π 4 would be hidden in the triangle, in the translation of the three-legged black dot. is means that using solely the triangle and ZX-generators of the π-fragment, one can express any matrix over D := Z 1 2 . Interestingly, this is exactly what post-selected quantum circuits generated by To oli and H can express. Hence, it becomes interesting to de ne a new intermediate language, called ∆ZX, where the triangle node is a generator and not mere syntactic sugar.

De nition 3.3.1 (∆ZX-Calculus):

e qubit ∆ZX-Calculus, is a †-compact graphical language, with the following set of generators and their string-diagram representation:

• R ; and the compact structure by : 2 → 0 :: and η : 0 → 2 :: . e functor † is such that:

• R (n,m) Z (α) † = R (m,n) Z (-α) • R (n,m) X (α) † = R (m,n) X (-α) • H † = H • ∆ † = ( ⊗ id) • (id ⊗ ∆ ⊗ id) • (id ⊗ η)
e language comes with a PROP-functor . : ∆ZX → Qubit, called the standard interpretation, and given by:

• R (n,m) Z (α) = |0 m 0 n | + e iα |1 m 1 n | • R (n,m) X (α) = |+ m + n | + e iα |-m -n | • H = |+ 0| + |-1| • ∆ = |0 0| + |0 1| + |1 1| • σ = i,j∈{0,1} |ji ij| • η = |00 + |11 • = 00| + 11|
Whatever the axiomatisation chosen for the ∆ZX-Calculus, we always consider that whenever two ∆-free diagrams are isomorphic as graphs, then they are equal. Alternatively, when keeping in mind that ∆ is an oriented node, any graph isomorphism preserves the semantics.

As for the ZX-Calculus, we denote by ∆ZX[F ] the fragment F of ∆ZX. ∆ZX can be seen as an extension of ZX, so axiomatisations of the ZX-Calculus can be applied to it.

From

∆ZX[π] to ZW 1 / √ 2 and Back ZW1 / √ 2 → ∆ZX[π]
Our goal now is to provide a complete axiomatisation for ∆ZX[π]. To do so, we need functors from ∆ZX[π] to ZW1 / √ 2 and back. e one going back was roughly depicted in the previous section. We denote this functor by [.] X . We can now give it a proper inductive de nition:

[.] X → → → → → → → n ... ... m r → n ... ... m δr,-1π π → π → → π D 1 • D 2 → [D 1 ] X • [D 2 ] X D 1 ⊗ D 2 → [D 1 ] X ⊗[D 2 ] X
where δ is the Kronecker symbol: δ x,y = 0 if x = y 1 if x = y Notice that we did not give an interpretation of arbitrary black nodes W (n,m) . By Rules (1b) and (4 b), one can decompose W (n,m) using only W (1,1) , W (1,2) and W (2,1) , in a spider-like style:

∆ZX[π] ZW1 / √ 2 Qubit [.] X . . Proof is is routine. ∆ZX[π] → ZW1 / √ 2
e other functor, from ∆ZX[π] to ZW1 / √ 2 , will be denoted [.] W . It can be easily de ned as:

[.] W → → → → → → n ... ... m α → n ... ... m (-1) δα,π → D 1 • D 2 → [D 1 ] W • [D 2 ] W D 1 ⊗ D 2 → [D 1 ] W ⊗[D 2 ] W n ... ... m α → ⊗ m W • n ... ... m α W • ⊗ n W
is interpretation also preserves the semantics:

Proposition 3.4.3. e following diagram commutes:

∆ZX[π] ZW1 / √ 2 Qubit [.] W . .

Proof

is is routine.

By introducing this intermediary language, our goal has shi ed from:

• transporting the completeness of

ZW1 / √ 2 / ZW1 / √ 2 to ZW[ π 4 ]/ ZXπ /4 to • transporting the completeness of ZW1 / √ 2 / ZW1 / √ 2 to ∆ZX[π]/R for a set of ax- ioms R • then transporting the completeness of ∆ZX[π]/R to ZW[ π 4
] is method hence requires we provide a complete axiomatisation for the π-fragment of the new language ∆ZX[π]/ ∆ π .

Axiomatisation for ∆ZX[π]

From interpretation [.] X we can get a set of equations that a complete axiomatisation of ∆ZX[π] would need to verify: the interpretation of the axioms of ZW1 / √ 2 . We can try and reduce them using the usual axioms of the ZX-Calculus. We eventually get to the axiomatisation ∆ π given in Figure 3.1. In this section and the next two, we are going to show that it is complete:

eorem 3.5.1 (Completeness of ∆ZX[π]/ ∆ π ). . : ∆ZX[π]/ ∆ π → 1 √ 2
N Qubit Z is full and faithful. In particular, the language ∆ZX[π]/ ∆ π is complete.

On the rules of ∆ π

Before diving into the proof, let us comment on the set of rules ∆ π . Notice that it uses most of the axioms of ZX π , together with new rules using . We can try and give an interpretation for these last equations. First, we have the fact that is a diagonal morphism for the comultiplication . is directly gives (TW). (HT) can be seen as the decomposition of Hadamard using triangles. Also, remember that is a morphism of monoids between (AND, |1 ) and We can then recover an equation that is very close to (TCX) if we assume we can operate the π-distribution (πdist). First:

(|0 00| + |1 11|, √ 2
= (I) (S) = (3.2) (IV) π = (TW) π = (πdist) (CP) (3.2) (S) (I) π (3.3) en: π = (3.1) (S) = (3.3) π = (3.1)
We can also recover (B∆), if we assume = and

π π = π = (CP) (S) π = π … = α+β β … α … (S) … … … … = (I g ) = (I r ) = (IV) = (CP) = (B) α … = α … … … (H) π = π (Z) = (T0) π = (B∆) π = (HT) π = (TCX) = (TW)

∆ZX[π]/ ∆ π is Complete for the Real Stabiliser

As announced, we want to prove that this axiomatisation is complete. First of all let us show that we can recover ZX π : Proposition 3.5.2. ∆ π ZX π is means that any ∆-free equality between ∆ZX[π]-diagrams is derivable. To prove this, we have to "bootstrap" the language ∆ZX[π]/ ∆ π . Notice that since we have most of the rules of ZX π in ∆ π , thanks to Proposition 2.7.16, we already have access to some usual lemmas, such as: Proof of Prop. 3.5.2 e only axiom of ZX π that is not in ∆ π is (HL), which is derivable according to Lemma 3.5.7.

∆ π = , = , = ,

ZW

1 / √ 2 derives from ∆ π
We can now state the most important proposition for the completeness.

Proposition 3.6.1. For any two diagrams D 1 and D 2 of ZW1 / √ 2 :

ZW1 / √ 2 D 1 = D 2 =⇒ ∆ π [D 1 ] X = [D 2 ] X Proof of Prop. 3.6.1 If ZW1 / √ 2 D 1 = D 2 , then there exists a series of ZW1 / √ 2 - diagrams d 1 , • • • , d n such
that there is exactly one axiom application between d i and d i+1 , between D 1 and d 1 and between d n and D 2 . Hence, since [.] X is a PROP-functor, it su ces to prove that every axiom of ZW1 / √ 2 can be derived from ∆ π a er application of [.] X . e rest of this proof is technical: every axiom of ZW1 / √ 2 is translated in ∆ZX[π] and proved using ∆ π . It will alternate between lemmas in ∆ZX[π]/ ∆ π and axiom derivations. For the reader's convenience, this proof ends at page 99.

Proof of Prop. 3.6.1 (ctd.) 0b comes directly from the semantics-preserving graph isomorphisms.

1b, 2a and 2b come directly from the spider rules (S) and (I). 2c:

→ = (S) = (HL) π ← -1
Lemma 3.6.2. ← 0a: anks to Lemma 3.4.1 and the previous equations, it su ces to prove the result for 2 and 3-legged W nodes. e rst is obvious. For the 3-legged W nodes:

=

→ π = π = 3.6.3 π ← → π = π = (πdist) 3.5.5 (S)
π ← e last case in then derivable from the other two.

3a is the expression of (πdist). 3b:

-1 -1 → (S) (I) π π = (πdist) (S) π ← (S) (I)
-1 5c:

→ π π = (S) (s2) = (IV)
← 7: Again, thanks to Lemma 3.4.1, it su ces to prove the result when W has arity 2 or 3:

-1 → π π = (S) (H) π π = (B) π π = (H) π π = (πdist) (H) (S)
π ← and:

→ π = (πdist) (H) (S) π π ← -1 R 2 : → = (S) = (H) (Hopf) ← R 3 : → = (S) = (S)
← iv: For Lemma 3.6.12, rst:

→ = (I) = (S) = (s2) (IV) ← z: → π = (
= (I) (S) (B∆) π π = (

Completeness of ∆ZX[π]/ ∆ π

To nish the proof of completeness, we still need the property that a er the application of the composite interpretation [[.] W ] X we can always recover the initial diagrams, i.e. we need to show: that [[.] W ] X = id.

Proposition 3.7.1. For any ∆ZX[π]-diagram D, we have:

∆ π [[D] W ] X = D
Proof is is done by induction on the diagram D: Proof of eorem 3.5.1 ere are two results here: fullness and faithfulness. Consider the following diagram:

• [[D 1 ⊗ D 2 ] W ] X = [[D 1 ] W ] X ⊗[[D 2 ] W ] X • [[D 1 • D 2 ] W ] X = [[D 1 ] W ] X • [[D 2 ] W ] X • → → = (S) (
∆ZX[π]/ ∆ π ZW1 / √ 2 / ZW1 / √ 2 1 √ 2 N Qubit Z [.] X [.] W . . • [.] W is faithful: let D 1 , D 2 : n → m ∈ ∆ZX[π] such that ZW1 / √ 2 [D 1 ] W = [D 2 ] W . By Proposition 3.6.1, ∆ π [[D 1 ] W ] X = [[D 2 ] W ] X , so by Proposition 3.7.1, ∆ π D 1 = D 2 . • [.] W is full: Let D ∈ ZW1 / √ 2 . We de ne D X := [D] X . By Propositions 3.4.3 and 3.4.2, [[.] X ] W = . , hence, by completeness of ZW1 / √ 2 / ZW1 / √ 2 , ZW1 / √ 2 [[D] X ] W = D, i.e. ZW1 / √ 2 [D X ] W = D.
By composition, [.] W is full and faithful, so

∆ZX[π]/ ∆ π . → 1 √ 2
N Qubit Z is full and faithful.

From ∆ZX[π] to ZX[ π 4 ]

We now want to do essentially the same job to nd a complete axiomatisation of ZX[ π 4 ], and using the newfound completeness of ∆ZX [π]. First of all, we need to translate

∆ZX[π] into ZX[ π 4
]. e two languages are very close, the only generator of the former that is not in the la er is ∆. However, we already know how to represent it (Section 3.1):

[.] T → → → → → n ... ... m α → n ... ... m α n ... ... m α → n ... ... m α → → π 4 π 4 π 2 -π 4 -π 4 D 1 • D 2 → [D 1 ] T • [D 2 ] T D 1 ⊗ D 2 → [D 1 ] T ⊗[D 2 ] T
Again, we can translate all the axioms of ∆ π in ZX[ π 4 ]. It gives a set of equations that the language is supposed to be able to derive, and reducing it leads an a potential axiomatisation for Cli ord+T ZX-Calculus. We propose the set of rules given in Figure 3.2. It consists of the rules ZXπ /2 with the additional (K) that we have already seen in Proposition 2.7.13, (E)-introduced in [JPVW17] -, (SUP)-proven necessary in [START_REF] Perdrix | Supplementarity is necessary for quantum diagram reasoning[END_REF] -, (C) and (BW), replacing (IV) and (Z). Proof e only axioms that need to be proven are (IV) and (Z). From Figure 2.2, we directly get the Hopf law (Hopf), as well as (IV). Still from Proposition 2.7.16 we also get (sα). Now only (Z) remains to be proven. First:

… = α+β β … α … (S) … … … … = (I g ) = (I r ) -π 4 π 4 = (E) = (CP) = (B) = (K) π α π α π -α π 2 π 2 -π 2 = (HD) α … = α … … … (H) α α+π = 2α+π (SUP) β α π β γ -γ α = α α π β -γ γ β (C) π 4 π 4 π 4 -π 2 π 4 π 4 π 4 = π 4 π π 2 π 4 π 4 π π 4 (BW)
∆ π D 1 = D 2 =⇒ ZXπ /4 [D 1 ] T = [D 2 ] T

Proof

We already know that ZXπ /4 ZXπ /2 . e remaining axioms of ∆ π to prove are (T0), (HT), (TW), (TCX) and (B∆). (B∆):

π = -π 4 -π 4 π 2 π 4 π 4 π -π 4 π 4 -π 4 π 4 π 2 = 3.8.1 (K) (S) -π 4 -π 4 π 4 -π 2 π 4 -π 4 -π 4 π 2 π 4 -3π 4 π π 2 = (S) (I) (K) 3.8.1 π 4 π 4 -π 2 π π 4 π 4 π 4 π 4 -π 2 = (B∆) π π 4 π 4 π π 4 π -π 2 π 2 π 4 = 3.8.1 (K) π 2 π 4 -π 4 -π 4 π 4 π = π
From this rule (B∆) we instantaneously get that: π = π which will be used extensively in the following. e result is akin to Lemma 3.5.5, but this time expressed with syntactic sugar. Again, the rest of the proof will alternate between lemmas and proofs of the remaining rules. e proof ends at page 108.

Lemma 3.8.3.

π 4 π = π 2 Proof π 4 π = (E) π π 4 π 4 -π 4 = (H) π -π 4 π 4 π 4 = (HD) (S) 3π 4 π 4 π 4 π -π 2 = (K) (S) (CP) (sπ) π 3π 4 -π 4 π -π 2 π 2 = (SUP) (IV) (Hopf) -π 2 π π 2 π 2 π = (s+) (IV) π 2 Proof of Prop. 3.8.2 (ctd.) = π 4 π 4 -π 4 -π 4 π 2 = 3.8.1 (CP) (S) -π 2 π 2 π 2 = 3.8.3 π 2 π 2 -π 4 π = 3.8.4 3.8.1 π 2 -π 2 = (S) Lemma 3.8.4. π 2 = π 4 π -π 2 Lemma 3.8.5. = π 2 π 2 π 2 π -π 4 Lemma 3.8.6. β α π β α = β β π α α Proof π 2 = (H) π 2 = (HD) (S) -π 2 π 2 = (IV) (CP) (S) π 2 -π 2 = 3.8.3 3.8.1 π 4 π -π 2 = (HD) π 2 π 2 -π 2 = (H) 3.8.1 π 4 π π 2 π 2 -π 2 -π 4 π = 3.8.4 π 2 π π 2 -π 4 π 2 = (H) (S) π 2 π 2 π 2 π -π 4 103 β α π β α = 3.8.5 (S) β π α β α π π 2 -π 2 -π 2 π 2 = (CP) -π 2 β α β π π -π 2 α π 2 π 2 = (C) π 2 α π -π 2 β π π 2 β α -π 2 = (CP) α β π 2 β π π 2 -π 2 α -π 2 = (S) 3.8.5 β β π α α Proof of Prop. 3.8.2 (ctd.) (TCX): π 4 π 4 π 4 π 4 π 2 π 2 = (S) 3.8.1 3.8.5 π 4 π 4 π π 4 π 4 -π 4 -π 2 π 2 = (B) (S) -π 2 π 4 π 4 π -π 4 π 4 π 4 π 2 = (H) (S) π 2 π 4 π 4 π -π 4 π 4 -π 2 π 4 = 3.8.6 -π 2 π 2 π 4 π 4 π π 4 π 4 -π 4 = (
α π 4 π -π 4 -π 2 α -π 4 -π 4 π π 4 = (B) -π 4 α π π -π 4 α -π 4 π 4 π 4 -π 2 = (H) π α π 4 -π 4 -π 4 π -π 2 -π 4 α π 4 = 3.8.6 α -π 2 π π 4 π -π 4 -π 4 π 4 α -π 4 = (H) (S) π 4 -π 2 α -π 4 π -π 4 π 4 α π -π 4 = (H) (Hopf) π 4 -π 4 -π 2 -π 4 α -π 4 α π π π 4 = 3.8.4 (S) (K) (|i ) α -π 4 -π 4 π α -π 4 -π 4 π π 2 = 3.8.8 (
π 2 π -π 4 π 4 π 4 -π 4 -π 4 -π 4 π π 4 π 4 -π 2 = 3.8.8 (K) 3.8.1 π 2 π 4 -π 4 π 4 π 4 π 2 π -π 4 = (B) 3.8.5 π 2 π 4 π 4 -3π 4 π 4 -π 2 107 3.9. From ZX[ π 4 ] to ∆ZX[π] = (H) (S) π 4 -3π 4 3π 4 π 4 π 2 -π 2 -π 2 = 3.8.12 (H) π 4 -3π 4 3π 4 -π 2 π 4 π 2 -π 2 = 3.8.5 π 4 π 4 -π 2 π 2 π -π 4 π 2 -π 4 3π 4 = (S) 3.8.1 π 4 -π 4 -π 4 π 2 π 2 -π 4 π 2 π π 4 = 3.8.5 -π 4 -π 4 π 2 π 4 -π 2 π 4 = (H) (K) 3.8.1 π π 4 π 4 -π 2 π 4 -π 4 -π 2 -π 4 π = 3.8.5 3.8.1 π 4 π -π 2 π -π 2 π 4 π 4 π 4 π 2 = 3.8.8 3.5.5
We have now proved that all the axioms of ∆ π are derivable with ZXπ /4 .

From ZX[ π 4 ] to ∆ZX[π]

We now want to de ne an interpretation from ZX[ π 4 ], which represents morphisms of Qubit N Qubit Z . To do so, we will need this interpretation to perform an encoding.

e monic and irreducible polynomial of Z[X] of which e i π4 is a root is X 4 + 1. Any matrix over Z[ 1 2 , e i π 4 ] can be wri en as A + e i π 4 B + e i 2π 4 C + e i 3π 4 D with A, B, C, D ∈ M(Z[ ]). ψ is hence de ned as:

ψ : A + e i π 4 B + e i 2π 4 C + e i 3π 4 D → A + B ⊗ M + C ⊗ M 2 + D ⊗ M 3 where M :=     0 1 0 0 0 0 1 0 0 0 0 1 -1 0 0 0     . e le inverse of ψ is: Θ : X → (I ⊗ e T 0 ) • X • (I ⊗ θ) where θ :=     1 e i π 4 e i 2π 4 e i 3π 4     .
We want to give an interpretation [.] ∆ : ZX[ π First of all, we want to represent the encoding of the scalar √ 2:

ψ( √ 2) = ψ(e i π 4 -e i 3π 4 ) = M -M 3 =     0 1 0 -1 1 0 1 0 0 1 0 1 -1 0 1 0    
It can be decomposed with usual gates:

ψ( √ 2) = CZ   1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 -1   √ 2H ⊗ Not   0 1 0 1 1 0 1 0 0 1 0 -1 1 0 -1 0   CZ   1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 -1  
All these gates are easily represented in ∆ZX:

∆ = π
en, H can simply be decomposed as

H = 1 2 × √ 2 × ( √ 2H
). en, we need to nd a way to express the matrix M , using usual quantum operators. Notice that the matrix is CZ up to permutations.

M =   0 1 0 0 0 0 1 0 0 0 0 1 -1 0 0 0   = CZ   1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 -1   Not ⊗ Not   0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0   Swap   1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1   CNot   1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0   Swap   1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1  
We propose to rst represent the matrices with ZX-diagrams, which hopefully will have a direct preimage by [.] T . Using the usual rules of the ZX-Calculus, one can build: Eventually, we get to a formal and inductive de nition of [.] ∆ :

[.] ∆ → → → → → → π π 4 → π ∀D 1 : n → n , ∀D 2 : m → m : D 1 • D 2 → [D 1 ] ∆ • [D 2 ] ∆ (if m = n) D 1 ⊗ D 2 → • • • [D 2 ] ∆ [D 1 ] ∆ • • • • • • k π 4 n ... ... m → ... m • π 4 ∆ k • n ... k π 4 n ... ... m → ⊗ m ∆ • k π 4 n ... ... m ∆ • ⊗ n ∆
is interpretation performs the encoding ψ.

Proposition 3.9.1. e following diagram commutes:

ZX[ π 4 ] ∆ZX[π] Qubit [.] ∆ . . Qubit ψ Proof
Again, this is routine.

Remark 3.9.2. is interpretation, contrarily to [.] T , is not a PROP-functor, but merely a functor. Indeed, [. ⊗ .] ∆ = [.] ∆ ⊗[.] ∆ . e two compositions are de ned so that all the diagrams share the last two wires, which we will call "control-wire". We actually have:

D 1 ⊗ D 2 → [D 1 ] ∆ [D 2 ] ∆ • • • • • • • • • • • • • • • • • • [D 2 ] ∆ [D 1 ] ∆ • • • = • • • 3.10 Completeness of ZX[ π 4 ]/ ZX π /4
Recall that our goal is to prove that ZXπ /4 make ZX[

ZXπ /4 D = … [[D] ∆ ] T … π 4 π 2

Proof

We are going to prove inductively that:

ZXπ /4 [[D] ∆ ] T • • • • π 2 π 4 = D ⊗ π 2 π 4 • D 1 • D 2 : obvious because [[D 1 • D 2 ] ∆ ] T = [[D 1 ] ∆ ] T • [[D 2 ] ∆ ] T • D 1 ⊗ D 2 : • • • [[D 1 ] ∆ ] T • • • • • • π 2 π 4 [[D 2 ] ∆ ] T = • • • D 1 • • • • • • π 2 π 4 [[D 2 ] ∆ ] T = • • • D 1 • • • • • • π 2 π 4 D 2 • : π π 2 π 4 = (πdist) (H) (S) π π 2 π 4 π = (s2) (IV) (S) (|i ) (HD) π π 4 π -π 4 π 2 = (H) (Hopf) π π 4 π -π 4 π 2 = (K) π 4 π 2
• π 4 : First, we have:

π 2 π = π 2 π 4 π 4 π -π 4 π π 4 -π 4 π 2 -π 4 π 4 -π 4 π 2 = 3.8.8 3.8.5 π 4 π 4 π 4 π 4 π -π 4 π = (H) (S) π 4 π π 4 π 4 π 4 -π 4 π = 3.8.6 π -π 4 π 4 π 4 π 4 π π 4 = (H) (CP) (S) (I) (K) π 4 π 4 -π 4 (3.16) en: π 2 π π 4 = (S) (HD) π π 4 π 2 π 2 = (s2) (H) (Hopf) 3.5.5 π 2 π π 2 π 4 = (3.16) π 4 π 4 π 2 π 4 -π 4 = (s2) (S) (B) -π 4 π 4 π 4 π 2 π 4 = (S) π 4 π 4 π 2 = (CP) (S) π 2 π 4 π 4
• e proof of the remaining cases follow from the previous ones.

Finally, we have:

ZXπ /4 … [[D] ∆ ] T … π 4 π 2 = … D … π 4 π 2 = (sα) (IV) … D … eorem 3.10.2 (Completeness of ZX[ π 4 ]/ ZXπ /4
). e language ZX[ π 4 ]/ ZXπ /4 is complete, and . :

ZX[ π 4 ]/ ZXπ /4 → Qubit Z[ 1 2 ,e i π 4
] is full and faithful.

Proof

We have to show fullness and faithfulness: .

• Faithfulness: Let D 1 and D 2 be two ZX[ π 4 ]-diagrams such that D 1 = D 2 . By Proposition 3.9.1 [D 1 ] ∆ = ψ( D 1 ) = ψ( D 2 ) = [D 2 ] ∆ , so by eorem 3.5.1 ∆ π [D 1 ] ∆ = [D 2 ] ∆ . By Proposition 3.8.2, ZXπ /4 [[D 1 ] ∆ ] T = [[D 2 ] ∆ ] T ,
→ Qubit D ( eorem 3.5.1), there exists

D ∆ f ∈ ∆ZX[π] such that D ∆ f = ψf . Finally, let D f := • • • • D ∆ f T • • • • π 2 π 4
.

It is easy to see that D f = f . is allows us to prove Proposition 2.6.10, that is, that Clifford+T = Qubit

D[e i π

Chapter 4

General ZX-Calculus e aim of the present chapter is to obtain a complete axiomatisation, this time for the unrestricted ZX-Calculus, i.e. the ZX-Calculus with no restriction on the parameters, denoted ZX. A rst useful result will be to extend the completeness of Cli ord+T to the so-called linear diagrams with constants in Cli ord+T.

Linear Diagrams

Variables and Constants

It is customary to view some angles in the ZX-diagrams as variables, in order to prove families of equalities. For instance, the rule (S) displays two variables α and β, and potentially gives an in nite number of equalities. Notice that in the axioms for Cli ord+T ZX-calculus ZXπ /4 , the variables are used in a linear way, that is, we only perform sums of angles, hence re ecting the phase group structure.

We are going to formally de ne what a linear diagram is. We are going to de ne them for the larger ∆ZX. Since ZX can be seen as a sub-PROP of ∆ZX, the de nition of linear ZX-diagrams will be a special case of that of linear ∆ZX-diagrams.

De nition 4.1.1 (Linear Diagrams): Let α := α 1 , . . . , α k be a collection of variables, and F a fragment (an additive subgroup of R). We de ne ∆ZX[ α, F ] as the †-compact PROP with the following set of generators and their string-diagram representation:

• R (n,m) Z (E) : n → m :: n ... ... m E • R (n,m) X (E) : n → m :: n ... ... m E • H : 1 → 1 :: • ∆ : 1 → 1 ::
where E is an a ne combination of α i with coe cients in Z and constants in F , i.e. of the form i n i α i + c, with n i ∈ Z and c ∈ F . e PROP structure is provided by σ : 2 → 2 ::

; and the compact structure by : 2 → 0 :: and η : 0 → 2 :: . e functor † is such that:

• R (n,m) Z (E) † = R (m,n) Z (-E) • R (n,m) X (E) † = R (m,n) X (-E) • H † = H • ∆ † = ( ⊗ id) • (id ⊗ ∆ ⊗ id) • (id ⊗ η)
For any i ∈ {1, . . . , k} and x ∈ R, there exists a PROP-functor (.)[

α i ← x] : ∆ZX[ α, F ] → ∆ZX[ α \ {α i }, F ∪ {x}] (
where F ∪ {x} is the additive closure of F ∪ {x}) called the valuation of α i in x, and given by:

• R (n,m) Z (E) [α i ← x] = R (n,m) Z (E ) • R (n,m) X (E) [α i ← x] = R (n,m) X (E ) • (H) [α i ← x] = H • (∆) [α i ← x] = ∆ • (σ) [α i ← x] = σ • (η) [α i ← x] = η • ( ) [α i ← x] = where E = j =i n j α j + (n i x + c) if E = j n j α j + c.

Again, by convention, if F is generated by {x

i } i , we can replace ∆ZX[ α, F ] by ∆ZX[ α, {x i } i ]. Hence we can directly write F ∪ {x} instead of F ∪ {x}.
With this de nition, we may notice that for any fragment F and any variables α,

∆ZX[F ] is a sub-PROP of ∆ZX[ α, F
]. e valuations are functors: they can be composed. Also, they commute, in the sense that the following diagram commutes when i = j:

∆ZX[ α, F ] ∆ZX[ α\{α j }, F ∪{x j }] ∆ZX[ α\{α i }, F ∪{x i }] ∆ZX[ α\{α i , α j }, F ∪{x i , x j }] (.)[αi ← xi] (.)[αj ← xj] (.)[αj ← xj] (.)[αi ← xi]
Hence, the order of the valuations is not important. e composite ((.)[α i ← x i ]) [α j ←

x j ] can be abbreviated as (.)[(α i , α j ) ← (x i , x j )], and similarly for more than two valuations.

If all the variables are evaluated, we end up in a fragment of ∆ZX.

So, if D ∈ ∆ZX[ α, F ], we write D( x) the diagram of ∆ZX[F ∪ x] de ned as D( x) := D[ α ← x].
is allows us to de ne the standard interpretation of the PROP of linear diagrams:

∀D ∈ ∆ZX[ α, F ], D := x → D( x)
e standard interpretation maps any linear diagram to a multivariate function whose codomain is Qubit. It may be interesting to ne-grain the target of the standard interpretation, for we want to take into account the fragment of the source PROP.

De nition 4.1.2: Let F be a fragment of the language. We de ne the PROP Qubit

R k Z[ 1 2 ,e iF ]
as:

Qubit R k Z[ 1 2 ,e iF ] := α → P (e iα 1 , . . . , e iα k ) P : n → m ∈ Qubit Z[ 1 2 ,e iF ] [X 1 , . . . , X k ] where P : n → m is a multivariate polynomial with coe cients in Qubit Z[ 1 2 ,e iF ] [n, m]. Hence, if α = α 1 , . . . , α k , then . is a functor from ∆ZX[ α, F ] to Qubit R k Z[ 1 2 ,e iF ] .

From variables to inputs

We now show that, given an equation involving diagrams linear in some variable α, the variables can be extracted, spli ing the diagrams into two parts: a collection of points (nodes with parameter α) and a constant diagram independent of the variables. First we de ne the multiplicity of a variable in an equation:

De nition 4.1.3 (Multiplicity): For any two diagrams D 1 , D 2 : n → m of ∆ZX[ α, F ], the multiplicity of α 1 in the equation D 1 = D 2 is de ned as:

µ α 1 = max i∈{1,2} µ + α 1 (D i ) + max i∈{1,2} µ - α 1 (D i ) where µ + α 1 (D) (resp. µ - α 1 (D)
) is the number of occurrences of α 1 (resp. -α 1 ) in D, inductively de ned as -Turn inputs into outputs. First, each input can be bent to an output using η:

µ + α 1 (R (n,m) Z ( α 1 + E(α 2 • • • α n ))) = µ + α 1 (R (n,m) X ( α 1 + E(α 2 • • • α n ))) = if > 0 0 otherwise µ - α 1 (R (n,m) Z ( α 1 +E(α 2 • • • α n ))) = µ - α 1 (R (n,m) X ( α 1 +E(α 2 • • • α n ))) = -if < 0 0 otherwise µ ± α 1 (D ⊗ D ) = µ ± α 1 (D • D ) = µ ± α 1 (D) + µ ± α 1 (D ) µ ± α 1 (H) = µ ± α 1 (e) = µ ± α 1 (I) = µ ± α 1 (σ) = µ ± α 1 ( ) = µ ± α 1 (η) =
D 1 • • • • • • = • • • D 2 • • • ⇐⇒ • • • • • • D 1 • • • = D 2 • • • • • • • • •
-Make the red spiders green. All red spiders R (k,l)

X (nα + c) are transformed into green spiders using the axioms (S) and (H):

nα+c • • • • • • = nα+c • • • • • • -Expanding spiders.
All spiders R Z (nα + c) are expanded using (S) so that all the occurrences of α are either α or -α :

nα+c • • • • • • = c • • • • • • ±α ±α . . . |n|
-Changing the sign. Using (K) all occurrences of -α are replaced as follows:

-α → α π -α π .
Notice that this rule is not applied recursively, which would not terminate. A er this step all the original -α have been replaced by an α and as many scalars π -α have been created. So far, we have shown:

D 1 • • • • • • = • • • D 2 • • • ⇐⇒ • • • D 1 α α -α π ⊗ µ - α (D1) = ⊗ µ - α (D2) -α π α α • • • D 2
-(Re)moving scalars. e scalar π α has an inverse for ⊗, which is π -α (by (s+) and (IV)). is has as consequence:

• ZXπ /4 π -α D 1 = D 2 ⇐⇒ ZXπ /4 D 1 = π α D 2 • ZXπ /4 π α D 1 = π α D 2 ⇐⇒ ZXπ /4 D 1 = D 2 e scalars π -α are eliminated by adding - µ max α := max (µ - α (D 1 ), µ - α (D 2 ))
times the scalar π α on both sides, then simplifying when we have a scalar and its inverse.

⇐⇒ ⊗ - µ max α -µ - α (D1) π α • • • α α D 1 = α π ⊗ - µ max α -µ - α (D2) α α • • • D 2
-Balancing the variables. At this step the number of occurrences of α might be di erent on both sides of the equation. Indeed, one can check that the side of

D i has µ + α (D i )+ - µ max α occurrences of α.
One can then use the simple equation α = (by (sα) and

(IV)) + µ max α -µ + α (D i )
times on the side of D i , where

+ µ max α := max (µ + α (D 1 ), µ + α (D 2 ))
. We hence end up with µ α = + µ max α + µ max α occurrences of α on both sides. Formally, D i is de ned as:

• • • D i • • • := • • • D i • • • π π - µ max α -µ - α (Di) + µ max α -µ + α (Di) • • • • • • • • • • • • Proposition 4.1.5 implies in particular that if the equation D 1 • θ r = D 2 • θ r is provable using the axioms of the ZX-calculus, then so is D 1 = D 2 . Proposition 4.1.5 also implies that if D 1 = D 2 , then D 1 • θ r = D 2 • θ r ,
thanks to the soundness of the ZX-calculus.

∆ZX Beyond To oli-Hadamard

We give a new axiomatisation ∆ + π for ∆ZX in Figure 4.1 (augmented from the one in Figure 3.1 and want to show that it makes the fragment of linear diagrams with constants in πZ complete, i.e., we want to show that ∆ZX[ α, π]/ ∆ + π is complete. We can actually show something more powerful: eorem 4.2.1. Let F be a fragment, and R and axiomatisation such that e rest of this section is commi ed to proving this theorem. Notice however that from it we can directly obtain: Corollary 4.2.2. e language ∆ZX[ α, π]/ ∆ + π is complete, i.e. the functor:

∆ZX[F ]/R is complete and such that R ∆ + π . en ∆ZX[ α, F ]/R is complete. … = α+β β … α … (S) … … … … = (I g ) = (I r ) = (IV) = (CP) = (B) α … = α … … … (H) = (K) π α π α π -α π = (B∆) π = (HT) π = (TCX) = (TW) α α = α α (P)
∆ZX[ α, π]/ ∆ + π . → 1 √ 2 N Qubit R k Z is faithful. Proof ∆ZX[π]/ ∆ π is complete, and since ∆ + π ∆ π , so is ∆ZX[π]/ ∆ + π . Of course, ∆ + π ∆ +
π , so by eorem 4.2.1, ∆ZX[ α, π]/ ∆ + π is complete. We can actually also show that it is full, but this will require particular constructions that will be found in Chapter 5.

One Variable e idea of the proof of eorem 4.2.1 is, given a pair of linear diagrams of which we want to check the equality, to separate the variables from the rest of the diagrams, that are in ∆ZX[F ], and show that the initial diagrams are equal i some pair of variablefree diagrams are equal. It will then be easy to conclude, using the completeness of

∆ZX[F ]/R.
Let us begin with a single occurrence of a single variable. Given two diagrams D 1 and D 2 of ∆ZX[α, F ], if α has multiplicity 1 in D 1 = D 2 , then according to Proposition 4.1.5, the equation can be transformed into the following equivalent equation involving a single occurrence of α:

D 1 • • • α D 2 α = • • • (4.1)
where D 1 and D 2 are in the fragment F . Notice that equation (4.1) holds if and only if D 1 = D 2 , since , π forms a basis of the input space. us, a variable of multiplicity 1 can easily be removed, leading to an equivalent equation in the fragment F of the ZX-calculus. If moreover this fragment is complete and proves ZX π +(K), the equation D 1 = D 2 is derivable, which makes the equation (4.1) derivable with the same axiomatisation.

When a variable has a multiplicity r > 1 in an equation, the variable cannot be removed similarly as α ⊗ r does not generate a basis of the 2 r dimensional space when r > 1. However these dots can be replaced by an appropriate projector on the subspace generated by these dots, as described in the following.

Consider the following family of diagrams (P r ) r≥1 :

P 1 := P 2 := P r := • • • • • • • • • • • • P r-1 P 2 P 2 • • • • • • = • • • P 2 • • • • • • • • • • • • P 2 P 2 P 2 P 2 P 2 P 2 P 2 P 2
For the reader convenience, here are the interpretations of P 2 and P 3 :

P 2 =     1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1     P 3 =            
1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1

           
We can characterise the interpretation of P r for any r. Informally, P r t sends all the words of the same Hamming weight to the word of the same weight where all the 1s are on the le .

Proof

First of all, notice that the result is true for P 2 :

P 2 t |00 = |00 , P 2 t |01 = P 2 t |10 = |10 , P 2 t |11 = |11 Let us denote Op [i 1 ,••• ,i k ]
the application of the k-qubit operator Op on the wires i 1 ,. . .,i k . With this notation, P r t = P

2 t[1,2] • P 2 t[2,3] • • • • • P 2 t[r-1,r] • P r-1 t[1,••• ,r-1] .
We then prove the result by induction on r. Let x ∈ {0, 1} r be a word. en:

P r+1 | x0 = P 2 t[1,2] • P 2 t[2,3] • • • • • P 2 t[r,r+1] • P r t[1,••• ,r] | x0 = P 2 t[1,2] • • • • • P 2 t[r,r+1] 1 | x| 1 0 r-| x| 1 0 = • • • = 1 | x| 1 0 r+1-| x| 1
and

P r+1 | x1 = P 2 t[1,2] • P 2 t[2,3] • • • • • P 2 t[r,r+1] • P r t[1,••• ,r] | x1 = P 2 t[1,2] • • • • • P 2 t[r,r+1] 1 | x| 1 0 r-| x| 1 1 = P 2 t[1,2] • • • • • 1 | x| 1 0 r-1-| x| 1 10 = • • • = P 2 t[1,2] • • • • • P 2 t[| x| 1 ,| x| 1 +1] • 1 | x| 1 10 r-| x| 1 = • • • = 1 | x| 1 +1 0 r-| x| 1
Corollary 4.2.4. e rank of P r is exactly r + 1.

Lemma 4.2.5. For any r ≥ 1, ∆ + π P r • θ r = θ r i.e.,

∆ + π P r = α α α α • • • • • • • • •
Proof e case for P 1 is obvious. Also, if the result is shown for P 2 , then by an easy induction, it is true for P r . P 2 is essentially an occurrence of rule (P):

α α = (S) α α = (P) (S) α α = (s2) (Hopf) (I) α α
Lemma 4.2.6. For any r ≥ 2 and any

D 1 , D 2 : r → n two ∆ZX[F ]-diagrams, ( D 1 • θ r = D 2 • θ r ) ⇔ D 1 • P r = D 2 • P r i.e.,   ∀α ∈ R, α α • • • • • • D 1 = α α • • • • • • D 2   ⇔ • • • • • • • • • P r D 1 = • • • • • • • • • P r D 2
Proof e proof consists in showing that P r is a projector onto

S r = span{ θ r (α) | α ∈ R}
According to Lemma 4.2.5, P r is the identity on S r , and P r is of rank at most r + 1 according to Corollary 4.2.4, thus to nish the proof, it is su cient to prove that the r +1 vectors (θ r (α (j) )) j=0...r are linearly independent, where α (j) = jπ/r. Let λ 0 , ..., λ r be scalars such that j λ j θ r (α (j) ) = 0. Notice that the 2 p -th row (when rows are labeled from 1 to 2 r ) of θ r (α (j) ) is exactly e ipα (j) . erefore, if we look at all 2 p -th rows of the equations, we obtain r) . . . . . . . . . . . .

     1 1 • • • 1 e iα (0) e iα (1) • • • e iα (
e irα (0) e irα (1) • • • e irα (r)           λ 0 λ 1 . . . λ r      = 0
However, the rst matrix is a Vandermonde matrix, with e iα (j) = e iα (l) i j = l, which is enough to state that this matrix is invertible. erefore all λ j are equal to 0 and the vectors θ r (α (j) ) are linearly independent.

We are now ready to prove the main theorem in the particular case of a single variable: Proposition 4.2.7. For any complete language ∆ZX[F ]/R such that R ∆ + π and any two ∆ZX[α, F ]-diagrams D 1 , D 2 ,

D 1 = D 2 ⇐⇒ ∆ + π D 1 = D 2

Proof

[⇐] is a direct consequence of the soundness of the ∆ZX-calculus.

[⇒] Assume D 1 = D 2 , i.e. ∀α ∈ R, D 1 (α) = D 2 (α) . According to Proposition 4.1.5, D 1 • θ r = D 2 • θ r where D i are in ∆ZX[F ]. It implies, according to Lemma 4.2.6, that D 1 • P r = D 2 • P r .
anks to the completeness of

∆ZX[F ]/R, R D 1 • P r = D 2 • P r , so R D 1 • P r • θ r = D 2 • P r • θ r . us, by Lemma 4.2.5, R D 1 • θ r = D 2 • θ r , which is equivalent to R D 1 = D 2 according to Proposition 4.1.5.

Several Variables

Proposition 4.1.5 can be straightforwardly extended to multiple variables:

Proposition 4.2.8. For any D 1 , D 2 : n → m two ∆ZX[ α, F ]-diagrams, there exist D 1 , D 2 : ( k i=1 r i ) → n + m two ∆ZX[F ]-diagrams such that, D 1 = D 2 ⇔ D 1 • θ r = D 2 • θ r is provable using ZX π +(K)
, where r i is the multiplicity of α i in D 1 = D 2 , r := r 1 , . . . , r k , and θ r :

= α1 ⊗ r 1 ⊗ . . . ⊗ α k ⊗ r k . 123 4.3. ∆π /4 for ∆ZX[ α, π 4 ]
Pictorially:

• • • • • • D 1 = • • • D 2 • • • ⇐⇒ α1 α1 • • • D 1 • • • r1 α k • • • α k r k • • • • • • = • • • • • • • • • α k α k • • • α1 D 2 r k r1 α1 • • •
Similarly Lemma 4.2.6 can also be extended to multiple variables: Lemma 4.2.9. For any k ≥ 0, any r = r 1 , . . . , r k ∈ N k and any D 1 , D 2 :

( i r i ) → n two ∆ZX[F ]-diagrams, D 1 • θ r = D 2 • θ r ⇔ D 1 • P r = D 2 • P r where P r = P r 1 ⊗ . . . ⊗ P r k .
Using Proposition 4.2.8 and Lemma 4.2.9 (whose proofs are similar to those of 4.1.5 and 4.2.6), the proof of eorem 4.2.1 is similar to the single variable case (Proposition 4.2.7) by induction.

Notice that eorem 4.2.

1 implies that if ∀ α ∈ R k , D 1 ( α) = D 2 ( α) then D 1 ( α) = D 2 ( α)
has a uniform proof in the ZX-calculus in the sense that the structure of the proof is the same for all the values of α ∈ R k . Indeed, following the proof of eorem 4.2.1, the sequence of axioms which leads to a proof of D 1 ( α) = D 2 ( α) is independent of the particular values of α. is gives us some equalities for free, that will be used in the following.

Corollary 4.2.10.

∆ + π α α+π = 2α+π (SUP)
Corollary 4.2.11.

∆ + π α α -α = 2α π
Corollary 4.2.12.

∆ + π β α π β α = β α π β α
Corollary 4.2.13.

∆ + π β α π β γ -γ α = α α π β -γ γ β (C) 4.3 ∆ π /4 for ∆ZX[ α, π 4 ]
e aim of linear diagrams is to get a completeness result for ZX[ α, π 4 ]/ ZXπ /4 . eorem 4.2.1 was given for fragments of ∆ZX. Hence, the next step is logically to apply the theorem to such a fragment that is as expressive as ZX[

… α … (S) … … … … = (I g ) = (I r ) -π 4 π 4 = (E) = (CP) = (B) α … = α … … … (H) = (K) π α π α π -α π = (B∆) π = (HT) π = (TCX) = (TW) α α = α α (P)
∆ZX[ α, π 4 ]/ ∆π /4 . → Qubit R k Z[ 1 2 ,e i π 4 ]
is faithful.

Proof

We are going to use the completeness of ZX[ π 4 ]/ ZXπ /4 to rst prove that ∆ZX[ π 4 ]/ ∆π /4 is complete. We will then be able to use eorem 4.2.1 to extend the completeness to linear diagrams since ∆π /4 ∆ + π (only (IV) is missing, but it it is derivable thanks to Proposition 2.7. [START_REF] Ckr + | [END_REF]).

Remember that we have a functor ∆ZX[π]

[.]

T → ZX[ π 4 ]. It can easily be extended to ∆ZX[ π 4 ] [.] T → ZX[ π 4 ]
, it is the identity on every generator except for which

T = π 4 π 4 π 2 -π 4 -π 4
We can now use the inclusion functor

ZX[ π 4 ] ι → ∆ZX[ π 4 ]
. Both these functors are PROP-functors, and one can check that [.] T ZX = . ∆ZX . We are now going to prove that for any ZX[ π 4 ]-diagrams D 1 and D 2 , ZXπ /4 D 1 = D 2 =⇒ ∆π /4 ι(D 1 ) = ι(D 2 ). We do so by deriving all the axioms of ZXπ /4 with ∆π /4 . A lot of them are found in ∆π /4 , so they don't need to be proven. Also, (C) is provable thanks to Corollary 4.2.13. We can prove (HD):

∆π /4 π 2 π 2 -π 2
= (EU) π π -π 2 π 2 = (B) π π π 2 -π 2 = (TCX) π π π 2 -π 2 = (S) π 2 -π 2 π π = 3.6.10 π 2 -π 2 π = 4.2.11 π 4 π 4 -π 4 -π 4 π = (S) (K) π π π 4 π 4 π 4 -π 2 π 4 = (H) π 4 π π 4 π 4 π 4 -π 2 π = π 4 π 4 π 2 π 2 π π 2 π 4 π 4 -3π 4 π = π 4 π 4 π 2 π 2 π 4 -3π 4 π 2 π 2 π π 4 = (H) π 4 π 4 π 4 π 2 π -π 4 -π 2 π 2 = 4.2.12 -π 4 π 4 -π 2 π 2 π 4 π 2 π π 4 126 Chapter 4. General ZX-Calculus = (S) (H) π 4 π 4 -π 2 π 4 π 4 π 2 π = (K) π 2 π 4 π 4 -π 4 -π 4
e rule (BW) of ZXπ /4 is now easily derivable from the decomposition of the triangle and the rule (B∆) of ∆π /4 . Now, let

D 1 , D 2 ∈ ∆ZX[ π 4 ] such that D 1 = D 2 . Since [.] T ZX = . ∆ZX , by completeness of ZX[ π 4 ]/ ZXπ /4 , ZXπ /4 [D 1 ] T = [D 2 ] T , so ∆π /4 ι ([D 1 ] T ) = ι ([D 2 ] T ). We have ∆π /4 ι ([D i ] T ) = D i , because ι ([.] T )
→ Qubit R k Z[ 1 2 ,e i π 4 ] is faithful.
Again, this functor is also full, but the proof needs constructions introduced in Chapter 5.

Proof To prove this result, we are going to use the previously proven result for linear diagrams of ∆ZX[ π 4 ] ( eorem 4.3.1). As usual, we need a pair of functors that translate one one language into the other. We can easily extend the functor [.] T but this time

for linear diagrams ∆ZX[ α, π 4 ] [.] T → ZX[ α, π 4 ]
. Again, it is the identity on all generators except . And again, we have the inclusion functor

ZX[ α, π 4 ] ι → ∆ZX[ α, π 4 ]. We rst prove that ∆π /4 D 1 = D 2 =⇒ ZXπ /4 [D 1 ] T = [D 2 ] T .
We do so by proving all the axioms of ∆π /4 with ZXπ /4 , most of which have already been done. It remains to prove (P). First: Now, suppose we have

D 1 , D 2 ∈ ZX[ α, π 4 ] such that D 1 = D 2 . By completeness of ∆ZX[ α, π 4 ]/ ∆π /4 , ∆π /4 ι(D 1 ) = ι(D 2 ), so ZXπ /4 [ι(D 1 )] T = [ι(D 2 )] T . Finally, it is obvious that [ι(D)] T = D, so ZXπ /4 D 1 = D 2 . Hence ZX[ α, π
4 ]/ ZXπ /4 is complete. We just showed that ZXπ /4 ∆π /4 . In the previous section, we showed the converse, that ∆π /4 ZXπ /4 . e result is that:

Proposition 4.4.2. ZX[ α, π 4 ]/ ZXπ /4 ∆ZX[ α, π 4 ]/ ∆π /4 .

Applications of Linear Diagrams

In order to prove that ZXπ /4 D 1 = D 2 using eorem 4.4.1, one has to double check the semantic condition D 1 ( α) = D 2 ( α) for all α ∈ R k , which might not be easy in practice. We show in the following alternative ways to prove ZXπ /4 D 1 = D 2 , the two rst based on a nite case-based reasoning in the ZX-calculus, and the last one by diagram substitution. e following techniques will be proven for ZX[ α, π 4 ]/ ZXπ /4 but can be easily stated out for ∆ZX[ α, π]/ ∆ + π .

Considering a basis eorem 4.5.1. For any

ZX[ α, π 4 ]-diagrams D 1 , D 2 : 1 → m, if ∀j ∈ {0, 1}, ZXπ /4 = jπ D 1 jπ D 2 … … then ZXπ /4 D 1 = D 2
Proof e argument was already mentioned at page 121, up to a change of basis. We give it again here for the sake of consistency. Assume

ZXπ /4 D 1 • R X (jπ) = D 2 • R X (jπ) for any j ∈ {0, 1}. It implies that for x ∈ 1 0 , 0 1 , D 1 x = D 2 x, so D 1 = D 2 , which implies according to eorem 4.4.1 ZXπ /4 D 1 = D 2 .
Notice that eorem 4.5.1 can be applied recursively: in order to prove the equality between two diagrams with n inputs, m outputs, and constants in π 4 Z, one can consider the 2 n+m ways to x these inputs/outputs in a standard basis states. It reduces the existence of a proof between two diagrams with constants in π 4 Z to the existence of proofs on scalar diagrams (diagrams with no input and no output).

Corollary 4.5.2.

ZXπ /4 β α α = β α β α Proof
We can prove that this equality is derivable by plugging our basis , π on the input.

• :

β α α = (IV) (CP) (sα) α α = (T0) (IV) (CP) α α = (sα) (CP) (IV) β α β α = (CP) (T0) (IV) β α β α • π : β α α π = (IV) (K) (πdist) (CP) (S) α π α+π β π π = (SUP) 3.5.6 (S) (IV) π 2α+π β π = (Hopf) (IV) π β π 2α+π = (SUP) π β π α+π α = (S) (K) (πdist)
]-diagrams D 1 , D 2 : n → m, if ∀ α ∈ T 1 × . . . × T k , ZXπ /4 D 1 ( α) = D 2 ( α) then ZXπ /4 D 1 = D 2
with T i a set of µ i +1 distinct angles in R/2πZ where µ i is the multiplicity of α i in D 1 = D 2 .

Proof

In the proof of Lemma 4.2.6, we actually only used µ α + 1 values of α that constitute a basis of S µα . is extends naturally to several variables: the dimension of

S µα 1 × • • • × S µα k is (µ α 1 + 1) × • • • × (µ α k + 1)
, and taking α ∈ T 1 × . . . × T k gives as many linearly independent vectors in (hence a basis of)

S µα 1 × • • • × S µα k . Corollary 4.5.4. π α β α β = α+β π β α-β

Proof

Notice that µ α = 2 and µ β = 3 in this equation. Hence we need to evaluate it for 12 values of (α, β), for instance for α, β ∈ {0, π, π 2 } × {0, π, π 2 , -π 2 }. We can actually simplify the proof, by showing that whatever the value of β ∈ R, the equation is derivable for α ∈ {0, π, π 2 }. is means the equation is derivable for all α, β ∈ {0, π, π 2 } × R, and a fortiori for all α, β ∈ {0, π, π 2 } × {0, π, π 2 , -π 2 } which would be a direct application of the theorem.

• α = 0:

π β β = (IV) (CP) (sπ) β β = (s2) (IV) β β = (IV) (K) β π β -β • α = π: π π β π β = (K) (IV) (CP) (πdist) β+π β+π π π = (s2) (IV) π β+π π β+π = (K) π+β π β π-β • α = π 2 : π π 2 β π 2 β = (IV) (K) π 2 π π 2 β β -π 2 = (SUP) π 2 β β π = (IV) (Hopf) (I) (S) π π 2 2β = (IV) (Hopf) π 2β π 2 = (SUP) π 2 π π 2 +β β-π 2 = (IV) (CP) (K) (sπ) (s+) π 2 +β π β π 2 -β
e results are the same for three di erent values of α. is is enough to get the equation in Corollary 4.5.4, according to eorem 4.5.3. Remark 4.5.5. e number of occurrences of a variable is not to be mistaken for its multiplicity. For instance consider the following equation:

α = -α
is equation is obviously wrong in general, but not for 0 and π. If we tried to apply eorem 4.5.3 with the number of occurrences (which seems to be 1), then we might end up with the wrong conclusion. e multiplicity (here µ α = 2) prevents this.

Diagram substitution

De nition 4.5.6 (Symmetric Diagram): A diagram D : 0 → n is symmetric if for any permutation τ on {1, . . . n},

Q τ ( D ) = D where Q τ : C 2 r → C 2 r
is the unique morphism such that:

∀ϕ 1 , . . . , ϕ r ∈ C 2 , Q τ (ϕ 1 ⊗ . . . ⊗ ϕ r ) = ϕ τ (1) ⊗ . . . ⊗ ϕ τ (r) .
In particular for any diagram

D 0 : 0 → 1, D 0 ⊗ . . . ⊗ D 0 is a symmetric diagram.
ZXπ /4 α0 α0 • • • • • • D 1 = α0 α0 • • • • • • D 2 =⇒ ZXπ /4 D 1 • • • • • • D = D 2 • • • • • • D Proof If ZXπ /4 D 1 • θ r 0 = D 2 • θ r 0 then D 1 • θ r 0 = D 2 • θ r 0 , so according to Lemma 4.2.6, D 1 • P r 0 = D 2 • P r 0 . It implies that ZXπ /4 D 1 • P r 0 = D 2 • P r 0 , so ZXπ /4 D 1 • P r 0 • D = D 2 • P r 0 • D. To complete the proof, it is enough to show that ZXπ /4 P r 0 • D = D. Let S = { D | D : 0 → n symmetric}. First we show that S is of dimension at most r + 1. Indeed, notice that if ϕ ∈ S, then ∀i, j ∈ {0, . . . , 2 r -1} s.t. |i| 1 = |j| 1 , ϕ i = ϕ j ,
where |x| 1 is the Hamming weight of the binary representation of x. As a consequence, for any ϕ ∈ S, ∃a 0 , . . . , a r ∈ C s.t. ϕ = n h=0 a h ϕ (h) where ϕ (h) ∈ C 2 r is de ned as Corollary 4.5.8.

ϕ (h) i = 1 if |i| 1 = h 0 otherwise . us S is
ZXπ /4 β α β α π = π α β β α
Proof Indeed, simply by decomposing the colour-swapped version of (SUP) using (S), we can derive:

ZXπ /4 = α α π α α π
Now we just need to apply eorem 4.5.7 with

β α α β := D
which is clearly symmetric:

β α β α π = π D(α, β) = π D(α, β) = π α β β α

Axiomatisation for ZX

We are now well equipped to give an axiomatisation for the unrestricted ZX-Calculus (ZX[R] = ZX), and prove that it is complete. e axiomatisation is given in Figure 4.3.

eorem 4.6.1. e language ZX/ ZX is complete: the functor ZX/ ZX . → Qubit is full and faithful.

But rst, let us consider the set of rules ZX. Notice that this axiomatisation basically consists of ZXπ /2 with two additional rules (that replace the scalar axioms): (E), which is already in ZXπ /4 , and (EU).

e rule (EU) is really all about 1-qubit unitaries. Indeed, we have the following result: Proposition 4.6.2. Any one-qubit unitary can be decomposed as:

e iγ R Z (α 3 )R X (α 2 )R Z (α 1 )
which can be represented in ZX as:

α2 α1 α3 π γ
If the unitary is not diagonal or anti-diagonal (i.e. if α 2 = 0 mod π), then this decomposition can be made unique if we impose α 1 ∈ [0, π) e right-hand side of (E) is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires. In rule (EU), β 1 , β 2 , β 3 and γ can be determined as follows:

… = α+β β … α … (S) … … … … = (I g ) = (I r ) -π 4 π 4 = (E) = (CP) = (B) = β2 β1 β3 α2 α1 α3 π γ (EU) π 2 π 2 -π 2 = (HD) α … = α … … … (H)
x + := α 1 +α 3 2 , x -:= x + -α 3 , z := cos α 2 2 cos (x + )+i sin α 2 2 cos (x -) and z := cos α 2 2 sin (x + )- i sin α 2 2 sin (x -), then β 1 = arg z + arg z , β 2 = 2 arg i + z z , β 3 = arg z - arg z , γ = x + -arg(z) + α 2 -β 2 2 Proof • Existence:
Any element of U (2) can be decomposed as: e iϕ/2 e iψ 0 0 0 e -iψ 0 cos (θ) sin (θ) sin (θ) cos (θ)

e iψ 1 0 0 e -iψ 1
Hence, the existence is given by:

α2 α1 α3 π γ = e i(γ+ α 2 2 ) 1 0 0 e iα 3 cos α 2 2 -i sin α 2 2 -i sin α 2 2 cos α 2 2 1 0 0 e iα 1 = e i(γ+ α 2 2 ) 1 0 0 e i(α 3 + π 2 ) cos α 2 2 sin α 2 2 -sin α 2 2 cos α 2 2 1 0 0 e i(α 1 -π 2 ) = e i(γ+ α 1 +α 2 +α 3 2 ) e -i( α 3 2 + π 4 ) 0 0 e i( α 3 2 + π 4 ) cos α 2 2 sin α 2 2 -sin α 2 2 cos α 2 2 e -i( α 1 2 -π 4 ) 0 0 e i( α 1 2 -π 4 )
• Uniqueness:

Suppose α2 α1 α3 π γ = α 2 α 1 α 3 π γ
. e rst diagram yields:

e i(γ+ α 2 2 ) cos α 2 2 -ie iα 1 sin α 2 2 -ie iα 3 sin α 2 2 e i(α 1 +α 3 ) cos α 2 2
and similarly for the second one. If α 2 = 0 mod π, then neither cos α 2 2 nor sin α 2 2 is null. Hence, dividing element (1,1) by element (0,0) on both sides gives e i(α 1 +α 3 ) = e i(α 1 +α 3 ) and dividing element (0,1) by element (1,0) on both sides gives e i(α 1 -α 3 ) = e i(α 1 -α 3 ) . In other words, α 1 + α 3 = α 1 + α 3 mod 2π and α 1α 3 = α 1α 3 mod 2π, so 2α 1 = 2α 1 mod 2π i.e. α 1 = α 1 mod π. Since we required α 1 , α 1 ∈ [0, π), we get

α 1 = α 1 .
It then follows easily that α 3 = α 3 , α 2 = α 2 and γ = γ . In 1775, Euler proved what is now called Euler's rotation theorem [START_REF] Euler | Formulae generales pro translatione quacunque corporum rigidorum[END_REF], stating that there are several ways to decompose a rotation into several rotations around elementary axes. In quantum mechanics, a consequence is that any unitary operator on one qubit can be seen as either a composition of rotations around Z, X, Z; or around X, Z, X. On the one hand, the rule (HD) says -in a distorted, ZX-style way -that the Hadamard gate can be decomposed as a series of rotations, while on the other hand, the rule (EU) gives the equality between two di erent decompositions of the same unitary:

= β2 β1 β3 α2 α1 α3 π γ (EU)
where

                   x + := α 1 +α 3 2 x -:= x + -α 3 z := cos α 2 2 cos (x + ) + i sin α 2 2 cos (x -) z := cos α 2 2 sin (x + ) -i sin α 2 2 sin (x -) β 1 = arg z + arg z β 2 = 2 arg i + z z β 3 = arg z -arg z γ = x + -arg(z) + α 2 -β 2 2
is rule is meant to be read from le to right, this is why the angles β i and γ are expressed in terms of the angles α i . However, up to the scalar, which only represents a global phase, and hence is invertible, applying the rule from right to le can be performed by using the colour-swapped version of the rule from le to right.

ere are several sets of angles for β i and γ that make the rule sound. However, we only gave one, but the others can be found from it and the other rules of ZX. We will not need to prove this claim directly, it is an implication of the upcoming theorem.

e angles β i and γ seem to not always be de ned. Indeed, arg is not de ned at 0, and β 2 is not de ned when z = 0. By convention, we set arg(0) = 0 and β 2 = 0 when z = 0.

e rst proof of incompleteness of the unrestricted ZX-Calculus [START_REF] Schröder | e ZX-calculus is incomplete for quantum mechanics[END_REF] relied on an Euler decomposition, but adding it to the set of ZX axioms has been avoided for a while because of its non-linearity. However, a non-linear axiom is necessary to get the completeness for the general ZX-Calculus [START_REF] Jeandel | Diagrammatic reasoning beyond Cli ord+T quantum mechanics[END_REF]. And so, it has been used in [START_REF] Coecke | ZX-rules for 2-qubit Cli ord+T quantum circuits[END_REF] to prove the completeness of the 2-qubit π 4 -fragment of the ZX-Calculus. e rule (EU) is actually much more powerful than this, for, as we already announced, it makes the language complete.

On Minimality

We call an axiomatisation minimal when there is no redundancy in the axioms. Particularly, we want a proof that none of the axioms are derivable from the others. We conjecture that all the axioms in Figure 4.3 are necessary. Indeed, in [START_REF] Backens | Towards a Minimal Stabilizer ZX-calculus[END_REF], nearly all the rules for Cli ord -i.e. all of the axioms in Figure 4.3 except (E) and (EU)-are proven to be necessary. We reproduce the arguments here:

• (S): It is the only axiom that can transform a node of degree four or higher into a diagram containing lower-degree nodes.

• (I g ) or (I r ): ese are the only two axioms that can transform a diagram with nodes connected to a boundary to a node-free diagram.

• (CP): It is the only axiom that can transform a diagram with two connected outputs into one with two disconnected outputs.

• (HD) and (H): To prove their necessity, we de ne two non-standard interpretation.

Proof of Necessity of Rules (HD) and (H) First, to prove the necessity of (HD), we de ne the non-standard interpretation . as follows:

→ → → → → n ... ... m α → α α … … n ... ... m α → α α … … D 1 • D 2 → D 1 • D 2 D 1 ⊗ D 2 → D 1 ⊗ D 2
It is then easy to see that all the rules but (HD) hold under this interpretation, hence proving that (HD) could not be derived from the other rules.

en, to prove the necessity of (H), we de ne the non-standard interpretation . as follows:

→ → → → → n ... ... m α → n ... ... m n ... ... m α → n ... ... m D 1 • D 2 → D 1 • D 2 D 1 ⊗ D 2 → D 1 ⊗ D 2 and
consider equality in the codomain up to a scalar, i.e. we consider colinearity. One can check that all the rules preserve colinearity except (H).

In this new axiomatisation, (E) and (EU) can also be proven to be necessary:

• (E): It is the only axiom that can transform a non-empty diagram into an empty one.

• (EU): It is the only non-linear axiom.

In summary, all the axioms are proven to be necessary, except (B) and one of the (I).

ZX proves ZXπ /2

A rst and easy step towards overall completeness is to show that we can recover the axiomatisation ZXπ /2 that we know complete for Cli ord. We already have most of these rules, we only lack two: (Z) and (IV). However, we can see from Figure 2.2 that (IV) is derivable.

To prove the rule (Z), we will rst derive (K).

Lemma 4.6.3. e π-commutation (K) is derivable:

ZX π α = -α π α π Proof π α = (I) (S) α π π π = (EU) π π α π-α 2 π-α 2 = (I) (S) (IV) -α π α π Remark 4.6.4
. is is one of the few applications of (EU) that still preserves linearity. Lemma 4.6.5. e zero rule is derivable:

ZX π = π Proof α π = (Hopf) α π = (S) α 2 π α 2 = (K) α 2 -α 2 α 2 π π = (S) (IV) (Hopf) π π α 2 (4.3) α π π = (4.3) π π α 2 π = (sπ) (IV) α 2 π π (4.4)
Now, if α ∈ Dπ (where D := Z 1 2 ), then there exists n such that 2 n α = 0 mod 2π. Hence, in this case the scalar on the right hand side of (4.3) can be removed by applying (4.4) from right to le n + 1 times then using ]. Now that we are seeking to prove equations that are out of Cli ord, we will begin to use (EU) to its full potential. However, we would like, as much as possible, to avoid computing the angles, because, since we work on the problem of completeness, we need to formally prove the equality between two diagrams, and hence to formally write what the angles resulting from (EU) are, which becomes tedious a er a few applications of the rule.

To simplify this task, instead of showing directly that two diagrams can be turned into one another, we will de ne a normal form for them, show that it is unique, and show that there is an algorithm to turn them into this normal form.

To do so, we prove a few useful lemmas:

Lemma 4.7.1. where β 1 , β 2 , β 3 , γ can be determined as in rule (EU) applied with the angles:

α 2 ← α 2 + π 2 and α 3 ← π 2 .
Lemma 4.7.4.

α1 α3 = π 2 β1+β3 β2 π γ -π 2
where β 1 , β 2 , β 3 , γ can be determined as in rule (EU) with α 2 ← π 2 .

Proof α2 α1 α3 = (B) (S) α3 α2 α1 = (S) (EU) β2 β3 β1 π γ = (S) (B) γ β2 π β3 β1 α1 α3 = (S) α1 α3 -π 2 π 2 = (S) (IV) (|i ) α3 α1 π 2 π 2 -π 2 = 4.7.1 γ β2 π β3 β1 π 2 -π 2 α2 α1 = (B) (S) α2 α1 = (HD) (I) (|i ) α2+ π 2 α1 -π 2 π 2 π 2 = (EU) (S) β1 π γ β3+ π 2 β2 -π 2 = (H) (S) β3+ π 2 β1 β2 π γ -π 2 = (HD) β3 β1 β2-π 2 π 2 π γ -π 2 = (S) (B) β3 β1 π 2 β2-π 2 π γ -π 2 α1 α3 = (S) α1 α3 = 4.7.2 β2 β3 β1 π 2 π γ -π 2 = (CP) (S) (I) π 2 β1+β3 β2 π γ -π 2
Now, by specialising the angles to α and α + π, we shall recover (SUP):

Proposition 4.7.5. e supplementarity is derivable:

ZX α α+π = 2α+π (SUP)
Proof We rst use Lemma 4.7.4, where α 3 = α 1 + π. In this case, it can be computed that β 1 + β 3 = 0, so we end up with:

α+π α = β2 π γ -π 2 (4.7)
From this, we can easily specify the scalar on the right part: where U and V are unitary, and Σ is diagonal. e diagonal entries of Σ are referred to as the singular values. Notice that M needs not be square (in this case Σ has the same dimensions as M ).

To justify the use of SVDs, we give some of their interesting properties [HJ85]: Proposition 4.7.8. e SVD M = U ΣV † of a matrix M has the following properties:

• It exists for all M • Σ can be made unique if we impose that its diagonal entries are decreasing nonnegative real numbers

• U and V are not unique in general, though:

• If M is square with distinct and non-zero singular values, then U and V are essentially unique:

U ΣV † = U ΣV † ⇐⇒ (∃d, (U = U d) ∧ (V = V d))
where d is diagonal with diagonal entries some roots of unity.

Even though the singular-value decomposition is relevant for any diagram, we are only going to give its derivation for a particular family of diagrams: Remark 4.7.10. Some diagrams that do not strictly follow the conditions of the previous de nition will still be considered cycle-free if they are equal to a cycle-free diagram by mere application of the "only connectivity ma ers" paradigm, i.e. if they are isomorphic to a cycle-free diagram. E.g.:

α = α is considered cycle-free

One-bit States

We can now easily give a normal form for one-qubit states, using the SVD of the underlying matrix.

Proposition 4.7.11 (SVD of a One-bit State). Any cycle-free state D : 0 → 1 can be put in the following forms using ZX:

D = s β α = s β α
where β, β ∈ [0, π), and where s and s are 0 → 0 diagrams, i.e. scalars. We call these two forms respectively SVD g and SVD r .

To understand where it comes from, notice that if M ∈ C 2 × C, with U ΣV † its SVD, then U is a 2 × 2 unitary, and V † is a 1 × 1 unitary. A 2 × 2 unitary can be expressed as in Proposition 4.6.2, while a 1 × 1 unitary is merely a global phase i.e. a root of unity. Σ is of the form s 0 = s √ 2 0 (where s = 0 if M = 0). Hence one of its representations is:

s α3 α2 α1 = s α3 α2
thanks to some rules of ZX, and where s is the aggregation of the scalars produced by U , Σ and V † .

Proof

First, notice that a state in the previous form of SVD g , but with the bas constraints on angles, can easily be transformed into an SVD. Indeed, if β ∈ [π, 2π):

s β α = (K) s β-π -α π α
and similarly for the SVD r . We can show that we can transform an SVD r into an SVD g and vice-versa: : (α) can be obtained as a combination of the last two. en :

α s β = (H) α s β = (HD) (S) (|i ) 4.7.6 s α-π 2 β-π 2 -π 2 π 4 π = (EU) (s+)
D γ = α s β γ = (S) α s β+γ D 1 D 2 = (S) α2 s 2 α1 s 1 β1+β2 = 4.7.4 β1+β2 -π 2 π γ β2 β s 1 s 2 = (S) (s+) 3.8.3 (|i ) (HD) γ -π 4 β2 β1+β2+ π 2 π β + π 2 s 1 s 2 = (H) π γ -π 4 s 2 β2 β1+β2+ π 2 s 1 β + π 2
Finally, the generator R • α 1 = α 2 mod 2π and α i = 0 mod π

• α 1 = α 2 mod 2π and β 1 = β 2 Proof e equality reads s 1 1 + e iα 1 e iβ 1 (1 -e iα 1 ) = s 2 1 + e iα 2 e iβ 2 (1 -e iα 2 )
. If α 1 = π mod 2π, then it is easy to see that α 2 = π mod 2π and s 1 e iβ 1 = s 2 e iβ 2 . If α i = π mod 2π, then the upper coe cient is non-null, hence we can divide the lower coe cient by the upper one, which yields:

e iβ 1 1 -e iα 1 1 + e iα 1 = e iβ 2 1 -e iα 2 1 + e iα 2 ⇐⇒ e iβ 1 tan α 1 2 = e iβ 2 tan α 2 2 If α 1 = 0 mod 2π then α 2 = 0 mod 2π. Otherwise, since β 1 , β 2 ∈ [0, π), β 1 = β 2 and α 1 = α 2 mod 2π.

→ Operators

Applying the singular-value decomposition on 1 → 1 operators gives them a particular form, again with properties of essential uniqueness:

Proposition 4.7.13 (SVD of a 1 → 1 diagram). Any cycle-free diagram D : 1 → 1 can be wri en in the forms:

D = α3 γ α2 α4 α1 α5 s = γ α 3 s α 2 α 4 α 1 α 5 where γ ∈ [0, π 2 ],
and α 1 , α 5 , α 1 , α 5 ∈ [0, π), using ZX. We denote the two forms respectively SVD g and SVD r . e intuition is that π 2 γ has interpretation (up to a scalar) 1 0 0 tan γ 2 , and hence can be used to represent Σ in the SVD of D . U and V † here are 2 × 2 unitaries, and so can be represented as in Proposition 4.6.2. Using (S) to merge the green nodes gives the above form.

Proof First, if D is in the form SVD g , but where the constraints on the angles are not met, we can transform it into an actual SVD g :

• If α 1 ∈ [π, 2π) (and similarly for α 5 ):

α2 α1 . . . = (S) (K) -α2 α1-π . . . π π α2 • If γ ∈ [-π 2 , 0): α3 γ = (S) (K) π+α3 -γ π γ • If γ ∈ [-π, -π 2 ): α3 γ = (S) (K) -α3 γ+π π π π α3 • If γ ∈ [ π 2 , π): α3 γ = (S) (K) -α3 γ+π π π π α3 = (S) (K) π-α3 π-γ π π π α3+γ+π
en, we show that the two decompositions are equivalent:

α3 γ α2 α4 α1 α5 s = (H) γ α3 α2 α4 α1 α5 s = (HD) (S) (|i ) 3.8.3 (s+) γ α3 α2+ π 2 α4-π 2 α1 α5 s π 2 -π 2 = (EU) (S) γ α 3 s α 2 α 4 α 1 α 5
We are going then to prove the result by induction on the structure of cycle-free diagrams given in De nition 4.7.9. e two 1 → 1 generators R

(1,1) Z (α) and H can be put in SVD:

α = (S) α+ π 2 -π 2 = (|i ) (I) 4.7.6 α+ π 2 π 2 π -π 4 = (HD) (I) π 2 π 2 -π 2
e composition of two SVDs can be put in SVD (here, ignoring the scalars): Notice that, by composition, the 1 → 1 generator R

D 1 D 2 =
(1,1) X (α) can be put in SVD. If the 1 → 1 diagram has no cycle, there can still be branching. Hence, there can be a state D : 0 → 1 in tree-like form a ached to the "main wire" by a node, say green, as follows:

D = β α s = (S) (I) β α s
A branching made by a red node R

(2,1) X can be deduced by composing the green one and Hadamard nodes.

Remark 4.7.14. We gave two conventions for the SVDs of 0 → 1 and 1 → 1 diagrams.

ese two depend on the basis in which we consider the decomposition. SVD g corresponds to the computational basis, while SVG r corresponds to the diagonal basis. If en, either:

M = U ΣV † with Σ diagonal in the computational basis, M = (U H) • HΣH • (V H) † .
• γ = γ = 0 • γ = γ = π 2 • α i = β i mod 2π and γ = γ
Proof First we decompose D 1 and D 2 as:

D 1 = α3 γ α2 α4 α1 α5 s = π 2 γ α2 α4 α1 α5 s x α3-x-π 2 u π Σ U V † v π D 2 = s 2 β3 γ β2 β4 β1 β5 = π 2 γ β2 β4 β1 β5 s 2 x β3-x -π 2 u π Σ U V † v π
where u, v, u and v have been chosen so that Σ and Σ are real matrices, and where

x and x are arbitrary angles. Notice that U , V † , U , V † are unitaries. We have two SVDs that represent the same matrix:

U • Σ • V † = D 1 = D 2 = U • Σ • V †
First o , let us show that Σ and Σ are essentially the same. One could compute Σ =

s (1 + e iγ ) 1 0 0 tan γ 2 and Σ = s 2 (1 + e iγ ) 1 0 0 tan γ 2 . Since γ, γ ∈ [0, π 2
], tan γ 2 and tan γ 2 are smaller than 1, and since the diagrams are non-null, we get Σ = Σ by Proposition 4.7.8, which implies γ = γ .

If γ = γ = 0, then Σ and Σ have full rank. Moreover, if γ = γ = π 2 , then Σ and Σ are not colinear to the identity. Hence, if γ = γ ∈ (0, π 2 ), then we can apply Proposition 4.7.8. By Proposition 4.7.8, there exists d = e iϕ 0 0 0 e iϕ 1 such that U = U • d and

V † = d † • V † . Notice that ϕ1-ϕ0 ϕ0 π = d and ϕ0-ϕ1 -ϕ0 π = d † . Hence: U = β4 β5 x u π = U • d = α4 α5 u+ϕ0 π x+ϕ1-ϕ0
Since β 5 and α 5 are in [0, π), the representation of the unitary is unique by Proposition 4.6.2, so β 5 = α 5 , β 4 = α 4 , and x = x + ϕ 1ϕ 0 . Similarly, the second equation yields

α 1 = β 1 , α 2 = β 2 and β 3 -x -π 2 = α 3 -x -π 2 + ϕ 0 -ϕ 1 .
Together, the equations on x and x imply that α 3 = β 3 .

Completeness for some Scalars

Propositions 4.7.12 and 4.7.15 state that the SVD decomposition is essentially unique in their structure, but le out the scalars. To remedy this, we give the following result:

Proposition 4.7.16. Let D 1 := α1 … αn 1 β1 γ1 βq 1 γq 1 … ⊗ p1 and D 2 := α 1 … α n 2 β 1 γ 1 β q 2 γ q 2 … ⊗ p2
. en:

D 1 = D 2 ⇐⇒ ZX D 1 = D 2
Proof For both diagrams, we are going to build a larger one. We de ne λ inductively by connected components:

α → α 2 α 2 -α 2 → β 2 β 2 -β 2 β γ γ π 4 -π 4 π → π 4 -π 4
and such that λ(. ⊗ .) = λ(.)•λ(.). en, we de ne ΛD i := •λ(D i ) (the choice of notation Λ will be made clearer in Chapter 5). One can check that λ

(D i ) = 1 0 0 D i , so ΛD i = 1 D i . Hence, since D 1 = D 2 , we have ΛD 1 = ΛD 1 .
By Propositions 4.7.11 and 4.7.12, both reduce to the same SVD form, with potentially di erent scalars, i.e.:

ZX ΛD 1 = s 1 β α and ZX ΛD 2 = s 2 β α
It is fairly easy to prove that ZX λ(.) • = , so ZX ΛD i • = . It helps us prove that the two scalars s 1 and s 2 are equal under ZX:

s 1 = ΛD 2 s 1 = s 2 β α s 1 = ΛD 1 s 2 = s 2
Hence, we have:

ZX ΛD 1 = ΛD 2 It is also fairly easy to show that ZX λ(.)• π = . ⊗ π , so ZX ΛD i • π = D i . Finally: ZX D 1 = ΛD 1 • π = ΛD 2 • π = D 2
Remark 4.7.17. is gives a result of completeness only on a particular class of scalars. However, one can check that all the scalars produced by the two SVD algorithms (Propositions 4.7.11 and 4.7.13) are of this form.

From this we can directly get some equalities on scalars that will prove useful in the following. and γ := arccos 3 8 .

Completeness of ZX/ ZX

Recovering ZXπ /4

e point now is to exploit the SVD of ZX-diagrams and their uniqueness, rst to recover ZXπ /4 , and then to prove the completeness for unrestricted ZX-Calculus. A rule that can directly use these results is (BW), because the diagrams on both sides of the equation are cycle-free:

Corollary 4.8.1.

ZX π 4 π 4 π 4 -π 2 π 4 π 4 π 4 = π 4 π π 2 π 4 π 4 π π 4 (BW) Proof of Cor. 4.8.1
Using Proposition 4.7.13, we can put both sides of the equation in SVD form, and thanks to Proposition 4.7.15, the two forms have the same structural angles. We can even compute:

π 4 π 4 π 4 -π 2 π 4 π 4 π 4 = π 2 β1 π 2 γ π 2 β1 s 1 and π 4 π π 2 π 4 π 4 π π 4 = π 2 β1 π 2 γ π 2 β1 s 2
with γ = π 2 -2 arctan 1 √ 5 and β 1 = arctan (2). Also, combining Remark 4.7.17 and Proposition 4.7.16, we directly get that the two scalars are provably equal, which concludes this proof. e results on SVDs cannot be directly used to prove the equation (C) though, for its diagrams have 4 inputs/outputs, and have cycles. However, the SVDs can be used to prove a rst intermediary result: Lemma 4.8.2.

β α π β α = β α π β α

Proof

We prove the equality by simplifying both sides of the equation. e le hand side yields, when ignoring the scalars:

β α π β α = (HD) (S) (|i ) α+ π 2 β β+ π 2 -α π 2 = (B) -α β β+ π 2 π 2 α+ π 2 = (Hopf) β+ π 2 -α β π 2 α+ π 2 = (EU) (S) β+ π 2 β1 α+ π 2 β3 β2 = (B) (H) β1 β2 β+ π 2 β3 α+ π 2 = (HD) (|i ) (S) β2 β+ π 2 β1-π 2 β3 α -π 2 = (EU) (S) β3 β+ π 2 β2 γ3 γ2 γ1 = (K) (S) (-1) m β3 β+ π 2 +mπ β2 γ3+(n+m)π (-1) n γ2 γ1+nπ
where n and m are chosen in {0, 1} so that γ 1 + nπ and β + π 2 + mπ are in [0, π). By symmetry, the right hand side yields:

β α π β α = (-1) m β3 β+ π 2 +mπ β2 γ3+(n+m)π (-1) n γ2 γ1+nπ
Notice that, due to the symmetry of the two diagrams, the resulting scalars (that we ignored) are equal (and non null). If β 2 = 0 mod π, then we can compute that both α and β are multiples of π, and in this case the equation is trivially derivable. Else, notice

that β2 is invertible, its inverse is 1 1-e 2iβ 2 1 -e iβ 2 -e iβ 2 1
. Hence, we get:

(-1) m β3 β+ π 2 +mπ γ3+(n+m)π (-1) n γ2 γ1+nπ = (-1) m β3 β+ π 2 +mπ γ3+(n+m)π (-1) n γ2 γ1+nπ
We can then plug any red dot with angle ∈ (0, π 2 ), say π 4 , on the lower branch. We can now use Proposition 4.7.15, match the angles γ 1 + nπ = β + π 2 + mπ and (-1) n γ 2 = (-1) m β 3 , so the two initial diagrams are equal.

Proposition 4.8.3.

ZX β α π β γ -γ α = α α π β -γ γ β (C) Proof of Prop. 4.8.3 γ β β -γ α α π = (H) (CP) (B) β α α π β γ -γ -γ 2 γ 2 = (S) 4.8.2 -γ 2 α γ 2 π β -γ 2 β γ 2 α = 4.8.2 γ 2 β β -γ 2 α π -γ 2 α γ 2 = (H) (B) γ 2 α β π -γ 2 α β -γ 2 γ 2 = (H) 4.8.2 β α π α γ 2 -γ 2 γ 2 -γ 2 β = (B) (H) β α γ 2 -γ 2 β π γ 2 α -γ 2 = 4.8.2 γ β β -γ α -γ 2 α π γ 2 = (B) (CP) (H) π β α -γ γ β α Remark 4.8.4.
e proof of Proposition 4.8.3 shows that (C) can be derived using only Lemma 4.8.2 and the Cli ord rules ZXπ /2 . However, the provided proof requires using half angles (for γ). Hence, whenever the considered fragment contains all its half angles, the equation in Lemma 4.8.2 should be preferred to (C).

We have derived all the rules necessary for the completeness of the Cli ord+T fragment of the ZX-Calculus (Lemma 4.6.3, Propositions 4.7.5 and 4.8.3, and Corollary 4.8.1), which means:

Proposition 4.8.5. For any diagrams D 1 , D 2 of ZX[ π 4 ]: D 1 = D 2 ⇐⇒ ZX D 1 = D 2
In other words, ZX ZXπ /4 . Hence, by eorem 4.4.1, we can also derive any sound linear equation with constants in π 4 Z.

Corollary 4.8.6. For any ZX[ α, π 4 ]-diagrams D 1 and D 2 :

D 1 = D 2 ⇐⇒ ZX D 1 = D 2 Completeness from ZW C
We are now going to prove eorem 4.6.1 using the completeness of ZW[C]/ ZW C , again through a system of back and forth translation between the two languages. e interpretation [.] W from ZX to ZW[C] is pre y obvious:

[.] W → → → → → → α e iα … … … … → 1 √ 2 n ... ... m α → ⊗ m W • n ... ... m α W • ⊗ n W D 1 • D 2 → [D 1 ] W • [D 2 ] W D 1 ⊗ D 2 → [D 1 ] W ⊗[D 2 ] W
It preserves the semantics: r . However, we can use the SVD form of a 1-qubit state to determine D. We get the following interpretation:

[.] X → → → → → → π → π → → π → θ+ π 2 ρe iθ … … … … α -α ⊗ n -γ γ with      α := 2 arctan (ρ) n := max (0, -log 2 (1+ cos (α)) -2) γ := arccos 1 2 n+1 (1+cos(α)) D 1 • D 2 → [D 1 ] X • [D 2 ] X D 1 ⊗ D 2 → [D 1 ] X ⊗[D 2 ] X
As you can see, some side calculation is buried in the scalars. Particularly, the scalars in the interpretation of the GHZ node basically amount to the inverse of α , as evidenced by Corollary 4.7.20. Here again, the interpretation preserves the semantics: Lemma 4.8.8. e following diagram commutes:

ZX ZW[C] Qubit [.] X .
. A rst part of the proof of completeness is to show that any diagram can be recovered from its back and forth interpretation: Proposition 4.8.9. For any ZX-diagram:

ZX [[D] W ] X = D
Proof We prove the result by induction. Since both interpretations are PROP-functors, we only need to prove the result for the generators.

e result for wire generators is obvious.

• … … θ → e iθ … … → θ+ π 2 … … π 2 -π 2 -π 3 π 3 = 4.7.18 θ … … = (IV) θ … … • → 1 √ 2 → π π 2 α α -γ γ = (K) (CP) α+π α -γ γ π π 2 = 4.7.21
Finally, R X is a composition of R Z and H.

en, we can show that ZX proves any equality of

ZW[C]/ ZW C through [.] X .
Proposition 4.8.10. Let D 1 and D 2 be two ZW[C]-diagrams.

ZW C D 1 = D 2 =⇒ ZX [D 1 ] X = [D 2 ] X
Proof As before, we are going to show that all the axioms in ZW C are derivable using ZX. Most of them are already proven by ZXπ /4 , so a fortiori by ZX, thanks to Proposition 4.8.5. Only 5 remain:

= 1b r s • • • • • • • • • • • • . . . • • • rs • • • = 3b r r r = 4a r s r+s 0 4c = = 6b r
• 1b: On the one hand:

• • • ρ 1 ρ 2 e i(θ 1 +θ 2 ) • • • → θ1+θ2-π 2 … … α s
and on the other:

ρ 1 e iθ 1 ρ 2 e iθ 2 • • • • • • • • • • • • . . . → • • • • • • • • • • • • . . . α2 α1 θ2-π 2 θ1-π 2 s 2 s 1 = • • • • • • α1 s 2 s 1 α2 θ1+θ2-π = θ1+θ2-π 2 … … α s
Using SVD decomposition and its uniqueness (Props. 4.7.13 and 4.7.15) on the dangling branch, together with Proposition 4.7.16 and Remark 4.7.17 for the scalar equality.

• 3b:

r → θ+ π 2 α -α ⊗ n -γ γ = θ+ π 2 α -α ⊗ n -γ γ -α ⊗ n -γ γ α = θ+ π 2 α -α ⊗ n -γ γ -α ⊗ n -γ γ θ+ π 2 α ← r r
• 4a: e right hand side can be directly put in SVD form. However, the le hand side yields:

r 1 r 2 → α1 β1 α2 β2 s 1 s 2
and it contains a cycle. is can be remedied since by Proposition 4.7.13:

α1 β1 α2 β2 s 1 s 2 = γ1 γ2 γ γ3 γ5 γ4 s Hence: α1 β1 α2 β2 s 1 s 2 = γ2 γ γ1 + γ5 γ4 s = γ2 γ γ1 + γ5 γ4 s = δ1 δ2 s ← r 1 +r 2
by uniqueness of the SVD-decomposition (Prop. 4.7.12), and using Proposition 4.7.16 and Remark 4.7.17 to deal with the scalars.

• 4c:

0 → arccos 1 4 -arccos 1 4 θ+ π 2 = = ← • 6b : r → θ+ π 2 α -α ⊗ n -γ γ = α -α ⊗ n -γ γ = ←
Proof of eorem 4.6.1

We have the following diagram:

ZX/ ZX ZW[C]/ ZW C Qubit [.] X [.] W . . Let's prove that [.] W is full and faithful. • [.] W is faithful: Let D 1 , D 2 be two ZX-diagrams such that ZW C [D 1 ] W = [D 2 ] W . By Proposition 4.8.10, we have ZX [[D 1 ] W ] X = [[D 2 ] W ] X ,
and by Proposition 4.8.9,

ZX D 1 = [[D 1 ] W ] X = [[D 2 ] W ] X = D 2 . • [.] X is full: Let D be a ZW[C]-diagram. We de ne D X := [D] X . By Lemmas 4.8.7 and 4.8.8, [[.] X ] W = . , hence, by completeness of ZW[C]/ ZW C , ZW C [[D] X ] W = D, i.e. ZW C [D X ] W = D.

Another Axiomatisation for Universal ZX-Calculus

In the axiomatisation ZX, there are two rules that deal with one-qubit unitaries: the Euler angles (EU), and the Hadamard decomposition (HD). We explore the possibility of merging the two rules, and give an axiomatisation ZX in Figure 4.4. is axiomatisation is as powerful as ZX.

4.9. Another Axiomatisation for Universal ZX-Calculus

… = α+β β … α … (S) … … … … = (I g ) = (I r ) = (IV') α = (CP) = (B) α … = α … … … (H) = β2 β1 β3 α1 α2 π γ (EU')
Figure 4.4: Set of rules ZX for the ZX-Calculus with scalars. e right-hand side of (IV') is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires. In rule (EU'), β 1 , β 2 , β 3 and γ can be determined as follows:

x + := α 1 +α 2 2 , x -:= x + -α 2 , z := -sin (x + ) + i cos (x -) and z := cos (x + ) -i sin (x -), then β 1 = arg z + arg z , β 2 = 2 arg i + z z , β 3 = arg z -arg z , γ = x + -arg(z) + π-β 2 2
where by convention arg(0) := 0 and z = 0 =⇒ β 2 = 0. eorem 4.9.1. e language ZX/ ZX is complete. e functor ZX/ ZX . → Qubit is full and faithful.

Proof

e functor is obviously full, since the diagrams are the same in ZX/ ZX as in ZX/ ZX. To prove the faithfulness, we are going to show ZX ZX. First, let us recover the Hadamard decomposition (HD):

= (I) = (EU') π 2 π 2 π 2 π -π 4 = (H) π 2 π 2 π -π 4 π 2 (4.9) -π 2 = (H) -π 2 = (4.9) (S) π 2 π 2 π -π 4 = (IV') (CP) π 2 π -π 4 π 2 = (IV') π 2 π -π 4 (4.10) = (4.9) π 2 π 2 π -π 4 π 2 = (S) (H) π 2 π -π 4 π 2 π 2 = (4.10) π 2 π 2 -π 2 = (H) π 2 π 2 -π 2 (4.11)
e next step is to prove that the equation (E) is derivable. To do so, we will rst derive (K) and (SUP).

π α = (H) π α = (EU') π 2 π 2 -α -π 2 π α-π 4 = (S) (4.9) -α π π α = (H) -α π π α (4.12) π 2 = (H) π 2 = (CP) (IV') π 2 π 2 π -π 4 π 2 π π 4 = (4.9) π π 4 = (H) (IV') π π 4 (4.13)
First, for proving (SUP):

α α+π = (I) (S)
α α+π

-π 2 π 2 = (B) α α+π -π 2 π 2 = (4.11) α-π 2 α+ π 2 π 2 = (EU') π 2 β2 β1 β3 π γ = (S) π 2 β2 π γ = (CP) (IV') β2 π γ
Hence:

β2 π γ = β2 π γ = α α+π = 2α+π
so nally:

α α+π = 2α+π = 2α+π (4.14) -π 4 π 4 = (H) π 4 -π 4 = (4.11) 3π 4 π 4 -π 2 = (4.12) π π 4 3π 4 -π 4 π -π 2 = (4.14) π π 4 π 2 π -π 2 = π π 4 π 2 π -π 2 = (4.13) π π 4 π -π 2 π π 4 = (IV')
It now remains to prove the rule (EU) can be derived. We decompose the le hand side diagram as such:

α1 α3 α2 = α1 α3 α2 = α1 α3 x α2-x = β2(x) β1(x) β3(x)+γ1(x) π β4(x) +γ4(x) γ2(x) γ3(x)
where x is considered as a variable, and hence, all the computed angles depend on it, while the angles α i are xed. We want to nd x 0 such that β 3 (x 0 ) + γ 1 (x 0 ) = 0 mod π.

Let the functions f and g be de ned as:

f : x → arctan tan (α 1 ) cos (x) + tan (α 3 ) cos (α 2 -x) 1 -tan (α 1 ) cos (x) tan (α 3 ) cos (α 2 -x) g : x → tan (α 1 ) cos (x) + tan (α 3 ) cos (α 2 -x) Notice that g - π 2 = tan (α 3 ) cos α 2 + π 2 and g π 2 = tan (α 3 ) cos α 2 - π 2 Hence, g -π 2 g π 2 ≤ 0.
Since g is continuous, by the intermediate value theorem, there exists

x 0 ∈ [ -π 2 , π 2 ] such that g(x 0 ) = 0. Notice now that f (x 0 ) = arctan 0 1 + tan (α 1 ) 2 cos (α 2 -x 0 ) 2 = 0 Also, it can be computed that f = β 3 + γ 1 mod π. Hence, β 3 (x 0 ) + γ 1 (x 0 ) = 0 mod π i.e. β 3 (x 0 ) + γ 1 (x 0 ) = nπ. Hence, denoting β i ← β i (x 0 ) and γ i ← γ i (x 0 ): α1 α3 α2 = β2 β1 nπ π β4+γ4 γ2 γ3 = 4.12 (S) β2+ (-1) n γ2 β1 π β4+γ4 +nγ2 γ3+nπ = 4.12 (S) (-1) m β2+ (-1) n+m γ2 β1+mπ π β4+mβ2 +γ4+ (n+(-1) n m)γ2 γ3+(n+m)π
Since, thank to Proposition 4.6.2, the unitary representation is unique if β 1 +mπ ∈ [0, π) (m has been chosen for this purpose), then the previous diagram is provably equivalent to the one resulting directly from (EU).

On the one hand, this new axiomatisation is one axiom shorter, and (EU') and (IV') can be considered simpler than (EU) and (E). On the other hand, the axiomatisation in Figure 4.3 has the nice property that it su ces to remove (EU) and (E) to get a complete axiomatisation for the scalar-free Cli ord fragment. Moreover, (EU) is arguably more natural, and has already been given for instance in [START_REF] Coecke | ZX-rules for 2-qubit Cli ord+T quantum circuits[END_REF].

Again, we conjecture that all the rules in ZX are necessary, i.e. none of the rules are derivable from the others. Indeed, the arguments given for the minimality of ZX can easily be adapted here, and we are le with the same observation: only (B) and (I r ) are not proven to be necessary.

ZX-Calculus for Completely Positive Maps

As pointed out in Section 1.5, there exists a formalism for expressing quantum evolutions in a non-isolated system. ey are represented as density matrices, and the trace operator is used to represent the interaction of the system to its environment. In [START_REF] Selinger | Dagger compact closed categories and completely positive maps[END_REF], it is pointed out that any †-compact monoidal category for pure quantum mechanics could be turned into a category for CPMs thanks to the so-called CPM-construction. For the simpli ed case of PROPs, it becomes: De nition 4.10.1 (CPM-construction): Given a †-compact PROP C, let CPM(C) be the †-compact PROP such that its arrows are

   f f * … … … … … n, m ∈ N, f : n → m    , where f * … … f † … … := .
Notice that if we have a PROP L quotiented by R, R can also quotient CPM(L). However, this is ill de ned, for a term of CPM(L) a er application of an equality of R may not be in CPM(L) but in the larger PROP L. For instance, consider the following derivation in ZX/ ZX:

-α α = (S) -α α = (S)
-α α e rst and the third diagram are both in CPM(ZX), but the second one is not. In other words, in order to prove that two diagrams of CPM(L) are equal, one would need to derive the equality in L.

Notice also that the representation of a CPM in the CPM-construction requires a "doubling" of the diagram: one needs f and its adjoint f * .

Another approach to relate pure quantum mechanics to the general one is the notion of environment structure [START_REF] Coecke | Axiomatic description of mixed states from Selinger's CPMconstruction[END_REF][START_REF] Coecke | Pictures of complete positivity in arbitrary dimension[END_REF][START_REF] Coecke | Environment and Classical Channels in Categorical antum Mechanics[END_REF]. e notion of puri cation is central in the de nition of environment structure. Intuitively, it means that (1) there is a discard morphism; (2) any morphism can be puri ed, i.e. decomposed into a pure morphism followed by a discarding map, and (3) this puri cation is essentially unique. More formally: (1) For all f : n → m ∈ C, there exists f : n → m + k ∈ C such that:

ι (f ) … … … f … … = (2) For any f : n → m + k 1 and g : n → m + k 2 in C: f ∼ cp g ⇐⇒ ι(g) … … … = ι(f ) … … …
where the relation ∼ cp is de ned as:

f ∼ cp g ⇐⇒ f … … … f † … … = g … … … g † … …
Notice that ∼ cp is technically not a relation on morphisms but on tuples (n, m, k, f )

with f : n → m + k ∈ C: (n, m, k, f ) ∼ cp (n , m , k , g) if n = n , m = m
and f and g satisfy the graphical condition represented above. As an abuse of notation, we write f ∼ cp g, as the other components of the tuple will be usually obvious from context. We will do the same for our relation ∼ iso below. CPM(FdHilb) is actually an environment structure for the category FdHilb, and more generally for any †-compact PROP C, CPM(C) is an environment structure for C and conversely any environment structure for C is equivalent to CPM(C) [START_REF] Coecke | Pictures of complete positivity in arbitrary dimension[END_REF].

e Discard Construction

First we need to de ne for any †-PROP its subcategory of isometries.

De nition 4.10.3: Let C be a †-PROP. We de ne C iso as the subcategory of C such that its arrows are f :

n → m f † • f = id n .
Notice that C iso is usually not a †-PROP. Any †-PROP-functor F : C → D between two †-PROPs can be restricted to their subcategories of isometries leading to a PROPfunctor F iso : C iso → D iso . us there is a restriction functor iso : †-PROP → PROP. Remark that this functor preserves fullness and faithfulness. One always has a faithful inclusion PROP-functor: ι iso : C → C iso .

In quantum mechanics, isometries are causal evolutions, i.e. applying an isometry and then discarding all outputs is equivalent to discarding the inputs straight away. As pointed out in [START_REF] Huot | Universal properties in quantum theory[END_REF], adding discard maps to the category of isometries would make 0 a terminal object. We de ne this category, called a ne completion:

De nition 4.10.4: Given an PROP C, we de ne C ! as C with an additional morphism ! : 1 → 0, such that, for all f :

n → m ∈ C, ! ⊗ m • f =! ⊗ n . By convention, we have ! ⊗ 0 = id 0 .
is makes 0 a terminal object in C ! , and hence makes C ! the a ne completion of C.

Remark 4.10.5. Formally, a morphism ! n should be de ned for every object n of the PROP, such that for any f : n → m, ! m • f =! n , and such that ! 0 = id 0 . However, we have that

! n ⊗! m = id 0 • (! n ⊗! m ) =! 0 • (! n ⊗! m ) =! n+m . is means that ! n =! ⊗ n
1 . Again given a PROP-functor F : C → D, one can de ne a functor F ! : C ! → D ! by F ! (!) =! and F ! (f ) = ι ! (F (f )) for the other morphisms. In [START_REF] Huot | Universal properties in quantum theory[END_REF], Huot and Staton show that CPTP, the category of completely positive trace preserving maps, is equivalent to FdHilb ! iso , thus giving a characterisation of it via a universal property. We extend this idea to non-trace preserving maps by proceeding to a local a ne completion of the subcategory of isometries.

We de ne the category C as the pushout of C and C ! iso : De nition 4.10.6 (Discard Construction): Given a †-PROP C, C is de ned as the pushout:

C iso C ! iso C C ι iso ι ! ι ! iso ι
e pushout of two PROPs always exist [START_REF] Zanasi | Interacting Hopf Algebras -the theory of linear systems[END_REF]. We can also describe it simply combinatorially. e morphisms of C are equivalence classes generated by formal composition and tensoring of morphisms in C ! iso and C. e equivalence relation is generated by the equations of both categories augmented with equations ι ! (f ) = ι iso (f ) for all f in C iso . e functors ι and ι ! iso are the natural ways to embed C and C ! iso . Since the only morphisms in C iso which are not identi ed with the morphisms of C are those that contain !, we can see C as C augmented with discard maps which delete isometries.

De nition 4.10.7 (Discard): e discard map for the object 1 is de ned in C by

:= ι ! iso (!)
Since ι ! iso is a PROP-functor, we have that the discard map for the object n is

ι ! iso (! ⊗ n ) = ι ! iso (!) ⊗ n = ⊗ n
Notice, that for any isometry

f : n → m in C , f … … = …
, thus any isometry is causal.

When seeing the initial category as quotiented by a set of rules C/R, we end up technically with (C/R) which can be expressed as:

(C/R) = (C + { })/ R ∪ ι ! iso (ι ! (f )) … … = … f : n → m ∈ C iso
where C + { } is the smallest PROP that contains C and the generator : 1 → 0. It is natural to compare this new construction to the CPM one and the environment structure de ned above. To do so, we need to study in details the puri cation process in C . First notice that any morphism of C admits a puri cation:

: n → m + k ∈ C such that ι (f ) … … … f … … = .
In other words, f is a puri cation of f . e puri cation needs not be unique, however it satis es an essential uniqueness condition. To state it we de ne the relation ∼ iso .

De nition 4.10.9 (∼ iso ): Let C be a †-PROP, and two morphisms f :

n → m + k 1 , g : n → m + k 2 , f ∼ iso g if there are two isometries u : k 1 → k 3 and v : k 2 → k 3 , such that f … … … u … g … … … v … = .
Notice that the relation ∼ iso is not transitive, thus we consider ∼ + iso its transitive closure to make it an equivalence relation. It is easy to show that if f ∼ + iso g then f and g purify the same morphism of C . e converse is also true: Lemma 4.10.10. For all f : n → m + k 1 and g : n → m + k 2 :

f ∼ + iso g ⇐⇒ ι (g) … … … = ι (f ) … … … Proof (⇒) It is enough to show f ∼ iso g =⇒ ι (g) … … … = ι (f ) … … …
since equality is transitive.

Since f ∼ iso g, there are two isometries u :

k 1 → k 3 and v : k 2 → k 3 such that f … … … u … g … … … v … =
and then:

f … … … u … = g … … … v … =⇒ ι (f ) … … … ι (u) … = ι (g) … … … ι (v) … =⇒ ι (f ) … … … ι (u) … = ι (g) … … … ι (v) … =⇒ ι (f ) … … … = ι (g) … … … (⇐) We have ι (g) … … … = ι (f ) … … … in C .
To do the proof, we will have to go back to the de nition of the category C as a pushout. Recall that two terms are equal if one can rewrite one into the other using the equations de ning C .

We can assume that, among those steps, the only one involving discards are isometry deletion/creation. Diagramatically this amounts to say that the discards are never moved, in fact one can always moves the other morphisms to make them interact with the discards.

Doing this, we ensure that all intermediary diagrams in the chain of equations are of the form

ι (h) … …
… for some h. erefore, to prove the result for a chain of equations of arbitrary size, it is enough to do it just for one step of rewriting.

Consider then this step of rewriting. ere are two cases. Either we have used an equation which, by identi cation, can be seen as an equation of C, that is which involves no discards. en by functoriality of ι we recover that f = g and therefore f ∼ iso g. Or the equation involves a discard which has deleted an isometry u.

en one of the upper part, let's say ι (f ), can be wri en ι (f )

… … = ι (g) … … … u … . But
u being an isometry, there exists u in C such that ι (u ) = u. Hence, we have

f … … = g … … … u … in C. It follows that f ∼ iso g.
So the puri cation is unique up to ∼ + iso . Lemma 4.10.10 also gives an alternative de nition of C which relates more easily to the CPM construction. It is the same construction as CPM with ∼ cp replaced by ∼ + iso . As we have introduced a new discard construction, a natural question is whether C is an environment structure for C. To be an environment structure, three conditions are required.

e rst two are satis ed: C has a discard morphism for every object, and every morphism can be puri ed.

e third one is the uniqueness of the puri cation: according to the de nition of the environment structures, f and g purify the same morphism if and only if f ∼ cp g whereas according to Lemma 4.10.10, f and g purify the same morphism if and only if f ∼ + iso g. As a consequence C is an environment structure for C if and only if ∼ cp =∼ + iso . It turns out that one of the inclusions is always true: Lemma 4.10.11. For any †-PROP C, we have ∼ + iso ⊆∼ cp .

Proof

Since ∼ cp is transitive it is enough to show that ∼ iso ⊆ ∼ cp . Let f : n → m + k 1 and g : n → m + k 2 s.t. f ∼ iso g. en there are two isometries u :

k 1 → k 3 and v : k 2 → k 3 such that f … … … u … g … … … v … =
and then:

f … … … f † … … = f … … … f † … … u u † … … = g … … … g † … … v v † … … = g … … … g † … … So f ∼ cp g.
As a consequence, if ∼ cp =∼ + iso , it means that there are some morphisms f, g that are equal in ∼ cp but cannot be proved equal in ∼ + iso . Intuitively it means the category has not enough isometries to prove those terms equal, which leads to the following de nition: De nition 4.10.12 (Enough Isometries): A †-PROP C has enough isometries if the equivalences relations ∼ cp and ∼ + iso of C are equal.

Lemma 4.10.13. Given a †-PROP C, the following properties are equivalent:

1. C has enough isometries 2. C is an environment structure for C

C CPM(C)

Proof [(i) ⇔ (ii)] First ι : C → C is an i.o.o. PROP-functor. We need to check the three conditions hold:

• Since ι ! iso is strict monoidal one has:

⊗ 0 = ι ! iso (! ⊗ 0 ) = ι ! iso (id 0 ) = id 0 ⊗ n ⊗ ⊗ m = ⊗ n+m
So the rst condition is satis ed.

• e second condition is Lemma 4.10.8.

• According to Lemma 4.10.11, ∼ + iso ⊆∼ cp , thus the third condition is satis ed if and only if ∼ cp ⊆∼ + iso . [(ii) ⇔ (iii)] Direct consequence of the fact that D is an environment structure for

C i D is equivalent to CPM(C) [CH16].
We want eventually to apply these results to the ZX-Calculus. A rst step is to show that Qubit has enough isometries. We can actually be stronger than this and show it for Qudit. Proposition 4.10.14. Qudit is an environment structure for Qudit. Furthermore ∼ + iso =∼ iso .

Proof

Let f : n → m + k 1 and g : n → m + k 2 be two linear maps such that f ∼ cp g. By de nition:

f … … … f † … … = g … … … g † … … .
It follows that the two superoperators ρ → tr [m+1,m+k 1 ] (f † ρf ) and ρ → tr [m+1,m+k 2 ] (g † ρg) are equal and then by the Stinespring dilation theorem (see for example [START_REF] Huot | Universal properties in quantum theory[END_REF]), there are isometries u and v such that

f … … … u … g … … … v … = .
In other words f ∼ iso g. is shows that ∼ cp ⊆∼ iso which is even stronger than the necessary condition. From Lemma 4.10.11 it follows that ∼ iso ⊆∼ + iso .

Corollary 4.10.15. Qubit CPM(Qubit).

Application to ZX

We now focus on the behaviour of interpretation functors with respect to the discard construction. e discard construction de nes a functor ( ) : †-PROP → PROP. Indeed, given a †-PROP functor F , F iso and F ! iso uniquely de ne a functor F by pushout.

D iso D ! iso D D C iso C ! iso C C F i s o F ! i s o F F
e following lemma and theorem are the main tools to apply the discard construction to the ZX-Calculus: Lemma 4.10.16. If F is faithful and if F iso : C iso → D iso is surjective, then F (f ) ∼ + iso F (g) =⇒ f ∼ + iso g.

Proof First, remark that if F ( ) iso k, then there exists h s.t. F (h) = k. Indeed, under the hypothesis, there are two isometries u and v such that:

F ( ) … … … u … = k … … … v … . Since
F iso is surjective, there are two isometries a and b such that F (a) = u and

F (b) = v. F ( ) … … … F (a) … = k … … … F (b) … =⇒ F ( ) … … … F (a) … F (b † ) … = k … … … =⇒ F     … … … a … b † …     = k … … …
e rst implication uses the fact that F (b) is an isometry. So k is in the image of F . By the rst remark, it is therefore su cient to prove the result if F (f ) ∼ iso = F (g). Since F iso is surjective, there are two isometries a and b such that F (a) = u and f (b) = v. erefore:

F (f ) … … … F (a) … = F (g) … … … F (b) … =⇒ F   f … … … a …   = F   g … … … b …   =⇒ f … … … a … = g … … … b …
e second implication holds because F is faithful. e last equation is the de nition of f ∼ iso g. eorem 4.10.17. Let C and D be two †-PROPs and F : C → D a †-PROP-functor. If F is faithful and if F iso : C iso → D iso is surjective, then F : C → D is faithful. If furthermore F is surjective then F is surjective and faithful.

Proof Let f and g be two morphisms such that F (f ) = F (g). By Lemma 4.10.8, f and g can be puri ed, respectively by f and g . en:

F ι C (f ) … … … = F ι C (g ) … … … =⇒ ι D (F (f )) … … … = ι D (F (g ))

…

… … e implication follows from the right hand face of the commutative cube. By Lemma 4.10.10 we have F (f ) ∼ + iso F (g ). By Lemma 4.10.16, f ∼ + iso g . en Lemma 4.10.10 → Qubit is surjective and faithful by eorem 4.6.1 (the theorem actually says that . is full and not surjective. However, the standard interpretation is i.o.o., which makes the two properties equivalent).

gives ι C (f ) … … … = ι C (g ) … … … that is f = g, so F is faithful. A direct
(ZX/ ZX) is naively presented as ZX augmented with , and ZX augmented with ⊗ m • f = ⊗ n for any isometry f : n → m. is implies adding an in nite number of rules to ZX. However, we can drastically reduce them if we are provided with a spanning set of isometries. eorem 4.10.19 ( [START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF]). e set (e iα , |0 , H, R Z (α), CNot) spans Qubit iso . Using this result, we provide an axiomatisation ZX for CPMs. It is given in Figure 4.5. e right-hand side of ( IV) is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires. In rule (EU), β 1 , β 2 , β 3 and γ can be determined as follows: x + := α 1 +α 3 2 , x -:= x + -α 3 , z := cos α 2 2 cos (x + )+i sin α 2 2 cos (x -) and z := cos α 2 2 sin (x + )i sin α 2 2 sin (x -), then

… = α+β β … α … (S) … … … … = (I g ) = (I r ) = ( IV) = (CP) = (B) α … = α … … … (H) π 2 π 2 -π 2 = (HD) = β2 β1 β3 α2 α1 α3 (EU) = ( H) = ( α) α = ( CX)
β 1 = arg z + arg z , β 2 = 2 arg i + z z , β 3 = arg z -arg z
is axiomatisation is designed to be complete.

Proof

We will prove that ZX / ZX (ZX/ ZX) . First, notice that all the morphisms are the same in both categories.

We can see that our axiomatisation ZX is very close to capture ZX, which is complete for pure quantum mechanics. e only two di erences are that (EU) dropped the scalars, and that (E) was replaced by ( IV). First of all, thanks to Figure 2.2, we have:

ZX = (IV)
We use this then to prove:

-π 2 = ( IV) ( H) (H) -π 2 = (CP) (IV) -π 2 = (S) ( α) -π 2 -π 2 π 2 π 2 = (HD) -π 2 = ( H) (S) ( α) = (IV) ( IV) ( H) (H) (4.17) -π 2 = (H) -π 2 = (HD) (S) -π 2 π 2 = (IV) (CP) -π 2 π 2 = (4.17) (IV) π 2 (4.18)
We can recover (K): We can recover (SUP). First: It remains to prove that for any isometry f : n → m, ZX ⊗ m • f = ⊗ n . Since (e iα , |0 , H, R Z (α), CNot) spans the isometries of Qubit, and since ZX/ ZX is complete, any isometry of ZX can be turned into a diagram that solely uses:

α+π α = (I) (S) (4.18) α+π α -π 2 -π 2 = (B) α -π 2 α+π -π 2 = (EU) (S)
π α , , , α ,
Hence, it is su cient to prove the result for these diagrams. e last four are directly given as axioms. e last one is given by equation (4.16).

Remark 4.10.21. Variations on this axiomatisation can easily be made to reduce the number of rules. For instance, {( H), ( α), ( CX)} can be replaced by: = ( CX') α Furthermore, the Hadamard decomposition (HD) can be replace by a single-line scalarfree version:

= π 2 π 2 π 2 (HD')
We now have a complete axiomatisation for of ZX for CPM(Qubit). We can naturally ask the question for fragments of the language. is is not the case in general. Some fragments may not have enough isometries. For instance: Proposition 4.10.22. (Clifford+T) is not an environment structure for Clifford+T. More precisely, there exists a scalar φ s.t. φ ∼ cp φ * but φ + iso φ * . One can take for example φ = 1 + 2i.

Proof First remark that, in any †-PROP, if f ∼ + iso g then there is a morphism (usually

not an isometry) w such that f … … … g … … … w … = . is is true if f ∼ iso g: From f … … … u … g … … … v … = we immediately get f … … … g … … … v … = u † … .
e result then follows by a straightforward induction. Now take φ = 1 + 2i and φ * = 1 -2i. e scalars are in Clifford+T since their entries are in Z[i, 1 √ 2 ], and are clearly ∼ cp equivalent. Now let's suppose 1+2i ∼ + iso 1-2i. en by the previous remark, there exists a morphism u such that (1 -2i)u = 1 + 2i. But the only possibility for u is 4i-3 5 , which is not in

Z[i, 1 √ 2 ], a contradiction.
is means that the discard construction is not su cient to provide an environment structure to Clifford+T. A fortiori, ZX[ π 4 ]/ ZXπ /4 will not be a graphical language for an environment structure for Clifford+T. However: Proposition 4.10.23. Stab is an environment structure for Stab.

Proof

First of all, since Stab is compact closed, using the map/state duality, proving the result for states in su cient. Since all the non-zero scalar are invertible in Stab we can furthermore w.l.o.g focus on normalized states.

Consider two states d 1 : n + k 1 and d 2 : n + k 2 in Stab such that d 1 ∼ cp d 2 . e point of focusing on normalised states is that we can decompose them using [START_REF] Koenraad | Entanglement on mixed stabilizer states: Normal forms and reduction procedures[END_REF] so

that di … … … = Ai … … … Bi … |0 n i |0 m i …
where A i and B i are unitaries in Stab. De ning:

A i := … Ai … … |0 n i … we have that d i ∼ iso A i since
… A1 … … |0 n 1 u … = … A2 … … |0 n 2 v …
In Qubit any isometry can be wri en as a unitary with ancillae. In other words there is a unitary u such that:

… u … … 0 k u … … =
Composing by u † on both side and denoting w = u † • v one has:

… A1 … … |0 n 1 … … 0 k = … A2 … … |0 n 2 w … … …
It only remains to show that the isometry w is in Stab since the isometry on the le hand side is clearly in it. It is since:

… A1 … … |0 n 1 … … 0 k = w … … A † 2 … 0 n 2 | … … … Hence, A 1 ∼ iso A 1 in Stab, so d 1 ∼ + iso d 2 .
Since Stab is an environment structure for Stab and that ZX[ π 2 ]/ ZXπ /2 is complete pour Stab, we can build thanks to the discard construction ZX[ π 2 ]/ ZXπ /2 that is complete for CPM(Stab). Again, we can simplify the resulting axiomatisation, and provide a nite presentation denoted ZX π /2 given in Figure 4.6. Notice that the axiomatisation is basically ZX where (EU) is replaced by (Z). Notice also that the potential simpli cations given in Remark 4.10.21 still stand here. ] iso can be turned into an equivalent diagram that only uses the above subdiagrams. ey are all consumed by : the last four thanks to the axioms ( IV), ( H), ( α), ( CX), and the rst one because, rst π 2 = (the proof is similar to that in eorem 4.10.20). en:

… = α+β β … α … (S) … … … … = (I g ) = (I r ) = ( IV) = (CP) = (B) α … = α … … … (H) π 2 π 2 -π 2 = (HD) π = π (Z) = ( H) = ( α) α = ( CX)
π 2 = π 2 = π 2 -π 2 = π 2 -π 2 = -π 2 =
Hence all the isometries of ZX[ π 2 ] are consumed by .

Example: antum Pseudo-Telepathy

We propose in this section to study a quantum pseudo-telepathy protocol described in [START_REF] Brassard | antum pseudotelepathy[END_REF]. e problem takes the form of a game between two parties, Alice and Bob, and uses a third-party, called referee. e game is played on a 3 × 3 board, where each cell can be lled with either 0 or 1. e game is inspired by the magic square, in which the cells of each row sum to an even number, and the cells of each column sum to an odd number. Of course, this con guration is impossible, for summing all rows would give an even number, while summing all columns would give an odd number.

In the magic square game, the referee chooses a row and a column of the board. Alice is then asked to ll the chosen row, and Bob the chosen column, while respecting the constraints of the magic square: the entries of the row sum to an even number, the ones of the column sum to an odd number, and of course, Alice and Bob have to agree on their common entry. ese are the winning conditions. e trick is that the two parties cannot communicate, they cannot see what the other has played.

Obviously, classical players cannot de ne a strategy that wins 100% of the time. However, if they are quantum, and share entangled states at the beginning, then there exists a winning strategy. e protocol is the following, as explained in [START_REF] Brassard | antum pseudotelepathy[END_REF]:

• Alice and Bob share the state 1 2 (|0011 -|0110 -|1001 + |1100 ) (the two lehand qubits are owned by Alice, and the two right-hand ones by Bob).

• Alice and Bob both apply a particular quantum circuit to their pair, depending on the row/column they are given: if row i is chosen, Alice applied circuit A i , if column j is chosen, Bob applies circuit B j .

• Both Alice and Bob measure their qubits in the computational basis. Each hence gets two classical bits, the third one is then determined so that it satis es the parity conditions: Alice XORs her two bits, while Bob ips the XOR of his two bits.

We are given the interpretation of each circuit:

A 1 =     i 0 0 1 0 -i 1 0 0 i 1 0 1 0 0 i     A 2 =     i 1 1 i -i 1 -1 i i 1 -1 -i -i 1 1 -i     A 3 =     -1 -1 -1 1 1 1 -1 1 1 -1 1 1 1 -1 -1 -1     B 1 =     i -i 1 1 -i -i 1 -1 1 1 -i i -i i 1 1     B 2 =     -1 i 1 i 1 i 1 -i 1 -i 1 i -1 -i 1 -i     B 3 =     1 0 0 1 -1 0 0 1 0 1 1 0 0 1 -1 0    
First, we translate the protocol to the ZX-Calculus, and show that it can be used for simpli cation. First, the shared entangled state can be represented as:

π π π π
en, since the measurement in the computational basis can be represented as , the protocol is carried as follows, for a right choice of circuits A i , and B j when row i and column j are selected:

π π π π A i B j π 1 2 3 1 2 3
e parity conditions are necessarily satis ed since represents the XOR operation on classical bits. We can give a representation of each of the previous operators:

A 1 := π 2 -π 4 π 4 -π 4 A 2 := π 2 π 2 -π 2 π 2 A 3 := π π π π B 1 := π 4 -3π 4 3π 4 π -π 2 B 2 := -π 2 -π 2 π 2 π 2
B 3 := π ese are not ideal, particularly because A 1 and B 1 are in ZX[ π 4 ]. Also, it may feel more natural to have as a shared entangled state instead of the one suggested by the protocol. is can be easily done by pushing the π-green and red nodes down to the circuits A for instance. Hence, we are going to search for A i and B j such that:

π π π π A i = A i and = B j B j
To do so, we are going to use the following lemmas. kπ

± π 2 = ( α) ± π 2 ± π 2 ± π 2 = = (H) ( H) ( CX)
A 1 can be found as:

π 2 -π 4 π 4 -π 4 π π π π = ( α) 4.10.26 π 2 -π 4 π π π π = ( α) (πdist) π 2 π π π = ( α) (πdist) -π 2 = 4.10.26 -π 2 = (B) -π 2 So we de ne A 1 := -π 2 Similarly: π π π π π 2 π 2 -π 2 π 2 = ( α) π π π π π 2 π 2 = (K) (πdist) (H) (S) π π π 2 -π 2 = (S) (H) (πdist) -π 2 -π 2 So A 2 := -π 2 -π 2
. Finally, it is easy to see that A 3 can be de ned as: A 3 := B 1 can be found as:

π 4 -3π 4 3π 4 π -π 2 = ( α) 4.10.26 π 4 π -π 2 = ( α) π -π 2 = 4.10.26 π -π 2 = -π 2 = (B) -π 2 = (HD) -π 2 -π 2 = (H) -π 2 -π 2 = (B) -π 2 -π 2 = (H) -π 2 -π 2 = (H) ( H) ( CX) -π 2 -π 2 = (HD) (|i ) (S) (I) ( α) π 2 π 2 So we de ne B 1 := π 2 π 2
Again, it is easy to see that B 2 := π 2 π 2 and B 3 := su ce.

We can now give an alternative protocol for the game: Alice and Bob initially share the state 1 2 (|0000 + |1010 + |0101 + |1111 ), and apply A i (resp. B j ) to their pair according to the row number i (resp. column number j) given by the referee; where:

A 1 =     1 0 0 i 0 i 1 0 0 1 i 0 i 0 0 1     A 2 =     1 i i 1 i 1 -1 -i i -1 1 -i -1 i i -1     A 3 =     1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 1     B 1 =     1 -1 -i -i -i -i 1 -1 -i -i -1 1 -1 1 -i -i     B 2 =     1 -i -1 -i -i 1 -i -1 -i -1 -i 1 -1 -i 1 -i     B 3 =     1 0 0 1 1 0 0 -1 0 1 1 0 0 -1 1 0    
A summary of the choices of maps for Alice and Bob is given in Figure 4.7. We can then verify the protocol using the ZX-Calculus. With diagrams A i and B j de ned above (whose interpretation correspond to the requirement of the protocol), we can show that:

A i B j π 1 2 3 1 2 3 = π σ j σ i -π 2 -π 2 -π 2 π 2 π 2 π 2 π 2
Alice Bob for each pair (i, j) ∈ {1, 2, 3} 2 , and where σ i exchanges the rst and ith wire:

σ 1 = and σ 2 = and σ 3 =
For instance, for the pair (1, 1): Since the parity conditions are necessarily met by construction ( representing exactly the XOR of two qubits) all we have to do is check whether Alice and Bob agree on the bits j and i. To do so, we can XOR them, and check that it results in |0 . To do so, we can apply:

π π 2 π 2 -π 2 = (B) π π 2 π 2 -π 2 = (S) (Hopf) π π 2 π 2 -π 2 = (S) 4
σ j σ i
where the σ i are here to allow the selection of qubits i and j. Of course, since the these permutations are merely inversions, σ 2 i = I ⊗ 3 . Hence:

σ i σ j π σ i σ j = π = (IV) (Hopf) π
where the le most qubit represents |0 .

Chapter 5 Normal Forms

One of the fundamental di erences between ZX and ZW-Calculi is the fact that the la er enjoys a pleasant notion of normal form. is is why historically, completeness was rst proven for ZW (using normal forms), and later on for ZX (using the completeness of the ZW-Calculus). Even though completeness has been proven for several version of the ZX-Calculus, it would be interesting to have a normal form for them. We have already seen how graph states could be used to de ne a normal form for diagrams of ZX[ π 2 ]. In this Chapter, we are going to see how to de ne a normal form for any diagram of ∆ZX[F ] where F is a fragment that contains π 4 , or equivalently for any diagram of ZX[F ] that contains π 4 . is will particularly allow us to de ne a nice su cient condition for completeness with these fragments. We will then apply the results for several new fragments of the ZX-Calculus.

e Algebra of the Transistor

e normal forms will use some particular diagrams as building blocks. Particularly, we are going to use the transistor, that was introduced in Section 3.1. Recall that:

:= = -π 2 π 2 π 4 π 4 -π 4 -π 4
We can now diagrammatically prove the two sound equations: = and π = e second one comes from Lemma 3.6.13, while the rst one comes from:

Lemma 5.1.1. Remark 5.1.12. e diagram π can be seen as an AND gate (notice that when plugging kπ π , the result is k π , when k, ∈ {0, 1}). As such, it has been used previously to create the To oli gate. e previous two propositions where observed as tensor network transformations with AND gates in [START_REF] Biamonte | Categorical tensor network states[END_REF].

De nition 5.2.7 (Controlled Normal Form): Given a set S of controlled scalars, the diagrams in controlled normal form with respect to S (S-CNF) are inductively de ned as follows:

• ∀D ∈ S, D is in S-CNF;

• ∀D 0 , D 1 in S-CNF, D 0 … … … D 1 is in S-CNF. A diagram D in S-CNF is depicted D ••• .
One can double check that diagrams in controlled normal form are actually controlled states: if D : 1 → n is in S-CNF, D |0 = x∈{0,1} n |x (this is a consequence of Lemma 5.3.4, proven in the following).

We are now ready to give a de nition of diagrams in normal form, based on the diagrams in controlled normal forms:

Universality

While the main application of the notion of normal form is to prove completeness results (in the next sections), our rst application is to prove the universality of ∆ZX[F ] for any F ∈ F. First notice that the universality of ∆ZX[F ] can be reduced to the existence of an appropriate set of controlled scalars:

Lemma 5.2.9 (Su cient condition for universality).

Given F ∈ F, if ∃S ⊆ ∆ZX[F ] a set of controlled scalars such that the map η : S → Z[ 1 √ 2 , e iF ] = D → D |1 is surjective, then ∆ZX[F ] is universal, i.e. the functor ∆ZX[F ] . → Qubit Z[ 1 √ 2 ,e iF ] is full.
Proof It is easier to see this if we look at the interpretation of ZX-diagrams as matrices. η being surjective, for any x ∈ Z[ 1 √ 2 , e iF ], there exists D x ∈ S such that D x = 1 x . As pointed out, any diagram in S-CNF represents a quantum evolution of the form 1 ψ , where 1 is a column vector whose entries are all 1, and ψ is another column vector. Moreover, one can show that if D 0 = 1 ψ 0 and D 1 = 1 ψ 1 , then

D 0 … … … D 1 = 1 ψ 0 1 ψ 1
Hence, by induction, for any column vector ψ over Z[

, e iF ],
where some outputs wire are bent so as to become inputs (this procedure gives the S-NF form). eorem 5.2.10. For any

F ∈ F, ∆ZX[F ] is universal for Qubit Z[ 1 √ 2 ,e iF ] : ∀M ∈ Qubit Z[ 1 √ 2 ,e iF ] , ∃D ∈ ∆ZX[F ], D = M In other words, the functor ∆ZX[F ] . → Qubit Z[ 1 √ 2
,e iF ] is full.

Proof Let S ⊆ ∆ZX[F ] be the set of all controlled scalars. According to Lemma 5.2.9 it su ces to show that η :

S → Z[ 1 √ 2 , e iF ] is onto. Let x ∈ Z[ 1 √ 2 , e iF ],
there exist p ∈ N, α 0 , . . . , α k ∈ F , and P 0 . . . P k ∈ Z[X] such that x = 1 2 p k j=0 P j (e iα j ). Since Γ α j (P j ) encodes P j (e iα j ), encodes 1 2 and they can be added and multiplied according to Lemma 5.2.6, there exists a diagram D ∈ S such that D |1 = x.

A su cient condition for completeness

e controlled states give a generic internal structure for a diagram in normal form, by separating the coe cients of the process -i.e. controlled scalars intuitively accounting for the entries of the represented matrix -from the way they are combined. While the representation of the controlled scalars depends on the considered fragment, their combination is done in ∆ZX

[π].
Hence, all the sound operations on the structure of the normal forms should be doable using the ∆ + π rules. e completeness for broader fragments is then reduced to the capacity to apply elementary operations on coe cients: eorem 5.3.1 (Su cient condition for completeness). Given a fragment F ∈ F and an axiomatisation R, ∆ZX

[F ]/R is complete if R ∆π /4 and if ∃S ⊆ ZX[F ] a set of controlled scalars such that η : S → Z[ 1 √ following equations hold: ∀α ∈ F, ∀x, y ∈ Z[ 1 √ 2 , e iF ], α η -1 (e iα ) = = η -1 (x) η -1 (y) η -1 (xy) = η -1 (x) η -1 (y) η -1 (x+y) (Cond)
Before proving eorem 5.3.1, notice that all the above equations are involving diagrams with a single input and no output, thus for any fragment the completeness reduces to the completeness for diagrams with 1 input and no output, or equivalently -by bending the wires -to diagrams representing 1-qubit state preparations which have no input and a single output:

Corollary 5.3.2. For any fragment F ∈ F and axiomatisation R, ∆ZX[F ]/R is complete if and only if it is complete for 1-qubit state preparations, i.e. for all diagrams with no input and a single output.

Notice that thanks to the hypothesis of eorem 5.3.1, one can associate to any state

|ϕ : 0 → n ∈ Qubit Z[ 1 √ 2 ,e iF ] a diagram Λ(|ϕ ) in S-
Λ : n∈N Qubit Z[ 1 √ 2 ,e iF ] [0, n] → S-CNF and λ : n,m∈N Qubit Z[ 1 √ 2 ,e iF ] [n, m] → S-NF
be de ned as follows:

•

Λ(x) := η -1 (x) if x ∈ Z[ 1 √ 2 , e iF ],
•

Λ(|0 ⊗ |ψ 0 + |1 ⊗ |ψ 1 ) := Λ |ψ 0 • • • • • • • • • Λ |ψ 1 • λ    x∈{0,1} n y∈{0,1} m α x,y |y x|    := π D n ... ... m , where D = Λ    x∈{0,1} n y∈{0,1} m α x,y |x |y   
Notice that if the conditions (Cond) are met, the language proves that for any |ψ :

0 → n in S-CNF, Λ |ψ |0 = x∈{0,1} n |x : Lemma 5.3.4. ∆π /4 +(Cond) Λ |ψ • • • = • • • Proof First, let |ψ 0 and |ψ 1 : 0 → n ∈ Qubit Z[ 1 √ 2 ,e iF ] such that |ψ = |0 |ψ 0 + |1 |ψ 1 . en: Λ |ψ • • • = Λ |ψ 1 • • • • • • Λ |ψ 0 • • • = (CP) (S) (I) • • • Λ |ψ 1 Λ |ψ 0 • • • • • • = 5.1.11 Λ |ψ 0 • • • • • • Λ |ψ 1 • • • = (CP) • • • Λ |ψ 1 • • • Λ |ψ 0 • • • = Ind (S) • • •
It then remains to prove the result for the base cases Λx. Any x can be decomposed as a sum of e iα where αs are in the fragment. en:

Λe iα = α = (sα) = (
R = Λ0 , = Λ2 ,   = Λ 1 2   ,    -π 4 π 4 = Λ 1 √ 2    ,     -π 4 Λ -1 √ 2 π 4 = π     , Λ2 π = , Λ 1 √ 2 π = Proof Since R ZXπ /4 : R Λ0 = Λ(1-1) = π = (πdist) (CP) (S) π π = 3.6.5 R Λ2 = Λ(1+1) = = (CP) (S) (I) R = Λ 1 2 Λ2 = Λ 1 2 = 3.6.11 Λ 1 2 R -π 4 π 4 = 5.3.5 -π 4 π 4 = Λ 1 2 Λe i π 4 Λe -i π 4 = Λ e i π 4 +e -i π 4 2 = Λ 1 √ 2 R Λ2 π = π = 3.5.6 = (IV) (S) R Λ 1 √ 2 π = -π 4 π 4 π = (S) (K) π -π 4 π 2 = 3.8.3 π -π 4 π 4 π = (s+) = (IV)
e proof of eorem 5.3.1 consists in showing that any diagram can be transformed into a diagram in S-normal form. e proof is inductive: every generator of the language can be set in S-normal form, moreover both the parallel and sequential compositions of S-normal forms can be transformed into diagrams in S-normal form.

Preliminary Derivations

Proving that the compositions of two normal forms can be put in normal form will rely extensively on di erent lemmas that we will lay out in this section. We will explore here how the transistor interacts with the other generators of the language, with the triangle, and with other transistors.

is section only produces diagrammatic derivations. For the reader convenience, it ends at page 193.

Derivations of ∆ZX

First, we derive some supporting lemmas that do not use the transistor. Two of them (Lemmas 5.4.2 and 5.4.3) were proven to be derivable thanks to Corollary 4.2.2, but were not given an explicit derivation.

-α -β β = (S) (CP) -α β -β α = 5.4.2 α-β β -β = (S) (TW) α-β β -β = 5.4.2 β-α α -β = (CP) (S) α -β -α β en: ) a ( α -α ) b -β ( β = (I) (S)     a   b   β -β α -α =     b   a   β α -α -β = (S) (I) ( ) a ) b ( β α -α -β

Derivations using the Transistor

We derive here some equations on the transistor that will come in handy when we try to have transistors and triangles interact in the following.

• • • • • • = • • •
Let n be the number of triangles in the rst two diagrams.

• n = 0: e rst equality is (HL), the second is equivalent to the third, and already proven 3.6.6.

• n = 1: e rst equality is 3.6.9, the second is 3.5.4 and the third is 5.1.1.

• n = 2: e rst equality is given by Lemma 5.

Compositions of Normal Forms

We now use the results of Section 5.4 to prove that the compositions (spatial and sequential) of two diagrams in S-CNF can be put in S-CNF.

Proposition 5.5.1 (Permutation). For any |ψ : 0

→ n ∈ Qubit Z[ 1 √ 2 ,e iF ]
, and any permutation σ on n wires:

∆ π Λ |ψ σ • • • • • • = • • • Λ σ |ψ
Proof Any permutation can be decomposed in a sequence of adjacent transpositions, which in ZX translates as swaps σ. R

Λ |ψ • • • • • • = Λ |ψ 0 • • • Λ |ψ 1 • • • = • • • • • • Λ |ψ 0 • • • • • • Λ |ψ 1 • • • • • • • • • Λ |ψ =
Γ α k P k Γ α k P k ⊗ 4p . . . . . . = 3.6.12 Γ α k P k Γ α k P k ⊗ 2p . . . = (B) Γ α k P k Γ α k P k . . . ⊗ 2p = 5.4.17 Γ α k P k . . . ⊗ 2p
Hence:

R = Λx Λx Λx en: Λx Λx = Λx Λx = Λx = Λx • n ≥ 1: In this case, let |ψ = |0 |ψ 0 + |1 |ψ 1 , and • • • Λ |ψ Λ |ψ = 5.4.6 Λ |ψ 0 Λ |ψ 1 • • • Λ |ψ 1 Λ |ψ 0 π π π = 5.1.10 5.1.9 • • • π Λ |ψ 1 Λ |ψ 0 Λ |ψ 1 π Λ |ψ 0 π π π = 5.4.6 5.1.10 Λ |ψ 1 Λ |ψ 0 Λ |ψ 0 • • • π Λ |ψ 1 π π = 5.4.6 • • • Λ |ψ 0 Λ |ψ 1 Λ |ψ 0 Λ |ψ 1 = Ind Λ |ψ 0 • • • Λ |ψ 1 = (CP) (S) Λ |ψ 0 • • • Λ |ψ 1 = 5.1.11 (S) Λ |ψ 0 • • • Λ |ψ 1 = (S) (I) Λ |ψ • • • Proposition 5.5.3 (Tensor Product). For any |ψ 0 : 0 → n, |ψ 1 : 0 → m ∈ Qubit Z[ 1 √ 2 ,e iF ] , and any R such that R ∆ + π +(Cond): R • • • Λ |ψ 0 Λ |ψ 1 = • • • • • • Λ(|ψ 0 ⊗ |ψ 1 )
Proof By induction on the number of outputs of |ψ 0 and |ψ 1 :

• If both states are scalars, this case is handled by the condition in eorem 5.3.1.

• If one of the two states has at least one output -say |ψ 0 = |0 |ψ 00 + |1 |ψ 01 : ). For any D : 0 → n+2, and any R such that R ∆ π +(Cond):

• • • Λ |ψ 0 Λ |ψ 1 • • • = • • • Λ |ψ 00 Λ |ψ 01 Λ |ψ 1 • • • = 5.5.2 Λ |ψ 00 • • • Λ |ψ 01 • • • Λ |ψ 1 Λ |ψ 1 = • • • • • • Λ |ψ 1 Λ |ψ 01 Λ |ψ 1 Λ |ψ 00 = Ind Λ |ψ 00 |ψ 1 • • • Λ |ψ 01 |ψ 1 = Λ |ψ 0 |ψ 1 • • • Lemma
R Λ D • • • • • • • • • = Λ D • • • • • • • • • • • •
Proof By induction on the number n of outputs of |ψ .

• n = 2: First notice: Λa Λd which is in normal form.

• n ≥ 3: Using Proposition 5.5.1, we can impose to be applied on the two last wires.

en:

Λ |ψ • • • = Λ |ψ 0 • • • Λ |ψ 1 = (S) Λ |ψ 0 Λ |ψ 1 • • • Proposition 5.5.7 (R (1,0) Z
). For any diagram D : 0 → n + 1, and any R such that R

∆ π +(Cond): R • • • • • • = • • • Λ 1 2 • • • • • • Λ D Λ D
Proof By induction of the number n of wires of |ψ :

• n = 1: Let |ψ = a |0 + b |1 . en: Λ |ψ = Λb Λa = Λa Λb = (CP) Λa Λb = Λ 1 2 Λa+b = Λ a+b 2
• n ≥ 2: First, using Proposition 5.5.1 if needs be,

Λ |ψ • • • • • • = Λ |ψ • • • • • • = Λ |ψ • • • then, Λ |ψ • • • = Λ |ψ 00 Λ |ψ 11 Λ |ψ 01 Λ |ψ 10 • • • = 5.4.13 • • • Λ |ψ 01 Λ |ψ 10 Λ |ψ 11 Λ |ψ 00 Proposition 5.5.8 (Trace). For any diagram D : 0 → n + 1, and any R such that R ∆ π +(Cond): R Λ D • • • • • • • • • = • • • Λ D • • • • • • • • • π π Proof Λ D • • • • • • • • • π = (I) (S) • • • Λ D • • • π • • • = 5.5.6 • • • Λ D • • • • • • • • • π • • • = 5.5.7 • • • Λ 1 2 D • • • • • • • • • π = 5.3.6 (πdist) (CP) π • • • Λ 1 2 D • • • • • • • • • Λ2 = 5.5.3 • • • Λ D • • • • • • • • • π
Proposition 5.5.9. With the hypothesis of eorem 5.3.1, for any

D 0 , D 1 in S-NF, D 0 ⊗ D 1 can be transformed into a diagram in S-NF. Proof … D 2 … … … D 1 = π Λ D 1 … … … … π Λ D 2 = (CP) (πdist) (IV) … Λ D 2 … … … Λ D 1 π = 5.5.3 Λ |ψ … π … … … = 5.5.1 … π … Λ |ψ
Proposition 5.5.10. With the hypothesis of eorem 5.3.1, for any D 0 : n → m and

D 1 : m → k in S-NF, D 1 • D 0 : n → k can be transformed into a diagram in S-NF. Proof … D 2 … … D 1 = π Λ D 1 … … … π Λ D 2 = (CP) (πdist) (IV) … Λ D 2 … … Λ D 1 π = 5.5.3 … π Λ |ψ … = 5.5.8 … π … Λ |ψ
Proposition 5.5.11. With the hypothesis of eorem 5.3.1, each generator can be transformed into a diagram in S-NF.

Proof

We will prove the result for states, for the three-legged green dot, the Hadamard node and the empty diagram. All the other generators can be built from them and the Propositions 5.5.1, 5.5.3, 5.5.6, 5.5.8 and 5.5.7: First, notice that: Any green dot with arity larger than 3 can be decomposed as a 3-legged dots thanks to (S), and any red dot is a green dot with Hadamard gates on its adjacent wires. en, any diagram can be built from the states by simple topological transformations. E.g:

R = = Λ π , = = Λ π
In the next sections, we will consider several fragments of the ZX-calculus for which we will exhibit a diagrammatic representation of controlled states. For some fragments, the above equations are provable, implying the completeness of the ZX-calculus for these fragments. For other fragments, we will need the help of some additional axioms to prove the above equations, implying the completeness of a ZX-calculus augmented with these additional axioms.

Normal Forms with Arbitrary Angles

In the case of the general ZX-calculus, we know ( eorem 4.6.1) that the language is complete with the set of rules ZX (Figure 4.3). not provable with ZXπ /4 when n = 8p with p an odd prime number, implying the incompleteness of any fragment of rational angles which contains at least one angle of the form π 4p :

Lemma 5.7.1 (Incompleteness). For any F ∈ F Q \ F D , there exists an odd prime number p such that Γ π 4p (Φ 8p ) ∈ ZX[F ] and

ZXπ /4 Γ π 4p (Φ 8p ) = Proof
Let p be an odd prime number and an integer ≥ 1. e formula of the cyclotomic polynomial for a number with at most one odd prime factor gives: φ 8p (x) = Notice that a similar proof of incompleteness can be derived using cyclotomic supplementarity instead: For any F ∈ F Q \ F D , there exists an odd prime number p such that (SUP p ) is not provable in ZXπ /4 :

ZXπ /4 = α+ 2π p α+ p-1 p 2π α • • • pα+(p-1)π … (SUP p )
Hence the ZX-calculus needs to be completed to deal with rational angles. One possible way of doing this is to add the previous set of equations as axioms: Γ π 4p (Φ 8p ) = . is would translate as:

p π 4p =
with p prime and -as we will see in the following -would be enough for completeness. However, instead of adding one or several new equations, we propose to add a simple and very natural rule to ZXπ /4 , the cancellation rule which allows one to simplify non zero scalars:

with (-1) t z = (-1) r x + (-1) s y. e result for the sum immediately follows by induction (if 0 is involved, the result is obvious). For the product, rst, if P (X) = P (X) + Now, if p is still prime, the case of p k is handled with the equation φ p k (X) = φ p (X p k-1 ) which translates as:

ZXπ /4 Γ α φ p k = Γ α(p k -1) φ p =⇒ ZX Q Γ2rπ p k φ p k = Γ2rπ p φ p =
Finally, in the general case, let 8n = i p k i i with all p i primes. en, the polynomial φ 8n is φ 8n (X) = gcd

i φ p k i i (X p k i -1 i ) . By Bézout's identity, φ 8n (X) = i Q i (X)φ p k i i (X p k i -1 i )
where the Q i are some unitary polynomials. is translates as:

ZXπ /4 Γ α φ 8n = Γ α Q 1 Γ α φ p k 1 1 Γ α Q i Γ α φ p k i i • • • • • • • • •
Γ π 4n R
All in all, any controlled scalar in the form Λ π 4n P can be reduced to a diagram in S π 4n .

Lemma 5.7.11.

ZX Q α η -1 π 4n (e iα ) = , = η -1 π 4n (x) η -1 π 4n (y) η -1 π 4n (xy) ,       = η -1 π 4n (x) η -1 π 4n (y) η -1 π 4n (x+y)      
Proof e product is obvious when we have Lemmas 5.7.3 and 5.7.4. For the sum, let x = 1 2 p P (e i π 4n ), y = 1 2 q Q(e i π 4n ). W.l.o.g., assume p ≤ q. en:

ZX Q Λx Λy = Λ 1 2 p Λ 1 2 q Γ π 4n P Γ π 4n Q = 3.6.11 Λ 1 2 q Λ 1 2 q Λ2 q-p Γ π 4n Q Γ π 4n P
= 5.7.3 3.6.12 Λ 1 2 q Γ π 4n Q Γ π 4n 2 q-p P = 5.7.3

Λ 1 2 q Γ π 4n 2 q-p P +Q = 5.7.9

Λ(2 q-p P +Q)(e iπ 4n )

Λ 1 2 q = Λ(x + y)

e ante-penultimate diagram may not directly be in normal form, for there may be S such that 2 q-p P + Q = 2S, but this is dealt with with Lemma 5.7.9. eorem 5.7.12. e language ZX[ π 4n ]/ ZX Q is complete, the functor ZX[ Proof Let F be a subgroup of Qπ, and D 1 and D 2 be two diagrams of the fragment F , such that D 1 = D 2 . If F is nite, eorem 5.7.12 directly gives the result. Otherwise, there exists n ∈ N such that π 4n ∈ F and both diagrams are in the π 4n -fragment of the ZX-calculus. By completeness ( eorem 5.7.12):

ZX Q D 1 = D 2 .
e completeness for Qπ is obtained thanks to the meta-rule (Cancel). It can be bene cial to avoid second-order axioms like this one.

ankfully, it has been proven later on that the axiomatisation ZXπ /4 together with the family of axioms (SUP p ) made ,e iQπ ] is full and faithful.

Normal Forms with Dyadic Angles

In this section we focus on a particular case of dyadic angles, a subgroup of Dπ which contains π 4 (i.e. F ∈ F D ). In the previous section, we introduced the cancellation rule which makes the ZXπ /4 complete for rational angles.

Notice that, given a fragment F ∈ F, the cancellation rule can be derived from the other rules if for every α ∈ F , α = 0 mod π, there exists an inverse of α , i.e. a diagram D : 0 → 0 ∈ ZX[F ] s.t. D ⊗ α = 1, and moreover this equation is provable:

ZXπ /4 D ⊗ α =
. is is the case in any fragment of dyadic angles:

Normal Forms for Linear Diagrams

We show in this section that we can extend the results of universality and completeness to linear diagrams, and at no cost. We take F ∈ F an arbitrary fragment that contains We can then extend Λ to linear diagrams inductively as:

α → f j 1 ,...,j k e i j α + Q(e iα 1 , . . . , e iα k ) → Λf j1,...,j k

… … …

ΛQ(e i α )

j α
It is then routine to show that:

Λf |1 = Λ α → P (e iα 1 , . . . , e iα k ) |1 = α → P (e iα 1 , . . . , e iα k ) = f Fullness is not the only property that is preserved when extending to linear diagrams. We also have: One can then check that the compositions of normal forms are still valid with variables. Any diagram of ZX[ α, F ] can hence be put in normal form.

Notice that this result is a re nement of eorem 4.2.1, for here the "constant" diagrams of ZX[F ] need a normal form. However we see that in this case the notion of normal naturally extends to linear diagrams of the same fragment. Example 5.9.4. e quantum Fourier transform on n wires is in the π 2 n -fragment. e usual quantum circuit implementing it with the gate set (H, R Z (α), CNot) uses 3(n -2) occurrences of π 8 , 3(n-3) occurrences of π 16 , …, and 3 occurrences of π 2 n . In ZX-Calculus, the QFT can be represented with n -2 occurrences of π 2 n and zero occurrence of π 2 j with 3 ≤ j < n; or with exactly one occurrence of each π 2 j for 3 ≤ j ≤ n. One way to reduce the count of phases outside Cli ord+T, is to use the seemingly innocent Lemma 5.4.3: Doing this transformation inductively (together with (S) and (H)), we can get rid of all occurrences of α except one. We can then use the same process to remove all occurrences of 2α but one, etc…

Conclusion

In this thesis, we have provided axiomatisations for di erent fragments and extensions of the graphical language ZX-Calculus, used for quantum computing. For each axiomatisation, we proved its completeness, thanks to mainly two proof methods. e rst one is a transport of completeness from one language to another, using adequate systems of translations.

e starting point for this method is the completeness of two fragments of the ZW-Calculus, another graphical language for quantum computing in which there exists a nice notion of normal form.

e second method is precisely to de ne normal forms directly in the ZX-Calculus.

A problem related to that of completeness, and addressed for one of the axiomatisations is minimality. For most of the provided axiomatisation, it is as of now unclear whether all the rules are necessary, or if they can be simpli ed, although a great deal of work was made in order to provide the simplest axiomatisations possible. is question is all the more relevant for the two rules (BW) and (C) of ZXπ /4 . Now thanks to the completeness of the language, any reasoning can theoretically be performed inside the ZX-Calculus itself. However, some questions can still be hard to answer. We can now check whether two diagrams are equivalent by turning them into their normal forms. is is however not e cient, so it could be bene cial to nd invariants of the calculus. An obvious one is the number of input and output wires. Also, in any fragment that does not contain π 4 , there exists an invariant [START_REF] Jeandel | ZX-calculus: Cyclotomic supplementarity and incompleteness for Clif-ford+T quantum mechanics[END_REF]. Can we nd other invariants, ideally that work in any fragment? So far the strategies for simpli cation used for instance in [START_REF] Duncan | Verifying the smallest interesting colour code with quantomatic[END_REF] or [START_REF] Kissinger | Reducing T-count with the ZX-calculus[END_REF] do not use axioms outside ZXπ /2 . A research direction would hence be to nd such strategies, that for instance require (BW) or (C). More generally, it would be interesting now to nd applications of the ZX-Calculus that use the larger axiomatisations. I am currently working on an adaptation of sum-over-paths [START_REF] Ma Hew | Towards large-scale functional veri cation of universal quantum circuits[END_REF] for ZX-diagrams, with in mind the idea of seeing how a variable reduction in the sum-over-path formalism shows in the associated ZX-diagram.

In the proof of completeness of ZX/ ZX, we introduced the SVD form of cycle-free 0 → 1 and 1 → 1 ZX-diagrams. Although this was enough for the proof, since this form derives from the SVD decomposition of the underlying matrix, one could de nitely de ne the SVD form for any ZX-diagram. is could be an interesting alternative normal form, with practical applications. Still concerning the axiomatisation ZX, we have shown in the ZX-Calculus that adding a rule characterising one-qubit unitaries (EU) to a complete set of rules for the many-qubit Cli ord fragment (ZXπ /2 ) was enough to get the completeness in the unrestricted language. A natural question is now whether this is true for quantum circuits as well (we know a complete axiomatisation for Cli ord and (EU) can easily be expressed x + := α 1 +α 3 2 ; x -:= x +α 3 ; z := cos α 2 2 cos (x + ) + i sin α 2 2 cos (x -); z := cos α 2 2 sin (x + )i sin x + := α 1 +α 2 2 ; x -:= x +α 2 ; z :=sin (x + ) + i cos (x -); z := cos (x + )i sin (x -); Résumé Le ZX-Calculus est un langage graphique puissant et intuitif, issu de la théorie des catégories, et qui permet de raisonner et calculer en quantique. Les évolutions quantiques sont vues dans ce formalisme comme des graphes ouverts, ou diagrammes, qui peuvent être transformés localement selon un ensemble d'axiomes qui preservent le résultat du calcul. Un aspect des plus importants du langage est sa complétude : Étant donnés deux diagrammes qui représentent la même évolution quantique, puis-je transformer l'un en l'autre en utilisant seulement les règles graphiques permises par le langage ? Si c'est le cas, cela veut dire que le langage graphique capture entièrement la mécanique quantique.

β
Le langage est connu comme étant complet pour une sous-classe (ou fragment) particulière d'évolutions quantiques, appelée Cli ord. Malheureusement, celle-ci n'est pas universelle : on ne peut pas représenter, ni même approcher, certaines évolutions. Dans ce e thèse, nous proposons d'élargir l'ensemble d'axiomes pour obtenir la complétude pour des fragments plus grands du langage, qui en particulier sont approximativement universels, voire universels.

Pour ce faire, dans un premier temps nous utilisons la complétude d'un autre langage graphique et transportons ce résultat au ZX-Calculus. A n de simpli er ce e fastidieuse étape, nous introduisons un langage intermédiaire, intéressant en lui-même car il capture un fragment particulier mais universel de la mécanique quantique : To oli-Hadamard. Nous dé nissons ensuite la notion de diagramme linéaire, qui permet d'obtenir une preuve uniforme pour certains ensembles d'équations. Nous dé nissons également la notion de décomposition d'un diagramme en valeurs singuliaires, ce qui nous permet de nous épargner un grand nombre de calculs.

Dans un second temps, nous dé nissons une forme normale qui a le mérite d'exister pour une innité de fragments du langage, ainsi que pour le langage lui-même, sans restriction. Grâce à cela, nous reprouvons les résultats de complétude précédents, mais ce e fois sans utiliser de langage tiers, et nous en dérivons de nouveaux, pour d'autres fragments. Les états contrôlés, utilisés pour la dé nition de forme normale, s'avèrent en outre utiles pour réaliser des opérations non-triviales telles que la somme, le produit terme-à-terme, ou la concaténation.

Mots-clés: Mécanique antique Catégorique, ZX-Calculus, Complétude, Universalité, Formes Normales, CPM. Abstract e ZX-Calculus is a powerful and intuitive graphical language, based on category theory, that allows for quantum reasoning and computing.

antum evolutions are seen in this formalism as open graphs, or diagrams, that can be transformed locally according to a set of axioms that preserve the result of the computation. One of the most important aspects of language is its completeness: Given two diagrams that represent the same quantum evolution, can I transform one into the other using only the graphical rules allowed by the language? If this is the case, it means that the graphical language captures quantum mechanics entirely.

e language is known to be complete for a particular subclass (or fragment) of quantum evolutions, called Cli ord. Unfortunately, this one is not universal: we cannot represent, or even approach, certain quantum evolutions. In this thesis, we propose to extend the set of axioms to obtain completeness for larger fragments of the language, which in particular are approximately universal, or even universal.

To do this, we rst use the completeness of another graphical language and transport this result to the ZX-Calculus. In order to simplify this tedious step, we introduce an intermediate language, interesting in itself as it captures a particular but universal fragment of quantum mechanics: To oli-Hadamard. We then de ne the notion of a linear diagram, which provides a uniform proof for some sets of equations. We also de ne the notion of singular value decomposition of a diagram, which allows us to avoid a large number of calculations.

In a second step, we de ne a normal form that exists for an in nite number of fragments of the language, as well as for the language itself, without restriction. anks to this, we reprove the previous completeness results, but this time without using any third party language, and we derive new ones for other fragments.

e controlled states, used for the de nition of the normal form, are also useful for performing non-trivial operations such as sum, term-to-term product, or concatenation.

Keywords: Categorical

antum Mechanics, ZX-Calculus, Completeness, Universality, Normal Forms, CPM.

  antum States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Composite Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Observables and Measurements . . . . . . . . . . . . . . . . . . . . . . . 1.5 Non-Isolated Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Pure antum Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7 Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Categorical antum Mechanics 2.1 Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Functors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 PROPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Monoids, Comonoids, and their Interactions . . . . . . . . . . . . .

  m M † m M m = id e index m in M m refers to the measurement outcome that may occur in the experiment. If the state of the quantum system is |ψ before the measurement then the probability that result m occurs is given by p(m) = ψ| M † m M m |ψ and the state collapses to M m |ψ p(m) Notice that the operators M † m M m are observables, since (M † m M m ) † = M † m M m . Example 1.4.5. Consider the measurement of the state |ψ = α |0 + β |1 in the computational basis (|0 , |1 ), i.e. with the measurement operators M 0 |0 0| and M 1 = |1 1|.

  where 0 (dα-k)×k is the zero matrix of dimension (d α -k) × k, and A k and B k are not important. Hence, e T 0 M k = e T k where e k is the vector where the sole non null component is component k, which is 1. Let us denote θ the vector θ := dα-1 k=0 α k e k . 1.7. Encoding en, for all x = dα-1 k=0

  • e operator . • . maps any pair of arrows (B g → C, A f → B) (notice that the domain of g and the codomain of f coincide) to a third arrow g • f : A → C called their composite.

  De nition 2.1.4 (Product Category): Let C and D be two categories. e product category C × D is the category where: • Objects are ordered pairs (A, B) with A an object of C and B an object of D.

  If A, B and C are sets in the category Set, let us de ne the relation R as: ∀b ∈ B, c ∈ C, bR c if ∃a ∈ A, (b = f (a)) ∧ (c = g(a)) and let R be the smallest equivalence relation containing R (i.e. its transitive closure). en, B A C can be taken to be the disjoint union of B and C, where b ∈ B and c ∈ C are identi ed if bRc.

=

  A B in general. When it does, we are precisely in the case of a symmetric monoidal category. In this case, σ A,B is represented by

  In string diagrams representation, if s (n,m) is represented by n

  De nition 2.5.2 (Qudit, Qubit): For a xed d, Qudit is the subcategory of FdHilb restricted to objects of the form C d k with k ∈ N. When d = 2, the category is denoted Qubit. ese are of course subcategories of FdHilb. Proposition 2.5.3. Qudit is a †-compact PROP. Proof e objects of the category are C d k for k ∈ N. We denote k := C d k , so that n + m can be seen as C d n ⊗ C d m . Hence, the objects can be seen as generated by C d . Let us also denote B

•

  De nition 2.7.5 (ZX-Calculus): e qubit ZX-Calculus, or ZX, is a †-compact graphical language that represents Qubit, with the following set of generators and their string-diagram representation: • R (n,m) Z (α) : n → m :: n H : 1 → 1 ::

Figure 2 . 1 :

 21 Figure 2.1: Set of rules ZXπ /2 for the Cli ord fragment of the ZX-Calculus. e righthand side of (IV) is an empty diagram. (…) denotes zero or more wires, while ( • • • ) denotes one or more wires.

Figure 2 . 2 :

 22 Figure 2.2: Lemmas and their dependencies. 1 represents any non-empty diagram such that 1 = 1. (S), (B), (I) and (H) are assumed.

•

  (S), (K), (CP), (s+), (IV), (sπ) (sα):

Figure 2 Figure 2

 22 Figure 2.3: Set of rules ZW R for the ZW-Calculus over the ring R. r, s ∈ R.

  π 4 ]. is time, since the la er is more expressive than the former, one of the interpretations will need an encoding of what ZX[ π 4 ] can express into what ∆ZX[π] can express.

ππ

  One diagram can be seen as a representation of Λ(|0 0|). We may denote it::=Another very interesting construction that uses the triangle is the following:

  m) X (α) : n → m :: n ... ... m α • H : 1 → 1 :: • ∆ : 1 → 1 :: e PROP structure is provided by σ : 2 → 2 ::

  the semantics: Proposition 3.4.2. e following diagram commutes:

  |+ ). Noticing that π represents the AND gate, this gives us:

Figure 3

 3 Figure 3.1: Set of rules ∆ π for the ZX-Calculus with triangles. e right-hand side of (IV) is an empty diagram. (…) denotes zero or more wires, while ( • • • ) denotes one or more wires. α, β ∈ R.

= π ese will be

  useful in the derivation of other ∆ZX-speci c lemmas:

  Proof of Prop. 3.6.1 (ctd.)1a: anks to Lemma 3.4.1 and rule (4b ), the rule can be reduced to showing that

=←

  Proof of Prop. 3.6.1 (ctd.) 5a: We will need a few steps to prove this equality.is was the last equality of ZW1 / √ 2 to derive. We hence have proven the result.

Figure 3 . 2 :

 32 Figure 3.2: Set of rules ZXπ /4 for the Cli ord+T fragment of the ZX-Calculus.

  rules proves any equality of ∆ZX[π]/ ∆ π . Proposition 3.8.2. For any ∆ZX[π]-diagrams D 1 and D 2 ,

π

  Proof of Prop. 3.8.2 (ctd.) (HT): First:

i π 4 ]

 4 , to ∆ZX[π], which represents morphisms of 1 √ 2

  seen as ΛM i.e., to represent it, we need to control the previous diagram. is can be performed using the transistor:π = π

  so nally by Proposition 3.10.1, ZXπ /4 D 1 = D 2 . • Fullness: Let f ∈ Qubit D[e i π 4 ] . e morphism ψf is in Qubit D . By fullness of ∆ZX[π]

0

 0 Example 4.1.4. Consider the following equation: e multiplicity of α is µ α = 2 and β's is µ β = 3. Proposition 4.1.5. For any two diagrams D 1 , D2 : n → m of ∆ZX[α, F ], there exist D 1 , D 2 : r → n + m two ∆ZX[F ]-diagrams such that the equivalence D 1 = D 2 ⇐⇒ D 1 • θ r = D 2 • θ ris provable using the axioms of ZX π +(K), where r is the multiplicity of α in D 1 = D 2 , andθ r := R in transforming the equation D 1 = D 2 into the equivalent equation D 1 • θ r = D 1 • θ rusing axioms of ZX π +(K). is transformation involves 6 steps:

Figure 4 . 1 :

 41 Figure 4.1: Set of rules ∆ + π . e right-hand side of (IV) is an empty diagram. (…) denote zero or more wires, while ( • • • ) denote one or more wires.

Proposition 4.2. 3 .

 3 For any word x ∈ {0, 1} r , P r t | x = 1 | x| 1 0 r-| x| 1 where | x| 1 is the Hamming weight of x i.e. the number of symbol 1 in the word x.

Figure 4

 4 Figure 4.2: Set of rules ∆π /4 . e right-hand side of (E) is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires.

  eorem 4.3.1. e language ∆ZX[ α, π 4 ]/ ∆π /4 is complete, i.e. the functor:

  Considering a nite set of angles eorem 4.5.3. For any ZX[ α, π 4

  eorem 4.5.7. For any ZX[ α, π 4 ]-diagrams D 1 , D 2 : r → n and symmetric ZX[ β, π 4 ]diagram D : 0 → r, if ZXπ /4 D 1 • θ r 0 = D 2 • θ r 0 then ZXπ /4 D 1 • D = D 2 • D i.e., pictorially:

  of dimension at most r + 1. Moreover, for any α ∈ R, θ r 0 (α) ∈ S, so S ⊆ S r 0 := span{ θ r 0 (α) | α ∈ R}. Since S r is of dimension r +1 (see proof of Lemma 4.2.6), S = S r . As a consequence ∀ β, D( β) ∈ S r , so P r 0 • D = D , since, according to Lemma 4.2.5 P r • θ r 0 = θ r 0 . us, ZXπ /4 P r 0 • D thanks to eorem 4.4.1.

Figure 4 . 3 :

 43 Figure 4.3: Set of rules ZX for the ZX-Calculus with scalars.e right-hand side of (E) is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires. In rule (EU), β 1 , β 2 , β 3 and γ can be determined as follows: x + := α 1 +α 3

π

  As a result: Proposition 4.6.6. For any diagrams D 1 , D 2 of ZX[ π 2 ]:D 1 = D 2 ⇐⇒ ZX D 1 = D 2 4.7 Singular-Value Decomposition e next step is logically to get the completeness for Cli ord+T quantum mechanics, i.e. for ZX[ π 4

  where β 1 , β 2 , β 3 , γ can be determined as in rule (EU).

2

  where β 1 , β 2 , β 3 , γ can be determined as in rule (EU) with α 2 ← π 2 .

  3 and 4.7.4.So far, we have proven all the rules of ZXπ /4 except (C) and (BW). For the rest, we present the singular-value decomposition of a matrix, and introduce it to ZX-diagrams.De nition 4.7.7 (Singular Value Decomposition): A singular value decomposition (SVD) of a matrix is a decomposition of the formM = U ΣV †

  De nition 4.7.9 (Cycle-Free Diagram): A cycle-free diagram is a diagram composed only of , , where n ∈ N and α ∈ R.

  (n,1) Z (α) can be obtained by composition of R Z (α) and R (2,1) Z (α); and R (n,1) X (α) can be obtained by composition of R (n,1) Z (α) and H. Proposition 4.7.12 (SVDs of states are essentially unique). If D 1 = α1 β1 s 1 and D 2 = α2 β2 s 2 are in SVD, and if D 1 = D 2 = 0, then either:

  Proposition 4.7.15 (1 → 1 SVDs are essentially unique). , and that D 1 = D 2 = 0.

=

  Corollary 4.7.20. If α = π mod 2π: max (0,log 2 (1+ cos (α)) -2) γ := arccos 1 2 n+1 (1+cos(α)) .

r

  round is slightly less straightforward, because of the ring structure of the ZW-Calculus: how to represent n in ZX? First of all, notice that if we nd a 1-qubit state D such that D

  m

→→

  en, by composition, since ZW[C]/ ZW C . Qubit is full and faithful, the functor ZX/ ZX . Qubit = [.] W is full and faithful.

  De nition 4.10.2 (Environment Structure): An environment structure for a †-compact PROP C is an compact closed PROP C with an i.o.o. PROP-functor ι : C → C and a morphism : 1 → 0 such that:

Proof

  Lemma 4.10.8. Let C be a †-PROP. For all f : n → m ∈ C , there exist k ∈ N and f : n → m + k ∈ C such that ι (f ) Let us reason diagrammatically. Using the axioms of PROP f is equivalent to a diagram of C where all the discards have been pushed to the bo om right: discards among the components of the part f of this diagram. So it represents a morphism in the range of ι and then there is an f

Figure 4 . 5 :

 45 Figure 4.5: Set of rules ZX for the ZX-Calculus for CPMs.e right-hand side of ( IV) is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires. In rule (EU), β 1 , β 2 , β 3 and γ can be determined as follows: x + := α 1 +α 3

  eorem 4.10.20. ZX / ZX is complete. e functor ZX / ZX . → CPM(Qubit) is full and faithful.

Figure 4 . 6 :

 46 Figure 4.6: Set of rules ZX π /2 for the Cli ord fragment of the ZX-Calculus for CPMs. e right-hand side of ( IV) is an empty diagram. (…) denote zero or more wires, while (…) denote one or more wires.

  eorem

Figure 4 . 7 :

 47 Figure 4.7: Choice of ZX-diagram in the antum Pseudo-Telepathy winning strategy.

  the Not gate on the control wire reacts interestingly with the generators of the ZX-Calculus: Proposition 5.1.2. π , π forms a commutative monoid: Proof of Prop. 5.1.2 e three equations can be obtained by: • (S) and Lemma 5.1Proof of Prop. 5.1.3 e four equations can be obtained by: • (sπ) +(IV) • (πdist) +(IV) +(CP) • Lemma 5.1.11 and (CP) +(sπ) • (πdist) and Lemma 5.1.10

m

  De nition 5.2.8 (Normal Form): Given a set S of controlled scalars, for any n, m ∈ N, and any D : 1 → n + m in S-CNF, is in normal form with respect to S (S-NF).

  CNF, and to any evolutionf : n → m ∈ Qubit Z[ 1 √ 2 ,e iF ] ,a diagram λ(f ) in S-NF: De nition 5.3.3: With the hypothesis of eorem 5.3.1, let

  the conditions (Cond) are met, then some control scalars can obviously be derived, thanks to the following lemma: Lemma 5.3.5. Lemma 5.3.6. With R a set of axioms such that R ∆π /4 +(Cond):

  4.4: First, if a = 1 = b:

  α

  Interactions of Transistors and ∆Finally, we show how the transistor interact with other diagrams of the language.

  can derive the whole following family of equations: Lemma 5.4.19.

  Suppose we have the result for n -1 and n = 2. en: is used for the two other equalities.

Proof

  By induction on the number n of outputs of |ψ :• n = 0 : Let x ∈ Z[ 1 √ 2 , e iF ].ere exist p, α = (α k ) k and P = (P k ) k such that x = 1 2 p k P (e iα k ). e conditions for eorem 5.3.1 imply that:

  |ψ = a |00 + b |01 + c |10 + |11 :

p

  Since p and 4 are coprime, there exists k such that kp π 4 = π 4 . Let us then consider the interpretation[.] kp which multiplies all the angles by kp:D 1 ⊗ D 2 → [D 1 ] kp ⊗[D 2 ] kp , D 1 • D 2 → [D 1 ] kp • [D 2 ] kp , R Id otherwise.It is routine to show that the rules of ZXπ /4 hold under this interpretation, but:

(- 1 )Γ α φ 1

 11 b aX k : -1) c X ×0) en, if Q is non-null: 1) b X k P = Γ π 4n P Q +(-1) b X k P . . . Γ π 4n (-1) b X k P = Γ π 4n P Q +(-1) b aX k P = Γ π 4n P Qand if Q = 0, the result is obvious. Now, thanks to the new rule (Cancel) together with the previous lemma, we get:Proposition 5.7.4. For any n > 0,ZX Q Γ π 4n (Φ 8n ) =206Proof First of all, we can easily derive for any N :Now, assume p is prime. en, φ 1 (X)φ d (X) = d|p φ d (X) = X p -1. Since sums and products of control polynomials are derivable in ZX (Lemma 5.7.3), it means:

  5.7.3, we can derive the controlled version of the Euclidean division (DIV). Combined with Lemma 5.7.4, we get, assuming P = Qφ 8n + R:

  ZX[Qπ] complete [Jea18]. eorem 5.7.14 ([Jea18]). e functor ZX[Qπ]/ ZXπ /4 +(SUP p ) . → Qubit Z[ 1 √ 2

Proof

  Lemma 5.8.1. For any n ≥ 1, and anyk ∈ {-2 n + 1, • • • , 2 n+1 -1}, kπ 2 n has an inverse. ere exist 0 ≤ m < n and p ∈ Z such that: If k ∈ {-2 n + 1, • • • , 2 n+1 -1}, then there exist 0 ≤ m < n and p ∈ Z such that k = 2 m (2p -1)i.e. kπ2 n = 2p-1 2 n-m π where 2 n-m ≥ 2. en:

π 4 .

 4 e standard interpretation is a functor . :ZX[F ] → Qubit Z[ 1 2 ,e iF ] ,which is full by eorem 5.2.10. Recall that when extending ZX-diagrams to linear diagrams, the interpretation became . :ZX[ α, F ] → Qubit R k Z[ 1 2 ,e iF ] where: Qubit R k Z[ 1 2 ,e iF ] = α → P (e iα 1 , . . . , e iα k ) P ∈ Qubit Z[ 1 2 ,e iF ] [X 1 , . .. , X k ]We can now easily show that this functor is full. eorem 5.9.1. For anyF ∈ F, ZX[ α, F ] is universal for Qubit R k Z[ 1 2 ,e iF ] : ∀f ∈ Qubit R k Z[ 1 2 ,e iF ] , ∃D ∈ ZX[ α, F ], D = f In other words, the functor ZX[ α, F ] . → Qubit R k

  eorem 5.9.2. Let F ∈ F. If there exists S ⊆ ZX[F ] a set of controlled scalars such that the map η :S → Z[ 1 2 , e iF ] = D → D |1 is bijective, if R ZXπ /4 +(Cond), then ZX[ α, F ]/R is complete i.e. the functor ZX[ α, F ]/R . → Qubit R k Z[ 1 2 ,e iF ] is faithful. Proof Let x ∈ Qubit R k Z[ 1 2 ,e iF ] [0, 0]. ere exists P ∈ Z[ 1 2 , e iF ][X 1 , .. . , X k ] such that x = α → P (e iα 1 , . . . , e iα k ). Since η is surjective, we can de ne inductively Λx:α → x j 1 ,...,j k e i j α + Q(e iα 1 , . . . , e iα k ) → η -1 x j1,...,j k ΛQ(e i α ) j αNotice that any ambiguity can be li ed by imposing an ordering on the powers in Q, or diagrammatically thanks to = . We can then de neS α := {Λx | x ∈ Qubit R k Z[ 1 2 ,e iF ] [0, 0]}.We can then notice that the map η α :S α → Qubit R k Z[ 1 2 ,e iF ] [0, 0] = D → D |1is bijective by uniqueness of P in x = α → P (e iα 1 , . . . , e iα k ).

FactoringLetF

  ∈ F, and let f ∈ Qubit R Z[ 1 2 ,e iF ] , i.e. f has only one variable. Every entry of f is of the form of P (e iα ) where P is a polynomial with coe cients in Z[ 1 2 , e iF ]. f can actually be seen asf = f k e ikα with f k ∈ Qubit Z[ 1 2 ,e iF ] .We can naturally de ne a notion of degree of α in f , d α (f ), as the largest value of k for which f k = 0. en, we can build a ZX[α, F ]-diagram that represents f using only d α occurrences of α.Proposition 5.9.3. Let F ∈ F, andf ∈ Qubit R Z[ 1 Proof Let f : 0 → n ∈ Qubit R Z[ 1 2 ,e iF ] . ere exist f k ∈ Qubit Z[ 1 2 ,e iF ] such that f = f k e ikα .We can build a diagram that represents their controlled version Λf k . ese diagrams are in in ZX[F ]. We de ne D 1 and D 2 as: Both diagrams use the sum of controlled scalars. D 2 directly represents f k e ikα , while D 1 represents the Horner expansion f = f 0 + e iα (f 1 + e iα (. . .)). Notice that we can easily transform one into the other using Lemma 5.4.2.

  Hence it represents the control of the phase α. While this is usually obtained thanks to the half phase α 2 ( rst diagram), it can be done with one occurrence of α and a diagram of ZX[ π 4 ] (actually of ∆ZX[π]). anks to this, we can create a diagram that given an angle α copies α while only using angles in π 4 Z ∪ {2α}:

α 2 2

 2 sin (x -);β 1 = arg z + arg z; β 2 = 2 arg i + z z ; β 3 = arg zarg z ; γ = x +arg(z) + α 2 -β 2 2 ;

  1 = arg z + arg z ; β 2 = 2 arg i + z z ; β 3 = arg zarg z ; γ = x +arg(z) + π-β 2 ∀α = π mod 2π, ZXπ /4 D 1 ⊗ α = D 2 ⊗ α =⇒

=

  Lemma 5.1.5.

=

  . . . 2.5 PROPs for antum Mechanics . . . . . . . . . . . . . . . . . . . . . . . 2.6 Universality and Completeness . . . . . . . . . . . . . . . . . . . . . . . . 2.7 e ZX-Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8 e GHZ/W-Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

	II ZX-Calculus
	3 Cli ord+T
	3.1

e Triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 e ZW1 / √ 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 e ∆ZX-Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 From ∆ZX[π] to ZW1 / √ 2 and Back . . . . . . . . . . . . . . . . . . . . .

  It is possible to trace out only part of the system. If H = H A ⊗ B ⊗ C , then tr B is de ned on H as id A ⊗ tr ⊗ id C where id A and id C are identities in respectively A and C. tr B traces out the subsystem B. It is called partial trace[START_REF] Nielsen | antum Computation and antum Information: 10th Anniversary Edition[END_REF].Given a mixed state, it is always possible to see it a pure state that underwent a partial trace. eorem 1.5.4 (Puri cation). Let ρ : H A → H A be a mixed state. en, there exists a Hilbert space H B and a pure state |ψ ∈ H A ⊗ B such that ρ = tr B (|ψ ψ|). We say that |ψ puri es ρ.

	1.6. Pure	antum Circuits

  shows how the gate set (To oli, H), which can only represent real quantum evolutions, can have encoded approximate universality.

	Chapter 2
	Categorical	antum Mechanics
	Categorical antum Mechanics was introduced in 2004 by Samson Abramsky and Bob Coecke [AC04,

  we can recover the de nition of bialgebra by means of morphism of

	monoids. Indeed, stating that	is a morphism of monoids between	,	and
	,	gives	=		and	=		; while stating that	is a
	morphism of comonoids between	,	and	,	gives	=	and
	=	. We can recover the last axiom by stating that	is a morphism of
	monoids between	,	and	,	.

  Qubit is faithful. e proof uses a particular notion of states, known as graph states[START_REF] Ma Hew | Graphical description of the action of cli ord operators on stabilizer states[END_REF].Any graph state can be represented by a graph G := (V, E) where V is the set of vertices and E the set of edges of G. Each vertex represents a qubit initialised in |+ , and each edge between vertices v 1 and v 2 represents a CZ applied on the two qubits represented by v 1 and v 2 . We denote the resulting state |G .Sketch of ProofFirst, thank to the map/state duality, one can consider only the states in ZX[ π 2 ]. e graph states have a nice interpretation in ZX. If G := (V, E) is a graph, we can build a ZX-diagram D G as follows:

	2.7.	e ZX-Calculus
	• |+ • Swap : • CZ : (-1) ij |ij ij| |ji ij|
	denotes one or more wires.	• • • )
	eorem 2.7.9 (Cli ord ZX). e language ZX[ π 2 ]/ ZXπ /2 is complete, i.e. the functor . : ZX[ π 2 ]/ ZXπ /2 → De nition 2.7.10 (Graph States): e set of graph states is a set of particular sta-biliser states generated by

  It su ces to use the map/state duality to get them, e.g.: Concerning the GHZ state, notice that it yields an already known multiplication, represented : µ := |0 00| + |1 11| a er map/state duality. Together with υ := |0 + |1 , represented , it forms a †-Frobenius monoid. It also has diagonal morphisms of the form s(|0 0| + r |1 1|). We ignore the global scalar s, and only give a generator for |0 0| + r |1 1| that we identify with r. is leads to an extended spider of the form:

	:=	where	represents the W state, and	represents the projector
	00| + 11|.

n ... ... m r

  Let us see how to build in ZX a diagram D t that represents t, i.e. D t = t. Notice that t |0 = |0 and that t |1 = |0 + |1 = √ 2 |+ . Let us ignore the factor √ 2 for now. t acts as if it applied the Hadamard gate on a |0 state depending on the value of the input. Diagrammatically, t operates as:

	e controlled H gate ΛH can simply be expressed in ZX[ π 4 ]:
	ΛH	|0 controlled H

  the form 1 Qubit Z , while preserving the completeness property. Since . : ZW → Qubit Z is full, all we have to do to allow the ZW-Calculus to represent any morphism of 1

	√	2
		√	2

p f with f ∈ N Qubit Z is to add a scalar generator worth 1 / √ 2. n copies of this generator provide a representation of 1 / √ 2 n .

  π 4 ] complete. It remains to show that one can recover any ZX[ π 4 ]-diagram D from [[D] ∆ ] T thanks to the decoding Θ.

	Proposition 3.10.1. For any ZX[ π 4 ]-diagram D:

  is the identity for all generators except , and in this case we just proved ι [ ] T = . As a consequence ∆π /4 D 1 = D 2 , so ∆ZX[ π 4 ]/ ∆π /4 is complete. By eorem 4.2.1, ∆ZX[ α, π 4 ]/ ∆π /4 is complete.

	ZX α,	π 4	/ ZXπ /4	.

4.4 ZX Beyond Cli ord+T

Now that we have proven the completeness result for ∆ZX beyond To oli-Hadamard, we can derive a similar one for the ZX-Calculus. eorem 4.4.1. e language ZX[ α, π 4 ]/ ZXπ /4 is complete, i.e. the functor

  application of this theorem is: Corollary 4.10.18. (ZX/ ZX) is a universal complete language for CPM(Qubit). Particularly, the functor (ZX/ ZX)

	4.10. ZX-Calculus for Completely Positive Maps
	is is because ZX/ ZX
	163

.

→ CPM(Qubit) is full and faithful.

.

  we just have deleted isometries. So, by transitivity, to prove d 1 ∼ + iso d 2 we just have to show A 1 ∼ iso A 2 . But since d 1 ∼ cp d 2 in Stab we also have d 1 ∼ cp d 2 in Qubit and so by Lemma 4.10.14, d 1 ∼ + iso d 2 in Qubit. By transitivity A 1 ∼ + iso A 2 in Qubit and so by Lemma 4.10.14 A 1 ∼ iso A 1 in Qubit. So there are two unitaries u and v such that

  4.10.24. ZX [ π 2 ]/ ZX π /2 is complete for CPM(Stab). e functor:

	ZX [	π 2	]/ ZX π /2	. → CPM(Stab)
	is full and faithful.
	Proof ZXπ /2 : the only missing axiom is (IV) which is derivable (Figure 2.2). Stab is spanned We can prove that ZX [ π 2 ]/ ZX π /2 (ZX[ π 2 ]/ ZXπ /2 ) . First, we can recover by ( √ 2, i, |0 , 0|, H, R Z ( π 2 ), CNot). Notice in particular that e i π 4 is in Stab: e i π 4 = √ 2 0| HR Z ( π 2 )H |0 . One can actually show that all the scalars s : 0 → 0 ∈ Stab are in { √ 2 n e i mπ 4 | n, m ∈ Z} [Bac15]. By Proposition 4.10.23, Stab has enough isometries, they are spanned by (e i π 4 , |0 , H, R Z ( π 2 ), CNot). ese can be represented in ZX[ π 2 ] by:
	π 2 ,	, ,	π 2 ,
	By completeness of ZX[ π 2 ]/ ZXπ /2 , any diagram of ZX[ π 2

  If |ψ is a state on 0 or 1 qubit, the only permutation allowed is the identity. Otherwise, let |ψ = |0 |ψ 0 +|1 |ψ 1 = |00 |ψ 00 +|01 |ψ 01 + |10 |ψ 10 + |11 |ψ 11 . If the rst wire is not a ected by the swap:

  4n ] is full and faithful. Moreover, any ZX[ π 4n ]-diagram can be put into a normal form with respect to S π 4n . Corollary 5.7.13. For any F ∈ F Q ( nite or not), the language ZX[F ]/ ZX Q is complete, the functor ZX[F ]/ ZX Q . ,e iF ] is faithful. Moreover, any ZX[F ]-diagram can be put into a normal form with respect to S F :=

	Proof	By application of eorem 5.3.1.
				→ Qubit Z[ 1 √ 2
	π 4n ∈F	S π 4n .
	Qubit	Z[ 1 √ 2	,e i π	π 4n ]/ ZX Q	. →

  eorem 5.8.2. For any n ≥ 2, the language ZX[ π 2 n ]/ ZXπ /4 is complete, the functor ZX[ π 2 n ]/ ZXπ /4 . ] is full and faithful. Any ZX[ π 2 n ]-diagram can be put into a normal form with respect to S π 2 n = S π 4×2 n-2 . Corollary 5.8.3. For any F ∈ F D ( nite or not), the language ZX[F ]/ ZXπ /4 is complete, the functor ZX[F ]/ ZXπ /4 . ,e iF ] is faithful. Any ZX[F ]-diagram can be put into a normal form with respect to S F := Proof e proof is the same as that of Corollary 5.7.13, except we use the completeness of ZX[ π 2 n ]/ ZXπ /4 ( eorem 5.8.2).

	→ Qubit Z[ 1 √ 2 2 n → Qubit Z[ 1 ,e i π √ 2	π 2 n ∈F	S π 2 n .

  Z[ 1 2 ,e iF ] is full. Proof By map/state duality, we can w.l.o.g. restrict ourselves to states. Let f : 0 → n ∈ Qubit R k Z[ 1 2 ,e iF ] . en, there exists P a multivariate polynomial on k variables with coe cients in Qubit Z[ 1 2 ,e iF ] such that f = α → P (e iα 1 , . . . , e iα k ). Every element of Z[ 1 2 , e iF ] can be controlled, so using construction Λ of De nition 5.3.3, we can build Λg for every g ∈ Qubit Z[ 1 2 ,e iF ] , hence every coe cient of P can be associated with a diagram that controls it.

] → ∆ZX[π] such that [.] ∆ = ψ( . ), i.e., the interpretation [.] ∆ should map a diagram of ZX[ π 4 ] to a ∆ZX[π]-diagram, while at the same time performing the encoding ψ for their standard interpretation.

] .

, e iF ] = D → D |1 is bijective, and the

,e iF ] . Let d α be the degree of the variable α in f . ere exists a ZX[α, F ]-diagram D 1 with d α occurrences of α and no occurrence of kα for k > 1, such that D 1 = f . ere also exists a ZX[α, F ]-diagram D 2 with at most one occurrence of kα for each k ∈ {1, . . . , d α } such that D 2 = f .

Remerciements

Proof of Proposition 2.6.10

Clifford+T has the same objects as Qubit

Controlled States and Normal Forms

In this section, we build our way up to the de nition of a normal form. We do it in such a way that its structure is the same for all fragments of ∆ZX that contain π.

De nition 5.2.1: We denote by F the set of all fragments that contain π 4 :

Controlled States

e cornerstone of the normal form is the controlled state. Controlled states form a particular family of ∆ZX-diagrams with a single input and n outputs. A controlled state with no output is called a controlled scalar:

For instance is a controlled scalar encoding 1 2 :

We introduce other examples of controlled scalars, parameterised by integer polynomials:

De nition 5.2.4: For any F ∈ F and any α ∈ F , let Γ α : Z[X] → ∆ZX[F ] be the map which associates to any polynomial P a ∆ZX-diagram Γ α (P ) : 1 → 0, inductively de ned as

For any integer polynomial P , the corresponding diagram Γ α (P ) is a controlled scalar encoding the scalar P (e iα ): Lemma 5.2.5. ∀F ∈ F, ∀α ∈ F , and

Proof By induction. First, notice that Γ α (0) = 1 0 . en: a bπ+kα bπ-kα

is de nition can easily be extended to represent any multivariate polynomial in P (e i α ) := P (e iα 1 , . . . , e iα k ) with coe cients in Z. Indeed, P (e i α ) can be wri en as (-1) b j 1 ,...,j k a j 1 ,...,j k e i(j 1 α 1 +...+j k α k ) , where a j 1 ,...,j k ∈ N. We hence de ne inductively Γ α thanks to:

where b j stands for b j 1 ,...,j k , a j for a j 1 ,...,j k , and j α for j 1 α 1 + . . . + j k α k . Notice that a er building this diagram, some of the variables may be evaluated to particular values. is way, given a fragment F ∈ F, any multivariate polynomial with constants in Z[e iF ] can be controlled. While it is not obvious in the ZX-Calculus to add two given diagrams (i.e. build a third diagram whose interpretation is the sum of the two rsts'), a fundamental property of controlled states is that they can be freely added and multiplied (according to the entrywise product a.k.a. the Hadamard product or Schur product) as follows:

Lemma 5.2.6 (Sum and Product). For any controlled states D 0 , D 1 : 1 → n,

are controlled states such that:

where . • . is the entrywise product.

Proof is is routine to show.

Normal Form

Amongst the family of controlled state diagrams, we de ne those that are in normal form. Our de nition of normal form is generic in the sense that it is de ned with respect to a given set of controlled scalars. Intuitively the choice of these controlled scalars depends on the considered fragment of the language, as detailed in the next sections.

De nition 5.6.1: Let Λ R : C → ZX[1, 0] be the map de ned as:

Proof

is is routine (and can use Corollary 4.7.20).

Lemma 5.6.3. e map η R :

Proof e proof for the the rst equation was done in Proposition 4.8.9 and the ones for the two other equations are similar to the proofs of rules 1b and 4a of Proposition 4.8.10.

We can now reprove the completeness of ZX/ ZX. By Proposition 4.8.5, ZX ZXπ /4 and by Proposition 4.4.2 ZXπ /4 ∆π /4 . By Lemma 5.6.3, the conditions (Cond) are met, so by eorem 5.3.1, the language is complete.

Completeness and Normal Forms with Rational Angles

In this section, we consider the case where the angles are rational multiples of π, i.e. fragments F ∈ F Q := {F ∈ F | F ⊆ Qπ}. Among the rational angles, dyadic angles, i.e.

enjoy some particular properties, and are considered in details in the next section.

Incompleteness and a new Rule for Cancelling Scalars

An interesting set of equations comes from the controlled scalars parametrised by integer polynomials, more precisely from those parametrised by cyclotomic polynomials. Indeed for any n > 0, Γ 2π

. However, the corresponding equations are De nition 5.7.2 (Cancellation rule): e cancellation rule (Cancel) is de ned as follows. For any diagrams of the ZX-calculus D 1 and D 2 :

When paired with the cancellation rule, ZXπ /4 becomes ZX Q . To prove the equation Γ π 4n (Φ 8n ) = on cyclotomic polynomials, we need to be able to perform the sum and the product of polynomials:

Lemma 5.7.3. For any polynomials P and Q in Z[X]: e case r = s and x ≤ y is similar. In the end:

We show in the next subsection that the ZX-calculus augmented with the new cancellation rule makes the ZX-calculus complete for rational angles.

Normal forms

First, let F ∈ F Q \ F D be nite. en, there exists n such that F is generated by π 4n (i.e. F = { kπ 4n | k ∈ N}), and for any

there exists a polynomial P ∈ D[X] such that x = P (e i π 4n ). is representation is not ideal. First of all, we can factor the powers of 1 2 and write P as

is expression is still not unique, because the evaluation of two di erent polynomials in e i π 4n can yield the same value (e.g. (e i π 4n ) 8n = 1). To palliate this problem, we need to work in Z[X]/φ 8n (X) where φ 8n is the 8n th cyclotomic polynomial. Indeed, φ 8n is the unique irreducible polynomial with e 2iπ 8n as root. en, applying the Euclidean division of Q by φ 8n :

where R and Q are uniquely chosen so that deg(R) < deg(φ 8n ) = ϕ(8n). en,

De nition 5.7.5:

We then de ne S π 4n :=

Remark 5.7.6. Notice that if P = 0, only Λ π 4n (0, 0) is part of S π 4n . Indeed, if P = 0, then P = 2 × 0 = 2P , so the last constraint imposes that p = 0.

Lemma 5.7.7. Λ π 4n (p, P ) |1 = 1 2 p P (e i π 4n )

Proof By construction.

Moreover:

Lemma 5.7.8. e map η π 4n :

] is uniquely de ned as the quantity 1 2 p P (e i π 4n ) where deg(P ) < ϕ(8n), and ∀Q ∈ Z[X], p > 0 =⇒ P = 2Q.

We now need to meet the conditions of eorem 5.3.1. First we notice that we can operate the sum and the product on controlled polynomials thanks to Lemma 5.7.3.

Two problems arise when trying to do the same with diagrams of S π 4n . First of all, the sum of two diagrams in normal form can have a parity issue. For instance 1 2 (2 + X) + 1 2 (X + 2X 2 ) = 1 2 (2 + 2X + 2X 2 ) which shall be reduced to 1 + X + X 2 . is is dealt with thanks to the following lemmas: Lemma 5.7.9. = Lemma 5.7.10.

e second lemma is then proven by induction, using Lemma 5.7.9.

Secondly, the product of two polynomials may well end up with a degree larger than ϕ(8n). However, since we can operate the sum and product of controlled polynomials in this formalism), or are the speci c features of the ZX-Calculus (such as the compactclosed structure) necessary? Finally, one last research direction for the ZX axiomatisations, would be to provide adequate and ideally complete languages for qudit quantum computing.

Lemmas