FORQ: A Deterministic Quantum Offloading Framework for Fortran HPC Systems

Author: Noam Kloos
Email: noam@noam.nl

Abstract

FORQ is a deterministic quantum offloading framework designed for Fortran programmers who wish to leverage quantum computing without requiring knowledge of quantum programming languages such as QASM or Qizbit. The system introduces Qlean, a deterministic filtering mechanism that activates quantum functionality only when it provides objective computational benefit. FORQ integrates classical HPC workloads with asynchronous quantum execution using SQL-based synchronization, enabling fire-and-forget quantum dispatching while maintaining full determinism in the Fortran control flow. This paper presents the architecture, execution model, and rationale behind FORQ within modern HPC environments.

1. Introduction

Quantum computing offers significant advantages for specific classes of problems, particularly in numerical simulation, optimization, and probabilistic modeling. Fortran remains dominant in high-performance computing (HPC), making it a natural candidate for quantum acceleration. However, quantum programming languages introduce complexity that is unnecessary for most Fortran developers.

FORQ addresses this gap by providing a deterministic, filter-driven quantum offloading layer that integrates seamlessly with existing Fortran codebases. The system ensures that quantum resources are used only when beneficial, while classical workloads remain within the Fortran execution environment.

2. System Overview

FORQ consists of four primary subsystems:

  1. FORQ Core: Manages fire-and-forget quantum dispatching, asynchronous rendezvous handling, and SQL-based result synchronization.
  2. Qlean Filter Engine: Determines whether a given Fortran workload is suitable for quantum acceleration using deterministic profiling and SQL-based code analysis.
  3. Quantum Execution Layer: Generates QASM elements, compiles them via Qizbit, and dispatches them to quantum backends in batch or real-time mode.
  4. Fortran Integration Layer: Provides APIs for dispatching quantum tasks, retrieving results, and triggering follow-up modules based on SQL events.

3. Deterministic Filtering with Qlean

Qlean is responsible for deciding whether quantum execution is appropriate. It performs:

Qlean never uses heuristics or probabilistic decision-making. Its filtering logic is fully deterministic, ensuring reproducibility across HPC environments.

4. Asynchronous Quantum Execution

Quantum operations often incur latency or operate in batch mode. FORQ therefore adopts an asynchronous execution model:

  1. Fortran dispatches a quantum task via FORQ.
  2. FORQ immediately returns control to the Fortran program.
  3. The quantum backend processes the task asynchronously.
  4. Results are written to SQL tables.
  5. SQL triggers notify FORQ that results are available.
  6. Follow-up Fortran modules retrieve the results and continue execution.

This model eliminates rendezvous waiting and ensures that Fortran programs remain responsive and deterministic.

5. Fire-and-Forget Execution Model

The fire-and-forget model allows Fortran programs to continue execution without blocking on quantum results. This is essential for HPC workloads where parallelism and throughput are critical.

FORQ guarantees:

6. SQL Synchronization Layer

SQL serves as the backbone for synchronization between classical and quantum execution. It provides:

This design ensures that FORQ remains backend-agnostic and scalable across distributed HPC environments.

7. Conclusion

FORQ provides a deterministic, practical, and scalable approach to integrating quantum computing into Fortran-based HPC systems. By abstracting quantum complexity and introducing Qlean as a deterministic filter, FORQ empowers Fortran developers to benefit from quantum acceleration without requiring specialized knowledge of quantum programming languages.

The fire-and-forget execution model and SQL-based synchronization ensure that quantum operations integrate seamlessly with classical workflows, making FORQ a robust foundation for future HPC-quantum hybrid architectures.