- #1
Haorong Wu
- 413
- 89
- TL;DR Summary
- Given a transformation matrix, is there a procedure for designing a circuit for the matrix?
In Nielsen's book, the chapter of quantum circuits does not describe explicitly any procedures to design a circuit.
For example, given the matrix of Fredkin gate, ##\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{bmatrix}##, I think, the first step is to identify the transformation for every qubit. In this case, ##\left | x_1 , x_2 , x_3 \right> \rightarrow \left | x_1, \bar x_1 x_2 \oplus x_1 x_3 , \bar x _1 x_3 \oplus x_1 x_2 \right >##. Then how can I implement this transformation? Of course, according to the hint after the exercise, I know it can be designed by 3 controlled-swap gates.
However, in another exercise, the matrix of a partial cyclic permutation operation is ##\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \end{bmatrix}##. Again, I calculated the transformation for every qubit which is ##\left | x_1 , x_2 , x_3 \right> \rightarrow \left | x_1 \oplus x_2 x_3 , x_2 \oplus x_3, \bar x _3 \oplus x_1 x_2 x_3 \oplus \bar x _1 \bar x _2 \bar x _3 \right >##. Then, without a hint, I can't figure out how to implement it, especially on the #### qubit.
So, is my procedure suitable? Or is there a better procedure I can follow? This kind of exercises give me a headache. I've tried them all day. Thanks for reading.
For example, given the matrix of Fredkin gate, ##\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{bmatrix}##, I think, the first step is to identify the transformation for every qubit. In this case, ##\left | x_1 , x_2 , x_3 \right> \rightarrow \left | x_1, \bar x_1 x_2 \oplus x_1 x_3 , \bar x _1 x_3 \oplus x_1 x_2 \right >##. Then how can I implement this transformation? Of course, according to the hint after the exercise, I know it can be designed by 3 controlled-swap gates.
However, in another exercise, the matrix of a partial cyclic permutation operation is ##\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \end{bmatrix}##. Again, I calculated the transformation for every qubit which is ##\left | x_1 , x_2 , x_3 \right> \rightarrow \left | x_1 \oplus x_2 x_3 , x_2 \oplus x_3, \bar x _3 \oplus x_1 x_2 x_3 \oplus \bar x _1 \bar x _2 \bar x _3 \right >##. Then, without a hint, I can't figure out how to implement it, especially on the #### qubit.
So, is my procedure suitable? Or is there a better procedure I can follow? This kind of exercises give me a headache. I've tried them all day. Thanks for reading.