Approximation Algorithms for Complex-Valued Ising Models on Bounded Degree Graphs

We study the problem of approximating the Ising model partition function with complex parameters on bounded degree graphs. We establish a deterministic polynomial-time approximation scheme for the partition function when the interactions and external fields are absolutely bounded close to zero. Furthermore, we prove that for this class of Ising models the partition function does not vanish. Our algorithm is based on an approach due to Barvinok for approximating evaluations of a polynomial based on the location of the complex zeros and a technique due to Patel and Regts for efficiently computing the leading coefficients of graph polynomials on bounded degree graphs. Finally, we show how our algorithm can be extended to approximate certain output probability amplitudes of quantum circuits.


I. INTRODUCTION
The Ising model partition function plays an important role in combinatorics and statistical physics. In this paper we study the problem of approximating the Ising model partition function in the complex parameter regime on bounded degree graphs. This work is motivated by the close relationship to quantum computation, where it can be shown that approximate evaluations of these partition functions can encode arbitrary quantum computations [1]. A classic result of Jaeger, Vertigan, and Welsh [2] showed that exactly evaluating these partition functions is #P-hard. This was shown to remain true in the approximate case [3] and when restricted to graphs of bounded degree [4]. Therefore, it seems unlikely that an efficient algorithm exists for approximating the partition function for general parameters on bounded degree graphs. Furthermore, it has been conjectured that this problem remains hard on average over certain classes of interactions and external fields [5][6][7]. Resolving these conjectures is important in understanding the complexity of quantum computing.
We establish a deterministic polynomial-time approximation scheme for the Ising model partition function on bounded degree graphs when the interactions and external fields are absolutely bounded close to zero (Corollary 6). This provides a lower bound on when the interactions and external field cause approximations of the Ising model partition function to transition from being contained in P to being #P-hard. Our algorithm is based on an approach due to Barvinok [8,9] for approximating evaluations of a polynomial based on the location of the complex zeros and a technique due to Patel * mail@ryanmann.org; http://www.ryanmann.org and Regts [10] for efficiently computing the leading coefficients of graph polynomials on bounded degree graphs.
Barvinok's approach considers the Taylor expansion of the logarithm of a polynomial about an easy to evaluate point. Suppose that we can show that the complex zeros of the polynomial lie in the exterior of a closed disc centred at this point, then it follows that a truncated Taylor expansion provides an additive approximation to the logarithm of the polynomial at any point in the interior of this closed disc. Now observe that an additive approximation of the logarithm of a polynomial corresponds to a multiplicative approximation of the polynomial.
To construct an algorithm from this approach we need to be able to compute the coefficients of the truncated Taylor expansion. Barvinok showed that computing these coefficients can be reduced to computing the leading coefficients of the polynomial itself. However, to achieve the accuracy required for an approximation scheme, we require a number of leading coefficients that is logarithmic in the degree of the polynomial. For many combinatorial structures, directly computing these coefficients requires quasi-polynomial time.
Patel and Regts [10] showed that, for several classes of graph polynomials on bounded degree graphs, the leading coefficients can be computed in polynomial time. Their approach is based on expressing the coefficients as linear combinations of connected induced subgraph counts of size logarithmic in the size of the graph. It then follows from a result due to Borgs et al. [11], which states that, for bounded degree graphs, we can efficiently enumerate all connected induced subgraphs of logarithmic size.
Barvinok and Soberón [12] established a deterministic quasi-polynomial time algorithm for approximating the multivariate graph homomorphism partition function on bounded degree graphs when the matrix entries are absolutely bounded close to one. In the case that all matrix entries are exactly equal to one, the partition function is easy to evaluate. Barvinok  for bounded degree graphs when the matrix entries are absolutely bounded close to one, the partition function does not vanish. Finally, they proved that the leading coefficients can be computed in quasi-polynomial time. Patel and Regts [10] improved this to a deterministic polynomial-time algorithm by showing that the coefficients can be expressed as linear combinations of connected induced subgraph counts.
In order to establish a polynomial-time approximation scheme for the Ising model partition function, we provide an approximation-preserving polynomial-time reduction to a restricted version of the multivariate graph homomorphism partition function (Proposition 5). We extend the results of Barvinok and Soberón [12] and Patel and Regts [10] to give an algorithm for approximating this restricted version of the multivariate graph homomorphism partition function on bounded degree graphs when the matrix entries are absolutely bounded close to one (Theorem 1). As a consequence, we obtain a deterministic polynomial-time approximation scheme for the Ising model partition function on bounded degree graphs when the interactions and external fields are absolutely bounded sufficiently close to zero. Furthermore, we prove that in this case the Ising model partition function does not vanish (Corollary 7). This may be of independent interest in statistical physics as the possible points of physical phase transitions are exactly the real limit points of complex zeros [13].
Previous work by Liu, Sinclair, and Srivastava [14] studied the problem of approximating the ferromagnetic Ising model partition function based on the location of complex zeros. They gave a deterministic polynomialtime approximation scheme for the Ising model partition function in the ferromagnetic regime for all complex external fields that are not purely imaginary. This can be seen as an algorithmic consequence of the classic Lee-Yang Theorem [15], which states that the ferromagnetic Ising model partition function does not vanish except when the external fields are purely imaginary.
Further work has considered the problem of approximating the Ising model partition function on bounded degree graphs based on the decay of correlations property. Sinclair, Srivastava, and Thurley [16] established a deterministic polynomial-time approximation scheme for the anti-ferromagnetic Ising model partition function on graphs of maximum degree at most ∆ when the interactions and external fields lie in the uniqueness region of the Gibbs measure on the infinite ∆-regular tree, which is exactly the region that the decay of correlation property holds. Sly and Sun [17] showed that for interactions outside of this region, unless RP=NP, there is no fully polynomial-time randomised approximation scheme for the anti-ferromagnetic Ising model partition function on graphs of maximum degree at most ∆ ≥ 3. Independent work by Galanis,Štefankovič, and Vigoda [18] established a similar result in the case of no external field.
Our final result is a polynomial-time algorithm for approximating certain output probability amplitudes of quantum circuits (Corollary 9). Our algorithm is based on the observation that complex-valued Ising model partition functions arise in the output probability amplitudes of quantum circuits [1,19]. We focus on a class of commuting quantum circuits, known as Instantaneous Quantum Polynomial-time (IQP) circuits [20], where the mapping to the Ising model partition function is the most straightforward [4,20,21]. Our algorithm allows us to approximate a certain output probability amplitude of a quantum circuit when the corresponding graph has bounded degree and the interactions and external fields are absolutely bounded close to zero. Eldar and Mehraban [22] used a similar approach to derive a quasipolynomial time algorithm for approximating the permanent of a random matrix with unit variance and vanishing mean in the context of linear optical quantum computing.
This paper is structured as follows. In Section II, we introduce the multivariate graph homomorphism partition function and establish a deterministic polynomialtime algorithm for approximating a restricted version of this partition function on bounded degree graphs when the matrix entries are absolutely bounded close to one. In Section III, we provide an approximation-preserving polynomial-time reduction from the Ising model partition function to this restricted version of the multivariate graph homomorphism partition function. We then use this reduction to establish a deterministic polynomialtime approximation scheme for the Ising model partition function on bounded degree graphs when the interactions and external fields are absolutely bounded sufficiently close to zero. In this regime, we prove that the partition function does not vanish. In Section IV, we show how our algorithm can be extended to approximate certain output probability amplitudes of quantum circuits. Finally, we conclude in Section V with some remarks and open problems.

