gparity() ======================================== .. py:function:: grassmanntn.param.gparity(canonical_index) Returns the Grassmann parity of the canonical index. **Parameters:** - **canonical_index:** ``int`` The composite index :math:`I` in the canonical encoder. **Returns:** - **out:** ``int`` The summation :math:`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 :math:`I=(i_1,\cdots,i_n)`, :math:`p(I)` is defined by .. math:: p(I)\equiv\sum_{a=1}^n i_a