Skip to content

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.
_mime_ Return Marimo MIME data with static output and an optional live widget.
_repr_mimebundle_ Inspect only this family's contribution and surface circlings.
render Prepare this family's explorer for display or explicit measurement.
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_()

_mime_

CrossFreeFamily._mime_() -> typing.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")

_repr_mimebundle_

CrossFreeFamily._repr_mimebundle_(
    include: typing.Optional[typing.Sequence[builtins.str]] = None,
    exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
) -> typing.Any

Inspect only this family's contribution and surface circlings.

Examples

from IPython.display import display
display(family)

Parameters

  • include (list[str] or None, optional) MIME types requested by the frontend; None allows all available types.
  • exclude (list[str] or None, optional) MIME types omitted from the frontend response.

render

CrossFreeFamily.render() -> DiagramView

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

Examples

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

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.