Quantum code review

AI writes quantum code. qcheck reviews it.

A review layer for AI-generated Qiskit and OpenQASM.

Catch the avoidable before code reaches humans, CI, or simulators.

$ qcheck review bell.py
# static review, no execution
pass QuantumCircuit + measurement
flag execute() removed in Qiskit 1.0
flag Aer import removed
# 1 passed · 2 flagged

Signals

What qcheck reviews

qcheck v0 reviews static signals — no execution required, so it runs safely on untrusted model output inside an agent loop or CI.

Qiskit

API usage

Flags removed-in-1.0 imports like execute() and Aer, and deprecated gate aliases.

OpenQASM

Parse issues

Header, register declarations, index ranges, and measurement validity.

Safety

Unsafe patterns

Filesystem, network, process, or dynamic-exec constructs are flagged before anything runs.

Structure

Missing measurements

Common mistakes that make a circuit fail or return nothing useful.

Models

Common LLM mistakes

The recurring errors models make in generated quantum snippets.

Review

A review, not a verdict

Each snippet returns a set of signals — passed or flagged — that a developer or agent can act on before the code runs.

modern_qiskit_apino removed 1.0 imports
declared_registersqreg / creg present, in range
has_measurementcircuit measures qubits
execute_removedexecute() removed in Qiskit 1.0
unsafe_side_effectwrites to disk
3 passed · 2 flagged

Scope

What it does — and doesn't

In scope

  • Static review of Qiskit / OpenQASM snippets
  • Common, avoidable failures
  • CI and agent preflight
  • Machine-readable JSON output

Not in scope

  • Hardware execution
  • Algorithm correctness or formal proof
  • PQC migration

Benchmark

Static review benchmark

Tracks how AI-generated snippets perform against qcheck's current static review checks. It reports static_pass_rate on a small public task set as an early quality signal. Rows marked SAMPLE are demo data.

#ModelProviderStatic pass ratePassed / AttemptedUnsafeqcheck
1demo-model SAMPLEsample50.0%3 / 61v0.1.0

Real runs will include provenance, task counts, qcheck version, and prompt hash. See the methodology.

Roadmap

Where it is going

Today

CLI

Static review for Qiskit and OpenQASM, with JSON output for agents and CI.

Next

GitHub Action & MCP

Review in CI and as an agent-callable tool.

Later

Hosted API

A review endpoint for agent workflows.