Recurrent quantum neural network and its applications