Skip to content

Commit e80e8ce

Browse files
committed
docs: polish docstrings, READMEs, and package metadata across all packages
1 parent de3cd09 commit e80e8ce

28 files changed

Lines changed: 827 additions & 735 deletions

File tree

README.md

Lines changed: 65 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,71 @@
66

77
# devqubit
88

9-
**Local-first experiment tracking for quantum computing.** Capture circuits, backend state, and configuration — runs are reproducible, comparable, and easy to share. Access your data via Python API, CLI, or Web UI.
9+
**Local-first experiment tracking for quantum computing.**
10+
11+
Capture circuits, backend state, and configuration automatically — runs are reproducible, comparable, and easy to share. Access your data via Python API, CLI, or Web UI.
1012

1113
> [!WARNING]
1214
> **Status:** Alpha — devqubit APIs may evolve in `0.x` releases.
1315
> Users should expect frequent changes that are likely to be incompatible with previously published versions.
1416
1517
## Why devqubit?
1618

17-
General-purpose experiment trackers (MLflow, Weights & Biases, neptune.ai) are great for logging parameters, metrics, and artifacts. But quantum workloads need *extra structure* that isn't first-class there by default: capturing what actually executed (program + compilation), where it executed (backend/device), and how it executed (runtime options).
19+
General-purpose experiment trackers (MLflow, W&B, neptune.ai) work well for classical ML, but quantum workloads need structure they don't provide out of the box: what actually executed (program + compilation), where it ran (backend/device), and how it ran (runtime options, calibration state).
1820

1921
| Challenge | MLflow / W&B / neptune.ai | devqubit |
20-
|-----------|-------------------|----------|
21-
| **Circuit artifacts** | manual file logging | OpenQASM 3 + SDK-native formats (automatic) |
22-
| **Device context** | manual | backend snapshots, calibration/noise context (automatic) |
23-
| **Reproducibility** | depends on what you log | program + device + config fingerprints (automatic) |
24-
| **Result comparison** | metric/table-oriented | distribution-aware, structural diff, drift detection |
25-
| **Noise-aware verification** | requires custom logic | configurable policies with noise tolerance |
26-
| **Portable sharing** | artifact/version workflows | self-contained bundles (manifest + SHA-256 digests) |
22+
|---|---|---|
23+
| **Circuit artifacts** | Manual file logging | OpenQASM 3 + SDK-native formats (automatic) |
24+
| **Device context** | Manual | Backend snapshots, calibration/noise context (automatic) |
25+
| **Reproducibility** | Depends on what you log | Program + device + config fingerprints (automatic) |
26+
| **Result comparison** | Metric/table-oriented | Distribution-aware TVD, structural diff, drift detection |
27+
| **Noise-aware verification** | Requires custom code | Configurable policies with noise tolerance |
28+
| **Portable sharing** | Artifact/version workflows | Self-contained bundles (manifest + SHA-256 digests) |
2729

28-
**devqubit is quantum-first:** same circuit, same backend, different day — different results. devqubit helps you track *why*.
30+
Same circuit, same backend, different day — different results. devqubit helps you track *why*.
2931

3032
## Features
3133

3234
- **Automatic circuit capture** — QPY, OpenQASM 3, SDK-native formats
3335
- **Multi-SDK support** — Qiskit, Qiskit Runtime, Braket, Cirq, PennyLane, CUDA-Q
3436
- **Content-addressable storage** — deduplicated artifacts with SHA-256 digests
3537
- **Reproducibility fingerprints** — detect changes in program, device, or config
36-
- **Run comparison** — TVD analysis, structural diff, calibration drift
38+
- **Run comparison** — TVD analysis, structural diff, calibration drift detection
3739
- **CI/CD verification** — baselines with configurable noise-aware policies
3840
- **Portable bundles** — export/import runs as self-contained ZIPs
41+
- **Web UI** — browse runs, view artifacts, compare experiments
3942

4043
## Documentation
4144

4245
📚 **<https://devqubit.readthedocs.io>**
4346

4447
## Installation
4548

