Coupling
Coupling
class CouplingA 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.expressionAttributes
| Name | Description |
|---|---|
expression |
Return the expression defining the coupling. |
name |
Return the coupling name. |
orders |
Return the coupling-order powers keyed by order name. |
symbol |
Return the symbolic reference used by this model’s expressions |
value |
Return the evaluated coupling as a native Python complex number |
expression
Coupling.expression: ExpressionReturn the expression defining the coupling.
Examples
Using the setup in the Coupling class example:
formula = coupling.expressionname
Coupling.name: builtins.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}orders
Coupling.orders: builtins.dict[builtins.str, builtins.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]symbol
Coupling.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].symbolvalue
Coupling.value: complexReturn the evaluated coupling as a native Python complex number.
Raises :class: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)Methods
| Name | Description |
|---|---|
__repr__ |
Summarize the defining data as well as the coupling name. |
_repr_html_ |
Display the model member’s physical data and defining expressions. |
_repr_pretty_ |
Write the complete text summary to an IPython pretty printer. |
__repr__
Coupling.__repr__() -> builtins.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_
Coupling._repr_html_() -> builtins.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_
Coupling._repr_pretty_(pretty: typing.Any, cycle: builtins.bool) -> NoneWrite 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
pretty(object) IPython pretty printer receiving the text.cycle(bool) Whether the object occurs recursively in the current display.