Vakint
symbolica.community.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)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.
Examples
from symbolica.community.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; construction validates the executables required by those entries.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
run_time_decimal_precision | Optional[int] | None | The decimal precision to be used during the evaluation. Default is 17. |
evaluation_order | Optional[Sequence[VakintEvaluationMethod]] | None | A list of |
epsilon_symbol | Optional[Expression] | None | The symbol to be used for the dimensional regularisation parameter epsilon. Default is "ε". |
mu_r_sq_symbol | Optional[Expression] | None | The symbol to be used for the renormalisation scale squared. Default is "mursq". |
form_exe_path | Optional[str] | None | The path to the FORM executable. Default is "form". |
python_exe_path | Optional[str] | None | The path to the Python executable. Default is "python3". |
verify_numerator_identification | Optional[bool] | None | Whether to verify the identification of numerator structures. Default is True. |
integral_normalization_factor | Optional[str] | 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[bool] | None | Whether to allow unknown integrals to be processed. Default is True. |
clean_tmp_dir | Optional[bool] | 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[int] | None | The number of terms in the epsilon expansion to be computed. Default is 4. |
use_dot_product_notation | Optional[bool] | None | Whether to use dot product notation for scalar products. Default is False. |
temporary_directory | Optional[str] | None | The path to the temporary directory to be used. Default is None, in which case a system temporary directory will be used. |
Member details
numerical_result_from_expression
Methodnumerical_result_from_expression(expr: Expression) -> VakintNumericalResultInterpret a Symbolica expression as a numerical Laurent series in epsilon.
Examples
from symbolica import E
from symbolica.community.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
Methodnumerical_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.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[str, float] | — | A dictionary mapping parameter names to their numerical values. |
externals | Optional[Mapping[int, tuple[float, float, float, float]]] | None | An optional dictionary mapping external momentum indices to their numerical 4-vector values. |
numerical_result_to_expression
Methodnumerical_result_to_expression(result: VakintNumericalResult) -> ExpressionConvert a Vakint numerical result to a Symbolica Laurent-series expression.
Examples
from symbolica.community.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
Methodto_canonical(integral_expression: Expression, short_form: Optional[bool] = None) -> ExpressionConvert a Vakint expression to canonical momentum routing and topology numbering.
Examples
from symbolica import E
from symbolica.community.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[bool] | None | Whether to use the short form for the topology representation. Default is False. |
tensor_reduce
Methodtensor_reduce(integral_expression: Expression) -> ExpressionReduce the tensor integrals in a Vakint expression to scalar integrals.
Examples
from symbolica import E
from symbolica.community.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
Methodevaluate_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.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
Methodevaluate(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.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 complete path performs tensor reduction before integral evaluation and therefore has the same FORM requirement as evaluate_integral for the AlphaLoop method.
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