Approximating stochastic events by quantum automata