Skip to main content

Quantum voting circuits with integrated error mitigation for NISQ hardware

Project description

QVoting — Quantum Voting Framework

PyPI version Python 3.9+ License: MIT Tests

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qvoting-0.1.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qvoting-0.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file qvoting-0.1.1.tar.gz.

File metadata

  • Download URL: qvoting-0.1.1.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for qvoting-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6e5dfbc44bc3384f80ec1a7ff41662de5821df029b5d96fedfc09f7cb376a6e9
MD5 7b097081956a0001deb305e0a42dd1e0
BLAKE2b-256 006224e94365ed29000c1a67957d36f0422bd14dd7abfe295814e7d2d1c078c4

See more details on using hashes here.

File details

Details for the file qvoting-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: qvoting-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for qvoting-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1b95d8bd0056a0fa78fdb390ffdbd1081ed29edacde3cbce47f0a9fd5d8b2db
MD5 c8d5bd367c9bc697a80b8083c99e62df
BLAKE2b-256 368a13356b65406aded056d70594b453ac67fb59f8dc30044b53c8c49f42afa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page