more efficient code

for
. NumberOfQuadraticEquationsOfUnitaryGroup
. DimensionOfUnitaryGroup