FeynKit · latest
On this page

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.expression

Member details

symbol

Property · read-only#
symbol: Expression

Return 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].symbol

name

Property · read-only#
name: str

Return 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: Expression

Return the expression defining the coupling.

Examples

Using the setup in the Coupling class example:

formula = coupling.expression

orders

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: complex

Return 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__() -> str

Summarize 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_() -> str

Display 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

NameTypeDefaultDescription
prettyAny—

IPython pretty printer receiving the text.

cyclebool—

Whether the object occurs recursively in the current display.