  We present an efficient quantum algorithm for the exact evaluation of either
the fully ferromagnetic or anti-ferromagnetic q-state Potts partition function
Z for a family of graphs related to irreducible cyclic codes. This problem is
related to the evaluation of the Jones and Tutte polynomials. We consider the
connection between the weight enumerator polynomial from coding theory and Z
and exploit the fact that there exists a quantum algorithm for efficiently
estimating Gauss sums in order to obtain the weight enumerator for a certain
class of linear codes. In this way we demonstrate that for a certain class of
sparse graphs, which we call Irreducible Cyclic Cocycle Code (ICCC_\epsilon)
graphs, quantum computers provide a polynomial speed up in the difference
between the number of edges and vertices of the graph, and an exponential speed
up in q, over the best classical algorithms known to date.
