quantax.nn.fermion_inverse_sign#

quantax.nn.fermion_inverse_sign(s: Array) → Array#

Usual fermion ordering goes from site 0 to site N-1, while QuSpin orders from site N-1 to site 0. This function computes the sign difference between these two orderings.

For spins, the counted fermions are the spin-up partons, so the sign changes under spin flips. Together with the spin-up-first mode order of fermion_idx, it makes a mean-field amplitude the site-ordered Gutzwiller projection times the single-site gauge sign \((-1)^{\sum_{i \in \uparrow} i}\).