arXiv:2610.31443quant-phOct 2026

Manuscript Offprint

arXiv:2610.31443

ConQEC: Concolic Testing for Quantum Error-Correcting Code Implementations

Zihao Li, Ji Guan, Mingsheng Ying

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zihao Li 1,2,3^{1,2,3} D◯\textcircled{D}, Ji Guan 1,2,∗^{1,2,*} D◯\textcircled{D}, Mingsheng Ying 4^{4} D◯\textcircled{D}

1^{1}Key Laboratory of System Software (Chinese Academy of Sciences), Beijing, China

2^{2}Institute of Software, Chinese Academy of Sciences, Beijing, China

3^{3}University of Chinese Academy of Sciences, Beijing, China

4^{4}Centre for Quantum Software and Information, University of Technology Sydney, Sydney, Australia

lizh@ios.ac.cn; guanj@ios.ac.cn; Mingsheng.Ying@uts.edu.au

Abstract—Quantum error-correcting code (QECC) implementations are hybrid software-control systems: measured syndromes drive decoder dispatch, recovery actions, and logical checks. Existing QECC verification techniques can prove formal obligations, and general quantum testing can expose final failures, but developers still lack a scalable testing workflow that generates concrete faults and explains where a QECC repair path first diverges. This paper presents ConQEC, to our knowledge the first concolic testing framework for QECC implementations. By combining concrete (Pauli) fault replay with symbolic repair-path constraints, ConQEC generates tests that expose not only final logical failures but also fault-syndrome-decoder-recovery (FSDR) diagnostics: the injected fault, observed syndrome, decoder decision, recovery action, oracle result, and earliest divergent stage. Its symbolic encoding of Pauli faults, syndrome predicates, decoder and recovery relations, and oracle checks enables this diagnostic workflow to scale beyond exponentially increasing amplitude-level quantum-state reasoning. We implemented ConQEC and evaluated it on generated source-level QECC families and public QECC artifacts with up to thousands of qubits. ConQEC detects the seeded bug in every experimental case and reports a replay-valid, fault-localizing FSDR witness for each.

Index Terms—quantum software testing, quantum error correction, concolic testing, symbolic execution, automated test generation, debugging, failure witnesses

I. INTRODUCTION

Quantum programs are increasingly becoming components of larger software stacks. Recent work studies coverage criteria and coverage-guided test generation [1]-[3], bug studies and bug benchmarks [4], [5], static analysis [6], runtime assertions [7], [8], and compiler verification [9]. Together, these efforts show that quantum software increasingly raises familiar software-engineering questions: how to generate effective tests, measure meaningful coverage, and localize implementation failures under quantum-specific semantics.

Quantum error-correcting code (QECC) implementations make this need especially acute. QECCs are the basic mechanism by which fault-tolerant quantum computers protect logical quantum information from noisy physical hardware [10]–[16]. Instead of storing information in a single fragile physical qubit (quantum bit), a QECC encodes it into a larger block of physical qubits, repeatedly extracts syndrome information to infer possible faults, and applies recovery operations intended to restore the logical state. For the fault inputs to this pipeline, we focus on Pauli faults because they are the standard discrete abstraction used by QECC decoders and because general quantum errors can be decomposed into Pauli components [17]. In practice, this process is implemented as a hybrid software-control pipeline: syndrome extraction produces classical bits, decoder software maps those bits to repair decisions, recovery code applies conditional corrections, and logical checks observe whether the repair succeeded. This creates an implementation gap between the mathematical code and the executable QECC stack. A code theorem may be correct while the implementation reads the wrong measurement bit, dispatches to the wrong decoder arm, omits a recovery case, or applies a correction at the wrong location. The result may be a final logical failure, but the developer still needs to know where the repair path first diverged.

This makes QECC bug finding a software-engineering problem. A useful QECC bug report is not just a failed final assertion; it is a replayable repair-path witness: the concrete fault, observed syndrome, decoder decision, recovery action, oracle result, and earliest divergent stage. Such a witness can be inspected, minimized, and stored as a regression test [18]. Without this staged evidence, a QECC testing tool may reveal that something failed while leaving the software bug difficult to localize.

Most existing work on QECC correctness has been driven by formal methods for verification. Formal-verification tools and frameworks such as QSE [19], QECV [20], Veri-QEC [21], and fault-tolerance verification [22] have shown how to symbolically execute, check, or verify QEC/QECC programs against formal correctness obligations. These techniques are important foundations, but they do not directly provide the testing workflow above: their primary goal is verification rather than budgeted test generation and developer-facing debugging. They do not directly answer which concrete Pauli fault should be generated next, which syndrome/decoder/recovery behaviors have been exercised, or how a failure should be returned as a replayable debugging witness.

Classical concolic testing suggests a natural direction because QECC implementations are branch-heavy programs. Syndrome bits determine decoder branches; decoder decisions determine recovery actions; and logical checks expose whether the repair

∗^{*}Corresponding author.

succeeded. Classical concolic testing systematically steers inputs by recording path constraints and solving modified branch conditions [23]–[26]. However, a direct transfer to QECC is not sufficient. QECC inputs are large discrete Pauli fault spaces, intermediate executions are staged repair paths over syndromes, decoder decisions, and recovery actions, and useful coverage is not ordinary source-branch coverage but QECC-specific semantic coverage. Quantum Concolic Testing (QCT) [27], a concolic-testing framework for general quantum programs, takes an important first step in this direction. However, its amplitude-based constraint model is difficult to scale to large QECC implementations because amplitude-level reasoning must track a quantum state space that grows exponentially with the number of physical qubits; its reported branch-coverage evaluation focuses on programs with fewer than five qubits. This scale gap is no longer hypothetical: quantum hardware has already crossed the thousand-physical-qubit threshold, as illustrated by IBM's 1,121-qubit Condor processor [28], and practical QECC software must manage large numbers of physical qubits, checks, syndromes, and recovery decisions. Existing formal-verification and general quantum concolic-testing approaches therefore do not yet provide a scalable, diagnostic testing workflow for such QECC implementations. This leaves the central problem of this paper:

How can concolic testing be made scalable to thousand-qubit QECC implementations while still producing diagnostically useful failure witnesses?

To answer this question, we propose ConQEC, a concolic-testing framework for QECC implementations. ConQEC addresses the scalability and diagnostic challenges with two design ideas. First, it treats each test as a Fault–Syndrome–Decoder–Recovery (FSDR) repair path and accepts a bug only after actual/reference replay produces a staged witness. This makes QECC bug reports developer-facing: a failure is not only a final oracle violation, but a replayable explanation of the first repair-path stage where the implementation diverges from the reference. Second, ConQEC makes test generation symbolic at the repair-path level: Pauli faults are represented as symbolic variables and propagated through syndrome, detector, stabilizer, decoder, recovery, and oracle predicates. This compact representation lets ConQEC solve for targeted repair-path behaviors instead of enumerating concrete faults, enabling concolic testing to scale to large QECC implementations while preserving replay evidence.

Summary of Our Contributions: This paper contributes:

  • ConQEC. We present, to the best of our knowledge, the first concolic testing framework for QECC implementations. ConQEC models tests as FSDR repair paths and returns replay-backed witnesses that localize the earliest actual/reference divergence.

• Scalable repair-path generation. We encode Pauli faults, syndromes, decoder/recovery relations, and oracle checks as repair-path constraints, avoiding amplitude-level state reasoning while targeting thousand-qubit QECC behaviors.

• Evaluation evidence. We evaluate ConQEC on generated source-level QECC families and public QECC artifacts with up to thousands of qubits. ConQEC detects the seeded bug in every experimental case and reports a replay-valid, fault-localizing FSDR witness for each, while also providing semantic-coverage and scale evidence beyond toy QECC instances.

References (39)