DiffusionX
English | 简体中文
Usage
Random Number Generation
High-performance parallel random number generation using diffusionx.random.
from diffusionx import random
# Generate standard normal random numbers (10 samples)
x = random.randn(10)
# Generate uniform random numbers (3x3 matrix) in [0, 1)
u = random.uniform((3, 3), low=0.0, high=1.0)
# Generate alpha-stable random numbers (alpha=1.5, beta=0.5)
s = random.stable_rand(alpha=1.5, beta=0.5, size=1000)
Stochastic Process Simulation
Simulate various stochastic processes and calculate functionals using diffusionx.simulation.
from diffusionx.simulation import Bm, FBm, Levy
# --- Brownian Motion ---
bm = Bm(start_position=0.0, diffusion_coefficient=1.0)
# Simulate trajectory
times, positions = bm.simulate(duration=10.0, time_step=0.01)
# Calculate First Passage Time (FPT) for domain (-1, 1)
fpt = bm.fpt(domain=(-1, 1))
# --- Fractional Brownian Motion ---
fbm = FBm(hurst_exponent=0.7)
# Calculate Time-Averaged Mean Squared Displacement (TAMSD)
tamsd = fbm.tamsd(duration=10.0, delta=1.0)
# --- Alpha-Stable Lévy Process ---
levy = Levy(alpha=1.5)
# Calculate Occupation Time in domain (-1, 1)
occ_time = levy.occupation_time(domain=(-1, 1), duration=10.0)
Features
Random Number Generation (diffusionx.random)
- Gaussian:
randn - Uniform:
uniform - Exponential:
randexp - Poisson:
poisson - $\alpha$-Stable:
stable_rand,skew_stable_rand - Bernoulli:
bool_rand
Stochastic Processes (diffusionx.simulation)
Diffusions & Lévy Processes
- Brownian Motion (
Bm) - Geometric Brownian Motion (
GeometricBm) - Fractional Brownian Motion (
FBm) - Lévy Process (
Levy,AsymmetricLevy) - Cauchy Process (
Cauchy,AsymmetricCauchy) - Gamma Process (
Gamma) - Ornstein-Uhlenbeck Process (
OU)
Subordinators
- Stable Subordinator (
Subordinator) - Inverse Stable Subordinator (
InvSubordinator)
Langevin Dynamics
- Langevin Equation (
Langevin) - Generalized Langevin Equation (
GeneralizedLangevin) - Subordinated Langevin Equation (
SubordinatedLangevin)
Brownian Functionals
- Brownian Bridge (
BrownianBridge) - Brownian Excursion (
BrownianExcursion) - Brownian Meander (
BrownianMeander)
Others
- Continuous Time Random Walk (
CTRW) - Poisson Process (
Poisson) - Lévy Walk (
LevyWalk)
Functionals
Support for calculating various functionals across most processes:
- FPT: First Passage Time (and moments)
- Occupation Time: Time spent in a domain (and moments)
- MSD/TAMSD: Mean Squared Displacement metrics
Benchmark
Performance benchmark tests compare the Rust, C++, Julia, and Python implementations, which can be found here.
License
This project is dual-licensed under:
You can choose to use either license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Metadata
Release files for diffusionx 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diffusionx-0.3.0.tar.gz | 61.3 kB | With provenance | Details for diffusionx-0.3.0.tar.gz |
Built distributions (wheels)
Total release size: 15.7 MB
Release files / diffusionx-0.3.0.tar.gz
| Download URL | diffusionx-0.3.0.tar.gz |
|---|---|
| Size | 61.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
383ebc4aa4e8e5e17006f2f18c0b3cef0b88dc364dab5dc9f03a8be1d738d350
|
|
BLAKE2b-256 checksum How to use checksums |
9f9f0d08f8f84dd80363bc2383a5d6ae40a8800aed7ffbec073dbb09c52f8b97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp313-cp313t-win_amd64.whl
| Download URL | diffusionx-0.3.0-cp313-cp313t-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
65e74a7381358aea0e7d8041a02123912257d8267f4c3365ed3295cb68292d25
|
|
BLAKE2b-256 checksum How to use checksums |
5525a43f873274b8b3e771c073cbe6604e7d6b5d1a3b39417246d6c1e58aea35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp313-cp313t-manylinux_2_28_x86_64.whl
| Download URL | diffusionx-0.3.0-cp313-cp313t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
57498a28e6a67754e44cf8f4a28ff91f818c462db0362c4fe98eedb94d98cebb
|
|
BLAKE2b-256 checksum How to use checksums |
021a7b4b09ba8066b3a8b00134c35e1d26fe4963ef4d03ac9f236bf4cf3c448c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl
| Download URL | diffusionx-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
f0adc0c0faeaa271da199bf40f2857b0ef46cb377722319f395054de30bcc46a
|
|
BLAKE2b-256 checksum How to use checksums |
f4d4ad646970b23dfe239536b5e225815e7144e93d1a77d9536da696db603f3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp313-cp313t-macosx_11_0_arm64.whl
| Download URL | diffusionx-0.3.0-cp313-cp313t-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7453b8a0c15edc8ee6a93d1dc6e2c8c291511327a4571b479a73c86d20b4c7e7
|
|
BLAKE2b-256 checksum How to use checksums |
25c04be060792da8770c15ddd31f2794200b61c26d0dc1523db72b49a113c51b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp313-cp313t-macosx_10_12_x86_64.whl
| Download URL | diffusionx-0.3.0-cp313-cp313t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
82cd57865aaea72d2c283ccfa7e92cc6736bedafeb6360318295aae302973cdb
|
|
BLAKE2b-256 checksum How to use checksums |
dd5f47fe14e97601857d0b4d2e708f181e546652328d71ebcecf44606cefe02f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp311-abi3-win_arm64.whl
| Download URL | diffusionx-0.3.0-cp311-abi3-win_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
304c4c88b6f0529ffeb500709359f59c3d424a06d7fda6d6cdb82114d1a747cd
|
|
BLAKE2b-256 checksum How to use checksums |
f49930df1976eab66850de3d74a841f5731e2affccd1f4f255cd3206bcf28acb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp311-abi3-win_amd64.whl
| Download URL | diffusionx-0.3.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1a55908b6dc74ad5687330f1f4b04d7ecc203a0b00e5c201817172255740b19a
|
|
BLAKE2b-256 checksum How to use checksums |
c0ba64d187d66e0e1e02f52fb95e689a873e03a42345b577a78c3e6708b55cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | diffusionx-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dd235752c42b81be664862abb0cc1fa205cf22345602d5c963d3bb321a9f126b
|
|
BLAKE2b-256 checksum How to use checksums |
9267badd4d2ad4eb10ed01fa471d9cfa1be685efd11d78c08f7e9f34c5baeb7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | diffusionx-0.3.0-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8d27cbf452166dd394818cd00126113370c1e1bbca641764e8a5a700849ea2ec
|
|
BLAKE2b-256 checksum How to use checksums |
ff72abfe7874b313cea6bbc5bb1bb7bfced3f7fd4d633457e07802560139514f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | diffusionx-0.3.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
af1d815345ba23e6c0ee3d0cb9f33a3c0ec8aeef10d08b1cf38f432a15740a35
|
|
BLAKE2b-256 checksum How to use checksums |
f4a69d4f2c561aa01fdae496fbec7e3f8fe99c3bbae7bc1c71bc959467b09ca3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logRelease files / diffusionx-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | diffusionx-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
178cc36354e55cc7d764b1609d95b5b0c7e86817a2a26d63e7c39e8ee398ceb9
|
|
BLAKE2b-256 checksum How to use checksums |
47b9058ee493e849aa247232554a27dd27a0ac652b243a08f2b9a0127e5e05ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logSecurity for diffusionx 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 12 files in this release have been uploaded with provenance metadata.
Attestation for diffusionx-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.