pub fn compute_stda_j_matrix_gpu(
ctx: &GpuContext,
q_matrix: &[f64],
gamma: &[f64],
n_atoms: usize,
n_singles: usize,
) -> Result<Vec<f64>, String>Expand description
GPU-accelerated sTDA J-integral matrix: A_{off} = 2 · Q^T · Γ · Q
q_matrix: transition charges, shape (n_atoms, n_singles), row-major flat.
gamma: damped Coulomb matrix, shape (n_atoms, n_atoms), row-major flat.
n_atoms: number of atoms.
n_singles: number of single excitations.
Returns the off-diagonal contribution to the A matrix (n_singles × n_singles), row-major.