pqblocks-qubo¶
Unified mathematical representation and converter library for Quadratic Unconstrained Binary Optimization (QUBO) and Ising formulations.
At a glance
| Area | Quantum-inspired |
| Import | import pqblocks_qubo |
| Command line | library only |
| Version | 0.1.0 (Alpha) |
| Python | >=3.11 |
| Native dependency | none |
| Repository | PQBlocks/qubo-core |
| Licence | Apache-2.0 |
What is pqblocks-qubo?¶
Unified mathematical representation and converter library for Quadratic Unconstrained Binary Optimization (QUBO) and Ising formulations.
Domain Classification: Quantum-inspired classical optimisation: not cryptography, no security claim.
Not cryptography
Quantum-inspired classical optimisation: not cryptography, no security claim.
Install¶
PyPI release staged
pqblocks-qubo installs from its GitHub repository while the PyPI release is staged. The import name and API are identical either way.
Quickstart¶
Executed, not just written
This is the quickstart from the package README. It was run against the package source when this page was generated.
import networkx as nx
from pqblocks_qubo import load_maxcut, to_qubo
# 1. Build a graph and construct native Ising model for MaxCut
G = nx.cycle_graph(4)
bqm_ising = load_maxcut(G)
# 2. Convert transparently to QUBO
bqm_qubo = to_qubo(bqm_ising)
# 3. Evaluate state energy (deterministic evaluation)
sample = {0: 0, 1: 1, 2: 0, 3: 1}
print(f"QUBO Energy: {bqm_qubo.energy(sample)}")
Examples¶
Runnable scripts in the repository:
Documentation and evidence¶
Every PQBlocks package ships the same evidence set, so each claim can be checked against tests, sources and measurements.
-
What it does, install, usage and API.
-
Correct imports, pitfalls and rules for coding assistants.
-
What it protects, hostile input, constant-time and audit status.
-
Test suites, coverage, vectors and what is not covered.
-
Measured performance, including where it loses.
-
Primary sources and the method-to-code map.
-
Self-verification results, defects found and limits.
-
Worked scenarios and when to pick something else.
-
Every release and what changed.
Related packages in Quantum-inspired¶
pqblocks-anneal-sa: Simulated Annealing heuristic solver for Ising and QUBO optimization problems. Quantum-inspired classical…pqblocks-anneal-schedule: Quantum-inspired instance-adaptive simulated annealing with statistics-driven schedule generation for Ising and QUBO…pqblocks-anneal-sqa: Simulated Quantum Annealing (Path-Integral Monte Carlo via Suzuki-Trotter decomposition) heuristic solver for Ising…pqblocks-bifurcation: Simulated Bifurcation (ballistic and discrete) heuristic solver for Ising and QUBO problems. Quantum-inspired…pqblocks-digital-anneal: Digital Annealer-style parallel-trial heuristic solver for Ising and QUBO optimization problems. Quantum-inspired…pqblocks-population-anneal: Population Annealing Monte Carlo heuristic solver for Ising models and QUBO combinatorial optimization.…pqblocks-qiea: Quantum-Inspired Evolutionary Algorithm (QIEA) with Q-bit representations and quantum rotation gates for Ising and…pqblocks-qubo-bench: Benchmarking harness and standard instance loaders for quantum-inspired optimization algorithms against classical…