Add shirokov_inverse and hitzer_inverse#530
Conversation
|
I did a few tests on dim=3 and dim=4, but not on dim>=5 because the code was so slow. Happy about ideas on how to speed it up! Plus I think it would make sense to add unit tests for the inverse. |
|
For a first PR, dim 3 to 4 tests suffice. Slowness of GAlgebra above 4 dims are observed in other cases too. There are a few issues to explore the possibilities to speed up GAlgebra, but none is sufficiently mature. I'll take a look at the code ASAP. Thanks for the PR! ❤️ |
| Uk = self | ||
| for k in range(1, N): | ||
| Ck = (N / k) * Uk.scalar() | ||
| adjU = Ck - Uk |
There was a problem hiding this comment.
I can't immediately see why you negated it here and negated it back below.
There was a problem hiding this comment.
Thats not in line with the clifford code, but in line with the Shirokov paper. The variables adjU and Uk sometimes differ by a sign in the clifford code for some reason.
|
Looks correct and good to me (cross-checked with clifford and the papers), except for one comment. Can you add your tests for dim 3-4 as tests in CI? It's fine to add them as notebooks or vanilla tests. |
Doing the hitzer ops recursively, rather than greedily forming the product of all involutions, can be much faster. When working recursively the number of components tends to drop dramatically at each step. |
Add
shirokov_inverseandhitzer_inversefunctions, based on thecliffordpackage implementation of the shirokov_inverse and hitzer_inverse.closes #529