# QPC Traffic-Flow Compare Task (Volkswagen / D-Wave 2017) ## External reference - **Paper:** Neukart et al., *Traffic flow optimization using a quantum annealer*, [arXiv:1708.01625](https://arxiv.org/abs/1708.01625) - **Data:** [T-Drive](https://www.microsoft.com/en-us/research/publication/t-drive-trajectory-data-sample/) + OpenStreetMap (OSMnx) - **Original hardware:** D-Wave 2X via **qbsolv** hybrid (1,254 variables did not fit one annealer pass) - **Metric:** **Congested-road count** (segment used in >10 routes on full 418-car instance) ## What QPC proves Same public problem class, **reconstructed instance**, **gate-model IBM** execution: | Workflow | IBM jobs | QPC role | |----------|----------|----------| | qbsolv-style partition | Many (classical loop) | **Anti-pattern** we replace | | Sequential 3-zone QAOA | 3 | Zone partition without transjunction | | Single weighted QAOA | 1 | Ribeiro-style baseline | | **QPC polycontextural** | **1** | 3 geographic contextures + transjunctions on shared route variables | ## Pilot instance (IBM Fez, June 2026) - **16 cars**, **48 binary variables**, synthetic 6×6 grid with shared arterial bottleneck (faithful QUBO recipe; not bit-identical to VW Fig. 3 matrix) - Scaled congestion threshold (paper uses 10 @ 418 cars) ## Commands ```bash cd site_release_2025_11_15 .venv/bin/python vendor_benchmarks/traffic/test_pipeline.py .venv/bin/python vendor_benchmarks/traffic/qpc_traffic_compare.py --mode verify --n-cars 16 --grid 6 .venv/bin/python vendor_benchmarks/traffic/qpc_traffic_compare.py --mode dry-run --n-cars 16 --grid 6 --shots 4096 unset QISKIT_IBM_TOKEN IBM_QUANTUM_TOKEN export QISKIT_IBM_DISABLE_INSTANCE_CRN_FILE=1 QISKIT_IBM_INSTANCE=open-instance .venv/bin/python vendor_benchmarks/traffic/qpc_traffic_compare.py \ --mode ibm --backend ibm_fez --n-cars 16 --grid 6 --shots 8192 \ --ibm-jobs full -o results/traffic_compare_ibm_fez_16c_full.json ``` ## Real Beijing data ```bash pip install osmnx networkx pandas # Download T-Drive CSVs into taxi_log/ python3 -c " from vendor_benchmarks.traffic.traffic_pipeline import RealDataPipeline rp = RealDataPipeline(tdrive_dir='taxi_log') rp.load_graph() rp.load_trajectories() # when implemented " ``` ## Artifacts - `results/traffic_compare_ibm_fez_16c.json` — QPC job `d8gq6m42upec739k6pig` - `QPC_TRAFFIC_COMPARE.html` — public report