pytc.solver.isdf_xtc_ccsd.contract_terms_t2

pytc.solver.isdf_xtc_ccsd.contract_terms_t2(t2, p, grad_p, u1, u3, d, x, *, occupied_pair_batch_size=8, rank_panel_size=128)[source]

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

Keys ending in _direct and _pair are intentionally retained for the dense-reference numerical gate. The final values reproduce the current _assemble_tc_tile / _assemble_delta_u_tile signs:

  • tc = -0.5 * ((K1 - K2 + K3) + pair_swap(...))

  • delta_u = -((D - X) + pair_swap(D - X))

There is no ordinary DF Coulomb term here: it is the separately-gated crossed-DF scope and is deliberately not changed here.

Parameters:
  • t2 (jax.Array)

  • p (jax.Array)

  • grad_p (jax.Array)

  • u1 (jax.Array)

  • u3 (jax.Array)

  • d (jax.Array)

  • x (jax.Array)

  • occupied_pair_batch_size (int)

  • rank_panel_size (int)

Return type:

Mapping[str, jax.Array]