I am new to understanding pseudorandom number generators and sometimes feel daunted by them. For some time I have used the following approach in my work:
In one file, I'd have
import numpy as np
np.random.seed(1)
my_random_process()
In another file, I'd have
import numpy as np
np.random.seed(2)
my_random_process()
and so on. In the nth and final file, I'd have
import numpy as np
np.random.seed(n)
my_random_process()
In my head, each of these processes were "independent" in the sense that if I averaged my outcomes over all the file's outputs, I would have an estimate for the mean of my outputs with an error decreasing as $c/\sqrt{n}$ for a constant $c$. My aim was merely to find the average of the outputs of my_random_process, which depends on np.random functions.
However, I've been reading the documentation and I fear that the method above actually has correlations. In particular, numpy's parallel random sampling documentation says that np.random uses MT19337 for which "two adjacent 32-bit integer seeds (i.e. 12345 and 12346) would produce very similar streams". This makes me very sad, because correlations would inflate the value of the constant $c$.
On the other hand, numpy has other methods of generating random numbers, one of which I'm not too familiar with, np.random.default_rng. On another page of the random sampling documentation, there's the sentence "Seeds can be passed to any of the BitGenerators. The provided value is mixed via SeedSequence to spread a possible sequence of seeds across a wider range of initialization states for the BitGenerator."
Does this mean that if I do
import numpy as np
rng = np.random.default_rng(1)
my_new_random_process(rng)
and
import numpy as np
rng = np.random.default_rng(2)
my_new_random_process(rng)
and so on, where I've replaced np.random with rng.random (and so on) in my_random_process, will the random streams be largely uncorrelated? Or does one still need to be a little more thoughtful to avoid correlations? This is not a large problem for me, since I just want to calculate means, but if a small change in my workflow could help reduce the number of iterations I have to do, I'd be happy.