Repository navigation
Releases: n4sd4q/FunctionalDiagrams
Release list
FunctionalDiagrams 2.4.0
FunctionalDiagrams 2.4.0 — Feynman diagrams from functional derivatives.
This release is about the pictures. In a notebook they follow its appearance, light or dark, and the blobs of the exact
equations are sized to their labels and joined by parallel lines. There is one new option, "Appearance"; no public
name is removed or renamed, and the expressions are the same as in 2.3.0, so code written for 2.3.0 runs unchanged.
Pictures with blobs or double wavy lines look different, also in their TikZ code. 132 public names, 821 tests, all
passing.
New in this version
- Pictures that follow light and dark notebooks. In Mathematica 14.3 and later, the pictures of
DiagramPlotand
DrawDiagramhave dark lines and text on a light notebook and light ones on a dark notebook (through
LightDarkSwitched). The inside of the blobs, of the external points and of the sources takes the background of the
notebook, so that it hides no line there. The new option"Appearance" -> Automatic | "Light" | "Dark"forces one of
the two, on its own background, for a picture exported to a page of the other kind;
SetOptions[{DiagramPlot, DrawDiagram}, "Appearance" -> "Dark"]sets it for a session. Before 14.3 the pictures keep
the colours of a light notebook. The TikZ code is for white pages and ignores the option.
Pictures
- Labels of blobs. A blob declared with
DeclareBlobis as large as its label needs: the label sits inside it with a
band of hatching all around, so that an accent, a subscript or a superscript is never cut by the outline (Λ̃, Γ_ph,
Γ^(4)). The blobs of one shape have one size in a picture and in all the terms of a sum drawn together. In the pictures
of Mathematica a tilde or a hat is written above its letter. - Triangles.
"Shape" -> "Triangle"is equilateral (it had a narrow 30-degree tip), the same triangle as
"TriangleUp"turned. Its label sits near the incentre and is written 0.8 times smaller, so that Λ̃ keeps the size
of Λ. - Parallel lines between blobs. The lines of a triangle leave from its corners, and a box joined by two lines to two
corners of a triangle (Γ⁰ L₀ Λ, Γ_xc L₀ Λ̃) is as wide as the side between them. A circle with two ports joined to one
other blob (the gap function closed on Γ_pp) has them on the side facing it. A line that leaves a blob outwards is bent
only if it would cross the blob. - The double wavy line is one wavy line drawn double, its strokes 1.2 line widths apart, so that it no longer reads
as one thick line in small pictures. Diamonds are hatched vertically, no longer along two of their edges.
Documents
- The manual and the guided tour describe
"Appearance"(the tour draws a picture forced dark), and the usage message of
DiagramPlotlists every value of"InteractionStyle". - Skeleton expansions are drawn with plain lines, as in the textbooks: every line of Φ[G, W], Σ[G, W], P[G, W] and of
Γ₂[G, D_σ] of φ⁴ theory is a dressed one, and the documents draw it in the plain style of its kind, the screened
interaction W as an ordinary wavy line (the option"Interactions" -> {W}in those pictures). The double wavy line
marks W only where the bare V appears too, as in Hedin's equations, like the double arrow in the Dyson equation; the
usage messages ofDeclareInteractionLineandDeclareLineStylesay so. - The logo has slimmer lines and larger arrow heads, so that the direction of its loop reads at small sizes. The gallery
of the README tells one story per panel (the first example, exact equations, screening, pairing, field theory). The
demo video is 1920×1080 at 60 fps, with a 60 fps preview. A landing page,
https://n4sd4q.github.io/FunctionalDiagrams/, links the repository, the latest release, the two PDFs, the interactive
map of the functions and the video.
Install
The package needs Mathematica 12.1 or later; the pictures that follow light and dark notebooks need 14.3 or later.
PacletInstall["https://github.com/n4sd4q/FunctionalDiagrams/releases/download/v2.4.0/FunctionalDiagrams-2.4.0.paclet"]
Needs["FunctionalDiagrams`"]or download FunctionalDiagrams-2.4.0.paclet below and run PacletInstall["/path/to/FunctionalDiagrams-2.4.0.paclet"].
The paclet contains the showcase, the reference manual and the guided tour; the PDFs are also attached here. The full
list of changes is in the
CHANGELOG.
FunctionalDiagrams 2.3.0
FunctionalDiagrams 2.3.0 — Feynman diagrams from functional derivatives.
Every object is now the functional derivative of a functional you write: Z, W = log Z, Γ[φ̄], Γ[φ̄, G], Φ[G]. The
shortcut functions are the checks. This release has 54 new public names (132 in all) and 805 tests, all passing.
New in this version
- Effective actions as objects.
EffectiveAction2PIgives the 2PI action Γ[G] = Φ[G] − Tr ln(−G⁻¹) − Tr(G₀⁻¹G − 1).
It is stationary at the Dyson equation, and with"MeanFields"it is Γ[φ̄, G] of Cornwall, Jackiw and Tomboulis.
EffectiveAction1PIgives the 1PI action Γ[φ̄]. Potthoff's functionals areLegendreTransformand
SelfEnergyFunctional. Traces are objects (TraceLog,OperatorTrace,OperatorKernel,ExpandTrace), and
ZeroDimensionalValuegives exact checks of the weights in zero dimensions. - Superfields: the functional of Nambu and Gor'kov.
"Statistics" -> "Superfield"treats 𝛙 = (ψ, ψ̄) as one Grassmann
field with an antisymmetric propagator 𝒢, so that the anomalous propagators are variables of Φ.
SuperfieldComponentsprojects the results on ψ and ψ̄: the gap functions, the BCS gap equation, the Gor'kov equations
and the particle–particle kernel.IrreducibleVertex[..., "Channel" -> "s" | "t" | "u" | All]gives the kernels of the
three channels from one functional. - Hubbard–Stratonovich fields in both directions.
HubbardStratonovichdecouples an interaction by an auxiliary field,
andIntegrateOutFieldintegrates a Gaussian field out. Φ[G, W] has the GW approximation as its first diagram, and
Φ[G, D] of electrons and phonons gives Migdal's self-energy. - Feynman integrals in dimensional regularization, with the MS-bar measure.
DiagramLoopIntegralandIntegrateLoops
turn the package's diagrams into integrals and do them,EpsilonExpandandPolePartexpand them in ε, and
BetaFunctionFromZandAnomalousDimensionFromZgive the RG functions. The examples include φ⁴ theory to two loops
and the Wilson–Fisher exponents. - QED at one loop.
QEDIntegrandwrites the diagrams as Dirac traces and products in d dimensions,IntegrateOneLoop
does any one-loop integral by Feynman parameters, andVertexFormFactorsextracts the form factors. The worked
examples are the electron self-energy, the vacuum polarization and the vertex, with Schwinger's α/2π in every gauge
and Z₁ = Z₂. - Smaller additions:
"ConvergenceFactor"in the Matsubara functions;DeclareCouplingand"Couplings"; the
double wavy line for W; better LaTeX for loop integrals; new messages where a mistake used to give a wrong result
without a warning.
Incompatible changes
- Weights of the pictures. The number in front of a picture times the values of its elements is the term, where an
interaction line stands for −V and a vertex for minus its coupling. So Fock has the weight +1, Hartree −1 and the φ⁴
tadpole +½. Only the displayed weights change, not the expressions;"Weights" -> "Coefficients"shows the coefficients. - QED with e > 0: the electron has charge −e and the vertex is +ieγ^μ (
QEDVertex -> {"Vertex", -I}). MeanFieldis displayed φ̄ = ⟨φ⟩. Derivatives with respect to antisymmetric kernels are antisymmetrized. The message
for a functional without sources isFunctionalDiagrams::nosources.
Fixed
EvaluateMatsubara,DiagramIntegrandandCuttingRuleImaginaryPartnow refuse anomalous propagators; before, they
evaluated them as normal lines.- A source inside a
LabelFunctionin a trace or kernel now has a derivative (it was 0). Several fixes of arguments and
messages; the paclet keeps the showcase and the manual in their folders, so that their assets are found in a clone too. - The required version is Mathematica 12.1 (
PacletDirectoryLoadand the format ofPacletInfo.wlneed it).
Pictures and documents
- Pictures: round loops of undirected propagators, cleaner wavy lines, stacked rails for six-point functions,
crossed circles at density points, blobs with ports in a fixed order, and labels that avoid lines. - Documents: the showcase has three parts (many-body theory in the order of a course, quantum field theory, tools). The
manual is reorganized around the principle. The README has a demo video and an interactive map of the functions.
Performance
- The canonical form and the derivatives are faster: the showcase script runs in about two minutes instead of almost
five, with the same results and pictures.
License
GNU General Public License, version 3 or later, with two additional terms (see LICENSE and NOTICE): the attribution
to the author must be kept, and modified versions must say that they are modified, by whom and when, and must not be
distributed under the name FunctionalDiagrams alone. When the package is loaded in a notebook, it prints a two-line
banner: the logo, the name and version, the author, the license, how to cite it (CITATION.cff) and links to the
repository and the manual. Scripts print nothing.
Install
PacletInstall["https://github.com/n4sd4q/FunctionalDiagrams/releases/download/v2.3.0/FunctionalDiagrams-2.3.0.paclet"]
Needs["FunctionalDiagrams`"]or download FunctionalDiagrams-2.3.0.paclet below and run PacletInstall["/path/to/FunctionalDiagrams-2.3.0.paclet"].
The paclet contains the showcase, the reference manual and the guided tour; the PDFs are also attached here. See
CHANGELOG.md for the full list of changes.