Skip to content
PreprintJune 2026

Quantum Hybrid Modules for AI: Attention, Optimization, and Verification on Near-Term Quantum Hardware

A resource-accounting framework for testing quantum subroutines inside classical AI pipelines

Vikram Lex

Quantum Machine Intelligence (Springer Nature) · Under Review · CC BY 4.0

Quantum ComputingExploratory Research
3
Conditional Modules
Overlap retrieval, QAOA optimization, and Grover verification
100
Largest QPU Run
Qubits in descriptive Rigetti p=1 QAOA jobs
4
Evidence Tiers
Statevector, cloud, QPU, and GPU studies
None
Quantum Advantage
No near-term or end-to-end advantage demonstrated
Corrected manuscript summary

Paper Summary

We develop Quantum Hybrid Modules (QHM) as an accounting framework for placing quantum subroutines inside classical AI pipelines while making data access, oracle construction, measurement, and readout costs explicit. The framework considers three conditional modules: thresholded query–key retrieval using coherent overlap estimation, QAOA for discrete subproblems, and Grover search for counterexamples to symbolic constraints. For sparse attention, the often-quoted O(√(n/k)) Grover cost finds one of k marked keys; returning all k keys requires Θ(√(nk)) overlap-oracle calls per query, plus Ω(k) output and aggregation work. We evaluate small instances using statevector and GPU simulation, cloud emulators, and Rigetti Cepheus and IonQ Forte hardware. The reproducible evidence is diagnostic rather than advantageous: exact quantum kernels and hybrid variational layers do not beat tuned classical surrogates on the tested tasks; selected QAOA simulations produce good expected cuts but do not outperform the Goemans–Williamson algorithm; idealized Grover experiments recover the expected oracle-query scaling only when a reversible predicate oracle is assumed; and shallow hardware overlap circuits retain biased signal while routed superconducting QAOA cost observables approach their random baselines. A source-and-artifact audit excludes cross-provider QAOA ratio comparisons and several exploratory attention, verification-loop, retrieval, and post-hoc mitigation analyses whose stored implementations use inconsistent metrics or do not implement the claimed primitive. No end-to-end or near-term quantum advantage is demonstrated. The main contribution is a set of corrected resource conditions and empirical failure modes that future quantum-AI module claims must satisfy.

Framework

Three Quantum Modules

Each module targets a specific computational pattern, but any resource reduction is conditional on explicit data-access, oracle, output, and fault-tolerance assumptions.

HQSA

Hadamard Quantum Self-Attention

Estimates normalized query–key overlaps. Finding one of k marked keys costs O(√(n/k)) overlap-oracle calls, while returning all k costs Θ(√(nk)) per query plus output and aggregation work. These bounds require coherent qRAM, a reversible threshold oracle, and fault-tolerant estimation.

QAOA Module

Quantum Approximate Optimization Algorithm

Targets discrete routing or assignment subproblems. Selected simulations produce good expected cuts, but they do not outperform an implemented Goemans–Williamson solver; the retained hardware measurements are diagnostic rather than evidence of speedup.

Grover Verification

Grover-Accelerated Constraint Checking

Provides Θ(√(N/k)) supplied-oracle query scaling for finding one of k violations only when an efficient reversible predicate exists. The experiments do not implement a reversible neural predicate, unknown-solution certification, or an end-to-end verifier.

Architecture

System Architecture

QHM accounting framework showing a classical model calling a conditional quantum module

QHM architecture: a classical model invokes a quantum module only when data access, circuit execution, readout, and post-processing costs can be accounted for end to end.

Experiments

Experiment Highlights

Retained evidence and explicit audit exclusions across simulation, cloud backends, and QPU hardware.

Statevector Simulation

Retained small-instance checks, 3–20 qubits

Quantum Kernel Classification4–8q

At 8 qubits, the ZZ-feature-map SVM reaches 0.617 accuracy versus 0.967 for a linear SVM. The sampled linear-kernel comparator is a classical surrogate, not a Tang dequantization algorithm.

QAOA MAX-CUT8–20q

At p=3, selected expected-cut ratios are 0.889–0.966. Values above 0.878 do not show that QAOA beats the Goemans–Williamson algorithm, whose 0.878 value is a worst-case guarantee.

State-Preparation Consistency3–6q

Normalized statevector overlaps match cosine similarity to machine precision. This validates encoding only; the original Method 2 Hadamard circuit and its fidelity claims are excluded because it estimated the wrong quantity.

Supplied-Oracle Grover Search4–20q

