@@ -25,6 +25,7 @@ def test_antisymmetrize():
2525
2626 assert_allclose (mol_ham .two_body [:2 , :2 , :2 , :2 ], expected_two_body_aa )
2727
28+
2829def test_to_geminal ():
2930 """Test conversion to geminal basis."""
3031 n_orb = 4
@@ -53,12 +54,11 @@ def test_to_reduced_ham():
5354 mol_ham = MolHam (one_body = one_body , two_body = two_body )
5455 reduced_ham = mol_ham .to_reduced (n_elec = 2 )
5556
56-
5757 # sum over the spin-orbital indices
5858 reduced_ham = reduced_ham [:2 , :2 , :2 , :2 ] + \
59- reduced_ham [2 :, 2 :, 2 :, 2 :] + \
60- reduced_ham [:2 , 2 :, :2 , 2 :] + \
61- reduced_ham [2 :, :2 , 2 :, :2 ]
59+ reduced_ham [2 :, 2 :, 2 :, 2 :] + \
60+ reduced_ham [:2 , 2 :, :2 , 2 :] + \
61+ reduced_ham [2 :, :2 , 2 :, :2 ]
6262 reduced_ham *= 0.25
6363
6464 reduced_ham_true = 0.5 * two_body
@@ -67,4 +67,4 @@ def test_to_reduced_ham():
6767 reduced_ham_true [0 , 1 , 0 , 1 ] = 1
6868 reduced_ham_true [1 , 0 , 1 , 0 ] = 1
6969
70- assert_allclose (reduced_ham , reduced_ham_true )
70+ assert_allclose (reduced_ham , reduced_ham_true )
0 commit comments