ramanujan_qft.multiloop#

Experimental massive Euclidean scalar graph integration. This module returns float64 estimates with statistical errors; see Massive Euclidean multiloop graphs for normalization, RMT’s role, and convergence and resource limits.

class ramanujan_qft.multiloop.ScalarEdge(source: object, target: object, mass_squared: object, power: object = 1)[source]#

Bases: object

An internal edge (parallel edges and self-loops are allowed).

source and target are hashable vertex labels; mass_squared and power must be finite and strictly positive. Decimal strings are exact.

class ramanujan_qft.multiloop.ScalarGraph(edges, external_momenta=None)[source]#

Bases: object

A connected scalar graph with conserved external Euclidean momenta.

Parameters:
  • edges (iterable of ScalarEdge) – Edge order fixes the order of parameters x0, x1, … .

  • external_momenta (mapping, optional) – Vertex -> real component sequence, all entering the graph. Missing vertices carry zero momentum. Components must sum to zero exactly; use decimal strings or rational numbers to avoid floating-point sums. These vectors specify invariants, independently of integration D.

property loops#

Cycle rank E - V + 1 (including self-loops).

symanzik(*, max_forests=100000)[source]#

Return (parameters, U, F) as exact SymPy expressions.

U is a sum over complements of spanning trees. The momentum part of F sums squared momentum through each spanning two-forest cut; the mass part is U * sum(x_i*m_i^2). Enumeration is budgeted by max_forests.

uv_margins(D, *, max_subgraphs=65535)[source]#

Return {edge_index_tuple: sum(nu) - D*loops/2} for cyclic subsets.

Every margin must be positive for UV convergence. This includes the whole graph and all disconnected or overlapping loop subgraphs. Positive masses exclude infrared divergences in the supported domain.

class ramanujan_qft.multiloop.MultiloopResult(value: float, error_estimate: float, standard_error: float, converged: bool, evaluations: int, sectors: int, samples_per_replicate: int, replicates: int, seed: int, method: str = 'RMT scale + Hepp sectors + scrambled Sobol')[source]#

Bases: object

Double-precision estimate with statistical, not certified, uncertainty.

error_estimate is the maximum of three standard errors across independent Sobol scrambles, the change at the last refinement, and a roundoff floor. converged means this diagnostic met max(epsabs, epsrel*abs(value)). evaluations counts sector integrand evaluations across all refinements.

exception ramanujan_qft.multiloop.MultiloopConvergenceError(result)[source]#

Bases: ArithmeticError

Requested accuracy was not reached; result contains the estimate.

ramanujan_qft.multiloop.integrate_graph(graph, D=2, *, epsrel=0.0001, epsabs=0.0, min_power=6, max_power=16, replicates=8, seed=0, max_sectors=5040, max_evaluations=2000000, max_forests=100000, strict=True)[source]#

Evaluate a convergent massive Euclidean scalar graph.

Computes \(\int\prod_{l=1}^L d^Dk_l/\pi^{D/2} \prod_e(q_e^2+m_e^2)^{-\nu_e}\). Fractional positive D and powers are allowed. No dimensional-regulator expansion, counterterms, tensors, massless lines, or Minkowski continuation is performed.

Requires the optional multiloop extra (SciPy). Independent scrambled Sobol estimates are refined from 2**min_power to at most 2**max_power samples per replicate, with at least two levels before acceptance. All E! Hepp sectors are summed at each sample; explicit sector, forest and evaluation budgets prevent unbounded work. Increasing loop count has no special hard-coded restriction, but factorial sector growth is expensive.

Returns a MultiloopResult. With strict=True (default), a missed tolerance raises MultiloopConvergenceError, carrying the result. Statistical error diagnostics are not rigorous bounds or decimal-digit certification. epsrel must be >= 1e-12; this backend uses float64.