Ideal counters reproduce Θ(√N) versus Θ(N) scaling for one planted marked state. The 652× ratio at 20 qubits is an oracle-query ratio, not measured runtime or end-to-end speedup.

Cloud Simulators & Emulators

Azure Quantum and Amazon Braket, 2–8 qubits

Core Circuit Checks2–5q

The IonQ noiseless simulator gives sub-1% errors for the submitted metrics; the Rigetti QVM shows larger backend-dependent deviations. These are simulator and QVM checks, not QPU evidence.

Scaled QAOA + Kernel6–8q

For the archived cloud runs, 8-qubit QAOA p=3 errors are 0.112 on the IonQ simulator and 0.010 on the Rigetti QVM; the 6-qubit kernel-overlap errors remain small.

Quantinuum H2-1E Emulator2–8q

The noisy emulator gives absolute metric deviations of 0.041–0.153, with 2–3% relative deviations for shallow QAOA. It models hardware noise but is not a physical QPU run.

Grover on AWS SV14–6q

AWS SV1 success probabilities match the ideal Grover optimum within shot noise. This is a cloud-simulator validation of supplied-oracle algebra.

QPU Hardware

Rigetti Cepheus and IonQ Forte measurements

Kernel Overlaps on Cepheus4q

The archived 10-sample overlap matrix is descriptive. Its diagonal was fixed to one and no matched simulator matrix or reproducible classifier evaluation is available.

QAOA on Rigetti Cepheus8–100q

Across 43 submissions, the mean edge-cut fraction is 0.489 ± 0.009, near the graph-independent 0.5 baseline. This shows loss of cost signal, not proof of full-state depolarization.

Hadamard Test on Cepheus3q

A corrected controlled-Uq†Uk construction retains biased but reproducible overlap signal. More shots reduce sampling variance but do not remove the systematic hardware bias.

Cross-Provider QAOA Comparison8–30q

Excluded pending reprocessing: the IonQ and Rigetti archives use different denominators and unresolved bit-order conventions, so their reported ratios are not comparable.

Kernel Overlaps on IonQ Forte4q

Only 18 of 45 off-diagonal entries were measured. The incomplete matrix is descriptive and cannot support a positive-semidefinite kernel analysis, classifier, or controlled cross-platform conclusion.

GPU-Accelerated Studies

Classical simulation on NVIDIA A100, 3–100 qubits

Hybrid Classical–Quantum Pipeline10q

Single-run hybrid models add substantial training cost without a consistent accuracy gain over classical and Fourier-feature controls. Repeated seeds are required for architecture comparisons.

GPU-Scaled QAOA24q

Exhaustive enumeration gives OPT=32. The best stored expected cut is 28.40, so the corrected p=4 ratio is 0.8875—not 0.916—and it does not establish superiority over Goemans–Williamson.

Experiments 18–22: Audit Exclusions3–100q

Excluded pending definition-matched reruns: the archives contain a feature-map mismatch, QAOA sign/endianness error, raw-dot-product versus cosine mismatch, exhaustive oracle construction with an unfair baseline, and post-hoc bitstring perturbation mislabeled as ZNE.

Results

Selected Figures

Retained diagnostic results; figures tied to excluded analyses are intentionally omitted pending rerun.

QHM data-flow accounting from classical input through quantum execution and classical post-processing

End-to-end accounting includes encoding, circuit execution, measurement, and classical post-processing; isolated oracle or gate counts are not runtime claims.

Conditional quantum-neurosymbolic verification loop using a supplied reversible predicate

Oracle-level verification loop. Grover search reduces predicate calls only if the neural and symbolic constraints can be implemented as an efficient reversible oracle; that oracle is not implemented in the current experiments.

Rigetti Cepheus QAOA cost observable near the random edge-cut baseline

Rigetti Cepheus QAOA p=1 jobs from 8–100 qubits: the retained cost observable clusters near the 0.5 edge-fraction baseline while noiseless simulation is above baseline. The observable alone does not identify the physical failure mechanism.

Citation

Cite This Paper

@article{lex2026qhm,
  title={Quantum Hybrid Modules for {AI}: Attention, Optimization, and
         Verification on Near-Term Quantum Hardware},
  author={Lex, Vikram},
  year={2026},
  month={6},
  journal={Research Square},
  publisher={Research Square},
  doi={10.21203/rs.3.rs-9825475/v1},
  note={Public preprint, version 1. A corrected author manuscript has been
        prepared for the Quantum Machine Intelligence editorial office},
  url={https://doi.org/10.21203/rs.3.rs-9825475/v1}
}