Simulation, Monte Carlo, Quantum Physics, Computation, Physics.
def MonteCarlo(a,d,lamb,l): #Monte carlo throw for a particle at a given position on our viewing screen x = np.random.uniform(-.001,.001) #between -1mm and 1 mm p = Diffraction(a,d,lamb,l,x) rand = np.random.uniform(0,1) if (p >= rand): return x With our probability function and Monte Carlo roll we