Commit 5cc2dd31 authored by Davison's avatar Davison
Browse files

recommit after some verifications

parent dd7b9a11
...@@ -426,20 +426,27 @@ def test_refs(plots_dir): ...@@ -426,20 +426,27 @@ def test_refs(plots_dir):
if __name__ == '__main__': if __name__ == '__main__':
# test_refs('logs_refs\\') # test_refs('logs_refs\\')
# test_exact('plots_exact\\') # test_exact('plots_exact\\')
# print(ci_matrix.exact_diagonalization(1.0, 0.5, 0.1)) # print(ci_matrix.exact_diagonalization(1.0, 0.5,0.0))
#
test = main(4,4) # test = main(4,4)
# test2 = ci_matrix.exact_diagonalization(1.0,0.5,0.001) # test2 = ci_matrix.exact_diagonalization(1.0,0.5,0.001)
# print(test2) # print(test2)
# h = PairingHamiltonian2B(4,4) h = PairingHamiltonian2B(4,4)
# occt = OccupationTensors(h.sp_basis, h.reference) occt = OccupationTensors(h.sp_basis, h.reference)
# wg3b = WegnerGenerator3B(h, occt) wg2b = WegnerGenerator(h, occt)
# test = wg3b.calc_eta() wg3b = WegnerGenerator3B(h, occt)
# eta1B = test[0] test = wg3b.calc_eta()
# eta2B = test[1] test2 = wg2b.calc_eta()
# eta3B = test[2]
# print(eta1B) eta1B_test = test2[0]
# print(eta2B[0,1,4,5]) eta2B_test = test2[1]
# print(eta2B[4,5,0,1])
# print(eta3B.shape) eta1B = test[0]
eta2B = test[1]
eta3B = test[2]
print(eta1B)
print(eta2B[0,1,4,5])
print(eta2B[4,5,0,1])
print(eta2B_test[0,1,4,5])
print(eta3B.shape)
...@@ -154,7 +154,7 @@ class Flow_IMSRG2(Flow): ...@@ -154,7 +154,7 @@ class Flow_IMSRG2(Flow):
# sum2_2b = sum2_2b_3 - sum2_2b_4 # sum2_2b = sum2_2b_3 - sum2_2b_4
# third term # third term
sum3_2b_1 = ncon([eta2B, occA, G], [(3,-2,2,-4), (2,3,0,1), (0,-1,1,-3)]).numpy() sum3_2b_1 = ncon([eta2B, occA, G], [(2,-1,3,-3), (2,3,0,1), (1,-2,0,-4)]).numpy()
sum3_2b_2 = sum3_2b_1 - np.transpose(sum3_2b_1, [0,1,3,2]) sum3_2b_2 = sum3_2b_1 - np.transpose(sum3_2b_1, [0,1,3,2])
sum3_2b = sum3_2b_2 - np.transpose(sum3_2b_2, [1,0,2,3]) sum3_2b = sum3_2b_2 - np.transpose(sum3_2b_2, [1,0,2,3])
# sum3_2b_1 = ncon([eta2B, G], [(0, -1, 1, -3), (1, -2, 0, -4)]).numpy() # sum3_2b_1 = ncon([eta2B, G], [(0, -1, 1, -3), (1, -2, 0, -4)]).numpy()
......
...@@ -170,7 +170,7 @@ class WegnerGenerator(Generator): ...@@ -170,7 +170,7 @@ class WegnerGenerator(Generator):
# sum2_2b = sum2_2b_3 - sum2_2b_4 # sum2_2b = sum2_2b_3 - sum2_2b_4
# third term # third term
sum3_2b_1 = ncon([Gd, occA, God], [(3,-2,2,-4), (2,3,0,1), (0,-1,1,-3)]).numpy() sum3_2b_1 = ncon([Gd, occA, God], [(2,-1,3,-3), (2,3,0,1), (1,-2,0,-4)]).numpy()
sum3_2b_2 = sum3_2b_1 - np.transpose(sum3_2b_1, [0,1,3,2]) sum3_2b_2 = sum3_2b_1 - np.transpose(sum3_2b_1, [0,1,3,2])
sum3_2b = sum3_2b_2 - np.transpose(sum3_2b_2, [1,0,2,3]) sum3_2b = sum3_2b_2 - np.transpose(sum3_2b_2, [1,0,2,3])
# sum3_2b_1 = ncon([Gd, God], [(0, -1, 1, -3), (1, -2, 0, -4)]).numpy() # sum3_2b_1 = ncon([Gd, God], [(0, -1, 1, -3), (1, -2, 0, -4)]).numpy()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment