CrossFreeFamily

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

CrossFreeFamily

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()

Attributes

Name Description
coefficient Signed coefficient and on-shell factors multiplying this family’s numerator.
energy_map Edge-energy substitutions used to evaluate this contribution’s numerator
factors Signed denominator factors, grouping repeated surfaces into powers.
id Family index within its orientation.
numerator Evaluated numerator, including any generated numerator surface factors.

coefficient

CrossFreeFamily.coefficient: TensorExpression

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

Examples

coefficient = family.coefficient

energy_map

CrossFreeFamily.energy_map: builtins.dict[builtins.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

factors

CrossFreeFamily.factors: builtins.list[SurfaceFactor]

Signed denominator factors, grouping repeated surfaces into powers.

Examples

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

id

CrossFreeFamily.id: builtins.int

Family index within its orientation.

Examples

index = family.id

numerator

CrossFreeFamily.numerator: TensorExpression

Evaluated numerator, including any generated numerator surface factors.

Examples

numerator = family.numerator

Methods

Name Description
__repr__ Summarize this family’s orientation, index and denominator factors.
_display_ Display this family in Marimo.
_repr_html_ Inspect only this family’s contribution and surface circlings.
to_expression Return this family’s contribution, including the common energy prefactor.

__repr__

CrossFreeFamily.__repr__() -> builtins.str

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

Examples

text = repr(family)

_display_

CrossFreeFamily._display_() -> typing.Any

Display this family in Marimo.

Examples

view = family._display_()

_repr_html_

CrossFreeFamily._repr_html_() -> builtins.str

Inspect only this family’s contribution and surface circlings.

Examples

html = family._repr_html_()

to_expression

CrossFreeFamily.to_expression(*, expand_surfaces: builtins.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()

Parameters

  • expand_surfaces (bool, optional) Replace stored surface placeholders by affine energy definitions. Defaults to True. On-shell energies remain symbolic in either case.

Returns

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