lcert_verify.builder
Reference LCERT-1 bundle builder — stdlib only.
A verifier nobody can produce input for is untestable. This module is the
minimal reference producer: it emits a well-formed litholab-cert-bundle/1
directory from certificates and key/value rows you supply, using exactly the
commitment spine the verifier re-derives.
It deliberately does not compute any physics. Producing a meaningful certificate — one whose legs correspond to a real manufacturability, process window, model-robustness or photon-shot guarantee — requires the certification engine, which is not part of this package. What this builder produces is a structurally valid bundle: correct manifest, Merkle root, outputs commitment and canonical JSON. That is what conformance testing needs.
Write a canonical bundle directory; return the path to bundle.json.
prereg is any JSON-serializable object recording what was declared
before measurement; it is always copied in and manifest-covered.
SHA-256 of bundle.json — the out-of-band trust anchor.
Invert 0.5*erfc(kappa) = budget by bisection, to the tolerance the verifier enforces.
The verifier does not trust a supplied kappa; it re-runs the erfc round-trip. This helper produces a kappa that survives that check.
Assemble a stochastic gate certificate record in LCERT columnar form.
loci is an iterable of (I_lo, I_hi, ae0) triples. kappa and K are derived
here and re-derived by the verifier; the verdict is likewise re-derived, never supplied --
which is the entire point of the format.
Assemble a domain-agnostic LCERT-BOUND-1 certificate.
loci is an iterable of (lo, hi) pairs: your outward-rounded enclosure
of the quantity at each locus. direction is "below" (safe means the
upper bound stays under the threshold) or "above".
The verdict is derived here and re-derived by the verifier, never supplied. Nothing about this certificate is lithography-specific; where the intervals come from is your analysis and your evidence, and this file does not and cannot compute them.