Coupling
symbolica.community.hepkit Class
Coupling()A coupling coefficient associated with interaction vertices.
Couplings retain their symbolic expression, perturbative coupling orders, and evaluated complex value when the model has been numerically resolved.
Examples
from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.standard_model()
coupling = model.couplings[0]
orders = coupling.orders
formula = coupling.expressionMember details
symbol
Property · read-only#symbol: ExpressionReturn the symbolic reference used by this model's expressions. This preserves the parameter or function identity without substituting its defining expression or numerical value.
Examples
from symbolica.community import hepkit as hep
model = hep.Model.standard_model()
reference = model.couplings[0].symbolname
Property · read-only#name: strReturn the coupling name.
Examples
Using the setup in the Coupling class example:
coupling_by_name = {item.name: item.expression for item in model.couplings}expression
Property · read-only#expression: ExpressionReturn the expression defining the coupling.
Examples
Using the setup in the Coupling class example:
formula = coupling.expressionorders
Property · read-only#orders: dict[str, int] Return the coupling-order powers keyed by order name.
Examples
Using the setup in the Coupling class example:
qed_couplings = [c for c in model.couplings if c.orders.get("QED", 0) > 0]value
Property · read-only#value: complexReturn the evaluated coupling as a native Python complex number.
Raises ModelError when this coupling has not been evaluated.
Examples
Using the setup in the Coupling class example:
coupling_value = model.couplings[0].value
print("coupling:", coupling_value.real, coupling_value.imag)__repr__
Method#__repr__() -> strSummarize the defining data as well as the coupling name.
Examples
Using the setup in the Coupling class example:
print(next(c for c in model.couplings if c.orders.get("QED", 0) > 0))_repr_html_
Method#_repr_html_() -> strDisplay the model member's physical data and defining expressions.
Examples
Using the setup in the Coupling class example:
from IPython.display import display
display(coupling)_repr_pretty_
Method#_repr_pretty_(pretty: Any, cycle: bool) -> None Write the complete text summary to an IPython pretty printer.
Examples
Using the setup in the Coupling class example:
from IPython.lib.pretty import pretty
text = pretty(coupling)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pretty | Any | — | IPython pretty printer receiving the text. |
cycle | bool | — | Whether the object occurs recursively in the current display. |
View generated signature source: docs/api/python/feynkit-community.pyi:1224