Fix the Quadratic-chi Distance

The QC distance returned complex number when given by non-positive semi
definite matrices as ground distance. To fix this we replace zero
distance for such cases.