Skip to content

Commit

Permalink
Added whitespace for E306.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Aug 7, 2022
1 parent 6f15344 commit 40aab1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sage/algebras/quantum_clifford.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ def _repr_term(self, m):
5
"""
p, v = m

def ppr(i):
val = p[i]
if val == -1:
Expand All @@ -704,6 +705,7 @@ def ppr(i):
return 'psi%s'%i
elif val == 2:
return 'psi%s*psid%s'%(i,i)

rp = '*'.join(ppr(i) for i in range(self._n) if p[i] != 0)
gen_str = lambda e: '' if e == 1 else '^%s'%e
rv = '*'.join('w%s'%i + gen_str(v[i]) for i in range(self._n) if v[i] != 0)
Expand Down Expand Up @@ -735,14 +737,16 @@ def _latex_term(self, m):
5
"""
p, v = m

def ppr(i):
val = p[i]
if val == -1:
return '\\psi^{\\dagger}_{%s}'%i
elif val == 1:
return '\\psi_{%s}'%i
elif val == 2:
return '\\psi_{%s}\\psi^{\\dagger}_{%s}'%(i,i)
return '\\psi_{%s}\\psi^{\\dagger}_{%s}' % (i, i)

rp = ''.join(ppr(i) for i in range(self._n) if p[i] != 0)
gen_str = lambda e: '' if e == 1 else '^{%s}'%e
rv = ''.join('\\omega_{%s}'%i + gen_str(v[i])
Expand Down

0 comments on commit 40aab1e

Please sign in to comment.