the first row and mapping the $(m+2)$nd row to the second row. For odd $m$, the extended matrix is similar. We only have to write $\beta \omega^{(m-1)j}$ instead of $- {\overline \beta}
\omega^{(m-1)j}$ in the $m$th row. In the last row we write ${\overline \beta} \omega^{(m-1)j}$ and $-\alpha \omega^{(m-1)j}$ instead of $\beta \omega^{(m-1)j}$ and $\alpha \omega^{(m-1)j}$, respectively. In order to simplify notation, we mainly consider the case of even $m$ in the following. The constructions for odd $m$ are similar.

We consider a decomposition of the matrix $Q^\dagger {\tilde M}$ to obtain a decomposition of ${\tilde M}$. The matrix $Q^\dagger {\tilde M}$ can be multiplied with $I_2 \otimes F_m^\dagger$ from the right leading to $$T= \sqrt{m}\left( \begin{array}{ll} {\rm diag}(\alpha, \alpha,
\alpha, \ldots, \alpha, \alpha ) & {\rm diag}(+\beta, -{\overline
\beta}, +\beta, \ldots, +\beta, -{\overline \beta})
\\ {\rm diag}({\overline \beta}, \beta, {\overline \beta}, \ldots,
{\overline \beta} , \beta) &
{\rm diag}(-\alpha,+ \alpha, -\alpha, \ldots,  -\alpha, + \alpha ) 
\end{array} \right).$$ We now embed the system with $n=2m$ dimensions into a qubit register. We consider a register with $l$ qubits where $r := 2^l \geq n$. We replace the matrix $T$ with the matrix $T_r$ of the same structure but of size 