With advances in quantum computing, researchers can now write and run many
quantum programs. However, there is still a lack of effective methods for
debugging quantum programs. In this paper, quantum symbolic execution (QSE) is
proposed to generate test cases, which helps to finding bugs in quantum
programs. The main idea of quantum symbolic execution is to find the suitable
test cases from all possible ones (i.e. test case space). It is different from
the way of classical symbol execution, which gets test cases by calculating
instead of searching. QSE utilizes quantum superposition and parallelism to
store the test case space with only a few qubits. According to the conditional
statements in the debugged program, the test case space is continuously divided
into subsets, subsubsets and so on. Elements in the same subset are suitable
test cases that can test the corresponding branch in the code to be tested. QSE
not only provides a possible way to debug quantum programs, but also avoids the
difficult problem of solving constraints in classical symbolic execution