Alexander Knapen of the University of Michigan and colleagues have developed Q-CAST, a new framework for compiling and simulating fault-tolerant quantum computing programs designed to handle systems with hundreds of thousands of qubits. The work addresses a critical gap in existing tools by focusing on the fine-grained interaction between classical CPUs and quantum controllers needed to drive these large-scale systems.
Q-CAST employs an LLVM-based compiler that translates quantum circuits into executable RISC-V assembly, incorporating vector quantum instructions that reduce program size up to 41× relative to standard encoding methods. This approach enables efficient design space exploration and co-design of compiler and quantum hardware architectures.
Q-CAST Framework Addresses FTQC Classical-Quantum Interaction
The Q-CAST framework achieves up to a 41× reduction in program size by using a vector quantum instruction set, a key step toward scaling fault-tolerant quantum computing (FTQC). This optimization stems from the framework’s ability to exploit the inherent SIMD parallelism within FTQC program structures, a departure from scalar compilation methods. The system translates physical circuits, which describe fault-tolerant logical primitives, into executable code designed for RISC-V assembly, a modern instruction set architecture increasingly favored in embedded systems and high-performance computing.
Q-CAST distinguishes itself through its integration with established, open-source tools, minimizing fragmentation across the computational stack. The compiler is implemented as a plugin and lightweight backend to the LLVM compiler, a widely used infrastructure for code optimization and generation. Similarly, the framework’s simulator extends the gem5 architectural simulator, providing a systematic approach to modeling the complex interplay between classical and quantum components.
This design choice allows for flexible exploration of different hardware configurations and co-design of both the compiler and quantum controller architecture. The framework’s simulator models both the classical host CPU and the quantum controller at the cycle level, enabling detailed analysis of program execution. This capability is important for understanding and optimizing the classical compute requirements needed to meet the demands of FTQC, a factor often overlooked in prior quantum resource estimation.
Researchers can now explore design space trade-offs and identify bottlenecks in the classical control system, potentially unlocking significant performance gains. “Our gem5-extended simulator, to the best of our knowledge, is the first to provide cycle-level execution traces of FTQC programs that enable rich, complex design space explorations,” the authors state in their paper. Beyond simulation, Q-CAST is designed to model closed-loop quantum error correction (QEC) performance.
By extending the framework with a decoder endpoint for shared syndrome writes from the CPU, the system can simulate the full feedback loop of error correction. An orchestrator module could then consume decoder results to perform Pauli updates and conditionally transmit the next logical primitive for execution, creating a complete end-to-end model of FTQC operation. The framework’s versatility extends to modeling systems comprised of hundreds of thousands of qubits, a scale necessary for realizing practical quantum advantage.
The team, comprised of researchers from the University of Michigan and Sygaldry Technologies, Inc., emphasizes the importance of a comprehensive toolchain for optimizing FTQC execution. “Clearly, a comprehensive, flexible toolchain is required to understand and optimize the classical costs needed for FTQC execution,” they write. Q-CAST, they argue, provides that toolchain, offering substantial value to system architects working toward scalable, performant FTQC systems. The framework is available as an open-source project, facilitating collaboration and further development within the quantum computing community.
LLVM-Based Compiler Reduces FTQC Program Size
The framework’s design prioritizes compatibility with established open-source tools, extending the RISC-V instruction set and integrating as a plugin within the LLVM compiler infrastructure. This approach avoids fragmentation of the compute stack and facilitates broader adoption by using familiar development environments. Through several optimization passes, their compiler reduces program size up to 41× relative to a scalar ISA encoding. As code distance increases, the potential for parallelism within the circuits also grows, further amplifying the benefits of the vector instruction set.
Register hoisting and constant-pool merging contribute an additional six-fold reduction by minimizing redundant memory access and address calculations. Their simulator extends gem5’s RISC-V CPU model and adds a parameterized quantum controller model to simulate execution of the new quantum instructions and fine-grained host-controller interactions cycle by cycle. The framework’s architecture is built around a systematic extension of the gem5 architectural simulator, allowing for cycle-level execution traces of fault-tolerant quantum computing programs. This capability is essential for understanding the interplay between quantum and classical components and for identifying performance bottlenecks in the overall system.
Q-CAST Simulator Models Cycle-Level FTQC Execution
The Q-CAST framework employs a vector instruction set, dubbed Xqv, to directly encode parallel execution within the instruction stream, a departure from prior quantum-classical interface designs. Unlike earlier tools often tailored to specific architectures, Q-CAST prioritizes flexibility through its reliance on established, open-source components and a comprehensive toolchain. Q-CAST’s compiler translates physical quantum circuits, defining fault-tolerant logical primitives, into a quantum+classical assembly ISA before architectural simulation begins.
This simulation, built as an extension to the gem5 architectural simulator, models both classical and quantum hardware at a per-clock-cycle granularity, enabling detailed design space exploration. The framework’s architecture augments a classical CPU core model with a quantum-specific datapath designed to execute vector instructions, capitalizing on the inherent parallelism within fault-tolerant quantum primitives. This optimization, achieved through multiple compiler passes, identifies and groups same-type operations across independent qubits, lowering them into vector instructions.
The resulting framework allows for co-design of compiler and quantum hardware architecture, a critical step toward scalable FTQC systems. The framework’s design contrasts with previous approaches like ARIES, which relies on analytical models and high-level metrics rather than traced architectural execution. Q-CAST, by providing cycle-level traces, reveals emergent runtime behaviors and additional optimization opportunities unavailable through simpler modeling techniques.
SIMD Vectorization Speeds FTQC Execution 5.47x
The Q-CAST framework achieved a 5.47x speedup in fault-tolerant quantum computing (FTQC) execution through extensive design space explorations encompassing over 30,000 simulation configurations. This performance gain stems from iterative refinement of design parameters within a vector architecture, demonstrating a substantial advantage over a design space exploration-optimized scalar baseline that saw a 128x speed increase. This approach reduces instruction footprint and enables parallel hardware execution, a critical step toward scaling quantum systems.
This detailed modeling facilitates fine-grained analysis of host-controller interactions, a level of insight previously unavailable. This co-design approach, linking compiler optimization with hardware architecture, is a key differentiator from prior work. The researchers emphasize that existing compilers often overlook vectorizing quantum instructions, leaving significant potential for reducing instruction overheads and parallelizing hardware execution.
The choice of instruction set architecture is a critical design decision impacting layers both above and below it in the compute stack, and Q-CAST’s selection of RISC-V is deliberate. The framework satisfies a need for an end-to-end toolchain for compilation and simulation of FTQC programs, a capability lacking in prior tools that focused on either logical or physical transpilers, assembly compilers, or resource estimators. As the graphic comparison within the paper illustrates, Q-CAST uniquely provides all these elements, positioning it as a comprehensive solution for advancing scalable FTQC execution.
Q-CAST Integrates with Open-Source Toolchains
Q-CAST uses the established RISC-V instruction set architecture, extending it with “vector quantum instructions” designed to reflect the inherent parallel structure of fault-tolerant quantum primitives, a departure from designs requiring entirely custom instruction sets. This integration allows the framework to tap into existing, mature classical compilation tools, avoiding the fragmentation often seen in quantum-classical co-design efforts and streamlining the development process. The framework’s compiler functions as a plugin within LLVM, a widely used compiler infrastructure, further enhancing compatibility and potential for community contribution.
Extensive design space explorations, enabled by Q-CAST’s end-to-end toolchain, have revealed critical opportunities for co-design between the compiler and the underlying hardware architecture. The framework’s lightweight implementation facilitated the simulation of over 30,000 configurations, a scale that highlights its ability to handle the complexity of large-scale quantum systems.
Existing quantum-classical ISA designs often fall short due to their application-specific nature or reliance on highly customized toolchains, hindering broader adoption and integration. The framework’s compiler takes physical circuits described in OpenQASM3 format as input and outputs a stream of vectorized quantum and classical assembly instructions, effectively bridging the gap between high-level quantum algorithms and low-level hardware control. The team built their compiler as a plugin to LLVM, enabling it to target either modified scalar or vector quantum extensions to the RISC-V ISA, a decision intended to maximize compatibility with existing classical compilation infrastructure.
This approach contrasts with other designs that define custom classical instructions, requiring entirely new compiler toolchains and increasing the barrier to entry for developers. By embracing open-source standards and using established tools, Q-CAST aims to accelerate the development and deployment of practical, fault-tolerant quantum computing systems.
Limitations of Existing FTQC Resource Estimation Tools
Existing quantum resource estimation tools often rely on fixed logical cycle times, overlooking the classical computing demands necessary to achieve those speeds. This simplification creates a gap in accurately predicting the overall cost of fault-tolerant quantum computing (FTQC) systems, particularly as they scale to hundreds of thousands of qubits. Prior work in quantum compilation has largely concentrated on optimizing quantum circuits themselves, leaving unexplored the important step of translating those circuits into a hardware-executable instruction set for the classical host controlling the quantum system.
A significant challenge lies in the division between the classical and quantum computing communities, with each side lacking comprehensive models of the other’s requirements. While quantum researchers have focused on reducing quantum resource needs through circuit optimization, these estimates often neglect the substantial classical compute costs associated with real-time control and quantum error correction.
Existing classical architectural simulators, though capable of cycle-level accuracy, lack the necessary understanding of quantum instruction semantics and the specifics of control electronics. This disconnect hinders the development of tools that can holistically assess the performance and efficiency of FTQC systems. Current resource estimation methods frequently depend on highly customized, in-house toolchains or focus solely on decoding processes, excluding the broader scope of qubit control.
But these analyses often fall short by not fully accounting for the classical resources needed to support them. The development of a comprehensive toolchain is therefore essential for understanding and optimizing the classical costs inherent in FTQC.
This necessitates a system that can translate abstract quantum circuits into a compiled, assembly-level instruction set architecture executable by the underlying control hardware. The absence of such a system limits the ability to identify optimization opportunities and accurately quantify program execution costs. A complete solution must bridge the gap between quantum circuit design and the classical infrastructure required to drive and control these complex systems.
👉 More information
🗞 Modeling the Classical Side of Fault Tolerance: Compilation and Cycle-Level Simulation for FTQC
✍️ Alexander Knapen, Yuewen Hou and Gokul Subramanian Ravi (University of Michigan, Ann Arbor, Michigan, USA); Michael J. Keiser and Chad Rigetti (Sygaldry Technologies, Inc., Ann Arbor, Michigan, USA)
🧠 ArXiv: https://arxiv.org/html/2612.05937v1




See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.
