# Thoughts on the Dihedral Hidden Subgroup Problem

This morning, I've been thinking again about a way to solve the Hidden Subgroup Problem for the dihedral group ${D}_{N}={\mathbb{Z}}_{N}{\u22ca}_{\phi}{\mathbb{Z}}_{2}$ (where $\phi \left(1\right)$ is the inversion of ${\mathbb{Z}}_{N}$). It is well-known that there exists a reduction to the case where the hidden subgroup is $H=\u27e8(d,1)\u27e9$ for some $d\in {\mathbb{Z}}_{N}$. In that case, if we fix $b\in \{0,1\}$, the elements $\left(i,b\right)$ for $i\in {\mathbb{Z}}_{N}$ form a complete set of coset representatives, so $f$ is one-to-one over ${\mathbb{Z}}_{N}\times \left\{b\right\}$. Thus, $x\mapsto f\left(x,b\right)$ is a *permutation* of ${\mathbb{Z}}_{N}$, a property that will be used below to construct a unitary transform.

First let's recall the classical inductive method to determine $d$. If $M$ is a divisor of $N$, let $N\text{'}=\frac{N}{M}$ and write the euclidean division $d=Md\text{'}+r$. If we are able to determine $r$ in polynomial time, then we can define the oracle $f\text{'}(x,y)=f(Mx+r,y)$ for $x\in {\mathbb{Z}}_{N\text{'}}$ and $y\in {\mathbb{Z}}_{2}$ and obtain a dihedral HSP with hidden subgroup $\u27e8(d\text{'},1)\u27e9$. Since the prime factorization has only $O\left(\mathrm{log}N\right)$ factors, we can repeat this inductive step to get an efficient algorithm. Of course, this is likely to be useful only when the factors are small for otherwise it may be as much difficult to determine $r$ as to determine the whole $d$. One interesting case is $N={2}^{n}$ and $M=2$: at each step, $N$ remains a power of 2 and we determine the parity of $d$.

For $0\le l<M$, we consider the $N\text{'}$-dimensional subspace spanned by the vectors $\mid lN\text{'}+m\u27e9$ for $0\le m<N\text{'}$. Since these $M$ subspaces are orthogonal, we can construct a unitary transform by applying a Quantum Fourier Transform ${F}_{N\text{'}}$ on each subspace separately. Finally, we apply the permutation mentionned at the beginning for $b=0$. We get a unitary transform $W$ below where $x=Mi+k$ is the euclidean division of $x$ by $M$:

$$\forall x\in {Z}_{N},W\mid x\u27e9=\frac{1}{\sqrt{N\prime}}\sum _{j=0}^{N\prime -1}{e}^{2i\pi \frac{ij}{N\prime}}\mid f(Mj+k,0)\u27e9$$

Now, let's consider the superposition (again, we see that it is well-defined by considering the permutation mentionned at the beginning for $b=1$):

$$\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(Mi,1)\u27e9$$

The state can be rewritten, using the fact that $f$ is constant on $H=\u27e8(d,1)\u27e9$:

$$\begin{array}{rl}\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(Mi,1)\u27e9& =\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(Mi-d,0)(d,1)\u27e9\\ & =\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(Mi-d,0)\u27e9\\ & =\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(Mi-\left(Md\prime +r\right),0)\u27e9\\ & =\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(M(i-d\prime +(N\prime -1))+(M-r),0)\u27e9\\ & =\frac{1}{\sqrt{N\prime}}\sum _{i=0}^{N\prime -1}\mid f(Mi+(M-r),0)\u27e9\end{array}$$

Applying ${W}^{-1}$ to this state gives $\mid M-r\mathrm{mod}\left(M\right)\u27e9$ and so the value of $r$ by a measurement in the standard basis.

Two questions remain: can we implement $W$ and create the state $\mid \Psi \u27e9$ efficiently? If $N={2}^{n}$ and $M=2$, there are many simplifications because we are working with qubits. In that case, it is easy to see that the answer to the previous questions is affirmative if we have gates ${V}_{f,b}\mid x\u27e9=\mid f\left(x,b\right)\u27e9$ implementing the permutation mentioned at the beginning. However, it is not clear how to build ${V}_{f,b}$ from the gate ${U}_{f}$ generally given in the classical presentation of the problem...

update: OK, there is also the trivial solution $N=M,N\text{'}=1$where the algorithm above is just computing ${V}_{f,0}^{-1}{V}_{f,1}\mid 0\u27e9=\mid N-d\mathrm{mod}\left(N\right)\u27e9$. However, I'm still wondering if there is a way to modify the previous method to work with ${U}_{f}$.