\(}\qquad {gs-hypergraph}\)\(Indeed this was the original motivation for considering H-boxes of arbitrary arity. Using a method analogous to proofs in Appendix~\ref {sec:bang-rules}, we can routinely introduce !-boxes to known rules involving graph states (e.g. local complementation and feed-forward rules) to generalise them to hypergraph states. For example, introducing !-boxes to the local complementation rule enables complementing hyperedges of arbitrary arity overlapping on a single vertex: \)\(\scalebox {0.8}{{lc1}} \ \ = \ \ \scalebox {0.8}{{lc2}}\qquad \textrm {\Large \)\(}\qquad \scalebox {0.8}{{lc-bb1}} \ \ = \ \ \scalebox {0.8}{{lc-bb2}}\)\(This potentially gives a powerful new language and set of techniques for working with hypergraph states.Exploring these techniques, and the relationship to known rules for manipulating hypergraph states is a topic of future work.\) In another direction, if we consider diagrams whose H-boxes are labelled by a fixed root of unity \(\omega := \exp (i \pi /2^m)\) , we obtain an encoding for unitary gates described by arbitrary phase polynomials [1]}, i.e. gates of the form \(U_{\phi } | \vec{b} \rangle  = \omega ^{\phi (\vec{b})} | \vec{b} \rangle \)  for some polynomial \(\phi (\vec{b})\)  over \(n\)  boolean variables. These have a simple graphical representation, where Z-spiders represent variables and \(\omega \) -labelled H-boxes represent terms in the phase polynomial. For example:
\({phase-poly}\qquad \qquad \textrm {where}\qquad \phi (\vec{b}) = {\color {purple} b_1 b_2} + {\color {purple} b_1 b_2 b_3} + {\color {purple} b_3 b_4}\) 
