示例#1
0
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
示例#2
0
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
示例#3
0
 def test_hdiag(self):
     hdiag = select_ci.make_hdiag(h1, eri, ci_strs, norb, nelec)
     self.assertAlmostEqual(finger(hdiag), 8.2760894885437377, 9)
示例#4
0
 def test_hdiag(self):
     hdiag = select_ci.make_hdiag(h1, eri, ci_strs, norb, nelec)
     self.assertAlmostEqual(finger(hdiag), 8.2760894885437377, 9)