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.nameMember details
name
Property · read-only#name: strReturn 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: ExpressionReturn the formula with its model parameter and coupling symbols.
Examples
Using the setup in the ModelExpression class example:
formula = item.expressionView generated signature source: docs/api/python/feynkit-community.pyi:8116