FeynKit · latest
On this page

GenerationReport

symbolica.community.hepkit Class

GenerationReport()

Counts and completion status from a diagram-generation run.

The report distinguishes explored topologies and interaction assignments from the physical diagrams retained after numerator checks.

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]
report = result.report
assert report.completed
assert report.retained_count == len(result.diagrams)

Member details

topology_count

Property · read-only#
topology_count: int

Return the number of distinct topologies considered during generation.

Examples

Using the setup in the GenerationReport class example:

assert report.topology_count >= 1

interaction_assignment_count

Property · read-only#
interaction_assignment_count: int

Return the number of interaction assignments examined.

Examples

Using the setup in the GenerationReport class example:

assignments_tested = report.interaction_assignment_count

retained_count

Property · read-only#
retained_count: int

Return the number of diagrams retained after removing zero numerators.

Examples

Using the setup in the GenerationReport class example:

assert report.retained_count == len(result.diagrams)

zero_numerator_count

Property · read-only#
zero_numerator_count: int

Return the number of diagrams removed for having an exact zero numerator.

Examples

Using the setup in the GenerationReport class example:

removed_zeroes = report.zero_numerator_count

completed

Property · read-only#
completed: bool

Report whether generation finished without cancellation.

Examples

Using the setup in the GenerationReport class example:

assert report.completed  # False means generation was cancelled

__repr__

Method#
__repr__() -> str

Return a concise constructor-style generation summary.

Examples

Using the setup in the GenerationReport class example:

print(result.report)

_repr_html_

Method#
_repr_html_() -> str

Render generation statistics as a compact HTML table.

Examples

Using the setup in the GenerationReport class example:

from IPython.display import display
display(report)

_repr_pretty_

Method#
_repr_pretty_(pretty: Any, cycle: bool) -> None

Write a concise generation summary to an IPython pretty printer.

Examples

Using the setup in the GenerationReport class example:

from IPython.lib.pretty import pretty
text = pretty(report)

Parameters

NameTypeDefaultDescription
prettyAny—

The IPython pretty-printer object.

cyclebool—

Whether this object is part of a recursive formatting cycle.