n=4;

sigmax = {{0,1}, {1,0}};

sigmay = {{0,-I},{I,0}};

sigmaz = {{1,0},{0,-1}};

I2 = IdentityMatrix[2];

u=DiagonalMatrix[ConstantArray[1,n-1],1]+DiagonalMatrix[ConstantArray[1,1],-n+1];

v=DiagonalMatrix[Exp[2 Pi I / n]^Range[n]];

AA = (1/2)*(ConjugateTranspose[u]+u);

BB = (I/2)*(ConjugateTranspose[u]-u);

CC = (1/2)*(ConjugateTranspose[v]+v);

DD = (I/2)*(ConjugateTranspose[v]-v);

loclzr=KroneckerProduct[I*sigmax,AA -  w*IdentityMatrix[n]] +KroneckerProduct[I*sigmay,BB - x*IdentityMatrix[n]] +KroneckerProduct[I*sigmaz,CC -  y*IdentityMatrix[n]]+KroneckerProduct[I2,DD -  z*IdentityMatrix[n]];

charpoly=Det[loclzr];

impoly = FullSimplify[Im[charpoly],{Element[w,Reals],Element[x,Reals],Element[y,Reals],Element[z,Reals]}]

realpoly =  FullSimplify[Re[charpoly],{w^2+x^2==y^2+z^2,Element[w,Reals],Element[x,Reals],Element[y,Reals],Element[z,Reals]}];

realpoly = ReplaceAll[realpoly,{x->Sqrt[-w^2+y^2+z^2]}];

realpoly =  FullSimplify[realpoly,{Element[w,Reals],Element[y,Reals],Element[z,Reals]}]

altpoly = ReplaceAll[realpoly,{w->r*Cos[th],y->r*Cos[phi],z->r*Sin[phi]}];

altpoly =FullSimplify[altpoly,{r>0,Element[th,Reals],Element[phi,Reals]}];

Collect[ExpandAll[altpoly],r]

Collect[Expand[D[altpoly,r]],r]

upPlot = ContourPlot3D[realpoly== 0, {w,-5/8,5/8}, {y,-5/8, 5/8}, {z, -5/8, 5/8},RegionFunction->Function[{w,y,z},0<y^2+z^2-w^2],ColorFunction->Function[{w,y,z},
ColorData["TemperatureMap"][0.5+0.5Sqrt[y^2+z^2-w^2]]],  ColorFunctionScaling->False,ViewPoint->{-5,-8,4},
BoxRatios->Automatic,PlotPoints->25, MaxRecursion->3]

downPlot = ContourPlot3D[realpoly== 0, {w,-5/8,5/8}, {y,-5/8, 5/8}, {z, -5/8, 5/8},RegionFunction->Function[{w,y,z},0<y^2+z^2-w^2],ColorFunction->Function[{w,y,z},
ColorData["TemperatureMap"][0.5-0.5*Sqrt[y^2+z^2-w^2]]],  ColorFunctionScaling->False,ViewPoint->{-5,-8,4},
BoxRatios->Automatic,PlotPoints->25, MaxRecursion->3]

Export["torus_4matrices_n4_up.eps",upPlot,ImageSize->3.2*72];

Export["torus_4matrices_n4_down.eps",downPlot,ImageSize->3.2*72];