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
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.
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.
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.
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-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.
System Architecture

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.
Experiment Highlights
Retained evidence and explicit audit exclusions across simulation, cloud backends, and QPU hardware.
Statevector Simulation
Retained small-instance checks, 3–20 qubits
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.
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.
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.
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
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.
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.
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.
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
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.
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.
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.
Excluded pending reprocessing: the IonQ and Rigetti archives use different denominators and unresolved bit-order conventions, so their reported ratios are not comparable.
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
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.
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.
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.
Selected Figures
Retained diagnostic results; figures tied to excluded analyses are intentionally omitted pending rerun.

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

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 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.
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}
}