Support fermionic sites in simple update and belief propagation#6
Merged
Conversation
The simple-update gauge reads each environment's ket and bra legs from the state tensor and takes the Hermitian square root in the transposed bipartition, which carries the fermionic braid sign on the odd-parity sector. Doubled ket/bra messages normalize by their trace rather than an entrywise sum, which is sign-correct on fermionic bonds. Operator construction routes through project_aux, so a parity-odd operator gets an auxiliary charge leg instead of throwing, and project_pair builds operator pairs that share a contractible aux leg for fermion strings like c†c.
Rename local index variables (ket_ind/bra_ind, codomain_inds/domain_inds, projected_a), factor an is_operator predicate out of the belief-propagation message normalization instead of inlining the primed-index check, and tighten comments.
The fermionic simple-update and belief-propagation path relies on the corrected fermionic operator contraction from GradedArrays 0.14, which requires TensorAlgebra 0.17.6. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the belief-propagation simple-update path sign-correct on parity-graded (fermionic) sites, and adds the operator-construction support fermionic sites need.
The simple-update gauge reads each environment's ket and bra legs from the state tensor and takes the Hermitian square root in the transposed bipartition, which carries the fermionic braid sign on the odd-parity sector. Doubled ket/bra messages normalize by their trace rather than an entrywise sum, which is sign-correct on fermionic bonds. Operator construction routes through
project_aux, so a parity-odd operator (X/Y, barec/c†) gets an auxiliary charge leg instead of throwing, andproject_pairbuilds operator pairs that share a contractible auxiliary leg for fermion strings likec†c.Builds on the ITensorBase backend work in JoeyT1994#78, which it targets as its base.