Leveraging randomized compiling for the quantum imaginary-time-evolution algorithm