Repository navigation
Home
FunctionalDiagrams is a Mathematica package that derives Feynman diagrams by functional derivatives. You write a generating functional and an interaction; the package differentiates them with respect to the sources and the propagators, with the fermion signs of the Grassmann algebra and the symmetry factors, and returns the diagrams. It then recognizes equal diagrams, sorts them into classes, checks them against exact equations (Dyson, Bethe–Salpeter, parquet, Hedin), evaluates them in a few common cases (Matsubara sums, dimensional regularization, one-loop QED) and draws them, in Mathematica or as TikZ for a paper.
This wiki collects practical guides and answers to common questions. The documents of the repository explain the package itself:
| Document | What it gives |
|---|---|
| README | an overview, a first example and a gallery |
| Showcase (PDF) | the physics, step by step, for the electron gas and φ⁴ theory |
| Manual (PDF) | every function, option and convention, with examples |
| Guided tour | a notebook to run (Examples.nb), and the same as a script |
| Map of the functions | every public name by its role in a calculation, with its dependencies (interactive) |
| Demo video | the first example of the README, typed and run |
| Releases | the paclet of every version, with the two PDFs; the history is in the changelog |
With Mathematica 12.1 or later, once:
PacletInstall["https://github.com/n4sd4q/FunctionalDiagrams/releases/download/v2.4.0/FunctionalDiagrams-2.4.0.paclet"];and then in every session:
Needs["FunctionalDiagrams`"]Installation has the other ways (a clone of the repository, a file downloaded by hand), updating and the usual problems.
- Installation: installing, loading, updating and removing the package; which version is loaded
- Conventions: signs, propagators, weights, channels, effective actions and units, in one place
- Recipes
- Declaring a theory: fields, sources, propagators, interaction lines, couplings
- Reading the weights: what the number in front of a picture means
- Orders and simplification: selecting orders, counting and comparing diagrams
- Exact equations: drawing an equation with blobs and checking it order by order
- Particle–particle diagrams: channels, and the order of the external points
- Evaluating diagrams: Matsubara sums and dimensional regularization
- Pictures in LaTeX: TikZ code for a paper, and formulas
- Light and dark notebooks: the colours of the pictures
- Working in scripts: running the package without a notebook
- FAQ
Every block of Mathematica code on these pages is run, in a fresh kernel for each page, by
Development/check_wiki.wl, and
gives exactly what is shown after it. Outputs are shown as a terminal session prints them (OutputForm: strings without
quotes, fractions over two lines); a notebook shows the same in its compact form, with the integrals as ∫ and the delta
functions as δ. Pictures are what DiagramPlot draws, typeset from the TikZ code of the same call. The few blocks that
cannot run as they stand (they download, install or remove the paclet, open a file, depend on your machine, or show a
fragment) are only checked to be valid code. The pages describe version 2.4.0.