Structure learning of Hamiltonians from real-time evolution