Variational ansatz-based quantum simulation of imaginary time evolution