The path integral defines a probabilistic algorithm to generate a Euclidean scalar field configuration. Randomly pick the real and imaginary parts of each Fourier mode at wavenumber k to be a Gaussian random variable with variance ⁠ 1 / k ⁠. This generates a configuration φ C (k) at random, and the Fourier transform gives φ C (x). For real scalar fields, the algorithm must generate only one of each pair φ (k), φ (− k), and make the second the complex conjugate of the first.