r = qrandom(4,0); 
if (f(r) == 1)  invert_phase(); 
r = qrandom(4,r); 
if (r==0)       invert_phase(); 
r = qrandom(4,r); 
print(r); 

Figure 4: The steps of the quantum_main() program when N=4.

Back to Article