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 , returning a list of terms where each is a real symmetric diagonal Coulomb matrix and each is a unitary orbital rotation.
When cholesky is True (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), in chemist ordering (i.e. the index pairs and each label a charge density, as in the reconstruction formula above). - 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 2-tuples, where Z is the diagonal Coulomb matrix and U is the orbital rotation.