ABSTRACT (original article): We present a Mathematica package AmpRed for the semi-automatic calculations of multi-loop Feynman amplitudes with high efficiency and precision. AmpRed implements the methods of integration by parts and differential equations in the Feynman-parameter representation. It allows for the calculations of general parametric integrals (which may not have momentum-space correspondences). Various user-friendly tools for multi-loop calculations, such as those to construct and solve differential equations for Feynman integrals, are provided. It can also deal with tensor algebras in non-relativistic field theories. Interfaces to some packages, like QGRAF and FORM, are also provided. CITATION (original article): Wen Chen (2025), Semi-automatic calculations of multi-loop Feynman amplitudes with AmpRed, Computer Physics Communications, Volume 312, 109607, ISSN 0010-4655, https://doi.org/10.1016/j.cpc.2025.109607.
AmpRed repo: https://gitlab.com/chenwenphy/ampred
Feynman amplitudes
Most observables in high energy physics are expressed in terms of amplitudes:​
S
fi
=〈
φ
f
|
φ
i
〉=I+
4
i(2π)
(4)
δ
(
P
f
-
P
i
)
M
ij
An example: four-photon scattering
The amplitude:
Out[]=
Dimensional regularization:​∫
4
d
⟶ ∫
d
d
Installation
Download from: https://gitlab.com/chenwenphy/ampred
In principle, the downloaded package can be put in an arbitrary directory, but it is suggested to put it in a default directory, like:
In[]:=
$UserBaseDirectory
Out[]=
/home/chern/.Mathematica
AmpRed is written in Mathematica, and no installation is needed. It can be imported by running:
In[]:=
<<AmpRed`
************ AmpRed ************
********** Version 1.0 **********
Author: Wen Chen (chenwenphy@gmail.com)
In[]:=
AmpRed[]
Out[]=
{Version1.0,Path/home/chern/.Mathematica/Applications/AmpRed/,Names{alpcoe,alphaa,AlphaAddScale,AlphaAsymptoticExpansion,AlphaBasis,AlphaClear,AlphaContinue,alphad,AlphaD,AlphaDES,alphadim,AlphaDual,AlphaInfo,AlphaInt,AlphaIntEvaluate,AlphaIntEvaluateN,AlphaIntExplicit,AlphaLoad,AlphaParametrize,AlphaReduce,AlphaRegions,AlphaSave,AlphaSeries,AlphaSI,AlphaSIExplicit,AlphaSingularQ,AlphaToFeynman,AlphaUF,alphaw,alphax,alphay,alphaz,alpint,ApartG,ARCharge,ARMass,ARQgraf,ARTikzFeynman,ARToForm,ARWaveFunction,CIIJoin,CIIShuffle,CIIToGPL,CIteratedInt,CIteratedIntN,ClearTemporaryFiles,ColourCasimir,ColourCasimirExplicit,ColourChain,ColourIndex,ColourN,ColourSimplify,ColourTrace,CompleteTIP,ContractLI,Decontract,DecontractFM,DESAsymptoticSolve,DESBoundary,DESFuchsify,DESGraph,DESNormalize,DESSingularities,DESSolveN,DESSort,DESTrees,DiracGamma,DiracSigma,DiracSpinor,Div4D,DoForm,DualBases,DysonSolve,eps,ExpandAR,ExplicitLorentzIndex,ExtractBasis,FeynmanGraph,FeynmanInt,FeynmanIntExplicit,FeynmanPropagator,FormToAR,GPLContinue,GPLDistribute,GPLIntegrate,GPLJoin,GPLSeries,GPLShuffle,GPLTransform,GPolyLog,GPolyLogN,GramDeterminant,GraphToTensorInt,HermiteConjugate,HoldAR,HolderConvolution,IndShfCh,IndShfCl,LandauConditions,LeviCivita,LoopIntegralMeasure,LoopMomentum,LorentzIndex,MagnusExpansion,MagnusSolve,MBDelta,MBeta,MBRepresentation,MBRepresentationInverse,MGamma,Momentum,MomentumExpand,NewAlphaInt,PaintFeynmanGraph,Pair,Pairs,Permutations2,PhaseSpaceIntegralMeasure,PolarizationSum,PolarizationTensor,PolarizationVector,Propagator,PropagatorExplicit,PVScalar,PVScalarDB,QhullNorms,RelabelIndex,ReplaceSubexpressions,ReplaceSubexpressionsBack,Save2,SetKinematics,ShuffleProduct,SortGraph,SpinorChain,SpinorChainSimplify,SpinProjector,SplitGraph,SquareAmplitude,StuffleProduct,Subsets2,Syzygies,TensorInt,TensorIntExplicit,TensorIntToGraph,ToFeynmanInt,ToPVScalar,ToTensorInt,$ColourN,$LoopPrefactor,$PreString}}
In[]:=
Options[AmpRed]
Out[]=
{Directory/home/chern/.Mathematica/Applications/AmpRed/manual/,FileBaseNameAmpRed,Path{},LoadNRTrue,LoadAuxTrue,UseFireFalse,UseKiraFalse,UseEpsilonFalse,MemoryConstraintAutomatic,TimeConstraint200,SpaceTimeDimension4,MetricSignature{1,3},LoopPrefactorAutomatic,SpaceDimension3}

Warm up: calculate the amplitudes of four-photon scattering with a few lines of codes

Define the kinematics first:
In[]:=
SetKinematics[{p[1],p[2]}{k[1],k[2]},{0,0}{0,0}];
In[]:=
s=1;​​t=-1/3;​​m=2;
Import the amplitudes generated by FeynArts convert them to the format of AmpRed:
amplitudes=FA2AR[Get["./FourPhotonAmplitudes.m"],ToFeynmanIntTrue]/.{Incomingp,Outgoingk,FA["ME"]m,FA["EL"]1}//Total;
Tensor reduction:
amplitudes1=amp//SpinorChainSimplify;
Integral reduction and numerical evaluation of master integrals:
amplitudes2=AlphaIntEvaluateN[amp1,6,PrecisionGoal20]//First//epsSeries;
Square the total amplitude:
In[]:=
squaredamplitude=SquareAmplitude[amplitudes2]//epsSeries;
Result:
In[]:=
squaredamplitude
Out[]=
2.732504612406×
-10
10

Generate amplitudes

Generate amplitudes with qgraf:
(A Fortran compiler, like gfortran is needed. )
In[]:=
graphs=ARQgraf[{"F","-F"}{"V","V"},0,"Model""QCD",Style"Diagram"];
In[]:=
graphs//ARTikzFeynman
Out[]=

,
,

In[]:=
amplitudes=ARQgraf[{"F","-F"}{"V","V"},0,"Model""QCD",Style"Amplitude"];
In[]:=
amplitudes
Out[]=
-
2
GS
1
2
(-
p
1
-
p
2
)
ci(-4)
t
ci(-2)ci(2)
ci(2)
T
ci(-3)ci(-1)
fl(-3)fl(-1)
δ
v
(
p
2
).(
k
2
-
k
1
).u(
p
1
)

ϵ
k
1
·

ϵ
k
2
-
2
GS
1
2
(-
p
1
-
p
2
)
ci(-4)
t
ci(-2)ci(2)
ci(2)
T
ci(-3)ci(-1)
fl(-3)fl(-1)
δ
(
k
1
+
p
1
+
p
2
)·

ϵ
k
2
v
(
p
2
).

ϵ
k
1
.u(
p
1
)-
2
GS
1
2
(-
p
1
-
p
2
)
ci(-4)
t
ci(-2)ci(2)
ci(2)
T
ci(-3)ci(-1)
fl(-3)fl(-1)
δ
(-
k
2
-
p
1
-
p
2
)·

ϵ
k
1
v
(
p
2
).

ϵ
k
2
.u(
p
1
),-
2
GS
fl(-3)fl(-1)
δ
M
Ffl(-3)
[
ci(-4)
T
·
ci(-2)
T
]
ci(-3)ci(-1)
1
2
(
p
1
-
k
1
)
-
2
M
Ffl(-3)
v
(
p
2
).

ϵ
k
2
.

ϵ
k
1
.u(
p
1
)-
2
GS
fl(-3)fl(-1)
δ
[
ci(-4)
T
·
ci(-2)
T
]
ci(-3)ci(-1)
1
2
(
p
1
-
k
1
)
-
2
M
Ffl(-3)
v
(
p
2
).

ϵ
k
2
.(
p
1
-
k
1
).

ϵ
k
1
.u(
p
1
),-
2
GS
fl(-3)fl(-1)
δ
M
Ffl(-3)
[
ci(-2)
T
·
ci(-4)
T
]
ci(-3)ci(-1)
1
2
(
p
1
-
k
2
)
-
2
M
Ffl(-3)
v
(
p
2
).

ϵ
k
1
.

ϵ
k
2
.u(
p
1
)-
2
GS
fl(-3)fl(-1)
δ
[
ci(-2)
T
·
ci(-4)
T
]
ci(-3)ci(-1)
1
2
(
p
1
-
k
2
)
-
2
M
Ffl(-3)
v
(
p
2
).

ϵ
k
1
.(
p
1
-
k
2
).

ϵ
k
2
.u(
p
1
)

Tensor algebras

Metrics, four vectors, and dot products of vectors are expressed in terms of the pairings of Lorentz indices and/or momenta:
Pair, LorentzIndex, and Momentum are not protected:
Dirac spinors and Dirac gamma matrices:
Chains of gamma matrices
Trace of a spinor chain:
Contract metrics and momenta:
Calculate the trace of a chain of gamma matrices:
Hermite conjugate of an expression:
Sum over polarizations:
Colour matrices:
A chain of colour matrices:
Colour algebras:

Feynman integrals

Conventions

Tensor integrals:
Integrals with linear propagators:
Integrals with cuts:
Conversion:
Paint Feynman diagrams:

Parametrization

Back to momentum space:
Parametrization free of dimensional shift:

Integral reduction

Symbolic IBP:

Save and load cache

Numerical calculation of master integrals

Differential equations

Differentiation:
Construct differential equations:
User defined function of reduction:
Boundary conditions:
Solve differential equations

Interfaces

Do tensor algebras using FORM:
Reduce integrals using KIRA:

Algebras in nonrelativistic field theories

Convert Dirac spinors (and gamma matrices) to Weyl spinors (and Pauli matrices):
Reduction of chains of Pauli matrices:
Decomposition into spherical tensors

CITE THIS NOTEBOOK

Semi-automatic calculations of multi-loop Feynman amplitudes with AmpRed​
by Wen Chen​
Wolfram Community, STAFF PICKS, May 1, 2025
​https://community.wolfram.com/groups/-/m/t/3453495