pytc.ansatz.det.compute_det_ratio_from_row¶
- pytc.ansatz.det.compute_det_ratio_from_row(new_row, inv, row_idx)[source]¶
Compute det(S’)/det(S) for a rank-1 row update.
- With inv = S^{-1} and S’ differing from S only in row
row_idx: ratio = new_row @ inv[:, row_idx]
Follows from cofactor expansion: cofactor(S,k,j)/det(S) = (S^{-1})[j,k].
- Parameters:
new_row – (n_occ,)
inv – (n_occ, n_occ) — S^{-1}
row_idx – int
- Returns:
scalar
- Return type:
ratio
- With inv = S^{-1} and S’ differing from S only in row