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 contributing to a CFF expression.

An orientation records the direction chosen for every diagram edge and the products of denominator surfaces generated by that choice.

Examples

from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.phi4()
process = model.process(["phi", "phi"], ["phi", "phi"])
result = process.generate_diagrams(loops=1)
diagram = result.diagrams[0]
result = diagram.build_cff()
orientation = result.orientations[0]
products = [[surface.symbol_name for surface in product]
            for product in orientation.denominator_products()]

Attributes

Name Description
edge_orientations Return each edge ID and its selected 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)

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
denominator_products Expand this orientation into products of denominator surfaces.

denominator_products

CffOrientation.denominator_products() -> builtins.list[builtins.list[CffSurface]]

Expand this orientation into products of denominator surfaces.

Examples

Using the setup in the CffOrientation class example:

products = orientation.denominator_products()
denominator_variables = [
    [surface.symbol_name for surface in product] for product in products
]