# QDiff: Differential Testing of Quantum Software Stacks

DevFeed: [QDiff: Differential Testing of Quantum Software Stacks](<https://devfeed.tech/articles/qdiff-differential-testing-of-quantum-software-stacks-120834.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.08220>)

Author: Jiyuan Wang, Qian Zhang, Guoqing Harry Xu, Miryung Kim

Published: 2026-11-06T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Quantum Computing](<https://devfeed.tech/topics/quantum-computing.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [cs-se](<https://devfeed.tech/tags/cs-se.md>), [differential-testing](<https://devfeed.tech/tags/differential-testing.md>), [quant-ph](<https://devfeed.tech/tags/quant-ph.md>), [quantum](<https://devfeed.tech/tags/quantum.md>), [quantum-software](<https://devfeed.tech/tags/quantum-software.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

QDIFF proposes differential testing for quantum software stacks, which are hard to test because outputs are probabilistic, hardware specifications are unclear, and quantum programming is complex. It creates program variants through semantics-preserving source transformations, filters circuits before costly hardware execution using static characteristics such as circuit depth, two-qubit gates, gate error rates, and T1 relaxation time, and compares output distributions with an extensible equivalence checker that can use tests such as Kolmogorov-Smirnov and cross entropy. The supplied text describes the approach but gives no evaluation results.

## Source excerpt

arXiv:2611.08220v1 Announce Type: cross Abstract: Over the past few years, several quantum software stacks (QSS) have been developed in response to rapid hardware advances in quantum computing. A QSS includes a quantum programming language, an optimizing compiler that translates a quantum algorithm written in a high-level language into quantum gate instructions, a quantum simulator that emulates these instructions on a classical device, and a software controller that sends analog signals to a very expensive quantum hardware based on quantum circuits. In comparison to traditional compilers and architecture simulators, QSSes are difficult to tests due to the probabilistic nature of results, the lack of clear hardware specifications, and quantum programming complexity. This work devises a novel differential testing approach for QSSes, named QDIFF with three major innovations: (1) We generate input programs to be tested via semantics-preserving, source to source transformation to explore program variants. (2) We speed up differential testing by filtering out quantum circuits that are not worthwhile to execute on quantum hardware by analyzing static characteristics such as a circuit depth, 2 qubit gate operations, gate error rates, and T1 relaxation time. (3) We design an extensible equivalence checking mechanism via distribution comparison functions such as Kolmogorov Smirnov test and cross entropy