vibe-qcDocumentation

Chi MP2 contract audit

This bounded audit follows the Paper 2 consistency corrections. It adds synthetic algebra checks and reuses saved numerical operands. It finds no demonstrated engine defect in the inspected MP2 contracts. It does not extend native acceptance, certify continuous AO fitting errors, or change thresholds. Chi remains experimental; D93 fitted/post-HF remains not-qualified.

Run formal/check_chi_mp2_contracts.py ARTICLE_CHECKOUT in an identified, coherent runtime with this repository on sys.path. NumPy and the existing test dependencies are required. The checker uses finite algebra fixtures, not the pytest chemistry suite, and never calls SCF, fitting, or a molecular calculation. Its JSON records every loaded project module hash, the inspected checkout module hashes, and their equality. Binary64 comparisons have a predeclared absolute tolerance of 2e-12 and zero relative tolerance. Rational identities and the exactly representable density discriminator use equality.

Contract

Route and formula

Check and scope

A: pair density

periodic/chi/local_mp2.py::run_chi_local_mp2 explicitly passes pno_norm='mp2'; dlpno/translation_builder.py::build_translation_pair_pnos calls pno_density.pair_density in the nonredundant metric-orthonormal, Fock-diagonal PAO frame. Ttilde=(4T-2T.T)/(1+delta), D=Ttilde T.T+Ttilde.T T.

density_contract: asymmetric off-diagonal D=[[20,4],[4,16]], diagonal half; rejects bare and half-bare alternatives. Placed occupied indices include relative cell, so equal band labels in different cells have delta=0. Metric orthonormality checked.

A: selection

Strict occupation > cutoff for positive cutoffs; leading eigenvector fallback if none survives. Cutoff zero retains the entire supplied domain.

Exact spectrum [4,1,0,…] gives ranks 8,1,1 at cutoffs 0,1,5. Fallback projector equals the leading projector. Reuses the existing actual-density tie/fallback test. This isolated selector fixture is not a positive-cutoff chemical run.

B: complex ledger

canonical_mp2._double_terms computes each ordered same-spin sector as one quarter of abs(g-gex)^2, opposite-spin as abs(g)^2; _contract divides by Nk^3. Exchange swaps virtual bands and their character indices.

complex_contract: full three-character, two-virtual-band exchange-closed sum matches an independent full AO spin-orbital oracle and restricted OS+SS ledger. Phase and virtual permutation invariance checked; real-square, missing-conjugation, band-only exchange and missing-cell-divisor controls fail.

B: seam response

Fixed factors/orbitals, all-level shift cancels; occupied-only shift t adds 2t to double denominators. Production requires every gap below minus the positive denominator tolerance.

Exact analytic shifted-denominator response checked with t=-0.17; zero and positive denominators refused. Existing seam-spectra-results.json is stored evidence only. Fock-to-seam sign mapping is a separate RHF audit.

C: translation weights

translation.TranslationPairSpaces.energy_weights equals m(2-delta)/Nc. translation_mp2.translation_pair_energy_per_cell applies it once. Residuals are unweighted.

prepared_contract: independently enumerates all 64 ordered pairs on a four-cell, two-band fixture. Same-site, ordinary off-diagonal and self-inverse nonzero translations included; dense ordered-pair residual lift reused. Missing spin or cell factors and weighted residuals disagree.

C: preparation bounds

check_chi_prepared.uncertainty: kstar=sum kappa; dstar=3 sum abs(w) kappa. Operator perturbation and stability margin do not receive energy weights. capture_chi_iterate records actual spaces.energy_weights.

Exact synthetic kstar=11/20, dstar=66/25. Reweighting energy leaves source/operator errors unchanged. Repeated links and multiple occupied slots contribute separately. Existing exact prepared-block reprojection replay passes. Its native capture explicitly excludes stabilizers; the new orbit test and sealed N=2 reduction cover multiplicities, not a new stabilizer theorem-to-native certificate.

D: raw normalization

capture_aiccm_fit_response forms raw primitive integrals from retained factor legs without cell division. check_aiccm_fit_response.chi constructs OS+SS weights with Nk^-3, computes direct and exchange changes and denominator changes. weight_budget accepts raw radii.

Saved chi fit-response replay passes. Exact stress with raw direct change 2i and exchange change -i gives 17/54 for Nk=3. Incorrectly dividing radii by Nc first gives 17/486 and fails.

For each same-spin sector the complete virtual-label exchange is an involution with unchanged denominator. Therefore sum(abs(g-gex)^2/Delta) equals 2 sum(Re(g conjugate(g-gex))/Delta). Combining the two equal restricted same-spin sectors gives the restricted SS ledger with unit prefactor. This identity requires the complete exchange-closed sum; it is not an elementwise replacement for arbitrary truncated labels. Primitive factors give primitive integrals; supercell integrals divide by Nk and the supercell energy divides by Nk again, hence the overall Nk^-3.

The density convention follows Riplinger and Neese, J. Chem. Phys. 138, 034106 (2013), Eq. 23 and the definition immediately below it, DOI 10.1063/1.4773581. Placed-pair residual transport follows Nejad et al., J. Chem. Phys. 163, 214107 (2025), Eqs. 42-44, DOI 10.1063/5.0290816. These distinct density recipes do not authorize transferring Gamma or CCSD cutoffs to chi MP2.

Evidence boundaries

The recorded execution uses the unchanged coherent runtime of the accepted N=2 comparison: release baseline source 5c89075026d59eb6b8235554594d9ae4f1831f2a, twelve source overlays at 1fc985dc5b67bb0ed21bfd61f043a9795d57322e, native SHA-256 499575ab1782406d9ab85a664b74a368a7f300feb8a40c746fadcbb3266bd0d5. The density, translation spaces, energy/residual, canonical MP2 and local MP2 modules are byte-identical to the inspected checkout. The builder predates an unrelated direct-quartet branch; its tested density/selection/rotation block is AST-identical, and this equality is enforced. The JSON preserves the whole-module mismatch rather than claiming whole-source equivalence. No other branch is qualified by this audit. The checkout’s default environment was not used: it could not import current Python against its older native core.

The sealed N=2 canonical/untruncated-local comparison remains the actual native evidence, with raw B-A=-2.503552920529728e-14 Ha/LiH, 27 iterations and maximum residual 6.922331394351115e-13. Neither it nor the RHF/fit was rerun here. Stored exact replays establish statements about their captured operands, not fresh native science or equivalence of all runtime operations to Lean.

Open obligations: there is no general implemented adapter here that derives raw primitive integral-error radii from continuous-AO C19 hypotheses and feeds them into the C18 MP2 response bound. The stored checker measures raw integral differences between two captured endpoints. Its radius r is an error bound, not the raw integral symbol used elsewhere. A caller that supplies scaled supercell radii to the scalar formula would underbound the result; the stress test detects this but does not create a typed runtime guard. Full arbitrary stabilizer certification, all complex meshes and externally validated physical accuracy remain outside this increment.