Solar energy is key to achieving a more environmentally responsible future. One way to exploit it is to use semiconductor technology through solar panels to generate clean, sustainable, and controllable energy. However, the use of such solutions must be optimised by methods such as maximum power point tracking (MPPT) to extract the maximum available solar energy. Although MPPT algorithms have been widely used and improved, the use of newer approaches, such as quantum computing, appears to hold the promise of achieving new performance levels, particularly for real-time MPPT implementation. The goal of this work is to develop and test a quantum algorithm for the photovoltaic (PV) energy MPPT problem using quantum particle swarm optimisation. The performance of the classic and quantum MPPT algorithms was evaluated under three main operating conditions: normal, high-temperature, and partial shading conditions. This represents a variety of environmental scenarios that can affect the efficiency of solar power generation. According to the study's results, the classical algorithm recorded 0.15% more power than the quantum algorithm in normal operating conditions, and the quantum algorithm generated 3.33% more power in higher temperature tests and 0.89% more power in the partial shading test. Moreover, the quantum algorithm recorded lower duty cycles for the three tests. While the classical algorithm may have a slight edge in power output under normal operation conditions, the quantum algorithm indicates superior performance in challenging conditions and consistently reveals more promising overall efficiency.