CffGenerator
Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.
CffGenerator
class CffGeneratorGenerate Cross-Free Family energy denominators for Feynman diagrams.
The generator can constrain edge orientations or contractions before enumerating the acyclic energy flows of a loop diagram.
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]
generator = hep.CffGenerator(max_orientations=1000)
result = generator.generate(diagram)
expression = result.to_expression()Parameters
max_orientations(int, optional) Maximum number of candidate edge orientations to inspect.
Methods
| Name | Description |
|---|---|
__new__ |
Create a configurable Cross-Free Family generator. |
contract_edge |
Contract an edge before generating denominator surfaces. |
fix_orientation |
Fix an edge to its stored or reversed direction. |
generate |
Generate a Cross-Free Family representation for a diagram. |
mark_initial_state_edge |
Mark an edge as belonging to the initial state. |
__new__
CffGenerator.__new__(max_orientations: typing.Optional[builtins.int] = None) -> CffGeneratorCreate a configurable Cross-Free Family generator.
Examples
Using the setup in the CffGenerator class example:
generator = hep.CffGenerator(max_orientations=1000)Parameters
max_orientations(int, optional) Maximum number of candidate orientations to inspect.
contract_edge
CffGenerator.contract_edge(edge: builtins.int) -> NoneContract an edge before generating denominator surfaces.
Examples
Using the setup in the CffGenerator class example:
generator = hep.CffGenerator()
generator.contract_edge(diagram.internal_edges[0].id)
result = generator.generate(diagram)Parameters
edge(int) Diagram edge ID to contract.
fix_orientation
CffGenerator.fix_orientation(edge: builtins.int, reversed: builtins.bool) -> NoneFix an edge to its stored or reversed direction.
Examples
Using the setup in the CffGenerator class example:
generator = hep.CffGenerator()
generator.fix_orientation(diagram.internal_edges[0].id, reversed=True)
result = generator.generate(diagram)Parameters
edge(int) Diagram edge ID.reversed(bool) Select the reversed direction when true.
generate
CffGenerator.generate(diagram: FeynmanDiagram) -> CffResultGenerate a Cross-Free Family representation for a diagram.
Examples
Using the setup in the CffGenerator class example:
generator = hep.CffGenerator()
result = generator.generate(diagram)
expression = result.to_expression()Parameters
diagram(FeynmanDiagram) Diagram or subgraph whose energy-flow orientations are enumerated.
mark_initial_state_edge
CffGenerator.mark_initial_state_edge(edge: builtins.int) -> NoneMark an edge as belonging to the initial state.
Examples
Using the setup in the CffGenerator class example:
generator = hep.CffGenerator()
generator.mark_initial_state_edge(diagram.external_edges[0].id)
result = generator.generate(diagram)Parameters
edge(int) Diagram edge ID to classify as initial state.