FeynKit · latest
On this page

CrossFreeFamily

symbolica.community.hepkit Class

CrossFreeFamily()

One cross-free family of denominator surfaces in a CFF orientation.

factors records signed surfaces and their multiplicities. Its expression is the product of coefficient, numerator and the inverse of every entry in factors. Summing these expressions reproduces the parent orientation. Generalized numerator sampling can produce several weighted contributions with the same geometric family but different energy_maps.

Examples

from symbolica.community import hepkit as hep
process = hep.Model.phi3().process(["phi"], ["phi", "phi"])
diagrams = process.generate_diagrams(
    loops=1, max_vertices=3, maximum_bridges=0, progress=None
)
diagram = diagrams.diagrams[0]
result = diagram.integrate_energy(method="cff")
family = result.orientations[0].families[0]
expression = family.to_expression()

Member details

id

Property · read-only#
id: int

Family index within its orientation.

Examples

index = family.id

factors

Property · read-only#
factors: list[SurfaceFactor]

Signed denominator factors, grouping repeated surfaces into powers.

Examples

denominators = [f.to_expression() for f in family.factors]

coefficient

Property · read-only#
coefficient: TensorExpression

Signed coefficient and on-shell factors multiplying this family's numerator.

Examples

coefficient = family.coefficient

numerator

Property · read-only#
numerator: TensorExpression

Evaluated numerator, including any generated numerator surface factors.

Examples

numerator = family.numerator

energy_map

Property · read-only#
energy_map: dict[int, Expression]

Edge-energy substitutions used to evaluate this contribution's numerator.

Keys are physical edge IDs; values replace Q(edge, cind(0)). Empty for topology-only scalar families. These sampling maps need not be on-shell cuts.

Examples

substitutions = family.energy_map

__repr__

Method#
__repr__() -> str

Summarize this family's orientation, index and denominator factors.

Examples

text = repr(family)

to_expression

Method#
to_expression(*, expand_surfaces: bool = True) -> TensorExpression

Return this family's contribution, including the common energy prefactor.

Examples

Using the setup in the class example:

expression = family.to_expression()

Returns

TensorExpression

The complete family contribution, including its evaluated numerator and energy factors.

Parameters

NameTypeDefaultDescription
expand_surfacesboolTrue

Replace stored surface placeholders by affine energy definitions. Defaults to True. On-shell energies remain symbolic in either case.

render

Method#
render() -> DiagramView

Prepare this family's explorer for display or explicit measurement.

Examples

view = family.render()
snapshot = view.measured(browser="chromium")

_repr_mimebundle_

Method#
_repr_mimebundle_(include: Optional[Sequence[str]] = None, exclude: Optional[Sequence[str]] = None) -> Any

Inspect only this family's contribution and surface circlings.

Examples

from IPython.display import display
display(family)

Parameters

NameTypeDefaultDescription
includeOptional[Sequence[str]]None

MIME types requested by the frontend; None allows all available types.

excludeOptional[Sequence[str]]None

MIME types omitted from the frontend response.

_mime_

Method#
_mime_() -> Any

Return Marimo MIME data with static output and an optional live widget.

Examples

view = family.render()
view  # static output is immediate; an optional widget refines label sizes
snapshot = view.measured(browser="chromium")

_display_

Method#
_display_() -> Any

Display this family in Marimo.

Examples

view = family._display_()