Symbolica is a computer algebra system for Python and Rust. This package adds community tools for symbolic integration, tensor algebra, and high-energy physics.
The community extensions include:
- Symbolic integration with step-by-step explanations.
- Tensor networks, Dirac algebra, and color algebra with Spenso and Idenso.
- Feynman diagrams, process generation, models, and kinematics with FeynKit.
- Exact and numerical loop integration, integral reduction, and sector decomposition.
- Massive vacuum integrals with Vakint.
Install with Python 3.9 or newer:
pip install symbolicaIn Pyodide 314.x (Python 3.14), install with micropip:
import micropip
await micropip.install("symbolica")Vakint and compiled tensor evaluators require a native Python installation.
Use Symbolica to manipulate expressions and compute integrals:
from symbolica import E, S
x = S("x")
print(E("(x+1)^2").expand())
print(E("x^2").integrate(x))Import community tools from symbolica.community:
from symbolica.community import tensor
from symbolica.community.hepkit import FeynmanDiagram, Model, Generator, TensorReducerFor a complete introduction to Symbolica, see the documentation.
- HEP guide: diagrams, tensors, and loop calculations.
- One-loop reduction: reduce integrals and evaluate their coefficients.
- Numerical CFF and LTD: compare energy representations and numerical integration methods.
- Higgs-pair production: explore diagrams, sector decomposition, and numerical integration.
- Pyodide playground: use Symbolica in the browser.
Ask questions and discuss Symbolica on Zulip. For contributions, see the contribution guidelines. For independent extension development, see the extension author guide. For local WASM builds, see the build guide.