gparity()

grassmanntn.param.gparity(canonical_index)

Returns the Grassmann parity of the canonical index.

Parameters:

  • canonical_index: int

    The composite index \(I\) in the canonical encoder.

Returns:

  • out: int

    The summation \(p(I)\) of the occupation numbers of individual bits.

Description

Convert the composite index into the binary representation; i.e., an array of 0 and 1, then return the sum of this array. Namely, for \(I=(i_1,\cdots,i_n)\), \(p(I)\) is defined by

\[p(I)\equiv\sum_{a=1}^n i_a\]