Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amccaskey opened this issue Feb 9, 2021 · 0 comments
Open

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

amccaskey opened this issue Feb 9, 2021 · 0 comments
Assignees
Labels

Comments

@amccaskey
Copy link
Member

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.

@amccaskey amccaskey added the bug label Feb 9, 2021
1tnguyen pushed a commit to 1tnguyen/tnqvm that referenced this issue Feb 9, 2021
It was a copy and paste error when  I tried to fix ORNL-QCI#89

I copied the leg pattern from Hadamard gate which was actually not generally correct (okay for H matrix, which is symmetric).

Effectively, it was applying U gates in reverse.

Need to swap the leg order.

Tested by: running both the Python test scripts.

Signed-off-by: Thien Nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants