What implementation is used for `matrix_exp`?

Depends. Does your computation happen on CPU or CUDA? In the former, the algorithm can be understood as a number of mms. In the latter, you have to think about things like synchronisations and so on. The current implementation could do a better job when it comes to these really.