I want to transform binary representation from one to other. Here, I have 2 registers one act as control register and another is target register with the same number of qubits $n$. Consider $n = 3$ qubits state and $N = 2^{n}$,
\begin{eqnarray} |\psi_{0}\rangle &=& |i\rangle \otimes \sum_{i = 0}^{N} a_{i}|i\rangle \\ |\psi_{0}\rangle &=& |i\rangle \otimes (a_{0}|000\rangle + a_{1}|001\rangle + a_{2}|010\rangle + a_{3}|011\rangle + a_{4}|100\rangle + a_{5}|101\rangle + a_{6}|110\rangle + a_{7}|111\rangle) \end{eqnarray}
I want a quantum circuit or algorithm ($T_{i}|\psi_{0}\rangle = |\psi_{1}\rangle$) to transform, for example, the target state, \begin{equation} |\psi_{1}\rangle = |101\rangle \otimes (a_{0}|000\rangle + a_{3}|001\rangle + a_{2}|010\rangle + a_{1}|011\rangle + a_{5}|100\rangle + a_{4}|101\rangle + a_{7}|110\rangle + a_{}|111\rangle). \end{equation} Please note that the amplitude $a_{i}$ still the same as before the operation. How to realize a quantum circuit like that, I know some special case where the operator will shift a bit to the right or left. However, I want a general form of operator $T$.