Solution
= Solution
Choose $\alpha=0$ and prepare $|\chi_1\rangle$. The circuit from part (iii) returns
$$
|\eta\rangle|\chi_1\rangle,
$$
so a <quantum measurement in the computational basis> of the first register reveals the <discrete logarithm> $\eta$ exactly. More generally, any $\beta$ that is <multiplicative group of integers modulo n>[invertible modulo $N$] returns $\beta\eta\bmod N$, from which $\eta$ follows by multiplication by the <modular inverse> of $\beta$.