PyTC

Python Toolkit for Correlation

PyTC provides transcorrelated and adaptive low-rank methods for electronic structure calculations. It uses PySCF mean-field references and JAX for automatic differentiation and accelerator-backed tensor operations.

API Reference

Development

Features

ISDF-xTC setup time vs basis-set size for benzene on a B200 GPU

Transcorrelated methods

  • JAX-based automatic differentiation for Jastrow gradients and Laplacians via folx — single-pass forward Laplacian, JIT-compiled to fused GPU kernels, avoiding the cost of finite differences entirely.

  • Multi-GPU acceleration via JAX sharding for both VMC sampling and integral evaluation — near-linear strong scaling across devices with no user-side code changes.

  • Transcorrelated integrals: K1, K2, K3 two-body and xTC approximated three-body integrals — fully GPU-resident contractions, never materialising the 3-body tensor explicitly.

  • Interpolative Separable Density Fitting (ISDF) for the xTC kernel — empirical \(T \propto n_{\mathrm{orb}}^{1.76}\) scaling (see plot above) pushes routine calculations past 1200 orbitals on a single B200, which is beyond what standard quantum chemistry solvers can handle.

  • Validated ISDF efficiency controls: deterministic blocked pivot selection, exact auxiliary recovery of K1/K3, and an opt-in rank-\(M\) orbital Tucker representation whose dedicated solver contracts T2 directly with the factors.

  • Modular Jastrow factors: Boys-Handy, Nuclear Cusp, Neural Network (EE/EN/EEN), REXP, Polynomial, and Composite — share the same JIT-compiled evaluation path, so adding a new factor adds zero per-step overhead.

  • VMC-based Jastrow optimization with second-order Newton and first-order ML optimizers (Adam) — second-order steps reach the same accuracy in an order of magnitude fewer iterations than SGD.

  • PySCF interoperability with JAX-native CCSD: Builds on PySCF mean-field objects and molecular data, then runs xTC-CCSD with PyTC’s in-house JAX solver

Adaptive low-rank correlation

  • Basis-update and Galerkin (BUG) solvers for density-fitted MP2, direct RPA, and CCSD — the doubles amplitudes are kept in a low-rank pair basis whose rank follows one truncation threshold.

  • Projected perturbative triples — the (T) correction is evaluated in the retained pair basis from the factorized CCSD doubles.

  • Host-memory and disk-backed operation — the largest arrays can be kept off the accelerator and streamed in row panels.

See Adaptive Low-Rank Methods.