Fix unexpected behavior of symmetry_conserving_bravyi_kitaev#734
Fix unexpected behavior of symmetry_conserving_bravyi_kitaev#734ncrubin merged 6 commits intoquantumlib:masterfrom
Conversation
|
Could someone please review it? |
|
Most of the SCBK features seem to be written by @sammcardle30 and @babbush. |
| return qubit_hamiltonian | ||
|
|
||
|
|
||
| def remove_indices(symbolic_operator, indices): |
There was a problem hiding this comment.
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.
Sorry to keep you waiting.
I have updated the docstring, so please check it again.
There was a problem hiding this comment.
LGTM other than some small linting issues. I'll merge right after those are resolved.
There was a problem hiding this comment.
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 <rubinnc0@gmail.com>
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