ORNL-QCI / tnqvm

Tensor Network QPU Simulator for Eclipse XACC
43 stars 10 forks source link

ITensor bug, potentially related to exp-val calc #91

Open amccaskey opened 3 years ago

amccaskey commented 3 years ago

The following circuit ansatz (rz evaled at optimal param)

U(1.5708,0,3.14159) q1
U(1.5708,1.5708,4.71239) q0
CNOT q0,q1
U(1.5708,-3.14159,3.14159) q2
CNOT q1,q1
U(1.5708,0,3.14159) q3
CNOT q2,q3
Rz(0.101476) q3
CNOT q2,q3
CNOT q1,q2
CNOT q0,q1
U(1.5708,0,3.14159) q3
U(1.5708,0,3.14159) q2
U(1.5708,1.5708,4.71239) q0
U(1.5708,0,3.14159) q1

produces the incorrect energy for the operator

H = createOperator('pyscf', {'basis': 'sto-3g', 'geometry': '''
Na  0.000000   0.0      0.0
H   0.0        0.0  1.914388
''', 'frozen-spin-orbitals': [0, 1, 2, 3, 4, 10, 11, 12, 13, 14], 'active-spin-orbitals': [5, 9, 15, 19]})

using the Itensor MPS TNQVM backend. The ExaTN backend produces the correct result, as well as aer and qpp.