Repository navigation
Releases
Releases · rasidi3112/qmutate
qmutate v0.1.0
First public release of qmutate, a pre-alpha Python library for mutation testing of Qiskit quantum circuits. The API may change in later versions.
What is included
- Mutation operator: removal of one top-level instruction (
remove_instruction). This is the only operator in this release. - Mutant enumeration:
generate_removal_mutants, one candidate per top-level instruction. Barriers and measurements are skipped unless allowed. - Running an oracle:
run_removal_mutantsruns your oracle on the original circuit first, then on every generated mutant, with the outcomeskilled,survived,errorandnot_run. - Metrics and reports: mutation score and
MutationMetrics,report_to_dict(report schema version 1) andformat_text_report. - Equivalence checks:
check_equivalenceandclassify_reportwith theunitaryandideal_distributionmodels, verdictsequivalent,not_equivalentandunknown, and an equivalence-adjusted score. - Sampling:
compare_countsanddistribution_oracle, a finite-shot sampling oracle whose verdicts carry statistical guarantees under stated assumptions.
Research artefacts
The evaluation/ directory holds the Phase 6A study: six circuits, a frozen catalogue of 70 hand-written faults and six test suites, run under a frozen protocol (revision 9) and an approved code freeze on Qiskit 2.6.1 and 2.0.3, with identical results in both. Under the protocol's decision rules H1 and H3 were supported and H4 was not. These results apply only to that catalogue; see evaluation/REPORT.md for every metric and the known limitations.
Requirements and verified versions
- Python
>=3.11andqiskit>=2.0,<3. - Verified on macOS arm64: Python 3.11 with Qiskit 2.0.3 and 2.6.1 (all 803 tests), Python 3.11 with Qiskit 2.0.0 and 2.3.1 (the 632 library tests), and Python 3.13 and 3.14 with Qiskit 2.6.1 (the 632 library tests). Linux, Windows and Python 3.12 are not verified yet.
Installation
qmutate is not on PyPI. Install it from source:
git clone https://github.com/rasidi3112/qmutate.git
cd qmutate
python -m pip install -e ".[test]"License
Apache License 2.0.