  We introduce a quantum algorithm for efficient biased sampling of the rare
events generated by classical memoryful stochastic processes. We show that this
quantum algorithm gives an extreme advantage over known classical biased
sampling algorithms in terms of the memory resources required. The quantum
memory advantage ranges from polynomial to exponential and when sampling the
rare equilibrium configurations of spin systems the quantum advantage diverges.
