h}},{{\bf J}}]-\sum_ih_i{\hat m}_i-\sum_{i<j}J_{ij}\hat m_{ij} - S(\hat{\cal P}).$$ The set of equations (\[eq:cei\],\[eq:ccij\]) cannot be solved exactly in general because the computational cost of $Z$ is exponential. Approximations resorting to various mean field methods can be used to evaluate $Z[{{\bf h}},{{\bf J}}]$.

#### Plefka’s expansion {#sec:plefka}

To simplify the problem, it is customary to make use of the Gibbs free energy, i.e. the Legendre transform of the free energy, to impose the individual expectations ${{\bf m}}= \{{\hat m}_i\}$ for each variable: $$G[{{\bf m}},{{\bf J}}] = {{\bf h}}^{T}({{\bf m}}){{\bf m}}+ F[{{\bf h}}({{\bf m}}),{{\bf J}}]$$ (with $F[{{\bf h}},{{\bf J}}] {\stackrel{\mbox{\upshape\tiny def}}{=}}-\log Z[{{\bf h}},{{\bf J}}]$, ${{\bf h}}^{T}{{\bf m}}$ is the ordinary scalar product) where ${{\bf h}}({{\bf m}})$ depends implicitly on ${{\bf m}}$ through the set of constraints $$\frac{\partial F}{\partial h_i} = -m_i.\label{eq:constraints}$$ Note that by duality we have $$\label{eq:dual1}
\frac{\partial G}{\partial m_i} = h_i({{\bf m}}),$$ and $$\label{eq:dual2}
\Bigl[\frac{\partial^2 G}{\partial m_i\partial m_j}\Bigr] = \left[\frac{d{{\bf h}}}{d{{{\bf m}}}}\right]_{ij} 
=\left[\frac{d{{\bf m}}}{d{{{\bf h}}}}\right]^{-1}_{ij}  
= -\Bigl[\frac{\partial^2 F}{\partial h_i\partial h_j}\Bigr]^{-1} = \bigl[\chi^{-1}\bigr]_{ij}.$$ i.e. the inverse susceptibility matrix. Finding a set of $J_{ij}$ satisfying this last relation along with (\[eq:dual1\]) yields a solution to the inverse Ising problem since the $m$’s and $\chi$’s are given. Still a way to connect the couplings 