Jump to content

ZX-calculus: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m improve citations
Line 4: Line 4:
The ZX-calculus was first introduced by [[Bob Coecke]] and Ross Duncan in 2008 as an extension of the [[Categorical quantum mechanics|Categorical Quantum Mechanics]] school of reasoning. They introduced the fundamental concepts of spiders, [[Complementarity (physics)|strong complementarity]] and most of the standard rewrite rules.<ref>{{Citation|last1=Coecke|first1=Bob|chapter=Interacting Quantum Observables|pages=298–310|publisher=Springer Berlin Heidelberg|isbn=9783540705826|last2=Duncan|first2=Ross|doi=10.1007/978-3-540-70583-3_25|title=Automata, Languages and Programming|volume=5126|series=Lecture Notes in Computer Science|year=2008|citeseerx=10.1.1.381.2573}}</ref><ref>{{Cite journal|last1=Coecke|first1=Bob|last2=Duncan|first2=Ross|date=2011-04-14|title=Interacting quantum observables: categorical algebra and diagrammatics|journal=New Journal of Physics|volume=13|issue=4|pages=043016|doi=10.1088/1367-2630/13/4/043016|issn=1367-2630|arxiv=0906.4725|bibcode=2011NJPh...13d3016C}}</ref>
The ZX-calculus was first introduced by [[Bob Coecke]] and Ross Duncan in 2008 as an extension of the [[Categorical quantum mechanics|Categorical Quantum Mechanics]] school of reasoning. They introduced the fundamental concepts of spiders, [[Complementarity (physics)|strong complementarity]] and most of the standard rewrite rules.<ref>{{Citation|last1=Coecke|first1=Bob|chapter=Interacting Quantum Observables|pages=298–310|publisher=Springer Berlin Heidelberg|isbn=9783540705826|last2=Duncan|first2=Ross|doi=10.1007/978-3-540-70583-3_25|title=Automata, Languages and Programming|volume=5126|series=Lecture Notes in Computer Science|year=2008|citeseerx=10.1.1.381.2573}}</ref><ref>{{Cite journal|last1=Coecke|first1=Bob|last2=Duncan|first2=Ross|date=2011-04-14|title=Interacting quantum observables: categorical algebra and diagrammatics|journal=New Journal of Physics|volume=13|issue=4|pages=043016|doi=10.1088/1367-2630/13/4/043016|issn=1367-2630|arxiv=0906.4725|bibcode=2011NJPh...13d3016C}}</ref>


