double_factorized_2body¶
- double_factorized_2body(two_body_tensor, tol, max_vecs=None, cholesky=True)¶
Double-factorized decomposition of a real two-body tensor.
Represents \(h_{pqrs} = \sum_t \sum_{kl} Z^{(t)}_{kl} U^{(t)}_{pk} U^{(t)}_{qk} U^{(t)}_{rl} U^{(t)}_{sl}\), returning a list of \((Z, U)\) terms where each \(Z\) is a real symmetric diagonal Coulomb matrix and each \(U\) is a unitary orbital rotation.
When
choleskyisTrue(the default behavior) the outer factorization uses a modified Cholesky decomposition; otherwise it uses a truncated eigendecomposition.- Parameters:
two_body_tensor – the real two-body tensor of shape
(norb, norb, norb, norb).tol – the tolerance controlling the truncation error of the decomposition.
max_vecs – the maximum number of terms to retain. Defaults to
norb * (norb + 1) / 2.cholesky – whether to use the modified Cholesky decomposition (
True) or a truncated eigendecomposition (False) for the outer factorization.
- Returns:
A list of \((Z, U)\) 2-tuples, where
Zis the diagonal Coulomb matrix andUis the orbital rotation.