where ⊕ denotes the exclusive or (xor) operation. So if the phase mask is available, the computation of the phase factor only takes a few CPU cycles. Another important aspect is to create e ciently the phase masks. We propose Algorithm 3, which computes it in a logarithmic time for groups of 64 MOs, taking advantage of the associativity of the exclusive or operator. Indeed, the "for" loop executes 6 cycles to update the mask for 2 6 = 64 MOs. e trick used to precompute the phase factors is commonly used in quantum computing and goes under the name of "parity representation".