Overview

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

Sector decomposition

Sector decomposition of native HEPKit diagrams and integral families.

sector_decompose generates a Laurent integrand. Compilation and numerical integration remain explicit, caller-owned operations on the returned objects.

Classes

CancelledError
Chart Original chart ordinals and their retained native representative/kernel association.
CoefficientExpansionSnapshot Native per-representative coefficient work for the current or last attempt.
CoefficientRequestCounts Native representation counts, reset at each coefficient-series attempt.
CompactCoefficient A retained Symbolica alias root and definitions, without restoring a full expression.
CompilationSettings
CoordinateMap Native density pullback before endpoint subtraction, including its positive measure.
DiscreteSectorAllocation Selection probability in the native discrete grid and global points per batch.
DomainAssessment The native domain and threshold policy, including historical assessments.
EndpointPower Exact b + c epsilon power and required Taylor coefficients; not a pole count.
EvaluationDiagnostics Native caller-aggregated evaluation counters, including failed attempts.
EvaluatorOperations Native shared evaluator counts; these are not optimized machine-operation counts.
EvaluatorStatistics Complete shared sector evaluator size on the current backend.
EvaluatorTiming
FactorAssessment
FastSecDecError
FormulaPreparationSnapshot Coordinator-owned counts for unique subtraction-formula precomputation.
GeneratedIntegral
GeneratedSector A numerical sector at its native kernel-association index, with shared ownership.
GenerationMetadata Retained domain and chart associations; no decomposition is repeated by inspection.
GenerationSession
GenerationSnapshot Generation progress copied from the native caller-owned observer.
GenerationTimings Native observed generation wall times in seconds
HavanaDiscreteSession Caller-owned native sector importance sampling
HavanaDiscreteSettings Native global-batch allocation and discrete/continuous Havana grid settings.
Integral Native diagram, assumptions and explicit normalized loop measure.
IntegrationObservation
IntegrationSnapshot Coverage and estimates from the native caller-driven integration session.
Kernels Compiled native evaluator owners
LiveEstimate
LiveObservation
LiveSector
PreSubtractionMetadata Mapped density before symmetry, multiplicity, endpoint subtraction or expansion.
PreSubtractionTerm One mapped term; its potentially large regular body is never materialized.
QmcSession Caller-owned bounded execution, with no background loop or worker pool.
QmcSettings
SectorContribution
SectorMap The retained exact integer geometry, with native Numerica-to-Python integer transport.
SectorSnapshot Native per-sector work and complete-replica coverage.
StabilitySettings
VectorEstimate Native joint Laurent estimate with signed orders and full covariance

Functions

sector_decompose Generate from an existing native diagram or an explicitly weighted family
with_diagram_expressions Copy a complete native diagram, replacing only the supplied expressions

sector_decompose

sector_decompose(
    input: typing.Union[symbolica.community.hepkit.FeynmanDiagram, symbolica.community.hepkit.IntegralFamily],
    *,
    regulator: symbolica.Expression,
    kinematics: typing.Optional[symbolica.community.hepkit.Kinematics] = None,
    dimension: typing.Optional[symbolica.Expression] = None,
    powers: typing.Optional[typing.Union[collections.abc.Mapping[int, int], collections.abc.Sequence[int]]] = None,
    numerator: typing.Optional[symbolica.Expression] = None,
    scalar_values: typing.Optional[dict[symbolica.Expression, symbolica.Expression]] = None,
    auxiliary_momenta: typing.Optional[collections.abc.Sequence[symbolica.Expression]] = None,
    measure_multiplier: typing.Optional[symbolica.Expression] = None,
    runtime_parameters: typing.Optional[list[symbolica.Expression]] = None,
    model_parameters: str = 'runtime',
    max_order: int = 0,
    coefficient_expansion: str = 'full_expression',
    mode: str = 'symbolic',
    subtraction: str = 'taylor',
    observer: typing.Optional[collections.abc.Callable[[symbolica.community.hepkit.sector_decomposition.GenerationSnapshot], typing.Optional[bool]]] = None,
    progress: typing.Union[typing.Literal['auto'], typing.Callable[[symbolica.community.hepkit.sector_decomposition.GenerationSnapshot], typing.Optional[bool]], None] = 'auto',
) -> symbolica.community.hepkit.sector_decomposition.GeneratedIntegral

Generate from an existing native diagram or an explicitly weighted family.

Diagrams require kinematics, use their owned numerator/weights, and take an optional positive-power mapping by stable edge ID. Families require a signed power sequence in native denominator order and a weighted scalar numerator; auxiliary slots never default to power one. Kinematics overrides must retain original external products after scalar binding, but may add auxiliary data. Dimension defaults to 4-2*regulator. Compilation and sessions are explicit. progress=“auto” shows HEPKit progress in marimo when observer is absent. None disables display; a callable receives every snapshot after observer. None/True continues, False cancels; original callback exceptions propagate.

with_diagram_expressions

with_diagram_expressions(
    diagram: FeynmanDiagram,
    *,
    numerator: typing.Optional[Expression] = None,
    projector: typing.Optional[Expression] = None,
    overall_factor: typing.Optional[Expression] = None,
) -> FeynmanDiagram

Copy a complete native diagram, replacing only the supplied expressions. Native numerator validation and all graph/model ownership are preserved.