QSPE is a practical approach for generating a larger number of diverse variant programs. QSPE is based on SPE approach, which is proposed for enumerating skeleton programs for C platforms. QSPE extends SPE approach to quantum libraries testing by integrating quantum characteristics meanwhile introducing quantum-alpha-equivalence definitions.
In this page, we provide an example of applying QSPE to generate variant programs. Considering the Figure 1 example in our manuscript:
We apply QSPE to this example, and we will have 715 * (3 + 3 + 2) = 8,580 variants (three platforms with seven different optimization levels) in total. Here we show one generated variant example across the quantum libraries.
Qiskit variant:
Cirq variant:
Pytket variant:
Note that the optimization is not shown in above exmaples becuase we usually tweak optimization levels in configuration code.
The dataset of miscompilations we found at the experiments can be accessed at here .