At the moment we can theoretically build a circuit composed of basic small gates (single cubic and CNOT) for any matrix. (Except for the as yet unproven theorem ABC necessary for the construction of a single-cubic controlled operator.) We can therefore return to the question of for which matrices there is a "small" circuit.
To obtain sufficient motivation for some of the following theoretical passages (especially for the quantum Fourier transform), we will now look at the most important algorithm: Shor's algorithm for factorization.