II. GRAPH HOMOMORPHISM PARTITION FUNCTIONS
A graph homomorphism between two graphs G and H is an adjacency-preserving map between the vertex sets, i.e., a map h : Graph homomorphisms generalise the notion of graph colouring [23]; for example, a graph homomorphism from a graph G to the complete graph K q is equivalent to a proper q-colouring of G.
Hell and Nešetřil [24] proved that the problem of deciding if a homomorphism between two graphs G and H exists is NP-complete. Dyer and Greenhill [25] showed that the corresponding counting problem is #P-hard, unless the graph has some special structure; otherwise it is in P. Furthermore, they showed that this problem remains #P-hard when restricted to graphs of bounded degree. The graph homomorphism partition function is defined as follows.
Definition 1 (Graph homomorphism partition function). Let G = (V, E) be a graph and let A = (a ij ) m×m be a m × m symmetric matrix. Then the graph homomorphism partition function is defined by The graph homomorphism partition function evaluates to many important combinatorial quantities, including counting the number of graph homomorphisms, proper colourings, and independent sets [26].
The complexity of computing graph homomorphism partition functions has been widely studied. Dyer and Greenhill [25] showed that computing Hom(G; A) when A is a fixed symmetric binary matrix is either in P or #P-hard. Moreover, they showed that these hardness results hold even for graphs of maximum degree three. These results were later generalised to non-negative symmetric matrices [27], real symmetric matrices [28], and complex symmetric matrices [29]. Furthermore, the tractability criterion for the matrix is decidable in polynomial time.
The graph homomorphism partition function can be generalised by assigning a m × m symmetric matrix to each edge. The multivariate graph homomorphism partition function is defined as follows.
Definition 2 (Multivariate graph homomorphism partition function). Let G = (V, E) be a graph with the m×m symmetric matrices A = {(a e ij ) m×m } e∈E assigned to its edges. Then the multivariate graph homomorphism partition function is defined by When the matrices are all equal, it is clear that the multivariate and standard graph homomorphism partition functions are equivalent.
For convenience, let us define the polydisc consisting of all sets of m × m symmetric matrices with matrix entries absolutely bounded close to one.
. For a graph G = (V, E), m ∈ Z + , and δ > 0, we define D G,m (δ) to be the closed polydisc consisting of all sets of m × m symmetric ma- Barvinok and Soberón [12] gave a quasi-polynomial time algorithm for approximating Hom M (G; A) when G is a graph of maximum degree at most ∆ and A lies in the interior of the closed polydisc D G,m (δ ∆ ). Here, δ ∆ > 0 is an absolute constant. The absolute constants come from Barvinok's monograph [26], where a simpler proof was presented with better constants. Patel and Regts [10] improved this algorithm to run in polynomial time.
We shall consider a restricted version of the multivariate graph homomorphism partition function, in which the sum is restricted to map a subset of vertices to a fixed index.
Definition 5 (Restricted multivariate graph homomorphism partition function). Let G = (V, E) be a graph with the m × m symmetric matrices A = {(a e ij ) m×m } e∈E assigned to its edges. Further let S ⊆ V be a subset of V and let k ∈ [m] be an integer. Then the restricted multivariate graph homomorphism partition function is defined by The advantage of considering the restricted multivariate graph homomorphism partition function is that, when reduced from the Ising partition function, it will allows us to implement an external magnetic field. This reduction is described in detail in Appendix C.
We extend the results of Barvinok and Soberón [12] and Patel and Regts [10] to give a deterministic polynomial-time approximation scheme for the restricted multivariate graph homomorphism partition function. We have the following theorem. it follows from Lemma 4 that there is a deterministic (|V | / ) O(1) -time algorithm for computing a multiplicative -approximation to P (G, z) for all |z| < δ ∆ /δ. Since δ < δ ∆ , we can take z = 1. Hence, we have a deterministic polynomial-time algorithm for computing a multiplicative -approximation to Hom M (G; A, S, k). This completes the proof.
Our proof of Theorem 1 requires a result of Barvinok and Sobéron [12], which states that Hom M (G; A, S, k) does not vanish on graphs of maximum degree at most ∆ when A lies in the interior of the closed polydisc D G,m (δ ∆ ). Our proof also requires the following lemma, which states that we can efficiently compute the constant term and inverse power sums of the roots of Hom M (G; A(z), S, k).
We prove Lemma 3 in Appendix A. For convenience, let us define the closed disc D of radius δ centred at the origin.
Finally, we require a lemma based on an algorithm of Barvinok [12], which states that, in order to get a multiplicative approximation to a polynomial inside its zerofree disc, it is sufficient to compute the constant term and inverse power sums of its roots. We prove Lemma 4 in Appendix B.

