betaFeedback

WorksPhysics and Astronomy

Agentic MLIR-to-QIR Translation with Dual-Backend Testing: A Hybrid Deterministic and LLM Approach

Abstract

Quantum frameworks each define their own Multi-Level Intermediate Representation (MLIR) dialect, so porting a circuit to a Quantum Intermediate Representation (QIR) runtime needs a hand-written pass per dialect. Our translator selects among three paths: a deterministic compiler path for known grammars (Catalyst and Quake), a large language model (LLM) agentic path for unseen dialects, and a repair path invoked when deterministic output fails testing. A dual-backend pipeline executes the source MLIR and generated QIR on independent simulators, comparing output distributions by total variation distance (TVD). For smaller open-weight models we replace retrieval-augmented generation with inline context engineering and add a guardrail-assembler that rebuilds valid QIR from incomplete output. Across 41 circuits spanning three dialects and 1-100 qubits, the deterministic path is gate-exact on all 70 circuit-dialect pairs, averaging above 95% TVD similarity (1-TVD). On an unseen fault-tolerant (FTQC) dialect, four of six models produce valid logical-level QIR on the first iteration.

Introduction

Quantum computing is undergoing rapid diversification in hardware and software [1], [2]. As vendors and research groups introduce competing frameworks (IBM Qiskit [3], Google Cirq [4], Microsoft Q# [5], Xanadu PennyLane [6], NVIDIA CUDA-Q [7]), the software stack has grown fragmented. Each framework defines its own IR for expressing quantum circuits, creating an interoperability barrier: circuits authored in one framework cannot run on another platform’s backend without manual or semi-automated translation [8].

This barrier is sharpest where quantum resources are integrated into scientific HPC ecosystems and the quantum processor is treated as one accelerator among many [9]. Concretely, a group authoring a variational algorithm in PennyLane Catalyst for its native autodiff may need to dispatch it through a cross-platform QIR runtime such as QIR-EE [10], which accepts only QIR; the circuit itself does not change, only its representation, yet translation is currently a hand-written pass rewritten per dialect, the interoperability problem our translator addresses.

MLIR [11] was originally developed to address “end of Moore’s law” challenges in classical compiler infrastructure, and has emerged as a unifying substrate for quantum compilation: PennyLane Catalyst [12] introduces a quantum dialect for just-in-time compilation of hybrid quantum-classical programs, while CUDA-Q defines the Quake dialect for GPU-accelerated quantum simulation [7]. McCaskey and Nguyen [13] first demonstrated MLIR dialects’ viability for quantum assembly languages, and Hopf et al. [14] recently explored integrating multiple quantum tools within the MLIR ecosystem. QIR [17] is built atop LLVM IR [18] and has gained traction as a portable target for heterogeneous backends [10], [19], [20], defining standard quantum intrinsics that many simulators and hardware backends can consume. Bridging MLIR quantum dialects to QIR currently requires hand-written passes per source dialect, an approach that scales poorly as new dialects appear [8], [14].

Recent advances in LLMs show strong competence in code generation [21], [22] and translation [23], including quantum-specific efforts [15], [16], [24]. Multi-agent orchestration [25], [26] and reasoning paradigms such as ReAct [27] and Reflexion [28] extend single-pass generation to multi-step transformation via iterative feedback; § 2 surveys this line in depth.

However, applying LLMs to quantum IR translation presents challenges distinct from general-purpose code translation. Quantum IR has strict syntactic requirements (LLVM type annotations, declaration ordering), subtle semantic constraints (qubit pointer indexing, measurement recording protocols), and zero tolerance for hallucinated operations that alter the circuit’s quantum behavior. In practice, smaller open-weight models (8B–13B parameters) practical for local deployment frequently produce structurally incomplete output, omitting scaffolding required for valid QIR while preserving the correct gate sequence.

In this paper, we present an agentic translation system that addresses these challenges through a hybrid architecture combining deterministic parsing with LLM-based translation and iterative repair. Our principal contributions are:

  1. A three-path translation strategy that dynamically selects between deterministic, fully agentic, and hybrid repair modes based on dialect recognition and testing outcomes.

  1. A dual-backend testing pipeline that independently executes the source MLIR and generated QIR on separate quantum simulators (PennyLane Catalyst, CUDA-Q, or other backends via an extensible registry) and QIR Runner, comparing output probability distributions via total variation distance (TVD).

  1. A guardrail-assembler pattern that recovers valid QIR from structurally incomplete LLM output by extracting gate operations and deterministically reassembling them using validated templates.

  1. A context engineering approach that injects gate mappings and QIR templates directly into agent prompts, eliminating the failure modes associated with retrieval-augmented generation (RAG) on smaller models.

Related Work

We organize the related work into five areas: quantum IRs, MLIR-based quantum compilation, LLM-driven code generation and translation, agentic AI for software engineering, and verification of quantum circuit transformations.

Quantum Intermediate Representations

The proliferation of quantum hardware platforms has motivated multiple intermediate representations as abstraction layers between high-level quantum programs and low-level control pulses. OpenQASM 3 [29] extends OpenQASM with classical control flow, subroutines, and timing primitives as a widely adopted circuit-level interchange format. The QIR specification [17] takes a complementary approach, encoding quantum operations as intrinsic function calls within LLVM IR [18], inheriting LLVM’s optimization infrastructure and classical-pipeline interoperability.

Cardama et al. [8] survey quantum IRs, comparing QIR, QSSA, and MLIR-based dialects on expressiveness, optimization support, and tooling maturity. Ittah et al. [30] proposed QIRO, an SSA-based MLIR program representation supporting dataflow-driven optimizations. Luo and Zhao [31] formalized quantum IR type-safety, showing well-typed programs preserve qubit linearity and measurement consistency. None of these address automated cross-dialect translation.

MLIR for Quantum Compilation

MLIR [11] for quantum computing was pioneered by McCaskey and Nguyen [13], building on XACC [32], who showed that its lowering and dialect system suit quantum operations at multiple abstraction levels. PennyLane Catalyst [12] realizes this with a quantum dialect (quantum.alloc, quantum.custom, quantum.measure) for JIT compilation of hybrid quantum-classical programs; CUDA-Q [7] defines the similar Quake dialect, lowering to QIR. Hopf et al. [14] integrated Catalyst with the Munich Quantum Toolkit via MLIR; this advances intra-MLIR interoperability but relies on manually authored passes per dialect pair, the limitation motivating our agentic approach.

LLM-Driven Code Generation and Translation

Large language models have achieved strong performance on code generation benchmarks [21, 22, 33], with models such as GPT-4 [34] and Code Llama [35] producing functionally correct programs from natural-language specifications. Szafraniec et al. [23] showed that compiler IRs (LLVM IR) as a pivot improve neural code translation, directly relevant to our MLIR-to-QIR task.

In the quantum domain, Dupuis et al. [15] developed the Qiskit Code Assistant by fine-tuning Granite LLMs on quantum code, and Jern et al. [16] proposed Agent-Q for quantum circuit generation and optimization in OpenQASM 3. Both target high-level SDKs (Qiskit Python, OpenQASM) rather than low-level LLVM-based representations like QIR, which impose stricter syntactic requirements. A complementary line of work applies machine learning to classical compiler optimization: Cummins et al. [36] introduced ProGraML, a graph-based framework for program optimization over LLVM IR. We differ in using LLMs for cross-IR translation rather than intra-IR optimization, with correctness defined by quantum-mechanical equivalence of output distributions.

Agentic AI for Software Engineering

LLM-based agents combining reasoning with tool use were formalized by ReAct [27], interleaving chain-of-thought reasoning [37] with actions like code execution and search. Shinn et al. [28] extended this with Reflexion, enabling agents to improve via verbal self-reflection on execution feedback, closely related to our testing-feedback loop.

Multi-agent frameworks such as AutoGen [26] and CrewAI [25] orchestrate specialized agents on complex tasks; Wang et al. [38] survey LLM-based agents for software engineering. We extend these to quantum compiler engineering: a translation agent generates QIR and a testing pipeline provides structured feedback for repair, with context engineering over RAG [39] adapting to failure modes observed with smaller models.

Quantum Circuit Verification and Testing

Verifying the correctness of quantum circuit transformations is a recognized challenge in quantum compilation [40]. Bauer-Marquart et al. [41] proposed symQV, a symbolic verification approach that proves equivalence of quantum programs through automated theorem proving. While formally rigorous, symbolic approaches face scalability limitations for circuits with many qubits or complex classical control flow.

Simulation-based testing offers a complementary approach: executing both circuits on simulators and comparing output distributions detects semantic discrepancies without formal proofs. Total variation distance (TVD) [42] provides a symmetric, bounded measure of distributional agreement. Our dual-backend pipeline implements this strategy with the added rigor of executing source MLIR and generated QIR on independent backends. We deliberately favor execution-based testing over formal verification: our pipeline provides statistical confidence within a threshold, whereas approaches such as symQV offer formal guarantees.

Table 1 positions our work relative to existing quantum translation and code generation approaches.

SystemSourceTargetLLM-BasedMulti-AgentSim. TestingExtensible to New Dialects
Catalyst Compiler [12]MLIR (Catalyst)Machine codeNoNoNoNo
CUDA-Q [7]MLIR (Quake)QIRNoNoNoNo
Qiskit Code Assistant [15]NL / CodeQiskit PythonYesNoNoN/A
Agent-Q [16]NLOpenQASM 3YesNoYesN/A
Hopf et al. [14]MLIRMLIRNoNoNoLimited
This workMLIR (dialect-agnostic)QIRHybridYesDual-backendYes

Table 1. Comparison of approaches to quantum code translation and generation. Our system uniquely combines LLM-based translation with dual-backend simulation testing and support for multiple MLIR dialects.

Methodology

This section presents the architecture and algorithms of the agentic MLIR-to-QIR translation system. The system consists of four principal components: dialect-aware parsing, multi-path translation, dual-backend testing, and an LLM output guardrail with deterministic reassembly. Figure 1 provides an overview of the system architecture and the interaction between components.

System architecture

Figure 1. System architecture. Path 1 (deterministic, top): recognized dialects. Path 2 (agentic, bottom): unseen dialects or forced mode. Path 3 (repair, dashed): deterministic output that fails testing is repaired by the LLM agent. The testing pipeline first compares gate counts, then executes QIR and MLIR independently on separate backends and compares distributions via TVD. The “Pass?” decision requires both gate match and 1−TVD≥95%1-\mathrm{TVD} \ge95\%.

Dialect Detection and SSA-Aware Parsing

The translation pipeline begins with automatic dialect detection. The system scans the input MLIR source for dialect-specific markers: the presence of quantum.Custom, catalyst.launch_kernel, or quantum.alloc tokens identifies the Catalyst dialect [12], while quake.alloca, !quake.veq, or quake.h tokens identify the Quake dialect [7]. If no known markers are found, the dialect is classified as unseen, triggering the agentic translation path.

For recognized dialects, the system employs an SSA-aware parser that traverses the MLIR program in a single pass while maintaining three dictionaries that track the dataflow through the circuit. The first dictionary maps MLIR variable names to physical qubit indices, resolving quantum.extract operations that bind SSA values to specific qubits in the allocated register. The second dictionary records constant values declared by arith.constant operations, which supply rotation angles for parameterized gates such as RX, RY, and RZ. The third dictionary traces measurement results through the SSA chain, enabling the parser to correctly associate conditional operations (scf.if blocks) with their controlling measurement outcomes.

Multi-result gates are the main parsing challenge: in Catalyst a CNOT produces two output SSA values, one per qubit, and the parser resolves both to physical qubit indices by tracking operand order. The parser emits an ordered operation list that preserves the original gate sequence, measurement positions, and conditional block boundaries, producing an MLIRCircuit data structure consumed by both the deterministic QIR generator and the testing pipeline.

Three-Path Translation Strategy

The system implements three translation paths, selected dynamically based on dialect recognition and testing outcomes.

Algorithm 1 summarizes the routing logic: dialect recognition picks Path 1 or Path 2 as mutually exclusive entry points, and Path 1 falls through to Path 3 on a testing failure, so a translation takes exactly one of Path 1, Path 2, or Path 1-then-3.

Algorithm 1 Translation Path Selection and Testing Loop

Require: MLIR source code MM, maximum iterations KK, similarity threshold τ\tau

Ensure: QIR code QQ, testing result VV

  1. d←DETECTDIALECT⁡(M)d \leftarrow\operatorname{DETECTDIALECT}(M)

  2. Q←∅Q \leftarrow\varnothing, V.similarity←0V.\text{similarity} \leftarrow0 {sentinel for Path 2}

  3. if d∈{catalyst,quake}d \in\{\text{catalyst},\text{quake}\} and not force_agentic then

  4. Q←DETERMINISTICTRANSLATE⁡(M,d)Q \leftarrow\operatorname{DETERMINISTICTRANSLATE}(M,d) {Path 1}

  5. V←TEST⁡(M,Q)V \leftarrow\operatorname{TEST}(M,Q)

  6. if V.passedV.\text{passed} then

  7. return Q,VQ,V {Deterministic success}

  8. end if

  9. go to AGENTICLOOP⁡\operatorname{AGENTICLOOP} {Path 3: repair with agentic}

  10. else

  11. go to AGENTICLOOP⁡\operatorname{AGENTICLOOP} {Path 2: agentic}

  12. end if

  13. AGENTICLOOP⁡:\operatorname{AGENTICLOOP}:

  14. Qbest←QQ_{\text{best}} \leftarrow Q, sbest←V.similaritys_{\text{best}} \leftarrow V.\text{similarity}, Vbest←VV_{\text{best}} \leftarrow V

  15. for i=1i=1 to KK do

  16. F←BUILDFEEDBACK⁡(V)F \leftarrow\operatorname{BUILDFEEDBACK}(V)

  17. Q←AGENTTRANSLATE⁡(M,d,F,Qbest,i)Q \leftarrow\operatorname{AGENTTRANSLATE}(M,d,F,Q_{\text{best}},i)

  18. Q←GUARDRAIL⁡(Q)Q \leftarrow\operatorname{GUARDRAIL}(Q) {Reassemble if needed}

  19. V←TEST⁡(M,Q)V \leftarrow\operatorname{TEST}(M,Q)

  20. if V.gate_matchV.\text{gate\_match} and V.similarity≥τV.\text{similarity} \ge\tau then

  21. return Q,VQ,V

  22. end if

  23. if V.similarity>sbestV.\text{similarity} > s_{\text{best}} then

  24. Qbest←QQ_{\text{best}} \leftarrow Q

  25. sbest←V.similaritys_{\text{best}} \leftarrow V.\text{similarity}

  26. Vbest←VV_{\text{best}} \leftarrow V

  27. end if

  28. end for

  29. return Qbest,VbestQ_{\text{best}},V_{\text{best}}

Path 1: Deterministic translation. When the detected dialect is recognized, the parser extracts the circuit structure and the QIR generator emits complete LLVM IR by instantiating validated templates. The generator maps each MLIR gate name to its corresponding QIR intrinsic (e.g., quantum.custom "Hadamard" to @__quantum__qis__h__body), computes qubit pointer expressions using the QIR addressing convention (null for qubit 0, inttoptr (i64 N to %Qubit*) for qubit NN), and appends measurement operations, output recording calls, function declarations, and QIR metadata. This path requires no LLM invocation and completes in 1–26 ms across the benchmark suite (§ 5).

Path 2: Fully agentic translation. When the dialect is unseen or the user explicitly forces agentic mode, the system delegates translation to an LLM agent orchestrated through the CrewAI framework [25]. The agent receives the MLIR source along with an inline reference containing gate mapping tables, a complete QIR example, and translation pattern descriptions. This context engineering approach injects all necessary domain knowledge directly into the prompt rather than relying on retrieval-augmented generation (RAG) [39], which we found unreliable with smaller models that frequently misuse retrieval tools. The agent is instructed to produce output in one of two formats: raw LLVM IR (preferred) or a JSON object containing an operations list with qubit indices, which the guardrail can then assemble into valid QIR (Section III-D). When the dialect is unseen, the agent also has access to a web search tool for fetching documentation about unfamiliar MLIR namespace prefixes.

A --force-agentic flag routes a recognized dialect through the agentic path anyway, letting a user benchmark agentic output against known-correct ground truth (§ 5); it is not part of Algorithm 1’s automatic routing.

Path 3: Deterministic with agentic repair. When the deterministic path produces QIR that fails testing (Section III-C), the system transitions to an iterative repair loop. The testing failure is converted into structured feedback that specifies which gates are missing or extraneous, whether the output distribution diverges from the expected reference, and the measured TVD similarity score. This feedback, together with the previous QIR attempt, is provided to the LLM agent, which generates a corrected translation. The loop continues for up to KK iterations (configurable, default K=5K=5), tracking the highest-scoring attempt to ensure the system returns its best result even if the maximum iteration count is reached without full convergence. This iterative refinement pattern is inspired by the Reflexion framework [28], adapted from natural language tasks to quantum IR translation.

Table 2 shows the gate mapping used for both deterministic translation and context engineering in the agentic path.

MLIR GateQIR Intrinsic SuffixParams
Hadamard@__quantum__qis__h__body—
PauliX@__quantum__qis__x__body—
PauliY@__quantum__qis__y__body—
PauliZ@__quantum__qis__z__body—
S@__quantum__qis__s__body—
T@__quantum__qis__t__body—
RX@__quantum__qis__rx__bodyθ\theta
RY@__quantum__qis__ry__bodyθ\theta
RZ@__quantum__qis__rz__bodyθ\theta
CNOT@__quantum__qis__cnot__body—
CZ@__quantum__qis__cz__body—
SWAP@__quantum__qis__swap__body—

Table 2. MLIR GATE NAME TO QIR INTRINSIC MAPPING. SINGLE-QUBIT GATES MAP TO UNARY QIR FUNCTIONS; TWO-QUBIT GATES MAP TO BINARY FUNCTIONS WITH CONTROL AND TARGET QUBIT ARGUMENTS.

Dual-Backend Testing Pipeline

A central contribution of this work is the dual-backend testing pipeline, which provides an execution-based correctness check that goes beyond syntactic or structural validation.

The pipeline operates in four stages, each progressively more computationally expensive. Figure 2 illustrates the testing flow.

Four-stage dual-backend testing pipeline

Figure 2. Four-stage dual-backend testing pipeline. Each stage provides progressively deeper correctness assurance, from structural gate comparison to distributional equivalence via TVD.

Stage 1: Gate count comparison. The system independently counts gates in the original MLIR and the generated QIR. For MLIR, gate names are extracted from quantum.custom (Catalyst) or dialect-specific operations (Quake) and normalized to lowercase canonical names. For QIR, gate names are extracted from call void @__quantum__qis__<gate>__body patterns. Measurement operations are excluded from both counts because they are non-unitary, and testing appends terminal measurements on all qubits (Stage 2) that would otherwise inflate the QIR count. A gate count mismatch provides an immediate signal that the translation introduced or dropped operations.

Stage 2: QIR execution. The generated QIR is executed using the qir-runner package (version 0.9.1) [20], which provides a Python interface to a QIR execution engine. To avoid conflicts between the LLVM libraries linked by qir-runner and the JAX/XLA runtime used by PennyLane Catalyst, execution is performed in an isolated subprocess. Before execution, a preprocessing step ensures that measurement operations cover all qubits in the circuit and that output recording calls are present in the correct order. The executor runs the circuit for NN shots (default N=1024N = 1024) and parses the output into a bitstring frequency distribution PQIRP_{\mathrm{QIR}}. Note that in this stage, terminal measurements are appended on all qubits to normalize distribution comparison. Circuits with mid-circuit measurements rely on dialect-specific reconstruction of classical feed-forward in Stage 3.

Stage 3: MLIR execution. The original MLIR circuit is independently executed on a dialect-specific backend selected through an extensible simulator registry. For the Catalyst dialect, the system reconstructs a PennyLane quantum node (QNode) from the parsed circuit, applies the @catalyst.qjit just-in-time compiler with the lightning.qubit simulator [6], and collects measurement samples. Circuits with mid-circuit measurements use a snapshot-based construction that replays gate sequences inside the JIT-compiled function via Catalyst’s @catalyst.cond decorator. For the Quake dialect, the backend is CUDA-Q [7]. Both backends execute in isolated subprocesses to

avoid LLVM library conflicts, producing a second bitstring frequency distribution PMLIRP_{\mathrm{MLIR}}. The registry admits additional backends for new dialects; where none is yet available, no PMLIRP_{\mathrm{MLIR}} can be produced and the pipeline falls back to QIR-only testing, confirming the QIR is executable and reporting QIR-side gate counts for structural inspection. The same interface is the attachment point for hardware and HPC-hosted backends, although every backend registered in this work is a local simulator.

Stage 4: Distribution comparison. The two output distributions are compared using the total variation distance (TVD), defined as:

TVD⁡(P,Q)=12∑x∈X∣P(x)−Q(x)∣(1)\operatorname{TVD}(P,Q) = \frac{1}{2}\sum_{x \in\mathcal{X}} \lvert P(x)-Q(x)\rvert \tag*{(1)}

where X\mathcal{X} is the set of all observed bitstring outcomes across both distributions, and P(x)P(x) and Q(x)Q(x) are the empirical probabilities of outcome xx under each distribution. The TVD ranges from 0 (identical distributions) to 1 (completely disjoint support). We convert TVD to a similarity score s=1−TVD⁡s = 1-\operatorname{TVD} and apply a pass threshold of τ=0.95\tau= 0.95, meaning the translation is accepted when the output distributions agree to within 5% total variation. This threshold accounts for finite sampling noise inherent in shot-based simulation while remaining sensitive to gate errors that would produce qualitatively different output states.

We choose TVD over Kullback-Leibler (KL) divergence for two reasons. First, TVD is symmetric, which avoids the arbitrary choice of which distribution serves as the reference. Second, TVD is well-defined even when one distribution assigns zero probability to an outcome observed in the other, whereas KL divergence diverges in this case unless smoothing is applied.

Guardrail-Assembler Pattern for LLM Output Recovery

Smaller LLMs (8B to 13B) often produce correct gate sequences but incomplete LLVM/QIR scaffolding, omitting type definitions (%Qubit = type opaque), declarations, attributes, or metadata. Some emit a JSON operations list rather than raw LLVM IR, or tool-call JSON when confused by the agent framework’s tool-use protocol.

To recover valid QIR from these partial outputs, we introduce a guardrail-assembler pattern that operates as a post-processing stage after each LLM invocation. The guardrail applies the following cascade of five checks, in order of priority, each falling through to the next on failure: (1) is the output already complete QIR? pass through; (2) are gate calls present? extract and assemble; (3) is it a JSON operations list? parse and assemble; (4) is it wrapped in markdown or prose? strip and retry; (5) otherwise, unrecoverable: return error feedback to the agent.

The deterministic QIR assembler accepts a list of parsed gate operations and produces syntactically complete LLVM IR by instantiating the same templates used by the deterministic translation path. It normalizes gate names through an alias table that maps common LLM variants (e.g., “hadamard”,

“cx”, “pauli_x”) to canonical QIR function suffixes, infers the qubit count from the maximum qubit index referenced in the operations, and appends measurement operations for all qubits, output recording calls, function declarations, attributes, and QIR version metadata.

Context Engineering for LLM Translation

Domain knowledge is usually supplied to LLM agents through retrieval-augmented generation (RAG) [39]. In preliminary experiments, 8B models frequently misused the retrieval tool, issuing repeated identical queries or misinterpreting retrieved content, so we inject all reference material directly into the task prompt.

The inline reference consists of three components: (1) a gate mapping table that associates each MLIR gate name with its QIR intrinsic function signature (Table II), covering single-qubit gates, parameterized rotation gates, and two-qubit gates; (2) a complete QIR example showing a two-qubit Bell state circuit with all required sections (header, entry function, declarations, attributes, and metadata); and (3) a set of translation pattern descriptions covering qubit allocation, gate sequencing, measurement recording, and conditional operations.

The added prompt length is modest: the gate mapping table and QIR template total roughly 2,000 tokens, acceptable even for 4,096-token context windows. For unseen dialects the agent also retains a web search tool for external documentation.

Multi-Model Support

The system supports multiple LLM backends through a unified configuration layer: local models via Ollama (Llama 3.1 [43] 8B/70B, Code Llama [35] 13B/34B) and cloud models, GPT-OSS-20B and Gemma 4 (31B), via the HuggingFace Inference API. CrewAI [25] wraps the selected model in a unified interface for prompt formatting and ReAct [27] reasoning.

Sampling and model selection. All models use temperature 0.1, a 4,096-token limit, provider-default top_p/top_k, no hyperparameter sweep, and no few-shot ablation (Section VI). Models span Llama and Code Llama at multiple scales plus two cloud models, GPT-OSS-20B and Gemma 4; this selection is not exhaustive.

Experimental Setup

Benchmark Circuits

We assembled a benchmark suite of 41 unique circuit designs (73 circuit-dialect instances, since Catalyst/Quake designs are implemented in both dialects) spanning ten categories (Table III). GHZ-state circuits provide a scaling ladder from 5 to 100 qubits across 20 sizes (every 5 qubits) with identical gate structure (one Hadamard, N−1N-1 CNOTs). Measurement-based quantum computing (MBQC) [44] circuits test mid-circuit measurements and classical feed-forward. Random circuits stress-test gate diversity (RX, RY, RZ, S, T, CZ, SWAP). The Steane code circuit is a 7-qubit encoder for the [[7, 1, 3]] code, using 10 Hadamards and 9 CNOTs. Three circuits in an unseen dialect exercise the agentic path on Steane-encoded logical operations.

CategoryCircuitQubitsKey GatesDialectsCount
StandardBell state2H, CNOTBoth (Catalyst & Quake)2
GHZ scalingGHZ-{5, 10, 15, ..., 100}5–100H, CNOT×(N−1N-1)Both40
MBQCTeleport, RZ rotation2H, CZ, X, conditionalBoth4
RX rotation, CNOT3–4H, CZ, X, Z, conditionalBoth4
ConditionalClassic teleportation3H, CNOT, X, ZBoth2
Random5 mixed-gate circuits2–7T, S, RX, RY, RZ, CZ, SWAPBoth10
QECSteane code on 1 logical qubit7H×10, CNOT×9Both2
ParametricRX/RY/RZ rotations1RX, RY, RZQuake only3
VariationalAutodiff gradient1RX, ExpVal(PauliZ)Catalyst only1
AlgorithmsGrover (3Q, 2/8 marked)3H, X, T, RY, RZ, CNOTQuake only1
Shor order-finding (N=15N=15)12H, X, T, RZ, CNOTQuake only1
FTQC (unseen)Steane 1Q H, 2Q Bell11–2†2^{\dagger}Logical H, CNOTFTQC only2
Steane 3Q Grover3†3^{\dagger}Logical H, CZ, ZFTQC only1
Total circuit-dialect instances73

Table III. Benchmark circuit suite: 41 unique circuit designs, 73 circuit-dialect instances. Circuits are organized by category with qubit counts, gate types, dialect availability, and instance count per row.

We additionally translated Grover's and Shor's algorithms from IBM Quantum’s Qiskit tutorials [45, 46]: each circuit is exported to OpenQASM 2.0, converted to Quake MLIR via an existing CUDA-Q-based frontend, and translated by the same deterministic pass (Quake only; Catalyst needs a Qiskit-to-PennyLane step). Grover marks 2 of 8 3-qubit states (53 gates); Shor performs order-finding for N=15N=15, a=2a=2 via the standard compiled SWAP-based technique (390 gates).

For all 20 GHZ sizes, we generated independent QIR ground-truth files via qiskit-qir from equivalent Qiskit QuantumCircuit objects, a third-party structural reference for gate-level comparison. The FTQC circuits use a custom ftqc dialect with Steane-encoded logical qubit operations (ftqc.init_zero, ftqc.logical_h, ftqc.logical_cnot), unregistered in the deterministic parser, exercising the agentic path on a genuinely unseen dialect.

Models Under Test

We evaluated six LLM models spanning three size classes and three architectures (Table IV). Local models were served through Ollama; cloud models accessed the HuggingFace Inference API. The deterministic parser (no LLM) served as the baseline for all comparisons.

ModelProviderParamsVRAM
Llama 3.1Ollama (local)8B∼6 GB
Llama 3.1Ollama (local)70B∼40 GB
Code LlamaOllama (local)13B∼8 GB
Code LlamaOllama (local)34B∼20 GB
GPT-OSS-20BHuggingFace (API)20BCloud
Gemma 4HuggingFace (API)31BCloud

Table IV. LLM MODELS EVALUATED. VRAM LISTED FOR LOCAL OLLAMA DEPLOYMENT.

Evaluation Metrics

We report four primary metrics across experiments:

  • Gate match rate: binary correctness of gate-level translation; MLIR and QIR gate counts (excluding measurement) must match in type and quantity.

  • TVD similarity: s=1−TVD⁡(PQIR,PMLIR)s = 1 - \operatorname{TVD}(P_{\mathrm{QIR}}, P_{\mathrm{MLIR}}), in shots mode (1,024 samples per backend) and probs mode (exact MLIR-side probabilities via qml.probs(), 100K shots on QIR side), which isolates translation error from sampling noise.

  • Translation time: Wall-clock time from MLIR input to QIR output, excluding testing.

  • Iteration count: Number of agent refinement iterations before convergence (1 for deterministic path).

Hardware and Software Configuration

All experiments ran on a workstation with an NVIDIA RTX 6000 Ada GPU (48 GB VRAM), Intel Xeon w5-2465X, and 256 GB RAM, Ubuntu 22.04. Software: Python 3.12, PennyLane 0.44.0, PennyLane-Catalyst 0.14.0, CUDA-Q 0.13, qir-runner 0.9.1, CrewAI 1.10.0, Ollama 0.6. Each agentic experiment was repeated 3 times to capture LLM output variance. The codebase will be available at https://github.com/ORNL-QCI/Agentic-MLIR_QIR.

Results

Translation Correctness

Table V reports deterministic results across both dialects and testing modes: 33 Catalyst and 37 Quake circuits (70 pairs, Quake including Grover and Shor), all correctly translated at the gate level. Circuits ≥35 qubits are gate-checked only, excluded from TVD statistics since the 2N2^N-dimensional state vector exceeds available memory. Six circuit-dialect instances are further excluded from Simulated/TVD (Table V caption lists them): the two random circuits in both dialects and Quake’s MBQC-CNOT give correct gate counts but near-zero TVD from an MLIR-side mid-circuit-measurement reconstruction gap, while Catalyst’s autodiff gradient circuit returns a scalar expectation value and its gradient rather than sampled measurements, leaving no distribution to compare. Quake’s Shor probs-mode result is excluded separately, its 100K-shot QIR-side simulation exceeding the qir-runner timeout. Among the remaining simulable circuits, Catalyst TVD averages 96.9% (shots) / 99.2% (probs) and Quake averages 97.5% (shots) / 98.5% (probs). The shots-vs-probs gap reflects sampling noise: the 91.9% shots-mode minimum, on Catalyst’s Steane circuit, reaches 99.5% in probs mode where the MLIR-side distribution is exact. Both of these cases should not be viewed as translation errors, but instead as testing backend limitations (see Sec. VI).

DialectModeTotalGate OKSimulatedAvg TVDMin TVD
CatalystShots33331696.9%91.9%
CatalystProbs33331699.2%96.3%
QuakeShots37372097.5%93.7%
QuakeProbs37371998.5%94.5%

Table V. DETERMINISTIC TRANSLATION CORRECTNESS BY DIALECT AND MODE. CIRCUITS ≥35\ge35 QUBITS ARE GATE-CHECKED ONLY. EXCLUDED FROM SIMULATED/TVD: RANDOM_1847 AND RANDOM_2449 (BOTH DIALECTS), MBQC_CNOT (QUAKE), AUTODIFF_GRADIENT (CATALYST); SHOR_ORDERFINDING IN QUAKE PROBS ONLY.

Path 3 (repair) trigger rate. Table V’s sweep runs the CLI without an LLM configured, so Path 3 is unreachable there regardless of TVD; this is not because every circuit passed. Evaluating the pass decision in probs mode, six circuit-dialect instances fall below τ: the two random circuits in both dialects, Quake’s MBQC-CNOT, and Quake’s Steane circuit at 94.5%. Each would trigger Path 3 under Algorithm 1’s full routing. We exercised Path 3 directly on the two known-failing random circuits: all 3 repair attempts (Llama 3.1 8B ×2, 70B ×1) exhausted K=5K = 5 iterations without passing. Since the gap traces to an MLIR-side testing limitation (Section VI), repair here optimizes against a reference distribution that does not itself represent the correct output.

Grover and Shor. Both circuits (Section IV) are part of the Quake benchmark above and translate with 100% gate-level correctness (53/53, 390/390 gates). Grover clears 95% TVD in both modes (99.9% shots, 98.6% probs); Shor reaches 93.7% in shots mode, below threshold, with its probs-mode result excluded (Table V).

Forced agentic vs. deterministic ground truth. Routing the Bell state circuit (translated exactly by Path 1) through Path 2 via force_agentic is architecture-dependent: Gemma 4 (31B) passed on the first iteration on both Catalyst and Quake (4/4 runs, 97.9–99.6% TVD), matching Path 1’s accuracy at ~35–62 s instead of 1–12 ms. Llama 3.1 (8B and 70B) failed all 3 attempts on the same circuits even after we hardened the guardrail and repair feedback (Section III-D); 8B still mistranslated Catalyst’s non-gate expectation-value ops as fake QIR intrinsics, and 70B never produced valid QIR. The gap is model-dependent rather than a fundamental Path 2 defect; since Llama 3.1 succeeds on FTQC (Section V-D), the failure likely stems from Catalyst-specific constructs such as expectation-value ops rather than parameter count.

Scalability

We evaluated GHZ circuits across all 20 sizes (5–100 qubits) in both dialects, 40 pairs (Table VI), each translated once since the deterministic path is fully deterministic. All pairs achieve 100% gate match; translation time stays between 14–24 ms with no measurable increase from 5 to 100 qubits, so the path is dominated by fixed overhead, not gate count. Among the 12 simulable pairs (≤\leGHZ-30), shots-mode TVD averages 97.8% (min 94.8%) and probs-mode 99.2% (min 97.9%). Larger circuits exceed state-vector memory but pass gate checking and match the independently generated Qiskit QIR ground truth.

QbShotsProbsms
599.0%99.3%20
1097.2%99.7%15
1598.5%99.1%18
2097.6%98.9%18
2597.3%99.3%15
3096.7%99.0%19
QbmsQbms
35147016
40157516
45198016
50168520
55179024
60199517
651910017

Table VI. GHZ SCALABILITY (40 PAIRS, 100% GATE MATCH). LEFT: TVD-SIMULATED SIZES (≤30\le30 QUBITS, AVERAGED ACROSS BOTH DIALECTS). RIGHT: LARGER SIZES, GATE-CHECKED ONLY, SINCE THE 2N2^{N}-DIMENSIONAL STATE VECTOR EXCEEDS AVAILABLE MEMORY. TIME IS SHOTS MODE, AVERAGED ACROSS DIALECTS, EXCLUDING TESTING.

Cross-Dialect Portability

To test whether the system produces semantically equivalent QIR regardless of input dialect, we translated 14 matched Catalyst–Quake pairs through the deterministic path. All 14 achieve gate-level match; for the 11 pairs with TVD computable on both sides (probs mode), Catalyst-side TVD averages 99.4% and Quake-side 98.5%. The two known-failing random circuits again produce TVD near 0% despite correct gate counts; GHZ-100 is gate-matched but excluded from TVD comparison.

Unseen Dialect Translation

To evaluate extensibility beyond the two registered dialects, we tested the agentic path on three circuits written in a custom FTQC dialect encoding logical qubits via the Steane [[7,1,3]] code, using operations (ftqc.init_zero, ftqc.logical_h) absent from the deterministic parser’s gate table. The system identifies the ftqc namespace as unknown and routes to the agentic path, equipping the agent with web search and simulator discovery tools.

Table VII reports results across all six models. Llama 3.1 (both variants), Gemma 4, and GPT-OSS-20B all produce valid QIR for all three circuits on the first iteration (6–23 s avg., Table VII). Code Llama 13B succeeds on simpler circuits but fails on the three-qubit one; 34B fails entirely, both emitting tool-call JSON because their tool-use tuning overrides the prompt’s request for direct output, and the guardrail cannot recover content never generated.

The generated QIR from successful translations is a logical-level mapping: the LLM identifies the gate semantics of the FTQC operations but does not expand them into the physical Steane encoding, which requires a 12-gate encoding circuit per logical qubit (three Hadamards and nine CNOTs) plus seven transversal gates per logical operation. The Catalyst and Quake Steane benchmarks in Table III are precisely this expansion for a logical Hadamard: 12 encoding gates followed by a transversal Hadamard on all seven physical qubits, giving the 10 Hadamards and 9 CNOTs listed there. The distinction between logical and physical QIR is inherent to fault-tolerant quantum computing, where the encoding is typically the responsibility of the backend runtime rather than the IR.

Discussion

Why runtime agentic translation, and not an offline developer tool? One could argue a deterministic pass is a one-time cost, better written offline than run in a slower runtime loop (1–26 ms at 100% correctness vs. 6.1–46.5 s per translation, Table VII). Our forced-agentic result agrees for some models, though Gemma 4 matches Path 1 accuracy outright, so the case for Path 1 rests on speed rather than a correctness gap only agentic translation could close. Algorithm 1 still routes around the agentic path once a dialect’s grammar is known. The agentic path earns its place where a deterministic pass does not yet exist: at first contact with a new dialect such as FTQC, where its output can seed the pass written from it later, and in Path 3, for edge cases any hand-written pass eventually misses.

Position in a quantum-HPC stack. Cross-platform execution engines such as QIR-EE [10] consume QIR to dispatch circuits across heterogeneous backends [9]. We contribute the stage directly upstream of that dispatch layer: a dialect-agnostic path to QIR and a testing gate that checks the result by execution before dispatch.

Context engineering vs. RAG. Injecting the gate mapping table and QIR template (∼\sim2,000 tokens) eliminated the retrieval failures 8B models exhibited under RAG, while still fitting small-model context windows.

Architecture vs. size. On these simple FTQC circuits, the results suggest architecture matters more than size: four models spanning 8B–70B (Llama 3.1 8B/70B, GPT-OSS-20B, Gemma 4) all reach 9/9, while Code Llama 13B/34B score 6/9 and 0/9, the larger model faring worse for the tool-use reason given in § 5. Tool-use tuning rather than parameter count separates the two groups. The logical-vs-physical QIR gap reflects domain knowledge absent from current training data, addressable via few-shot QEC examples or fine-tuning.

Toward testing unseen dialects without a registered simulator. Stage 3 (Section III-C) requires a registered MLIR-side backend, absent for a never-seen dialect, so unseen-dialect translations are checked only for QIR-side executability. We propose two unimplemented directions: a polynomial-time stabilizer simulator [42] for our Clifford-dominated FTQC circuits (Steane [[7,1,3]][[7, 1, 3]]), and a restricted state-vector fallback over agent-claimed logical semantics for non-Clifford operations; the stabilizer route seems more promising near-term.

Limitations. Simulation-based testing requires 2N2^N memory, so circuits above 30 qubits can only be gate-checked. As circuit complexity grows, simulation alone will not scale, and pairing it with formal equivalence checking (e.g., symQV [41]) becomes necessary. A small number of mid-circuit-measurement circuits produce correct gate counts but divergent simulation distributions, because the MLIR-side executor does not fully reconstruct classical feed-forward logic (QIR-side execution is correct), a backend reconstruction limitation rather than a translation error. The autodiff gradient circuit is gate-checked only, since it returns an expectation value and its gradient rather than sampled measurements, so distribution-based testing does not apply. For the FTQC dialect, no MLIR backend exists, limiting testing to structural inspection; the preceding paragraph discusses candidate approaches for closing this gap. Evaluation across additional MLIR dialects (OpenPulse, Quil, Stim) would strengthen generalizability claims.

Conclusion

We presented a hybrid system for MLIR-to-QIR translation that integrates deterministic compiler techniques with LLM-based agentic translation and iterative repair, routing each circuit through the fastest reliable of three paths and checking the result by executing source MLIR and target QIR on independent simulators.

On a 41-circuit benchmark spanning Catalyst, Quake, and the unseen FTQC dialect, with GHZ circuits scaling from 5 to 100 qubits, the deterministic path achieved 100% gate-level correctness on all 70 pairs and average TVD similarity above 95% across simulable circuits; 14 matched Catalyst–Quake pairs confirmed gate-level equivalence. On FTQC, the agentic path produced valid logical-level QIR for all three test circuits using four of six models tested, with no dialect-specific parser change.

Future work will extend the system to additional MLIR dialects and combine formal verification with simulation-based TVD checking. Concretely: (1) add a Catalyst counterpart for Grover/Shor via Qiskit-to-PennyLane conversion, plus quantum machine learning workloads from PennyLane/CUDA-Q; (2) broaden Path 3 stress-testing beyond the mid-circuit-measurement failure class to isolate cases where repair is achievable; (3) implement the stabilizer-simulation strategy of Section VI; and (4) identify which model properties (architecture, tool-use tuning, scale) let forced-agentic translation match Path 1 accuracy (Gemma 4 does, Llama 3.1 does not).

Acknowledgment

This work was supported by the U.S. Department of Energy, Office of Science under Contract No. DE-AC05-00OR22725, with funding from the Office of Advanced Scientific Computing Research’s Accelerated Research in Quantum Computing Program’s Modular and Error-Aware Software Stack for Heterogeneous Quantum Computing Ecosystems (MACH-Q) project.

References

Appendix A: Artifact Description (AD)

Overview of Contributions and Artifacts

We provide one repository containing the translation system, the benchmark circuit suite, and the experiment scripts used to produce every table and figure reported in this paper.

Paper's Main Contributions

  1. Paper’s Main Contributions: C1: A three-path translation strategy that dynamically selects between deterministic, fully agentic, and hybrid repair modes based on dialect recognition and testing outcomes. C2: A dual-backend testing pipeline that independently executes source MLIR and generated QIR on separate simulators and compares output distributions via TVD. C3: A guardrail-assembler pattern that recovers valid QIR from structurally incomplete LLM output. C4: A context engineering approach that injects gate mappings and QIR templates directly into agent prompts.

Computational Artifacts

  1. Computational Artifacts: A1: Agentic MLIR-to-QIR Translator, publicly available at https://github.com/ORNL-QCI/Agentic-MLIR_QIR.

Artifact IDContrib.Related Paper Elements
A1A_1C1–C4Table III, Table V, Table VI, Table VII; Figure 1, Figure 2

Table 1 (PDF p. 11).

Artifact Identification

Computational Artifact A1

a) Relation To Contributions: A1A_1 is the complete system described in the paper: translate.py (the CLI entry point), the agentic_mlir_qir/ package (deterministic parsers and generators, LLM agents, dual-backend testing), the benchmark circuit suite under example/, and the experiment drivers under experiments/. Reproducing any experiment exercises all four contributions: dialect routing (C1), TVD-based testing (C2), guardrail-assembler recovery on agentic output (C3), and the context-engineered agent prompts (C4).

