Skip to content

Commit 34e2368

Browse files
committed
flipped single qubit operator signs of H2 test back
1 parent 500fa17 commit 34e2368

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/operator_tests/test_fermionic_to_qubit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ def test_hamiltonian_H2():
4545
return
4646

4747
K = -0.812170607248714 -0.0453026155037992*X(0)*X(1)*Y(2)*Y(3) +0.0453026155037992*X(0)*Y(1)*Y(2)*X(3) +0.0453026155037992*Y(0)*X(1)*X(2)*Y(3) -0.0453026155037992*Y(0)*Y(1)*X(2)*X(3) \
48-
-0.171412826447769*Z(0) +0.168688981703612*Z(0)*Z(1) +0.120625234833904*Z(0)*Z(2) +0.165927850337703*Z(0)*Z(3) -0.171412826447769*Z(1) \
49-
+0.165927850337703*Z(1)*Z(2) +0.120625234833904*Z(1)*Z(3) +0.223431536908133*Z(2) +0.174412876122615*Z(2)*Z(3) +0.223431536908133*Z(3)
48+
+0.171412826447769*Z(0) +0.168688981703612*Z(0)*Z(1) +0.120625234833904*Z(0)*Z(2) +0.165927850337703*Z(0)*Z(3) +0.171412826447769*Z(1) \
49+
+0.165927850337703*Z(1)*Z(2) +0.120625234833904*Z(1)*Z(3) -0.223431536908133*Z(2) +0.174412876122615*Z(2)*Z(3) -0.223431536908133*Z(3)
5050

5151
mol = gto.M(
5252
atom = '''H 0 0 0; H 0 0 0.74''',
5353
basis = 'sto-3g')
5454

5555
H = create_electronic_hamiltonian(mol).to_qubit_operator().to_pauli().hermitize()
5656
G = K-H
57+
5758
G.apply_threshold(1e-4)
5859
assert str(G)=='0'

0 commit comments

Comments
 (0)