III. ISING MODEL PARTITION FUNCTIONS
The Ising model is described by a graph G = (V, E), with the vertices representing spins and the edges representing interactions between them. A set of edge weights {ω e } e∈E characterise the interactions and a set of vertex weights {υ v } v∈V characterises external fields at each spin. A configuration of the model is an assignment σ of each spin to one of two possible states {−1, +1}. The Ising model partition function is defined as follows.
Definition 7 (Ising model partition function). Let G = (V, E) be a graph with the weights Ω = {ω e } e∈E assigned to its edges and the weights Υ = {υ v } v∈V assigned to its vertices. Then the Ising model partition function is defined by The model is called ferromagnetic if ω e > 0 for all e ∈ E and anti-ferromagnetic if ω e < 0 for all e ∈ E. Otherwise, the model is called non-ferromagnetic.
A classic result of Jerrum and Sinclair [30] establishes a fully polynomial-time randomised approximation scheme for the Ising model partition function for all graphs in the ferromagnetic regime with real vertex weights. In contrast, they showed that no such scheme could exists in the anti-ferromagnetic regime unless RP=NP. Furthermore, they showed that exactly computing the Ising model partition function is #P-hard.
We shall extend the result of Theorem 1 to the Ising model partition function. This is achieved by an approximation-preserving polynomial-time reduction from the Ising model partition function to the restricted multivariate graph homomorphism partition function.

