General quantum Bernoulli factory: framework analysis and experiments. (30th September 2021)