46-
**Requirements:** Python 3.11+
49+
**Python 3.11+** required.
4750

4851
```bash
4952
pip install devqubit
53+
```
5054

51-
# With SDK adapters
55+
Install with an SDK adapter:
56+
57+
```bash
5258
pip install "devqubit[qiskit]" # Qiskit + Aer
5359
pip install "devqubit[qiskit-runtime]" # IBM Quantum Runtime
5460
pip install "devqubit[braket]" # Amazon Braket
5561
pip install "devqubit[cirq]" # Google Cirq
5662
pip install "devqubit[pennylane]" # PennyLane
5763
pip install "devqubit[cudaq]" # NVIDIA CUDA-Q
58-
pip install "devqubit[all]" # All adapters
64+
pip install "devqubit[all]" # all adapters
65+
```
5966

60-
# With local web UI
61-
pip install "devqubit[ui]"
67+
Optional extras:
68+
69+
```bash
70+
pip install "devqubit[ui]" # local web UI
6271
```
6372

64-
## Quick start
73+
## Quick Start
6574

6675
### Track an experiment
6776

@@ -86,7 +95,7 @@ with track(project="bell-state", run_name="baseline-v1") as run:
8695
print(f"Run saved: {run.run_id}")
8796
```
8897

89-
The adapter automatically captures: circuit (QPY + QASM3), backend config, job metadata, and results.
98+
The adapter automatically captures the circuit, backend config, job metadata, and results.
9099

91100
### Compare runs
92101

@@ -95,13 +104,11 @@ from devqubit.compare import diff
95104

96105
result = diff("baseline-v1", "experiment-v2", project="bell-state")
97106

98-
print(result.identical) # False
99-
print(result.program.match_mode) # "structural"
100-
print(result.tvd) # 0.023
107+
print(result.identical) # False
108+
print(result.program.structural_match) # True — same circuit structure
109+
print(result.tvd) # 0.023
101110
```
102111

103-
Or via CLI:
104-
105112
```bash
106113
devqubit diff baseline-v1 experiment-v2 --project bell-state
107114
```
@@ -113,32 +120,37 @@ from devqubit.compare import verify_baseline, VerifyPolicy
113120

114121
result = verify_baseline(
115122
"nightly-run",
116-
project="vqe-hydrogen",
117-
policy=VerifyPolicy(tvd_threshold=0.05),
123+
project="bell-state",
124+
policy=VerifyPolicy(tvd_threshold=0.05, noise_factor=1.2),
118125
)
119126

