Multilevel quasi-Monte Carlo in Python.
Project description
mlqmcpy
Multilevel (quasi-)Monte Carlo methods in Python.
mlqmcpy provides iterators and example problems for estimating expectations with
Monte Carlo, quasi-Monte Carlo, multilevel Monte Carlo, and multilevel
quasi-Monte Carlo methods.
Installation
pip install mlqmcpy
Quick start
from mlqmcpy import GreedyMLQMCIterator
from mlqmcpy.problems.analytic import analytic
iterator = GreedyMLQMCIterator(2, error_tolerance=1e-2, seed=1234)
for new_samples in iterator:
new_results = {
level: analytic.ml(level, samples)
for level, samples in new_samples.items()
}
iterator.update(new_results)
print(iterator.mean)
print(iterator.standard_error)
Development
This project uses uv for dependency management.
As a library, mlqmcpy does not commit a lockfile; development and CI resolve
from pyproject.toml.
uv sync --group dev --refresh
uv run pytest
uv run ruff check mlqmcpy tests
uv run black --check mlqmcpy tests
uv run isort --check-only mlqmcpy tests
uv build
Releases are published from GitHub Releases through PyPI Trusted Publishing.
Configure the PyPI trusted publisher for repository PieterjanRobbe/mlqmcpy,
workflow .github/workflows/release.yml, and environment pypi.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlqmcpy-0.1.0.tar.gz.
File metadata
- Download URL: mlqmcpy-0.1.0.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d769f5eed2cde37ee948acc7bb56de5945b7e5deedd860e11453cd671f09aac
|
|
| MD5 |
186b32ed12fa8b5ae0156aac617b09da
|
|
| BLAKE2b-256 |
fd990bee0862ee16802242ea75c944b8f4d2183583f02e7532695589b43a4b52
|
Provenance
The following attestation bundles were made for mlqmcpy-0.1.0.tar.gz:
Publisher:
release.yml on sandialabs/mlqmcpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlqmcpy-0.1.0.tar.gz -
Subject digest:
1d769f5eed2cde37ee948acc7bb56de5945b7e5deedd860e11453cd671f09aac - Sigstore transparency entry: 1595602552
- Sigstore integration time:
-
Permalink:
sandialabs/mlqmcpy@db5f0149c3845cf118a6b1082a04e6d4f23bcbb2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sandialabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@db5f0149c3845cf118a6b1082a04e6d4f23bcbb2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mlqmcpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mlqmcpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e6a32ae932833a42f4f392068a03b7449a8346d3386160abb6c4c7842c0422f
|
|
| MD5 |
20c546caa1c73e70d54836e0a7d07079
|
|
| BLAKE2b-256 |
378c4a5a5152d1020bd0cbeb039af5ab63fa99341e224cbd006c01f7b8d5b0bb
|
Provenance
The following attestation bundles were made for mlqmcpy-0.1.0-py3-none-any.whl:
Publisher:
release.yml on sandialabs/mlqmcpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlqmcpy-0.1.0-py3-none-any.whl -
Subject digest:
5e6a32ae932833a42f4f392068a03b7449a8346d3386160abb6c4c7842c0422f - Sigstore transparency entry: 1595602595
- Sigstore integration time:
-
Permalink:
sandialabs/mlqmcpy@db5f0149c3845cf118a6b1082a04e6d4f23bcbb2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sandialabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@db5f0149c3845cf118a6b1082a04e6d4f23bcbb2 -
Trigger Event:
release
-
Statement type: