03 2026 AI & QuantumHackathonFull-stack

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.

QuantumLoop logo: a glowing infinity loop linking a checklist, a quantum state symbol and a verified results chart.
QuantumLoop
Built at
Hack The Nest 2026 · 24 hours
Team
Team of four
Focus
Agent pipeline · QAOA · verification
Built with
  • Python
  • Google Gemini
  • Qiskit
  • Quantum Rings
  • QAOA
  • Pydantic
  • JavaScript
  • Leaflet

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

QuantumLoop agent loop: Init, Plan, Build, Test, Final Go/No-Go, then GO. Build reviews itself against the plan, failed tests return to Build, and a failed final check returns to the stage whose approval no longer holds. 01 Init parse prompt 02 Plan research · qubits 03 Build write solver 04 Test run · semantics 05 Go / No-Go re-verify chain 06 GO handoff.json compare with plan fails → fix & retry approval broken → back to the stage that produced it QuantumLoop agent loop: Init, Plan, Build, Test, Final Go/No-Go, then GO, with repair loops back to earlier stages. 01 Init parse prompt 02 Plan research · qubits 03 Build write solver 04 Test run · semantics 05 Go / No-Go re-verify chain 06 GO handoff.json fix & retry repair
Each approval is fingerprinted against its inputs. Change the problem, the plan or the code, and only the affected stages run again.
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.md and 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 a handoff.json that 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.

A Qiskit QAOA circuit diagram with six qubits labelled farmers_mkt, street_fair, concert, night_mkt, brunch and football, Hadamard gates, three alternating cost and mixer layers, and final measurements.
QAOA circuit for the food-truck weekend example: six event qubits, three alternating cost and mixer layers, then measurement.
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 QuantumLoop EV fleet dispatch dashboard: a starting-charge slider, the original prompt, a street-grid fleet map with depot, charger and delivery markers, a total cost of $15.78, playback controls and a schedule timeline for two vans and one charger.
EV fleet dispatch: adjust a van’s starting charge and the verified solver recalculates routes, charging and cost.

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.

QuantumLoop was built by a team of four. The pipeline, solvers and dashboard were a shared effort, and the repository history reflects work from everyone on the team.

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

  • Python
  • Google Gemini (google-genai)
  • Qiskit
  • Quantum Rings
  • QAOA
  • QUBO / Ising
  • Pydantic
  • JavaScript
  • Leaflet
  • Matplotlib