pytc.kmat.calc_K1¶
- pytc.kmat.calc_K1(phi, grad_phi, jastrow_factor, jastrow_params, grid_points, weights, ranges=None, batch_size=1000)[source]¶
Calculate K1 matrix: K1_{pqrs} = sum_{i,j} w_i w_j phi_p(i) phi_q(i) nabla_i u(i, j) phi_r(j) phi_s(j)
- Parameters:
phi – Orbitals on grid (Nb, N_grid)
grad_phi – Orbital gradients on grid (Nb, N_grid, 3)
jastrow_factor – JAX Jastrow factor instance
jastrow_params – Parameters for the Jastrow factor
grid_points – Array of shape (N_grid, 3)
weights – Array of shape (N_grid,) for integration weights
batch_size – Number of grid points to process at once
ranges – Optional tuple of (slice_p, slice_q, slice_r, slice_s). If None, computes full (Nb, Nb, Nb, Nb) matrix.