fidelity function

Fidelity distance (lowlevel function)