The quantum circuits used for this algorithm are custom designed for each choice of formula_1 and each choice of the random formula_35 used in formula_54. Given formula_55, find formula_56 such that formula_57, which implies that formula_58. The input and output qubit registers need to hold superpositions of values from formula_59 to formula_60, and so have formula_45 qubits each. Using what might appear to be twice as many qubits as necessary guarantees that there are at least formula_1 different values of formula_63 that produce the same formula_64, even as the period formula_50 approaches formula_66.