Skip to content

Commit

Permalink
Update test_ucc.py
Browse files Browse the repository at this point in the history
ucc.mp2_amplitude test
  • Loading branch information
damarkian authored Dec 15, 2023
1 parent 6a03628 commit 52ff301
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_ucc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
from scipy.optimize import minimize

from qibochem.ansatz.hf_reference import hf_circuit
from qibochem.ansatz.ucc import ucc_circuit
from qibochem.ansatz.ucc import ucc_circuit, mp2_amplitude
from qibochem.driver.molecule import Molecule
from qibochem.measurement.expectation import expectation

def test_mp2_amplitude():
h2 = Molecule([("H", (0.0, 0.0, 0.0)), ("H", (0.0, 0.0, 0.7))])
h2.run_pyscf()
l = mp2_amplitude([0,1,2,3], h2.eps, h2.tei)
ref_l = 0.06834019757197053

assert np.isclose(l, ref_l)


def test_uccsd():
# Define molecule and populate
Expand Down

0 comments on commit 52ff301

Please sign in to comment.