Proposition 5.
There is an approximation-preserving polynomial-time reduction from the Ising model partition function to the restricted multivariate graph homomorphism partition function.
We prove Proposition 5 in Appendix C. Let us define the following closed polyregion, which arises naturally from applying Proposition 5 to Theorem 1.
We have the following corollary of Theorem 1 and Proposition 5. Corollary 6. Fix ∆ ∈ Z + and 0 < δ < δ ∆+1 . There is a deterministic polynomial-time approximation scheme for the Ising model partition function Z Ising (G; Ω, Υ) for all graphs G = (V, E) of maximum degree at most ∆ and all Ω = {ω e } e∈E and all Υ = {υ v } v∈V in the closed polyregion R G (δ).
Proof. The proof follows directly from Theorem 1 and Proposition 5, while noting that the reduction from the Ising model partition to the restricted multivariate graph homomorphism partition function increases the maximum vertex degree by one.
Remark. It is possible to marginally increase the size of the polyregion by applying the k-thickening technique of Jaeger, Vertigan, and Welsh [2].
It is important to mention that the bounds of Corollary 6 are not sharp in general. To see this, let us compare the results in the anti-ferromagnetic regime with no external field, to those of Sinclair, Srivastava, and Thurley [16]. In this case, Corollary 6 tells us that there is a deterministic polynomial-time approximation scheme for the Ising model partition function on graphs of maximum degree at most ∆ when ω e > − log(δ ∆ + 1) for all e ∈ E (noting that in the case of no external field the reduction preserves maximum degree). The results of Sinclair, Srivastava, and Thurley [16] give a deterministic polynomial-time approximation scheme when ∆ ≥ 3 and for all e ∈ E. Hence, the bound of Corollary 6 is not sharp. It is an open problem to prove a sharp bound in the complex case.
We also have the following corollary concerning the location of the complex zeros of the Ising model partition function on bounded degree graphs. This may be of independent interest in statistical physics as the possible points of physical phase transitions are exactly the real limit points of such complex zeros [13].

