Wireless Sensor Networks (WSNs) are promoting the spread of the Internet for devices in all areas of
life, which makes it is a promising technology in the future. In the coming days, as attack technologies become
more improved, security will have an important role in WSN. Currently, quantum computers pose a significant
risk to current encryption technologies that work in tandem with intrusion detection systems because it is
difficult to implement quantum properties on sensors due to the resource limitations. In this paper, quantum
computing is used to develop a future-proof, robust, lightweight and resource-conscious approach to sensor
networks. Great emphasis is placed on the concepts of using the BB84 protocol with the AES algorithm in
WSN security. The results of analysis indicated a high level of security between the data by depending on the
generation of secure keys, and reached an accuracy rate of about (80-95) % based on using NIST statistical.
The efficiency of the work increased to 0.704 after using the Quantum Bit Error Rate equation, eventually
increasing the network performance. This results in the reduction of the overall amount of energy, and the time
required for performing the key exchange in the encryption and decryption processes decreased.