Skip to content

Preserve Jordan-Wigner parity for grouped independent charges - #783

Merged
Jakob-Unfried merged 3 commits into
tenpy:mainfrom
rpinho:fix-grouped-jw-parity
Nov 20, 2026
Merged

Jakob-Unfried merged 3 commits into
tenpy:mainfrom
rpinho:fix-grouped-jw-parity

Conversation

@rpinho

@rpinho rpinho commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Applying a fermion creation operator to an MPS with independently conserved fermion and boson charges raises a ValueError. Construct the local sites with GroupedSite(..., charges='independent') to reproduce it. Read the parity maps before replacing the sites' charges. The test checks the grouped parity signs and the amplitude after applying a creation operator.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

@rpinho
rpinho force-pushed the fix-grouped-jw-parity branch from b96e1f1 to e5e947b Compare November 19, 2026 06:05
@Jakob-Unfried

Copy link
Copy Markdown
Member

can merge if tests are green

@Jakob-Unfried
Jakob-Unfried merged commit 524f772 into tenpy:main Nov 20, 2026
10 checks passed
@rpinho

rpinho commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for looking into this.

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.

2 participants