b) Expected Results: Running the deterministic path over the benchmark suite should reproduce Table III’s circuit counts and Table V’s near-100% gate match, with TVD close to the reported averages (Catalyst 96.9%/99.2%, Quake 97.5%/98.5%, shots/probs); shots-mode TVD varies run to run from sampling stochasticity. The GHZ scaling sweep should reproduce Table VI’s 100% gate match from 5 to 100 qubits. The unseen-dialect (FTQC) experiment should reproduce Table VII’s per-model success counts for Llama 3.1 (8B/70B), Gemma 4, and GPT-OSS-20B (9/9); agentic results depend on the LLM provider’s serving conditions and may vary between runs.

ModelParams1Q Hadamard2Q Bell3Q GroverTotalAvg Time (s)
Llama 3.18B3/33/33/39/96.1
Llama 3.170B3/33/33/39/911.9
Code Llama13B3/33/30/36/914.8
Code Llama34B0/30/30/30/946.5
GPT-OSS-20B20B3/33/33/39/922.9
Gemma 431B3/33/33/39/97.7

Table VII. Unseen dialect translation across six models. Success rate is out of 3 runs per circuit. No MLIR backend is yet integrated for FTQC, so TVD-based testing is not applicable. Average time is per successful translation, except Code Llama 34B (0/9 successes), whose column reports mean wall-clock time per attempt.

