Gaussian noise generator algorithm trouble
I agree with you, this looks like a flawed description of an inverse transform generator.


The $p[i]$ shouldn't be like described, but should be the prefix sum of these, corresponding to the cumulative distribution.
The $\arg\min$ should indeed be taken on the absolute value (or allow positive values only).
As the pdf is computed on the positive $i$ only, the range of the uniform drawing should be $[0,\frac12]$ (or the $p[i]$ scaled by $2$.)


(When the $p[i]$ are not cumulated, they are in $[0,\frac1{\sigma\sqrt2\pi}]$, and the range $[0,1]$ doesn't make sense.)

For better efficiency, you can precompute a lookup-table of the $i$ indexes for sufficiently dense $q_1$.