QVoting — Quantum Voting Framework
Quantum voting circuits with integrated readout error mitigation and ZNE for NISQ hardware.
Validated on IBM Quantum hardware (ibm_torino Eagle-r3 and ibm_fez Heron-r1). Bell state fidelity: 97.27% on ibm_torino, 93.65% on ibm_fez.
pip install qvoting
For IBM Quantum hardware execution:
pip install qvoting[ibm]
Quick Start
from qvoting.voters import majority_voter
from qvoting.mitigation import apply_readout_mitigation
from qvoting.core import execute_circuit
# Build a 3-input majority voter
voter = majority_voter(num_inputs=3)
print(voter.draw())
# Run on local Aer simulator
counts = execute_circuit(voter, backend="aer", shots=1024)
print(counts) # {'1': 1024} (all inputs |1> -> majority = |1>)
# Apply readout error mitigation
counts_mitigated = apply_readout_mitigation(counts, calibration_counts={'0': 50, '1': 974})
Package Structure
qvoting/
+-- core/
| +-- circuits.py <- Parity sub-circuits & multi-circuit load balancer
| +-- execution.py <- Unified backend (Aer simulator + IBM Quantum)
| +-- logging.py <- JobLogger for persistent IBM job tracking
+-- voters/
| +-- majority.py <- Toffoli majority voters (3 and 5 inputs)
| +-- hierarchical.py <- Hierarchical voter (9->3->1, 13 qubits)
+-- mitigation/
+-- readout.py <- Confusion matrix readout error mitigation
+-- zne.py <- Zero-Noise Extrapolation via gate folding
Features
- Quantum majority voters - 3-input and 5-input Toffoli-based circuits
- Hierarchical voting - 9->3->1 reduction (13 qubits total)
- Quantum load balancer - parity sub-circuit distributes depth across sub-circuits O(n/k)
- Readout error mitigation - confusion matrix inversion (M tensor-n approximation)
- Zero-Noise Extrapolation - gate folding with linear regression intercept
- Unified execution - same API for Aer simulator and IBM Quantum hardware
Hardware Benchmark Results
| Backend | Bell Fidelity | TVD | Device |
|---|---|---|---|
| ibm_torino | 97.27% | 0.0557 | Eagle-r3 (133q) |
| ibm_fez | 93.65% | 0.0918 | Heron-r1 (156q) |
| Improvement | +3.87 pp | -39.3% | - |
GHZ 3-qubit state on ibm_torino (2048 shots): TVD = 0.062, spurious states < 5%.
Module Status
| Module | Implemented | Tests |
|---|---|---|
core.circuits |
Yes | 5/5 |
core.execution |
Yes | - |
core.logging |
Yes | - |
voters.majority |
Yes | 6/6 |
voters.hierarchical |
Yes | - |
mitigation.readout |
Yes | 4/4 |
mitigation.zne |
Yes | - |
| Total | 15 tests | 15/15 |
Citation
If you use QVoting in your research, please cite:
@article{qvoting2026,
title = {Quantum Voting Circuits with Integrated Error Mitigation on NISQ Hardware},
author = {Corredor Guasca, Nicolas Yesid},
year = {2026},
journal = {[under review]},
url = {https://arxiv.org/abs/[TODO]}
}
License
MIT - see LICENSE.
Metadata
Release files for qvoting 0.1.5
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 |
|---|---|---|---|---|
| qvoting-0.1.5.tar.gz | 46.2 kB | Without provenance | Details for qvoting-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qvoting-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for qvoting-0.1.5-py3-none-any.whl |
Total release size: 93.3 kB
Release files / qvoting-0.1.5.tar.gz
| Download URL | qvoting-0.1.5.tar.gz |
|---|---|
| Size | 46.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a67e7eff54c4516e8aba1ddb1b7756dc854153c24bb74bbb7acab524c1040dc2
|
|
BLAKE2b-256 checksum How to use checksums |
812cd4aac9d50b2e53f7d24b34c0456a9e190eb910bdc2f40f480b532532a09b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / qvoting-0.1.5-py3-none-any.whl
| Download URL | qvoting-0.1.5-py3-none-any.whl |
|---|---|
| Size | 47.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
672ff6edc41ae82299d1db03d65e93c220d45ff2e9960e3597fe1d11dec61703
|
|
BLAKE2b-256 checksum How to use checksums |
543b4101f04ae1a693594adbcfb17abce0580f69733807439d3a174973fedfd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for qvoting 0.1.5
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.