Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Clean up code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorkarn committed Jul 5, 2022
1 parent 1550f9d commit b3ed980
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sage/algebras/clifford_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2855,15 +2855,16 @@ def _on_basis(self, m):

# a hack to deal with empty bitsets
if len(below) == 0:
below = FrozenBitset('0')
below = E.one()
else:
below = FrozenBitset(below)
below = E.monomial(FrozenBitset(below))

if len(above) == 0:
above = FrozenBitset('0')
above = E.one()
else:
above = FrozenBitset(above)
above = E.monomial(FrozenBitset(above))

tot = tot + (-1)**sgn * E.monomial(below) * cc[k] * E.monomial(above)
tot = tot + (-1)**sgn * below * cc[k] * above

return tot

Expand Down

0 comments on commit b3ed980

Please sign in to comment.