---
title: QAOAEmbedding Models
url: https://www.emergentmind.com/topics/qaoaembedding-models
type: topic
---

# QAOAEmbedding Models

Searching arXiv for the cited QAOAEmbedding and related QAOA embedding papers to ground the article in current literature.
arxiv_search(query="QAOAEmbedding quantum metric learning QAOA-GPT FEATHER parameter transferability MLQAOA", max_results=10, sort_by="relevance")
In current arXiv literature, **QAOAEmbedding models** do not denote a single architecture. The term covers, first, a variational feature map in which classical data are embedded into quantum states by a QAOA-style circuit, and, second, a broader class of embedding-augmented QAOA workflows in which graphs, hypergraphs, or QAOA sample statistics are embedded into auxiliary representations used for parameter transfer, multilevel refinement, generative circuit synthesis, or reduced-dimension optimization. Across these formulations, the common operation is the construction of an embedding that conditions either the quantum state preparation itself or the classical procedure that selects QAOA circuits and parameters [2603.28687][2401.06655][2511.07391][2606.07814][2404.14399].

## 1. Formal setting and scope

The common substrate is the standard depth-$p$ QAOA ansatz
\[
|\psi(\boldsymbol\gamma,\boldsymbol\beta)\rangle
= U_B(\beta_p)\,U_C(\gamma_p)\,\cdots\,U_B(\beta_1)\,U_C(\gamma_1)\;|+\rangle^{\otimes n},
\]
with
\[
U_C(\gamma)=e^{-i\gamma H_C}, \qquad U_B(\beta)=e^{-i\beta H_M}.
\]
For MaxCut on an unweighted graph $G=(V,E)$, the cost operator is
\[
H_C = \sum_{\langle i,j\rangle\in E} \tfrac12\bigl(I - \sigma^z_i\,\sigma^z_j\bigr),
\]
and the objective is to maximize
\[
C(\boldsymbol\gamma,\boldsymbol\beta)
= \langle \psi(\boldsymbol\gamma,\boldsymbol\beta)\,|\,H_C\,|\,\psi(\boldsymbol\gamma,\boldsymbol\beta)\rangle
\]
[2401.06655].

Within that formal setting, the cited literature uses embeddings for distinct purposes rather than as a single canonical layer. A recurrent source of ambiguity is that **QAOAEmbedding** in PennyLane refers to an input-dependent variational feature map, whereas graph-representation and subspace-compression papers use embeddings as classical surrogates for instance similarity or parameter-search geometry. The underlying connection is methodological rather than architectural.

| Model family | Embedded object | Role in QAOA |
|---|---|---|
| PennyLane QAOAEmbedding | Classical feature vector $x$ | Variational feature map for quantum metric learning |
| Graph-embedding transfer pipeline | Whole graph $G$ | Nearest-neighbor donor selection for $(\gamma,\beta)$ transfer |
| FEATHER$\rightarrow$QAOA-GPT | Problem hypergraph / Hamiltonian coefficients | One-shot generation of circuits and variational angles |
| HGLE | Weighted Ising feature matrix from QAOA samples | Reduced-dimension parameter estimation |
| MLQAOA spectral accelerator | Fiedler-vector representation of a subproblem graph | Initialization inside multilevel QAOA |

## 2. Variational feature maps in quantum metric learning

In the PennyLane usage, the QAOAEmbedding ansatz is built by alternating **phase-separation** unitaries that depend on the classical input with **mixer** unitaries that are trainable but input-independent. For an $n$-qubit register and $L$ layers,
\[
U_{\mathrm{QAOA}}(x;\gamma,\beta)
=\prod_{\ell=1}^{L}\Bigl\{e^{-\,i\,\beta_\ell\,H_M}\;e^{-\,i\,\gamma_\ell\,H_C(x)}\Bigr\},
\]
with
\[
H_C(x)=\sum_{j=1}^{n}x_j Z_j,\qquad H_M=\sum_{j=1}^{n}X_j.
\]
Layer $\ell$ therefore applies
\[
U_{C,\ell}(x)=\exp\!\Bigl(-i\,\gamma_\ell\sum_{j=1}^d x_j Z_j\Bigr)
=\bigotimes_{j=1}^d R_z\bigl(2\gamma_\ell x_j\bigr),
\]
followed by
\[
U_{M,\ell}=\exp\!\Bigl(-i\,\beta_\ell\sum_{j=1}^n X_j\Bigr)
=\bigotimes_{j=1}^n R_x(2\beta_\ell).
\]
The final embedded state is
\[
\ket{\psi(x;\gamma,\beta)}=U_{\mathrm{QAOA}}(x;\gamma,\beta)\ket{0}^{\otimes n}
\]
[2603.28687].

