pytc.df.thcΒΆ
Production DF/THC algebra and X-store layouts.
The JAX section implements the panelled LS-THC algebra used by the solver.
extract_vv_df_factor builds its metric-applied virtual DF input. The
X-store section converts ISDF X factors between the
rank-innermost store layout (nmo, nmo, rank) and the rank-major layout
(rank, nmo, nmo) (panel-contiguous), in place or into a new store.
Classes
Exact, cross, full-THC, and robust production contractions. |
Functions
FP64 as a HOST array -- for operands the panel loops only ever slice. |
|
Validate rank while landing an operand on device as float64. |
|
Provenance stamp for an X dataset: sha256 over shape plus EVERY row slab, so any changed entry changes the stamp (no sampling shortcuts). |
|
Append a rank-major copy of X to an existing store, in place. |
|
Whole-store conversion: every dataset copied; X kept AND a rank-major twin appended. |
|
Convert one X dataset to rank-major layout, chunked over an nmo axis. |
|
Evaluate the panelled production DF/THC contractions. |
|
Exact current-DF sandwich, panelled over the auxiliary axis. |
|
Extract PySCF's metric-applied virtual DF factor in PyTC order. |
|
JAX FP64 normal-equation LS-THC fit with host-resident DF factors. |
|
B_tilde[a,c,Q] B_tilde[b,d,Q] t2[ij,c,d] without ever forming B_tilde. |
|
Both partial-THC crosses with a precontracted DF endpoint. |
|
Fail closed if JAX is not in x64 mode. |