Helpers
Quantum Algebra
QuantumCombinatorics
Source code in helpers\quantum_algebra.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
format_polynomial(poly)
Helper to print the array as a readable mathematical string.
Source code in helpers\quantum_algebra.py
81 82 83 84 85 86 87 88 89 90 91 92 93 | |
q_binomial(n, k)
Computes the q-binomial coefficient (n choose k)_q. Returns a list of coefficients.
Source code in helpers\quantum_algebra.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
q_multinomial(n, k_list)
Computes the q-multinomial coefficient. k_list is a list of the bottom parameters [k_1, k_2, ..., k_m].
Source code in helpers\quantum_algebra.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
Find Loops
findpathwithloops(num, denom)
returns (path, loops)
Source code in helpers\findloops.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
Tangle State
TangleState
Keeps track of the orientation of a tangle.
Orientation is one of UP, OP, RI. The points are a permutation of Y, X-, X+.
Source code in helpers\tanglestate.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
r_twist()
Updates the state after a right twist
Source code in helpers\tanglestate.py
64 65 66 67 68 69 70 71 72 | |
t_twist()
Updates the state after a top twist
Source code in helpers\tanglestate.py
54 55 56 57 58 59 60 61 62 | |
continuedfrac(a, b)
Computes the continued fraction expansion of a/b.
Source code in helpers\tanglestate.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
get_state(u, v)
Computes the state of K_u/v.
Returns (orientation, points).
Source code in helpers\tanglestate.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |