Vakint

Vakint

Vakint()

Base class of vakint engine, from which all vakint functions are initiated. It is best to create a single instance of this class and reuse it for multiple evaluations, as the setup of the instance can be time consuming since it involves the processing of all known topologies.

Methods

Name Description
__new__ Create a new Vakint instance, specifying details of the evaluation stack
evaluate Perform the complete parametric evaluation of the vaking integral represented by the Symbolica expression given in input
evaluate_integral Perform the parametric evaluation of only the integral appearing in the Symbolica expression given in input representing a vakint integral
numerical_evaluation Perform a numerical evaluation of an integral parameterically evaluated by Vakint, given numerical values for all parameters and optionally for external momenta.
numerical_result_from_expression Convert a Symbolica expression to a vakint numerical result, interpreting the expression as a Laurent series in the dimensional regularisation parameter epsilon.
numerical_result_to_expression Convert a vakint numerical result back to a Symbolica expression representing a Laurent series in the dimensional regularisation parameter epsilon.
tensor_reduce Convert a vakint expression to a form where tensor integrals are reduced to scalar integrals.
to_canonical Convert a vakint expression to its canonical form, optionally using a short form for the topology representation.

__new__

Vakint.__new__(
    run_time_decimal_precision: typing.Optional[builtins.int] = None,
    evaluation_order: typing.Optional[typing.Sequence[VakintEvaluationMethod]] = None,
    epsilon_symbol: typing.Optional[Expression] = None,
    mu_r_sq_symbol: typing.Optional[Expression] = None,
    form_exe_path: typing.Optional[builtins.str] = None,
    python_exe_path: typing.Optional[builtins.str] = None,
    verify_numerator_identification: typing.Optional[builtins.bool] = None,
    integral_normalization_factor: typing.Optional[builtins.str] = None,
    allow_unknown_integrals: typing.Optional[builtins.bool] = None,
    clean_tmp_dir: typing.Optional[builtins.bool] = None,
    number_of_terms_in_epsilon_expansion: typing.Optional[builtins.int] = None,
    use_dot_product_notation: typing.Optional[builtins.bool] = None,
    temporary_directory: typing.Optional[builtins.str] = None,
) -> Vakint

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

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",
)

Parameters

  • run_time_decimal_precision (Optional[int]) The decimal precision to be used during the evaluation. Default is 17.
  • evaluation_order (Optional[Sequence[VakintEvaluationMethod]]) A list of VakintEvaluationMethod instances specifying the order in which evaluation methods are to be applied. Default is all available methods in a sensible order.
  • epsilon_symbol (Optional[Expression]) The symbol to be used for the dimensional regularisation parameter epsilon. Default is “ε”.
  • mu_r_sq_symbol (Optional[Expression]) The symbol to be used for the renormalisation scale squared. Default is “mursq”.
  • form_exe_path (Optional[str]) The path to the FORM executable. Default is “form”.
  • python_exe_path (Optional[str]) The path to the Python executable. Default is “python3”.
  • verify_numerator_identification (Optional[bool]) Whether to verify the identification of numerator structures. Default is True.
  • integral_normalization_factor (Optional[str]) 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]) Whether to allow unknown integrals to be processed. Default is True.
  • clean_tmp_dir (Optional[bool]) 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]) The number of terms in the epsilon expansion to be computed. Default is 4.
  • use_dot_product_notation (Optional[bool]) Whether to use dot product notation for scalar products. Default is False.
  • temporary_directory (Optional[str]) The path to the temporary directory to be used. Default is None, in which case a system temporary directory will be used.

evaluate

Vakint.evaluate(integral_expression: Expression) -> Expression

Perform the complete parametric evaluation of the vaking integral represented by the Symbolica expression given in input. Note that the tensor reduction will be automatically performed on the input given.

Examples

integral_expr = E("(k(1,11)*k(1,11)+p(1,12)*k(1,12)+k(1,101)*k(1,102))*topo(prop(1,edge(1,1),k(1),muvsq,1))", default_namespace="vakint")

vakint.evaluate(integral_expr)

# ε*((muvsq^2+1/4*muvsq^2*g(101,102))*(1/2*𝜋^2*𝑖*log(𝜋)^2+1/2*𝜋^2*𝑖*log(1/4*𝜋^-1*mursq)^2-[...]

Parameters

  • integral_expression (Expression) A Symbolica expression representing a vakint integral.

evaluate_integral

Vakint.evaluate_integral(integral_expression: Expression) -> Expression

Perform 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

integral_expr = E("(k(1,11)*k(1,11)+p(1,12)*k(1,12)+k(1,101)*k(1,102))*topo(prop(1,edge(1,1),k(1),muvsq,1))", default_namespace="vakint")

vakint.evaluate_integral(integral_expr)

# ε*(-((-𝜋^2*𝑖*log(𝜋)+𝜋^2*𝑖*log(1/4*𝜋^-1*mursq))*(muvsq^2+muvsq*k(1,1)*p(1,1)+[...]

Parameters

  • integral_expression (Expression) A Symbolica expression representing a vakint integral.

