With the increasing integration of distributed photovoltaic (PV) generation into distribution networks, challenges such as power reverse flow and high line losses have emerged, leading to greater uncertainty in power systems. To address these issues, this paper presents an analytical model for calculating line losses in low-voltage distribution networks with PV generation, utilizing power flow calculations. A simulation model of a 15 node low-voltage network is developed using SIMULINK to validate the accuracy of the analytical model under the scenario of uniform load distribution (ULD). Additionally, a line loss optimization algorithm based on quantum genetic algorithms (QGA) is proposed for low-voltage distribution networks with distributed PV generation, along with an optimization model. The objective function of the optimization model is based on the reduction in line losses resulting from the integration of the PV system. The example results demonstrate the consistency between the line loss optimization using QGA and the analytical results, highlighting the significant advantages of QGA in terms of speed and accuracy. This research provides valuable insights for line loss optimization in low-voltage distribution networks with distributed PV generation and serves as a theoretical reference for future studies in this field.