Qstruction: Deterministic Quantum Addressing
QAOA searches for solutions probabilistically. Qstruction addresses them deterministically. Same problem. Different paradigm. Constant circuit depth.
Given a graph G = (V, E), partition the vertices into two groups to maximize the number of edges crossing between groups.
Why it matters: MaxCut is NP-hard and appears in circuit design, network clustering, statistical physics, and machine learning. It's a standard benchmark for quantum optimization algorithms.
Instead of searching the solution space (like QAOA), we use spectral analysis to map the graph structure to a quantum state address, then deterministically synthesize that state.
The circuit depth is constant (28 gates) regardless of the target state. No variational optimization. No parameter tuning.
01100011 → 99).
This is the "address" of the solution in our 256-state Hive structure.
| Metric | QAOA (p=3) | Qstruction |
|---|---|---|
| Circuit depth | O(p × edges) → ~50-200 gates | 28 gates (constant) |
| Classical optimization | Required (100+ iterations) | None |
| Result type | Probabilistic distribution | Deterministic |
| Scaling | Depth grows with problem size | Constant depth |
| Hardware fidelity | Degrades with depth | >95% (IBM Torino) |
Select a graph, choose simulator or IBM hardware, then click Run.
After clicking "Run Qstruction," you'll see values in the Execution Log and Results panels. Here's what each one means:
Fiedler λ₂ — The second-smallest eigenvalue of the graph's
Laplacian matrix. This measures algebraic connectivity: higher values mean the graph
is more connected and harder to partition.
Target pattern — The binary encoding of the partition
derived from spectral analysis. Each bit represents which group (0 or 1) a vertex belongs to.
Init key — The initialization value that, when passed
through the 28-gate circuit, deterministically produces the target pattern. This is
the "address lookup" that makes Qstruction work.
Fidelity — The percentage of quantum measurements that
returned the correct target pattern. 100% on simulator; typically >95% on real hardware.
Cut Value — The number of edges that cross between the
two groups (shown as X/Y where Y is total edges). Higher is better for MaxCut.
vs Optimal — How close the spectral partition came to
the true optimal MaxCut (computed by brute force for small graphs). 100% means the
spectral method found the optimal solution.
Colored Graph — Vertices are colored by group assignment: ● green = Group A, ● pink = Group B. Cyan edges are cut edges (crossing between groups).
Goal: Maximize cyan edges—that's the MaxCut solution visualized.
1. Spectral Encoding: We computed the graph's Laplacian and found its Fiedler vector. The sign pattern (+/-) of this vector encodes a natural partition of the graph's vertices.
2. Deterministic Synthesis: Instead of searching for this state (like QAOA), we looked up the initialization key that produces it with certainty through our fixed 28-gate circuit.
3. Quantum Execution: The circuit ran once, measured, and returned the partition. No classical optimization loop. No iterations. One shot.
QAOA requires O(p × edges) gates and hundreds of optimization iterations to converge probabilistically. Qstruction uses exactly 28 gates and 1 execution to deterministically produce the answer. On noisy quantum hardware, shorter circuits mean higher fidelity.
Run Qstruction locally with the Hive Keyboard SDK.
Technical Brief (.txt) Download SDK v0.2.1