This document is the doctoral thesis of Pierre-Louis Samuel Benoit Giscard submitted to the University of Oxford. The thesis develops a graph theoretic approach to matrix functions and quantum dynamics based on identifying an algebraic structure for sets of walks on graphs. It begins by establishing that walks on digraphs can be uniquely factored into products of prime elements, which are simple paths and cycles. This yields a continued fraction representation for the formal series of all walks on digraphs. The thesis then shows how common matrix functions can be expressed in terms of paths and cycles on the graph of the matrix's partition. Applications include simulating quantum random walks and Rydberg-excited systems. Overall, the thesis introduces a novel "