# How to analyze highly entangled quantum circuits?

I came across a quantum circuit very similar to the phase estimation circuit, which is shown below:

In the phase estimation algorithm we assume, that we can efficiently implement an operator $$U$$, which performs the following operation:

$$U|u\rangle \equiv e^{2 \pi i \phi} |u\rangle,$$

where $$|u\rangle$$ is the eignevector of $$U$$ and $$e^{2 \pi i \phi}$$ is the corresponding eigenvalue. Such an operator can be denoted in the matrix form as

$$U \equiv \begin{bmatrix} e^{2 \pi i \phi} & 0 \\ 0 & e^{2 \pi i \phi}\end{bmatrix}$$

and its controlled version can be written as

$$CU \equiv \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & e^{2 \pi i \phi} & 0 \\ 0 & 0 & 0 & e^{2 \pi i \phi}\end{bmatrix}$$

(the $$CU^j$$ gate will only have $$e^{2 \pi i \phi j}$$ in places of $$e^{2 \pi i \phi}$$). For such a case I was still able to express the resulting vector (after going through the $$CU^j$$ gate) as the tensor product of two vectors. Thanks to this, I was able to see what is the effect of applying the inverse quantum Fourier transform on one of these vectors.

Now let's say, that $$U$$ is not diagonal and its each entry is different from 0. In such a case, I think there appears strong entanglement between qubits in the first and the second register. Because of this (from the very definition of entanglement) I wasn't able to express the resulting vector as tensor product of some compound vectors and I don't know, what will be the result of applying the inverse quantum Fourier transform on the first register.

All of the above is just one example showing my real problem - how to analyze quantum circuits, where qubits (or registers) are highly entangled?

The $$U$$ used in phase estimation is not only a diagonal matrix with the same diagonal elements. Instead, it is an arbitrary unitary matrix.
The way that you analyse it, instead, is that the input $$|u\rangle$$ is specifically chosen to be an eigenvector of $$U$$. That means $$U|u\rangle=e^{i\phi}|u\rangle$$. But there are different eigenvectors with different eigenvalues. For example, perhaps $$|v\rangle$$ with $$U|v\rangle=e^{i\theta}|v\rangle$$.
Now, the way that you've analysed it tells you that $$|0\rangle|u\rangle\mapsto|\phi\rangle|u\rangle$$ (assuming $$\phi$$ is of the form $$2\pi k/2^t$$ for integer $$k$$). But it tells you that you get the same effect for every eigenvector, so $$|0\rangle|v\rangle\mapsto|\theta\rangle|v\rangle$$.
So, what happens for an arbitrary input that is not an eigenvector of $$U$$? The eigenvectors form a basis, so we can write any input state as a superposition of the different eigenvectors. And by linearity we know how each of those components evolve. For example, $$|0\rangle(\alpha|u\rangle+\beta|v\rangle)\rightarrow \alpha|\phi\rangle|u\rangle+\beta|\theta\rangle|v\rangle.$$ This will, typically, be highly entangled, but the entanglement itself does not necessarily cause a problem in the analysis.