c) Expected Reproduction Time (in Minutes): Setup (scripts/setup.sh) completes in a few minutes without downloading any LLM weights. Deterministic experiments: E1 (Table V) ∼15–30 min, E2 (Table VI) ∼10–20 min, E3 (cross-dialect portability) ∼10–20 min. The agentic experiment (Table VII) additionally requires an LLM backend (local Ollama or a HuggingFace token) and takes 2–4 hours across all six models, dominated by LLM inference and 70B model loading; a single model on the three paper-reported circuits (9 translations) completes in a few minutes.

d) Artifact Setup (incl. Inputs): Hardware. Paper results were collected on an NVIDIA RTX 6000 Ada GPU (48 GB VRAM), Intel Xeon w5-2465X, 256 GB RAM, Ubuntu 22.04. The deterministic path (Table III, Table V, Table VI) needs no GPU; the agentic path (Table VII) needs a local GPU for Ollama, or none at all against a HuggingFace-hosted model.

Software. Python 3.12, PennyLane 0.44.0, PennyLane-Catalyst 0.14.0, qir-runner 0.9.1, CreaWl 1.10.0, and (optional, Linux-only, enables OpenQASM input) CUDA-Q 0.13. All versions are pinned in requirements.txt and pyproject.toml.

Datasets/Inputs. The benchmark circuit suite (Table III) ships with the repository under example/catalyst_mlir/, example/quake_mlir/, and example/ftqc_mlir/, plus the Grover and Shor circuits under example/qiskit_algorithms/.

