qemlib
A modular Quantum Error Mitigation (QEM) library built on Qiskit.
qemlibprovides research-oriented implementations of major quantum error mitigation techniques, designed for experimentation, benchmarking, and research workflows in noisy quantum computation.
🚀 Features
- Dynamical Decoupling (DD)
- Zero Noise Extrapolation (ZNE)
- Pauli Twirling (PT)
- Readout Error Mitigation (REM)
- Modular, researcher-focused API
- Full compatibility with Qiskit circuits
📦 Installation
Install directly from GitHub:
pip install git+https://github.com/hmzbn/qemlib.git
⚡ Quick Start
See the examples/ directory for complete usage demonstrations of all implemented mitigation techniques.
📁 Examples
dd_exp.ipynb— Dynamical decoupling workflowszne_exp.ipynb,zne_exp2.ipynb— Zero noise extrapolation experimentspt_exp.ipynb,pt_exp2.ipynb— Pauli twirling testsrem_exp.ipynb— Readout error mitigation demo
🧠 Implemented Techniques
Dynamical Decoupling (DD)
- Location:
qemlib/dd/ - Modules:
dd.py— DD execution wrapperinsertion.py— Circuit-level DD insertionseq.py— Sequence definitions (xx,xp_xm,xy4)
Zero Noise Extrapolation (ZNE)
- Location:
qemlib/zne/ - Modules:
zne.py— Core logicfolding.py— Circuit folding methodsfunctional.py— Workflow helpersmodels.py— Extrapolation functionsexecutor.py— Execution abstractionplotting.py— Visualization utilities
Pauli Twirling (PT)
- Location:
qemlib/pt/ - Modules:
pt.py— Twirling logicpauli.py— Operator utilitiestwirl.py— Transformation routines
Readout Error Mitigation (REM)
- Location:
qemlib/rem/ - Modules:
rem.py— Calibration and mitigation tools
🏗️ Architecture & Design Principles
- Modular architecture with clear separation of concerns:
- Circuit transformation
- Noise scaling
- Execution
- Post‑processing
- Minimal abstraction overhead
- Research‑oriented flexibility and transparency
- Built on top of Qiskit for compatibility and extensibility
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
📜 License
This project is released under the MIT License.
📖 Citation
If you use qemlib in academic work, please cite:
@software{qemlib,
author = {Hamza Benkadour},
title = {qemlib: A Modular Quantum Error Mitigation Library},
year = {2026},
url = {https://github.com/hmzbn/qemlib}
}
Happy mitigating! 😊
Metadata
Release files for qemlib 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qemlib-0.1.0.tar.gz | 12.6 kB | Without provenance | Details for qemlib-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qemlib-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for qemlib-0.1.0-py3-none-any.whl |
Total release size: 27.8 kB
Release files / qemlib-0.1.0.tar.gz
| Download URL | qemlib-0.1.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79869d674c277fd50d38a750bf7f7947f2278918d1d8ba3b50137f18ca395f30
|
|
BLAKE2b-256 checksum How to use checksums |
754d3e00234676be2a60da94a360c17b6ecc4af5192cda15a6afa2ecac269014
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / qemlib-0.1.0-py3-none-any.whl
| Download URL | qemlib-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
feb7cc8631dc505599627b782b9b96fe87f9f617c7841f8927825fc580f3ed3c
|
|
BLAKE2b-256 checksum How to use checksums |
e64253984b1eb8ac7d813f51ce9726e4a6fceb96944cd9c6429f641eb2b20a9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for qemlib 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.