Overview
Vakint
This python library aims at the analytical and numerical evaluation of single-scale vacuum integrals in Quantum Field Theory. It combines native Symbolica algebra with selectable integral-evaluation backends. The opt-in RustRed scalar backend and default FeynKit tensor backend provide a FORM-independent runtime path. Historical AlphaLoop, MATAD and FMFT reduction backends remain available and retain their external-executable requirements.
integral_from_diagram accepts an existing HEPKit vacuum graph, its routed family and a native scalar numerator through Vakint’s Rust bindings. The result is a rich VakintExpression; numerical Laurent results support precision-preserving to_expression() and Symbolica’s formatted() display. to_list() remains a convenience f64 view.
Four-loop RustRed evaluation uses shipped guarded candidates and validated terminal catalogs. A successful requested integral is not full-family closure, and freshly generated notebook artifacts are not automatically installed here.
For questions or bug reports, visit https://github.com/alphal00p/vakint/.
Citables
Contributors
- Valentin Hirschi valentin.hirschi@gmail.com
Example:
from symbolica.community.hepkit.vakint import Vakint, VakintEvaluationMethod, VakintExpression, VakintNumericalResult
from symbolica import E, S
masses = {"muvsq": 2., "mursq": 3.}
external_momenta = {
1: (0.1, 0.2, 0.3, 0.4),
2: (0.5, 0.6, 0.7, 0.8)
}
## Use vakint defaults with:
## vakint = Vakint()
## Or specify more options:
vakint = Vakint(
integral_normalization_factor="MSbar",
mu_r_sq_symbol=S("mursq"),
# If you select 5 terms, then MATAD will be used, but for 4 and fewer, alphaLoop is will be used as
# it is first in the evaluation_order supplied.
number_of_terms_in_epsilon_expansion=4,
evaluation_order=[
VakintEvaluationMethod.new_alphaloop_method(),
VakintEvaluationMethod.new_matad_method(),
VakintEvaluationMethod.new_fmft_method(),
# VakintEvaluationMethod.new_pysecdec_method(
# min_n_evals=10_000,
# max_n_evals=1000_000,
# numerical_masses=masses,
# numerical_external_momenta=external_momenta
# ),
],
form_exe_path="form",
python_exe_path="python3",
)
integral = E("""
(
k(1,11)*k(2,11)*k(1,22)*k(2,22)
+ p(1,11)*k(3,11)*k(3,22)*p(2,22)
+ p(1,11)*p(2,11)*(k(2,22)+k(1,22))*k(2,22)
)*topo(
prop(1,edge(1,2),k(1),muvsq,1)
* prop(2,edge(2,3),k(2),muvsq,1)
* prop(3,edge(3,1),k(3),muvsq,1)
* prop(4,edge(1,4),k(3)-k(1),muvsq,1)
* prop(5,edge(2,4),k(1)-k(2),muvsq,1)
* prop(6,edge(3,4),k(2)-k(3),muvsq,1)
)""", default_namespace="vakint")
print(f"
Starting integral:
{VakintExpression(integral)}")
canonical_integral = vakint.to_canonical(integral, short_form=True)
print(f"
Canonical integral:
{VakintExpression(canonical_integral)}")
tensor_reduced_integral = vakint.tensor_reduce(canonical_integral)
print(f"
Tensor reduced integral:
{
VakintExpression(tensor_reduced_integral)}")
evaluated_integral = vakint.evaluate_integral(tensor_reduced_integral)
print(f"
Evaluated integral:
{evaluated_integral}")
## Direct evaluation all at once
direct_evaluation = vakint.evaluate(integral)
assert direct_evaluation == evaluated_integral
num_eval, num_error = vakint.numerical_evaluation(
evaluated_integral, params=masses, externals=external_momenta)
print(f"
Numerical evaluation:
{num_eval}")
print(f"
Numerical evaluation as list:
{num_eval.to_list()}")
print(f"
Numerical evaluation, as expression:
{vakint.numerical_result_to_expression(num_eval)}")
## MSbar reference, cross-checked with AlphaLoop and MATAD.
benchmark = VakintNumericalResult([
(-3, (0.0, -1.1173609576420288e-6)),
(-2, (0.0, -6.5100173620734605e-6)),
(-1, (0.0, -2.0905712543667471e-5)),
(0, (0.0, -7.3459590332116190e-5)),
])
match_res, match_msg = benchmark.compare_to(
num_eval, relative_threshold=1.0e-10
)
print(f"
Match result: {match_res}, {match_msg}")
assert match_res
Vakint requires a native installation and the external programs used by the selected evaluation method (for example FORM). It is not available in the browser notebooks.
Classes
Vakint |
Vakint engine and settings used for matching, reduction, and evaluation |
VakintEvaluationMethod |
One configured backend in a Vakint instance’s evaluation order. |
VakintExpression |
A Vakint integral split into its numerator and normalized topology structure |
VakintNumericalResult |
Numerical Laurent series in the dimensional-regularization parameter epsilon. |
Functions
integral_from_diagram |
Checked scalar-vacuum ingress from the graph’s stored routing; no text parsing. |
integral_from_diagram
integral_from_diagram(
diagram: FeynmanDiagram,
family: IntegralFamily,
numerator: Expression,
*,
powers: typing.Optional[typing.Sequence[int]] = None,
parameter_substitutions: typing.Optional[typing.Mapping[Expression, Expression]] = None,
external_momenta: typing.Sequence[Expression] = (),
) -> VakintExpressionChecked scalar-vacuum ingress from the graph’s stored routing; no text parsing.