Skip to content

Commit

Permalink
cleaning psi4 quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Harper Grimsley committed Jul 17, 2024
1 parent cc35134 commit a0a3fe8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_sa_adapt_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
import copy
import os
import numpy as np
import psi4

THIS_DIR = os.path.dirname(os.path.abspath(__file__))

data_path = os.path.join(THIS_DIR, "lih_cas_dump.json")
if os.path.exists(data_path):
os.remove(data_path)


class TestSAADAPTVQE:
Expand Down Expand Up @@ -235,8 +242,6 @@ def test_LiH_more_adapt_vqe(self):
for j in range(len(E_more)):
assert dip_dir[i, j] - total_dip[i, j] == approx(0.0, abs=1e-7)

THIS_DIR = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.join(THIS_DIR, "lih_cas_dump.json")
spaces = [[1, 0, 0, 0], [2, 0, 0, 0], [1, 0, 1, 1]]
mol = system_factory(
system_type="molecule",
Expand Down Expand Up @@ -339,3 +344,5 @@ def test_LiH_more_adapt_vqe(self):
alg.run(pool_type="GSD", adapt_maxiter=3)
for i in range(4):
assert correct_Es[i] == approx(alg._diag_energies[-1][i])

psi4.core.clean_options()

0 comments on commit a0a3fe8

Please sign in to comment.