klt-yield-native
The Rust statistics core behind klt yield / klt yield-campaign / klt yield-sensitivity (issue #816, Phase 1a of the statistical/yield epic
#710).
This repo's third Rust component (after native/mom/, issue #718, and
native/congestion/, issue #785), following the same standalone
maturin-built pyo3 extension convention — its own Cargo.toml +
pyproject.toml, reached from the top-level pyproject.toml via a PEP 735
dependency group. The split with Python mirrors mom.py/congestion.py:
reading a klt sim Monte Carlo report (or a plain sample-set document) and
turning it into this crate's request shape is the Python layer's job
(src/klayout_tools/yield_analysis.py); everything statistical lives here.
What it does
contract.rs— the Rust/Python JSON boundary; seedocs/cli/yield.mdfor the user-facing schema.stats.rs— dependency-free special functions and sample statistics (erf/erfc,norm_ppf,ln_gamma, the regularized incomplete beta function, …), each a published, citable algorithm rather than a hand-rolled approximation.estimate.rs— turns a Monte Carlo sample set + spec limits into a yield estimate: an empirical Clopper-Pearson estimate (exact binomial interval, no distributional assumption) and a parametric normal estimate (delta-method interval), reported side by side, plus the sample-size verdict. Structurally enforces one rule: a yield number never travels without its confidence interval and sample count — the response types make an interval-less estimate unrepresentable, andguard_no_bare_point_estimaterejects a degenerate interval before serialization (seedocs/cli/yield.md, "Never a bare point estimate").sensitivity.rs—klt yield-sensitivity's ranking (issue #923, Phase 3): attributes an output metric's variance across a completed campaign to the device/process parameters drawn per sample, via a correlation/ regression-based method (a full Sobol/variance-based decomposition is deliberately deferred, per that issue's scope note).
Building / testing
uv sync --extra dev --group yield
uv run klt yield examples/yield/mc-samples.json --limits examples/yield/spec-limits.json
or, without uv:
cd native/yield
maturin develop --release
cd native/yield
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
Full build/install reference, including the "rebuilding after a Rust
change" cache gotcha and the clean-failure behavior when the extension
isn't built: docs/cli/yield.md#building-the-native-extension.
Metadata
Release files for klt-yield-native 0.1.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 |
|---|---|---|---|---|
| klt_yield_native-0.1.0.tar.gz | 61.4 kB | Without provenance | Details for klt_yield_native-0.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| klt_yield_native-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details for klt_yield_native-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl |
| klt_yield_native-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for klt_yield_native-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 1.7 MB
Release files / klt_yield_native-0.1.0.tar.gz
| Download URL | klt_yield_native-0.1.0.tar.gz |
|---|---|
| Size | 61.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60a418e640275fb936527eb83e5abdff4b348740e3a563892660d3a212b4b53a
|
|
BLAKE2b-256 checksum How to use checksums |
93c227a478efc49c08c46c45680ce69f333a79dc44424d7a559d5d7a7ed27818
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / klt_yield_native-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | klt_yield_native-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
057dce86d401734b2c8daf18e7cd76c9c7f51e2c9a2f44bb3dc39aefd1c3fb4d
|
|
BLAKE2b-256 checksum How to use checksums |
7728f4ef7bff7ca661c8c45e37d90270d8f326ca95fb9c8b87794763e098a64e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / klt_yield_native-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | klt_yield_native-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 354.9 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
551db2295f7954992d4d73fafe146b148744577eae4ece4c319162ea22ac1117
|
|
BLAKE2b-256 checksum How to use checksums |
58cb8cf5e263c8d25e7f0f296b6ca74d30aa9c4c93e904e3b80fd974d4450d5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for klt-yield-native 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.