# How efficient is Qiskit's unitary decomposition?

In Qiskit's extension package we have the UnitaryGate module that you can initialize using a unitary matrix and then add it to your circuit. How efficiently is this decomposition done under the hood?

Also, if I wanted to do the decomposition myself, what's the best way of doing so?

• Some basic information might be useful: Nielsen's chap 4(the part of general gates), and Solovay-Kitaev's algorithm. There is also some reinforce-learning way for gate decomposition, such as this paper. While I am also curious about the complexity lower bound of the problem. Jun 28 at 4:51
• @narip Solovay-Kitaev is largely irrelevant here. There, you're trying to decompose a gate from a finite gate set. In Qiskit, the rotations have a continuous parameter available to them. Jun 28 at 8:34
• @DaftWullie But does the problem mean that UnitaryGate(A) can add any unitary matrix $A$ into the circuit? So with the help of the UnitaryGate() function, we may have any unitary matrix at hand? Jun 28 at 10:34