The power quality is becoming an extensively addressing aspect of the power system because of the sensitive operation of the smart grid, awareness of power quality, and the equipment of modern power systems. In this paper, we have conceived a new hybrid Quantum inspired particle swarm optimization and least square (QPSO-LS) framework for real-time estimation of harmonics presented in time-varying noisy power signals. The technique has strong, robust, and reliable search capability with powerful convergence properties. The proposed approach is applied to various test systems at different signal to noise ratio (SNR) levels in the presence of uniform and Gaussian noise. The results are presented in terms of precision, computation time, and convergence characteristics. The computation time decreases by 3-5 times as compared to the existing algorithms. The technique is further authenticated by estimating harmonics of real-time current or voltage waveforms, obtained from light emitting diode (LED) lamp and axial flux permanent magnet synchronous generator (AFPMSG). The results demonstrate the superiority of QPSO-LS over other methods such as LS-based genetic algorithm (GA), particle swarm optimization (PSO), bacterial foraging optimization (BFO), artificial bee colony (ABC), and biogeography based optimization with recursive LS (BBO-RLS) algorithms, in terms of providing satisfactory solutions with a significant amount of robustness and computation efficiency.