Process
Process
class ProcessA scattering or decay process to pass to the diagram generator.
A process records its incoming and outgoing particles and model-sector restrictions. External states accept loaded :class:Particle objects as well as names, signed PDG codes, and explicit :class:ParticleSelector objects.
Examples
from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.standard_model()
process = model.process(["e-", "e+"], ["mu-", "mu+"])
result = process.generate_diagrams(loops=0)
assert result.report.completedAttributes
| Name | Description |
|---|---|
incoming |
Return the ordered incoming-particle selectors. |
model |
The particle model supplying this process’s Feynman rules. |
outgoing_alternatives |
Return every allowed ordered final-state alternative. |
particle_veto |
The excluded particle selectors, shared by every generation operation. |
vertex_allow |
Allowed model vertex rules; None permits every interaction. |
vertex_veto |
Excluded model vertex rules. |
incoming
Process.incoming: builtins.list[ParticleSelector]Return the ordered incoming-particle selectors.
Examples
Using the setup in the Process class example:
assert [selector.name for selector in process.incoming] == ["e-", "e+"]model
Process.model: ModelThe particle model supplying this process’s Feynman rules.
Examples
Using the setup in the Process class example:
electron = process.model.particle("e-")outgoing_alternatives
Process.outgoing_alternatives: builtins.list[builtins.list[ParticleSelector]]Return every allowed ordered final-state alternative.
Examples
Using the setup in the Process class example:
alternatives = process.outgoing_alternativesparticle_veto
Process.particle_veto: builtins.list[ParticleSelector]The excluded particle selectors, shared by every generation operation.
Examples
Using the setup in the Process class example:
excluded_particles = process.particle_vetovertex_allow
Process.vertex_allow: typing.Optional[builtins.list[VertexRule]]Allowed model vertex rules; None permits every interaction.
Examples
Using the setup in the Process class example:
allowed_interactions = process.vertex_allowvertex_veto
Process.vertex_veto: builtins.list[VertexRule]Excluded model vertex rules.
Examples
Using the setup in the Process class example:
excluded_interactions = process.vertex_vetoMethods
| Name | Description |
|---|---|
__repr__ |
Format the external states, model, and active particle/vertex restrictions. |
_repr_html_ |
Display the process blob, model and active restrictions in notebooks. |
_repr_svg_ |
Display the process schematic in SVG-aware frontends. |
generate_amplitude |
Generate a coherent symbolic amplitude for this process |
generate_cross_section |
Generate sewn forward diagrams and their physical final-state cuts |
generate_diagrams |
Generate and optionally group all diagrams matching a process |
render |
Render a blob with the process’s physical incoming and outgoing particles |
with_filters |
Return a process with updated particle and vertex restrictions |
with_final_state_alternatives |
Return a process accepting any of the supplied final states |
__repr__
Process.__repr__() -> builtins.strFormat the external states, model, and active particle/vertex restrictions.
Examples
Using the setup in the Process class example:
repr(process)
'Process("sm": [e-, e+] -> [mu-, mu+])'_repr_html_
Process._repr_html_() -> builtins.strDisplay the process blob, model and active restrictions in notebooks.
Examples
Using the setup in the Process class example:
from IPython.display import display
display(process)_repr_svg_
Process._repr_svg_() -> builtins.strDisplay the process schematic in SVG-aware frontends.
Examples
Using the setup in the Process class example:
from IPython.display import display
display(process)generate_amplitude
Process.generate_amplitude(
*,
dimension: typing.Optional[Expression | int | Float | builtins.int | builtins.float | builtins.str | decimal.Decimal | ComplexFloat | Float | builtins.int | builtins.float | builtins.str | decimal.Decimal | builtins.complex | tuple[Float | builtins.int | builtins.float | builtins.str | decimal.Decimal, Float | builtins.int | builtins.float | builtins.str | decimal.Decimal]] = None,
real: typing.Optional[typing.Sequence[Expression]] = None,
loops: builtins.int | tuple[builtins.int, builtins.int] = 0,
symmetrize_initial: builtins.bool = False,
symmetrize_final: typing.Optional[builtins.bool] = None,
symmetrize_left_right: builtins.bool = False,
symmetrize_external_fermions: builtins.bool = False,
threads: typing.Optional[builtins.int] = None,
max_vertices: typing.Optional[builtins.int] = None,
allow_self_loops: builtins.bool = True,
allow_zero_flow_edges: builtins.bool = False,
graph_prefix: typing.Optional[builtins.str] = None,
maximum_bridges: int | None | types.EllipsisType = ...,
self_energy: SelfEnergyFilterOptions | types.EllipsisType | None = ...,
tadpoles: TadpoleFilterOptions | types.EllipsisType | None = ...,
zero_snails: SnailFilterOptions | types.EllipsisType | None = ...,
coupling_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int | tuple[builtins.int, typing.Optional[builtins.int]]]] = None,
fermion_loop_count_range: typing.Optional[tuple[builtins.int, builtins.int]] = None,
factorized_loop_topologies_count_range: tuple[int, int] | types.EllipsisType | None = ...,
blob_range: tuple[int, int] | types.EllipsisType | None = ...,
spectator_range: tuple[int, int] | types.EllipsisType | None = ...,
perturbative_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int]] = None,
sewn_tadpoles: typing.Optional[builtins.bool] = None,
cut_amplitude_coupling_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int | tuple[builtins.int, typing.Optional[builtins.int]]]] = None,
cut_amplitude_loop_count_range: typing.Optional[tuple[builtins.int, builtins.int]] = None,
select_diagrams: typing.Optional[typing.Sequence[FeynmanDiagram | builtins.str]] = None,
veto_diagrams: typing.Optional[typing.Sequence[FeynmanDiagram | builtins.str]] = None,
loop_momentum_bases: typing.Optional[typing.Sequence[tuple[FeynmanDiagram | builtins.str, typing.Sequence[builtins.int]]]] = None,
numerator_prefactor: typing.Optional[Expression] = None,
projector: typing.Optional[Expression] = None,
numerator_grouping: typing.Optional[NumeratorGrouping] = None,
cancellation_token: typing.Optional[CancellationToken] = None,
progress: typing.Literal['auto'] | collections.abc.Callable[[GenerationProgress], None] | None = 'auto',
filter: collections.abc.Callable[[symbolica.core.Graph, int], bool] | None = None,
) -> AmplitudeGenerate a coherent symbolic amplitude for this process. Cancelled or empty generation cannot produce an amplitude.
Model Feynman rules are instantiated into each returned diagram: inspect vertex.numerator_expression() and edge.numerator_expression() for individual factors, or diagram.numerator_expression() for their combined numerator.
Examples
Using the setup in the Process class example:
result = process.generate_amplitude(max_vertices=6)
operator = result.expression()Parameters
dimension(int or Expression, optional) Lorentz dimension of the amplitude; default four.real(list[Expression] or None, optional) Additional scalars assumed real under conjugation.loops(int or tuple[int, int], optional) Exact order or inclusive range for this call, default zero. Cross sections count loops in the sewn forward graph; two-particle tree cuts need loops=1.symmetrize_initial(bool, optional) Identify graphs related by initial-state permutations; default False.symmetrize_final(bool or None, optional) Identify final-state permutations; None uses True for cross sections and False for amplitudes.symmetrize_left_right(bool, optional) Identify cross-section graphs related by exchanging amplitude sides.symmetrize_external_fermions(bool, optional) Include amplitude fermions in enabled external-state symmetry classes.threads(int or None, optional) Number of worker threads; None uses the generator default.max_vertices(int or None, optional) Maximum interaction vertices; None applies no override.allow_self_loops(bool, optional) Permit propagators that start and end on the same vertex; defaults to True.allow_zero_flow_edges(bool, optional) Permit internal edges with identically zero momentum flow.graph_prefix(str or None, optional) Prefix assigned to generated diagram names.maximum_bridges(int, None, or Ellipsis, optional) Omission or Ellipsis requires one-particle irreducibility only for diagrams with loops; tree exchanges are allowed, including in mixed loop ranges. An integer limits internal bridges at every loop order; None disables it.self_energy(SelfEnergyFilterOptions or None, optional) Reject self-energy subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.tadpoles(TadpoleFilterOptions or None, optional) Reject tadpole subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.zero_snails(SnailFilterOptions or None, optional) Reject zero-snail subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.coupling_orders(dict[str, int | tuple[int, int or None]] or None, optional) Exact coupling powers or inclusive ranges; an upper None is unbounded.fermion_loop_count_range(tuple[int, int] or None, optional) Inclusive range of closed fermion loops.factorized_loop_topologies_count_range(tuple[int, int] or None, optional) Inclusive range of factorized loop-topology components. Defaults to(1, 1)for vacuum processes;Nonedisables the restriction.blob_range(tuple[int, int] or None, optional) Inclusive cross-section blob-count range. Defaults to(1, 1)for cross sections;Nonedisables the restriction.spectator_range(tuple[int, int] or None, optional) Inclusive cross-section spectator-count range. Defaults to(0, 0)for cross sections;Nonedisables the restriction.perturbative_orders(dict[str, int] or None, optional) Exact perturbative powers required for cross-section graphs.sewn_tadpoles(bool or None, optional) Reject tadpoles revealed by sewing cross-section sides; None applies no filter.cut_amplitude_coupling_orders(dict[str, int | tuple[int, int or None]] or None, optional) Coupling-order bounds applied independently within every cut amplitude.cut_amplitude_loop_count_range(tuple[int, int] or None, optional) Inclusive combined loop count across both sides of every cut.select_diagrams(sequence[FeynmanDiagram | str] or None, optional) Retain only these diagram objects, content-derived IDs, or finalized names.veto_diagrams(sequence[FeynmanDiagram | str] or None, optional) Remove these diagram objects, content-derived IDs, or finalized names.loop_momentum_bases(sequence[tuple[FeynmanDiagram | str, sequence[int]]] or None, optional) Diagram selectors paired with ordered stable edge IDs for independent loop momenta.numerator_prefactor(Expression or None, optional) Scalar multiplier retained on every finalized diagram numerator.projector(Expression or None, optional) Override external-state contraction; S(“1”) disables external wavefunctions.numerator_grouping(NumeratorGrouping or None, optional) Defaults to None: no numerator comparison or grouping. Diagrams still contain numerators. Pass NumeratorGrouping to enable zero detection or grouping.progress({“auto”}, Callable[[GenerationProgress], None] or None, optional) Defaults to “auto”: show progress when marimo.running_in_notebook() is true, with stage, counts, and elapsed time. None disables progress. Known totals use a progress bar; unknown totals use a spinner. The display closes on completion, cancellation, or error. Observe stage changes and coalesced counts on the calling Python thread. Callback exceptions propagate and stop generation.filter(Callable[[symbolica.core.Graph, int], bool] or None, optional) Prune partial topologies during enumeration. The first N vertices are complete. False rejects only this search branch. Edge data is the base particle PDG code; node data is 0 internally, -(index+1) for incoming legs and +(index+1) for outgoing legs. Mutating the snapshot does not change enumeration. Keep callbacks cheap: each snapshot is constructed using Symbolica’s Python Graph API.cancellation_token(CancellationToken or None, optional) Shared token for cancelling a running generation task. Token cancellation returns an incomplete result; Python signal-handler exceptions, including KeyboardInterrupt, stop generation and propagate to the caller.
generate_cross_section
Process.generate_cross_section(
*,
loops: builtins.int | tuple[builtins.int, builtins.int] = 0,
symmetrize_initial: builtins.bool = False,
symmetrize_final: typing.Optional[builtins.bool] = None,
symmetrize_left_right: builtins.bool = False,
symmetrize_external_fermions: builtins.bool = False,
threads: typing.Optional[builtins.int] = None,
max_vertices: typing.Optional[builtins.int] = None,
allow_self_loops: builtins.bool = True,
allow_zero_flow_edges: builtins.bool = False,
graph_prefix: typing.Optional[builtins.str] = None,
maximum_bridges: int | None | types.EllipsisType = ...,
self_energy: SelfEnergyFilterOptions | types.EllipsisType | None = ...,
tadpoles: TadpoleFilterOptions | types.EllipsisType | None = ...,
zero_snails: SnailFilterOptions | types.EllipsisType | None = ...,
coupling_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int | tuple[builtins.int, typing.Optional[builtins.int]]]] = None,
fermion_loop_count_range: typing.Optional[tuple[builtins.int, builtins.int]] = None,
factorized_loop_topologies_count_range: tuple[int, int] | types.EllipsisType | None = ...,
blob_range: tuple[int, int] | types.EllipsisType | None = ...,
spectator_range: tuple[int, int] | types.EllipsisType | None = ...,
perturbative_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int]] = None,
sewn_tadpoles: typing.Optional[builtins.bool] = None,
cut_amplitude_coupling_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int | tuple[builtins.int, typing.Optional[builtins.int]]]] = None,
cut_amplitude_loop_count_range: typing.Optional[tuple[builtins.int, builtins.int]] = None,
select_diagrams: typing.Optional[typing.Sequence[FeynmanDiagram | builtins.str]] = None,
veto_diagrams: typing.Optional[typing.Sequence[FeynmanDiagram | builtins.str]] = None,
loop_momentum_bases: typing.Optional[typing.Sequence[tuple[FeynmanDiagram | builtins.str, typing.Sequence[builtins.int]]]] = None,
numerator_prefactor: typing.Optional[Expression] = None,
projector: typing.Optional[Expression] = None,
numerator_grouping: typing.Optional[NumeratorGrouping] = None,
cancellation_token: typing.Optional[CancellationToken] = None,
progress: typing.Literal['auto'] | collections.abc.Callable[[GenerationProgress], None] | None = 'auto',
filter: collections.abc.Callable[[symbolica.core.Graph, int], bool] | None = None,
) -> GenerationResultGenerate sewn forward diagrams and their physical final-state cuts. The result contains diagrams and cut metadata, before phase-space integration.
Model Feynman rules are instantiated into each returned diagram: inspect vertex.numerator_expression() and edge.numerator_expression() for individual factors, or diagram.numerator_expression() for their combined numerator.
Examples
A two-particle tree cut has one loop after the amplitude sides are sewn:
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_cross_section(loops=1)
assert result.diagrams[0].cuts
combined_numerator = result.diagrams[0].numerator_expression()Parameters
loops(int or tuple[int, int], optional) Exact order or inclusive range for this call, default zero. Cross sections count loops in the sewn forward graph; two-particle tree cuts need loops=1.symmetrize_initial(bool, optional) Identify graphs related by initial-state permutations; default False.symmetrize_final(bool or None, optional) Identify final-state permutations; None uses True for cross sections and False for amplitudes.symmetrize_left_right(bool, optional) Identify cross-section graphs related by exchanging amplitude sides.symmetrize_external_fermions(bool, optional) Include amplitude fermions in enabled external-state symmetry classes.threads(int or None, optional) Number of worker threads; None uses the generator default.max_vertices(int or None, optional) Maximum interaction vertices; None applies no override.allow_self_loops(bool, optional) Permit propagators that start and end on the same vertex; defaults to True.allow_zero_flow_edges(bool, optional) Permit internal edges with identically zero momentum flow.graph_prefix(str or None, optional) Prefix assigned to generated diagram names.maximum_bridges(int, None, or Ellipsis, optional) Omission or Ellipsis requires one-particle irreducibility only for diagrams with loops; tree exchanges are allowed, including in mixed loop ranges. An integer limits internal bridges at every loop order; None disables it.self_energy(SelfEnergyFilterOptions or None, optional) Reject self-energy subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.tadpoles(TadpoleFilterOptions or None, optional) Reject tadpole subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.zero_snails(SnailFilterOptions or None, optional) Reject zero-snail subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.coupling_orders(dict[str, int | tuple[int, int or None]] or None, optional) Exact coupling powers or inclusive ranges; an upper None is unbounded.fermion_loop_count_range(tuple[int, int] or None, optional) Inclusive range of closed fermion loops.factorized_loop_topologies_count_range(tuple[int, int] or None, optional) Inclusive range of factorized loop-topology components. Defaults to(1, 1)for vacuum processes;Nonedisables the restriction.blob_range(tuple[int, int] or None, optional) Inclusive cross-section blob-count range. Defaults to(1, 1)for cross sections;Nonedisables the restriction.spectator_range(tuple[int, int] or None, optional) Inclusive cross-section spectator-count range. Defaults to(0, 0)for cross sections;Nonedisables the restriction.perturbative_orders(dict[str, int] or None, optional) Exact perturbative powers required for cross-section graphs.sewn_tadpoles(bool or None, optional) Reject tadpoles revealed by sewing cross-section sides; None applies no filter.cut_amplitude_coupling_orders(dict[str, int | tuple[int, int or None]] or None, optional) Coupling-order bounds applied independently within every cut amplitude.cut_amplitude_loop_count_range(tuple[int, int] or None, optional) Inclusive combined loop count across both sides of every cut.select_diagrams(sequence[FeynmanDiagram | str] or None, optional) Retain only these diagram objects, content-derived IDs, or finalized names.veto_diagrams(sequence[FeynmanDiagram | str] or None, optional) Remove these diagram objects, content-derived IDs, or finalized names.loop_momentum_bases(sequence[tuple[FeynmanDiagram | str, sequence[int]]] or None, optional) Diagram selectors paired with ordered stable edge IDs for independent loop momenta.numerator_prefactor(Expression or None, optional) Scalar multiplier retained on every finalized diagram numerator.projector(Expression or None, optional) Override external-state contraction; S(“1”) disables external wavefunctions.numerator_grouping(NumeratorGrouping or None, optional) Defaults to None: no numerator comparison or grouping. Diagrams still contain numerators. Pass NumeratorGrouping to enable zero detection or grouping.progress({“auto”}, Callable[[GenerationProgress], None] or None, optional) Defaults to “auto”: show progress when marimo.running_in_notebook() is true, with stage, counts, and elapsed time. None disables progress. Known totals use a progress bar; unknown totals use a spinner. The display closes on completion, cancellation, or error. Observe stage changes and coalesced counts on the calling Python thread. Callback exceptions propagate and stop generation.filter(Callable[[symbolica.core.Graph, int], bool] or None, optional) Prune partial topologies during enumeration. The first N vertices are complete. False rejects only this search branch. Edge data is the base particle PDG code; node data is 0 internally, -(index+1) for incoming legs and +(index+1) for outgoing legs. Mutating the snapshot does not change enumeration. Keep callbacks cheap: each snapshot is constructed using Symbolica’s Python Graph API.cancellation_token(CancellationToken or None, optional) Shared token for cancelling a running generation task. Token cancellation returns an incomplete result; Python signal-handler exceptions, including KeyboardInterrupt, stop generation and propagate to the caller.
generate_diagrams
Process.generate_diagrams(
*,
loops: builtins.int | tuple[builtins.int, builtins.int] = 0,
symmetrize_initial: builtins.bool = False,
symmetrize_final: typing.Optional[builtins.bool] = None,
symmetrize_left_right: builtins.bool = False,
symmetrize_external_fermions: builtins.bool = False,
threads: typing.Optional[builtins.int] = None,
max_vertices: typing.Optional[builtins.int] = None,
allow_self_loops: builtins.bool = True,
allow_zero_flow_edges: builtins.bool = False,
graph_prefix: typing.Optional[builtins.str] = None,
maximum_bridges: int | None | types.EllipsisType = ...,
self_energy: SelfEnergyFilterOptions | types.EllipsisType | None = ...,
tadpoles: TadpoleFilterOptions | types.EllipsisType | None = ...,
zero_snails: SnailFilterOptions | types.EllipsisType | None = ...,
coupling_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int | tuple[builtins.int, typing.Optional[builtins.int]]]] = None,
fermion_loop_count_range: typing.Optional[tuple[builtins.int, builtins.int]] = None,
factorized_loop_topologies_count_range: tuple[int, int] | types.EllipsisType | None = ...,
blob_range: tuple[int, int] | types.EllipsisType | None = ...,
spectator_range: tuple[int, int] | types.EllipsisType | None = ...,
perturbative_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int]] = None,
sewn_tadpoles: typing.Optional[builtins.bool] = None,
cut_amplitude_coupling_orders: typing.Optional[typing.Mapping[builtins.str, builtins.int | tuple[builtins.int, typing.Optional[builtins.int]]]] = None,
cut_amplitude_loop_count_range: typing.Optional[tuple[builtins.int, builtins.int]] = None,
select_diagrams: typing.Optional[typing.Sequence[FeynmanDiagram | builtins.str]] = None,
veto_diagrams: typing.Optional[typing.Sequence[FeynmanDiagram | builtins.str]] = None,
loop_momentum_bases: typing.Optional[typing.Sequence[tuple[FeynmanDiagram | builtins.str, typing.Sequence[builtins.int]]]] = None,
numerator_prefactor: typing.Optional[Expression] = None,
projector: typing.Optional[Expression] = None,
numerator_grouping: typing.Optional[NumeratorGrouping] = None,
cancellation_token: typing.Optional[CancellationToken] = None,
progress: typing.Literal['auto'] | collections.abc.Callable[[GenerationProgress], None] | None = 'auto',
filter: collections.abc.Callable[[symbolica.core.Graph, int], bool] | None = None,
) -> GenerationResultGenerate and optionally group all diagrams matching a process.
Model Feynman rules are instantiated into each returned diagram: inspect vertex.numerator_expression() and edge.numerator_expression() for individual factors, or diagram.numerator_expression() for their combined numerator.
Examples
Using the setup in the Process class example:
result = process.generate_diagrams(max_vertices=6)
combined_numerator = result.diagrams[0].numerator_expression()Parameters
loops(int or tuple[int, int], optional) Exact order or inclusive range for this call, default zero. Cross sections count loops in the sewn forward graph; two-particle tree cuts need loops=1.symmetrize_initial(bool, optional) Identify graphs related by initial-state permutations; default False.symmetrize_final(bool or None, optional) Identify final-state permutations; None uses True for cross sections and False for amplitudes.symmetrize_left_right(bool, optional) Identify cross-section graphs related by exchanging amplitude sides.symmetrize_external_fermions(bool, optional) Include amplitude fermions in enabled external-state symmetry classes.threads(int or None, optional) Number of worker threads; None uses the generator default.max_vertices(int or None, optional) Maximum interaction vertices; None applies no override.allow_self_loops(bool, optional) Permit propagators that start and end on the same vertex; defaults to True.allow_zero_flow_edges(bool, optional) Permit internal edges with identically zero momentum flow.graph_prefix(str or None, optional) Prefix assigned to generated diagram names.maximum_bridges(int, None, or Ellipsis, optional) Omission or Ellipsis requires one-particle irreducibility only for diagrams with loops; tree exchanges are allowed, including in mixed loop ranges. An integer limits internal bridges at every loop order; None disables it.self_energy(SelfEnergyFilterOptions or None, optional) Reject self-energy subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.tadpoles(TadpoleFilterOptions or None, optional) Reject tadpole subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.zero_snails(SnailFilterOptions or None, optional) Reject zero-snail subgraphs. Omission enables the default filter for non-vacuum processes; explicit None disables it. Ellipsis selects automatic defaults.coupling_orders(dict[str, int | tuple[int, int or None]] or None, optional) Exact coupling powers or inclusive ranges; an upper None is unbounded.fermion_loop_count_range(tuple[int, int] or None, optional) Inclusive range of closed fermion loops.factorized_loop_topologies_count_range(tuple[int, int] or None, optional) Inclusive range of factorized loop-topology components. Defaults to(1, 1)for vacuum processes;Nonedisables the restriction.blob_range(tuple[int, int] or None, optional) Inclusive cross-section blob-count range. Defaults to(1, 1)for cross sections;Nonedisables the restriction.spectator_range(tuple[int, int] or None, optional) Inclusive cross-section spectator-count range. Defaults to(0, 0)for cross sections;Nonedisables the restriction.perturbative_orders(dict[str, int] or None, optional) Exact perturbative powers required for cross-section graphs.sewn_tadpoles(bool or None, optional) Reject tadpoles revealed by sewing cross-section sides; None applies no filter.cut_amplitude_coupling_orders(dict[str, int | tuple[int, int or None]] or None, optional) Coupling-order bounds applied independently within every cut amplitude.cut_amplitude_loop_count_range(tuple[int, int] or None, optional) Inclusive combined loop count across both sides of every cut.select_diagrams(sequence[FeynmanDiagram | str] or None, optional) Retain only these diagram objects, content-derived IDs, or finalized names.veto_diagrams(sequence[FeynmanDiagram | str] or None, optional) Remove these diagram objects, content-derived IDs, or finalized names.loop_momentum_bases(sequence[tuple[FeynmanDiagram | str, sequence[int]]] or None, optional) Diagram selectors paired with ordered stable edge IDs for independent loop momenta.numerator_prefactor(Expression or None, optional) Scalar multiplier retained on every finalized diagram numerator.projector(Expression or None, optional) Override external-state contraction; S(“1”) disables external wavefunctions.numerator_grouping(NumeratorGrouping or None, optional) Defaults to None: no numerator comparison or grouping. Diagrams still contain numerators. Pass NumeratorGrouping to enable zero detection or grouping.progress({“auto”}, Callable[[GenerationProgress], None] or None, optional) Defaults to “auto”: show progress when marimo.running_in_notebook() is true, with stage, counts, and elapsed time. None disables progress. Known totals use a progress bar; unknown totals use a spinner. The display closes on completion, cancellation, or error. Observe stage changes and coalesced counts on the calling Python thread. Callback exceptions propagate and stop generation.filter(Callable[[symbolica.core.Graph, int], bool] or None, optional) Prune partial topologies during enumeration. The first N vertices are complete. False rejects only this search branch. Edge data is the base particle PDG code; node data is 0 internally, -(index+1) for incoming legs and +(index+1) for outgoing legs. Mutating the snapshot does not change enumeration. Keep callbacks cheap: each snapshot is constructed using Symbolica’s Python Graph API.cancellation_token(CancellationToken or None, optional) Shared token for cancelling a running generation task. Token cancellation returns an incomplete result; Python signal-handler exceptions, including KeyboardInterrupt, stop generation and propagate to the caller.
render
Process.render(
*,
config: builtins.dict[builtins.str, typing.Any] | linnet.RenderConfig | None = None,
) -> builtins.strRender a blob with the process’s physical incoming and outgoing particles. Alternative final states are displayed as separate schematics.
Examples
Using the setup in the Process class example:
svg = process.render()Parameters
config(dict or linnet.RenderConfig or None, optional) Particle-label, layout and drawing overrides shared with Feynman diagrams.
with_filters
Process.with_filters(
*,
particle_veto: typing.Sequence[Particle | ParticleSelector | str | int] | types.EllipsisType | None = ...,
vertex_allow: typing.Sequence[VertexRule | str] | types.EllipsisType | None = ...,
vertex_veto: typing.Sequence[VertexRule | str] | types.EllipsisType | None = ...,
) -> ProcessReturn a process with updated particle and vertex restrictions. Omitted fields are preserved; None clears a field. An empty vertex_allow list permits no interactions, whereas None permits every interaction.
Examples
Using the setup in the Process class example:
qed = process.with_filters(vertex_allow=["V_98"])
unrestricted = qed.with_filters(vertex_allow=None)Parameters
particle_veto(sequence[Particle | ParticleSelector | str | int] or None, optional) Replace the excluded species, including their antiparticles.vertex_allow(sequence[VertexRule | str] or None, optional) Replace the allowed interaction rules.vertex_veto(sequence[VertexRule | str] or None, optional) Replace the excluded interaction rules.
with_final_state_alternatives
Process.with_final_state_alternatives(alternatives: typing.Sequence[typing.Sequence[Particle | ParticleSelector | builtins.str | builtins.int]]) -> ProcessReturn a process accepting any of the supplied final states. Generating amplitudes requires exactly one alternative; cross sections may include an empty alternative for a vacuum final state.
Examples
Using the setup in the Process class example:
process = model.process([11, -11], [22, 22])
inclusive = process.with_final_state_alternatives([[22, 22], [13, -13]])Parameters
alternatives(sequence[sequence[Particle | ParticleSelector | str | int]]) Allowed outgoing particle lists.