HEPMath is hosted by Hepforge, IPPP Durham

HEPMath - Semi-Automatic High Energy Physics Computations in Mathematica

HEPMath is a Mathematica package which facilitates the implementation of computational algorithms for High Energy Physics in Mathematica. Its main features are:

  • Consistent integration of tensors with symbolic indices and index contractions in Mathematica, along with functions to manipulate (expand, collect, differentiate etc.) such expressions. Arbitrary tensors and index types can be defined by the user.
  • Implementation of the basic building blocks of Feynman amplitudes, such as Dirac spinors, Dirac matrices, Lorentz vectors, colour matrices etc. and their algebraic properties.
  • Computation of traces over Dirac matrices in 4 and D dimensions.
  • Simplification of colour structures.
  • Manipulation of loop integrals such as automatic Feynman parametrisation for multi-loop integrals or reduction of one-loop integrals to Passarino-Veltman (tensor) integrals.
  • Seamless interfaces to FeynArts, LoopTools and LHAPDF.
  • Generation and compilation of numerical code, based on Mathematica's Compile and CCodeGenerate functions.
  • Generation of Python extension modules which make the generated functions callable from Python.

Citation Guide

The HEPMath manual is published in

M. Wiebusch, "HEPMath: A Mathematica Package for Semi-Automatic Computations in High Energy Physics," [arXiv:1412.6102v1]

If you use HEPMath for a scientific publication, please cite this article.


Additional Material

A "hands-on" software tutorial on HEPMath was given at the KIT (Karlsruhe, Germany). The accompanying material (notes with exercises, template files and solutions) can be found in this tarball.

Related Software



Please send bug reports to Martin Wiebusch