  The Hamiltonian of a quantum system governs the dynamics of the system via
the Schrodinger equation. In this paper, the Hamiltonian is reconstructed in
the Pauli basis using measurables on random states forming a time series
dataset. The time propagation is implemented through Trotterization and
optimized variationally with gradients computed on the quantum circuit. We
validate our output by reproducing the dynamics of unseen observables on a
randomly chosen state not used for the optimization. Unlike the existing
techniques that try and exploit the structure/properties of the Hamiltonian,
our scheme is general and provides freedom with regard to what observables or
initial states can be used while still remaining efficient with regard to
implementation. We extend our protocol to doing quantum state learning where we
solve the reverse problem of doing state learning given time series data of
observables generated against several Hamiltonian dynamics. We show results on
Hamiltonians involving XX, ZZ couplings along with transverse field Ising
Hamiltonians and propose an analytical method for the learning of Hamiltonians
consisting of generators of the SU(3) group. This paper is likely to pave the
way toward using Hamiltonian learning for time series prediction within the
context of quantum machine learning algorithms.
