FeynKit · latest
On this page

ModelExpression

symbolica.community.hepkit Class

ModelExpression()

A named symbolic expression awaiting numerical model evaluation.

These records describe internal parameters or couplings passed to a custom Model.recompute_with callback.

Examples

from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.phi4()
process = model.process(["phi", "phi"], ["phi", "phi"])
requests = []
def evaluate(request):
    requests.append(request)
    return hep.EvaluatedValues(
        couplings={"SCALAR_COUPLING": (0.0, -1.0)},
    )
updated_model = model.recompute_with(evaluate)
request = requests[0]
item = request.couplings[0]
formula = item.expression
name = item.name

Member details

name

Property · read-only#
name: str

Return the name assigned to the expression.

Examples

Using the setup in the ModelExpression class example:

formulas = {item.name: item.expression for item in request.couplings}

expression

Property · read-only#
expression: Expression

Return the formula with its model parameter and coupling symbols.

Examples

Using the setup in the ModelExpression class example:

formula = item.expression