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

Commit

Permalink
Fix sign error
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorkarn committed Jul 3, 2022
1 parent c4329a7 commit b2f9f50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sage/algebras/clifford_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2850,7 +2850,6 @@ def _on_basis(self, m):
sgn = 0

for i in m:
sgn += 1
if FrozenBitset((i,)) in keys:
key_basis, key_coeff = cc[FrozenBitset((i,))].list()[0]
m_temp = Bitset(m)
Expand All @@ -2860,6 +2859,8 @@ def _on_basis(self, m):
m_temp.update(key_basis)

s = s + (-1)**(sgn % 2) * key_coeff * E.monomial(FrozenBitset(m_temp))

sgn += 1
return s

@cached_method
Expand Down

0 comments on commit b2f9f50

Please sign in to comment.