Training is formulated as quantum metric learning. Given two classes of embedded states,
\[
\rho=\tfrac1{|A|}\sum_{i\in A}\ket{\psi_i}\!\bra{\psi_i},
\qquad
\sigma=\tfrac1{|B|}\sum_{j\in B}\ket{\phi_j}\!\bra{\phi_j},
\]
the PennyLane QAOAEmbedding training uses
\[
C(\theta)=1-\frac12\bigl[-2\,\mathrm{tr}(\rho\sigma)+\mathrm{tr}(\rho^2)+\mathrm{tr}(\sigma^2)\bigr].
\]
Because
\[
\mathrm{tr}(\rho^2)+\mathrm{tr}(\sigma^2)-2\,\mathrm{tr}(\rho\sigma)=D_{\mathrm{hs}}(\rho,\sigma)^2,
\]
minimizing $C$ is equivalent to maximizing the Hilbert–Schmidt separation. The terms $\mathrm{tr}(\rho\sigma)$, $\mathrm{tr}(\rho^2)$, and $\mathrm{tr}(\sigma^2)$ are estimated via repeated SWAP-test circuits, and the parameters are updated by a classical optimizer; the authors used RMSProp with learning rate $0.01$.

The same paper frames verification as a black-box audit problem. The verifier is restricted to basic measurements and has no knowledge of the prover’s implementation details, including the structure of the model, its parameters, or the prover measurement setup. The separation metric is the Bures angle, reducing in the pure-state limit to
\[
\theta_{ij}=\arccos\!\bigl|\langle\psi_i|\phi_j\rangle\bigr|.
\]
In practice, measurements in the three mutually unbiased bases $\{Z,X,Y\}$ are used to reconstruct Bloch vectors and estimate angular separation. In experiments with a claimed angle $\theta^*=0.3\pi$, the verifier recovered estimates $\hat\Theta$ satisfying $|\hat\Theta-0.3\pi|<0.02\pi$ for $N\ge 50$ shots per basis; the RMSE fell like $O(1/\sqrt N)$, the inter-class fidelity $\mathcal F(\rho,\sigma)$ was pushed below $10^{-3}$, and under depolarizing noise with $p\approx 0.02$ per gate the achieved angle dropped by less than $0.02\pi$. The paper notes that similar QAOAEmbedding circuits typically yield $\gtrsim 95\%$ accuracy on two-class benchmarks, although classification accuracy is not its direct focus [2603.28687].

## 3. Graph-embedding models for parameter transferability

A second lineage embeds the **problem graph** rather than the data vector. The objective is donor selection for QAOA parameter transferability: from a library $\{G_j,f(G_j),\boldsymbol\gamma_j,\boldsymbol\beta_j\}_{j=1}^N$, compute the embedding of a new acceptor graph $A$, then choose
\[
j^*=\underset{j}{\arg\min}\;\|f(A)-f(G_j)\|_2
\]
or, equivalently in some experiments, maximize cosine similarity, and transfer
\[
\boldsymbol\gamma^A\leftarrow\boldsymbol\gamma^{\,j^*},\qquad
\boldsymbol\beta^A\leftarrow\boldsymbol\beta^{\,j^*}.
\]
An optional local classical refinement step can then be applied [2401.06655].