IV. QUANTUM SIMULATION
Complex-valued Ising model partition functions arise naturally in the output probability amplitudes of quantum circuits [1,19]. In particular, for the class of commuting quantum circuits, known as Instantaneous Quantum Polynomial-time (IQP) circuits [4,20,21]. In this section we shall show how the results of Corollary 6 allow us to approximate output probability amplitudes of IQP circuits and, more generally, universal quantum circuits. First introduced by Shepherd and Bremner [20], IQP circuits comprise only gates that are diagonal in the Pauli-X basis. An IQP circuit is described by an X-program.
Definition 9 (X-program). An X-program is a pair (P, θ), where P = (p ij ) m×n is a binary matrix and θ ∈ [−π, π] is a real angle. The matrix P is used to construct a Hamiltonian of m commuting terms acting on n qubits, where each term in the Hamiltonian is a product of Pauli-X operators, Thus, the columns of P correspond to qubits and the rows of P correspond to interactions in the Hamiltonian.
An X-program induces a probability distribution P (P,θ) known as an IQP distribution.
Definition 10 (P (P,θ) ). For an X-program (P, θ) with P = (p ij ) m×n , we define P (P,θ) to be the probability distribution over binary strings x ∈ {0, 1} n , given by We shall consider X-programs that are induced by a weighted graph.
Definition 11 (Graph-induced X-program). For a graph G = (V, E) with the weights {ω e ∈ [−π, π]} e∈E assigned to its edges and the weights {υ v ∈ [−π, π]} v∈V assigned to its vertices, we define the X-program induced by G to be an X-program X G such that It will be convenient for us to define ψ G as a specific probability amplitude induced by a weighted graph G.
Definition 12 (ψ G ). For a graph G = (V, E) with the weights {ω e ∈ [−π, π]} e∈E assigned to its edges and the weights {υ v ∈ [−π, π]} v∈V assigned to its vertices, we define ψ G to be the probability amplitude given by We note that any X-program can be efficiently represented by a graph-induced X-program [20]. Moreover, X-programs are known to become universal for quantum computation under postselection [31]. Therefore, any quantum amplitude can be expressed in the form of ψ G . The output probability amplitudes of such a graphinduced X-program are proportional to Ising model partition functions with imaginary weights. Proposition 8. Let G = (V, E) be a graph with the weights Ω = {ω e ∈ [−π, π]} e∈E assigned to its edges and the weights Υ = {υ v ∈ [−π, π]} v∈V assigned to its vertices, then, We prove Proposition 8 in Appendix D. We now apply Corollary 6 to Proposition 8 to achieve a deterministic polynomial-time approximation scheme for computing ψ G for all graphs of bounded maximum degree with weights absolutely bounded sufficiently close to zero. Corollary 9. Fix ∆ ∈ Z + and 0 < δ < δ ∆+1 . There is a deterministic polynomial-time approximation scheme for the probability amplitude ψ G for all graphs G = (V, E) of maximum degree at most ∆ with the edge weights {ω e ∈ [−π, π]} e∈E satisfying |ω e | ≤ 2 arcsin(δ/2) for all e ∈ E and the vertex weights {υ v ∈ [−π, π]} v∈V satisfying |υ v | ≤ 2 arcsin(δ/2) for all v ∈ V .
Proof. It follows from Corollary 6 and Proposition 8 that we have a deterministic polynomial-time approximation scheme for computing ψ G for all graphs of maximum degree at most ∆ with Ω = {iω e } e∈E and Υ = {iυ v } v∈V in the closed polyregion R G (δ). For weights in the range [−π, π], this is achieved when |ω e | ≤ 2 arcsin(δ/2) for all e ∈ E and |υ v | ≤ 2 arcsin(δ/2) for all v ∈ V . This completes the proof.
It is known that approximating ψ G up to a multiplicative factor for bounded degree graphs with arbitrary weights in [−π, π] is #P-hard [4], and so it seems unlikely that Corollary 9 can be extended to hold in this case. We note that Corollary 9 holds for classes of graphs with treewidth growing as the square root of the number of vertices; for example, square lattices. For classes of graphs with logarithmic treewidth a deterministic polynomial-time algorithm is known [32].

