We derive the Helmholtz theorem for nondifferentiable Hamiltonian systems in the framework of Cresson's quantum calculus. Precisely, we give a theorem characterizing nondifferentiable equations, admitting a Hamiltonian formulation. Moreover, in the affirmative case, we give the associated Hamiltonian. 2010 Mathematics Subject Classification. 49N45, 70S05. Key words and phrases. Cresson's quantum calculus, nondifferentiable calculus of variations, nondifferentiable Hamiltonian systems, inverse problem of the calculus of variations.