120-
assert result.ok, result.reason
127+
assert result.ok, result.verdict.summary
121128
```
122129

123130
```bash
124131
# With JUnit output for CI pipelines
125-
devqubit verify nightly-run --project vqe-hydrogen --junit results.xml
132+
devqubit verify nightly-run --project bell-state --junit results.xml
126133
```
127134

128135
## CLI
129136

130137
```bash
131-
devqubit list # List runs
132-
devqubit show <run> --project myproj # Run details
133-
devqubit diff <a> <b> --project myproj # Compare runs
134-
devqubit ui # Web interface
138+
devqubit list # list runs
139+
devqubit show <run> --project <proj> # run details
140+
devqubit diff <a> <b> --project <proj> # compare runs
141+
devqubit baseline set <proj> <run> # set baseline
142+
devqubit verify <run> --project <proj> # verify against baseline
143+
devqubit pack <run> -o bundle.zip # export bundle
144+
devqubit ui # launch web UI
135145
```
136146

137-
See [CLI reference](https://devqubit.readthedocs.io/en/latest/reference/cli.html) for all commands.
147+
See the [CLI reference](https://devqubit.readthedocs.io/en/latest/reference/cli.html) for all commands.
138148

139149
## Web UI
140150

141151
```bash
152+
pip install "devqubit[ui]"
153+
142154
devqubit ui
143155
# → http://127.0.0.1:8080
144156
```
@@ -149,15 +161,33 @@ devqubit ui
149161
</a>
150162
&nbsp;&nbsp;
151163
<a href="docs/assets/ui_run_view.png">
152-
<img src="docs/assets/ui_run_view.png" alt="Run comparison" width="45%"/>
164+
<img src="docs/assets/ui_run_view.png" alt="Run detail" width="45%"/>
153165
</a>
154166
</p>
155167

156168
Browse runs, view artifacts, compare experiments, and manage baselines.
157169

170+
## Architecture
171+
172+
devqubit is a monorepo with multiple packages:
173+
174+
| Package | Description |
175+
|---|---|
176+
| **`devqubit`** | Public Python API (thin facade) |
177+
| **`devqubit-engine`** | Core logic: tracking, storage, comparison, CLI |
178+
| **`devqubit-ui`** | Web UI (optional) |
179+
| **`devqubit-qiskit`** | Qiskit adapter |
180+
| **`devqubit-qiskit-runtime`** | Qiskit Runtime adapter |
181+
| **`devqubit-braket`** | Amazon Braket adapter |
182+
| **`devqubit-cirq`** | Google Cirq adapter |
183+
| **`devqubit-pennylane`** | PennyLane adapter |
184+
| **`devqubit-cudaq`** | NVIDIA CUDA-Q adapter |
185+
186+
Users install `devqubit` (plus optional extras). All public API lives in the `devqubit` namespace; engine internals are not part of the public API.
187+
158188
## Contributing
159189

160-
We welcome contributions of all kinds — bug fixes, docs, new adapters, or feature ideas.
190+
We welcome contributions — bug fixes, docs, new adapters, or feature ideas.
161191

162192
1. Read [CONTRIBUTING.md](CONTRIBUTING.md) for setup and guidelines
163193
2. Check [open issues](https://github.com/devqubit-labs/devqubit/issues) or start a [discussion](https://github.com/devqubit-labs/devqubit/discussions)
@@ -171,7 +201,7 @@ uv run pre-commit install
171201
uv run pytest
172202
```
173203

174-
Early project = high impact contributions. Jump in!
204+
Early project high impact contributions. Jump in!
175205

176206
## Community
177207

packages/devqubit-braket/README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# devqubit-braket
22

