  Quantum circuit testing is essential for detecting potential faults in
realistic quantum devices, while the testing process itself also suffers from
the inexactness and unreliability of quantum operations. This paper alleviates
the issue by proposing a novel framework of automatic test pattern generation
(ATPG) for the robust quantum circuit testing. We introduce the stabilizer
projector decomposition (SPD) for representing the quantum test pattern, and
construct the test application using Clifford-only circuits, which are rather
robust and efficient as evidenced in the fault-tolerant quantum computation.
However, it is generally hard to generate SPDs due to the exponentially growing
number of the stabilizer projectors. To circumvent this difficulty, we develop
an SPD generation algorithm, as well as several acceleration techniques which
can exploit both locality and sparsity in generating SPDs. The effectiveness of
our algorithms are validated by 1) theoretical guarantees under reasonable
conditions, 2) experimental results on commonly used benchmark circuits, such
as Quantum Fourier Transform (QFT), Quantum Volume (QV) and Bernstein-Vazirani
(BV) in IBM Qiskit. For example, test patterns are automatically generated by
our algorithm for a 10-qubit QFT circuit, and then a fault is detected by
simulating the test application with detection accuracy higher than 91%.

Quantum Physics