The question is similar to this one. As suggested in the answer, I can easily do this with just one qubit: I repeatedly Hadamard it and measure in order to have a fair coin flip at every point. The problem with it is that, because of the measurements, the computation is not reversible.
So, again, suppose that in my circuit I have to generate multiple, say n
, random coin flips. For example, this coin flips could be used to activate n CNOTs half of the time.
The trivial solution could be to use n different qubits and Hadamard them. However, this gets really huge when n
is large.
Is there any better way? By better I mean using a smaller number of qubits and only a few simple quantum gates.