QuteFuzz: Fuzzing quantum compilers using randomly generated circuits with control flow and subcircuitsTalk
Recent advancements in quantum hardware have led to an increase in the number of quantum software stacks to allow developers to write, compile and run quantum programs. These quantum software stacks (QSS) are usually comprised of a high-level quantum programming language, a compiler to optimise quantum programs and convert them into quantum gate instructions, and a backend on which the program is run.
Despite these advancements, quantum processors are still in the Noisy Intermediate-Scale Quantum (NISQ) era, characterized by a limited number of logical qubits that are susceptible to noise that corrupts the state of the qubits. Therefore, quantum compilers are heavily relied upon to produce optimised circuits that can produce reliable results, making the correctness even more crucial.
We introduce a tool for detecting quantum compiler bugs. Unlike other similar tools that have been developed over the past few years, notably QDiff, QuteFuzz generates random quantum programs with higher-level abstractions like subroutines, and more complex circuit-level manipulation like control flows (i.e if-else, switch), all with varying depths of nesting and a variety of gates. These new generation strategies combine to allow for a breadth of test cases not achieved before and thus exposing bugs in previously unseen areas.
Seventeen bugs, including unexpected compiler crashes and silent miscompilations, were found in simulators and compilers used by Pytket, Qiskit, and Cirq combined. Some of these bugs have been verified and fixed by their respective developers, although some remain unfixed but acknowledged. These findings suggest that there is great potential in fuzzing quantum compilers, especially through the random generation of quantum circuits using more complex circuit elements.
QuteFuzz: Fuzzing quantum compilers using randomly generated circuits with control flow and subcircuits (QuteFuzz.pdf) | 534KiB |