In 2009 Duncan and Perdrix found the additional [[Euler angles|Euler Decomposition]] rule for the [[Quantum_gate#Hadamard_(H)_gate|Hadamard gate]]<ref name=":0">{{Citation|last1=Duncan|first1=Ross|title=Graph States and the Necessity of Euler Decomposition|date=2009|work=Mathematical Theory and Computational Practice|pages=167–177|publisher=Springer Berlin Heidelberg|isbn=9783642030727|last2=Perdrix|first2=Simon|doi=10.1007/978-3-642-03073-4_18}}</ref>, which was used by Backens in 2013 to establish the first completeness result for the ZX-calculus<ref>{{Cite journal|last=Backens|first=Miriam|date=2014-09-17|title=The ZX-calculus is complete for stabilizer quantum mechanics|journal=New Journal of Physics|volume=16|issue=9|pages=093021|doi=10.1088/1367-2630/16/9/093021|issn=1367-2630|arxiv=1307.7025|bibcode=2014NJPh...16i3021B}}</ref>. Namely that there exists a set of rewrite rules that suffice to prove all equalities between [[Stabilizer code|stabilizer]] ZX-diagrams, where phases are multiples of <math>\pi/2</math>, up to global scalars. This result was later refined to completeness including scalar factors<ref>{{Cite journal|last=Backens|first=Miriam|date=2015-11-04|title=Making the stabilizer ZX-calculus complete for scalars|journal=Electronic Proceedings in Theoretical Computer Science|volume=195|pages=17–32|doi=10.4204/eptcs.195.2|issn=2075-2180|bibcode=2015arXiv150703854B|arxiv=1507.03854}}</ref>.
In 2009 Duncan and Perdrix found the additional [[Euler angles|Euler Decomposition]] rule for the [[Quantum_gate#Hadamard_(H)_gate|Hadamard gate]]<ref name=":0">{{Cite journal|last1=Duncan|first1=Ross|title=Graph States and the Necessity of Euler Decomposition|date=2009|work=Mathematical Theory and Computational Practice|pages=167–177|publisher=Springer Berlin Heidelberg|isbn=9783642030727|last2=Perdrix|first2=Simon|doi=10.1007/978-3-642-03073-4_18|arxiv=0902.0500}}</ref>, which was used by Backens in 2013 to establish the first completeness result for the ZX-calculus<ref>{{Cite journal|last=Backens|first=Miriam|date=2014-09-17|title=The ZX-calculus is complete for stabilizer quantum mechanics|journal=New Journal of Physics|volume=16|issue=9|pages=093021|doi=10.1088/1367-2630/16/9/093021|issn=1367-2630|arxiv=1307.7025|bibcode=2014NJPh...16i3021B}}</ref>. Namely that there exists a set of rewrite rules that suffice to prove all equalities between [[Stabilizer code|stabilizer]] ZX-diagrams, where phases are multiples of <math>\pi/2</math>, up to global scalars. This result was later refined to completeness including scalar factors<ref>{{Cite journal|last=Backens|first=Miriam|date=2015-11-04|title=Making the stabilizer ZX-calculus complete for scalars|journal=Electronic Proceedings in Theoretical Computer Science|volume=195|pages=17–32|doi=10.4204/eptcs.195.2|issn=2075-2180|bibcode=2015arXiv150703854B|arxiv=1507.03854}}</ref>.


In 2017, a completion of the ZX-calculus for the approximately universal <math>\pi/4</math> fragment was found<ref>{{Cite journal|last1=Jeandel|first1=Emmanuel|last2=Perdrix|first2=Simon|last3=Vilmart|first3=Renaud|date=2018|title=A Complete Axiomatisation of the ZX-Calculus for Clifford+T Quantum Mechanics|journal=Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '18|pages=559–568|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/3209108.3209131|isbn=9781450355834|arxiv=1705.11151}}</ref>, in addition to two different completeness results for the universal ZX-calculus (where phases are allowed to take any real value)<ref name=":1">{{cite journal |last1=Hadzihasanovic |first1=Amar |last2=Ng |first2=Kang Feng |last3=Wang |first3=Quanlong |title=Two Complete Axiomatisations of Pure-state Qubit Quantum Computing |journal=Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science |date=2018 |pages=502–511 |doi=10.1145/3209108.3209128 |url=https://dl.acm.org/citation.cfm?id=3209128 |accessdate=21 May 2019 |publisher=ACM|isbn=9781450355834 }}</ref><ref>{{Cite journal|last1=Jeandel|first1=Emmanuel|last2=Perdrix|first2=Simon|last3=Vilmart|first3=Renaud|date=2018|title=Diagrammatic Reasoning beyond Clifford+T Quantum Mechanics|journal=Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '18|pages=569–578|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/3209108.3209139|isbn=9781450355834|arxiv=1801.10142|bibcode=2018arXiv180110142J}}</ref>.
In 2017, a completion of the ZX-calculus for the approximately universal <math>\pi/4</math> fragment was found<ref>{{Cite journal|last1=Jeandel|first1=Emmanuel|last2=Perdrix|first2=Simon|last3=Vilmart|first3=Renaud|date=2018|title=A Complete Axiomatisation of the ZX-Calculus for Clifford+T Quantum Mechanics|journal=Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '18|pages=559–568|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/3209108.3209131|isbn=9781450355834|arxiv=1705.11151}}</ref>, in addition to two different completeness results for the universal ZX-calculus (where phases are allowed to take any real value)<ref name=":1">{{cite journal |last1=Hadzihasanovic |first1=Amar |last2=Ng |first2=Kang Feng |last3=Wang |first3=Quanlong |title=Two Complete Axiomatisations of Pure-state Qubit Quantum Computing |journal=Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science |date=2018 |pages=502–511 |doi=10.1145/3209108.3209128 |url=https://dl.acm.org/citation.cfm?id=3209128 |accessdate=21 May 2019 |publisher=ACM|isbn=9781450355834 }}</ref><ref>{{Cite journal|last1=Jeandel|first1=Emmanuel|last2=Perdrix|first2=Simon|last3=Vilmart|first3=Renaud|date=2018|title=Diagrammatic Reasoning beyond Clifford+T Quantum Mechanics|journal=Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '18|pages=569–578|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/3209108.3209139|isbn=9781450355834|arxiv=1801.10142|bibcode=2018arXiv180110142J}}</ref>.
Line 201: Line 201:
The ZX-calculus has been used in a variety of [[Quantum information science|quantum information]] and [[Quantum computing|computation]] tasks.
The ZX-calculus has been used in a variety of [[Quantum information science|quantum information]] and [[Quantum computing|computation]] tasks.


* It has been used to describe [[MBQC|measurement-based quantum computation]] and [[Graph state|graph states]]<ref name=":0" /><ref>{{Citation|last1=Duncan|first1=Ross|title=Rewriting Measurement-Based Quantum Computations with Generalised Flow|date=2010|work=Automata, Languages and Programming|pages=285–296|publisher=Springer Berlin Heidelberg|isbn=9783642141614|last2=Perdrix|first2=Simon|s2cid=34644953|doi=10.1007/978-3-642-14162-1_24}}</ref><ref>{{Cite journal|last1=Kissinger|first1=Aleks|last2=van de Wetering|first2=John|date=2019-04-26|title=Universal MBQC with generalised parity-phase interactions and Pauli measurements|journal=Quantum|volume=3|pages=134|doi=10.22331/q-2019-04-26-134|issn=2521-327X|doi-access=free}}</ref>.
* It has been used to describe [[MBQC|measurement-based quantum computation]] and [[Graph state|graph states]]<ref name=":0" /><ref>{{Citation|last1=Duncan|first1=Ross|title=Rewriting Measurement-Based Quantum Computations with Generalised Flow|date=2010|work=Automata, Languages and Programming|pages=285–296|publisher=Springer Berlin Heidelberg|isbn=9783642141614|last2=Perdrix|first2=Simon|s2cid=34644953|doi=10.1007/978-3-642-14162-1_24|citeseerx=10.1.1.708.1968}}</ref><ref>{{Cite journal|last1=Kissinger|first1=Aleks|last2=van de Wetering|first2=John|date=2019-04-26|title=Universal MBQC with generalised parity-phase interactions and Pauli measurements|journal=Quantum|volume=3|pages=134|doi=10.22331/q-2019-04-26-134|issn=2521-327X|doi-access=free}}</ref>.
* The ZX-calculus is a language for [[lattice surgery]] on [[surface codes]]<ref>{{Cite arxiv|last1=Horsman|first1=Dominic|last2=de Beaudrap|first2=Niel|date=2017-04-27|title=The ZX calculus is a language for surface code lattice surgery|language=en|eprint=1704.08670v1|class=quant-ph}}</ref><ref>{{Cite arxiv|last1=Perdrix|first1=Simon|last2=Horsman|first2=Dominic|last3=Duncan|first3=Ross|last4=de Beaudrap|first4=Niel|date=2019-04-29|title=Pauli Fusion: a computational model to realise quantum transformations from ZX terms|language=en|eprint=1904.12817v1|class=quant-ph}}</ref>.
* The ZX-calculus is a language for [[lattice surgery]] on [[surface codes]]<ref>{{Cite arxiv|last1=Horsman|first1=Dominic|last2=de Beaudrap|first2=Niel|date=2017-04-27|title=The ZX calculus is a language for surface code lattice surgery|language=en|eprint=1704.08670v1|class=quant-ph}}</ref><ref>{{Cite arxiv|last1=Perdrix|first1=Simon|last2=Horsman|first2=Dominic|last3=Duncan|first3=Ross|last4=de Beaudrap|first4=Niel|date=2019-04-29|title=Pauli Fusion: a computational model to realise quantum transformations from ZX terms|language=en|eprint=1904.12817v1|class=quant-ph}}</ref>.
* It has been used to find and verify correctness of [[Quantum error correcting code|quantum error correcting codes]]<ref>{{Cite arxiv|last1=Horsman|first1=Dominic|last2=Zohren|first2=Stefan|last3=Roffe|first3=Joschka|last4=Kissinger|first4=Aleks|last5=Chancellor|first5=Nicholas|date=2016-11-23|title=Graphical Structures for Design and Verification of Quantum Error Correction|language=en|eprint=1611.08012v3|class=quant-ph}}</ref><ref>{{Cite journal|last1=Duncan|first1=Ross|last2=Lucas|first2=Maxime|date=2014-12-27|title=Verifying the Steane code with Quantomatic|journal=Electronic Proceedings in Theoretical Computer Science|volume=171|pages=33–49|doi=10.4204/eptcs.171.4|issn=2075-2180|doi-access=free}}</ref><ref>{{Cite journal|last1=Garvie|first1=Liam|last2=Duncan|first2=Ross|date=2018-02-27|title=Verifying the Smallest Interesting Colour Code with Quantomatic|journal=Electronic Proceedings in Theoretical Computer Science|volume=266|pages=147–163|doi=10.4204/eptcs.266.10|issn=2075-2180|doi-access=free}}</ref>.
* It has been used to find and verify correctness of [[Quantum error correcting code|quantum error correcting codes]]<ref>{{Cite arxiv|last1=Horsman|first1=Dominic|last2=Zohren|first2=Stefan|last3=Roffe|first3=Joschka|last4=Kissinger|first4=Aleks|last5=Chancellor|first5=Nicholas|date=2016-11-23|title=Graphical Structures for Design and Verification of Quantum Error Correction|language=en|eprint=1611.08012v3|class=quant-ph}}</ref><ref>{{Cite journal|last1=Duncan|first1=Ross|last2=Lucas|first2=Maxime|date=2014-12-27|title=Verifying the Steane code with Quantomatic|journal=Electronic Proceedings in Theoretical Computer Science|volume=171|pages=33–49|doi=10.4204/eptcs.171.4|issn=2075-2180|doi-access=free}}</ref><ref>{{Cite journal|last1=Garvie|first1=Liam|last2=Duncan|first2=Ross|date=2018-02-27|title=Verifying the Smallest Interesting Colour Code with Quantomatic|journal=Electronic Proceedings in Theoretical Computer Science|volume=266|pages=147–163|doi=10.4204/eptcs.266.10|issn=2075-2180|doi-access=free}}</ref>.
Line 212: Line 212:


== Related graphical languages ==
== Related graphical languages ==
The ZX-calculus is only one of several graphical languages for describing linear maps between qubits. The ''ZW-calculus'' was developed alongside the ZX-calculus, and can naturally describe the [[W state|W-state]] and Fermionic quantum computing<ref>{{Citation|last1=Coecke|first1=Bob|title=The Compositional Structure of Multipartite Quantum Entanglement|date=2010|work=Automata, Languages and Programming|pages=297–308|publisher=Springer Berlin Heidelberg|isbn=9783642141614|last2=Kissinger|first2=Aleks|doi=10.1007/978-3-642-14162-1_25|bibcode=2010arXiv1002.2540C|arxiv=1002.2540}}</ref><ref>{{Cite book |doi=10.1109/lics.2015.59|isbn=9781479988754|arxiv=1501.07082|chapter=A Diagrammatic Axiomatisation for Qubit Entanglement|title=2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science|pages=573–584|year=2015|last1=Hadzihasanovic|first1=Amar|last2=Duncan|first2=Ross}}</ref>. It was the first graphical language which had a complete rule-set for an approximately universal set of linear maps between qubits<ref name=":1" />, and the early completeness results of the ZX-calculus use a reduction to the ZW-calculus.
The ZX-calculus is only one of several graphical languages for describing linear maps between qubits. The ''ZW-calculus'' was developed alongside the ZX-calculus, and can naturally describe the [[W state|W-state]] and Fermionic quantum computing<ref>{{Cite journal|last1=Coecke|first1=Bob|title=The Compositional Structure of Multipartite Quantum Entanglement|date=2010|work=Automata, Languages and Programming|pages=297–308|publisher=Springer Berlin Heidelberg|isbn=9783642141614|last2=Kissinger|first2=Aleks|doi=10.1007/978-3-642-14162-1_25|bibcode=2010arXiv1002.2540C|arxiv=1002.2540}}</ref><ref>{{Cite book |doi=10.1109/lics.2015.59|isbn=9781479988754|arxiv=1501.07082|chapter=A Diagrammatic Axiomatisation for Qubit Entanglement|title=2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science|pages=573–584|year=2015|last1=Hadzihasanovic|first1=Amar|last2=Duncan|first2=Ross}}</ref>. It was the first graphical language which had a complete rule-set for an approximately universal set of linear maps between qubits<ref name=":1" />, and the early completeness results of the ZX-calculus use a reduction to the ZW-calculus.


A more recent language is the ''ZH-calculus''. This adds the ''H-box'' as a generator, that generalizes the Hadamard gate from the ZX-calculus. It can naturally describe quantum circuits involving Toffoli gates<ref>{{Cite journal|last1=Backens|first1=Miriam|last2=Kissinger|first2=Aleks|date=2019-01-31|title=ZH: A Complete Graphical Calculus for Quantum Computations Involving Classical Non-linearity|journal=Electronic Proceedings in Theoretical Computer Science|volume=287|pages=23–42|doi=10.4204/eptcs.287.2|issn=2075-2180|doi-access=free}}</ref>.
A more recent language is the ''ZH-calculus''. This adds the ''H-box'' as a generator, that generalizes the Hadamard gate from the ZX-calculus. It can naturally describe quantum circuits involving Toffoli gates<ref>{{Cite journal|last1=Backens|first1=Miriam|last2=Kissinger|first2=Aleks|date=2019-01-31|title=ZH: A Complete Graphical Calculus for Quantum Computations Involving Classical Non-linearity|journal=Electronic Proceedings in Theoretical Computer Science|volume=287|pages=23–42|doi=10.4204/eptcs.287.2|issn=2075-2180|doi-access=free}}</ref>.

Revision as of 08:45, 31 December 2020

The ZX-calculus is a rigorous graphical language for reasoning about linear maps between qubits, which are represented as ZX-diagrams. A ZX-diagram consists of a set of generators called spiders that represent specific tensors. These are connected together to form a tensor network similar to Penrose graphical notation. Due to the symmetries of the spiders and the properties of the underlying category, topologically deforming a ZX-diagram (i.e. moving the generators without changing their connections) does not affect the linear map it represents. In addition to the equalities between ZX-diagrams that are generated by topological deformations, the ZX-calculus also has a set of graphical rewrite rules for transforming ZX-diagrams into one another. The ZX-calculus is universal in the sense that any linear map between qubits can be represented as a ZX-diagram, and different sets of graphical rewrite rules are complete for different families of linear maps. ZX-diagrams can be seen as a generalisation of quantum circuit notation.

History

The ZX-calculus was first introduced by Bob Coecke and Ross Duncan in 2008 as an extension of the Categorical Quantum Mechanics school of reasoning. They introduced the fundamental concepts of spiders, strong complementarity and most of the standard rewrite rules.[1][2]

In 2009 Duncan and Perdrix found the additional Euler Decomposition rule for the Hadamard gate[3], which was used by Backens in 2013 to establish the first completeness result for the ZX-calculus[4]. Namely that there exists a set of rewrite rules that suffice to prove all equalities between stabilizer ZX-diagrams, where phases are multiples of , up to global scalars. This result was later refined to completeness including scalar factors[5].

In 2017, a completion of the ZX-calculus for the approximately universal fragment was found[6], in addition to two different completeness results for the universal ZX-calculus (where phases are allowed to take any real value)[7][8].

Also in 2017 the book Picturing Quantum Processes was released, that builds quantum theory from the ground up, using the ZX-calculus[9]. See also the 2019 book Categories for Quantum Theory[10].

Informal introduction

An example ZX-diagram. This one has two inputs (wires coming from the left), and three outputs (wires exiting to the right), and hence it represents a linear map from to .

ZX-diagrams consist of green and red nodes called spiders, which are connected by wires. Wires may curve and cross, arbitrarily many wires may connect to the same spider, and multiple wires can go between the same pair of nodes. There are also Hadamard nodes, usually denoted by a yellow box, which always connect to exactly two wires.

ZX-diagrams represent linear maps between qubits, similar to the way in which quantum circuits represent unitary maps between qubits. ZX-diagrams differ from quantum circuits in two main ways. The first is that ZX-diagrams do not have to conform to the rigid topological structure of circuits, and hence can be deformed arbitrarily. The second is that ZX-diagrams come equipped with a set of rewrite rules, collectively referred to as the ZX-calculus. Using these rules, calculations can be performed in the graphical language itself.

Generators

The building blocks or generators of the ZX-calculus are graphical representations of specific states, unitary operators, linear isometries, and projections in the computational basis and the Hadamard-transformed basis and . The colour green (or sometimes white) is used to represent the computational basis and the colour red (or sometimes grey) is used to represent the Hadamard-transformed basis. Each of these generators can furthermore be labelled by a phase, which is a real number from the interval . If the phase is zero it is usually not written.

The generators are:

ZX-calculus generators, informally
Type Generator Corresponding linear map Remarks
state For and , this map corresponds to unnormalised versions of the Hadamard-transformed basis states and , respectively. For , this is an unnormalised version of the T magic state[11] .
state For and , this map corresponds to unnormalised versions of the computational basis states and , respectively.
unitary map This map is a rotation about the Z-axis of the Bloch sphere by an angle . For , it is the Z Pauli matrix.
unitary map This map is a rotation about the X-axis of the Bloch sphere by an angle . For , it is the X Pauli matrix.
unitary map
This map is the Hadamard gate often used in quantum circuits.
isometry For , this map represents a copy operation in the computational basis. For the same value of , it also corresponds to the smooth split operation of lattice surgery.[12]
isometry For , this map represents a copy operation in the Hadamard-transformed basis. For the same value of , it also corresponds to the rough split operation of lattice surgery.[12]
partial isometry For , this map represents a controlled-NOT operation followed by a destructive Z measurement on the target qubit post-selected to the state . For the same value of , it also corresponds to the smooth merge (without byproduct operators) of lattice surgery.[12]
partial isometry For , this map represents a controlled-NOT operation followed by a destructive X measurement on the control qubit post-selected to the state . For the same value of , it also corresponds to the rough merge (without byproduct operators) of lattice surgery.[12]
projection For or , this map corresponds to a destructive X measurement post-selected to the state or , respectively.
projection For or , this map corresponds to a destructive Z measurement post-selected to the state or , respectively.

Composition

The generators can be composed in two ways:

  • sequentially, by connecting the output wires of one generator to the input wires of another;
  • in parallel, by stacking two generators vertically.

These laws correspond to the composition and tensor product of linear maps.

Any diagram written by composing generators in this way is called a ZX-diagram. ZX-diagrams are closed under both composition laws: connecting an output of one ZX-diagram to an input of another creates a valid ZX-diagram, and vertically stacking two ZX-diagrams creates a valid ZX-diagram.

Only topology matters

Two diagrams represent the same linear operator if they consist of the same generators connected in the same ways. In other words, whenever two ZX-diagrams can be transformed into one another by topological deformation, then they represent the same linear map. Thus, the controlled-NOT gate can be represented as follows:

Diagram rewriting

The following example of a quantum circuit constructs a GHZ-state. By translating it into a ZX-diagram, using the rules that "adjacent spiders of the same color merge", "Hadamard changes the color of spiders", and "arity-2 spiders are identities", it can be graphically reduced to a GHZ-state:

Any linear map between qubits can be represented as a ZX-diagram, i.e. ZX-diagrams are universal. A given ZX-diagram can be transformed into another ZX-diagram using the rewrite rules of the ZX-calculus if and only if the two diagrams represent the same linear map, i.e. the ZX-calculus is sound and complete.

Formal definition

The category of ZX-diagrams is a dagger compact category, which means that it has symmetric monoidal structure (a tensor product), is compact closed (it has cups and caps) and comes equipped with a dagger, such that all these structures suitably interact. The objects of the category are the natural numbers, with the tensor product given by addition (the category is a PROP). The morphisms of this category are ZX-diagrams. Two ZX-diagrams compose by juxtaposing them horizontally and connecting the outputs of the left-hand diagram to the inputs of the right-hand diagram. The monoidal product of two diagrams is represented by placing one diagram above the other.

Indeed, all ZX-diagrams are built freely from a set of generators via composition and monoidal product, modulo the equalities induced by the compact structure and the rules of the ZX-calculus given below. For instance, the identity of the object is depicted as parallel wires from left to right, with the special case being the empty diagram.

The following table gives the generators together with their standard interpretations as linear maps, expressed in Dirac notation. The computational basis states are denoted by and the Hadamard-transformed basis states are . The -fold tensor-product of the vector is denoted by .

Generators of ZX-diagrams[13]
Name Diagram Type Linear map it represents
empty diagram
This is the common representation for an empty diagram in categorical quantum mechanics
This is the common representation for an empty diagram in categorical quantum mechanics
1
wire/identity
Bell state
This is the common representation for a cup diagram in categorical quantum mechanics
This is the common representation for a cup diagram in categorical quantum mechanics
Bell effect
This is the common representation for a cap in categorical quantum mechanics
This is the common representation for a cap in categorical quantum mechanics
swap
This is the common representation of the swap morphism in the graphical language of symmetric monoidal categories
This is the common representation of the swap morphism in the graphical language of symmetric monoidal categories
Z spider
This is the green Z-spider from the ZX-calculus, with a phase alpha and n inputs and m outputs
This is the green Z-spider from the ZX-calculus, with a phase alpha and n inputs and m outputs
X spider
This is the red X-spider from the ZX-calculus, with a phase alpha and n inputs and m outputs
This is the red X-spider from the ZX-calculus, with a phase alpha and n inputs and m outputs
Hadamard
This is the standard yellow representation of a Hadamard gate in the ZX-calculus

There are many different versions of the ZX-calculus, using different systems of rewrite rules as axioms. All share the meta rule "only the topology matters", which means that two diagrams are equal if they consist of the same generators connected in the same way, no matter how these generators are arranged in the diagram. The following are some of the core set of rewrite rules, here given "up to scalar factor": i.e. two diagrams are considered to be equal if their interpretations as linear maps differ by a non-zero complex factor.

Rules of the ZX-calculus[14]
Rule name Rule Description
Z-spider fusion Whenever two Z-spider touch, then can fuse together, and their phases add. This rule corresponds to the fact that the Z-spider represents an orthonormal basis - the computational basis.
X-spider fusion See Z-spider fusion.
Identity rule
A phaseless arity 2 Z- or X-spider is equal to the identity. This rule states that the Bell-state is the same whether expressed in the computational basis or the Hadamard-transformed basis. In category-theoretic terms it says that the compact structure induced by the Z- and X-spider coincide.
Color change
The Hadamard-gate changes the color of spiders. This expresses the property that the Hadamard gate maps between the computational basis and the Hadamard-transformed basis.
Copy rule
A Z-spider copies arity-1 X-spiders. This expresses the fact that an arity-1 X-spider is proportional to a computational basis state (in this case ).
Bialgebra rule A 2-cycle of Z- and X-spiders simplifies. This expresses the property that the computational basis and the Hadamard-transformed basis are strongly complementary.
-copy rule A NOT-gate (an arity-2 X-spider with a phase) copies trough a Z-spider, and flips the phase of this spider. This rule states two properties at once. First, that NOT is a function map of the computational basis (it maps basis states to basis states), and second that when a NOT is commuted through a Z-rotation gate, that this rotation flips.
Euler decomposition A Hadamard-gate can be expanded into three rotations around the Bloch sphere (corresponding to its Euler angles). Sometimes this rule is taken as the definition of the Hadamard generator, in which case the only generators of ZX-diagrams are the Z- and X-spider.

Applications

The ZX-calculus has been used in a variety of quantum information and computation tasks.

Tools

The rewrite rules of the ZX-calculus can be implemented formally as an instance of double-pushout rewriting. This has been used in the software Quantomatic to allow automated rewriting of ZX-diagrams (or more general string diagrams)[23]. In order to formalise the usage of the "dots" to denote any number of wires, such as used in the spider fusion rule, this software uses bang-box notation[24] to implement rewrite rules where the spiders can have any number of inputs or outputs.

A more recent project to handle ZX-diagrams is PyZX, which is primarily focused on circuit optimisation[14].

The ZX-calculus is only one of several graphical languages for describing linear maps between qubits. The ZW-calculus was developed alongside the ZX-calculus, and can naturally describe the W-state and Fermionic quantum computing[25][26]. It was the first graphical language which had a complete rule-set for an approximately universal set of linear maps between qubits[7], and the early completeness results of the ZX-calculus use a reduction to the ZW-calculus.

A more recent language is the ZH-calculus. This adds the H-box as a generator, that generalizes the Hadamard gate from the ZX-calculus. It can naturally describe quantum circuits involving Toffoli gates[27].

Phaseless spiders in the ZX calculus satisfy the axioms of a Hopf algebra with the trivial map as antipode. This can be checked by observing that it is isomorphic to the group algebra of .

See also

References

  1. ^ Coecke, Bob; Duncan, Ross (2008), "Interacting Quantum Observables", Automata, Languages and Programming, Lecture Notes in Computer Science, vol. 5126, Springer Berlin Heidelberg, pp. 298–310, CiteSeerX 10.1.1.381.2573, doi:10.1007/978-3-540-70583-3_25, ISBN 9783540705826
  2. ^ Coecke, Bob; Duncan, Ross (2011-04-14). "Interacting quantum observables: categorical algebra and diagrammatics". New Journal of Physics. 13 (4): 043016. arXiv:0906.4725. Bibcode:2011NJPh...13d3016C. doi:10.1088/1367-2630/13/4/043016. ISSN 1367-2630.
  3. ^ a b Duncan, Ross; Perdrix, Simon (2009). "Graph States and the Necessity of Euler Decomposition". Mathematical Theory and Computational Practice. Springer Berlin Heidelberg: 167–177. arXiv:0902.0500. doi:10.1007/978-3-642-03073-4_18. ISBN 9783642030727.
  4. ^ Backens, Miriam (2014-09-17). "The ZX-calculus is complete for stabilizer quantum mechanics". New Journal of Physics. 16 (9): 093021. arXiv:1307.7025. Bibcode:2014NJPh...16i3021B. doi:10.1088/1367-2630/16/9/093021. ISSN 1367-2630.
  5. ^ Backens, Miriam (2015-11-04). "Making the stabilizer ZX-calculus complete for scalars". Electronic Proceedings in Theoretical Computer Science. 195: 17–32. arXiv:1507.03854. Bibcode:2015arXiv150703854B. doi:10.4204/eptcs.195.2. ISSN 2075-2180.
  6. ^ Jeandel, Emmanuel; Perdrix, Simon; Vilmart, Renaud (2018). "A Complete Axiomatisation of the ZX-Calculus for Clifford+T Quantum Mechanics". Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '18. New York, New York, USA: ACM Press: 559–568. arXiv:1705.11151. doi:10.1145/3209108.3209131. ISBN 9781450355834.
  7. ^ a b Hadzihasanovic, Amar; Ng, Kang Feng; Wang, Quanlong (2018). "Two Complete Axiomatisations of Pure-state Qubit Quantum Computing". Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science. ACM: 502–511. doi:10.1145/3209108.3209128. ISBN 9781450355834. Retrieved 21 May 2019.
  8. ^ Jeandel, Emmanuel; Perdrix, Simon; Vilmart, Renaud (2018). "Diagrammatic Reasoning beyond Clifford+T Quantum Mechanics". Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '18. New York, New York, USA: ACM Press: 569–578. arXiv:1801.10142. Bibcode:2018arXiv180110142J. doi:10.1145/3209108.3209139. ISBN 9781450355834.
  9. ^ Coecke, Bob; Kissinger, Aleks (2017). Picturing Quantum Processes. Cambridge: Cambridge University Press. doi:10.1017/9781316219317. ISBN 9781316219317.
  10. ^ Heunen, Chris; Vicary, Jamie (2019). Categories for Quantum Theory. Oxford University Press. doi:10.1093/oso/9780198739623.001.0001. ISBN 9780198739616.
  11. ^ Bravyi, Sergey; Haah, Jeongwan (2012-11-27). "Magic-state distillation with low overhead". Physical Review A. 86 (5): 052329. arXiv:1209.2426. Bibcode:2012PhRvA..86e2329B. doi:10.1103/physreva.86.052329. ISSN 1050-2947.
  12. ^ a b c d Horsman, Dominic; de Beaudrap, Niel (2017-04-27). "The ZX calculus is a language for surface code lattice surgery". arXiv:1704.08670v2 [quant-ph].
  13. ^ Backens, Miriam; Perdrix, Simon; Wang, Quanlong (2017-01-01). "A Simplified Stabilizer ZX-calculus". Electronic Proceedings in Theoretical Computer Science. 236: 1–20. doi:10.4204/eptcs.236.1. ISSN 2075-2180.
  14. ^ a b van de Wetering, John; Kissinger, Aleks (2019-04-09). "PyZX: Large Scale Automated Diagrammatic Reasoning". arXiv:1904.04735v1 [quant-ph].
  15. ^ Duncan, Ross; Perdrix, Simon (2010), "Rewriting Measurement-Based Quantum Computations with Generalised Flow", Automata, Languages and Programming, Springer Berlin Heidelberg, pp. 285–296, CiteSeerX 10.1.1.708.1968, doi:10.1007/978-3-642-14162-1_24, ISBN 9783642141614, S2CID 34644953
  16. ^ Kissinger, Aleks; van de Wetering, John (2019-04-26). "Universal MBQC with generalised parity-phase interactions and Pauli measurements". Quantum. 3: 134. doi:10.22331/q-2019-04-26-134. ISSN 2521-327X.
  17. ^ Horsman, Dominic; de Beaudrap, Niel (2017-04-27). "The ZX calculus is a language for surface code lattice surgery". arXiv:1704.08670v1 [quant-ph].
  18. ^ Perdrix, Simon; Horsman, Dominic; Duncan, Ross; de Beaudrap, Niel (2019-04-29). "Pauli Fusion: a computational model to realise quantum transformations from ZX terms". arXiv:1904.12817v1 [quant-ph].
  19. ^ Horsman, Dominic; Zohren, Stefan; Roffe, Joschka; Kissinger, Aleks; Chancellor, Nicholas (2016-11-23). "Graphical Structures for Design and Verification of Quantum Error Correction". arXiv:1611.08012v3 [quant-ph].
  20. ^ Duncan, Ross; Lucas, Maxime (2014-12-27). "Verifying the Steane code with Quantomatic". Electronic Proceedings in Theoretical Computer Science. 171: 33–49. doi:10.4204/eptcs.171.4. ISSN 2075-2180.
  21. ^ Garvie, Liam; Duncan, Ross (2018-02-27). "Verifying the Smallest Interesting Colour Code with Quantomatic". Electronic Proceedings in Theoretical Computer Science. 266: 147–163. doi:10.4204/eptcs.266.10. ISSN 2075-2180.
  22. ^ Fagan, Andrew; Duncan, Ross (2019-01-31). "Optimising Clifford Circuits with Quantomatic". Electronic Proceedings in Theoretical Computer Science. 287: 85–105. arXiv:1901.10114. Bibcode:2019arXiv190110114F. doi:10.4204/eptcs.287.5. ISSN 2075-2180.
  23. ^ Kissinger, Aleks; Zamdzhiev, Vladimir (2015), "Quantomatic: A Proof Assistant for Diagrammatic Reasoning", Automated Deduction - CADE-25, Springer International Publishing, pp. 326–336, arXiv:1503.01034, Bibcode:2015arXiv150301034K, doi:10.1007/978-3-319-21401-6_22, ISBN 9783319214009
  24. ^ Quick, David; Kissinger, Aleks (2015-05-02). "A first-order logic for string diagrams". arXiv:1505.00343v1 [math.CT].
  25. ^ Coecke, Bob; Kissinger, Aleks (2010). "The Compositional Structure of Multipartite Quantum Entanglement". Automata, Languages and Programming. Springer Berlin Heidelberg: 297–308. arXiv:1002.2540. Bibcode:2010arXiv1002.2540C. doi:10.1007/978-3-642-14162-1_25. ISBN 9783642141614.
  26. ^ Hadzihasanovic, Amar; Duncan, Ross (2015). "A Diagrammatic Axiomatisation for Qubit Entanglement". 2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science. pp. 573–584. arXiv:1501.07082. doi:10.1109/lics.2015.59. ISBN 9781479988754.
  27. ^ Backens, Miriam; Kissinger, Aleks (2019-01-31). "ZH: A Complete Graphical Calculus for Quantum Computations Involving Classical Non-linearity". Electronic Proceedings in Theoretical Computer Science. 287: 23–42. doi:10.4204/eptcs.287.2. ISSN 2075-2180.