Subvurs

Qstruction: Deterministic Quantum Addressing

Solve MaxCut Without Search

Don't Search. Address.

QAOA searches for solutions probabilistically. Qstruction addresses them deterministically. Same problem. Different paradigm. Constant circuit depth.

The MaxCut Problem

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.

The Qstruction Approach

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.

How It Works

  1. Spectral EncodingCompute the graph Laplacian L and its Fiedler vector (eigenvector of λ₂). The sign pattern encodes the graph's natural partition structure as a binary pattern.
  2. Pattern LookupThe binary pattern maps to an integer (e.g., 01100011 → 99). This is the "address" of the solution in our 256-state Hive structure.
  3. Inverse PermutationLook up the initialization key that, when passed through Protocol 6.0's fixed circuit, produces the target pattern with certainty.
  4. Quantum ExecutionRun the 28-gate circuit once. Measure. The result IS the partition—no iteration, no classical optimization loop.

QAOA vs Qstruction

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)
Note on optimality: Spectral partitioning provides a good partition (often near-optimal), not a guaranteed optimal one. For graphs with special structure ("Hive-isomorphic"), spectral encoding IS optimal. The demo shows both the spectral result and the true optimal for comparison.

Live Demo

Select a graph, choose simulator or IBM hardware, then click Run.

How to Read the Results

After clicking "Run Qstruction," you'll see values in the Execution Log and Results panels. Here's what each one means:

Execution Log

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.

Results Panel

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.

What Just Happened?

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.

Key Insight

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.

Limitations

Get the Code

Run Qstruction locally with the Hive Keyboard SDK.

Technical Brief (.txt) Download SDK v0.2.1