added samebasis check to inner for TensorStates to speed up samebasis inner products