-
Notifications
You must be signed in to change notification settings - Fork 16
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
Refactoring and debugging of Jordan Wigner transform (Issue #67) #82
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: kvmto <[email protected]>
Signed-off-by: kvmto <[email protected]>
amccaskey
reviewed
Feb 10, 2025
libs/solvers/lib/operators/molecule/fermion_compilers/jordan_wigner.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Alex McCaskey <[email protected]>
I, Ben Howe <[email protected]>, hereby add my Signed-off-by to this commit: 6ae55b2 Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
bmhowe23
reviewed
Feb 11, 2025
bmhowe23
reviewed
Feb 11, 2025
…iltonian and added to the tests. This is much quicker test than converting to matrix and doing a dense diagonalization. Signed-off-by: Scott Thornton <[email protected]>
/ok to test |
I, Ben Howe <[email protected]>, hereby add my Signed-off-by to this commit: c8fcc53 Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
/ok to test |
/ok to test |
Signed-off-by: Ben Howe <[email protected]>
The Python test is exercising the C++ code, so we do not need a separate C++ test for now. Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
/ok to test |
bmhowe23
approved these changes
Feb 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, all!
Thanks to @Kenny-Heitritter and @james-qbraid for originally finding the parent issue for this PR! |
bmhowe23
added a commit
to bmhowe23/cudaqx
that referenced
this pull request
Feb 14, 2025
Signed-off-by: Ben Howe <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #67.
Problem
The Jordan Wigner transform did not work correctly, in fact it generated hamiltonians with wrong coefficients or terms.
Changes
Changes so far have been applied to:
Rewritten from scratch jordan_wigner.cpp.
Added tests.
The original code from which the cpp version is created is https://github.com/quantumlib/OpenFermion/blob/v1.6.1/src/openfermion/transforms/opconversions/jordan_wigner.py#L128Additional notes
The PR is not done yet! It requires more tests and a second look to the implementation.The code has not been linted since much more changes are needed.Findings
The implementation for molecule H4 now has correct energy values but higher number of terms compared to the python version.Molecules like LiH do not achieve the correct energy values.(Edited by @bmhowe23 given the latest updates from everyone)
Thanks to @Kenny-Heitritter and @james-qbraid for originally finding this issue!