Quantum Software Engineering in Practice: FPGA and AI Integration for Quantum Certification Marcos Guillermo Lammers∗
José Manuel Suárez∗
∗ PhD Candidate in Computer Science, Facultad de Informática, LIFIA,
Universidad Nacional de La Plata, La Plata, Argentina [email protected] [email protected]
Adrián Pousa† † Facultad de Informática, III-LIDI, Universidad Nacional de La Plata, La Plata, Argentina
Luis Mariano Bibbó‡
Alejandro Fernández‡
‡ Facultad de Informática, LIFIA, Universidad Nacional de La Plata, La Plata, Argentina
arXiv:2607.07597v1 [quant-ph] 8 Jul 2026
[email protected], [email protected] Abstract—The emergence of Quantum Software Engineering (QSE) responds to the need for systematic, disciplined, and quantifiable approaches to the development, operation, and maintenance of quantum software. Within this context, quantum computer certification represents a challenge: how to verify that quantum devices produce valid entangled states despite hardware imperfections, noise, and decoherence. This paper presents QAccCert, a hybrid certification framework developed following QSE principles, which demonstrates how heterogeneous technologies, specifically FPGAs and Artificial Intelligence, can be integrated for quantum processing. The framework implements entanglement certification through CHSH inequality violation in ideal quantum simulations (Qiskit √ AerSimulator), achieving 99.94% of the theoretical limit (2 2) through LLM guided optimization, evidencing more efficient parameter space exploration than random search. These simulated results illustrate how QSE methodologies, combined with strategic technology interconnection, can be used for practical and scalable quantum certification when applied to real NISQ hardware in future work. This work provides a concrete case study of systematic quantum software development. Index Terms—Quantum Software Engineering, quantum certification, FPGA acceleration, Artificial Intelligence, Large Language Model, technology interconnection, CHSH inequality, NISQ devices, Benchmarking quantum computers
I. I NTRODUCTION Quantum computing has advanced significantly over the last decade, giving rise to the NISQ (Noisy IntermediateScale Quantum) era, characterized by devices with hundreds of qubits but still prone to errors and subject to serious operational limitations. This scenario has driven the emergence of a new discipline: Quantum Software Engineering (QSE), which seeks to apply systematic, disciplined, and quantifiable approaches to the development, operation, and maintenance of quantum software and the hybrid quantum-classical systems with which it integrates. Among the challenges currently addressed by QSE is the systematic and automated certification of quantum computers—that is, verifying that they operate correctly and produce valid quantum states. Building on previous
work [1], it is evident that this is a critical problem involving aspects such as: • NISQ devices are inherently noisy and error-prone. • The degree of entanglement of quantum states, which represents a vital resource in the characterization of quantum computers. • Hardware imperfections, such as decoherence, asymmetric noise, calibration errors, and thermal drift, invalidate the ideal assumptions of theoretical protocols. Traditionally, quantum certification and benchmarking protocols have been addressed through methods that assume ideal conditions or do not broadly address NISQ imperfections from a software engineering perspective [2]–[4]. However, work from the field of quantum physics [1], [5] and QSE practice teaches us that software systems interacting with imperfect hardware require hybrid approaches that coherently integrate multiple technologies. A. Technology Interconnection as a Response This paper argues that the response to many of the challenges posed by quantum hardware certification must necessarily occur within a hybrid quantum-classical context, placing the focus on the strategic interoperability of emerging technologies guided by QSE principles [6], [7], such as the following: • Dedicated hardware (FPGAs), to accelerate the processing of quantum correlations. In particular, we use an open-hardware FPGA, such as the Kéfir project [8] and the visual environment Icestudio [9], as they allow broader access to this technology. • Artificial Intelligence (LLMs), to adaptively optimize measurement parameters, selected for their open access and balance between capability and computational efficiency. • Standardized quantum protocols, for state generation and measurement [1], [5].
Scalable hybrid infrastructure, serving as a constructive foundation for managing the enormous volume of data in post-processing stages, as well as the appropriate management of classical quantum resources [10]–[12]. Framed within a properly defined software architecture and infrastructure, this facilitates a certification process that is scalable, hardware-agnostic, and aligned with the foundations of QSE [13]. •
B. Related Work and Context In recent years, various proposals have emerged addressing the limitations of NISQ devices from different perspectives, evidencing the growing need for tools that automate optimization and hardware adaptation. In the academic domain, analyses have been developed on quantum resource management [14] and its extension in an experimental framework called Qonscious [15], which proposes the conditional execution of programs based on the dynamic availability of resources. In parallel, commercial solutions such as Fire Opal by QCTRL 1 [16] offer a hardware abstraction layer that integrates automatic error suppression and circuit optimization, allowing users to run algorithms on multiple backends without reconfiguration and improving the scalability of results. In the area of resource estimation and efficient simulation, frameworks such as those offered by Zapata Computing (BenchQ) [3] and Rigetti (Rigetti Resource Estimation) [4] use advanced techniques such as stabilizer circuit simulation based on graph state representations [17] and circuit decomposition methods for fault-tolerant resource estimation [18]. However, these tools do not explicitly account for the imperfections and dynamic adaptation required in the NISQ era. In this work, we highlight the need to combine specialized hardware, artificial intelligence, infrastructure, and high-level software to overcome the limitations of NISQ devices. Our accelerated quantum certification prototype (QAccCert) distinguishes itself by specifically addressing the problem of quantum entanglement certification through the synergistic combination of FPGA acceleration and AI optimization via LLMs. Deploying an integrated hybrid prototype solution would be applicable to a broad spectrum of quantum infrastructures and technologies, flexibly meeting the dynamic requirements of each algorithm through software abstraction layers that enable this decoupling. Considering the context and objective of this work, it is necessary to contemplate a supporting software architecture that enables the integration of the potential of quantum computing with HPC infrastructures in pre- and postquantum processing stages. Such a hybrid architecture must be hardware-infrastructure-agnostic and adaptable to both current NISQ computers and future FTQC (Fault-Tolerant Quantum Computing) systems. In this regard, a framework is proposed for the efficient management of data between quantum and classical resources, as well as a proposed technology stack in [10], where the key element is a QGateway that efficiently manages resource allocation. An analysis is also conducted 1 Q-CTRL - https://q-ctrl.com/
on application requirements based on the variable level of quantum resource demand. Tasks such as quantum benchmarking, the central use case of QAccCert, would require low QC load but many requests, in what might be seen as frequent and fragmented interaction, and also high HPC demand in relation to interaction with LLMs and results management in post-processing stages. Regarding the challenges posed by QC-HPC integration, we consider resource management, job scheduling, efficient data flow management, hardware and infrastructure independence, service discovery, interconnection networks, and exposure of quantum parameters. The work of [11] addresses system integration through quantum computational acceleration on HPC environments via a hardwareagnostic framework. This integration is developed from the perspective of hardware, users, applications, software, and development flow. Notably, the authors subdivide the component integration scheme into ‘tightly coupled’ or ‘loosely coupled’, depending on whether the CPU-GPU-QPU triad can or cannot be managed under the same workflow. Finally, the work of [12] proposes a conceptual middleware that identifies the particularities of the quantum-classical integration process, sub-classifying the different possible interaction scenarios into: HPC-for-quantum, quantum-in-HPC, and quantum-on-HPC, primarily considering the level of coupling and the structure of the application, as well as their impact on middleware requirements. These works demonstrate that QC-HPC integration is an active and multidimensional challenge, whose systematic treatment constitutes one of the axes on which QAccCert builds its architecture. II. C ONTRIBUTIONS AND S TRUCTURE To substantiate our hypothesis, we developed QAccCert (Quantum Accelerated Certification Framework), with a hybrid approach following QSE guidelines that implements quantum entanglement certification through violation of the CHSH inequality [5]. QAccCert serves as a case study and aims to demonstrate: 1) How QSE can guide the integration of heterogeneous technologies. 2) How FPGA acceleration significantly reduces classical post-processing times. 3) How LLM-based optimization enables more efficient exploration of the parameter space within specific hardware imperfections. 4) How a hybrid architecture incorporating HPC can handle data volumes and post-processing requirements. 5) The feasibility of these approaches in real-world scenarios. The paper is structured as follows: Section II analyzes the problem of quantum certification from the perspective of Quantum Software Engineering, emphasizing why traditional methods are often insufficient and why the FPGA+AI combination is advantageous, as well as a prototype of a supporting architecture. Section III presents the proposed technology interconnection architecture, with QAccCert as a concrete implementation. Section IV shows the experimental results
obtained, validating the approach. Finally, Section V discusses the implications for QSE, explores possible future research directions, and summarizes the conclusions. III. Q UANTUM C ERTIFICATION AS A Q UANTUM S OFTWARE E NGINEERING P ROBLEM A. What Makes Certification a QSE Challenge? Quantum Software Engineering is concerned with “systematic, disciplined, and quantifiable approaches to the development, operation, and maintenance of quantum software.” Quantum computer certification encompasses all of these characteristics: • Systematic: It requires well-defined protocols (such as CHSH) that must be executed in a reproducible manner. • Disciplined: It demands the establishment of adequate metrics, as well as rigorous quality control and validation processes. • Quantifiable: It produces numerical values (violation S) that allow for the objective evaluation of the system’s state. • Operation and maintenance: Certification is not a onetime event, but a continuous process that must adapt to changes in hardware (thermal drift, aging, recalibration, etc.). Furthermore, certification involves hybrid software that must: • Interact with quantum hardware or software when working with simulation, typically through APIs such as Qiskit 2 . • Process and manage the large volumes of measurement data generated. • Be flexible and adaptive to changing conditions in real time. • Integrate and interoperate with classical control and acquisition systems.
Maintainability: A certification framework must be updatable when hardware changes or new protocols emerge. • Reproducibility: Results must be consistent across runs and, ideally, across different installations. As a result, the theoretically optimal angles do not coincide with the experimentally optimal angles, and the actual violation is lower than expected. Validated certification requires finding these experimental optima. This is a task that demands a software engineering approach to be practical. •
C. Why FPGA and AI? A Response from QSE
Certification based on Bell inequality violation typically uses the CHSH inequality [5]:
QSE teaches us that complex systems require modular architectures where each component specializes in a function. In our case: • FPGA as a hardware accelerator: FPGAs offer parallel processing of multiple quantum correlations, optimized integer arithmetic, and low latency. From the QSE perspective, this is a design pattern for separating intensive computation from high-level control. This approach is complementary to others such as the automatic error suppression proposed by commercial solutions [16] or resource-based conditional execution [14]. • AI (LLMs) as an adaptive optimizer: LLMs can identify patterns in historical data and suggest promising configurations. In QSE terms, this constitutes a learning and adaptation component that improves with experience, similar in spirit to the resource management analyses proposed in [14] and the symmetry-invariant estimation methods developed in [1]. • Standardized quantum protocols: State preparation and measurement follow defined interfaces (Qiskit), enabling interchangeability of the quantum backend. The central thesis of this work is that the synergistic combination of these technologies, framed within a well-designed QSE architecture, constitutes in itself the main contribution: the numerical results presented later serve as evidence of its coherence and feasibility. This integration scales as algorithms and topologies grow, being applicable to both pre- and postprocessing of data.
S = |E(a, b) − E(a, b′ ) + E(a′ , b) + E(a′ , b′ )| ≤ 2
IV. T ECHNOLOGY I NTERCONNECTION A RCHITECTURE : QACC C ERT AS A QSE C ASE S TUDY
B. Limitations of Traditional Approaches from the QSE Perspective
(1)
where E(α, β) represents the correlation between measurements in bases α and β. The theoretical quantum limit is √ 2 2 ≈ 2.828. The theoretically optimal measurement angles (θ = [a, a′ , b, b′ ]) have a known analytical solution. However, from a QSE perspective, multiple problems arise: • Hardware-software coupling: The theoretically optimal angles assume ideal hardware; in practice, each device has unique imperfections that require software adaptation. • Data quality: Noise and decoherence introduce uncertainty into measurements. • Computational efficiency: The search for optimal experimental angles is costly if performed by brute force. 2 IBM-Qiskit - https://www.ibm.com/quantum/qiskit
QAccCert (an acronym for Quantum Accelerated Certification Framework) implements a hybrid optimization cycle following Quantum Software Engineering principles: separation of concerns, defined interfaces, and reusable components. An illustrative diagram of the proposed architecture is shown in Figure 1. A. Architecture Components 1) Quantum state preparation module: Parameterized circuits generate Bell states, see Figure 2. This module abstracts the underlying hardware (simulator or real device) through a unified interface (Qiskit). 2) FPGA-accelerated processing module: Raw measurements were transmitted using the UART protocol so
GitHub Repository - https://github.com/jose-manuel-suarez/qacccert
Configuration Environment settings file
Algorithm 2
MAIN ORCHESTRATOR Execute
QUANTUM EXECUTION MODULE Accelerated CHSH measurement using dedicated hardware (FPGA).
Algorithm 1
Simulation
Iterate by performing CHSH measurements and invoking the LLM to achieve optimal values.
Execution on remote hardware
Angle measurement
Measurement history
Transmission
HARDWARE ACCELERATION MODULE
Algorithm 3 Data reception Periodically check the target LLM using the measurement history.
Device Selection
Computation
Suggested angles
AI OPTIMIZATION MODULE Reiew
Model download
Number of iterations
timized version of OpenAI GPT-2 that enables fast and compact responses in resource-constrained environments (such as mobile devices), developed by Hugging Face 4 [21], [22], offering a balanced performance between speed and response quality. For this selection, we highlight free access to the models, both published under the Apache 2.0 license, and their availability through web platforms and services. 4) Main orchestrator: Coordinates the modules, manages data flow, and ensures the consistency of the certification process.
DATA VISUALIZATION MODULE Prompt generation Console execution results Angle parsing Statistical charts
Trend metrics
JSON Response
Figure 1. Hybrid architecture of QAccCert.
B. Contributions to Quantum Software Engineering The architecture proposed in QAccCert is grounded in and consolidates QSE principles: Separation of concerns: each module develops a clearly defined functionality through the exposure of a wellspecified interface. • Hardware abstraction: the orchestrator does not need to know the details of the FPGA or the quantum backend; it communicates through APIs; this independence between components enables a hardware-agnostic solution through technological decoupling, substantially increasing its deployability across different technologies. • Reusability: modules can be replaced or updated independently (e.g., switching LLM or FPGA). • Adaptability: the system learns and improves with experience, a flexibility requirement that is key to operating in dynamic NISQ environments. • Observability: concrete execution results in conjunction with the generated functional evolution diagrams allow for rapid parametric adjustments to reach optimal configurations. • Maintainability: the modular structure facilitates debugging, testing, and evolutionary software correction. •
Figure 2. Quantum circuit for measuring non-locality in entangled states with some of the Ry gate rotations.
that the FPGA computes the correlations E(α, β). In our prototype, it was programmed in Verilog code and the FPGA synthesis was performed using the visual environment Icestudio [9], an open-source tool that simplifies digital design for open-hardware FPGAs. The FPGA board was developed based on a design from the Kéfir project [8]. The specific integrated circuit (FPGA) is manufactured by Lattice Semiconductor, iCE40 Ultra family, model iCE40HX4K-TQ144, with 40 nm technology, 3520 logic cells (4-input LUTs), 80 Kib of distributed SRAM, 2 PLLs for clock management, 107 I/O pins at 3.3 V; 4 Mib SPI Flash configuration memory (Winbond W25X40CL), with approximately 3 Mib available for data storage. This module encapsulates the low-level logic and exposes a simple API to the rest of the system. 3) AI-based optimization module: For the analysis of the iteration history and suggestion of promising angles, we selected two representative large language models (LLMs): Mistral-7B-Instruct-v0.2 [19], released by Mistral AI 3 in 2024, a model that stands out for its efficiency and performance despite its compact size, maintaining a balance between result quality and computational efficiency, with an extended context window of 32K tokens; and DistilGPT2 [20], a lightweight, op3 Mistral AI - https://mistral.ai/about
C. Certification Algorithm from the QSE Perspective Algorithm 1 shows the pseudocode of the certification process, highlighting how the components are interconnected following QSE design patterns. The FPGA-accelerated auxiliary CHSH measurement function is shown in Algorithm 2. D. AI-based Optimization: LLM Integration The optimization module constitutes the adaptive component of the QSE architecture, responsible for suggesting new measurement angles based on the history of prior iterations. Unlike random search methods that explore the space without memory, the proposed approach uses a Large Language Model (LLM) whose goal is to direct the search toward higherquality regions of the parameter space, leveraging the history of previous iterations to achieve solutions superior to those obtained through random exploration. See Algorithm 3. 4 Hugging Face - https://huggingface.co/huggingface
Algorithm 1 Certification with FPGA and AI Require: Initial configuration Ensure: CHSH violation S, optimal angles found 1: InitializeHardware() ▷ FPGA + quantum backend via standard API 2: θcurrent ← [0, π/4, π/8, 3π/8] ▷ Theoretical initial angles 3: Sbest ← −∞ 4: history ← [] 5: for iter ← 1 to Nmax do 6: (S, E) ← MeasureCHSH(θcurrent ) ▷ FPGA accelerates E computation 7: history.add({θcurrent , S, E}) 8: if S > Sbest then 9: Sbest ← S 10: θbest ← θcurrent 11: θcurrent ← LocalSearch(θcurrent ) 12: else 13: if iter mod 2 = 0 then 14: θcurrent ← QueryLLM(history) ▷ AI optimization 15: else 16: θcurrent ← GlobalSearch(θbest ) 17: end if 18: end if 19: if |S − 2.828| < ϵ then 20: break ▷ Practical optimum reached 21: end if 22: end for 23: return Sbest , θbest Algorithm 2 MeasureCHSH function with FPGA acceleration 1: function M EASURE CHSH(theta) √ 2: Prepare state Ψ− = (|01⟩ − |10⟩)/ 2 3: for (α, β) ∈ {(a, b), (a, b′ ), (a′ , b), (a′ , b′ )} do 4: Measure qubits with angles α, β 5: Send raw results to FPGA 6: Compute on FPGA: E(α, β) = P00 + P11 − P01 − P10 7: end for 8: S ← |E(a, b) − E(a, b′ ) + E(a′ , b) + E(a′ , b′ )| 9: return S, [E(a, b), E(a, b′ ), E(a′ , b), E(a′ , b′ )] 10: end function Algorithm 3 LLM-based optimization 1: function Q UERY LLM(history) 2: M odeltarget ← LoadModel() 3: Itercount ← GetIterationCount() 4: P rompt ← BuildPrompt(history, Itercount ) ▷ Prompt construction from history 5: ResponseJSON ← Execute(M odeltarget , P rompt) ▷ LLM request and response retrieval 6: θsuggested ← ParseAngles(ResponseJSON ) 7: return θsuggested 8: end function
1) Optimization Module Architecture: The optimization module is implemented as a decoupled component that: • Receives from the orchestrator the history of the last k iterations (explored angles and obtained S value). • Constructs a structured prompt encoding this history in natural language. • Queries an LLM (Mistral-7B-Instruct-v0.2 or DistilGPT2) to obtain suggestions for new angles. • Parses the model’s JSON response and validates that the angles fall within the range [0, π] before sending them to the orchestrator. 2) Justification for Using LLMs in Our Approach: The choice of LLMs as the optimization engine is primarily motivated by three inherent characteristics of the problem that make them particularly well-suited: 1) Exploratory strategy (intelligent vs. random): pure random search does not leverage information from previous iterations. An LLM, upon receiving the full history, can identify patterns and promising directions, acting as an optimizer with memory. 2) Adaptation to imperfect hardware: on real NISQ devices, the theoretically optimal angles (θ = [0, π/4, π/8, 3π/8]) do not coincide with the experimental ones due to noise, temperature, and calibration errors. An LLM can learn from previous iterations on the specific device and suggest specific compensations, whereas random search would treat each iteration as independent, preventing the reuse of useful information and its benefits for future search iterations. 3) Correlation between runs: although each device may exhibit unique and occasional imperfections, common patterns also exist (e.g., certain types of noise). Consequently, an LLM that retains and appropriately uses these data clusters inherent to the sequencing of runs can reuse them as ‘search shortcuts’ and accelerate convergence, compared to a more naive strategy such as restarting random searches. 3) Model Selection: We evaluated two models with different performance profiles: • Mistral-7B-Instruct-v0.2: Greater reasoning capability, capable of generating more precise suggestions, but requires a GPU and higher latency (∼ 500 ms on optimized hardware). • DistilGPT2: A lighter model with low resource demands, executable on a CPU, with reduced latency (∼ 100 ms), but potentially generating less sophisticated suggestions. Both models were tested under standard parameterizations with temperature 0.5. Both models demonstrate the ability to suggest promising angles, achieving a more intelligent exploration of the parameter space that translates into higher-quality solutions compared to random search, though without a significant reduction in the number of iterations in this experiment. Mistral can reach slightly higher S values in preliminary tests, albeit with greater computational cost. We highlight that our modular
architecture promotes an experimental system with reduced coupling and well-cohesive independent components, allowing model swapping. V. E XPERIMENTAL R ESULTS All results presented in this section were obtained through quantum simulations using Qiskit Aer (AerSimulator 5 ) with a finite number of shots (shot-based simulation), without an incorporated noise model. The purpose of these simulated experiments is to validate the proposed hybrid architecture (QAccCert), quantify the potential benefit of FPGA acceleration and LLM-guided optimization, and demonstrate the conceptual feasibility of the approach before its application on real NISQ hardware. To validate the hypothesis that FPGA+AI interconnection, guided by QSE principles, is necessary for practical certification, we evaluated the impact of two essential factors: (i) hardware acceleration via FPGA in the computation of correlations, and (ii) AI-guided algorithmic optimization. To this end, we compare three optimization strategies that benefit equally from the base acceleration provided by the FPGA: 1) Pure random search (baseline): Generates random measurement angles at each iteration, without using historical information. This strategy establishes the baseline for algorithmic efficiency. 2) Fallback (local perturbation): In the absence of the LLM, the system uses a fallback mechanism that explores the neighborhood of the best angle found so far through random perturbations. This strategy allows isolating the specific benefit of AI. 3) LLM optimization: The AI module analyzes the history of previous iterations and suggests new measurement angles, guiding the search toward promising regions of the parameter space. It is worth noting that all three strategies execute the same correlation computation core. This makes it possible to separately analyze: • Algorithmic advantage: Improvement in solution quality (S value) and reduction in iterations thanks to AI (Table II). • Hardware advantage: Acceleration of time per iteration and scalability via FPGA (Tables I and III). A. QSE Evaluation Metrics To quantify the benefits of the proposed architecture, we define the following metrics based on Quantum Software Engineering principles: • Certification quality: The CHSH violation value S √ achieved and its proximity to the theoretical limit 2 2 ≈ 2.828. This effectiveness metric evaluates the precision of the solution found (Table II). • Computational efficiency: Time per iteration and total time required to reach convergence. This performance 5 Qiskit - AerSimulator https://qiskit.github.io/qiskit-aer/stubs/qiskit aer. AerSimulator.html
metric allows comparing the computational cost of each strategy (Table III). • Hardware acceleration: Comparison of the pure computation time for correlations on PC vs. FPGA, expressed as speedup (time ratio). This metric quantifies the intrinsic gain of hardware acceleration (Table I). • Throughput: Number of correlation computations per second on each platform, a key metric for evaluating scalability in high-demand scenarios. • Adaptability: The AI module’s ability to guide the search toward higher-quality regions of the parameter space, measured by the improvement in the achieved S value compared to random search. This learning metric reflects the qualitative advantage of the LLM: it does not necessarily reduce the number of iterations, but rather makes better use of them to reach superior solutions (Table II). • Robustness: Standard deviation of S across runs, indicating the reproducibility and reliability of the certification process. B. Comparative Results To evaluate the impact of hardware acceleration and AIbased optimization, we conducted a systematic comparison along two dimensions: (i) FPGA performance in the computation of correlations, and (ii) the efficiency of different optimization strategies that benefit from this acceleration. 1) FPGA Performance in Correlation Computation: Table I presents a multi-level performance analysis of the FPGA, decomposing times to identify bottlenecks and future potential. This analysis enables understanding of the real acceleration capability of the hardware, independently of the optimization strategy employed. Table I M ULTI - LEVEL FPGA PERFORMANCE ANALYSIS Level Metric Value PC Time 0.00197 ± 0.0003 ms PC Only per S computation Time/iteration 554.4 ± 5.2 ms FPGA+UART (Current prototype) < 0.1% computation Breakdown + 99.9% delay Time/iteration 0.00084 ms FPGA+USB 3.0 (Projected) Scalable throughput depending on parallelization Note: The PC Only level shows pure computation time: PC 0.00197 ms per correlation, FPGA 0.00083 ms for 4 correlations in parallel. The prototype uses UART with intentional delays and no parallelization (550 ms). The projected level assumes a USB 3.0 interface (5 Gbps) with a communication time of 0.00001 ms, resulting in 0.00084 ms per complete iteration (0.00083 ms computation + 0.00001 ms communication).
The reported iteration times for the FPGA (average 554.4 ms) correspond to the current prototype and include software delays deliberately introduced to ensure communication integrity: 20 ms initial delay, 4 pauses of 10 ms between byte transmissions, and 500 ms response wait. This distinction is paramount: the observed overhead is a characteristic of the test software and the UART interface, not a limitation of the
hardware acceleration, whose projected speedup with USB 3.0 reaches 9.4x over the CPU and enables a throughput scalable to thousands of correlations in parallel. 2) Optimization Strategy Efficiency: Building on this hardware acceleration baseline, we evaluated the three optimization approaches that determine solution quality and the number of iterations required. Table II compares these strategies in terms of precision (achieved S value) and algorithmic efficiency (iterations to the maximum). Table II C ONVERGENCE EFFICIENCY: COMPARISON OF OPTIMIZATION STRATEGIES FOR CHSH CERTIFICATION Optimization S Iteration Efficiencya strategy of maximum Pure random search 2.7520 42 97.3% Fallback (local perturbation) 2.7686 35 97.9% LLM optimization Distil GPT-2 2.8267 41 99.94% Mistral-7B 2.6909 46 95.1% √ a Efficiency = (S achieved / 2 2 ≈ 2.828) ×100%. Note: All S values, number of iterations, and convergence were obtained through quantum simulations using Qiskit’s AerSimulator (without a noise model). On real NISQ devices, CHSH violation values will be lower.
Algorithmic Efficiency (Convergence Speed): Regarding the number of iterations required to reach the maximum, the fallback is the fastest, converging in only 35 iterations (17% fewer than random). The LLM converges in 41 iterations, while random search requires 42. This reveals a trade-off: the LLM’s advantage is qualitative (solution quality), not quantitative (number of iterations); the fallback prioritizes speed, quickly finding a local maximum, while the LLM invests a few additional iterations to perform a more intelligent exploration that allows it to reach a superior solution. • Hardware Acceleration with FPGA: The hardware advantage becomes apparent when implementing the optimization strategies on the FPGA. Using a USB 3.0 interface (5 Gbps), the time per iteration on the FPGA is reduced to 0.00084 ms (parallel computation 0.00083 ms + communication 0.00001 ms). As shown in Table III, for LLM optimization (41 iterations), the FPGA completes processing in 0.0344 ms, while the CPU requires 0.323 ms for the same task. •
Table III shows the real-time impact of running these same strategies on FPGA hardware with the projected performance. Table III H ARDWARE ACCELERATION : COMPARISON OF TOTAL EXECUTION TIMES
Optimization strategy
Iter Total time Total time Total time CPU FPGA+UART FPGA+USB 3.0 (serial) (prototype) (parallel computation) 42 0.331 ms 23,285 ms 0.0353 ms 35 0.276 ms 19,404 ms 0.0294 ms
Random search Fallback LLM optimization Distil GPT-2 41 Mistral-7B 46
0.323 ms 0.362 ms
22,730 ms 25,502 ms
0.0344 ms 0.0386 ms
Note: The purely hardware speedup is 9.4× (time per iteration CPU vs FPGA+USB 3.0) and is constant regardless of strategy.
The results obtained, summarized in Tables II and III, validate the central thesis of this work. The analysis is broken down into three fundamental aspects: precision, algorithmic efficiency, and hardware acceleration. • Precision (Solution Quality): Certification quality improves significantly with the optimization strategy. Pure random search achieves a value of S = 2.7520 (97.3% of the theoretical limit). The fallback (local perturbation) improves slightly to S = 2.7686 (97.9%). However, LLM optimization achieves a value of S = 2.8267, representing an efficiency of 99.94% with respect to the theoretical maximum of 2.828, demonstrating the LLM’s capability to guide the search toward optimal regions of the parameter space.
Figure 3. FPGA acceleration scalability. Top: Total execution time for 41 iterations on a logarithmic scale. The CPU (red) scales linearly with the number of correlations (tCP U = ncorr × 41 × 0.00197 ms), while FPGA+USB 3.0 (blue) maintains a constant time (tF P GA = 41 × 0.00084 ms) thanks to parallel processing. The green area represents the cumulative FPGA advantage. Bottom: Resulting speedup, from 9.4× for CHSH (4 correlations) to >2,400× for systems with 1024 correlations.
Figure 4 shows a snippet of the Verilog 6 code implemented on the FPGA, evidencing hardware-level optimization as part of the QSE architecture. 6 Verilog Hardware Description Language - https://www.verilog.com/
Figure 4. Verilog code snippet for correlation computation on the FPGA.
VI. D ISCUSSION A. Lessons for Quantum Software Engineering The results lead us to believe that the technology combination guided by QSE is not a luxury, but a practical necessity. Specifically: Modularity enables independent evolution: We could replace the LLM with another model or the FPGA with a GPU without redesigning the entire system. • Hardware abstraction facilitates testing: We can test each module separately with simulators before real deployment. • Adaptability improves with experience: The system learns from previous runs and continuously optimizes itself. • Quantifiable metrics enable objective evaluation: The violation S, convergence time, and standard deviation provide a basis for comparing design alternatives.
•
In simulations with few iterations, LLM latency may be negligible. However, in real scenarios with noisy quantum hardware, where each iteration is costly (both in time and resources), the reduction in the number of iterations may justify the use of AI. A typical design trade-off example in software engineering. B. Observed Limitations on Real NISQ Hardware On real NISQ hardware, experimental CHSH violations typically range between 2.3 and 2.7 (depending on the device, number of shots, error mitigation, and connectivity), even with error mitigation techniques or zero-noise extrapolation [23], well below the theoretical limit. The results presented here represent an ideal upper bound and serve as a reference for comparing future implementations with mitigation. Although the experiments were conducted in simulations (without a noise model), it is important to contextualize the results with the reality of current NISQ devices. In superconducting or trapped-ion processors, accumulated noise drastically limits circuit depth and entanglement quality. Therefore, the QAccCert framework, with its focus on adaptive optimization via LLM and FPGA acceleration, could be especially valuable in
real scenarios to compensate for these imperfections through more efficient searches and fast data processing. The current evidence suggests that quantum computing will not be used in isolation, but integrated with classical computers [24], as it will be necessary to prepare the execution of quantum algorithms beforehand in classical computing and subsequently process the results classically. This postprocessing could require enormous computational power and, given current hardware limitations, it would be infeasible to perform it in a reasonable time using a single computer sequentially. The natural and widely adopted response is the use of HPC (High Performance Computing), which is based on parallel programming to accelerate computation. For this reason, the integration of QC systems with HPC infrastructures is proposed [25], typically combining multicore processors, GPUs, or FPGAs (as in our case) in the same machine and even multiple interconnected machines forming clusters that pool their computational power. Additionally, artificial intelligence techniques can be employed to facilitate parameter optimization in hybrid quantum-classical algorithms, reducing the complexity of their implementation. VII. F UTURE W ORK AND C ONCLUSIONS A. Implications for Quantum Software Engineering This work demonstrates that the practical certification of quantum computers requires a software engineering approach that integrates: • Modular architectures with clear separation of concerns. • Hardware abstraction through well-defined APIs. • Adaptive components (AI) that learn from experience. • Hardware acceleration by parallelizing computation. • Quantifiable metrics for objective evaluation. QAccCert serves as a case study validating these principles, showing concrete computational results using entanglement certification through CHSH [5]. This work joins other recent efforts [15], [16] that, from different perspectives, contribute to the goals of Quantum Software Engineering by: • Providing concrete examples of the application of QSE principles. • Demonstrating the feasibility of hybrid architectures in real scenarios. • Identifying metrics and methodologies for evaluating quantum systems. • Opening research questions on the design, maintenance, and evolution of such systems. B. Optimization with a Theoretical Starting Point As a future line of work, we plan to explore hybrid strategies that combine: • Initialization with theoretical angles: Beginning the search from the ideal optimal angles (θ = [0, π/4, π/8, 3π/8]) rather than from random starting points. • LLM refinement: Using the LLM to adjust these angles to the specific hardware imperfections, further reducing the number of iterations needed.
•
LLM fine-tuning: Training the model with historical data from multiple runs on the same device to improve the quality of suggestions.
This combination is expected to reduce the number of iterations to fewer than 40, approaching the efficiency of a specialized optimizer but with the flexibility of an AI-based system. C. Future Research Directions in QSE Scalability to multipartite systems: Extending the approach to certification of GHZ states and other complex quantum resources, evaluating how the QSE architecture adapts to new protocols. • Hardware-software optimization: Implementing more functionality directly on the FPGA (e.g., random number generation, experiment control) and studying the optimal partitioning between hardware and software, drawing inspiration from efficient simulation techniques such as those based on graph states [17]. • AI improvements for QSE: Incorporating reinforcement learning for continuous optimization, fine-tuning LLMs with specific experimental data, or other techniques for greater precision in angle suggestions, complementing invariant estimation methods [1]. • Integration with other frameworks: Exploring the complementarity between QAccCert and proposals such as Qonscious [15] or commercial solutions like Fire Opal [16], as well as resource estimation tools like BenchQ [3] and Rigetti Resource Estimation [4], to create more reliable quantum software ecosystems. • Requirements engineering for quantum systems: Developing methodologies to specify, validate, and verify requirements for hybrid quantum-classical software. • Quality and testing in QSE: Defining quality metrics specific to quantum software and developing automated testing tools. • Containerization and continuous deployment: Facilitating framework adoption through containers, continuous integration, and reproducible environments. •
The current prototype uses UART communication at 115200 baud, with intentional synchronization delays that ensure robust transmission but increase the time per iteration ( 550 ms). It is important to note that this overhead is a characteristic of the instrumentation software, not a limitation of the hardware acceleration: the pure computation time on the FPGA could be less than 1 µs per correlation. In future versions, the UART interface could be replaced with higher-speed alternatives, such as USB 3.0 (up to 5 Gbps) or PCIe (several GB/s), reducing communication overhead and allowing FPGA acceleration to be fully leveraged. For HPC environments or quantum data centers, the integration of FPGAs with highspeed optical interconnects is envisioned, which would enable remote control of quantum experiments with minimal latency and high scalability. This evolution would enable distributed architectures.
VIII. C ONCLUSION The NISQ era demands certification methods that go beyond ideal assumptions. This paper has argued and demonstrated that the principles of classical software engineering are applicable and valuable in the quantum domain as well. Experimentally, we have confirmed that QSE strategies combined with the interoperability of FPGAs and AI models are useful for addressing this challenge in a systematic manner. Specifically, the results obtained validate the three dimensions of the proposed approach: LLM optimization achieves a CHSH violation of S = 2.8267 (99.94% of the theoretical limit), demonstrating its capacity for efficient parameter space exploration; the local perturbation fallback mechanism reduces the required iterations by up to 17%, optimizing convergence speed; and FPGA acceleration projects superior speedups in high-dimensionality scenarios due to parallelization capability. These contributions are complementary and confirm the viability of the hybrid approach, whose integration with HPC infrastructure also enables meeting the scalability requirements inherent to real quantum environments. The main contribution is not the framework itself, but the demonstration that the synergy between hardware acceleration and artificial intelligence, framed within a well-designed software architecture, transforms quantum certification from a theoretical problem into a practical reality. This principle, which is beginning to be explored by multiple initiatives both academic [15] and commercial [16], is extensible to other areas of quantum computing where adaptation to imperfect hardware and computational efficiency are critical. R EFERENCES [1] F. H. Holik and et al., “Group-invariant estimation of symmetric states generated by noisy quantum computers,” Quantum Information Processing, vol. 24, 2024. [Online]. Available: https://api.semanticscholar.org/CorpusID:271903807 [2] N. Quetschlich and et al., “MQT Bench: Benchmarking Software and Design Automation Tools for Quantum Computing,” Quantum, vol. 7, p. 1062, Jul. 2023. [Online]. Available: https://doi.org/10.22331/ q-2023-07-20-1062 [3] Zapata Computing, “Benchq: Quantum benchmarking framework,” https://github.com/zapatacomputing/benchq, 2024, Último acceso: 2026. [4] Rigetti Computing, “Rigetti resource estimation,” https://github.com/ rigetti/rigetti-resource-estimation, 2024, Último acceso: 2026. [5] A. C. Granda Arango and et al., “Distribution of nonlocality on quantum random circuits,” Phys. Rev. A, vol. 112, no. 6, p. 062427, Dec 2025. [Online]. Available: https://link.aps.org/doi/10.1103/PhysRevA. 112.062427 [6] A. K. Mandal and et al., “Quantum software engineering and potential of quantum computing in software engineering research: A review,” Automated Software Engineering, vol. 32, no. 1, p. 27, Mar. 2025. [7] J. M. Murillo and et al., “Quantum software engineering: Roadmap and challenges ahead,” ACM Trans. Softw. Eng. Methodol., vol. 34, no. 5, May 2025. [Online]. Available: https://doi.org/10.1145/3712002 [8] S. Tropea and Proyecto FPGA Libre, “Proyecto kéfir: Kit educativo con fpga, inclusivo y reciclable,” https://fpgalibre.sourceforge.net/Kefir/ index.html, 2017, hardware abierto para FPGA educativas. [9] C. Venegas Arrabé, J. Arroyo, and FPGAwars community, “icestudio: Visual editor for open fpga boards,” https://github.com/FPGAwars/ icestudio, 2025. [10] A. Shehata and et al., “Bridging paradigms: Designing for hpcquantum convergence,” Future Generation Computer Systems, vol. 174, p. 107980, 2026. [Online]. Available: https://www.sciencedirect.com/ science/article/pii/S0167739X25002754
[11] T. Beck and et al., “Integrating quantum computing resources into scientific hpc ecosystems,” Future Generation Computer Systems, vol. 161, pp. 11–25, 2024. [Online]. Available: https://www.sciencedirect. com/science/article/pii/S0167739X24003583 [12] N. Saurabh and et al., “A conceptual architecture for a quantumhpc middleware,” in 2023 IEEE International Conference on Quantum Software (QSW), 2023, pp. 116–127. [13] Aparicio-Morales and et al., “An overview of quantum software engineering in Latin America,” Quantum Information Processing, vol. 23, no. 11, p. 380, Nov. 2024. [14] M. G. Lammers, F. H. Holik, and A. Fernández, “Quantum resource management in the nisq era: Implications and perspectives from software engineering,” 2025. [Online]. Available: https://arxiv.org/abs/2508.05697 [15] ——, “Quantum resource management in the nisq era: Challenges, vision, and a runtime framework,” 2025. [Online]. Available: https://arxiv.org/abs/2508.19276 [16] Q-CTRL, “Fire opal: Automated performance optimization for quantum algorithms,” https://q-ctrl.com/fire-opal, 2025, plataforma comercial para supresión de errores y abstracción de hardware cuántico. [17] S. Anders and et al., “Fast simulation of stabilizer circuits using a graph-state representation,” Phys. Rev. A, vol. 73, no. 2, p. 022334, Feb 2006. [Online]. Available: https://link.aps.org/doi/10.1103/PhysRevA. 73.022334 [18] C. Gidney, “Stim: A fast stabilizer circuit simulator,” 2022. [Online]. Available: https://arxiv.org/abs/2209.07345 [19] Mistral AI Team, A. Jiang, and et al., “Mistral-7b-instruct-v0.2,” https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2, 2023, modelo de lenguaje de 7B parámetros fine-tuned para instrucciones. [20] V. Sanh and et al., “Distilgpt2,” https://huggingface.co/distilbert/ distilgpt2, 2019, versión destilada de GPT-2 (82M parámetros). [21] ——, “Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter,” 2020. [Online]. Available: https://arxiv.org/abs/1910.01108 [22] X. Xu and et al., “A survey on knowledge distillation of large language models,” 2024. [Online]. Available: https://arxiv.org/abs/2402.13116 [23] J.-B. Waring, C. Pere, and S. Le Beux, “Chsh violations using dynamic circuits,” in 2025 IEEE International Conference on Quantum Computing and Engineering (QCE), vol. 01, 2025, pp. 2426–2432. [24] A. Pousa and et al., “Trends in High Performance Computing and Quantum Computing,” Journal of Computer Science and Technology, vol. 24, no. 2, p. e11, Oct. 2024. [25] A. Pousa and V. Sanz, “Desafı́os en la integración de QPUs a sistemas HPC clásicos,” Memoria Investigaciones en Ingenierı́a, no. 27, pp. 238– 247, Dec. 2024.