Closed tscrim closed 2 years ago
A bit of refactoring to have some good programming practices. I also fixed a bug in the inverse not taking into account the coefficients and will use the (new-ish) general inverse code to check the generic case.
New commits:
6ef8f5f | Implementing the quantum Clifford at a root of unity. |
e29f119 | Use the generic inverse code when not a special case of a monomial. |
please avoid using except Exception
otherwise looks good
Branch pushed to git repo; I updated commit sha1. New commits:
07ffd7a | Do not catch any exceptions; just let it fail. |
Replying to @fchapoton:
please avoid using
except Exception
I couldn't figure out which exceptions to actually catch, so I decided to just let it fail.
(BTW, this type of catching is done elsewhere in Sage. What is your suggestion for catching exceptions when you want to catch basically all of them?)
here you may want to use the method .fraction_field
and catch AttributeError
Branch pushed to git repo; I updated commit sha1. New commits:
5b55aa0 | Use the FractionField function instead. |
Replying to @fchapoton:
here you may want to use the method
.fraction_field
and catchAttributeError
Fair point. I decided to use the FractionField
function instead since that has a few other sageguards.
Branch pushed to git repo; I updated commit sha1. New commits:
6f15344 | Merge branch 'develop' into public/algebras/quantum_clifford_root_unity-34147 |
linter badge says
sage/algebras/quantum_clifford.py:699:9: E306 expected 1 blank line before a nested definition, found 0
sage/algebras/quantum_clifford.py:738:9: E306 expected 1 blank line before a nested definition, found 0
2 E306 expected 1 blank line before a nested definition, found 0
Branch pushed to git repo; I updated commit sha1. New commits:
40aab1e | Added whitespace for E306. |
Fixed.
ok, then let it be.
Reviewer: Frédéric Chapoton
Thank you!
Changed branch from public/algebras/quantum_clifford_root_unity-34147 to 40aab1e
This works for sufficiently large roots of unity: when q2k != 1. We provide a new implementation/basis when this q2k = 1.
CC: @fchapoton
Component: algebra
Keywords: quantum Clifford
Author: Travis Scrimshaw
Branch/Commit:
40aab1e
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/34147