# Decomposition of an arbitrary gate using given matrix in Qiskit

If I have an arbitrary non-unitary matrix of say $$U = \begin{pmatrix} 1.5 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1.6 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ \end{pmatrix},$$

is it possible to decompose it into gates implementable in qiskit?

If so, how? If not, why not?

Is is possible to have any arbitrary non-unitary matrix as an input and get the corresponding gates that implement this arbitrary matrix?

• Welcome to quantum computing SC. In what way do you want to decompose the matrix? Do you mean to basic quantum gates? What does the matrix represent as it seems it is not unitary (columns are not unit vectors). – Martin Vesely Feb 15 at 9:05
• I want to decompose any kind of matrix rather than a unitary matrix into elementary gates in Qiskit. Is this possible? Decomposition using KAK decomposition in Qiskit. – Monica Feb 16 at 18:53
• See answer to the original in: quantumcomputing.stackexchange.com/questions/4975/… – Yehuda Naveh Feb 16 at 23:46