Quantum Rejection Sampling