  Zero-free based algorithm is a major technique for deterministic approximate
counting. In Barvinok's original framework[Bar17], by calculating truncated
Taylor expansions, a quasi-polynomial time algorithm was given for estimating
zero-free partition functions. Patel and Regts[PR17] later gave a refinement of
Barvinok's framework, which gave a polynomial-time algorithm for a class of
zero-free graph polynomials that can be expressed as counting induced subgraphs
in bounded-degree graphs.
  In this paper, we give a polynomial-time algorithm for estimating classical
and quantum partition functions specified by local Hamiltonians with bounded
maximum degree, assuming a zero-free property for the temperature.
Consequently, when the inverse temperature is close enough to zero by a
constant gap, we have polynomial-time approximation algorithm for all such
partition functions. Our result is based on a new abstract framework that
extends and generalizes the approach of Patel and Regts.
