Neural-powered unit disk graph embedding for mapping QUBO problems onto quantum annealer connectivity. Uses graph neural networks to solve the minor embedding problem efficiently.
Scanned 9/11/2026
Install to Claude Code
npx -y skills add hiyenwong/ai_collection --skill neural-qubit-embedding --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Neural Qubit Embedding?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-neural-qubit-embedding)More formats (shields.io, HTML) on the badges page.
---
name: neural-qubit-embedding
description: "Neural-powered unit disk graph embedding for mapping QUBO problems onto quantum annealer connectivity. Uses graph neural networks to solve the minor embedding problem efficiently."
---
# Neural-Powered Qubit Embedding
## Description
Neural network approach for solving the graph embedding problem in quantum annealing. Maps Quadratic Unconstrained Binary Optimization (QUBO) problems onto quantum annealer hardware connectivity patterns (unit disk graphs) using learned representations.
Based on: Vercellino et al. "Neural-powered unit disk graph embedding: qubits connectivity for some QUBO problems" (arXiv: 2605.04736)
## Activation Keywords
- qubit embedding
- quantum annealer embedding
- QUBO mapping
- minor graph embedding
- unit disk graph
- quantum annealing connectivity
- 量子退火器嵌入
- QUBO映射
## Core Concepts
### QUBO Problem Formulation
- QUBO: minimize x^T Q x where x is binary vector
- Q matrix encodes problem couplings
- Hardware has limited connectivity (Chimera, Pegasus, Zephyr topologies)
### Minor Embedding Problem
- Map logical qubits to chains of physical qubits
- Each logical variable must map to connected chain
- Chains of same logical variable must have same value (ferromagnetic coupling)
- NP-hard problem in general
### Unit Disk Graph
- Hardware connectivity modeled as unit disk graph
- Qubits at positions, edges exist if distance < threshold
- Embedding must respect this geometric constraint
## Key Patterns
### Pattern 1: Neural Embedding Pipeline
1. Input: QUBO matrix Q and hardware connectivity graph H
2. Encode Q as graph G_Q (nodes=variables, edges=nonzero couplings)
3. GNN processes G_Q to learn variable representations
4. Matching layer assigns variables to hardware qubits
5. Chain construction for multi-qubit assignments
6. Validate embedding feasibility
### Pattern 2: Graph Neural Network Architecture
1. Node features: degree, coupling strength, position in Q
2. Edge features: coupling weight sign and magnitude
3. Message passing: aggregate neighbor information
4. Readout: variable embedding probabilities
5. Constraint layer: ensure one-to-one mapping (relaxed)
### Pattern 3: Chain Quality Optimization
1. Minimize chain length (fewer physical qubits)
2. Maximize chain connectivity (stronger intra-chain coupling)
3. Balance chain lengths across variables
4. Ensure chains don't overlap on hardware
## Implementation Guide
### Step 1: Problem Graph Construction
```python
import networkx as nx
import numpy as np
def qubo_to_graph(Q):
"""Convert QUBO matrix to graph representation."""
n = Q.shape[0]
G = nx.Graph()
for i in range(n):
G.add_node(i, weight=Q[i,i])
for i in range(n):
for j in range(i+1, n):
if Q[i,j] != 0:
G.add_edge(i, j, weight=Q[i,j])
return G
```
### Step 2: Hardware Connectivity Graph
```python
def hardware_graph(topology='pegasus'):
"""Generate hardware connectivity graph."""
if topology == 'pegasus':
from dwave_networkx import pegasus_graph
return pegasus_graph(3)
elif topology == 'unit_disk':
# Generate unit disk graph from qubit positions
pass
```
### Step 3: GNN Embedding Model
```python
import torch
import torch.nn as nn
from torch_geometric.nn import GCNConv
class EmbeddingGNN(nn.Module):
def __init__(self, hidden_dim, num_qubits):
super().__init__()
self.conv1 = GCNConv(2, hidden_dim)
self.conv2 = GCNConv(hidden_dim, hidden_dim)
self.head = nn.Linear(hidden_dim, num_qubits)
def forward(self, x, edge_index, edge_weight):
x = self.conv1(x, edge_index, edge_weight).relu()
x = self.conv2(x, edge_index, edge_weight).relu()
return torch.softmax(self.head(x), dim=-1)
```
### Step 4: Training with Constraints
```python
def embedding_loss(assignments, G_problem, G_hardware):
"""Loss function for embedding quality."""
# Penalize infeasible assignments
# Reward short chains
# Penalize chain fragmentation
pass
```
## Tools Used
- python: Neural network implementation
- pytorch / torch-geometric: GNN framework
- networkx: Graph manipulation
- dwave-system: D-Wave quantum annealer SDK
- terminal: Run embedding and annealing
## Error Handling
- If no feasible embedding found: reduce problem size, increase hardware
- If chains too long: use different topology, problem decomposition
- If GNN training unstable: gradient clipping, learning rate scheduling
## Related Skills
- quantum-optimization-qaoa
- quantum-annealing-xai
- quantum-ml-data-loading
## References
- arXiv: 2605.04736 - Neural-powered unit disk graph embedding
- D-Wave Embedding: Cai et al., Quantum 3, 175 (2019)
- Graph Neural Networks: Kipf & Welling, ICLR 2017
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!