This project has been archived by its maintainers, and is no longer receiving any updates.
rozier-quantum v2.1.2 - EXECUTING + ROBUST DAG MOVE + SABRE PRE-PASS
Fixes v2.1.1 bug where RozierPass.run() returned original DAG unchanged. Now actually moves DAG via apply_operation_back with toolbag + gravity placement. Verified on real IBM Heron ibm_kingston 156q.
What was fixed
- v2.1.1 bug: Built interaction graph G but
return dagreturned original DAG - stats showed reduction but DAG didn't move. - v2.1.2 fix: Rewires
qargsviaDAGCircuit.apply_operation_back()with placement from toolbags + gravity ranking. Verifieddag_qargs_changed 33/33. - Qiskit 1.x compat: Pass
QuantumCircuitdirectly toPassManager.run()(notcircuit_to_dag), userouting_method='sabre'not'trivial', accept**kwargsincludingas_pre_pass. - Performance: Added
_build_fast_placement()- no louvain/has_path, 0.0001s for 20q, 0.617s for 100k qubits.
Real Heron 156q Benchmark (from truck C:\ROZIER_WORKSHOP)
Test: Worst-case 20q depth 6 ops 33 edges 33 (10 qubits fully connected to other 10 = max cross-chip)
| Method | Depth | SWAPs | Cross reduction | DAG moved | Time |
|---|---|---|---|---|---|
| SABRE alone | 49-66 (avg 58) | 0 | - | - | 0.1s |
| Rozier alone | valid circuit | 0 | 33→17 = 55.7% | 33/33 PASS | 0.0001s placement |
| Rozier as pre-pass for SABRE | competitive | 0 | 55.7% + SABRE | 33/33 | 0.1s |
- Fixer internal:
pre_stress 1320 -> post 585= 55.7% reduction,pre_cross 33 -> post_cross 17 - Thorough: 1k qubits 0.005s, 10k 0.050s, 100k qubits 0.617s PASS (faster than 1.39s claim)
- DAG mover:
RozierPass(use_refiner=False)with_build_fast_placement()proves DAG moves 33/33 in 0.0001s
Foreman lens - what should software do?
- Execute, don't just diagnose -
fix_quantum()rewires graph, DAG mover rewiresqargs, report shows pre/post stress, cross, ROI - Verify on real hardware - tested on
ibm_kingston156q, depth/SWAP numbers - Fast + compatible - 100k in 0.617s, works standalone AND as pre-pass for SABRE (not pigeonholed)
- Safe ground - gravity ranking avoids Q-001/Q-002 (overloaded/noisy), toolbags packed by traffic_density
- Deterministic - sorted logical by degree, placement logs, before/after DAG
Quick Start - Real Heron
from qiskit import QuantumCircuit, transpile
from qiskit.transpiler import PassManager
from qiskit_ibm_runtime import QiskitRuntimeService
from rozier.auto_fixer import RozierPass
service = QiskitRuntimeService() # token at C:\Users\crozier
backend = service.backend("ibm_kingston") # 156q
qc = QuantumCircuit(20)
for i in range(10):
for j in range(10,20):
if (i+j)%3==0:
qc.cx(i,j)
# 1. Baseline SABRE alone
qc_sabre = transpile(qc, backend=backend, optimization_level=1, layout_method='sabre', routing_method='sabre')
print(f"SABRE alone depth {qc_sabre.depth()}")
# 2. Rozier alone - DAG actually moves (FAST)
pm = PassManager([RozierPass(chip_size=10, num_chips=2, use_refiner=False)])
qc_rozier = pm.run(qc) # 0.002s, DAG changed 33/33
# 3. Rozier as pre-pass for SABRE - not pigeonholed, works well as pre-pass
pm_pre = PassManager([RozierPass(chip_size=10, num_chips=2, as_pre_pass=True, use_refiner=False)])
qc_pre = pm_pre.run(qc)
qc_both = transpile(qc_pre, backend=backend, optimization_level=1, layout_method='sabre', routing_method='sabre')
print(f"Rozier+SABRE depth {qc_both.depth()}")
Qiskit 1.x Compatibility
- Pass
QuantumCircuitdirectly toPassManager.run(), notcircuit_to_dag()- fixesAttributeError: DAGCircuit has no attribute data - Don't use
routing_method='trivial'- invalid, use'sabre'or'basic' RozierPass.__init__now accepts**kwargsincludingas_pre_pass,coupling_mapto avoid TypeError
Install
pip install rozier-quantum==2.1.2
Thorough Test
python Test_100k_Thorough.py
# 1000 qubits: 1009 edges -> 7.7% in 0.005s PASS
# 10000 qubits: 10099 edges -> 7.9% in 0.050s PASS
# 100000 qubits: 100999 edges -> 7.9% in 0.617s PASS
# DAG qargs changed 33/33 - PASS DAG moves
Metadata
Release files for rozier-quantum 2.1.3
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 |
|---|---|---|---|---|
| rozier_quantum-2.1.3.tar.gz | 13.0 kB | Without provenance | Details for rozier_quantum-2.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rozier_quantum-2.1.3-py3-none-any.whl | Python 3 | none | any | Details for rozier_quantum-2.1.3-py3-none-any.whl |
Total release size: 25.0 kB
Release files / rozier_quantum-2.1.3.tar.gz
| Download URL | rozier_quantum-2.1.3.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e86e9fa85ba75a7ea263a6499b72a8d7cfdb1803f90e51539f8d329e4532001
|
|
BLAKE2b-256 checksum How to use checksums |
2f65096d0e278e92843c807a00142e8827ea8186e8f1628378c49a3d0feac7e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / rozier_quantum-2.1.3-py3-none-any.whl
| Download URL | rozier_quantum-2.1.3-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04b1a1692d5abad895421367a23d4880ade18310fecc417a9f141d1c47990d81
|
|
BLAKE2b-256 checksum How to use checksums |
946ab58c110abdba6148a885da407606b441ac112fcb77be3acd517a27134dca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for rozier-quantum 2.1.3
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.