LtdResidue
symbolica.community.hepkit Class
LtdResidue()One retained signed residue in an LTD representation.
The cut edges obey :math:q_e^0=\sigma_e E_e, with signs relative to the stored momentum arrows. The diagram's ordered routing and contours determine these assignments; several residues may share a spanning tree. Higher-order poles can contribute several additive terms to one residue.
energy_map gives every internal energy at the residue. Substituting these energies into an uncut propagator gives the surface_pairs factors :math:q_e^0-E_e and :math:q_e^0+E_e.
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]
ltd = diagram.integrate_energy(method="ltd")
residue = ltd.residues[0]
signs = residue.pole_signsMember details
id
Property · read-only#id: intStable residue index within this representation.
Examples
index = residue.idcut_edges
Property · read-only#cut_edges: list[int] Physical IDs of the on-shell edges complementary to the spanning tree.
Examples
cuts = residue.cut_edgestree_edges
Property · read-only#tree_edges: list[int] Physical IDs of uncut internal edges in the spanning tree.
Examples
tree = residue.tree_edgespole_signs
Property · read-only#pole_signs: dict[int, int] Cut-edge pole signs relative to the diagram's stored momentum arrows.
Each entry fixes :math:q_e^0=\sigma_e E_e, with :math:\sigma_e\in\{-1,+1\}. The ordered routing and successive energy contours determine these signs for the entire residue. Selecting another surface factor does not change them.
Examples
assignments = residue.pole_signsReturns
dict[int, int]
Physical cut-edge IDs mapped to their pole signs.
energy_map
Property · read-only#energy_map: dict[int, Expression] Internal energies :math:q_e^0 evaluated at this residue.
Examples
energies = residue.energy_mapReturns
dict[int, Expression]
Physical internal-edge IDs mapped to affine combinations of OSE and external Q symbols. Cut entries equal :math:\sigma_e E_e.
surface_pairs
Property · read-only#surface_pairs: dict[int, SurfacePair] The two factors of each surviving uncut propagator.
Each pair preserves :math:q_e^0-E_e and :math:q_e^0+E_e after evaluating :math:q_e^0 at the residue. Each factor's sign relates it to its stored surface; it does not change the cut-edge pole assignment.
Examples
pairs = residue.surface_pairsReturns
dict[int, SurfacePair]
Physical tree-edge IDs mapped to their ordered minus/plus factors.
__repr__
Method#__repr__() -> strSummarize this residue's cut edges and pole signs.
Examples
text = repr(residue)to_expression
Method#to_expression(*, expand_surfaces: bool = True) -> TensorExpression Return this residue's contribution, including its signed coefficient.
Examples
Using the setup in the class example:
expression = residue.to_expression()Returns
TensorExpression
The scalar residue, including multiplicities and on-shell energy factors.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
expand_surfaces | bool | True | Replace stored surface placeholders by affine energy definitions. Defaults to True. On-shell energies remain symbolic in either case. |
render
Method#render() -> DiagramViewPrepare this residue's explorer for notebook display or explicit measurement.
Examples
view = residue.render()
snapshot = view.measured(browser="chromium")_repr_mimebundle_
Method#_repr_mimebundle_(include: Optional[Sequence[str]] = None, exclude: Optional[Sequence[str]] = None) -> Any Inspect this residue's expression, fixed cuts and surface pairs.
Examples
from IPython.display import display
display(residue)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
include | Optional[ | None | MIME types requested by the frontend; None allows all available types. |
exclude | Optional[ | None | MIME types omitted from the frontend response. |
_mime_
Method#_mime_() -> AnyReturn Marimo MIME data with static output and an optional live widget.
Examples
view = residue.render()
view # static output is immediate; an optional widget refines label sizes
snapshot = view.measured(browser="chromium")_display_
Method#_display_() -> AnyDisplay this residue in Marimo.
Examples
view = residue._display_()View generated signature source: docs/api/python/feynkit-community.pyi:7224