-
Notifications
You must be signed in to change notification settings - Fork 381
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
Fix unexpected behavior of symmetry_conserving_bravyi_kitaev #734
Conversation
Could someone please review it? |
Most of the SCBK features seem to be written by @sammcardle30 and @babbush. |
@@ -131,3 +133,23 @@ def edit_hamiltonian_for_spin(qubit_hamiltonian, spin_orbital, orbital_parity): | |||
qubit_hamiltonian.compress() | |||
|
|||
return qubit_hamiltonian | |||
|
|||
|
|||
def remove_indices(symbolic_operator, indices): |
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.
Just a small nit could you add a more detailed description of what this function is doing and type annotations? A minimal requirement is a description of input parameters and types. even for a small function like this.
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.
Sorry to keep you waiting.
I have updated the docstring, so please check it again.
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.
LGTM other than some small linting issues. I'll merge right after those are resolved.
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.
Thank you for reviewing. Linting errors has been fixed.
Thank you! |
…lib#734) * Fix unexpected behavior of symmetry_conserving_bravyi_kitaev * Update docstring * fix lint errors Co-authored-by: Nicholas Rubin <[email protected]>
This pull request fixes the unexpected behavior of symmetry_conserving_bravyi_kitaev.
It is the following:
This is caused by prune_unused_indices, which deletes all unused indices.
The expected result is