| : Size of the population that is, number of individuals. |
| : Size of the Group that is, population is divided in groups. |
| : Size of the Problem being solved that is, number of variables. |
| : Generation Counter. |
| : th -bit that stores the value of their and . |
| : th Quantum Individual comprising of their , where . |
| : Quantum Register that comprises of all the Quantum individuals, , where . |
| : th binary bit that stores the value of 0 or 1 formed by collapsing corresponding . |
| : th Binary Individual comprising of their , where . |
| : Binary Register that comprises of all the Binary individuals, , where . |
| : stores the best solution of all the Binary individuals, , where . |
| : stores the Best solution of Group, , in the current (th) generation. |
| AR: Attractor Register that stores the attractor individual for every , where . |
| : current Global Best Solution. |
| begin |
| t = 0; assign , , ; |
| (a) initialize Q(t); |
| (b) make P(t) by observing the states of Q(t); |
| (c) evaluate P(t); |
| (d) store the best solutions among P(t) into B(t); |
| (e) stores the best solution in each Group, , into respective (t), j = 1,…,/; |
| (f) store the best solution b amongst (t); |
| while (termination condition is not met) do |
| begin |
| t = t + 1; |
| (g) select AR(t) according to migration condition; |
| (h) update Q(t−1) according to P(t−1) and AR(t) using Q-gates; |
| (i) make P(t) by observing the states of Q(t); |
| (j) evaluate P(t); |
| (k) store the best solutions among P(t) and B(t−1) into B(t); |
| (l) store the best solution in each Group, , and (t−1) into (t) respectively, |
| j = 1,…,/; |
| (m) store the best solution b amongst (t); |
| end |
| end |