Experimental quantum Hamiltonian learning