In this paper we show how different sources of random numbers influence the outcomes of Monte Carlo simulations. We compare industry-standard pseudo-random number generators (PRNGs) to a quantum random number generator (QRNG) and show, using examples of Monte Carlo simulations with exact solutions, that the QRNG yields statistically significantly better approximations than the PRNGs. Our results demonstrate that higher accuracy can be achieved in the commonly known Monte Carlo method for approximating $\pi$. For Buffon's needle experiment, we further quantify a potential reduction in approximation errors by up to $1.89\times$ for optimal parameter choices when using a QRNG and a reduction of the sample size by $\sim 8\times$ for sub-optimal parameter choices. We attribute the observed higher accuracy to the underlying differences in the random sampling, where a uniformity analysis reveals a tendency of the QRNG to sample the solution space more homogeneously. Additionally, we compare the results obtained with the QRNG and PRNG in solving the non-linear stochastic Schr\"odinger equation, benchmarked against the analytical solution. We observe higher accuracy of the approximations of the QRNG and demonstrate that equivalent results can be achieved at 1/3 to 1/10-th of the costs.
翻译:本文展示了不同随机数源如何影响蒙特卡洛模拟的结果。我们将工业标准的伪随机数生成器(PRNG)与量子随机数生成器(QRNG)进行比较,并通过具有精确解的蒙特卡洛模拟实例证明,QRNG 能产生统计意义上显著优于 PRNG 的近似结果。我们的结果表明,在众所周知的近似计算 $\pi$ 的蒙特卡洛方法中可以实现更高的精度。对于布丰投针实验,我们进一步量化了使用 QRNG 时,在最优参数选择下近似误差最多可降低 $1.89\times$,而在次优参数选择下样本量可减少约 $\sim 8\times$。我们将观察到的更高精度归因于随机抽样的内在差异,均匀性分析表明 QRNG 倾向于更均匀地对解空间进行采样。此外,我们比较了 QRNG 和 PRNG 在求解非线性随机薛定谔方程时获得的结果,并以解析解为基准。我们观察到 QRNG 的近似具有更高的精度,并证明可以以 1/3 到 1/10 的成本获得等效的结果。