archimedes.quadrature.gauss_hermite¶

archimedes.quadrature.gauss_hermite(
n: int,
kind: Literal['phys', 'prob'] = 'phys',
) 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. "phys" (default) is the physicists’ convention, with reference weight \(e^{-x^2}\) (HermiteMeasure). "prob" is the probabilists’ convention, with reference weight \(e^{-x^2/2}\) (HermiteNormMeasure) – up to normalization, the standard normal density. Neither weight integrates to 1 on its own; pass density=True to QuadratureRule.integrate/sum/scaled_weights for weights that do.

Returns:

rule – Gauss-Hermite rule with n nodes on \((-\infty, \infty)\), exact to degree \(2n - 1\).

Return type:

QuadratureRule

Raises:

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