feat(qmc): add Lattice quasi-Monte Carlo sampler - #249
Open
Samuel-Vangu wants to merge 4 commits into
Open
Conversation
Author
|
Hi @gomezzz, could you please trigger the CI for this PR when you have time? Thank you! |
Samuel-Vangu
force-pushed
the
feat/add-lattice-sampler
branch
from
July 30, 2026 11:33
185ce3a to
a420f26
Compare
Author
|
@gomezzz, pushed a few fixes (ruff formatting + moving |
…ft block in Lattice
Author
|
Hi @gomezzz, sorry for the back-and-forth — pushed another fix, could you trigger CI once more when you get a chance? Thanks for your patience! |
Author
|
Hi @gomezzz, pushed pydoclint fixes , could you approve/trigger CI when you get a chance? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(qmc): add Lattice quasi-Monte Carlo sampler
Description
Summary of changes
RNG(and mirroring the existingSobolsampler), that plugs intoMonteCarlo.integratevia the existingrng=slot.lattice-33002-1024-1048576.9125, from Frances Y. Kuo's Lattice Rule Generating Vectors collection, order-3 weights, dimensions up to 9125, sample sizes from 1024 to 1048576) asx_i = frac(i * z / N).uniformto keep the QMC estimator unbiased. With a fixedseed, the shift is reproducible across calls; without one, each call draws its own independent shift.torch.Generator/tensor ops directly; there is no SciPy/other-backend path like Sobol's, sincescipy.stats.qmchas no rank-1 lattice rule.torchquad.Lattice.Addresses #140 (MonteCarlo path; VEGAS and JIT support to follow). Motivated by the QMC request in #217.
Resolved Issues
How Has This Been Tested?
frac(i*z/N)computed independently from the on-disk generating vectorshift=Falseignores the seed entirelyRelated Pull Requests