In a field-theory approach to multi-particle systems, the fermion density is controlled by the value of the fermion
chemical potential \mu. One evaluates the
partition function Z by summing over all classical field configurations, weighted by \exp(-S), where S is the
action of the configuration. The sum over fermion fields can be performed analytically, and one is left with a sum over the
bosonic fields \sigma (which may have been originally part of the theory, or have been produced by a
Hubbard–Stratonovich transformation to make the fermion action quadratic) :Z = \int D \sigma \, \rho[\sigma], where D \sigma represents the measure for the sum over all configurations \sigma(x) of the bosonic fields, weighted by :\rho[\sigma] = \det(M(\mu,\sigma)) \exp(-S[\sigma]), where S is now the action of the bosonic fields, and M(\mu,\sigma) is a matrix that encodes how the fermions were coupled to the bosons. The expectation value of an observable A[\sigma] is therefore an average over all configurations weighted by \rho[\sigma]: : \langle A \rangle_\rho = \frac{\int D \sigma \, A[\sigma] \, \rho[\sigma]}{\int D \sigma \, \rho[\sigma]}. If \rho[\sigma] is positive, then it can be interpreted as a probability measure, and \langle A \rangle_\rho can be calculated by performing the sum over field configurations numerically, using standard techniques such as
Monte Carlo importance sampling. The sign problem arises when \rho[\sigma] is non-positive. This typically occurs in theories of fermions when the fermion chemical potential \mu is nonzero, i.e. when there is a nonzero background density of fermions. If \mu \neq 0, there is no particle–antiparticle symmetry, and \det(M(\mu,\sigma)), and hence the weight \rho(\sigma), is in general a
complex number, so Monte Carlo importance sampling cannot be used to evaluate the integral.
Reweighting procedure A field theory with a non-positive weight can be transformed to one with a positive weight by incorporating the non-positive part (sign or complex phase) of the weight into the observable. For example, one could decompose the weighting function into its modulus and phase: :\rho[\sigma] = p[\sigma]\, \exp(i\theta[\sigma]), where p[\sigma] is real and positive, so : \langle A \rangle_\rho = \frac{ \int D\sigma A[\sigma] \exp(i\theta[\sigma])\, p[\sigma]}{\int D\sigma \exp(i\theta[\sigma])\, p[\sigma]} = \frac{ \langle A[\sigma] \exp(i\theta[\sigma]) \rangle_p}{ \langle \exp(i\theta[\sigma]) \rangle_p}. Note that the desired expectation value is now a ratio where the numerator and denominator are expectation values that both use a positive weighting function p[\sigma]. However, the phase \exp(i\theta[\sigma]) is a highly oscillatory function in the configuration space, so if one uses Monte Carlo methods to evaluate the numerator and denominator, each of them will evaluate to a very small number, whose exact value is swamped by the noise inherent in the Monte Carlo sampling process. The "badness" of the sign problem is measured by the smallness of the denominator \langle \exp(i\theta[\sigma]) \rangle_p: if it is much less than 1, then the sign problem is severe. It can be shown). In general one could write :\rho[\sigma] = p[\sigma] \frac{\rho[\sigma]}{p[\sigma]}, where p[\sigma] can be any positive weighting function (for example, the weighting function of the \mu = 0 theory). The badness of the sign problem is then measured by :\left\langle \frac{\rho[\sigma]}{p[\sigma]}\right\rangle_p \propto \exp(-f V/T), which again goes to zero exponentially in the large-volume limit. ==Methods for reducing the sign problem==