Manuscript Offprint

arXiv:2609.30914

Cross-Backend QIEO: Universal Runtime Portability across OpenMP5, CUDA, HIP, and Multi-Language Interfaces

Aman Mittal, Ferdin Sagai Don Bosco, Kasturi Venkata Srikanth, Abhishek Singh, Aditya Singh, Abhishek Chopra

Aman Mittal

BQP

Bengaluru, India

aman.mittal@bqpsim.com

Ferdin Sagai Don Bosco

BQP

Bengaluru, India

ferdindon@bqpsim.com

Kasturi Venkata Srikanth

BQP

Bengaluru, India

kasturi.srikanth@bqpsim.com

Abhishek Singh

BQP

Bengaluru, India

abhishek.singh@bqpsim.com

Aditya Singh

BQP

Bengaluru, India

singh.aditya@bqpsim.com

Abhishek Chopra

BQP

Bengaluru, India

abhishekchopra@bqpsim.com

Abstract—Quantum-inspired algorithms emulate quantum mechanical principles, such as, superposition, interference, and probabilistic amplitude evolution, on classical hardware by representing candidate solutions as qubit vectors and evolving them through rotation-gate operators. This approach offers higher optimization performance without physical qubits, and has been shown to achieve order-of-magnitude speedups (10–80×) over traditional solvers on combinatorial, high-dimensional NP-hard problems.

A critical barrier to adoption, however, is the lack of a unified execution framework that delivers both algorithmic performance and hardware portability. We present Cross-Backend Quantum Inspired Evolutionary Optimizer (QIEO), the runtime core of BQP's BQPhy ®^{\circledR} QuantumNOW TM^{TM} solver, which addresses this gap through a single-source-of-truth architecture. One C++ implementation of the QIEO algorithm is compiled once per hardware target and exposed to multiple high-level languages via thin binding layers. The framework dispatches to CPU (sequential), OpenMP 5 (multi-core), CUDA (NVIDIA), and HIP (AMD) backends at runtime, adapting kernels to each device's memory hierarchy and warp/wavefront execution model.

Multi-language accessibility is provided through a header-only C++ library, a Python wheel (via pybind11), a MATLAB toolbox (via the MEX API), and a Julia package (via CxxWrap), making the solver immediately usable across HPC, machine learning, scientific computing, and industrial simulation workflows. Experimental results demonstrate up to 72× speedup over a sequential CPU baseline on large-scale benchmark problems, with negligible cross-language interface overhead (<1.2%).

The framework’s real-world utility is validated through binding demonstrations that share the identical C++ runtime. BQ-Phy’s Python library is demonstrated on a neural network hyperparameter optimisation (Python API, PyTorch) achieving 88.60% test accuracy on MNIST. BQPhy’s MATLAB’s Toolkit is tested on wind farm layout optimisation attaining 365 399±4 552365\,399 \pm 4\,552 MWh/yr, which is statistically indistinguishable from particle swarm optimisation and +7.6% above genetic algorithms on a 32-variable constrained engineering problem. The Julia package tackles the Lotka–Volterra parameter estimation where BQPhy replaces native Julia solvers (Optim.jl, BlackBoxOptim.jl, CMAEvolutionStrategy.jl) on the same residual, cutting mean SSE by 2.1×2.1\times versus Optim.NelderMead.

Index Terms—quantum-inspired evolutionary optimization, heterogeneous computing, performance portability, OpenMP, CUDA, HIP, multi-language interface, Julia, CxxWrap, Lotka–Volterra, hardware abstraction layer, single source of truth

I. INTRODUCTION

Quantum computing promises transformational advances for combinatorial, high-dimensional optimization; yet fault-tolerant, large-scale quantum hardware remains an open engineering challenge [2]. Quantum-Inspired Evolutionary Algorithms(QIEAs) bridge this gap by transplanting quantum mechanical principles, such as, qubit representation, superposition, and rotation-gate updates [1], onto classical HPC, achieving superior convergence characteristics relative to classical metaheuristics without requiring physical qubits.

Despite algorithmic maturity, a critical bottleneck persists, namely, efficient and portable execution across heterogeneous computing architectures. Modern HPC clusters are inherently heterogeneous, pairing multi-core CPUs with GPU accelerators from multiple vendors. Targeting these systems requires navigating disjoint programming ecosystems: OpenMP for shared-memory CPU parallelism [7], CUDA for NVIDIA GPUs [3], and HIP for AMD devices [8]. Each platform exposes distinct execution models, memory hierarchies, and concurrency primitives, forcing practitioners to maintain vendor-specific codebases that erode both portability and maintainability.

General-purpose performance-portability frameworks such as Kokkos [4] and RAJA [5] partially address this challenge by abstracting parallel execution and memory management. However, they are designed for generic numerical workloads and do not incorporate domain-specific optimizations for quantum-inspired computation, namely probabilistic qubit state updates, trigonometric rotation operators, and population-level synchronization barriers. Similarly, SYCL [6] offers a single-source C++ model for heterogeneous systems but provides no algorithmic scaffolding for Quantum Inspired Evolutionary Optimizer (QIEO) primitives.

This work makes the following novel contributions:

• Unified QIEO Runtime: The first backend-agnostic execution framework specifically designed for quantum-inspired evolutionary optimization, supporting CPU, OpenMP 5, CUDA, and HIP from a single algorithmic source.

• Algorithm–Architecture Co-Design: A disciplined separation of QIEO algorithmic phases, namely Quantum Information Processing(QIP), Fitness Evaluation(FE), Classical Information Processing(CIP), from hardware-specific kernel specializations, enabling near-native performance on each target without modifying core logic.

• Single-Source-of-Truth Binding Architecture: A lightweight, layered binding design that exposes the identical C++ runtime to Python (pybind11 [9]), MATLAB (MEX API), and Julia (CxxWrap [11]) with <1.2% measured interface overhead on the Python and MATLAB paths, eliminating per-language re-implementation.

• Comprehensive Evaluation: Benchmarks across diverse hardware and problem scales demonstrating up to 72×72\times speedup over sequential baselines, with portability validated on NVIDIA(V100, A100) and AMD (MI300X) GPUs.

• Real-World Multi-Language Validation: Application-level demonstrations using the identical C++ runtime, covering, neural network hyperparameter optimisation (Python/PyTorch), wind farm layout optimisation (MATLAB/Global Optimization Toolbox), and Lotka–Volterra parameter estimation (Julia/CxxWrap) against the Julia packages practitioners already use, confirming that the single-source-of-truth architecture delivers competitive performance against domain-specific baselines without per-language re-implementation.

The remainder of this paper is organized as follows. Section II surveys related work. Section III presents the system architecture. Section IV reports benchmark results. Section V reports results for various applications. Section VII concludes. Appendix A lists equivalent Rastrigin drivers in C++, Python, MATLAB, and Julia. Appendix B lists the Python hyperparameter-optimisation, MATLAB wind-farm, and Julia Lotka–Volterra drivers.

References (77)