archimedes.quadrature.gauss_hermite¶

archimedes.quadrature.gauss_hermite(
n: int,
kind: Literal['phys', 'prob'] = 'prob',
loc: float | None = None,
scale: float | None = None,
) → QuadratureRule¶

Gauss-Hermite quadrature rule with n nodes.

Nodes are the roots of the degree-n Hermite polynomial. The rule is exact for polynomials up to degree \(2n - 1\), weighted by the Gaussian-shaped reference weight of measure.

Parameters:
  • n (int) – Number of quadrature nodes.

  • kind ({"phys", "prob"}, optional) – Which classical Hermite convention to use. "prob" (default) is the probabilists’ convention, with reference weight \(e^{-x^2/2}\) (ProbabilistsHermiteMeasure) – up to normalization, the standard normal density. "phys" is the physicists’ convention, with reference weight \(e^{-x^2}\) (PhysicistsHermiteMeasure). Neither weight integrates to 1 on its own; pass density=True to QuadratureRule.integrate/sum for weights that do.

  • loc (float, optional) – Location/scale of the target Gaussian-shaped weight. Default loc=0, scale=1.

  • scale (float, optional) – Location/scale of the target Gaussian-shaped weight. Default loc=0, scale=1.

Returns:

rule – Gauss-Hermite rule with n nodes on \((-\infty, \infty)\), exact to degree \(2n - 1\), mapped by loc/scale if given.

Return type:

QuadratureRule

Raises:

ValueError – If kind is not "phys" or "prob".