Skip to content

Set fermion sign in new operation - #135

Open
marcusr2ML wants to merge 1 commit into
ALPSim:masterfrom
marcusr2ML:master
Open

Set fermion sign in new operation#135
marcusr2ML wants to merge 1 commit into
ALPSim:masterfrom
marcusr2ML:master

Conversation

@marcusr2ML

@marcusr2ML marcusr2ML commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Fermion flag was missing, so spinless fermions were getting very wrong results.

As a follow up to this, more unit tests might be necessary for dmrg.

Summary

In making a tutorial for spinless fermions I saw that hardcore bosons performed as expected, while bonfied spinless fermions did not. This remained true for a lattice with a single site.

Diging into this it was revealed the Hamiltonian was not Hermitian. Changing this flag resulted in the results to converge to the known answer for the GS energy of a free chain.

I tested the lattice and Hamiltonian by:
i.) Running dmrg on the lattice with hardcore bosons (correct result)
ii.) Running ED with the lattice and spinless fermions (correct result)
iii.) Running dmrg with the lattice and spinless fermions (incorrect result)
iv.) After updating the flag, iii worked fine

Testing

Using the attached .md file (the spinless fermion tutorial of interest), test this issue on the old vs new code. The .md file for the tutorial is attached here where the lattice and parameters are defined. It might be a good idea to build your own lattice and Hamiltonian to check against what I did.

dmrg09.md

Type of change

  • Bug fix

Testing

  • Results verified against known reference values or published results
  • Tested on macOS
  • Tested on Linux

For simulation code changes

  • Physical results match expected behaviour (describe briefly below)

Checklist

  • No new compiler warnings (-Wall -Wextra)
  • Commit messages are descriptive and in the imperative mood

Related issues

This flag was missing, so spinless fermions were getting very wrong results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant