def make_hdiag(h1e, eri, ci_strs, norb, nelec): hdiag = select_ci.make_hdiag(h1e, eri, ci_strs, norb, nelec) na = len(ci_strs[0]) lib.transpose_sum(hdiag.reshape(na, na), inplace=True) hdiag *= .5 return hdiag
def make_hdiag(h1e, eri, ci_strs, norb, nelec): hdiag = select_ci.make_hdiag(h1e, eri, ci_strs, norb, nelec) na = len(ci_strs[0]) lib.transpose_sum(hdiag.reshape(na,na), inplace=True) hdiag *= .5 return hdiag
def test_hdiag(self): hdiag = select_ci.make_hdiag(h1, eri, ci_strs, norb, nelec) self.assertAlmostEqual(finger(hdiag), 8.2760894885437377, 9)