@smichr looking at the code it seems it only tests when j and k are both ones.But the initial four cases test these the others look into half states and again we need to have the same amount of code for that.I guess I have understood your code snipped correctly and I would like to further reduce the testing of parameters in rotation and that would eventually help.Thanks.