Simulating the dynamics of quantum systems classically requires resources that scale expo-
nentially with the system size and evolution time. Quantum computers provide an efficient alter-
native. Algorithms running on quantum computers offer dramatic speedups that, in theory, allow
us to consider systems, timescales and resolutions that are larger than anything computable using
classical computers. Here we detail a quantum algorithm for simulating Hamiltonian dynamics
using the Trotter-Suzuki product formulas . We analyze error scaling and discuss methods to
optimize it. We explore randomization techniques to improve the algorithm’s performance. We
present examples using product formulas in Python on the evolution of spin-1/2 particles.