Skip to content
github-actions[bot] edited this page Oct 28, 2026 · 4 revisions

FunctionalDiagrams

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

Install

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.

Pages

How the code on these pages is checked

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.

Clone this wiki locally