Installation and Deployment.

bash scripts/setup.sh
source venv/bin/activate

This creates a virtual environment, installs requirements.txt, and bootstraps a .env file for the HuggingFace token used by the agentic path (only needed for Table VII). The deterministic path requires no token.

e) Artifact Execution:

# Smoke test (~2 min, no LLM required)
bash experiments/run_smoke_test.sh

# E1 -- correctness (Table V)
bash experiments/run_e1_correctness.sh

# E2 -- GHZ scalability (Table VI)
bash experiments/run_e2_scalability.sh

# E3 -- cross-dialect portability
bash experiments/run_e3_cross_dialect.sh

# E4 -- unseen-dialect FTQC translation
# (Table VII; needs HF_TOKEN or Ollama)
bash experiments/run_e4_unseen_dialect.sh

A single circuit can also be translated directly, e.g. python translate.py example/catalyst_mlir/code_bell.mlir --json. An interactive demo, streamlit run agentic_mlir_qir/ui/app.py, is also included but is not required to reproduce any reported result.

f) Artifact Analysis (incl. Outputs): Each script writes newline-delimited JSON to experiments/results/<experiment>/*.jsonl, one record per translated circuit with gate-match, TVD, and timing fields. experiments/analyze_results.py aggregates these into the summary tables reported in the paper. Pre-computed summaries from the paper’s own runs are kept under experiments/paper_results/ for direct comparison against a fresh reproduction.

Appendix B: Artifact Evaluation (AE)

Computational Artifact A1

a) Artifact Setup (incl. Inputs): Artifact A1A_1 will be available on GitHub (https://github.com/ORNL-QCI/Agentic-MLIR_QIR). Hardware, software, and installation match Appendix A.

git clone <repo_url>
cd Agentic-MLIR_QIR
bash scripts/setup.sh
source venv/bin/activate

b) Artifact Execution: Run the smoke test, then any experiment driver; each is independent of the others.

bash experiments/run_smoke_test.sh
bash experiments/run_e1_correctness.sh
bash experiments/run_e2_scalability.sh
bash experiments/run_e3_cross_dialect.sh
bash experiments/run_e4_unseen_dialect.sh

The last script needs HF_TOKEN set in .env, or a local Ollama with the models listed in experiments/README.md.

c) Artifact Analysis (incl. Outputs): Compare experiments/results/ against experiments/paper_results/ via experiments/analyze_results.py. The deterministic path (Tables III, V, VI) has no stochastic component beyond shots-mode sampling and should match exactly; Table VII’s agentic results vary between runs since LLM output is not deterministic.

References

  1. [1]J. Preskill, “Quantum computing in the NISQ era and beyond,” Quantum, vol. 2, p. 79, 2018.DOI
  2. [2]B. Heim, M. Soeken, S. Marshall, C. Grenade, M. Roetteler, A. Geller, M. Troyer, and K. Svore, “Quantum programming languages,” Nature Reviews Physics, vol. 2, no. 12, pp. 709–722, 2020.DOI
  3. [3]A. Javadi-Abhari, M. Treinish, K. Trusch, C. J. Wood, J. Lishman, J. Gacon, S. Martiel, P. D. Nation, L. S. Bishop, A. W. Cross, B. R. Johnson, and J. M. Gambetta, “Quantum computing with Qiskit,” arXiv preprint arXiv:2405.08810, 2024.
  4. [4]Cirq Developers, “Cirq,” 2024.
  5. [5]K. Svore, A. Geller, M. Troyer, J. Azariah, C. Grenade, B. Heim, V. Kliuchnikov, M. Mikhailova, A. Paz, and M. Roetteler, “Q#: Enabling scalable quantum computing and development with a high-level DSL,” Proceedings of the Real World Domain Specific Languages Workshop, 2018.DOI
  6. [6]V. Bergholm, J. Izaac, M. Schuld, C. Gogolin, M. S. Alam, S. Ahmed, J. M. Arrazola, C. Blank, A. Delgado, S. Jahangiri et al., “PennyLane: Automatic differentiation of hybrid quantum-classical computations,” arXiv preprint arXiv:1811.04968, 2022.
  7. [7]J.-S. Kim, A. McCaskey, B. Heim, M. Modani, S. Stanwyck, and T. Costa, “CUDA Quantum: The platform for integrated quantum-classical computing,” in Proceedings of the 60th ACM/IEEE Design Automation Conference (DAC), 2023, pp. 1–4.DOI
  8. [8]F. J. Cardama, J. Vázquez-Pérez, C. Piñeiro, J. C. Pichel, T. F. Pena, and A. Gómez, “Review of intermediate representations for quantum computing,” The Journal of Supercomputing, vol. 81, no. 418, 2025.DOI
  9. [9]T. Beck, A. Baroni, R. Bennink, G. Buchs, E. A. Coello Pérez, M. Eisenbach, R. F. da Silva, M. Gopalakrishnan Meena, K. Gottiparthi, P. Groszkowski, T. S. Humble, R. Landfield, K. Maheshwari, S. Oral, M. A. Sandoval, A. Shehata, I.-S. Suh, and C. Zimmer, “Integrating quantum computing resources into scientific HPC ecosystems,” Future Generation Computer Systems, vol. 161, pp. 11–25, 2024.DOI
  10. [10]E. Wong, V. Leyton-Ortega, D. Claudino, S. R. Johnson, A. J. Adams, S. Afrose, M. Gowrishankar, A. Cabrera, and T. S. Humble, “A cross-platform execution engine for the quantum intermediate representation,” The Journal of Supercomputing, vol. 81, p. 1521, 2025.DOI
  11. [11]C. Lattner, M. Amini, U. Bondhugula, A. Cohen, A. Davis, J. Pienaar, R. Riddle, T. Shpeisman, N. Vasilache, and O. Zinenko, “MLIR: Scaling compiler infrastructure for domain specific computation,” in Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization (CGO), 2021, pp. 2–14.DOI
  12. [12]D. Ittah, A. Asadi, E. O. Lopez, S. Mironov, S. Banning, R. Moyard, M. J. Peng, and J. Izaac, “Catalyst: a Python JIT compiler for auto-differentiable hybrid quantum programs,” Journal of Open Source Software, vol. 9, no. 99, p. 6720, 2024.DOI
  13. [13]A. McCaskey and T. Nguyen, “A MLIR dialect for quantum assembly languages,” in Proceedings of the IEEE International Conference on Quantum Computing and Engineering (QCE), 2021, pp. 255–264.arxiv.org/abs/2101.11365
  14. [14]P. Hopf, E. O. Lopez, Y. Stade, D. Rovara, N. Quetschlich, I. A. Florea, J. Izaac, R. Wille, and L. Burgholer, “Integrating quantum software tools with(in) MLIR,” in Proceedings of Supercomputing Asia and International Conference on High Performance Computing in Asia Pacific Region, 2026, arXiv:2601.02062.DOI
  15. [15]N. Dupuis, L. Buratti, S. Vishwakarma, A. V. Forrat, D. Kremer, I. Faro, R. Puri, and J. Cruz-Benito, “Qiskit code assistant: Training LLMs for generating quantum computing code,” in 2024 IEEE LLM Aided Design Workshop (LAD), IEEE, 2024, pp. 1–4.arxiv.org/abs/2405.19495
  16. [16]L. Jern, V. Uotila, C. Yu, and B. Zhao, “Agent-Q: Fine-tuning large language models for quantum circuit generation and optimization,” in 2025 IEEE International Conference on Quantum Computing and Engineering (QCE). IEEE, 2025.arxiv.org/abs/2504.11109
  17. [17]QIR Alliance, “QIR specification: Quantum intermediate representation,” https://github.com/qir-alliance/qir-spec, 2021, accessed: 2026-03-01.
  18. [18]C. Lattner and V. Adve, “LLVM: A compilation framework for lifelong program analysis & transformation,” in Proceedings of the International Symposium on Code Generation and Optimization (CGO). IEEE, 2004, pp. 75–86.
  19. [19]ORNL-QCI, “QIR-EE: QIR execution engine,” https://github.com/ORNL-QCI/qiree, accessed: 2026-07-30.
  20. [20]QIR Alliance, “qir-runner: Tools for executing QIR programs,” https://github.com/qir-alliance/qir-runner, version 0.9.1. Accessed: 2026-07-30.
  21. [21]M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman et al., “Evaluating large language models trained on code,” arXiv preprint arXiv:2107.03374, 2021.arxiv.org/abs/2107.03374
  22. [22]Y. Li, D. Choi, J. Chung, N. Kushman, J. Schittwieser, R. Leblond, T. Eccles, J. Keeling, F. Gimeno, A. D. Lago et al., “Competition-level code generation with AlphaCode,” Science, vol. 378, no. 6624, pp. 1092–1097, 2022.DOI
  23. [23]M. Szafraniec, B. Rozière, H. Leather, F. Charton, P. Labatut, and G. Synnaeve, “Code translation with compiler representations,” in International Conference on Learning Representations (ICLR), 2023, arXiv:2207.03578.arxiv.org/abs/2207.03578
  24. [24]S. Afrose, V. Leyton-Ortega, and T. Humble, “Learning-based quantum compilation: Translating QASM to QIR with CodeBERT,” in 2025 IEEE International Conference on Quantum Computing and Engineering (QCE), vol. 02. IEEE, 2025, pp. 576–577.DOI
  25. [25]J. Moura, “CrewAI: Framework for orchestrating role-playing autonomous AI agents,” https://github.com/crewAIInc/crewAI, 2024, version 1.0.0.
  26. [26]Q. Wu, G. Bansal, J. Zhang, Y. Wu, B. Li, E. Zhu, L. Jiang, X. Zhang, S. Zhang, J. Liu, A. H. Awadallah, R. W. White, D. Burger, and C. Wang, “AutoGen: Enabling next-gen LLM applications via multi-agent conversation,” arXiv preprint arXiv:2308.08155, 2023.arxiv.org/abs/2308.08155
  27. [27]S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao, “ReAct: Synergizing reasoning and acting in language models,” in International Conference on Learning Representations (ICLR), 2023.arxiv.org/abs/2210.03629
  28. [28]N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao, “Reflexion: Language agents with verbal reinforcement learning,” Advances in Neural Information Processing Systems, vol. 36, pp. 8634–8652, 2023.arxiv.org/abs/2303.11366
  29. [29]A. W. Cross, A. Javadi-Abhari, T. Alexander, N. de Beaudrap, L. S. Bishop, S. Heidel, C. A. Ryan, P. Sivaraiah, J. Smolin, J. M. Gambetta, and B. R. Johnson, “OpenQASM 3: A broader and deeper quantum assembly language,” ACM Transactions on Quantum Computing, vol. 3, no. 3, pp. 1–50, 2022.DOI
  30. [30]D. Ittah, T. Häner, V. Kluchnikov, and T. Hoefler, “QIRO: A static single assignment-based quantum program representation for optimization,” ACM Transactions on Quantum Computing, vol. 3, no. 3, pp. 1–32, 2022.DOI
  31. [31]J. Luo and J. Zhao, “Formalization of quantum intermediate representations for code safety,” 2023, arXiv:2303.14500.arxiv.org/abs/2303.14500
  32. [32]A. J. McCaskey, D. I. Lyakh, E. F. Dumitrescu, S. S. Powers, and T. S. Humble, “XACC: A system-level software infrastructure for heterogeneous quantum-classical computing,” Quantum Science and Technology, vol. 5, no. 2, p. 024002, 2020.arxiv.org/abs/1911.02452
  33. [33]J. Austin, A. Odena, M. Nye, M. Bosma, H. Michalewski, D. Dohan, E. Jiang, C. Cai, M. Terry, Q. Le et al., “Program synthesis with large language models,” arXiv preprint arXiv:2108.07732, 2021.arxiv.org/abs/2108.07732
  34. [34]J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, A. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkat et al., “GPT-4 technical report,” arXiv preprint arXiv:2303.08774, 2023.
  35. [35]B. Rozière, J. Gehring, G. Gloeckle, S. Scialom, I. Gat, X. E. Tan, Y. Adi, J. Liu, R. Sauvestre, T. Remez et al., “Code Llama: Open foundation models for code,” arXiv preprint arXiv:2308.12950, 2023.arxiv.org/abs/2308.12950
  36. [36]C. Cummins, Z. V. Fisches, T. Ben-Nun, T. Hoefler, and H. Leather, “ProGraML: Graph-based deep learning for program optimization and analysis,” arXiv preprint arXiv:2003.10536, 2020.arxiv.org/abs/2003.10536
  37. [37]J. Wei, X. Wang, D. Schuurmans, M. Bosma, B. Ichter, F. Xia, E. Chi, Q. Le, and D. Zhou, “Chain-of-thought prompting elicits reasoning in large language models,” Advances in Neural Information Processing Systems, vol. 35, 2022.arxiv.org/abs/2201.11903
  38. [38]J. Wang et al., “Large language model-based agents for software engineering: A survey,” arXiv preprint arXiv:2409.02977, 2024.arxiv.org/abs/2409.02977
  39. [39]P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W. tau Yih, T. Rocktäschel et al., “Retrieval-augmented generation for knowledge-intensive NLP tasks,” Advances in Neural Information Processing Systems, vol. 33, pp. 9459–9474, 2020.
  40. [40]K. Karuppasamy, V. Puram, S. Johnson, and J. P. Thomas, “A comprehensive review of quantum circuit optimization: Current trends and future directions,” Quantum Reports, vol. 7, no. 1, p. 2, 2025.DOI
  41. [41]F. Bauer-Marquart, S. Leue, and C. Schilling, “symQV: Automated symbolic verification of quantum programs,” in Formal Methods: 25th International Symposium (FM 2023), ser. Lecture Notes in Computer Science, vol. 14000. Springer, 2023, pp. 181–198.
  42. [42]M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press, 2010.
  43. [43]A. Dubey, A. Jauhri, A. Pandey, A. Kadian, A. Al-Dahle, A. Letman et al., “The Llama 3 herd of models,” arXiv preprint arXiv:2407.21783, 2024.arxiv.org/abs/2407.21783
  44. [44]R. Raussendorf and H. J. Briegel, “A one-way quantum computer,” Physical Review Letters, vol. 86, no. 22, pp. 5188–5191, 2001.
  45. [45]IBM Quantum, “Grover’s algorithm,” https://quantum.cloud.ibm.com/docs/en/tutorials/grovers-algorithm, accessed: 2026-07-30.
  46. [46]———, “Shor’s algorithm,” https://quantum.cloud.ibm.com/docs/en/tutorials/shors-algorithm, accessed: 2026-07-30.

Paper details

vlnc:W_nygfzf5q
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents