Skip to content

Commit

Permalink
revert mol hamiltonian test comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Dec 8, 2024
1 parent 7ab4480 commit 8b4e6c1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tests/python/tenpy/hamiltonians/molecular_hamiltonian_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,4 @@ def test_from_molecular_hamiltonian(norb: int, nelec: tuple[int, int]):
original_expectation = np.vdot(product_state_1, hamiltonian @ product_state_2)
mol_hamiltonian_mpo.apply_naively(product_state_mps_2)
mpo_expectation = product_state_mps_1.overlap(product_state_mps_2)
np.testing.assert_allclose(
abs(original_expectation.real),
abs(mpo_expectation.real),
rtol=1e-05,
atol=1e-08,
)
np.testing.assert_allclose(
abs(original_expectation.imag),
abs(mpo_expectation.imag),
rtol=1e-05,
atol=1e-08,
)
np.testing.assert_allclose(original_expectation, mpo_expectation)

0 comments on commit 8b4e6c1

Please sign in to comment.