The second register and the third register together control the multiplication of on the vector states. In the second register, states with '1's where are raised to probability amplitudes equal to the term with the power in the summation above, while rest of the states are given zero probability. The mappings used is , corresponds to the state in the second register. This register governs the number of times the has to be operated. blocks generate a superposition with state having amplitude . The third register helps in generating the linear combination - it ensures that are multiplied with the correct coefficient . The ancillary registers are decoded and the measurement is again done in the subspace where the ancilla are in the state.