QuantumLoop
Describe an optimization problem in plain English; an AI agent turns it into a quantum algorithm, runs it, verifies the answer and visualises the result.
- Built at
- Hack The Nest 2026 · 24 hours
- Team
- Team of four
- Focus
- Agent pipeline · QAOA · verification
- Built with
01
Overview
QuantumLoop is an AI-powered quantum optimization platform designed to make quantum computing more accessible. You describe a real-world optimization problem in plain English; an agent turns it into a quantum algorithm, runs it on the Quantum Rings simulator, checks the answer and saves the result.
Using Python, Google Gemini, Qiskit and Quantum Rings, we built an automated pipeline that interprets requirements, identifies objectives and constraints, builds quantum solvers, tests and verifies the results, and visualises the whole process through an interactive dashboard. We explored scheduling, resource allocation and electric-vehicle fleet optimization.
02 Motivation
The problem
Quantum optimization methods such as QAOA are approachable on paper, but using one on a real question takes a long chain of translation: from a messy description, to explicit objectives and constraints, to a QUBO / Ising formulation, to a circuit, to results someone can act on. Each step needs specialist knowledge, and a single mistake quietly produces a confident wrong answer.
QuantumLoop asks whether an AI agent can carry a problem through that chain, and treats verification as a first-class step rather than an afterthought.
03 Architecture
How the agent works
- Init
- Creates a workspace and parses the prompt into a typed problem statement, then checks it against the original request before any planning happens.
- Plan
- Researches with grounded search, chooses an approach, checks the qubit limit, writes
PLAN.mdand picks two or three variables users can tweak with sensible defaults. - Build
- Writes the solver (
main.py), reusing or patching only what changed, then compares the implementation against the plan before moving on. - Test
- Runs the solver in a bounded worker, evaluates the result, then checks semantics: does the implementation actually answer the stated problem?
- Final Go/No-Go
- Re-confirms the whole approval chain: prompt → problem → plan → exact source tested. Any broken link sends the run back to the stage that produced it.
- GO
- Saves
results.json, a circuit diagram and ahandoff.jsonthat the dashboard uses to render the solution.
04 QAOA
Quantum optimization approach
Solvers use the Quantum Approximate Optimization Algorithm (QAOA). Constraints such as routing and charging limits are encoded as a QUBO / Ising cost function; the circuit alternates cost and mixer layers, and measurement results are decoded back into a schedule that is checked for feasibility.
- Robotics team split
- Split six students into two teams · correct answer: friction 3
- Food-truck weekend
- Pick weekend events for a food truck · correct answer: $1,480
- EV fleet dispatch
- Schedule two electric vans · correct answer: $15.78
05 Visualisation
The dashboard
The dashboard replays verified results on a street-grid fleet map with a schedule timeline for each vehicle and charger. Changing an approved control (such as a van’s starting charge) reruns the verified solver and updates routes, battery levels, charging schedules and the operating-cost breakdown.
06 What was hard
Challenges
- Trusting generated code. Model output can look right and be wrong, so every stage has an explicit review gate, and the final check re-validates the full chain against the exact source that was tested.
- Qubit budgets. Simulated problems have to stay small. Plans are checked against a qubit limit, and the EV example was deliberately scaled down to fit (4–5 qubits).
- Long, fragile runs. A full run takes roughly 5–25 minutes and depends on a hosted model that can return “high demand” errors, which is why workspaces are resumable and verified steps are reused.
07 Individual work
My contributions
What I worked on
- Engineered a Python agentic backend with the Gemini API that converts natural-language optimization problems into executable quantum algorithms through automated planning, code generation, testing and verification.
- Implemented QAOA in Python for EV fleet scenarios (encoding routing and charging constraints as QUBO/Ising models, simulating 4–5 qubits and verifying schedule feasibility), matching the exact classical optimum in two scenarios.
- Enabled interactive fleet optimization through a Python HTTP API and a JavaScript / Leaflet dashboard that recalculates solutions as battery-charge inputs change.
Traceable in the repository
- Set up the Quantum Rings integration and first circuits (PR #1): provider connection with credentials kept out of source, a 50-qubit entangling test circuit, a Qiskit version and circuit visualisation.
- Reviewed and merged the Init-stage prompt parsing (PR #2) and the interactive scenario builder (PR #7).
08 Status
Demonstrated, and what’s next
- Demonstrated
- End-to-end runs from a plain-English prompt to a verified GO result on the example problems, with matching answers on the EV fleet scenarios and live recalculation in the dashboard.
- Prototype limits
- Runs use the Quantum Rings simulator rather than quantum hardware, on deliberately small problem sizes, and rely on classical reference answers for verification.
- After the event
- The repository kept evolving after the weekend: configurable model providers, geographic maps with road routing, and editors for more optimization problem types.
Technologies used