Eigen decomposition and determinition whether state is pure or not