Not that I would go about it in this way, but if I did, I would change this construct:
Solve[Thread[Chop[Flatten[Transpose[T1s] . As . T1s -
B1s]]==ConstantArray[0,n*n]],...]
Since T1s
is constructed to be orthogonal, you can make the system linear by multiplying through by Transpose[T1s]
.