Randomized quantum algorithms