Skip to main content
Back

UChicago's HAL Runs Real Quantum Experiments From Journal PDFs in Minutes

A University of Chicago team built HAL, an LLM-driven system that autonomously runs superconducting qubit experiments by writing its own Python tools on the fly

Pro

  • HAL is an LLM-driven framework from the University of Chicago that autonomously runs superconducting qubit experiments by writing Python tools on demand.
  • The system uses a plan-develop-execute loop powered by Gemini 3 Flash, with a signal pathway that avoids exposing raw floating-point instrument data to the LLM.
  • HAL reproduced a quantum non-demolition characterization directly from a published journal article PDF, with no prior knowledge of the protocol, in ~3 minutes.
  • An iterative RAG search agent handles cross-referenced knowledge documents, overcoming a key limitation of standard retrieval methods.
  • All components -- HAL, QuICK, and Grapher -- are open-sourced on GitHub.
  • Key limitation: HAL depends heavily on a manually curated knowledge base and cannot autonomously go beyond what humans have documented.

Running experiments on superconducting qubits is not like running a Python script. It requires deep knowledge of microwave engineering, cryogenic hardware, pulse-level control sequences, and a stack of bespoke software that varies lab by lab. A single new measurement protocol can take weeks to implement from scratch. A team at the University of Chicago's Pritzker School of Molecular Engineering just published a framework that hands much of that burden to an LLM.

The system, called HAL (Heuristic Autonomous Lab), is powered by Google's Gemini 3 Flash and sits on top of the lab's existing hardware infrastructure. Instead of a conventional tool-based agent architecture, HAL repeatedly asks two key questions: what to do next, and how to do it. The answers drive a continuous plan-develop-execute loop that writes and runs Python code against real quantum hardware -- a dilution refrigerator cooled to roughly 10 millikelvin.

Why quantum labs are a uniquely hard target for AI

Implementing novel control and measurement sequences for superconducting qubits is often a complex and time-consuming process, requiring extensive expertise in both the underlying physics and the specific hardware and software. The challenge is compounded by the fact that each lab runs its own combination of instruments, control packages, and experimental conventions -- none of which a general-purpose LLM has ever seen.

The broader trend of AI-driven autonomous labs has been gaining momentum in chemistry and materials science. Today's most capable self-driving laboratories automate nearly the entire scientific method, from hypothesis generation, experimental design, experiment execution and data analysis, to drawing conclusions and updating hypotheses. But quantum hardware presents a specific obstacle: floating-point data such as microwave scattering parameters are often confusing for LLMs, and experimental practice often requires human interpretation of inconclusive results. HAL was designed to work around both of these problems.

How HAL actually works

The architecture has four interlocking pieces. The first is the plan-develop loop itself. The planner reads the full session history and relevant knowledge documents to decide what to do next, producing a detailed text prompt. The developer turns that prompt into executable Python code. A dedicated execution runtime runs the code in a sandboxed environment with all control packages pre-imported.

HAL architecture diagram showing the Plan-Develop-Code-Execute workflow, Search Agent, Execution Runtime, and Signal Pathway

The fourth piece -- and arguably the most important -- is the signal pathway. Instead of a fixed response structure, the signal can comprise arbitrary text whose content is informed by the planner, implemented by the developer, and finally assigned in code execution. This sidesteps the problem of asking an LLM to interpret raw floating-point instrument readings. Instead of seeing a wall of numbers, the LLM sees a human-readable summary like "Found 4 resonators" and acts on that. The team calls these schema-less tools: the LLM defines what it wants to know and then builds the tool to report it.

Knowledge retrieval is handled by an iterative RAG (retrieval-augmented generation) agent -- a method where the system searches a document store for relevant context before generating a response. Standard RAG often misses documents that are referenced by other documents but aren't semantically similar to the query. HAL's iterative agent maintains a structured state comprising the original task, a list of previously searched queries, and a collection of gathered documents. In each iteration, the LLM identifies irrelevant documents and generates new queries for missing information. This continues for up to five iterations until no new queries emerge.

A key design choice is memorization: when a task completes successfully, the working prompts and code can be reviewed by a human and permanently added to the knowledge base. This conversion from short-term to long-term context enables HAL to improve itself via practice. The system also exposes two shared global variables -- STATE (a dictionary for passing data between steps) and INVOKE (a function for re-running previous steps or calling knowledge-base examples) -- that make generated code reusable without modification.

Two real experiments, one from a journal article

The team demonstrated HAL with two live experiments. The first was autonomous resonator characterization: HAL scanned a frequency range with a vector network analyzer (VNA), identified resonances, and extracted quality factors. When a human operator pointed out that the initial scan missed half the resonators, HAL adjusted the frequency range and re-ran without any code changes from the user.

VNA measurement procedure flowchart and frequency response graph showing resonator detection across 5500-6000 MHz

About 10^5 input tokens and 10^4 output tokens (including thinking tokens) are used in the process. With prepared prompts, the process takes about five minutes, including the VNA scanning time.

The second experiment is more striking. The team fed HAL a PDF of a published journal paper describing a quantum non-demolition (QND) characterization protocol -- a method for measuring a qubit without destroying its quantum state -- and asked it to reproduce the experiment from scratch. QND here refers specifically to readout-induced leakage benchmarking (RILB), a technique that quantifies how often a readout pulse accidentally kicks the qubit out of its computational states. None of the knowledge about the QND characterization and the corresponding leakage characterization had been previously presented to the HAL system.

The workflow involved three steps: an online LLM (Gemini Thinking) extracted lab-independent instructions from the paper PDF; HAL's answer component translated those into lab-specific instructions using existing knowledge documents; and the resulting plan was added to the knowledge base. From there, HAL ran the experiment autonomously in two cycles -- one for data acquisition, one for fitting -- and extracted a leakage rate of L = 0.124 ± 0.017. With prepared prompts, the process takes about three minutes, including the pulse sequence execution time.

Flowchart of LLM-based knowledge acquisition from journal article and scatter plot showing average correlation decay across readout cycles

What it is good at -- and where it falls short

HAL is well-suited to a specific class of tasks:

  • Rapidly deploying standard measurement protocols described in natural language
  • Reproducing published experimental procedures from journal articles with minimal human effort
  • Combining outputs from multiple experiments (HAL-generated code from different sessions was merged to produce readout fidelity curves as a function of readout power)
  • Human-in-the-loop workflows where a researcher can redirect the system mid-experiment

The limitations are real. A significant limitation of the HAL system is its strong dependence on a knowledge base. This heuristic nature, while providing better human control, prevents the system from making voluntary actions to surpass human experience. Collecting and formatting lab-specific documents is non-trivial upfront work. The system also currently relies on a commercial LLM with a knowledge cutoff that predates the lab's own control packages -- meaning HAL has no built-in awareness of QuICK, the open-source qubit control package the team developed alongside HAL.

The real unlock: literature becomes executable

The deeper implication of the QND experiment isn't just automation -- it's the compression of the gap between reading a paper and running the experiment it describes. Historically, reproducing a published quantum experiment required a researcher to understand the physics, translate the protocol into hardware-specific code, debug the implementation, and iterate. HAL collapses that pipeline into a structured prompt workflow that takes minutes.

Beyond pulse-level control, AI is already demonstrating utility in quantum algorithm design, circuit simulation, and fabrication, potentially streamlining the transition from circuit design to measurement results, accelerating the research cycle in quantum science. HAL is positioned as a building block for that future: a controllable, auditable layer that lets a higher-level AI system issue natural-language commands to real quantum hardware.

All three components -- HAL, QuICK, and Grapher (the real-time data visualization tool) -- are open-sourced on GitHub with documentation. The paper notes that future versions may use fine-tuned models for the planner and developer roles, and that an autonomous knowledge-generation system could eventually replace the manual document-collection step entirely.