Arithmetic GHZ/W-Calculus: Diagrammatic Quantum Arithmetic
- Arithmetic GHZ/W-Calculus is a diagrammatic formalism using GHZ and W structures as algebraic generators to encode integer and rational arithmetic through quantum entanglement.
- The calculus employs interacting Frobenius-algebraic structures to represent operations like multiplication, addition, and inversion, yielding complete integer-linear semantics.
- It extends to operator arithmetic in both qubit and qudit systems, providing normalization procedures and integration with ZX/W calculi for advanced quantum computing applications.
Arithmetic GHZ/W-Calculus denotes a family of diagrammatic and algebraic formalisms in which GHZ-type and W-type multipartite entanglement are taken as primitive generators and their interaction supports explicit arithmetic reasoning. In the qubit setting, this program appears in the GHZ/W-calculus, in the ZW-calculus, and in ZXW variants: GHZ and W are represented by interacting Frobenius-algebraic structures, while the resulting diagrams can encode integers, rationals, integer matrices, sums of operators, and, in broader interpretations, asymptotic resource-conversion laws (Coecke et al., 2011). A central landmark is the result that the ZW-calculus is complete for the category of free abelian groups on a power of two generators—“qubits with integer coefficients”—with an explicit normalization procedure (Hadzihasanovic, 2015).
1. Algebraic generators and categorical setting
The GHZ/W tradition is rooted in categorical quantum mechanics, where processes are morphisms in a symmetric monoidal category and graphical reasoning is organized by commutative Frobenius algebras. In this setting, a GHZ structure is a special commutative Frobenius algebra, while a W structure is an anti-special commutative Frobenius algebra. For qubits, every special commutative Frobenius algebra on canonically induces a symmetric tripartite state SLOCC-equivalent to , and every anti-special commutative Frobenius algebra canonically induces a symmetric tripartite state SLOCC-equivalent to (Roy, 2011).
The explicit qubit realizations recalled in the literature make the distinction concrete. The GHZ-structure on is given by
whereas the W-structure is given by
These structures induce different compact structures and different loop behavior, and that distinction drives the arithmetic asymmetry between GHZ and W (Roy, 2011).
In the ZW-calculus, the generators are reorganized as black and white vertices. The black vertices are -ary W-like spiders, and the white vertices are GHZ-like spiders, specifically Z-spiders with phase in ZX language. The semantics targets the PROP corresponding to free abelian groups on powers of two, with objects 0 and morphisms arbitrary 1-linear maps (Hadzihasanovic, 2015). This makes GHZ and W not merely entanglement representatives, but generators of a full integer-linear calculus.
2. Rational arithmetic inside the GHZ/W-calculus
A decisive development was the proof that the GHZ/W-calculus contains rational arithmetic. In that formulation, the GHZ state acts as multiplication, the W state acts as addition, the Pauli 2 gate acts as multiplicative inversion, and the Pauli 3 gate acts as additive inversion (Coecke et al., 2011).
Natural numbers are encoded diagrammatically as points. Addition is implemented by the W-structure, which is a commutative monoid on those points, while multiplication is implemented by the GHZ-structure. The calculus proves the expected distributive law diagrammatically: GHZ multiplication distributes over W addition, and repeated GHZ multiplication on natural-number points yields the usual product. By passing to multiplicative inverses via the Pauli 4 construction, one obtains points representing 5, and then positive fractions are represented as GHZ products of 6 and 7 (Coecke et al., 2011).
The resulting fraction arithmetic is exact at the graphical level. The product of 8 and 9 rewrites to 0, and the sum rewrites to
1
A Pauli-2-like phase, denoted by a cross operation in the source exposition, yields additive inverses, so that 3 is represented diagrammatically and satisfies 4 (Coecke et al., 2011).
This establishes a field-of-fractions picture internal to the diagrammatic language. A plausible implication is that the phrase “arithmetic GHZ/W-calculus” is not merely metaphorical in this strand of the literature: the arithmetic of 5 is literally realized through interacting GHZ and W spiders.
3. Integer linearity, completeness, and normal forms
The ZW-calculus sharpened the arithmetic viewpoint by proving completeness for the PROP of free abelian groups on powers of two. Objects are 6, interpreted as
7
and morphisms 8 are arbitrary integer matrices
9
Scalars are integers, and every diagram denotes such an integer-linear map (Hadzihasanovic, 2015).
The arithmetic content is carried by a normal form. Any state
0
with 1 and 2 is represented by a white-over-black normal form: a row of white vertices encoding basis terms, a row of black vertices encoding qubit positions, edges marking the 3 entries, and attached scalar structure encoding multiplicities and signs. Diagrammatically, every integer coefficient is realized by spider multiplicity, loop rules, and the white involution acting as multiplication by 4 on appropriate components (Hadzihasanovic, 2015).
The same paper identifies the white monoid/comonoid as a Frobenius algebra and the black monoid/comonoid as a Hopf algebra with antipode given by the white 2-legged vertex. Mixed black–white interaction satisfies Hopf-like equations as well. In this sense, GHZ and W are not just states; they generate the algebraic infrastructure that supports integer arithmetic (Hadzihasanovic, 2015).
A related normalization program was developed earlier for GHZ/W-graphs. For simple connected GHZ-graphs and W-graphs, the normal forms are determined by the number of inputs, outputs, loops, and ticks; for regular GHZ/W-graphs, the graph decomposes into a pure GHZ part, a pure W part, and canonical mixed morphisms 5 and 6. The mixed pieces are classified by integer parameters such as the number of loops and ticks, and certain parameter ranges reduce the morphism to zero (Roy, 2011). This suggests a combinatorial arithmetic at the level of graph invariants even before full completeness is available.
4. Relation to ZX and the emergence of operator arithmetic
The arithmetic GHZ/W perspective is closely tied to ZX-calculus, but it is not identical to it. In ZW, the white spider is a Z-spider with 7 phase, whereas the black W-spider has no direct ZX analogue and is specifically tuned to W entanglement and Hopf structure (Hadzihasanovic, 2015). The relation became operationally important in ZXW-calculus, where GHZ-like ZX spiders and W-structure coexist.
In ZXW-calculus, the W-structure is used to encode addition of linear maps, while ordinary ZX spiders handle tensor and compositional structure. Practical summation techniques were developed for a wide class of sums of linear operators, including arbitrary qubits Hamiltonians. The calculus provides controlled constructions for sums and products of matrices and states, giving diagrammatic representations of Hamiltonians of the form
8
with 9 (Shaikh et al., 2022).
This arithmetic then extends to exponentiation. The same work uses the Cayley–Hamilton theorem to show in principle how to exponentiate arbitrary qubits Hamiltonians in ZXW-calculus, and it develops practical diagrammatic techniques for Taylor expansion and Trotterization. It also gives a diagrammatic proof of the linearity of the Schrödinger equation. The interpretation is explicit: W-spiders implement the sum over operator branches, while the GHZ-like ZX part carries the multiplicative structure of composition and tensor product (Shaikh et al., 2022).
A plausible implication is that arithmetic GHZ/W-calculus has two closely related meanings in the literature: arithmetic on scalar-like points, as in rational calculus, and arithmetic on operators, as in Hamiltonian summation and exponentiation.
5. Qudit and semiring generalizations
The qubit ZW picture was extended to arbitrary finite dimension by the non-anyonic qudit ZW-calculus. Its stated motivation is that the earlier anyonic qudit ZW-calculus used 0-binomial coefficients in the interpretation of the W-spider, making computation cumbersome. The non-anyonic version keeps generators and rewriting rules similar to the qubit case, makes the Z-spider exactly the same as the qudit ZX Z-spider, and gives a W-spider whose non-zero matrix entries are all 1 (Wang, 2021).
The qudit white spider has semantics
2
so for 3 and 4 it yields the unnormalized qudit GHZ state. The basic W generator is
5
and its multi-legged versions distribute a single nonzero symbol among outputs, generalizing the qubit W pattern (Wang, 2021).
The arithmetic aspect is explicit in the rewrite rules. White-spider fusion adds label vectors, while specific black–white interactions produce pointwise multiplication of labels: 6 The calculus is connected bidirectionally to qudit ZX-calculus, and because the latter is universal, the new qudit ZW-calculus is also universal for pure qudit quantum computing (Wang, 2021).
The same source notes that if the crossings and the corresponding rules are removed, one obtains a general ZW-calculus that works for arbitrary commutative semirings. This suggests a broad algebraic generalization of arithmetic GHZ/W-calculus beyond complex amplitudes and beyond qubits.
6. Entanglement classification, resource arithmetic, and newer invariants
Arithmetic GHZ/W-calculus has also been interpreted as a calculus of entanglement classes and conversion rates. In the graphical Z/X-calculus, three-qubit GHZ and W representatives can be constructed diagrammatically, and a notion of supplementarity characterizes inhabitants of the W class. For the phase-parametrized triangular diagram, the W-class conditions are
7
which are derived diagrammatically from phase relations rather than from tensor algebra alone (Coecke et al., 2011). This makes phase arithmetic itself a classifier of GHZ-type versus W-type entanglement.
A distinct, tensor-theoretic strand studies arithmetic through asymptotic SLOCC conversion rates. There the generalized GHZ state is treated as a unit tensor, W and Dicke states are treated as multipartite resources, and the conversion rate
8
acts as an operational cost measure. In that framework,
9
for any number of parties, whereas
0
and GHZ-to-Dicke conversion is governed by logarithms of asymptotic tensor ranks (Vrana et al., 2013). This is not a diagrammatic calculus, but it is an arithmetic of GHZ/W resources in a precise asymptotic sense.
More recently, entanglement cohomology has supplied another arithmetic layer. For generalized GHZ and W states on an arbitrary number of parties and local dimensions, exact expressions were derived for the dimensions of the cohomology groups, proving conjectures of earlier work. The Poincaré polynomials are
1
and
2
The same framework introduces the spectrum of the natural Laplacian acting on entanglement 3-forms and intersection numbers obtained from wedge products of cohomology-class representatives as local-unitary invariants (Ferko et al., 22 Dec 2025). This suggests an arithmetic GHZ/W-calculus in which GHZ and W are distinguished not only by rewrite rules and normal forms, but also by graded cohomological and spectral signatures.
Taken together, these developments indicate that arithmetic GHZ/W-calculus is best understood as a family of closely related formalisms. At one end lie graphical calculi in which GHZ and W generate rational arithmetic and integer-linear semantics; at the other lie resource and cohomological frameworks in which GHZ and W support asymptotic, spectral, and homological arithmetic. The major open directions stated in the literature include extending normal forms beyond simple and regular GHZ/W-graphs (Roy, 2011), establishing completeness for qudit non-anyonic ZW-calculus (Wang, 2021), and broadening the arithmetic treatment from qubits and integer or rational coefficients to more general rings, semirings, and multipartite invariants (Hadzihasanovic, 2015).