Quantum algorithms on Walsh transform and Hamming distance for Boolean functions