Five unsupervised graph embedding methods are compared. **Graph2Vec** learns $f(G)\in\mathbb R^{128}$ via a SkipGram-style objective on rooted subgraphs; **GL2Vec** concatenates a Graph2Vec embedding of $G$ with that of the line graph $L(G)$; **Wavelet Characteristic** uses diffusion wavelet traces $\frac1n\mathrm{Tr}\,W(t_k)$; **Spectral Features** uses the smallest nonzero Laplacian eigenvalues; and **FEATHER** uses random-walk characteristic functions
\[
\phi_r(t)=\frac1n\sum_{v=1}^n \exp\bigl(i\,t\,h_r(v)\bigr)
\]
stacked across sampled radii and frequencies. The paper relates transferability to lightcones and node-parity $\pi_G$, the fraction of nodes of even degree, and argues that subgraph counts and parity strongly correlate with clusters of optimal $\{\gamma,\beta\}$.

The experimental setting includes random Erdős–Rényi graphs of sizes $40,50,\dots,100$, random $k$-regular graphs with $k=3,4$, and Watts–Strogatz small-world graphs with rewiring $p=0.1$. Graph2Vec reliably picks donors whose transferred approximation ratio lies within $\lesssim 2\%$ of the native optimum, even across graph families. The empirical ranking is
\[
\text{Graph2Vec} \approx \text{GL2Vec} \gg \text{FEATHER} > \text{Wavelet} \gg \text{SF} \approx \text{ELRUNA}.
\]
On 20-node state-vector simulations, a native 1 000-step COBYLA run takes 3–4 h and yields $r\sim 0.85$, whereas transfer with 0 optimization steps takes $\approx 40$ s and yields $r\sim 0.75$ (approximately $200\times$ faster), and transfer with 10 refinement steps takes $\approx 6$ min and yields $r\sim 0.83$ (approximately $50\times$ faster). At depth $p=10$, transfer still yields $r$ within $3$–$5\%$ of native on a 4 500 four-node training set.

The same study reports that warm-starts empirically avoid barren plateaus by placing QAOA in a region of parameter space with non-vanishing gradient. Noise robustness is evaluated on IBM Guadalupe (14-qubit) and Auckland (27-qubit) mock backends, with scale factors $\{0.5,1.0,2.0\}$ applied to gate and readout error rates. For 1 000 random 14-node instances, the mean absolute energy error satisfies $\Delta E\le 2$ and the mean relative error satisfies $\Delta E/|E_{\rm ideal}|\le 0.15$; error grows gently with scale factor, and Auckland slightly outperforms Guadalupe [2401.06655].

## 4. FEATHER-conditioned generative models and higher-order Hamiltonians

The paper extending QAOA-GPT to higher-order optimization problems embeds a **problem hypergraph** and uses the embedding to condition a decoder-only transformer that outputs an adaptive QAOA-like circuit. The starting object is
\[
G=(V,E,H),
\]
where $E\subseteq V\times V$ and $H=\{(i,j,k)\}$ is the set of cubic hyperedges. FEATHER defines a mapping $\phi:G\to\mathbb R^d$ by computing node-level characteristic functions and pooling. For node $u$ and walk length $r$,
\[
\phi_u(\theta,r)=\sum_{w\in V} (\hat A^r)_{u,w}\,e^{i\theta x_w},
\]
where $\hat A=D^{-1}A$ is the random-walk normalized adjacency, $x_w$ is a node attribute, and $\theta$ is a sampled frequency. Averaging over sampled walk lengths and frequencies, concatenating local degree and hyperedge-count features, and mean-pooling over nodes produces an isomorphism-invariant graph embedding $e_G\in\mathbb R^d$ [2511.07391].

The architecture is a decoder-only transformer, described as nanoGPT style, with $L$ layers, $H$ attention heads, and hidden dimension $D$. Inputs are token sequences combining graph tokens and circuit tokens. The graph tokens encode Hamiltonian coefficients $(d_v,d_{ij},d_{ijk})$, each rounded to two decimals and discretized into a small vocabulary. The circuit tokens encode operator indices $o_k\in \text{pool }A$ and discretized angles $\beta_k,\gamma_k$. The graph embedding $e_G$ is added or concatenated to each token embedding at every layer, and the output head is a linear plus softmax projection to the joint token vocabulary. Autoregressive decoding yields
\[
[(g_1,\theta_1),(g_2,\theta_2),\dots,(g_p,\theta_p)],
\]
where $g_t$ is a QAOA operator such as $Z_iZ_jZ_k$ or $X_i$ and $\theta_t$ is the corresponding angle.

