Red/Green Compact-Structure Coincidence
- Red/green compact-structure coincidence is the rule in the stabilizer ZX-calculus that equates the compact structures induced by red (X) and green (Z) spiders.
- The rule (S3′R) explicitly identifies the red and green cups and caps, ensuring a unified compact framework for diagrammatic reasoning.
- A countermodel shows that without (S3′R), the red spider’s structure diverges from the ambient one, proving the rule’s essential role in maintaining minimality.
Searching arXiv for the ZX-calculus topic and its background papers. arxiv_search(query="\"red/green compact-structure coincidence\" ZX calculus", max_results=10) The red/green compact-structure coincidence is a rewrite rule in the stabilizer fragment of the ZX-calculus asserting that the compact structure induced by the red -spider coincides with that induced by the green -spider. In the notation of the simplified stabilizer ZX-calculus, the rule is denoted and is written as , equivalently identifying the green and red cups. In recent work on minimality, this rule was shown to be individually necessary relative to the connectivity meta-rule of Backens–Perdrix–Wang, so that it is not derivable from the remaining axioms of the simplified stabilizer calculus (Stoltz, 10 Jun 2026).
1. Placement within the stabilizer ZX-calculus
The stabilizer fragment of the ZX-calculus is among the central fragments of the theory, and the closely related Clifford+T fragment is approximately universal (Jeandel et al., 2017). Within this setting, the simplified stabilizer calculus, denoted , is presented by a small collection of rewrite rules, most of which had already been shown necessary before the status of the red/green compact-structure coincidence and the bialgebra law was settled (Stoltz, 10 Jun 2026).
In this framework, the phrase “compact-structure coincidence” refers specifically to the coincidence of the compact structures induced by the two complementary spider families. A compact structure here means the cups and caps associated with a †Frobenius algebra. The significance of is therefore structural rather than merely cosmetic: it equates the ambient compact structure already fixed for green spiders with the compact structure generated by red spiders, ensuring that both color sectors share the same cup and cap.
A plausible implication is that the rule serves as a bridge between the color-dual presentations of the stabilizer fragment. Without it, the two spider families retain a stronger formal separation than standard Hilbert-space semantics would allow.
2. Formal statement of the rule
The diagrammatic form of is the equality of the green cup and the red cup. In typed notation, the rule is
Here is the green cup and the red cup (Stoltz, 10 Jun 2026).
The rule is usually paired conceptually with the corresponding equality for caps, so that one has both 0 and 1. In the minimality analysis, the cup formulation is sufficient to exhibit the issue, because falsifying the cup equality already falsifies the coincidence rule.
The terminology “red/green” is inherited from the standard graphical presentation of the ZX-calculus, where green nodes represent 2-spiders and red nodes represent 3-spiders. The expression “coincidence” does not denote approximate agreement; it denotes literal equality in the rewrite system.
3. Spiders and the induced compact structures
A green spider 4 is the generator which, on the computational basis, copies 5, sends 6, and annihilates all other basis strings. A red spider 7 is the same construction in the Hadamard basis, that is, in terms of 8 (Stoltz, 10 Jun 2026).
Each spider induces a †Frobenius algebra and thus a compact structure. The rule 9 fixes the green compact structure to be the ambient one by specifying
0
so that “yanking” holds for green. The rule 1 then states that the red compact structure coincides with this same ambient compact structure:
2
This separation between 3 and 4 is conceptually important. 5 does not by itself force the red spider to inherit the same compact structure. The coincidence must be asserted or derived; the minimality result shows that it cannot be derived from the remaining rules.
A common misunderstanding is to treat the red and green compact structures as automatically identical because the two spider families are related by basis change. The countermodel result shows that, at the level of derivability in 6, that identification is an additional axiom rather than a consequence of the rest of the system.
4. Countermodel and scalar-counting argument
The proof of necessity proceeds by constructing an interpretation 7 in ordinary finite-dimensional Hilbert spaces that satisfies all rules of 8 except 9 while falsifying the equation 0 (Stoltz, 10 Jun 2026).
Objects are interpreted as qubit spaces 1, and the structural maps 2 are interpreted as usual. The generators are then modified by scalars depending on type:
3
The key intermediate result is the scalar-counting lemma. For any ZX diagram 4, there is a well-defined exponent
5
where 6, 7, and 8 are the sets of green spiders, red spiders, and Hadamards in 9, and 0 is the total number of incident wires to vertex 1. By induction on the structure of 2,
3
This lemma is the only non-trivial combinatorial construction needed to check that all other rewrite rules preserve the global scalar 4, and hence remain sound under the meta-rule “only connectivity matters.” The exceptional behavior occurs precisely at 5, where the red cup acquires a sign relative to the green cup.
5. Failure of the coincidence equation
Under the countermodel, the green cup is interpreted with scalar 6:
7
By contrast, the red cup is interpreted as
8
again with 9 (Stoltz, 10 Jun 2026).
Consequently one obtains
0
in the model. This directly falsifies 1 while preserving the remaining rules, establishing that the coincidence equation is not derivable from them.
The significance of this argument is methodological as well as logical. It is a countermodel-style independence proof: rather than proving directly that no derivation exists, it supplies a semantics in which every other rule is valid and the target rule fails. This is a standard and particularly sharp form of necessity result for equational calculi.
6. Minimality of 2 and broader implications
Backens–Perdrix–Wang had shown that in their nine-rule set 3 all but two rules are individually necessary, and that at least one of 4 or the bialgebra law 5 is needed (Backens et al., 2017). The later countermodel for 6, together with a separate countermodel for 7 involving a deformation over the ring of dual numbers 8, completes the independence analysis: each of the nine rules is necessary, given only the meta-rule “only connectivity matters” (Stoltz, 10 Jun 2026).
This result sharpens the understanding of completeness and independence in the stabilizer fragment. In particular, it shows that even the compactness of the 9-spider and complementarity expressed by the bialgebra law are logically independent of the rest of the axiom set. A plausible implication is that any extension of these methods to richer fragments, such as Clifford+T, will likewise require tracking a minimal backbone of genuinely independent rules rather than relying on seemingly obvious color-dual identities.
Within the internal logic of the ZX-calculus, the red/green compact-structure coincidence is therefore best understood as a foundational identification rather than a dispensable convenience. It ensures that the two spider families inhabit a common compact setting, and the minimality theorem shows that this coincidence must be stated explicitly if one wants the full power of the simplified stabilizer rewrite system.