# Finding equivalent matrix product of a simple quantum circuit

I was reading some papers on the efficient simulation of quantum circuits where the gates are restricted to Clifford circuits (Hadamard, PHASE and CNOT gates) and was curious about the following question:

Given an initial state $|\psi\rangle$ $$|\psi\rangle = \left[ \begin{array}{c} \cos(\psi_0) \\ \sin(\psi_0) \end{array} \right] \otimes \left[ \begin{array}{c} \cos(\psi_1) \\ \sin(\psi_1) \end{array} \right] \otimes \left[ \begin{array}{c} \cos(\psi_2) \\ \sin(\psi_2) \end{array} \right]$$ and a 2x2 rotation matrix $R_\theta$ $$R_\theta = \left[ \begin{array}{cc} \cos(\theta) & \sin(\theta) \\ \sin(\theta) & -\cos(\theta) \end{array} \right]$$ Is the following true: Where "PERM" is an arbitrary 8x8 permutation matrix and $T$, $U$ and $S$ are 2x2 rotation matrices. "PERM", $T$, $U$ and $S$ could possibly depend on $R_\theta$ and $|\psi\rangle$.

More rigorously, is the following true: $$(R_\theta \otimes I \otimes I)(TOFFOLI) |\psi\rangle = (P)(T \otimes U \otimes S) | \psi\rangle$$ Where $P$ is the arbitrary permutation matrix and the TOFFOLI gate is given as: $$TOFFOLI = \left[ \begin{array}{cccccccc} 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 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \end{array} \right]$$

If the input state, $|\psi\rangle$, were omitted, this relation would not in general be true, but what if $|\psi\rangle$ and $R_\theta$ are given? I am really only asking for a circuit that is equivalent when the input state, $|\psi\rangle$, is given.

If they are equivalent, what are $T$, $S$, $U$ and $P$? If they aren't equivalent, why not?

I would also be interested in the more general statement of whether there is an equivalence if the Toffoli gate is replaced by an arbitrary 8x8 permutation matrix but I would be satisfied with an answer to the above question.

I've thought about this for a bit but it gets complicated very quickly. I was hoping to see if anyone had any insight into whether this is possible or no.

I've been reading M. V. den Nest's paper "Classical simulation of quantum computation, the Gottesman-Knill theorem, and slightly beyond", which can be found here

-