pytc.solver.isdf_xtc_ccsd

Factorized ISDF xTC-CCSD: RCCSD dispatch + factor-direct VVVV–T2 kernels.

The RCCSD class inherits the CCSD machinery of pytc.solver.jax_xtc_ccsd and replaces only the VVVV–T2 leg through that module’s instance hook. The rest of this module is the factor-direct contraction machinery it dispatches to. Full X stays on its host/HDF5 backing and is streamed one rank panel at a time (three residency tiers: device lift / host-resident / store stream). Opt-in rank-M X instead keeps its separated U/Z orbital factors through the T2 contraction. Neither path materializes a virtual four-index tile.

The raw ERI-like tile order in PyTC is (a, c, b, d); the public functions contract that tile directly with a dense RCCSD t2 in (i, j, c, d) order, without creating a (v, v, v, v) tile.

Classes

CompiledXLAMemory

Backend-specific buffer accounting reported by a JAX executable.

FactorDirectProfile

One steady-state contraction measurement.

RCCSD

JAX RCCSD whose default on-the-fly VVVV path is factorized.

_TuckerXFactors

Virtual-orbital Tucker factors for the factor-direct X branches.

Functions

_assemble_terms

_cgroup_memory_available_bytes

Available bytes under the most restrictive enclosing cgroup limit, or None.

_compiled_k12_memory

Compile the exact three-component K1/K2 branch for its XLA accounting.

_compiled_memory_from_executable

Return stable integer fields from JAX's executable memory analysis.

_compiled_partial_x_memory

_contract_full_thc_t2_impl

JIT implementation of the blocked full-THC VVVV--T2 contraction.

_contract_partial_x

_contract_tucker_x

_contract_x_t2_pipelined

_dtype_itemsize

_measure_free_device_bytes

Measured free bytes on the first local device, or None when unmeasurable.

_measure_free_host_bytes

Measured available host RAM in bytes, capped by any cgroup limit.

_pipelined_x_panel_size

Rank width of one pipelined X panel, a multiple of rank_panel_size.

_profile_call

Compile once, then record one synchronized steady-state wall time.

_read_x_rank_panel

Read one X rank panel from any backing (ndarray view or HDF5 dataset).

_read_x_rank_panel_major

Rank-major twin of _read_x_rank_panel(), returning rank-leading (panel_size, nvir, nvir) panels -- already the layout the panel kernels consume, and one CONTIGUOUS disk read per panel instead of ~nmo^2 strided chunks.

_stream_partial_x

Host-loop rank-panel streaming shared by the left and right X terms.

_stream_partial_x_pipelined

Working-set X panel loop with double-buffered async prefetch.

_validate_full_thc

_validate_t2

_validate_term_factors

_validate_tucker_x

Validate X[p,q,m] = U[p,a] Z[a,b,m] U[q,b] factors.

_validate_x

_validate_x_factors

_validate_x_stream

_x_backing_layout

Detect an X backing's axis layout: "innermost" or "rank_major".

_x_backing_panel_source

Panel source that reads straight from the X backing (tier 3).

_x_host_panel_source

Panel source that slices a host-resident X (tier 2).

compiled_full_thc_memory

Return XLA accounting for the compiled full-THC branch executable.

compiled_partial_x_left_memory

Return XLA accounting for P[a,m] P[c,m] X[b,d,m].

compiled_partial_x_right_memory

Return XLA accounting for X[a,c,m] P[b,m] P[d,m].

contract_full_thc_pair_swapped_t2

Contract V[b,d,a,c] for a full-THC V[a,c,b,d] term.

contract_full_thc_t2

Contract a full-THC (a,c,b,d) term with a dense RCCSD t2.

contract_terms_t2

Return each exact-current-ISDF VVVV--T2 branch and final residual.

contract_terms_t2_auto

Three-tier X path, selected on measured free memory.

contract_terms_t2_tucker

Factor-direct VVVV--T2 terms with rank-M Tucker X.

contract_terms_t2_xstream

Factor-direct terms with X streamed panel-wise from its backing.

contract_tucker_x_left_t2

Factor-direct left X term; neither dense X nor a V⁴ tile is formed.

contract_tucker_x_right_t2

Factor-direct pair X term; neither dense X nor a V⁴ tile is formed.

contract_x_left_t2

Contract P[a,m] P[c,m] X[b,d,m] without a V^4 tile.

contract_x_left_t2_pipelined

Pipelined P[a,m] P[c,m] X[b,d,m]: working-set panels, prefetched.

contract_x_left_t2_streamed

Streamed P[a,m] P[c,m] X[b,d,m]: one X rank panel on device at a time.

contract_x_right_t2

Contract X[a,c,m] P[b,m] P[d,m] without a V^4 tile.

contract_x_right_t2_pipelined

Pipelined X[a,c,m] P[b,m] P[d,m]: working-set panels, prefetched.

contract_x_right_t2_streamed

Streamed X[a,c,m] P[b,m] P[d,m]: one X rank panel on device at a time.

full_thc_schedule_intermediate_estimate_bytes

Estimate only the named live algebraic panels for a full-THC branch.

partial_x_schedule_intermediate_estimate_bytes

Estimate only the named live algebraic panels for an X branch.

profile_isdf_factor_direct_terms_t2

Measure every branch and return the exact factor-direct terms.