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

[qcor-py] Raw fermion operators sneak in to the qreg::weighted_sum #242

Open
1tnguyen opened this issue Nov 12, 2021 · 0 comments
Open

[qcor-py] Raw fermion operators sneak in to the qreg::weighted_sum #242

1tnguyen opened this issue Nov 12, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@1tnguyen
Copy link
Contributor

Repro test case:

geom = '''
Na  0.0   0.0      0.0
H   0.0   0.0  1.914388
'''
fo = [0, 1, 2, 3, 4, 10, 11, 12, 13, 14]
ao = [5, 9, 15, 19]

H = createOperator('pyscf', {'basis': 'sto-3g', 'geometry': geom,
                                       'frozen-spin-orbitals': fo, 'active-spin-orbitals': ao})

energy = ansatz.observe(H, qalloc(4), 1.234)

This will eventually invoke qreg::weighted_sum, which assumes the observable is of Pauli-type.

Note: the workaround is to explicitly apply operatorTransform("jw", H)

@1tnguyen 1tnguyen added the bug Something isn't working label Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant