Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
RESEARCH

An AI Kept Getting Quantum Code Wrong. Testing Its Work Changed That.

In a Red Hat researcher’s follow-up, one AI model went from zero correct translations in a single try to nearly 94% when it could run the code, check the result and try again.

Published Source report Sources checked
Reading tools for text size, copying, printing and your reading list
My reading list
A red brick office building with a Red Hat sign, trees and a road in front under a blue sky.
Red Hat’s then-headquarters in Raleigh, North Carolina, photographed in 2011. Red Hat is the author’s affiliation; the photo does not show the benchmark being run.Archival photograph of the author’s institutional affiliation, not a depiction of the computational experiment.Photo: Jwaterwo / Wikimedia Commons (CC BY-SA 3.0)

A quantum program can run without an error message and still give the wrong answer. That distinction mattered in a new preprint by Red Hat researcher Ana Paula Appel, listed in arXiv’s December 4 issue. In a set of 640 tasks translating code from IBM’s Qiskit to NVIDIA’s CUDA-Q, one AI model got none right when given just one attempt. The same model reached 93.8% when it could consult documentation, run its code, compare the result with a reference and revise.[1][2]

Qiskit and CUDA-Q are two different toolkits for describing quantum computations. Getting a translation to run is like getting a recipe into another language without grammatical mistakes: it still might produce the wrong dish. Appel checked whether the rewritten program prepared the same quantum state as the original in a simulator. That was the final test even in the runs where the model itself was given less detailed feedback.[1]

The harder test was code people already use

In Appel’s earlier study, none of the four AI configurations correctly translated even one of 27 routines drawn from a Quantum Economic Development Consortium benchmark. This time, a model called Nemotron Cascade 2 got 17 of the 27 right with the full testing setup. A different model, GLM-5.3 Flash, got all 27 right with that setup, compared with 10 on its first try. Those are separate results on a small set of existing benchmark routines, not the denominator behind the 93.8% figure. Some other models did not improve when given the same tools.[1][3]

There was also a cheaper way to use the loop. On the 640-task set, Appel tried a fine-tuned model first and reserved the more expensive retry process for translations that failed the reference check. Only about 6% needed that second stage. The two-stage approach got 98.9% right and used roughly one-third of the estimated model compute of running the full loop every time. The compute figure is an estimate, not a cloud bill or a measurement of elapsed time.[1]

The preprint tested translations in a simulator, not on a quantum processor. It also relied on a reference program the researcher could already run. That makes the result most useful for moving existing code with a reliable way to check it, not for writing new quantum algorithms whose correct answers are unknown. The useful lesson is that a reliable test can do more for a translation than a more confident first answer.[1]

Keep your reading trail

Evidence & context

3 linked sources

First v1 submission Dec 1 12:12:31 UTC, public Dec 4 arXiv issue item 112. Earlier same-author benchmark exact arXiv 2611.29793 and linked QubitWire report; new underlying study changes methodology and tests outcomes. New cascade executed 98.9% on 640 tasks (21.3 vs 62.8 estimated TFLOP/task; 6.4% second stage), distinct from simulated 99.1% and from 27 benchmark kernels (17/27 vs 27/27 different model). References and limitations checked; no quantum hardware or general AI translation claim. Novelty scan clear; prior photo visually distinct.

How to read the evidence and dates

An announcement records what an organization stated. An experiment reports an observation. A simulation or resource estimate depends on its assumptions. QubitWire’s analysis connects these sources; the labels are not quality scores.

Published is the article’s first QubitWire publication. Updated marks a substantive content change. Sources checked records a review of the underlying evidence. An older paper can support a new explanation, and another press release about the same work is not independent replication.

Sources

  1. Ana Paula Appel: Harness or Fine-Tuning?

    Full preprint, results tables 5–7 and limitations distinguish benchmark sets, verification and estimated compute.

  2. arXiv: December 4 issue, item 112

    Publication listing, separate from the December 1 submission date shown on the record.

  3. Ana Paula Appel: Earlier Qiskit-to-CUDA-Q experiment

    The first study reported zero correct translations by the tested AI configurations on 27 existing QED-C benchmark routines.