Rust and Python APIs
API reference
The reference for this version lists public items, signatures, fields, defaults, feature requirements, and links to their source definitions.
Rust packages: vakint
Python modules: symbolica.community.vakint
Rust package
The main Rust types make the workflow state explicit:
Vakintowns the topology library and matching/evaluation operations;VakintSettingsowns symbols, precision, normalization, tool paths, validation, and backend order;VakintExpressionandVakintTermseparate numerators from topology atoms;EvaluationOrderandEvaluationMethodselect AlphaLoop, MATAD, FMFT, or pySecDec;NumericalEvaluationResultstores Laurent coefficients in the dimensional regulator.
For a dependency-free canonicalization setup, select an empty backend order before validating:
use vakint::{EvaluationOrder, Vakint, VakintSettings};
let engine = Vakint::new()?;
let settings = VakintSettings {
evaluation_order: EvaluationOrder::empty(),
..VakintSettings::default()
};
engine.validate_settings(&settings)?;vakint_parse! and the related helpers parse Symbolica expressions in Vakint’s namespace. Handle parse failures before passing a user-supplied expression to matching or evaluation.
The Rust orientation identifies the compiled crates, versions, and feature matrix and links directly to native Rustdoc. The generated topology reference records the runtime topology library and supported external-tool versions for this release.
Python community module
Python users import
symbolica.community.vakint; Vakint is not distributed as a standalone Python package. Check that the installed Symbolica distribution includes the Vakint community module before relying on this interface.Install and verify the published assembly with python -m pip install --upgrade symbolica and python -c "import symbolica.community.vakint". Custom Symbolica builds can add Vakint to the symbolica-community assembly, enable the symbolica_community_module feature, and register VakintWrapper while building the extension.
The structured Python reference covers the four exported classes: Vakint, VakintExpression, VakintEvaluationMethod, and VakintNumericalResult. This example constructs a matching-only engine without probing external backends:
from symbolica import E
from symbolica.community.vakint import Vakint
vakint = Vakint(evaluation_order=[])
expr = E(
"topo(prop(18,edge(7,7),k(99),muvsq,1))",
default_namespace="vakint",
)
canonical = vakint.to_canonical(expr, short_form=True)
assert "I1L" in str(canonical)Vakint exposes canonicalization, tensor reduction, integral evaluation, complete evaluation, and numerical conversion. VakintEvaluationMethod constructs configured backend choices. VakintNumericalResult converts Laurent coefficients to Python tuples and compares results with thresholds and optional errors.
Construct one engine and reuse it. When enabling pySecDec, provide numerical masses and external momenta where the topology requires them. Reuse existing pySecDec output only while debugging, and remove it before evaluating changed inputs.
Source starting points are the Rust API and the Python module.