  We propose a variational quantum algorithm to study the real time dynamics of
quantum systems as a ground-state problem. The method is based on the original
proposal of Feynman and Kitaev to encode time into a register of auxiliary
qubits. We prepare the Feynman-Kitaev Hamiltonian acting on the composed system
as a qubit operator and find an approximate ground state using the Variational
Quantum Eigensolver. We apply the algorithm to the study of the dynamics of a
transverse field Ising chain with an increasing number of spins and time steps,
proving a favorable scaling in terms of the number of two qubit gates. Through
numerical experiments, we investigate its robustness against noise, showing
that the method can be use to evaluate dynamical properties of quantum systems
and detect the presence of dynamical quantum phase transitions by measuring
Loschmidt echoes.
