  The ZH-calculus is a complete graphical calculus for linear maps between
qubits that admits a straightforward encoding of hypergraph states and circuits
arising from the Toffoli+Hadamard gate set. In this paper, we establish a
correspondence between the ZH-calculus and the path-sum formalism, a technique
recently introduced by Amy to verify quantum circuits. In particular, we find a
bijection between certain canonical forms of ZH-diagrams and path-sum
expressions. We then introduce and prove several new simplification rules for
the ZH-calculus, which are in direct correspondence to the simplification rules
of the path-sum formalism. The relatively opaque path-sum rules are shown to
arise naturally from two powerful families of rewrite rules in the ZH-calculus.
The first is the extension of the familiar graph-theoretic simplifications
based on local complementation and pivoting to their hypergraph-theoretic
analogues: hyper-local complementation and hyper-pivoting. The second is the
graphical Fourier transform introduced by Kuijpers et al., which enables
effective simplification of ZH-diagrams encoding multi-linear phase polynomials
with arbitrary real coefficients.
