quantax.operator.nflips_up_dn_filter#
- quantax.operator.nflips_up_dn_filter(opstr: str, indices: Sequence[int]) dict[str, int]#
A filter that assigns the numbers of flipped spin-up and spin-down modes (
nflips_upandnflips_dn) as the update mode.nflips_upcounts the off-diagonal characters inopstr(everything not inDIAGONAL_OPS) acting on spin-up modes (index belowNsites), andnflips_dnthe ones acting on spin-down modes. The two keys are the update modes requested viarequired_update_modesby models whose low-rank updates treat the two spin sectors separately (e.g.SingletPair). This filter is only meaningful for spinful fermion systems.- Parameters:
opstr – The operator string.
indices – The site indices the operator acts on.
- Returns:
A dictionary
{"nflips_up": <flipped spin-up modes>, "nflips_dn": <flipped spin-down modes>}.