|
Algorithm 1: Transition function |
▹h is a set that contains indices of non-empty outputs
▹K is the amount of non-empty outputs
▹ We generate a random number
▹ Decrease the number of photons in -th output
▹ We generate a random number such that
▹ Increase the number of photons in s-th output
return
|