I want to run a circuit on an IBM quantum computer, and this circuit involves gates that are either applied or not based on a (classical) random decision.
As a minimal example, imagine a circuit with one qubit initialized in the state $|0\rangle$. In each shot we generate a random bit (0 or 1 with equal probability); apply a Hadamard if the bit is 1; and then measure in the $Z$ basis. One would expect an outcome 0 (1) 75% (25%) of the time.
One way to do this would be to make the classical random decisions locally, construct many deterministic circuits, and for each of them send a job with 1 shot each to the IBM computer. Unfortunately, the circuit I want to run involves a large number of random decisions, and the allowance on the IBM platforms is based on number of jobs rather than total number of shots, so I'll run out very quickly.
I hoped that it would be possible to use the conditional operation feature of qiskit to do this, but I can't work out how to randomize the values of the classical register. Does anyone know how I can do this?