The higher-order target Hamiltonian is
\[
H_C = \sum_i h_i Z_i + \sum_{i<j} J_{ij} Z_iZ_j + \sum_{i<j<k} K_{ijk} Z_iZ_jZ_k.
\]
Cubic interactions are incorporated into FEATHER by appending hyperedge-weight information to node features or by promoting each triple to a 3-clique in the adjacency before normalization. The operator pool contains
\[
U_C^{(2)}(i,j)=e^{-i\gamma Z_iZ_j},\qquad
U_C^{(3)}(i,j,k)=e^{-i\gamma Z_iZ_jZ_k},
\]
along with mixer unitaries
\[
U_M^{(1)}(i)=e^{-i\beta X_i}.
\]
Conditioned on the FEATHER embedding, the model learns to select and sequence these operators adaptively.

Training data are generated with ADAPT-QAOA for random spin-glass instances with $h_i,J_{ij},K_{ijk}\in\{\pm 1\}$ on heavy-hex hardware topology. The experiments use $n=8$ and $n=16$ qubits, with reference circuits up to depth $p_{\max}=15$ or $5$ achieving $\alpha\ge 0.87$. The dataset contains approximately 1 000 instances for each size and 10 circuit variants per instance, yielding approximately 10 000 paired examples. The primary loss is the autoregressive cross-entropy
\[
L_{\mathrm{CE}}=-\sum_{t=1}^{T}\log P(u_t^*\mid u_{<t},e_G),
\]
and the validation metric is the approximation ratio
\[
\alpha=\frac{|\langle\psi(\gamma,\beta)|H_C|\psi(\gamma,\beta)\rangle|}{|E_{\mathrm{opt}}|}.
\]
The reported hyperparameters are batch size $32$, learning rate $5\times 10^{-4}$ with linear warmup over the first 500 steps and cosine decay to 0, AdamW with $(\beta_1,\beta_2)=(0.9,0.95)$ and weight decay $0.01$, and a 90%/10% train/validation split.

At inference time, the model produces a complete variational circuit in a single forward pass, eliminating the iterative classical loop and reducing wall-clock from hours in ADAPT-QAOA to milliseconds. For 16-qubit instances at $p_{\max}=15$, the mean approximation ratio is $0.9496\pm 0.0305$ and the best-of-10 value is $0.9614\pm 0.0281$. The learned parameter distributions remain structured across depths: $\gamma$ angles cluster near $0.3$ rad with monotonic decay per layer, and $\beta$ angles cluster near $3.0$ rad with smooth oscillations. The paper presents this as evidence that QAOA-GPT generalizes to higher-order cost Hamiltonians and complex energy landscapes, and it further states that the same FEATHER$\rightarrow$GPT pipeline can be adapted to QUBO, higher-order interactions such as quartic terms, and constraint encodings [2511.07391].

## 5. Hamiltonian-guided leverage embeddings

The Hamiltonian-Guided Leverage Embedding (HGLE) model addresses a different bottleneck: the classical estimation of QAOA parameters from noisy sample data. Here the embedded object is a **weighted Ising feature matrix** built from QAOA measurement samples. For a graph $G=(V,E)$ on $n$ qubits with local fields $h_i$ and couplings $J_{ij}$, define
\[
\phi(s)=[1;\,s_1;\dots;s_n;\,\{s_i s_j\}_{(i,j)\in E}]^\top\in\mathbb R^d,
\qquad d=1+n+|E|,
\]
so that
\[
E(s)=\sum_i h_i s_i+\sum_{(i,j)\in E}J_{ij}s_i s_j = c^\top\phi(s).
\]
From $N$ QAOA shots $s^{(t)}$ with nonnegative weights $w_t$ summing to 1, the weighted feature matrix $A\in\mathbb R^{N\times d}$ is defined row-wise by
\[
A_{t,k}=\sqrt{w_t}\,\phi_k(s^{(t)}).
\]
The weights may be uniform, $w_t=1/N$, or Boltzmann-type, $w_t\propto \exp[-\tau(E^{(t)}-E_{\min})]$ [2606.07814].

