Quantum circuit analysis and structured feature extraction tools.
Project description
qCoder
qCoder helps developers inspect quantum circuits before they run them. It reads OpenQASM circuits, extracts repeatable structural features, and emits structured JSON (single file) or JSONL (batches)—useful for notebooks, CI, pull-request review, and AI coding assistants when you attach or paste deterministic context next to circuit text.
CLI: qcoder analyze, qcoder batch, qcoder context, and qcoder review. Optional Qiskit intake: pip install "qcoder[qiskit]".
Company / legal: Quantum Ready Solutions. Product docs: qcoder.ai · manual. Source: github.com/QuantumReadySolutions/qCoder. Support: support@qcoder.ai.
What qCoder analyzes
qCoder summarizes circuit structure from declarations in your source files. Pair its JSON output with simulator or hardware run data whenever you need execution evidence.
Package layout (supported public surface)
For this release, treat the supported surface as:
qcoder analyze— single-circuit extraction (human or--json).qcoder batch— directory batch to JSONL.- Optional
--guidanceonanalyze/batch— deterministic heuristic starting points (shots and simulator/MPS settings) derived from circuit structure. qcoder context— deterministic preflight context artifacts (JSON + Markdown), including optional--guidanceand optional--full-featuresglossary appendix.qcoder review— deterministic post-run review artifacts (JSON + Markdown) from user-provided counts.- Counts intake normalization —
qcoder.counts.v0andqiskit_countsnormalization into the same deterministic review path. qcoder[qiskit]— optionalQuantumCircuitintake into the same extractor as OpenQASM.- Documented feature output — see qcoder.ai — Feature reference and
engines/feature_extraction/features/schema_v0.py; JSON carries aschema_versionalongside named fields.
Other modules under src/qcoder may exist for prototyping (extra tooling or engines outside the commands above). Unless documented here, docs/, or qcoder.ai, they do not share the same stability expectations as the commands and artifact formats listed above.
Brief notes live in docs/architecture.md.
Install
pip install qcoder
Pre-release lines on PyPI use segments such as 0.2.0a1.
Optional Qiskit adapter:
pip install "qcoder[qiskit]"
Requires Python 3.11+. Runtime dependency: NumPy.
Machine-readable JSON from qcoder analyze --json includes a derived feature_map object (name → value) for easier reading. The canonical circuit feature bundle remains the nested features object (schema_version, feature_names, features).
Optional --guidance adds heuristic shot-count and simulator/MPS starting-point suggestions derived from structural features. These suggestions are transparent, non-guaranteed starting points only; qCoder performs no backend execution and includes no telemetry/upload in this flow.
qcoder context and qcoder review generate deterministic local artifacts (JSON + Markdown) intended for user-controlled AI-assisted planning/review workflows. "LLM-ready/RAG-ready" in this project means users can attach or paste these artifacts manually; qCoder itself performs no retrieval, embeddings, network calls, or telemetry/upload in this flow.
CLI quickstart
qcoder analyze path/to/circuit.qasm
qcoder analyze path/to/circuit.qasm --json
qcoder analyze path/to/circuit.qasm --json --guidance
qcoder context path/to/circuit.qasm --out-json preflight.context.json --out-md preflight.context.md --guidance
qcoder batch circuits --out batch.features.jsonl --pattern "*.qasm"
qcoder batch circuits --out batch.features.jsonl --pattern "*.qasm" --guidance
qcoder review --counts-json counts.json --format qiskit_counts --preflight-json preflight.context.json --out-json execution.review.json --out-md execution.review.md
Batch: JSONL records are written to --out. Status lines (for example record counts) may go to stderr, so prefer --out over shell stdout redirection for the JSONL stream.
Develop / test (from a clone)
If you use pyenv, select the intended Python before creating the venv (for example pyenv local 3.11.x or pyenv shell 3.11.x) so python -m venv uses that interpreter.
python -m venv .venv
source .venv/bin/activate
pip install -e ".[qiskit]"
pip install pytest
pytest -q
License
Licensed under the Apache License 2.0. See LICENSE and NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qcoder-0.2.0a1.tar.gz.
File metadata
- Download URL: qcoder-0.2.0a1.tar.gz
- Upload date:
- Size: 119.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d151db679a55b9593458480aeec47410580d9c3a431fba0a30a045f1b536293
|
|
| MD5 |
8bdc710fe2b99c5f05f1e9617e2cd282
|
|
| BLAKE2b-256 |
9a0f706dc5bceab37ac87795892bbe5a2e03e1135754310089a21d098d780690
|
File details
Details for the file qcoder-0.2.0a1-py3-none-any.whl.
File metadata
- Download URL: qcoder-0.2.0a1-py3-none-any.whl
- Upload date:
- Size: 114.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e08331f535aa222112020c9fe6099a68af8084a2bf6cd37049c68f8b76e18fc
|
|
| MD5 |
72d7f6b34c635adb14c8ce5a997bdf42
|
|
| BLAKE2b-256 |
fb2291ec94c00debfb014c76dad27e13f379fdc69cb7711a6e712f6584d1ee66
|