Vakint
symbolica.community.hepkit.vakint Class
Vakint(run_time_decimal_precision: Optional[int] = None, evaluation_order: Optional[Sequence[VakintEvaluationMethod]] = None, epsilon_symbol: Optional[Expression] = None, mu_r_sq_symbol: Optional[Expression] = None, form_exe_path: Optional[str] = None, python_exe_path: Optional[str] = None, verify_numerator_identification: Optional[bool] = None, integral_normalization_factor: Optional[str] = None, allow_unknown_integrals: Optional[bool] = None, clean_tmp_dir: Optional[bool] = None, number_of_terms_in_epsilon_expansion: Optional[int] = None, use_dot_product_notation: Optional[bool] = None, temporary_directory: Optional[str] = None, *, tensor_reduction_method: Optional[str] = None) Vakint engine and settings used for matching, reduction, and evaluation.
Construct one instance and reuse it: initialization processes the complete topology library.
Constructor
#Create a new Vakint instance, specifying details of the evaluation stack. Note that the same instance can be recycled across multiple evaluations. Note that the creation of a Vakint instance involves the processing and creation of the library of all known topologies, which can be time consuming. External executables are validated when an operation needs them, so the FeynKit tensor backend can be used on systems without FORM.
Examples
from symbolica.community.hepkit.vakint import Vakint
vakint = Vakint(evaluation_order=[])
vakint is not NoneAn empty evaluation order is appropriate for matching, canonicalization, and tensor reduction. Add explicit VakintEvaluationMethod entries before evaluating an integral; each operation validates the external executables it needs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
run_time_decimal_precision | Optional[ | None | The decimal precision to be used during the evaluation. Default is 17. |
evaluation_order | Optional[ | None | A list of |
epsilon_symbol | Optional[ | None | The symbol to be used for the dimensional regularisation parameter epsilon. Default is "ε". |
mu_r_sq_symbol | Optional[ | None | The symbol to be used for the renormalisation scale squared. Default is "mursq". |
form_exe_path | Optional[ | None | The path to the FORM executable. Default is "form". |
python_exe_path | Optional[ | None | The path to the Python executable. Default is "python3". |
verify_numerator_identification | Optional[ | None | Whether to verify the identification of numerator structures. Default is True. |
integral_normalization_factor | Optional[ | None | The normalization factor to be used for integrals. Can be "MSbar", "pySecDec", "FMFTandMATAD" or a custom string. Default is "MSbar". |
allow_unknown_integrals | Optional[ | None | Whether to allow unknown integrals to be processed. Default is True. |
clean_tmp_dir | Optional[ | None | Whether to clean the temporary directory after evaluation. Default is True, unless the environment variable VAKINT_NO_CLEAN_TMP_DIR is set. |
number_of_terms_in_epsilon_expansion | Optional[ | None | The number of terms in the epsilon expansion to be computed. Default is 4. |
use_dot_product_notation | Optional[ | None | Whether to use dot product notation for scalar products. Default is False. |
temporary_directory | Optional[ | None | The path to the temporary directory to be used. Default is None, in which case a system temporary directory will be used. |
tensor_reduction_method | Optional[ | None | Keyword-only. Numerator tensor-reduction backend: "feynkit" is the default, native backend and does not require FORM; "alphaloop" explicitly selects the historical FORM projector. |
Member details
numerical_result_from_expression
Method#numerical_result_from_expression(expr: Expression) -> VakintNumericalResultInterpret a Symbolica expression as a numerical Laurent series in epsilon.
Examples
from symbolica import E
from symbolica.community.hepkit.vakint import Vakint
vakint = Vakint(evaluation_order=[])
result = vakint.numerical_result_from_expression(
E("vakint::ε^-2 + 1 + 0.12*vakint::ε^-1")
)
sorted(exponent for exponent, _ in result.to_list())Parameters
| Name | Type | Default | Description |
|---|---|---|---|
expr | Expression | — | A Symbolica expression representing a Laurent series in the dimensional regularisation parameter epsilon specified in the vakint engine. |
numerical_evaluation
Method#numerical_evaluation(evaluated_integral: Any, params: Mapping[str, float], externals: Optional[Mapping[int, tuple[float, float, float, float]]] = None) -> tuple[VakintNumericalResult, Optional[VakintNumericalResult]] Substitute numerical parameters into an integral already evaluated parametrically by Vakint.
Examples
from symbolica import E
from symbolica.community.hepkit.vakint import Vakint
vakint = Vakint(evaluation_order=[])
evaluated = E(
"muvsq*vakint::ε^-1 + mursq",
default_namespace="vakint",
)
result, error = vakint.numerical_evaluation(
evaluated,
{"muvsq": 2.0, "mursq": 3.0},
)
sorted(exponent for exponent, _ in result.to_list())
error is NoneParameters
| Name | Type | Default | Description |
|---|---|---|---|
evaluated_integral | Any | — | A Symbolica expression representing an integral that has been evaluated parametrically by Vakint. |
params | Mapping[ | — | A dictionary mapping parameter names to their numerical values. |
externals | Optional[ | None | An optional dictionary mapping external momentum indices to their numerical 4-vector values. |
numerical_result_to_expression
Method#numerical_result_to_expression(result: VakintNumericalResult) -> ExpressionConvert a Vakint numerical result to a Symbolica Laurent-series expression.
Examples
from symbolica.community.hepkit.vakint import Vakint, VakintNumericalResult
vakint = Vakint(evaluation_order=[])
result = VakintNumericalResult([
(-1, (2.0, 0.0)),
(0, (3.0, 0.0)),
])
expression = vakint.numerical_result_to_expression(result)
"ε" in str(expression)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
result | VakintNumericalResult | — | — |
to_canonical
Method#to_canonical(integral_expression: Expression, short_form: Optional[bool] = None) -> Expression Convert a Vakint expression to canonical momentum routing and topology numbering.
Examples
from symbolica import E
from symbolica.community.hepkit.vakint import Vakint
vakint = Vakint(evaluation_order=[])
integral = E(
"topo(prop(18,edge(7,7),k(99),muvsq,1))",
default_namespace="vakint",
)
canonical = vakint.to_canonical(integral, short_form=True)
"I1L" in str(canonical)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
integral_expression | Expression | — | A Symbolica expression representing a vakint integral. |
short_form | Optional[ | None | Whether to use the short form for the topology representation. Default is False. |
tensor_reduce
Method#tensor_reduce(integral_expression: Expression) -> ExpressionReduce the tensor integrals in a Vakint expression to scalar integrals.
Examples
from symbolica import E
from symbolica.community.hepkit.vakint import Vakint
vakint = Vakint(evaluation_order=[])
integral = E(
"k(1,101)*k(1,102)*topo(prop(1,edge(1,1),k(1),muvsq,1))",
default_namespace="vakint",
)
reduced = vakint.tensor_reduce(integral)
"g(101,102)" in str(reduced)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
integral_expression | Expression | — | A Symbolica expression representing a vakint integral. |
evaluate_integral
Method#evaluate_integral(integral_expression: Expression) -> ExpressionPerform the parametric evaluation of *only the integral* appearing in the Symbolica expression given in input representing a vakint integral. The numerator is left unchanged.
Examples
from symbolica import E
from symbolica.community.hepkit.vakint import Vakint, VakintEvaluationMethod
vakint = Vakint(
evaluation_order=[VakintEvaluationMethod.new_alphaloop_method()]
)
integral = E(
"topo(prop(1,edge(1,1),k(1),muvsq,1))",
default_namespace="vakint",
)
evaluated = vakint.evaluate_integral(integral)
"ε" in str(evaluated)The AlphaLoop evaluation method used here invokes FORM. Configure form_exe_path if FORM is not available as form on PATH.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
integral_expression | Expression | — | A Symbolica expression representing a vakint integral. |
evaluate
Method#evaluate(integral_expression: Expression) -> ExpressionPerform the complete parametric evaluation of the Vakint integral represented by the Symbolica expression given in input. Note that the tensor reduction will be automatically performed on the input given.
Examples
from symbolica import E
from symbolica.community.hepkit.vakint import Vakint, VakintEvaluationMethod
vakint = Vakint(
evaluation_order=[VakintEvaluationMethod.new_alphaloop_method()]
)
integral = E(
"k(1,101)*k(1,102)*topo(prop(1,edge(1,1),k(1),muvsq,1))",
default_namespace="vakint",
)
evaluated = vakint.evaluate(integral)
"g(101,102)" in str(evaluated)This path uses the selected tensor backend before integral evaluation. Here the native FeynKit backend reduces the numerator; the AlphaLoop integral-evaluation method requires FORM, just as it does for evaluate_integral.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
integral_expression | Expression | — | A Symbolica expression representing a vakint integral. |
View generated signature source: docs/api/python/vakint-community.pyi:9