sft-wick: A formalism and package for Feynman-diagram expansion and evaluation in stochastic field theories
Year: 2026
Type: article
Abstract: When stochastic field dynamics are cast into a path-integral formulation, perturbation theory becomes systematic but the resulting expansion quickly grows combinatorially large. The setting targeted here includes fields with several components and several dimensions, matrix propagators, tensor-valued couplings, and non-Gaussian driving noise specified by arbitrary n -point cumulants. Wick pairings grow factorially, and component indices must be routed through the tensor-valued vertices. The useful output is not a raw contraction list, but a diagram table: one entry per topology, with multiplicities, coupling sums, signs, and causal constraints resolved. We present sft-wick , an open-source Python package that constructs these diagram tables and computes their integrals numerically. Given an action and an observable, it enumerates topologically distinct Feynman diagrams, derives their algebraic coefficients, and evaluates the resulting diagram integrals from user-supplied response and cumulant functions. The core algorithm enumerates spatial topologies before routing component indices, avoiding contraction-by-contraction Wick expansion. Response-field constraints, including vanishing response-response contractions, the Itô prescription, and the absence of causal response loops, are enforced during enumeration. Predictions are validated against direct Langevin simulations in two worked examples, with Gaussian and with non-Gaussian driving noise, and agree with the simulations within stated error budgets. PROGRAM SUMMARY Program Title : sft-wick CPC Library link to program files : (to be added by Editor) Developer’s repository link : https://github.com/StatFieldTheory/sft-wick Archived software DOI : 10.5281/zenodo.22284796 (version 0.4.2, the version described in this paper; concept DOI 10.5281/zenodo.20776358 for the latest release) Licensing provisions : BSD-3-Clause Programming language : Python 3.10+ Supplementary material : Worked examples ( demo1 , demo2 , demo3 , and a non-local-vertex tutorial notebook) in the repository examples/ directory, a generated validation catalogue of the test suite ( docs/verification/catalog.rst ), and full documentation at https://sft-wick.readthedocs.io . Nature of problem : Perturbative calculations in stochastic field theories formulated in the Martin–Siggia–Rose (MSR) path-integral framework require enumerating Wick contractions whose count grows factorially with the expansion order, making manual evaluation impractical beyond leading order. Given an action (fields, interaction vertices, couplings) and an observable, one seeks a structured list of all topologically distinct Feynman diagrams at each order with their algebraic coefficients and, given user-supplied driving-field statistics, numerical predictions for the observable at the desired order. Solution method : sft-wick implements a spatial topology engine that enumerates topologically distinct diagram structures rather than individual Wick pairings, reducing the scaling from factorial to polynomial in the number of spatial points. Multiplicities of each topology are computed analytically via a combinatorial formula derived in the appendix. MSR constraints (vanishing ψ – ψ correlators, the Itô prescription 𝑅 ( 𝒙 , 𝒙 ) = 0 , causal R -loop elimination) are enforced natively during enumeration for maximal pruning. Equivalent diagrams are grouped via canonical graph forms, with an optional pynauty backend for higher-order calculations. Numerical evaluation uses spline-cached propagators, tensor-product Gauss–Legendre quadrature on the causal simplex (used for the worked examples) or quasi-Monte Carlo integration with Sobol sequences for higher-dimensional integrals, and embarrassingly parallel diagram evaluation via joblib . For a diagonal constant drift driven by separable noise with an exponential temporal kernel, the correlation propagator is evaluated from a built-in closed form; other kernels use Gauss–Legendre tables whose node count is fixed by a convergence check, and the two paths are validated against each other where the code switches between them. A YAML configuration layer with a command-line driver provides progress reporting and a dry-run cost estimate. Additional comments including restrictions and unusual features : The package supports multi-component field theories and both local and non-local interaction vertices. Driving-field cumulants of arbitrary order are supported: the Gaussian two-point cumulant 𝒦 ( 2 ) has a built-in convenience interface, while higher cumulants 𝒦 ( 𝑚 ) ( m ≥ 3) are declared as non-local ψ -only vertices carrying an arbitrary rank- m coupling tensor (numeric or callable), as exercised by the second worked example ( 𝒦 ( 3 ) , 𝒦 ( 4 ) and 𝒦 ( 5 ) ; examples/demo3 ); a kernel that is narrow compared with the outer integration range may be supplied in R -contracted form. The canonical diagram form scales as k ! in the number of integration variables k with the default backend; the optional pynauty backend uses graph canonicalisation and is recommended for perturbative order ≥ 6. No external computer algebra system is required.
Source: Computer Physics Communications
Author: Zheng Zhang
Institution: University of Manchester
Language: English
Subfield: Statistical and Nonlinear Physics
Field: Physics and Astronomy
Domain: Physical Sciences
Open Access status: hybrid
Estimated APC paid: $4,160
OpenAlex ID: W7165387524