3-
Amazon Braket adapter for devqubit. Automatically captures circuits, results, and device information from Braket simulators and QPUs.
3+
[![PyPI](https://img.shields.io/pypi/v/devqubit-braket)](https://pypi.org/project/devqubit-braket/)
4+
5+
Amazon Braket adapter for [devqubit](https://github.com/devqubit-labs/devqubit) — automatic circuit capture, device property snapshots, and result logging for Braket local simulators and managed QPUs.
6+
7+
> [!IMPORTANT]
8+
> **This is an internal adapter package.** Install via `pip install "devqubit[braket]"` and use the `devqubit` public API.
49
510
## Installation
611

712
```bash
8-
pip install devqubit[braket]
13+
pip install "devqubit[braket]"
914
```
1015

1116
## Usage
@@ -25,9 +30,18 @@ with track(project="braket-exp") as run:
2530

2631
## What's Captured
2732

28-
- **Circuits** — OpenQASM 3, Braket IR
29-
- **Results** — Measurement counts, result types
30-
- **Device info** — Device ARN, properties, topology
33+
| Artifact | Kind | Role |
34+
|---|---|---|
35+
| OpenQASM 3 | `source.openqasm3` | `program` |
36+
| Circuit diagram | `braket.circuits.diagram` | `program` |
37+
| Measurement counts | `result.counts.json` | `result` |
38+
| Raw result | `result.braket.raw.json` | `result_raw` |
39+
| Device properties | `device.braket.raw_properties.json` | `device_raw` |
40+
| Execution envelope | `devqubit.envelope.json` | `envelope` |
41+
42+
## Documentation
43+
44+
See the [Adapters guide](https://devqubit.readthedocs.io/en/latest/guides/adapters.html) for details on wrapping options, batch execution, and performance tuning.
3145

3246
## License
3347

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2026 devqubit
3+
14
"""
2-
Internal Amazon Braket adapter implementation package for devqubit.
5+
Amazon Braket adapter for devqubit.
6+
7+
Provides automatic circuit capture (OpenQASM 3), device property
8+
snapshots, and result logging for Braket local simulators and managed
9+
QPUs. Registered as a ``devqubit.adapters`` entry point and discovered
10+
automatically by :meth:`Run.wrap`.
311
4-
This package provides integration with Braket samplers and simulators,
5-
enabling automatic tracking of quantum circuit execution and results.
6-
It is installed as a dependency of `devqubit` and is not considered
7-
part of the stable public API. Prefer importing from `devqubit`.
12+
This package is an internal implementation detail of
13+
``devqubit[braket]``. Users should import from :mod:`devqubit`,
14+
not from this package directly.
815
"""

packages/devqubit-cirq/README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# devqubit-cirq
22

3-
Google Cirq adapter for devqubit. Automatically captures circuits and results from Cirq simulators.
3+
[![PyPI](https://img.shields.io/pypi/v/devqubit-cirq)](https://pypi.org/project/devqubit-cirq/)
4+
5+
Google Cirq adapter for [devqubit](https://github.com/devqubit-labs/devqubit) — automatic circuit capture, simulator snapshots, and result logging for Cirq samplers and simulators.
6+
7+
> [!IMPORTANT]
8+
> **This is an internal adapter package.** Install via `pip install "devqubit[cirq]"` and use the `devqubit` public API.
49
510
## Installation
611

712
```bash
8-
pip install devqubit[cirq]
13+
pip install "devqubit[cirq]"
914
```
1015

1116
## Usage
@@ -26,11 +31,36 @@ with track(project="cirq-exp") as run:
2631
result = simulator.run(circuit, repetitions=1000)
2732
```
2833

34+
### Parameter Sweeps
35+
36+
```python
37+
import sympy
38+
39+
theta = sympy.Symbol("theta")
40+
circuit = cirq.Circuit([
41+
cirq.Ry(theta).on(q0),
42+
cirq.measure(q0, key="m"),
43+
])
44+
45+
with track(project="sweep") as run:
46+
simulator = run.wrap(cirq.Simulator())
47+
sweep = cirq.Linspace("theta", 0, 2 * 3.14159, 10)
48+
results = simulator.run_sweep(circuit, sweep, repetitions=100)
49+
```
50+
2951
## What's Captured
3052

31-
- **Circuits** — Cirq JSON, OpenQASM 3
32-
- **Results** — Measurement counts, histograms
33-
- **Simulator info** — Simulator type, configuration
53+
| Artifact | Kind | Role |
54+
|---|---|---|
55+
| Cirq JSON | `cirq.circuit.json` | `program` |
56+
| Circuit diagram | `cirq.circuits.txt` | `program` |
57+
| Measurement counts | `result.counts.json` | `result` |
58+
| Device properties | `device.cirq.raw_properties.json` | `device_raw` |
59+
| Execution envelope | `devqubit.envelope.json` | `envelope` |
60+
61+
## Documentation
62+
63+
See the [Adapters guide](https://devqubit.readthedocs.io/en/latest/guides/adapters.html) for parameter sweeps, performance tuning, and batch execution.
3464

3565
## License
3666

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2026 devqubit
3+
14
"""
2-
Internal Cirq adapter implementation package for devqubit.
5+
Google Cirq adapter for devqubit.
6+
7+
Provides automatic circuit capture (Cirq JSON + OpenQASM 3), simulator
8+
snapshots, and result logging for Cirq samplers and simulators.
9+
Supports ``run``, ``run_sweep``, and ``simulate`` execution modes.
10+
Registered as a ``devqubit.adapters`` entry point and discovered
11+
automatically by :meth:`Run.wrap`.
312
4-
This package provides integration with Cirq samplers and simulators,
5-
enabling automatic tracking of quantum circuit execution and results.
6-
It is installed as a dependency of `devqubit` and is not considered
7-
part of the stable public API. Prefer importing from `devqubit`.
13+
This package is an internal implementation detail of ``devqubit[cirq]``.
14+
Users should import from :mod:`devqubit`, not from this package directly.
815
"""

0 commit comments

Comments
 (0)