In order to improve the performance of quantum communication band entanglement source system,a temperature control system based on competitive hybrid particle swarm optimization(HPSO)is designed and implemented.The temperature control sys-tem mainly controls the temperature of nonlinear crystals.The temperature control system proposed in this paper combines the CHP-SO algorithm with the proportional-integral-differential(PID)control algorithm,which can effectively reduce the overshoot of the temperature control system and improve the response speed of the system.The results show that the optimization results of the sys-tem in parameter tuning are closer to the global optimal than genetic algorithm(GA),particle swarm optimization(PSO)and hybrid particle swarm optimization(HPSO),the overshoot is reduced by 95.2%,89.1%and 80.8%,and the adjustment time is reduced by 76.5%,19.7%and 8.0%,respectively,to only 0.034 5 s,and the multiple operation deviation is smaller and more robust,which has important applications in temperature control and other fields.