Hardware Trojans in Quantum Circuits, Their Impacts, and Defense
Rupshali Roy, Subrata Das, Swaroop Ghosh
TL;DR
The paper addresses security risks posed by untrusted quantum compilers that can insert single-qubit Trojans into quantum circuits. It analyzes the impact of NOT and Hadamard Trojans on benchmark circuits under both noise-free and noisy conditions, quantifying degradation in output quality. A CNN-based detector (TrojanNet) is developed and evaluated, achieving around 90% accuracy in identifying Trojan-infected circuits, with detailed metrics across Trojan types. The results underscore the need for secure compilation in the NISQ era and demonstrate a practical defense that can limit the impact of hardware Trojans in quantum pipelines.
Abstract
The reliability of the outcome of a quantum circuit in near-term noisy quantum computers depends on the gate count and depth for a given problem. Circuits with a short depth and lower gate count can yield the correct solution more often than the variant with a higher gate count and depth. To work successfully for Noisy Intermediate Scale Quantum (NISQ) computers, quantum circuits need to be optimized efficiently using a compiler that decomposes high-level gates to native gates of the hardware. Many 3rd party compilers are being developed for lower compilation time, reduced circuit depth, and lower gate count for large quantum circuits. Such compilers, or even a specific release version of a compiler that is otherwise trustworthy, may be unreliable and give rise to security risks such as insertion of a quantum trojan during compilation that evades detection due to the lack of a golden/Oracle model in quantum computing. Trojans may corrupt the functionality to give flipped probabilities of basis states, or result in a lower probability of correct basis states in the output. In this paper, we investigate and discuss the impact of a single qubit Trojan (we have chosen a Hadamard gate and a NOT gate) inserted one at a time at various locations in benchmark quantum circuits without changing the the depth of the circuit. Results indicate an average of 16.18% degradation for the Hadamard Trojan without noise, and 7.78% with noise. For the NOT Trojan (with noise) there is 14.6% degradation over all possible inputs. We then discuss the detection of such Trojans in a quantum circuit using CNN-based classifier achieving an accuracy of 90%.