HGLE then compresses $A$ using leverage-score row sampling. If $a_i^\top$ is the $i$th row of $A$, the exact row leverage score is
\[
\ell_i=a_i^\top (A^\top A)^+ a_i.
\]
Equivalently, if $A=U\Sigma V^\top$ and $U_r$ contains the top-$r$ left singular vectors, then
\[
\ell_i=\|(U_r)_{i,:}\|_2^2,\qquad p_i=\ell_i/r.
\]
With target rank $r$, distortion $\epsilon$, and failure probability $\delta$, the algorithm samples
\[
m=O\!\left(\frac{r\log(r/\delta)}{\epsilon^2}\right)
\]
rows with replacement, rescales them by $1/\sqrt{mp_t}$, and returns the compressed matrix $\tilde A=SA$. The stated intuition is that rows with large leverage scores have disproportionately high influence on the best rank-$r$ approximation and should be sampled more heavily to preserve subspace geometry.

The compressed representation drives a classical trust-region loop for estimating $(\gamma,\beta)$. Let $V_r$ be the right singular vectors of $A$ or $\tilde A$, and project the Hamiltonian coefficients via
\[
c_r=V_r(V_r^\top c).
\]
For a sample $s$, define the projected feature
\[
z(s)=V_r^\top\phi(s),
\]
and the rank-$r$ surrogate energy
\[
E_r(s)=c_r^\top\phi(s)=(V_r^\top c)^\top z(s).
\]
The empirical surrogate objective at parameters $\theta=(\gamma,\beta)$ is
\[
F_r(\theta)=\sum_t w_t E_r(s^{(t)}(\theta)).
\]
The trust-region loop probes $q+1$ points inside a ball $\|\Delta\|_2\le \rho_k$, fits a local quadratic model
\[
m_k(\Delta)=a_k+g_k^\top\Delta+\tfrac12\Delta^\top B_k\Delta,
\]
solves the constrained subproblem, and adjusts the radius according to standard trust-region rules.

Theoretical guarantees are stated in two layers. First, a Drineas–Mahoney style theorem gives subspace embedding and rank preservation: if
\[
m \ge C\cdot\frac{r\log(r/\delta)}{\epsilon^2},
\]
then with probability at least $1-\delta$,
\[
(1-\epsilon)\|U_r x\|_2^2 \le \|S U_r x\|_2^2 \le (1+\epsilon)\|U_r x\|_2^2
\]
for all $x\in\mathbb R^r$, implying $\operatorname{rank}(SA_r)=r$. Second, defining
\[
\kappa_r=\frac{\|(I-V_rV_r^\top)c\|_2}{\|c\|_2},
\]
the master inequality yields
\[
|E(s)-E_r(s)|\le \kappa_r\|c\|_2\|\phi(s)\|_2,
\qquad
|F(\theta)-F_r(\theta)|\le \kappa_r\|c\|_2\|\bar\phi(\theta)\|_2,
\]
and hence
\[
|\langle H_C\rangle(\theta)-F_r(\theta)|\le \delta:=\kappa_r\|c\|_2\sqrt d.
\]

Empirically, HGLE is evaluated on 150+ HamLib instances: Max-Cut on 5–18 qubits, MIS on 6–16 qubits, edge densities from 0.33 to 0.85, and 150 shots per evaluation. Average approximation ratios improve from 0.9831 to 1.0000 for Max-Cut with L-BFGS-B, from 0.9911 to 0.9981 with COBYLA, and from 0.9843 to 1.0000 with TrustReg. For MIS, the corresponding improvements are 0.7118 to 0.9944, 0.3625 to 1.0000, and 0.7620 to 0.9833. Without HGLE the MIS landscape is described as rugged enough that classical optimizers collapse, whereas with HGLE all three optimizers exceed 0.98. The paper further reports that on Max-Cut baseline ratios degrade with size while HGLE holds at least 0.995, that on MIS deeper circuits without HGLE plateau near 0.7 while HGLE remains at least 0.98 for $p=2,4,6$, and that Trust-Region roughly halves the required shots at 18 qubits from approximately 2000 to 1000. In a 40-qubit, 120-edge, $p=5$ simulator-scale sparsification study, Fiedler reordering plus bandwidth $k=2\ldots 9$ reduces circuit depth by up to 92% on hardware backends; at $k=2$, depth falls from 653 to 54 on IBM FakeMarrakesh, while HGLE-warmstarted COBYLA attains approximation ratios around 0.87–0.90 versus around 0.83 for the baseline [2606.07814].

