Variational optimization of the amplitude of neural-network quantum many-body ground states