Appendix A Algorithms.
The numerical simulation of the correlation function does not require significant computer resources. It is like a simulation of a one-dimensional Ising model with long-range forces. However, a much more efficient method is to simulate the Markov process, equivalent to the Fermionic trace of the [
12].
Regarding that quantum trace, we are simulating the random histories of the changes of the Fermionic occupation numbers, taking each step off history with Markov matrix probabilities.
We devised an algorithm that does not take computer memory growing with the number N of points at the fractal curve. This algorithm works for very large , and it can be executed on the GPU in the supercomputer cluster, expanding the statistics of the simulation by massive parallelization.
We use large values of . As for the random values of fractions with , we used the following Python algorithm.
We used even
and
, as it was shown in [
4] that these are the dominant values in the local limit
.
In other words, we generated random even
, after which we tried random
until we got a coprime pair
. Statistically, at large
N, this happens with probability
(see [
13]). On average, it takes
attempts to get a coprime pair.
Once we have a
p candidate, we accept it with the chance
, which, again, for large
has a finite acceptance rate. The probabilities multiply to the desired factor, which is proportional to Euler totient
The main task is to generate a sequence of random spins with prescribed numbers of and values. The statistical observables are additive and depend upon the partial sums .
We avoid storing arrays of , using iterative methods to compute these observables. Our RAM will not grow with N, with CPU time growing only linearly.
The C++ class RandomWalker generates this stream of .
At each consecutive step, the random sign is generated with probabilities after which the corresponding number or is decremented, starting with at step zero. By construction, in the end, there will be precisely positive and negative random values .
This algorithm describes a Markov chain corresponding to sequential drawing random
from the set with initial
positive and negative spins, and equivalent to one-dimensional random walk on a number line. These conditional probabilities
are such that unconditional probability equals to the correct value:
regardless of the position
k of the variable
at the chain.
The formal proof goes as follows.
Proof. At
, without spins to the left on the chain, the conditional probability equals the total probability, and the statement holds. With some number of spins on the left, averaging over all these spins at a fixed value of
is equivalent to averaging over all values except
because the only condition on random spins is their net sum, which is a symmetric function of their values. Thus, the average of conditional probabilities equals the total probability (
A5) for any spin on the chain, not just the first one. □
Here is the code, which computes the sample of given . The 2D vectors are treated as complex numbers, using 128 bit complex arithmetic.
This code fits the architecture of the supercomputer cluster with many GPU units at each node. These GPU units are aggregated in blocks by 32, with every init inside the block working in sync. We use this synchronization to collect statistics: every block is assigned with different random values of , and every unit inside the block performs the same computation of DS function with different values of the integer seed for the random number generator, automatically provided by the system.
When quantum computers become a reality, our sum over the Markov histories of discrete spin (or Fermion) variables will run massively parallel on the qubits. Our Euler/Markov ensemble is ideally suited for quantum computers.