## 6. Multilevel spectral embeddings for large-scale QAOA

MLQAOA uses representation learning inside a multilevel V-cycle for large-scale MaxCut. Starting from
\[
G_0=(V_0,E_0,w_0),
\]
the method constructs progressively coarser graphs
\[
\{G_\ell=(V_\ell,E_\ell,w_\ell)\}_{\ell=0}^{L}
\]
through matching-based coarsening, solves the coarsest level, and then uncoarsens with refinement. At each level, a $d$-dimensional **relaxation embedding** of $G_\ell$ is built on the unit sphere, nodes are paired by nearest neighbors in the embedding, and the coarse adjacency is defined by
\[
A_{\ell+1}=P A_\ell P^\top,
\]
where $P$ is the coarsening operator. During uncoarsening, the coarse solution is injected back to the fine graph and locally refined through repeated extraction and solution of small subproblems [2404.14399].

The representation-learning accelerator is spectral rather than neural. For a weighted graph $G=(V,E,w)$ with adjacency $A$ and degree matrix $D$, MLQAOA forms the Laplacian
\[
L=D-A
\]
and the weighted normalized Laplacian
\[
L_W=W^{-1/2}LW^{1/2},\qquad W=\operatorname{diag}(w_1,\dots,w_n).
\]
If
\[
L_W=\hat U\hat\Lambda \hat U^\top,
\]
the representation of $G$ is simply the first nontrivial eigenvector, the Fiedler vector,
\[
v(G)=\hat u_2\in\mathbb R^n.
\]
A corpus of approximately 5 000 small graphs of size $n=22$, each optimized by full QAOA-$p=3$, stores pairs $\{(\hat u_2^{(i)},(\gamma^{(i)},\beta^{(i)}))\}_{i=1}^N$. For a new 22-node subproblem, MLQAOA computes $\hat u_2(G)$, finds the nearest corpus element in Euclidean distance, and transfers the corresponding $(\gamma,\beta)$ as initialization. No further training or neural-network layers are used.

This spectral retrieval is integrated with two subsolvers. In **Graph-Learning QAOA**, the transferred depth-3 parameters are used directly for a subproblem solved with QAOA simulation and 10 240 shots. In **QIRO-MLQAOA**, a shallow $p=1$ QAOA state provides one- and two-point correlators, and the most strongly correlated edge is used for recursive variable elimination until a classical terminal solve. The reported settings are subproblem size $K=20$ for Graph-Learning, stopping size $s_{\min}=10$ for QIRO, and 20 independent runs per instance.

Benchmarks include five $G_{\rm set}$ random graphs with 800 vertices and 19 716 edges, six Karloff graphs, and 25 large real-world graphs from SuiteSparse and Network Repository with up to $10^5$ vertices and $10^6$ edges. On $G_{\rm set}$, GL-MLQAOA and QIRO-MLQAOA achieve approximately 98–99.5% of optimum. On Karloff graphs, both variants outperform Goemans–Williamson in the reported averages and best runs. On extended $G_{\rm set}$, they greatly outperform QAOA-in-QAOA and remain competitive with strong classical baselines such as PI-GNN and BLS. On the 25 large graphs, GL-MLQAOA and QIRO-MLQAOA lose only $\lesssim 0.1\%$ relative to the best classical heuristic. Runtime scaling is reported at $O(10^2$–$10^3\,\mathrm{s})$ on graphs with $O(10^5$–$10^6)$ edges, two orders of magnitude faster than the original exhaustive multilevel QAOA on mid-scale graphs. The ablation study notes that QIRO-MLQAOA exhibits tighter interquartile ranges, whereas GL-MLQAOA shows larger spread but slightly higher maxima [2404.14399].

Source: https://www.emergentmind.com/topics/qaoaembedding-models