Papers
Topics
Authors
Recent
Search
2000 character limit reached

Arithmetic GHZ/W-Calculus: Diagrammatic Quantum Arithmetic

Updated 5 July 2026
  • 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 C2\mathbb{C}^2 canonically induces a symmetric tripartite state SLOCC-equivalent to GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle, and every anti-special commutative Frobenius algebra canonically induces a symmetric tripartite state SLOCC-equivalent to W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle (Roy, 2011).

The explicit qubit realizations recalled in the literature make the distinction concrete. The GHZ-structure on C2\mathbb{C}^2 is given by

μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,

whereas the W-structure is given by

μ=111+001+010,η=1,δ=000+011+101,ϵ=0.\mu = |1\rangle\langle 11| + |0\rangle\langle 01| + |0\rangle\langle 10|,\quad \eta = |1\rangle,\quad \delta = |00\rangle\langle 0| + |01\rangle\langle 1| + |10\rangle\langle 1|,\quad \epsilon = \langle 0|.

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 WnW_n are nn-ary W-like spiders, and the white vertices ZnZ_n are GHZ-like spiders, specifically Z-spiders with π\pi phase in ZX language. The semantics targets the PROP corresponding to free abelian groups on powers of two, with objects GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle0 and morphisms arbitrary GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle1-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 GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle2 gate acts as multiplicative inversion, and the Pauli GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle3 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 GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle4 construction, one obtains points representing GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle5, and then positive fractions are represented as GHZ products of GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle6 and GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle7 (Coecke et al., 2011).

The resulting fraction arithmetic is exact at the graphical level. The product of GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle8 and GHZ=000+111|GHZ\rangle = |000\rangle + |111\rangle9 rewrites to W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle0, and the sum rewrites to

W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle1

A Pauli-W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle2-like phase, denoted by a cross operation in the source exposition, yields additive inverses, so that W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle3 is represented diagrammatically and satisfies W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle4 (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 W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle5 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 W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle6, interpreted as

W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle7

and morphisms W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle8 are arbitrary integer matrices

W=001+010+100|W\rangle = |001\rangle + |010\rangle + |100\rangle9

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

C2\mathbb{C}^20

with C2\mathbb{C}^21 and C2\mathbb{C}^22 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 C2\mathbb{C}^23 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 C2\mathbb{C}^24 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 C2\mathbb{C}^25 and C2\mathbb{C}^26. 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 C2\mathbb{C}^27 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

C2\mathbb{C}^28

with C2\mathbb{C}^29 (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 μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,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 μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,1 (Wang, 2021).

The qudit white spider has semantics

μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,2

so for μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,3 and μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,4 it yields the unnormalized qudit GHZ state. The basic W generator is

μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,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: μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,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

μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,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

μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,8

acts as an operational cost measure. In that framework,

μ=000+111,η=2+,δ=000+111,ϵ=2+,\mu = |0\rangle\langle 00| + |1\rangle\langle 11|,\quad \eta = \sqrt{2}\,|+\rangle,\quad \delta = |00\rangle\langle 0| + |11\rangle\langle 1|,\quad \epsilon = \sqrt{2}\,\langle +|,9

for any number of parties, whereas

μ=111+001+010,η=1,δ=000+011+101,ϵ=0.\mu = |1\rangle\langle 11| + |0\rangle\langle 01| + |0\rangle\langle 10|,\quad \eta = |1\rangle,\quad \delta = |00\rangle\langle 0| + |01\rangle\langle 1| + |10\rangle\langle 1|,\quad \epsilon = \langle 0|.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

μ=111+001+010,η=1,δ=000+011+101,ϵ=0.\mu = |1\rangle\langle 11| + |0\rangle\langle 01| + |0\rangle\langle 10|,\quad \eta = |1\rangle,\quad \delta = |00\rangle\langle 0| + |01\rangle\langle 1| + |10\rangle\langle 1|,\quad \epsilon = \langle 0|.1

and

μ=111+001+010,η=1,δ=000+011+101,ϵ=0.\mu = |1\rangle\langle 11| + |0\rangle\langle 01| + |0\rangle\langle 10|,\quad \eta = |1\rangle,\quad \delta = |00\rangle\langle 0| + |01\rangle\langle 1| + |10\rangle\langle 1|,\quad \epsilon = \langle 0|.2

The same framework introduces the spectrum of the natural Laplacian acting on entanglement μ=111+001+010,η=1,δ=000+011+101,ϵ=0.\mu = |1\rangle\langle 11| + |0\rangle\langle 01| + |0\rangle\langle 10|,\quad \eta = |1\rangle,\quad \delta = |00\rangle\langle 0| + |01\rangle\langle 1| + |10\rangle\langle 1|,\quad \epsilon = \langle 0|.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).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Arithmetic GHZ/W-Calculus.