numerical_evaluation

Vakint.numerical_evaluation(
    evaluated_integral: typing.Any,
    params: typing.Mapping[builtins.str, builtins.float],
    externals: typing.Optional[typing.Mapping[builtins.int, tuple[builtins.float, builtins.float, builtins.float, builtins.float]]] = None,
) -> tuple[VakintNumericalResult, typing.Optional[VakintNumericalResult]]

Perform a numerical evaluation of an integral parameterically evaluated by Vakint, given numerical values for all parameters and optionally for external momenta.

Examples

evaluated_integral = vakint.evaluate_integral(E("(k(1,11)*k(1,11)+p(1,12)*p(2,12))*topo(prop(1,edge(1,1),k(1),muvsq,1))", default_namespace="vakint"))
numerical_result, numerical_error = vakint.numerical_evaluation(
  evaluated_integral,
  { "muvsq": 2., "mursq": 3.},
  {
      1: (0.1, 0.2, 0.3, 0.4),
      2: (0.5, 0.6, 0.7, 0.8)
  }
)
str(numerical_result)

# ε^-1 : (0+27.63489232305020i)

# ε^ 0 : (0+-62.73919274007806i)

# ε^+1 : (0+107.7642844179578i)

# ε^+2 : (0+-138.7269737122023i)

Parameters

  • evaluated_integral (Expression) A Symbolica expression representing an integral that has been evaluated parameterically by Vakint
  • params (Dict[str, float]) A dictionary mapping parameter names to their numerical values.
  • externals (Optional[Dict[int, Tuple[float, float, float, float]]]) An optional dictionary mapping external momentum indices to their numerical 4-vector values.

numerical_result_from_expression

Vakint.numerical_result_from_expression(expr: Expression) -> VakintNumericalResult

Convert a Symbolica expression to a vakint numerical result, interpreting the expression as a Laurent series in the dimensional regularisation parameter epsilon.

Examples

res = vakint.numerical_result_from_expression(E("vakint::ε^-2 + 1 + 0.12*vakint::ε^-1"))
str(res)

# ε^-2 : (1.000000000000000+0i)

# ε^-1 : (1.200000000000000e-1+0i)

# ε^ 0 : (1.000000000000000+0i)

Parameters

  • expr (Expression) A Symbolica expression representing a Laurent series in the dimensional regularisation parameter epsilon specified in the vakint engine.

numerical_result_to_expression

Vakint.numerical_result_to_expression(result: VakintNumericalResult) -> Expression

Convert a vakint numerical result back to a Symbolica expression representing a Laurent series in the dimensional regularisation parameter epsilon.

Examples

evaluated_integral = vakint.evaluate_integral(E("(k(1,11)*k(1,11)+p(1,12)*p(2,12))*topo(prop(1,edge(1,1),k(1),muvsq,1))", default_namespace="vakint"))
numerical_result, numerical_error = vakint.numerical_evaluation(
  evaluated_integral,
  { "muvsq": 2., "mursq": 3.},
  {
      1: (0.1, 0.2, 0.3, 0.4),
      2: (0.5, 0.6, 0.7, 0.8)
  }
)
vakint.numerical_result_to_expression(numerical_result)

# 107.7642844179578𝑖*ε+27.63489232305020𝑖*ε^-1+-138.7269737122023𝑖*ε^2+-62.73919274007806𝑖

## `tensor_reduce` { #symbolica.community.vakint.Vakint.tensor_reduce }

```python
Vakint.tensor_reduce(integral_expression: Expression) -> Expression

Convert a vakint expression to a form where tensor integrals are reduced to scalar integrals.

Examples

integral_expr = E("(k(1,11)*k(1,11)+p(1,12)*k(1,12)+k(1,101)*k(1,102))*topo(prop(1,edge(1,1),k(1),muvsq,1))", default_namespace="vakint")

vakint.tensor_reduce(integral_expr)

# (k(1,1)^2-(2*ε-4)^-1*k(1,1)^2*g(101,102))*topo(prop(1,edge(1,1),k(1),muvsq,1))

Parameters

  • integral_expression (Expression) A Symbolica expression representing a vakint integral.

to_canonical

Vakint.to_canonical(
    integral_expression: Expression,
    short_form: typing.Optional[builtins.bool] = None,
) -> Expression

Convert a vakint expression to its canonical form, optionally using a short form for the topology representation.

Examples

integral_expr = E("(k(99,11)*k(99,11)+p(1,12)*p(2,12))*topo(prop(18,edge(7,7),k(99),muvsq,1))", default_namespace="vakint")
vakint.to_canonical(integral_expr)

# (k(1,11)^2+p(1,12)*p(2,12))*topo(prop(1,edge(1,1),k(1),muvsq,1))
vakint.to_canonical(integral_expr,short_form=True)

# (k(1,11)^2+p(1,12)*p(2,12))*topo(I1L(muvsq,1))

Parameters

  • integral_expression (Expression) A Symbolica expression representing a vakint integral.
  • short_form (Optional[bool]) Whether to use the short form for the topology representation. Default is False.