Abstract
C2|Q⟩ is an automated, hardware-agnostic framework designed to bridge the gap between classical software engineering and quantum computing. By utilizing a modular Encoder–Deployment–Decoder architecture, it allows developers to submit high-level classical specifications (such as Python code or JSON) and automatically handles problem classification, circuit generation, hardware selection, and result interpretation. Experimental results demonstrate a 93.8% success rate in end-to-end execution and a 98.2% F1-score in problem classification, significantly reducing the barrier to entry for classical developers.
Introduction: The Usability Gap in Quantum Software Engineering
Despite the rapid growth of Quantum Software Engineering (QSE), a significant "usability gap" persists between classical developers and quantum hardware. Current development environments, such as Qiskit or Cirq, require deep domain expertise in quantum mechanics, Hamiltonian encoding, and noise-aware hardware selection. For a classical software engineer, the requirement to manually construct low-level circuits and decode raw bitstrings into meaningful answers is often a prohibitive learning curve.
C2|Q⟩ aims to transform the developer from an "architect" of quantum solutions into a "user" by providing a modular pipeline that abstracts these complexities. By identifying the underlying mathematical intent of classical code, the framework automates the transition from high-level specification to hardware-specific execution.
The C2|Q⟩ Framework Architecture
The authors propose a three-layered Encoder–Deployment–Decoder architecture to streamline the development lifecycle:
- Encoder: Acting as the system's core intelligence, the encoder uses a hybrid approach to analyze classical input. It combines Abstract Syntax Tree (AST) analysis for structural data with a fine-tuned CodeBERT model to classify problem types. These are then translated into Quantum-Compatible Formats (QCFs), such as Quadratic Unconstrained Binary Optimization (QUBO) or Oracles.
- Deployment: This layer features a Hardware Recommender designed for the Noisy Intermediate-Scale Quantum (NISQ) era. It employs a weighted scoring algorithm to balance fidelity (error rates), execution time, and financial cost across various backends, including IBM, IonQ, and Rigetti.
- Decoder: Upon receiving raw measurement data (bitstrings) from the quantum device, the decoder maps these results back into the original problem domain, providing actionable insights to the user.
Experimental Setup and Datasets
The framework was evaluated using diverse datasets to ensure robustness:
- Synthetic Python Dataset: 434 Python snippets generated via LLMs and validated for structural diversity (e.g., recursive vs. iterative styles) to train the CodeBERT parser.
- JSON Dataset: 100 structured problem instances serving as a lightweight Domain-Specific Language (DSL) for unambiguous problem specification.
- Hardware Calibration Data: Real-time snapshots from nine representative quantum devices across major providers (IBM, Amazon Braket, Azure Quantum) to validate the recommendation engine.
Key Findings and Performance Metrics
The C2|Q⟩ framework demonstrates high reliability and efficiency across several metrics:
- Classification Accuracy: The CodeBERT-based parser achieved a 98.2% F1-score in identifying problem types from raw Python code.
- End-to-End Reliability: The workflow achieved a 93.8% completion rate for Python inputs and a 100% completion rate for JSON inputs.
- Developer Effort Reduction: Usability analysis showed that manual implementations requiring an average of 73 lines of code (LoC) and six complex configuration decisions could be reduced to just 3 lines of code with zero manual hardware configuration using C2|Q⟩.
- Real-World Validation: Workloads were successfully deployed on hardware such as the 127-qubit IBM Brisbane and Finland’s 5-qubit Helmi.
Limitations and Future Directions
While C2|Q⟩ represents a significant step forward, it currently focuses on canonical problem families like Combinatorial Optimization and Arithmetic. Future work aims to expand this scope to arbitrary quantum logic and chemistry simulations. Additionally, the authors plan to replace rule-based AST extraction with LLM-driven agents to improve robustness against unconventional coding styles and implement adaptive tuning for algorithm parameters based on real-time hardware noise profiles.
Summary updated