# Rotation angle of arbitrary two-qubit gates

## Exponential representation of single-qubit gates

For arbitrary single-qubit gate $$U_{\mathbf{1}}$$, we can express it in such a form

$$U_{\mathbf{1}} = e^{i\alpha}\exp[-i\frac{\theta}{2}\vec{v}\cdot\vec{\sigma}]= e^{i\alpha}\exp[-i\frac{\theta}{2}(xX+yY+zZ)],$$

where $$\alpha$$ is the global phase, $$\theta$$ is the rotation angle of $$U$$ on the Bloch sphere, $$\vec{v}=(x,y,z)$$ is a real 3-d vector with length equal to 1, and $$\vec{\sigma}=(X, Y, Z)$$ stand for Pauli matrix vector. This fact can be found in Exercise 4.8 from the Nielson and Chuang's textbook.

## Generalization to two-qubit gates

Similarly, I am wondering if we have a conclusion for two-qubit gates like

$$U_{\mathbf{2}} = e^{i\alpha}\exp[-i\frac{\theta}{2}\vec{v_{\mathbf{2}}}\cdot\vec{\sigma_{\mathbf{2}}}],$$

where I guess $$\vec{v_{\mathbf{2}}}$$ is a real 15-d vector (as we have 15 non-trivial two-qubit Pauli bases), and $$\vec{\sigma_{\mathbf{2}}} = (IX, IY, IZ, XI, XX..., ZZ)$$ is the Pauli matrix vector with 15 elements. Does there exist such a generalization? If the answer is no, can we still define rotation angle for arbitrary two-qubit gates?

I think what you want is the KAK decomposition. An available implementation is cirq.kak_decomposition.
The KAK decomposition decomposes an arbitrary two-qubit unitary gate $$U_2$$ into single qubit gates and same-basis Pauli coupling terms:
$$U_2 = (A \otimes B) \cdot (X \otimes X)^x \cdot (Y \otimes Y)^y \cdot (Z \otimes Z)^z \cdot (C \otimes D) e^{i\theta}$$
where $$A, B, C, D \in \mathbb{SU}(2)$$ and $$x, y, z, \theta \in \mathbb{R}$$.