pqblocks-qiea
Quantum-Inspired Evolutionary Algorithm (QIEA) with Q-bit representations and quantum rotation gates for Ising and QUBO optimization problems.
What It Is
pqblocks-qiea implements the Quantum-Inspired Evolutionary Algorithm (QIEA) for combinatorial optimization on Ising spin systems and Quadratic Unconstrained Binary Optimization (QUBO) problems.
In QIEA, individuals in the population are represented as strings of Q-bits (quantum-inspired probabilistic bits) characterized by probability amplitudes $[\alpha_i, \beta_i]^T$ satisfying $|\alpha_i|^2 + |\beta_i|^2 = 1$. The state of a Q-bit represents the probability of collapsing to spin $+1$ or $-1$.
Evolution is driven by quantum rotation gates $U(\Delta \theta)$, which rotate individual Q-bit state vectors toward candidate best configurations found by the population. This mechanism enables a balance between exploratory global search (via superposition-like probability amplitudes) and exploitative local refinement (via targeted angular rotation).
Key Features
- Probabilistic Q-Bit Ensembles: Each individual maintains $N$ Q-bit amplitudes $[\alpha_i, \beta_i]^T$ initialized in balanced superposition ($\alpha_i = \beta_i = 1/\sqrt{2}$).
- Quantum Rotation Gate Operators: Amplitudes are steered toward the best individual using rotation gates $U(\theta)$ with lookup-table rotation signs.
- Auto-Derived Hyperparameters: Population size auto-scales as $\max(10, \min(100, 2N))$, with default base rotation step $\theta_0 = 0.05\pi$.
- High-Performance Numba JIT Kernel: Fast inner evolutionary loop with pure-Python reference fallback.
- Reference Instance Suite: Includes planted golden instances with mathematically proven ground states for verification and benchmarking.
Installation
pip install pqblocks-qiea
Quickstart
import numpy as np
from pqblocks_qiea import solve_ising
# 4-spin antiferromagnetic ring
N = 4
h = np.zeros(N)
J = np.zeros((N, N))
for i in range(N):
j = (i + 1) % N
J[i, j] = J[j, i] = 1.0
# Solve using QIEA
best_spins, best_energy = solve_ising(
h=h,
J=J,
num_generations=100,
seed=42
)
print("Best Spin State:", best_spins.tolist())
print(f"Best Energy: {best_energy:.6f}")
Execution output:
Best Spin State: [1, -1, 1, -1]
Best Energy: -4.000000
Documentation
- BENCHMARKS.md — Empirical performance comparisons, TTS evaluations, and winning/losing cases
- TESTING.md — Test suite layout, coverage details, and validation procedures
- EVIDENCE.md — Clean-room execution logs and reproducibility artifacts
- VERIFICATION_REPORT.md — Formal release verification gates and checks
- USE_CASES.md — Q-bit rotation tuning and QUBO integration patterns
- SECURITY_NOTES.md — Numerical safeguards, non-cryptographic scope, and stability bounds
- AGENTS.md — Machine-readable interfaces and guidelines for autonomous agents
- CHANGELOG.md — Version history and release notes
Metadata
Release files for pqblocks-qiea 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 |
|---|---|---|---|---|
| pqblocks_qiea-0.1.0.tar.gz | 28.1 kB | Without provenance | Details for pqblocks_qiea-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pqblocks_qiea-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pqblocks_qiea-0.1.0-py3-none-any.whl |
Total release size: 45.3 kB
Release files / pqblocks_qiea-0.1.0.tar.gz
| Download URL | pqblocks_qiea-0.1.0.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
495715afde54f22158ecbca7b15ec3619c90124892dd5f5e93748df61d76d2b8
|
|
BLAKE2b-256 checksum How to use checksums |
ccfb683b1a22de0ff6781b91595b6f9a57ffd593f4fad94853139a79ee7b0adc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pqblocks_qiea-0.1.0-py3-none-any.whl
| Download URL | pqblocks_qiea-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c4bdab5dbd7b78c952de457959c23e1dc70dad3f4a28b5fa575bffbe2e47c61
|
|
BLAKE2b-256 checksum How to use checksums |
c31a6b0f54418d08a467943a7538520f6cd74d235e643979fdc93c174623a607
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for pqblocks-qiea 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.