An iterative process search algorithm that enables "generation + monitoring" can be formed by combining quantum computing and evolutionary computation; This paper researches on how to apply quantum genetic algorithm to path planning and location optimization of wireless sensor networks and builds a path planning optimization model. It also adopts an adaptive adjustment strategy to improve the search for the optimal path, reduce network delay and energy consumption on wireless sensor nodes. In this paper, an optimization algorithm for reducing positioning error and correction is proposed to compensate the error and address local positioning optimization.