FORQ: Fortran-to-Quantum Translator and Hybrid Orchestration Layer

Author: Noam Kloos — noam@noam.nl

Definition

FORQ is a Fortran-to-Quantum translator and orchestration layer that automatically offloads selected HPC routines from classical Fortran code to quantum hardware. The Fortran programmer does not need any knowledge of quantum computing; FORQ autonomously determines which parts of the program are suitable for quantum execution and manages the full transport and feedback pipeline.

Architecture

The architecture consists of three primary components:

Ada Analysis Engine

The analysis engine processes Fortran source code and constructs an internal representation. Using static analysis, complexity patterns, and profiling data, code segments are classified as:

PostgreSQL Decision Layer

Analysis results are stored in PostgreSQL. The database acts as the decision-making layer for:

Quantum Translation and Transport Layer

Selected Fortran routines are translated into a quantum IR (e.g., QASM or circuit representations). The transport layer:

Hybrid Feedback

Quantum results are stored in PostgreSQL as:

The original Fortran program retrieves these results through the FORQ runtime API or direct database queries, allowing the classical program to transparently continue with quantum-accelerated results.

Conclusion

FORQ provides a complete pipeline for automatic quantum offloading of Fortran HPC routines. Through Ada analysis, PostgreSQL decision-making, and a standardized transport layer, classical Fortran programs can benefit from hybrid quantum computing without requiring the programmer to understand quantum technology.