Skip to main content

Crate lowdisc

Crate lowdisc 

Source
Expand description

Quasi-Monte Carlo sequences.

Low-discrepancy sequences fill the unit hypercube more uniformly than pseudorandom points. For numerical integration, QMC achieves $O((\log n)^d / n)$ error vs $O(1/\sqrt{n})$ for plain MC.

§Sequences

  • Halton: radical-inverse construction using successive primes as bases. Simple, no precomputation, but quality degrades above ~20 dimensions due to correlation between coordinates.
  • Sobol: direction-number construction with Gray-code enumeration. Better high-dimensional uniformity than Halton. Direction numbers from Joe & Kuo (2010) support up to dimension 1111.
  • Owen-scrambled Sobol: random digit scrambling that preserves the low-discrepancy property while breaking systematic patterns. Enables unbiased variance estimation from a single randomized QMC sequence.

§References

  • Halton (1960): “On the efficiency of certain quasi-random sequences of points in evaluating multi-dimensional integrals.”
  • Sobol (1967): “Distribution of points in a cube and approximate evaluation of integrals.”
  • Joe & Kuo (2010): “Constructing Sobol sequences with better two-dimensional projections.”
  • Owen (1995): “Randomly permuted (t,m,s)-nets and (t,s)-sequences.”
  • Martinez & Williams (2026): “QMC Methods Enable Extremely Low-Dimensional Deep Generative Models.”

Structs§

SobolGenerator
Incremental Sobol sequence generator using Gray-code enumeration.

Functions§

halton_point
Compute a single Halton point in [0, 1)^d.
halton_sequence
Generate n Halton points in [0, 1)^d, starting from index = 1.
sobol_scrambled
Generate n Owen-scrambled Sobol points in [0, 1)^d.
sobol_sequence
Generate n Sobol points in [0, 1)^d, starting from index 1 (the origin at index 0 is skipped).