  We present a general framework to tackle the problem of finding
time-independent dynamics generating target unitary evolutions. We show that
this problem is equivalently stated as a set of conditions over the spectrum of
the time-independent gate generator, thus transforming the task to an inverse
eigenvalue problem. We illustrate our methodology by identifying suitable
time-independent generators implementing Toffoli and Fredkin gates without the
need for ancillae or effective evolutions. We show how the same conditions can
be used to solve the problem numerically, via supervised learning techniques.
In turn, this allows us to solve problems that are not amenable, in general, to
direct analytical solution, providing at the same time a high degree of
flexibility over the types of gate-design problems that can be approached. As a
significant example, we find generators for the Toffoli gate using only
diagonal pairwise interactions, which are easier to implement in some
experimental architectures. To showcase the flexibility of the supervised
learning approach, we give an example of a nontrivial four-qubit gate that is
implementable using only diagonal, pairwise interactions.
