CffOrientation

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

CffOrientation

class CffOrientation

One acyclic energy-flow orientation in a CFF representation.

families contains its cross-free denominator products. to_expression() sums their contributions, including the common energy prefactors and any supplied numerator. Edge directions are relative to the originating diagram’s stored orientation.

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")
orientation = result.orientations[0]
expression = orientation.to_expression()

Attributes

Name Description
edge_orientations Return each edge ID and its selected orientation.
edge_signs Edge signs relative to the diagram’s stored arrows
families Cross-free families contributing to this orientation.
id Return this orientation’s stable index within the CFF result.

edge_orientations

CffOrientation.edge_orientations: builtins.list[tuple[builtins.int, builtins.str]]

Return each edge ID and its selected orientation.

Examples

Using the setup in the CffOrientation class example:

directions = dict(orientation.edge_orientations)

edge_signs

CffOrientation.edge_signs: builtins.dict[builtins.int, typing.Optional[builtins.int]]

Edge signs relative to the diagram’s stored arrows.

+1 agrees with the stored direction, -1 reverses it, and None denotes an undirected edge. These are orientation signs, not surface coefficients.

Examples

signs = orientation.edge_signs
assert all(sign in (-1, 1, None) for sign in signs.values())

families

CffOrientation.families: builtins.list[CrossFreeFamily]

Cross-free families contributing to this orientation.

Examples

families = orientation.families

id

CffOrientation.id: builtins.int

Return this orientation’s stable index within the CFF result.

Examples

Using the setup in the CffOrientation class example:

orientation_ids = [item.id for item in result.orientations]

Methods

Name Description
__repr__ Summarize this orientation without displaying its parent representation.
_display_ Display this orientation in Marimo.
_repr_html_ Inspect this orientation’s family sum and fixed energy-flow graph.
to_expression Sum this orientation’s families, including the common energy prefactor.

__repr__

CffOrientation.__repr__() -> builtins.str

Summarize this orientation without displaying its parent representation.

Examples

text = repr(orientation)

_display_

CffOrientation._display_() -> typing.Any

Display this orientation in Marimo.

Examples

view = orientation._display_()

_repr_html_

CffOrientation._repr_html_() -> builtins.str

Inspect this orientation’s family sum and fixed energy-flow graph.

Examples

html = orientation._repr_html_()

to_expression

CffOrientation.to_expression(*, expand_surfaces: builtins.bool = True) -> TensorExpression

Sum this orientation’s families, including the common energy prefactor.

Examples

Using the setup in the class example:

expression = orientation.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 This orientation’s contribution to the CFF energy integral.