Skip to content

Fix: Exclude zero-valued same-spin two-body terms in generate_hamiltonian#1129

Open
Aniketsy wants to merge 5 commits into
quantumlib:mainfrom
Aniketsy:fix-hamiltonian-terms-856
Open

Fix: Exclude zero-valued same-spin two-body terms in generate_hamiltonian#1129
Aniketsy wants to merge 5 commits into
quantumlib:mainfrom
Aniketsy:fix-hamiltonian-terms-856

Conversation

@Aniketsy

Copy link
Copy Markdown

#856

This pull request fixes issue by adding a condition to the generate_hamiltonian function that skips the inclusion of two-body Hamiltonian terms with repeated creation .

@mhucka mhucka added the area/performance Involves code performance label Sep 25, 2025
@mhucka

mhucka commented Oct 13, 2025

Copy link
Copy Markdown
Collaborator

Similar to the other PR I just commented on, I recommend running tests locally and debugging the changes locally because that will be easier and faster than waiting for CI checks. This PR currently fails checks; it doesn't look like this code change is correct by itself.

@Aniketsy

Aniketsy commented Feb 9, 2026

Copy link
Copy Markdown
Author

Apologies for missing this earlier, I’ll be fixing it soon.

@mhucka mhucka changed the title Fix :Exclude zero-valued same-spin two-body terms in generate_hamiltonian Fix: Exclude zero-valued same-spin two-body terms in generate_hamiltonian Mar 13, 2026
@mhucka mhucka self-assigned this Mar 13, 2026
@mhucka mhucka added the priority/before-1.7.2 Things to do before the next release label Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/performance Involves code performance priority/before-1.7.2 Things to do before the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants