Quantum programs are difficult to validate: circuits are typically expressed as imperative gate sequences with limited inspectability, execution modalities must be selected manually, and outputs are inherently probabilistic. These challenges are compounded when programs must be portable across backend frameworks with differing internal conventions. We present a quantum domain-specific language (QDSL) that addresses these problems through three mechanisms: (i) intent-execution separation, where algorithmic constructs such as preparation, superposition, entanglement, and measurement are represented as inspectable objects compiled into backend-specific circuits only after pre-execution Intermediate Representation (IR) validation; (ii) first-class IR introspection, exposing circuit width, wire mapping, operation order, and measurement intent for developer inspection prior to execution; and (iii) assertion-guided modality inference, where the engine examines declared verification properties to automatically select sampling, statevector, or dual execution without user intervention. Results are logged in structured form to support reproducible regression testing. We evaluate our prototype on benchmark circuits spanning entanglement, oracle-based, structured-transform, and variational examples. In fault-injection experiments on Bell and 3-qubit GHZ circuits, a total-variation-distance detector identifies the injected faults across all evaluated shot budgets (True Positive Rate 1.0), with observed false positives (False Positive Rate 2.7-3.8%) only at 128 shots. Differential testing demonstrates numerical agreement across PennyLane and Qiskit compilation targets for the evaluated constructs after endianness canonicalization. IR generation costs are sub-millisecond.
Comments
Work-in-progress Paper - 8 pages, 2 figures, 6 listings
Quantum programs are difficult to validate: circuits are typically expressed as imperative gate sequences with limited inspectability, execution modalities must be selected manually, and outputs are inherently probabilistic. These challenges are compounded when programs must be portable across backend frameworks with differing internal conventions. We present a quantum domain-specific language (QDSL) that addresses these problems through three mechanisms: (i) intent-execution separation, where algorithmic constructs such as preparation, superposition, entanglement, and measurement are represented as inspectable objects compiled into backend-specific circuits only after pre-execution Intermediate Representation (IR) validation; (ii) first-class IR introspection, exposing circuit width, wire mapping, operation order, and measurement intent for developer inspection prior to execution; and (iii) assertion-guided modality inference, where the engine examines declared verification properties to automatically select sampling, statevector, or dual execution without user intervention. Results are logged in structured form to support reproducible regression testing. We evaluate our prototype on benchmark circuits spanning entanglement, oracle-based, structured-transform, and variational examples. In fault-injection experiments on Bell and 3-qubit GHZ circuits, a total-variation-distance detector identifies the injected faults across all evaluated shot budgets (True Positive Rate 1.0), with observed false positives (False Positive Rate 2.7-3.8%) only at 128 shots. Differential testing demonstrates numerical agreement across PennyLane and Qiskit compilation targets for the evaluated constructs after endianness canonicalization. IR generation costs are sub-millisecond.
Reproducibility and comparability remain fundamental challenges in the empirical evaluation of Quantum Software Engineering (QSE) tools. These challenges arise from the intrinsic probabilistic behavior of quantum programs and the variability introduced by quantum hardware and simulator backends. While existing quantum benchmarks typically offer only static circuit definitions, they often leave researchers responsible for data generation and execution, hindering the creation of standardized and reproducible experiments. In this paper, we introduce QSimBench, a novel, open-source benchmark suite and accompanying Python library designed to address these limitations. QSimBench provides over 20 million precomputed shot-level execution traces:20,000measurements each, across14quantum algorithms, multiple circuit sizes (4−15qubits), and six Qiskit-based backends including both ideal and noise-injected simulations. Each configuration includes not only detailed measurement histories but also the original circuit in OpenQASM, the backend's noise model, and configuration metadata, ensuring full transparency and enabling in-depth analysis. QSimBench empowers researchers to conduct scalable, reproducible, and statistically rigorous evaluations of QSE tools, such as those for monitoring, orchestration, and statistical post-processing, without the need for expensive or difficult-to-reproduce quantum executions. The benchmark is distributed with a lightweight Python API that facilitates fast data retrieval, flexible sampling strategies, and seamless integration into experimental pipelines. QSimBench is publicly available, aiming to foster collaborative and reproducible research within the quantum software community.
Quantum compilers typically follow the circuit model, representing programs as fixed sequences of gates. This static view breaks down in hybrid quantum-classical applications, where gate choices depend on runtime data or measurement results. We introduce a new Intermediate Representation (IR) that elevates gates to first-class values, enabling their dynamic creation, composition, and control. This unified representation allows classical computation to steer quantum behaviour, capturing phenomena including stochastic gate selection, adaptive error correction, and measurement-driven computation within a single framework. Case studies in noise modelling, randomised compilation, error correction, and measurement-based quantum computing show that our IR expresses these programs compactly and supports optimisations that were not possible in the circuit model. Evaluation on a benchmark suite of hybrid quantum-classical programs indicates that our IR represents programs compactly and facilitates compiler analysis and transformation.
Predicate-based computation over state spaces separates a problem specification from the backend that realizes it. Building on the model introduced in arXiv:2606.15027, this paper studies QDSV as a semantic, multi-backend execution framework for quantum-oriented computation. We describe how QDSV, QIntent, and Qruba connect declarative problem intent to a structured semantic representation, realize that representation under heterogeneous backend constraints, and report execution trace outputs that separate model-level semantic outputs from backend-specific observations. The framework supports execution modes that do not require the original problem to be authored as a circuit, while still allowing circuit-compatible artifacts when required. As a case study, we evaluate EEG ictal/interictal classification using prepared signal features from the Bonn and Delhi datasets. The study compares classical machine-learning references, a circuit-first variational quantum classifier baseline, QDSV simulator executions, and controlled IBM Quantum hardware runs. The paper does not claim general quantum advantage or superiority over classical machine learning. Its contribution is a semantic execution validation showing how a problem-first representation can remain stable across simulator and hardware realizations while retaining interpretable execution trace outputs.
The diversity of quantum hardware platforms creates significant algorithm portability challenges, with each platform employing distinct instruction sets, gate implementations, and physical constraints that hinder software reusability. This paper presents a framework for designing portable quantum assembly languages enabling seamless cross-platform execution. Through systematic profiling of Shor’s, Grover’s, and QAOA algorithms on IBM Qiskit, Microsoft Q#, and Google Cirq — 3,216 executions of identical, reference-validated logical circuits — we identify key portability challenges and derive empirically grounded design criteria from execution-pattern analysis. With matched workloads, cross-platform circuit-depth divergence is 1.3–1.6× where no gate decomposition is required and rises to 94.8× under multi-controlled decomposition pressure, of which 3.36× is genuine same-level synthesis divergence and the remainder an abstraction-level measurement gap; optimization semantics, topology expressibility, and quantum–classical execution contracts diverge analogously. The framework balances hardware abstraction with performance optimization through declared abstraction levels, topology-aware compilation, optimization profiles with defined semantics, and a universal gate set with platform-specific decomposition. Prototype validation demonstrates 100% automated compilation of unmodified single-source programs across 30 platform configurations, with all 90 executions passing calibrated distributional acceptance gates and exact statevector fidelity of 1.000000 against the language’s reference semantics, providing feasibility evidence for vendor-independent quantum software development.
Connecting AI-generated quantum programs to executable experiments requires more than syntactically valid code: the workflow must also control execution authority and preserve the basis for interpreting its results. This paper develops a conceptual architecture organized around three responsibilities: AI-assisted circuit proposal, deterministic classical validation, and quantum measurement execution. A quantum-job contract binds circuit artifacts, measurement settings, resource allocations, backend information, and provenance to explicit admission conditions. The design separates permission to run an experiment from evidence that its output answers the intended scientific question. An analytical single-qubit variational example demonstrates this distinction through exact energy calculations, finite-shot variance, and budget-constrained measurement allocation. Responsibility allocation, runtime interception, and staged transformation provide the architectural principles, while uncertainty reporting and reference calculations supply the scientific checks. A prospective evaluation protocol covers accuracy, policy violations, reproducibility, end-to-end cost, and researcher effort. The framework is presented as a design proposal supported by mathematical illustration, not as a tested implementation; its operational benefits and applicability to larger quantum workloads remain to be established.
Variational quantum algorithms are hybrid quantum-classical workflows whose results depend on many interacting choices, including the ansatz, Hamiltonian, optimizer, backend, shot count, noise model, mitigation method, random seed, stopping criteria, and software versions. In current practice, this information is often scattered across code, configuration files, logs, backend metadata, and paper descriptions, making executions difficult to reproduce, compare, debug, and reuse. This paper proposes an ontology-supported framework for representing Variational Quantum Algorithm (VQA) execution records as structured and machine-readable software engineering artifacts. The framework defines a Web Ontology Language (OWL) ontology for modeling the main entities involved in VQA experimentation, including algorithms, circuits, ansatzes, Hamiltonians, optimizers, backends, noise models, mitigation techniques, execution steps, software environments, measurement outcomes, and results. It further combines the ontology with Shapes Constraint Language (SHACL) constraints for validating completeness and consistency, and SPARQL Protocol and RDF Query Language (SPARQL) competency queries for retrieving reproducibility-relevant information. We demonstrate the approach using Variational Quantum Eigensolver (VQE) execution records, including a valid record and intentionally incomplete or inconsistent examples. The results show that the framework can represent complete VQA execution contexts, detect missing or malformed metadata, and support query-based inspection of information needed for reproducible quantum software experimentation.