microquantum A-Z Conformance Report¶
Scope¶
Prove the public microquantum SDK surface end-to-end with a
no-skip / no-xfail conformance test suite, fix every defect it surfaces,
and pass the standard verification gates.
Branch workflow completed¶
The conformance work landed as 30b7e10 and 29e929a on develop,
was merged into main with a no-fast-forward merge (d2578de), and
was pushed. The report itself was subsequently preserved into the
repository documentation at docs/quality/conformance/.
Gate results¶
Gate |
Command |
Result |
|---|---|---|
Tests |
|
1900 passed, 0 failed |
(full) |
||
mypy |
|
Success, 126 files, no issues |
ruff |
|
All checks passed |
Sphinx |
|
Build succeeded, 0 warnings |
Note: the default pytest addopts add --cov=microquantum; coverage
tracing is roughly 20x slower on this suite and there is no fail_under
threshold, so the functional gate above is reported with --no-cov.
Conformance suite tests/conformance/ (219 tests)¶
File |
Tests |
What it proves |
|---|---|---|
|
11 |
Constructor signatures, errors, counts, params, circuits, states, problems, operators, optimizers surface. |
|
1 |
All 129 example scripts in |
|
70 |
Each example prints its contract (regex/attribute-based registry). |
|
17 |
Grover, Shor, QAOA, VQE/H2, HamiltonianSimulation, optimizers, search/optimization problems. |
|
14 |
MQ-11 execution core + parameter sweep, MQ-12 Grover/QAOA/VQE, MQ-13 experiments/analysis. |
|
12 |
to_dict/from_dict/to_json/from_json round trips incl. nested and typed content. |
|
97 |
Every |
|
3 |
Fresh wheel installs cleanly in a clean venv; byte-identical behavior + version to source install. |
Defects found and fixed during the gate¶
API-level (docs/examples were stale; the SDK was correct):
depthwas documented as an attribute in the class docstring but is a method (examples/01_basic_circuits.pycalledqc.depth); the SDK had already madedepth()callable (commit994ef4c). Aligned call sites + docstring; reworded the docstring “Methods:” list that autoapi duplicated (Sphinx -W fix).SearchProblem(name=...)receivednamepositionally and by keyword.PhaseEstimation(num_ancillae=...)->num_counting_qubits;unitaryrequired.QAOA(p=...)Qiskit-style kwarg ->QAOA.from_problem(...).BackendCapabilities.qubit_capacity->max_qubits.LocalProvider.available_backends()->backends().BenchmarkResult.quantum_volume/clops->value;Operator.CNOTnot valid for GST (single-qubit only).Calling properties as methods (
executions(),dim(),total_shots(),target_indices(),keys(),depth) and methods as attributes.ParameterSweepomitting the swept parameter from the base circuit; sweep keys are strings, notParameterobjects.Missing imports in doc blocks (
sample_state,QuantumCircuit, …).SamplingProblem(**data)on a serialized dict ->from_dict(data).ExperimentResult/ExecutionRecord/OptimizerResultattribute-vs-method semantics fixed across 32 docs pages.
Docs pages repaired (48/48 pages green): algorithms (overview, grover,
phase-estimation, qaoa, vqe), analysis (aggregation, expectations, states,
statistics), concepts (algorithms, circuits, gradients, measurement,
parameters, problems, quantum-states), execution (backends, capabilities,
custom-backends, execution-core, providers, runtime), experiments
(experiments, parameter-sweeps, reproducibility, results),
getting-started (first-experiment, first-measurement, quickstart),
problems (sampling, search), troubleshooting, tutorials/benchmarks, plus
docs/examples/index.rst rewritten against the real example tree.
Future API cleanup (backlog)¶
The conformance review identified Operator.from_dict without a
corresponding Operator.to_dict.
Identified during: conformance review of the public API serialization contracts.
Scope: this item is not part of MQ-11 (Quantum Execution Core), MQ-12 (Parameterized Circuits), MQ-13 (Analytical Gradients), or the documentation task that preserved this report.
Impact today: no compatibility or API change is introduced now; the SDK surface is unchanged.
Next step: evaluate this item during a future API cleanup phase, together with the related serialization asymmetry noted below (
StateVectorandQuantumCircuithave noto_dict).
It is deliberately recorded as a backlog item only: no code, fake TODO, or test changes accompany it.
Known observations (not blockers)¶
Serialization asymmetry:
Operatorhasfrom_dictbut noto_dict(see Future API cleanup above);StateVectorandQuantumCircuithave noto_dict.Coverage gate is impractical in its current form (no
fail_underconfigured) — consider--cov-report=termon a smoke subset or--no-covin CI.
Release prerequisite reminder (AGENTS.md)¶
No PyPI release without: push + green CI + v<version> tag + TestPyPI
check first.