  We compute the Renyi entropy in a one-dimensional transverse-field quantum
Ising model by employing a swapping operator acting on the states which are
prepared from the neural network methods. In the static ground state, Renyi
entropy can uncover the critical point of the quantum phase transition from
paramagnetic to ferromagnetic. At the critical point, the relation between the
Renyi entropy and the subsystem size satisfies the predictions from conformal
field theory. In the dynamical case, we find coherent oscillations of the Renyi
entropy after the end of the linear quench. These oscillations have universal
frequencies which may come from the superpositions of excited states. The
asymptotic form of the Renyi entropy implies a new length scale away from the
critical point. This length scale is also verified by the overlap of the
reduced Renyi entropy against the dimensionless subsystem size.