V. CONCLUSION & OUTLOOK
We have established a deterministic polynomial-time approximation scheme for the Ising model partition function with complex parameters on bounded degree graphs when the interactions and external fields are absolutely bounded by a constant depending on the maximum degree of the graph. Furthermore, we have proven that the partition function does not vanish for this class of Ising models. Finally, we have shown how our algorithm can be extended to approximate certain output probability amplitudes of quantum circuits.
There are a number of interesting problems that remain to be solved. The most obvious of which is to sharpen the bounds of Corollary 6. One approach would be to improve Lemma 2, i.e., prove that the restricted multivariate graph homomorphism partition function does not vanish on a polydisc of a greater radius. It may also be possible to prove sharper bounds for specific graphs of interest. An alternative approach would be to use decay of correlation based arguments [16,33,34]. It is an important open problem to understand the relationship between the location of complex zeros, decay of correlations, and the computational complexity of a function.
Definition 16 (Edge-coloured bounded induced graph counting polynomial [10]). Let P (G; z) be a multiplicative graph polynomial defined by P (G; z) := d(G) n=0 α G,n z n with P (G; 0) = 1. We say that P (G; z) is an edge-coloured bounded induced graph counting polynomial if there exists constants µ, ν ∈ Z + , such that (1) the coefficients α G,n satisfy a G,n = H∈Gµn β H,n Ind(H, G), for certain β H,n and (2) the coefficients β H,n can be computed in time O ν |V (H)| .
Lemma 10 (Patel and Regts [10]). Fix ∆ ∈ Z + , 0 < < 1, and C > 0. Let G = (V, E) be an edge-coloured graph of maximum degree at most ∆. Further let P (G; z) be an edge-coloured bounded induced graph counting polynomial and let be its roots. Then there is a deterministic (|V | / ) O(1) -time algorithm for computing P (G, 0) and the inverse power sums for m = C log(|V | / ). Patel and Regts [10] showed that the multivariate graph homomorphism partition function is an edge-coloured bounded induced graph counting polynomial. We follow a similar approach to show that this remains true in the restricted case.
Lemma 11. Let G = (V, E) be a graph with the m×m symmetric matrices A(z) = {(1 − z(a e ij − 1)) m×m } e∈E assigned to its edges. Further let each edge e ∈ E be assigned a distinct colour. Then, up to an efficiently computable factor, the restricted multivariate graph homomorphism partition function Hom M (G; A(z), S, k) is an edge-coloured bounded induced graph counting polynomial. Then, Since the number of vertices in the subgraph induced by F is at most 2 |F |, we can write P (G; z) = It is clear that P (G; z) is a multiplicative graph polynomial with P (G; 0) = 1. Furthermore, for any graph H ∈ G 2n , the coefficients β H,n can be computed in time O k |V (H)\S| . Hence, P (G; z) is an edge-coloured bounded induced graph counting polynomial with constants µ = 2 and ν = k. This completes the proof.
Taking m = (1 − |t| /δ) −1 log(n/ ), it follows that We shall now show that the truncated Taylor expansion is a multiplicative -approximation to p(t). For the norm, we have ≤ log e f (t)−Tm(f )(t) ≤ .
This completes the proof.
Appendix C: Proof of Proposition 5 We shall now prove Proposition 5.

Proposition 5.
There is an approximation-preserving polynomial-time reduction from the Ising model partition function to the restricted multivariate graph homomorphism partition function.
Proof. Let G = (V, E) be a graph with the 2 × 2 symmetric matrices A = {(a e ij ) 2×2 } e∈E assigned to its edges. Let us construct a new graph G from G by the following vertex gadget. where Ω = {ω e } e∈E and Υ = {υ v } v∈V . Hence, we have an approximation-preserving polynomial-time reduction from the Ising model partition function to the restricted multivariate graph homomorphism partition function. This completes the proof.
Appendix D: Proof of Proposition 8 We shall now prove Proposition 8.
Proof. By definition, This completes the proof.