We try to decompose 8x8 unitary matrices \begin{pmatrix} e^{ia} & & & & & & \\ & e^{ib} & & & & & \\ & & e^{ic} & & & & \\ & & & e^{id} & & & \\ & & & & e^{ie} & & \\ & & & & & e^{if} & \\ & & & & & & e^{ig} \\ & & & & & & & e^{ih} \end{pmatrix} using the methods answered in here,by taking the tensor product of three phase gates formed $P_1 = \begin{pmatrix} 1 & 0 \\ 0 & e^{ii} \end{pmatrix}, \quad P_2 = \begin{pmatrix} 1 & 0 \\ 0 & e^{ij} \end{pmatrix}, \quad P_3 = \begin{pmatrix} 1 & 0 \\ 0 & e^{ik} \end{pmatrix}$,
and element wise with the 4 controled-controled-phased gate: \begin{pmatrix} 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&0 \\ 0& 0& 0& 0& 0& 0& 1&0 \\ 0& 0& 0& 0& 0& 0& 0&e^{i(\lambda)} \end{pmatrix}
We have the result of tensor product of three phased gate $P_1 \otimes P_2 \otimes P_3$: \begin{pmatrix} 1& 0& 0& 0& 0& 0& 0&0 \\ 0& e^{ik}& 0& 0& 0& 0& 0&0 \\ 0& 0& e^{ij}& 0& 0& 0& 0&0 \\ 0& 0& 0& e^{i(k+j)}& 0& 0& 0&0 \\ 0& 0& 0& 0& e^{ii}& 0& 0&0 \\ 0& 0& 0& 0& 0& e^{i(k+i)}& 0&0 \\ 0& 0& 0& 0& 0& 0& e^{i(i+j)}&0 \\ 0& 0& 0& 0& 0& 0& 0&e^{i(k+j+i)} \end{pmatrix}
Taking global phased factor $e^{il}$: \begin{pmatrix} e^{il}& 0& 0& 0& 0& 0& 0&0 \\ 0& e^{i(k+l)}& 0& 0& 0& 0& 0&0 \\ 0& 0& e^{i(l+j)}& 0& 0& 0& 0&0 \\ 0& 0& 0& e^{i(k+j+l)}& 0& 0& 0&0 \\ 0& 0& 0& 0& e^{i(i+l)}& 0& 0&0 \\ 0& 0& 0& 0& 0& e^{i(k+i+l)}& 0&0 \\ 0& 0& 0& 0& 0& 0& e^{i(i+j+l)}&0 \\ 0& 0& 0& 0& 0& 0& 0&e^{i(k+j+i+l)} \end{pmatrix}
We obtain eight nontrivial conditions, one for each diagonal entry:
- a = l
- b = l+k -> k = b - a
- c = l+j -> j = c - a
- d = l+k+j -> d = b + c - a
- e = l+i -> i = e - a
- f = l+k+i -> f = b + e - a
- g = l+i+j -> g = e + c - a
- h = l+i+j+k -> h = e + c + b - 2a
And then we put value of i,j,k,l back into the matrix when we taking the global phases factor. \begin{pmatrix} e^{ia}& 0& 0& 0& 0& 0& 0&0 \\ 0& e^{ib}& 0& 0& 0& 0& 0&0 \\ 0& 0& e^{ic}& 0& 0& 0& 0&0 \\ 0& 0& 0& e^{i(b+c-a)}& 0& 0& 0&0 \\ 0& 0& 0& 0& e^{ie}& 0& 0&0 \\ 0& 0& 0& 0& 0& e^{i(b+e-a)}& 0&0 \\ 0& 0& 0& 0& 0& 0& e^{i(e+c-a)}&0 \\ 0& 0& 0& 0& 0& 0& 0&e^{i(e+c+b-2a)} \end{pmatrix}
We wonder how we can construct the controled-controled-phase gates to satisfy and achieve the original unitary matrice or did we make any mistake through our work. We would love to hear your response. \begin{pmatrix} e^{ia}& 0& 0& 0& 0& 0& 0&0 \\ 0& e^{ib}& 0& 0& 0& 0& 0&0 \\ 0& 0& e^{ic}& 0& 0& 0& 0&0 \\ 0& 0& 0& e^{id}& 0& 0& 0&0 \\ 0& 0& 0& 0& e^{ie}& 0& 0&0 \\ 0& 0& 0& 0& 0& e^{if}& 0&0 \\ 0& 0& 0& 0& 0& 0& e^{ig}&0 \\ 0& 0& 0& 0& 0& 0& 0&e^{ih} \end{pmatrix}