A quantum mechanical treatment is presented to describe slow-wave free-electron lasers (FELs) operating in the low-gain regime. Here, we address the quantum effect of electrons on the FEL operation where each electron is represented as a Gaussian wave packet with an arbitrary width. It is shown that this quantum effect should be described in two different regimes. The first regime is realized when the initial width of the electron wave packet sigma(z0) is comparable to (larger or smaller than) the radiation wavelength lambda(L). In this regime, the gain degrades significantly as sigma(z0) increases and approaches lambda(L). The latter regime is realized when sigma(z0) is quite smaller than lambda(L) (i.e., approximately when sigma(z0) < lambda(L)/3) where the behavior of the gain is opposite to that in the first regime since it decreases with decreasing sigma(z0). Therefore, it is predicted that there is an optimum initial width of the electron wave packet at which the gain is maximum. (C) 2020 Elsevier B.V. All rights reserved.