Pensieve header: Knot Signatures as in KnotTheory` and as in Kashaev. Continues Kashaev.nb at pensieve://People/Abbasi/.

\begin{multicols}{2}

<< KnotTheory`

MatrixSignature[A_]:=Total[Sign[Select[Eigenvalues[A],Abs[#]>(10^(-12))&]]];
Writhe[K_]:=Sum[If[PositiveQ[x],1,-1], {x,List@@PD@K}];

\end{multicols}
\vskip -3mm \hrule \vskip -7mm
\begin{multicols}{2}

nb2tex$PDFWidth = 1.25 N[284/72];

\def\nbpdfInput#1{\vskip 1mm\par\noindent\includegraphics[width=\linewidth]{#1}}

The Bedlewo program

Bed[K_,λ_]:=Module[{t,r,armpits,soup,faces,a,A,is},
t=1-(λ^2); r=t+t\[Conjugate];
armpits=Times@@PD[K]/.x:X[i_,j_,k_,l_]:>If[PositiveQ[x],(SubPlus[X])[j,k,-l,-i],(SubMinus[X])[-j,k,l,-i]];
soup=armpits/._[X][i_,j_,k_,l_]:>a[i,-l] a[j,-i] a[k,-j] a[l,-k];
faces=soup//.a[i_,x___,j_] a[j_,y___,k_]:>a[i,x,j,y,k];
A=Table[0,Length@faces,Length@faces];
Do[is=Position[faces,#][[1,1]]& /@ List@@x;
A[[is,is]]+=If[Head[x]===(SubPlus[X]),
(({{0, t\[Conjugate], 0, -t\[Conjugate]}, {t, -r, -t\[Conjugate], 2t\[Conjugate]}, {0, -t, 0, t}, {-t, 2t, t\[Conjugate], -r}})),(({{r, -t, -2 t\[Conjugate], t\[Conjugate]}, {-t\[Conjugate], 0, t\[Conjugate], 0}, {-2t, t, r, -t\[Conjugate]}, {t, 0, -t, 0}}))],
{x,List@@armpits}];
MatrixSignature[A] ];

Plot[Bed[K=Knot[8,2],(E^(I t/2))], {t,0,2π}]
PositiveQ/@(List@@PD[K])

Plot[Bed[Knot@"K12a422",(E^(I t/2))], {t,0,2π}]

\columnbreak

The Kashaev Program

Kas[K_,λ_]:=Module[{u,v,armpits,faces,a,A,is},
u=(λ+λ\[Conjugate])/2; v= ((λ^2)+(((λ\[Conjugate]))^2))/2;
armpits=Times@@PD[K]/.x:X[i_,j_,k_,l_]:>If[PositiveQ[x],(SubPlus[X])[j,k,-l,-i],(SubMinus[X])[-j,k,l,-i]];
soup=armpits/._[X][i_,j_,k_,l_]:>a[i,-l] a[j,-i] a[k,-j] a[l,-k];
faces=soup//.a[i_,x___,j_] a[j_,y___,k_]:>a[i,x,j,y,k];
A=Table[0,Length@faces,Length@faces];
Do[is=Position[faces,#][[1,1]]& /@ List@@x;
A[[is,is]]+=If[Head[x]===(SubPlus[X]),
(({{1, u, 1, u}, {u, v, u, 1}, {1, u, 1, u}, {u, 1, u, v}})),-(({{v, u, 1, u}, {u, 1, u, 1}, {1, u, v, u}, {u, 1, u, 1}}))],
{x,List@@armpits}];
(MatrixSignature[A]-Writhe[K])/2 ];

nb2tex$PDFWidth = 1.1 N[284/72];

\def\nbpdfInput#1{\vskip 1mm\par\noindent\includegraphics{#1}}

Plot[Kas[Knot[5,1],(E^(I t/2))], {t,0,2π}]

\end{multicols}
\vskip -3mm \hrule \vskip -7mm
\begin{multicols}{2}

Comparison

Sum[λ=(E^(I RandomReal[{0,π}])); Bed[K,λ]==Kas[K,λ], {10}, {K,AllKnots[{3,10}]}]

\end{multicols}