  An algorithm and its first implementation in C# are presented for assembling
arbitrary quantum circuits on the base of Hadamard and Toffoli gates and for
constructing multivariate polynomial systems over the finite field Z_2 arising
when applying the Feynman's sum-over-paths approach to quantum circuits. The
matrix elements determined by a circuit can be computed by counting the number
of common roots in Z_2 for the polynomial system associated with the circuit.
To determine the number of solutions in Z_2 for the output polynomial system,
one can use the Groebner bases method and the relevant algorithms for computing
Groebner bases.
