Update README.md
Browse files
README.md
CHANGED
|
@@ -1,645 +1,126 @@
|
|
| 1 |
-
# Quantum Kernel Methods on IBM Quantum Hardware
|
| 2 |
-
|
| 3 |
-
*Quantum kernel estimation for binary classification with realistic IBM Quantum hardware noise modeling and optional PSD (positive semidefinite) kernel projection for numerical stability.*
|
| 4 |
-
|
| 5 |
-
<br>
|
| 6 |
-
|
| 7 |
-
[](https://www.python.org/downloads/)
|
| 8 |
-
[](https://opensource.org/licenses/MIT)
|
| 9 |
-
[](https://scholar.google.com/citations?user=tvwpCcgAAAAJ)
|
| 10 |
-
[](https://huggingface.co/Cohaerence)
|
| 11 |
-
|
| 12 |
-
[](https://github.com/christopher-altman/ibm-qml-kernel/actions/workflows/ci.yml)
|
| 13 |
-
[](https://x.com/coherence)
|
| 14 |
-
[](https://www.christopheraltman.com)
|
| 15 |
-
[](https://www.linkedin.com/in/Altman)
|
| 16 |
-
|
| 17 |
-
<br>
|
| 18 |
-
|
| 19 |
-
<picture>
|
| 20 |
-
<source media="(prefers-color-scheme: dark)" srcset="assets/accuracy_comparison_dark.png">
|
| 21 |
-
<img src="assets/accuracy_comparison_light.png" alt="Accuracy comparison: Ideal vs Noisy quantum kernels on IBM hardware noise model">
|
| 22 |
-
</picture>
|
| 23 |
-
|
| 24 |
-
<br>
|
| 25 |
-
|
| 26 |
-
> **TL;DR:** Realistic IBM Quantum noise (T1≈200 µs, T2≈135 µs, ECR error≈0.8%) degrades quantum kernel fidelity by 5–15% but classification capability persists. PSD projection ensures numerical stability under finite-shot noise with negligible impact on well-conditioned kernels.
|
| 27 |
-
|
| 28 |
-
---
|
| 29 |
-
|
| 30 |
-
## Table of Contents
|
| 31 |
-
|
| 32 |
-
- [Background](#background)
|
| 33 |
-
- [Quantum Kernel Methods](#quantum-kernel-methods)
|
| 34 |
-
- [Hardware Noise Effects](#hardware-noise-effects)
|
| 35 |
-
- [PSD Kernel Projection](#psd-kernel-projection)
|
| 36 |
-
- [Quickstart](#quickstart)
|
| 37 |
-
- [Execution Modes](#execution-modes)
|
| 38 |
-
- [Output Directory Semantics](#output-directory-semantics)
|
| 39 |
-
- [CLI Reference](#cli-reference)
|
| 40 |
-
- [Results Summary](#results-summary)
|
| 41 |
-
- [Project Structure](#project-structure)
|
| 42 |
-
- [Installation](#installation)
|
| 43 |
-
- [RAW vs PSD Experiment](#raw-vs-psd-experiment)
|
| 44 |
-
- [Interpreting Results](#interpreting-results)
|
| 45 |
-
- [Branch-Transfer Experiment (Inter-Branch Communication) — Hardware Implementation](#branch-transfer-experiment-inter-branch-communication--hardware-implementation)
|
| 46 |
-
- [What Was Implemented](#what-was-implemented)
|
| 47 |
-
- [Why Visibility Alone Is Insufficient](#why-visibility-alone-is-insufficient)
|
| 48 |
-
- [Quickstart: Reproduce the Results](#quickstart-reproduce-the-results)
|
| 49 |
-
- [Latest Hardware Run (Provenance)](#latest-hardware-run-provenance)
|
| 50 |
-
- [Artifacts & Reproducibility](#artifacts--reproducibility)
|
| 51 |
-
- [Collapse / Nonunitary Channel Constraint Analysis](#collapse--nonunitary-channel-constraint-analysis)
|
| 52 |
-
- [Scaling Roadmap](#scaling-roadmap)
|
| 53 |
-
- [Roadmap](#roadmap)
|
| 54 |
-
- [References](#references)
|
| 55 |
-
- [Citations](#citations)
|
| 56 |
-
- [License](#license)
|
| 57 |
-
- [Contact](#contact)
|
| 58 |
-
|
| 59 |
-
---
|
| 60 |
-
|
| 61 |
-
## Background
|
| 62 |
-
|
| 63 |
-
### Quantum Kernel Methods
|
| 64 |
-
|
| 65 |
-
Quantum kernel methods embed classical data into quantum Hilbert space via parameterized quantum circuits (feature maps), then compute kernel matrices from overlap fidelities between quantum states:
|
| 66 |
-
|
| 67 |
-
$$
|
| 68 |
-
K(x_i, x_j) = \bigl|\langle \phi(x_i) \mid \phi(x_j) \rangle\bigr|^2
|
| 69 |
-
$$
|
| 70 |
-
|
| 71 |
-
where the feature-mapped quantum state is $\lvert\phi(x)\rangle = U(x)\lvert 0\rangle^{\otimes n}$. This project uses the **ZZFeatureMap** from Qiskit, which encodes classical features through single-qubit rotations and ZZ entangling gates:
|
| 72 |
-
|
| 73 |
-
$$
|
| 74 |
-
U_{\mathrm{ZZ}}(\mathbf{x}) = \exp\Bigl(i \sum_{i < j} (\pi - x_i)(\pi - x_j)\, Z_i Z_j\Bigr) \prod_{k} R_z(x_k)\, H_k
|
| 75 |
-
$$
|
| 76 |
-
|
| 77 |
-
The resulting kernel matrix is used with a classical SVM for binary classification.
|
| 78 |
-
|
| 79 |
-
### Hardware Noise Effects
|
| 80 |
-
|
| 81 |
-
Real quantum hardware introduces several noise sources that degrade kernel fidelity:
|
| 82 |
-
|
| 83 |
-
| Noise Source | IBM Brisbane (2026) | Effect on Kernel |
|
| 84 |
-
|--------------|---------------------|------------------|
|
| 85 |
-
| T1 relaxation | 200 µs | Energy decay during computation |
|
| 86 |
-
| T2 dephasing | 135 µs | Phase coherence loss |
|
| 87 |
-
| Single-qubit gate error | 0.15% | Rotation imprecision |
|
| 88 |
-
| Two-qubit (ECR) gate error | 0.80% | Entanglement degradation |
|
| 89 |
-
| Readout error | 2.5% | Measurement bit-flip noise |
|
| 90 |
-
|
| 91 |
-
These parameters are extracted from IBM Quantum documentation and peer-reviewed literature (Journal of Supercomputing, April 2025).
|
| 92 |
-
|
| 93 |
-
### PSD Kernel Projection
|
| 94 |
-
|
| 95 |
-
Quantum kernel matrices may lose positive semidefiniteness due to:
|
| 96 |
-
- Finite shot noise (statistical sampling)
|
| 97 |
-
- Hardware gate/readout errors
|
| 98 |
-
- Numerical precision limits
|
| 99 |
-
|
| 100 |
-
This violates the mathematical requirements for valid kernel matrices in SVMs. The **PSD projection** algorithm restores validity:
|
| 101 |
-
|
| 102 |
-
1. **Symmetrize**: $K \leftarrow (K + K^T)/2$
|
| 103 |
-
2. **Eigen-decompose**: $K = V \Lambda V^T$
|
| 104 |
-
3. **Clamp eigenvalues**: $\lambda_i \leftarrow \max(\lambda_i, \epsilon)$ where $\epsilon = 10^{-10}$
|
| 105 |
-
4. **Reconstruct**: $K' = V \Lambda' V^T$
|
| 106 |
-
5. **Preserve trace**: Scale to maintain $\text{tr}(K') = \text{tr}(K)$
|
| 107 |
-
|
| 108 |
-
The projection is **off by default** and can be enabled via CLI flags.
|
| 109 |
-
|
| 110 |
---
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
```
|
| 126 |
-
|
| 127 |
-
**Expected runtime:** 2–3 minutes on CPU
|
| 128 |
-
|
| 129 |
---
|
| 130 |
|
| 131 |
-
|
| 132 |
|
| 133 |
-
|
| 134 |
|
| 135 |
-
|
| 136 |
-
|------|--------|-------------|---------|
|
| 137 |
-
| **Ideal** | `qke_model.py` | Perfect quantum operations (statevector) | 30–60 s |
|
| 138 |
-
| **Noisy** | `qke_noisy.py` | IBM hardware noise model (2026 calibration) | 1–2 min |
|
| 139 |
-
| **Hardware** | `qke_full.py` | IBM Quantum Platform API integration | 5-30 min |
|
| 140 |
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
-
|
| 144 |
|
| 145 |
-
|
| 146 |
-
export QISKIT_IBM_TOKEN='your-token-here'
|
| 147 |
-
python src/qke_full.py
|
| 148 |
-
```
|
| 149 |
|
| 150 |
-
|
| 151 |
|
| 152 |
-
|
| 153 |
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
|
| 156 |
-
|
| 157 |
|
| 158 |
-
|
| 159 |
-
|------|-------------------|-----------------|-----------------|
|
| 160 |
-
| (none) | `results/` | `plots/` | `docs/analysis_report.md` |
|
| 161 |
-
| `--output-tag raw` | `results_raw/` | `plots_raw/` | `docs/analysis_report_raw.md` |
|
| 162 |
-
| `--output-tag psd` | `results_psd/` | `plots_psd/` | `docs/analysis_report_psd.md` |
|
| 163 |
|
| 164 |
-
|
| 165 |
|
| 166 |
-
|
|
|
|
|
|
|
| 167 |
|
| 168 |
-
|
| 169 |
-
results[_TAG]/
|
| 170 |
-
├── train_kernel_{ideal,noisy,hardware}.npy # Kernel matrices (N_train × N_train)
|
| 171 |
-
├── test_kernel_{ideal,noisy,hardware}.npy # Test kernels (N_test × N_train)
|
| 172 |
-
├── metrics_{ideal,noisy,hardware}.json # Accuracy, F1, noise params
|
| 173 |
-
├── noise_impact_stats.json # Kernel degradation analysis
|
| 174 |
-
└── comprehensive_analysis.json # Full cross-implementation comparison
|
| 175 |
-
|
| 176 |
-
plots[_TAG]/
|
| 177 |
-
├── kernel_matrices_{ideal,noisy,hardware}.png
|
| 178 |
-
├── accuracy_comparison.png
|
| 179 |
-
├── kernel_error_heatmap.png
|
| 180 |
-
└── noise_impact_comparison.png
|
| 181 |
-
```
|
| 182 |
|
| 183 |
-
|
| 184 |
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
All scripts support these common flags:
|
| 188 |
-
|
| 189 |
-
| Flag | Description | Default |
|
| 190 |
-
|------|-------------|---------|
|
| 191 |
-
| `--output-tag TAG` | Route outputs to `results_TAG/`, `plots_TAG/` | None |
|
| 192 |
-
| `--psd-project` | Enable PSD projection on training kernel | Disabled |
|
| 193 |
-
| `--psd-epsilon FLOAT` | Minimum eigenvalue threshold for PSD | 1e-10 |
|
| 194 |
-
|
| 195 |
-
**Examples:**
|
| 196 |
-
|
| 197 |
-
```bash
|
| 198 |
-
# Standard execution (default directories)
|
| 199 |
-
python src/qke_model.py
|
| 200 |
-
|
| 201 |
-
# RAW experiment (no PSD projection)
|
| 202 |
-
python src/qke_model.py --output-tag raw
|
| 203 |
-
|
| 204 |
-
# PSD experiment (projection enabled)
|
| 205 |
-
python src/qke_model.py --output-tag psd --psd-project --psd-epsilon 1e-10
|
| 206 |
-
```
|
| 207 |
-
|
| 208 |
-
---
|
| 209 |
-
|
| 210 |
-
## Results Summary
|
| 211 |
-
|
| 212 |
-
Results from the RAW vs PSD experiment (100 samples, 70/30 train/test split):
|
| 213 |
-
|
| 214 |
-
### Accuracy Comparison
|
| 215 |
-
|
| 216 |
-
| Simulator | Metric | RAW | PSD | Delta |
|
| 217 |
-
|-----------|--------|-----|-----|-------|
|
| 218 |
-
| **Ideal** | Train | 82.9% | 84.3% | +1.4% |
|
| 219 |
-
| **Ideal** | Test | 70.0% | 66.7% | -3.3% |
|
| 220 |
-
| **Noisy** | Train | 84.3% | 85.7% | +1.4% |
|
| 221 |
-
| **Noisy** | Test | 66.7% | 66.7% | 0.0% |
|
| 222 |
-
|
| 223 |
-
### Noise Model Parameters
|
| 224 |
-
|
| 225 |
-
| Parameter | Value | Source |
|
| 226 |
-
|-----------|-------|--------|
|
| 227 |
-
| T1 relaxation | 200 µs | IBM Brisbane (2026) |
|
| 228 |
-
| T2 dephasing | 135 µs | IBM Brisbane (2026) |
|
| 229 |
-
| Single-qubit error | 0.15% | Calibration data |
|
| 230 |
-
| Two-qubit (ECR) error | 0.80% | Calibration data |
|
| 231 |
-
| Readout error | 2.5% | Calibration data |
|
| 232 |
-
| Shots | 1024 | Default |
|
| 233 |
-
|
| 234 |
-
### Kernel Matrix Differences (RAW vs PSD)
|
| 235 |
-
|
| 236 |
-
| Kernel | Frobenius Norm | Mean Δ | Max Δ |
|
| 237 |
-
|--------|----------------|--------|-------|
|
| 238 |
-
| Ideal Train | 0.878 | 0.97% | 4.8% |
|
| 239 |
-
| Ideal Test | 0.799 | 1.3% | 7.5% |
|
| 240 |
-
| Noisy Train | 1.209 | 1.3% | 6.8% |
|
| 241 |
-
| Noisy Test | 0.796 | 1.3% | 7.1% |
|
| 242 |
-
|
| 243 |
-
**Key Finding:** PSD projection has minimal impact on well-conditioned kernels (negative eigenvalues at the 1e-15 level are numerical noise, not physical). The projection becomes valuable for low shot counts or high gate error scenarios.
|
| 244 |
-
|
| 245 |
-
---
|
| 246 |
-
|
| 247 |
-
## Project Structure
|
| 248 |
-
|
| 249 |
-
```
|
| 250 |
-
ibm-qml-kernel/
|
| 251 |
-
├── src/
|
| 252 |
-
│ ├── qke_model.py # Ideal quantum kernel estimation
|
| 253 |
-
│ ├── qke_noisy.py # Noise-modeled implementation
|
| 254 |
-
│ ├── qke_full.py # IBM Quantum API integration
|
| 255 |
-
│ ├── analyze_results.py # Comprehensive analysis suite
|
| 256 |
-
│ ├── kernel_utils.py # PSD projection utilities
|
| 257 |
-
│ └── path_utils.py # Output directory routing
|
| 258 |
-
├── tools/
|
| 259 |
-
│ └── compare_raw_vs_psd.py # RAW vs PSD comparison script
|
| 260 |
-
├── data/
|
| 261 |
-
│ └── ibm_hardware_params_2026.json # Hardware calibration parameters
|
| 262 |
-
├── tests/
|
| 263 |
-
│ └── test_basic.py # Unit tests (11 tests, 4 PSD-specific)
|
| 264 |
-
├── docs/
|
| 265 |
-
│ ├── EXECUTION_GUIDE.md # Detailed execution instructions
|
| 266 |
-
│ ├── analysis_report.md # Generated analysis report
|
| 267 |
-
│ └── raw_vs_psd_report.md # PSD experiment comparison
|
| 268 |
-
├── results/ # Default output directory
|
| 269 |
-
├── plots/ # Default plots directory
|
| 270 |
-
├── assets/ # README images
|
| 271 |
-
├── requirements.txt
|
| 272 |
-
├── pyproject.toml
|
| 273 |
-
└── README.md
|
| 274 |
-
```
|
| 275 |
-
|
| 276 |
-
---
|
| 277 |
-
|
| 278 |
-
## Installation
|
| 279 |
-
|
| 280 |
-
### Prerequisites
|
| 281 |
-
- Python 3.10 or higher
|
| 282 |
-
- Virtual environment (recommended)
|
| 283 |
-
|
| 284 |
-
### Steps
|
| 285 |
-
|
| 286 |
-
```bash
|
| 287 |
-
# 1. Create virtual environment
|
| 288 |
-
python -m venv venv
|
| 289 |
-
source venv/bin/activate # Windows: venv\Scripts\activate
|
| 290 |
-
|
| 291 |
-
# 2. Install dependencies
|
| 292 |
-
pip install -r requirements.txt
|
| 293 |
-
# Or: pip install -e .
|
| 294 |
-
|
| 295 |
-
# 3. Verify installation
|
| 296 |
-
python tests/test_basic.py
|
| 297 |
-
```
|
| 298 |
-
|
| 299 |
-
### Dependencies
|
| 300 |
-
|
| 301 |
-
```
|
| 302 |
-
qiskit>=1.0
|
| 303 |
-
qiskit-aer>=0.14
|
| 304 |
-
qiskit-machine-learning>=0.7
|
| 305 |
-
qiskit-ibm-runtime>=0.20 # For hardware access
|
| 306 |
-
scikit-learn>=1.3
|
| 307 |
-
numpy>=1.24
|
| 308 |
-
matplotlib>=3.7
|
| 309 |
-
```
|
| 310 |
-
|
| 311 |
-
---
|
| 312 |
|
| 313 |
-
|
| 314 |
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
```bash
|
| 318 |
-
# 1. RAW pipeline (no PSD projection)
|
| 319 |
-
python src/qke_model.py --output-tag raw
|
| 320 |
-
python src/qke_noisy.py --output-tag raw
|
| 321 |
-
python src/analyze_results.py --output-tag raw
|
| 322 |
-
|
| 323 |
-
# 2. PSD pipeline (projection enabled)
|
| 324 |
-
python src/qke_model.py --output-tag psd --psd-project --psd-epsilon 1e-10
|
| 325 |
-
python src/qke_noisy.py --output-tag psd --psd-project --psd-epsilon 1e-10
|
| 326 |
-
python src/analyze_results.py --output-tag psd
|
| 327 |
-
|
| 328 |
-
# 3. Generate comparison report
|
| 329 |
-
python tools/compare_raw_vs_psd.py
|
| 330 |
-
```
|
| 331 |
-
|
| 332 |
-
**Outputs:**
|
| 333 |
-
- `docs/raw_vs_psd_report.md` — Markdown comparison
|
| 334 |
-
- `docs/raw_vs_psd_comparison.json` — JSON data
|
| 335 |
-
|
| 336 |
-
---
|
| 337 |
-
|
| 338 |
-
## Interpreting Results
|
| 339 |
-
|
| 340 |
-
### Kernel Matrices
|
| 341 |
-
|
| 342 |
-
Kernel matrices represent quantum state overlap (similarity):
|
| 343 |
-
- **Diagonal elements**: Self-similarity (should be ≈1.0)
|
| 344 |
-
- **Off-diagonal elements**: Cross-similarity (affected by noise)
|
| 345 |
-
- **Color intensity**: Higher values = more similar quantum states
|
| 346 |
-
|
| 347 |
-
### Accuracy Metrics
|
| 348 |
-
|
| 349 |
-
| Metric | Description | Typical Range |
|
| 350 |
-
|--------|-------------|---------------|
|
| 351 |
-
| Train Accuracy | Performance on training data | 80-100% (ideal), 75-95% (noisy) |
|
| 352 |
-
| Test Accuracy | Generalization to unseen data | 70-95% (ideal), 65-90% (noisy) |
|
| 353 |
-
| Degradation | Ideal − Noisy accuracy gap | 5-15% |
|
| 354 |
-
|
| 355 |
-
### Kernel Alignment
|
| 356 |
-
|
| 357 |
-
Measures similarity between two kernel matrices:
|
| 358 |
-
- **1.0**: Perfect alignment (identical kernels)
|
| 359 |
-
- **0.8-0.95**: Good noise tolerance
|
| 360 |
-
- **<0.8**: Significant noise degradation
|
| 361 |
-
|
| 362 |
-
---
|
| 363 |
-
|
| 364 |
-
## Branch-Transfer Experiment (Inter-Branch Communication) — Hardware Implementation
|
| 365 |
-
|
| 366 |
-
<picture>
|
| 367 |
-
<source media="(prefers-color-scheme: dark)" srcset="assets/branch_transfer_circuit_dark.png">
|
| 368 |
-
<img src="assets/branch_transfer_circuit_light.png"
|
| 369 |
-
alt="Branch-transfer (inter-branch communication) 5-qubit circuit primitive with protocol stages"
|
| 370 |
-
width="900">
|
| 371 |
-
</picture>
|
| 372 |
-
|
| 373 |
-
<p><em><strong>Figure:</strong> 5-qubit branch-transfer primitive executed on IBM hardware (ibm_fez). Shaded bands mark protocol stages (prep→corr→rec→msg→copy→erase→swap); final measurements feed visibility and coherence-witness diagnostics.</em></p>
|
| 374 |
-
|
| 375 |
-
Motivated by the Violaris proposal for an inter-branch communication protocol in a Wigner's-friend-style setting ([arXiv:2601.08102](https://arxiv.org/abs/2601.08102)), this repository provides a hardware-executed implementation with coherence-witness diagnostics. The 5-qubit branch-transfer protocol was executed on superconducting quantum hardware (ibm_fez) and analyzed using coherence witness measurements.
|
| 376 |
-
|
| 377 |
-
### What Was Implemented
|
| 378 |
-
|
| 379 |
-
**Branch-transfer circuit primitive:**
|
| 380 |
-
- 5-qubit protocol implementing branch-conditioned message transfer
|
| 381 |
-
- Registers: Q (measured qubit), R (branch record), F (friend/observer), M (message buffer), P (paper/persistent record)
|
| 382 |
-
- Visibility readout (V): Population-based metric V = P(P=1|R=0) - P(P=1|R=1)
|
| 383 |
-
|
| 384 |
-
**Coherence-witness measurement suite:**
|
| 385 |
-
- **W_X and W_Y**: Multi-qubit parity correlators on (Q,R,F,P) after basis rotations
|
| 386 |
-
- W_X = ⟨X_Q ⊗ X_R ⊗ X_F ⊗ X_P⟩ (measures coherence in X-basis)
|
| 387 |
-
- W_Y = ⟨Y_Q ⊗ Y_R ⊗ Y_F ⊗ Y_P⟩ (measures coherence in Y-basis)
|
| 388 |
-
- **C_magnitude** = sqrt(W_X² + W_Y²): Phase-robust magnitude
|
| 389 |
-
|
| 390 |
-
**Critical interpretation constraints:**
|
| 391 |
-
- C_magnitude is **NOT** bounded by 1 and must not be described as a "coherence fraction" or probability. It is a correlation magnitude that can exceed 1. Since W_X, W_Y ∈ [-1,1], we have C_magnitude ≤ √2 for Pauli correlators.
|
| 392 |
-
- W_Y_ideal = 0 in this dataset; therefore, normalized Y coherence (W̃_Y) is undefined. Raw W_Y is still reported and physically meaningful.
|
| 393 |
-
|
| 394 |
-
**Related work:** See Violaris (2026, arXiv:2601.08102) for the conceptual framing of inter-branch communication protocols.
|
| 395 |
-
|
| 396 |
-
### Why Visibility Alone Is Insufficient
|
| 397 |
-
|
| 398 |
-
The visibility metric V is population-based and measures only diagonal elements in the Z-basis:
|
| 399 |
-
- **V is insensitive to dephasing**: Dephasing in the computational basis preserves diagonal populations while destroying off-diagonal coherences
|
| 400 |
-
- **Some decoherence placements do not change V**: Post-measurement dephasing or purely off-diagonal decoherence can be invisible to V
|
| 401 |
-
- **Coherence witnesses probe off-diagonals**: W_X and W_Y measure superposition structure that V cannot detect, providing complementary information about quantum coherence
|
| 402 |
-
|
| 403 |
-
### Quickstart: Reproduce the Results
|
| 404 |
-
|
| 405 |
-
**Tier 1: Simulation Only (No Hardware Access Required)**
|
| 406 |
-
|
| 407 |
-
```bash
|
| 408 |
-
# Install dependencies
|
| 409 |
-
pip install -e .[dev]
|
| 410 |
-
|
| 411 |
-
# Run ideal simulation (statevector, no noise)
|
| 412 |
-
python -m experiments.branch_transfer.run_sim --mode coherence_witness --include-y-basis --shots 20000
|
| 413 |
-
|
| 414 |
-
# Run visibility protocol (ideal)
|
| 415 |
-
python -m experiments.branch_transfer.run_sim --mode rp_z --mu 1 --shots 20000
|
| 416 |
-
|
| 417 |
-
# Run backend-matched noisy simulation (uses IBM hardware noise model)
|
| 418 |
-
python -m experiments.branch_transfer.run_sim --mode coherence_witness --include-y-basis --shots 20000 --noise-from-backend ibm_fez
|
| 419 |
-
|
| 420 |
-
# Generate plots and analysis
|
| 421 |
-
python -m experiments.branch_transfer.analyze --artifacts-dir artifacts/branch_transfer --figures-dir artifacts/branch_transfer/figures --plot-all
|
| 422 |
-
```
|
| 423 |
-
|
| 424 |
-
**Expected runtime:** 2-5 minutes on CPU
|
| 425 |
-
|
| 426 |
-
**Tier 2: IBM Hardware (Requires IBM Quantum Access)**
|
| 427 |
-
|
| 428 |
-
**Prerequisites:**
|
| 429 |
-
- qiskit-ibm-runtime installed (included in requirements.txt)
|
| 430 |
-
- IBM Quantum account saved via:
|
| 431 |
-
```python
|
| 432 |
-
from qiskit_ibm_runtime import QiskitRuntimeService
|
| 433 |
-
QiskitRuntimeService.save_account(channel="ibm_quantum", token="YOUR_TOKEN")
|
| 434 |
-
```
|
| 435 |
-
- Get your token at [quantum.ibm.com](https://quantum.ibm.com) → Account → API Token
|
| 436 |
-
|
| 437 |
-
**List available backends and select least busy:**
|
| 438 |
-
```bash
|
| 439 |
-
python -c "from qiskit_ibm_runtime import QiskitRuntimeService as S; s=S(); bs=s.backends(simulator=False, operational=True); print('Available:', [b.name for b in bs[:5]]); lb=s.least_busy(simulator=False, operational=True); print('Least busy:', lb.name)"
|
| 440 |
-
```
|
| 441 |
-
|
| 442 |
-
**Run on hardware:**
|
| 443 |
-
```bash
|
| 444 |
-
# Coherence witness measurement (X+Y basis)
|
| 445 |
-
python -m experiments.branch_transfer.run_ibm --backend ibm_fez --mode coherence_witness --include-y-basis --shots 20000 --optimization-level 2
|
| 446 |
-
|
| 447 |
-
# Visibility protocol
|
| 448 |
-
python -m experiments.branch_transfer.run_ibm --backend ibm_fez --mode rp_z --mu 1 --shots 20000 --optimization-level 2
|
| 449 |
-
```
|
| 450 |
-
|
| 451 |
-
**Note:** The `--backend` flag is supported and allows you to specify any operational IBM Quantum backend (e.g., `--backend ibm_fez`). If omitted, the script selects the least busy backend automatically.
|
| 452 |
-
|
| 453 |
-
**Expected runtime:** 5-30 minutes (queue time + execution)
|
| 454 |
-
|
| 455 |
-
### Latest Hardware Run (Provenance)
|
| 456 |
-
|
| 457 |
-
**Backend:** ibm_fez (156-qubit Heron processor, open plan)
|
| 458 |
-
**Shots:** 20,000 per experiment
|
| 459 |
-
**Optimization level:** 2 (hardware), 1 (simulator)
|
| 460 |
-
**Date:** 2026-01-17
|
| 461 |
-
|
| 462 |
-
**Job IDs:**
|
| 463 |
-
- Coherence witness (X basis): d5lobdt9j2ac739k1a0g
|
| 464 |
-
- Coherence witness (Y basis): d5locdhh2mqc739a2ubg
|
| 465 |
-
- Visibility protocol (rp_z): d5locnd9j2ac739k1b80
|
| 466 |
-
|
| 467 |
-
**Headline metrics:**
|
| 468 |
-
|
| 469 |
-
| Metric | Hardware (ibm_fez) | Ideal Sim | Backend-Matched Noisy Sim |
|
| 470 |
-
|--------|-------------------|-----------|---------------------------|
|
| 471 |
-
| **V** (visibility) | 0.8771 ± 0.0034 | 1.0000 | 0.9381 |
|
| 472 |
-
| **W_X** (X coherence) | 0.8398 ± 0.0038 | 1.0000 | 0.8984 |
|
| 473 |
-
| **W_Y** (Y coherence) | -0.8107 ± 0.0041 | 0.0000* | -0.8972 |
|
| 474 |
-
| **C_magnitude** | 1.1673 ± 0.0040 | 1.4142 | 1.2697 |
|
| 475 |
-
|
| 476 |
-
*Although the theoretical ideal statevector gives W_Y = −1, the stored artifact field W_Y_ideal is recorded as 0 in this dataset due to how combined X/Y ideal baselines are merged, so Y-normalization is undefined and we report raw W_Y only.
|
| 477 |
-
|
| 478 |
-
**Key finding:** Hardware visibility (V=0.877) closely matched backend-matched simulation (V=0.938), demonstrating robust protocol performance. The coherence magnitude C = 1.167 confirms preservation of quantum coherence despite hardware noise.
|
| 479 |
-
|
| 480 |
-
### Artifacts & Reproducibility
|
| 481 |
-
|
| 482 |
-
**Dataset Structure:**
|
| 483 |
-
|
| 484 |
-
This dataset repository provides extracted experimental artifacts for programmatic access alongside the original archival bundle.
|
| 485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 486 |
```
|
| 487 |
-
├── artifacts/
|
| 488 |
-
│ └── branch_transfer/ # Primary experimental results
|
| 489 |
-
│ ├── *.json # 31 result files (hardware + simulation)
|
| 490 |
-
│ ├── calibration/ # Backend calibration snapshots (3 files)
|
| 491 |
-
│ │ └── ibm_fez_*_properties.json
|
| 492 |
-
│ └── figures/ # Generated analysis plots (7 PNG + 7 PDF)
|
| 493 |
-
│ ├── coherence_comparison.png
|
| 494 |
-
│ ├── coherence_forecast_dephase_ideal_X.png
|
| 495 |
-
│ ├── collapse_forecast_dephase_{ideal,noisy}.png
|
| 496 |
-
│ ├── pr_distribution.png
|
| 497 |
-
│ ├── visibility_comparison.png
|
| 498 |
-
│ └── visibility_vs_opt_level.png
|
| 499 |
-
├── manifest/
|
| 500 |
-
│ ├── runs.csv # Tabular index (30 runs) for datasets library
|
| 501 |
-
│ └── SHA256SUMS.txt # File integrity checksums (55 entries)
|
| 502 |
-
├── original/
|
| 503 |
-
│ └── branch_transfer_arxiv_bundle_v2b.zip # Archival parity ZIP (4.3 MB)
|
| 504 |
-
├── paper/
|
| 505 |
-
│ ├── arXiv.pdf # Manuscript (402 KB)
|
| 506 |
-
│ ├── arXiv.tex # LaTeX source (31 KB)
|
| 507 |
-
│ └── refs.bib # Bibliography (5.1 KB)
|
| 508 |
-
├── README.md # This file
|
| 509 |
-
├── LICENSE # MIT License
|
| 510 |
-
└── CITATION.cff # Citation metadata
|
| 511 |
-
|
| 512 |
-
Total: 60 files
|
| 513 |
-
```
|
| 514 |
-
|
| 515 |
-
**Primary Result Files (8 key experiments):**
|
| 516 |
|
| 517 |
-
|
| 518 |
-
|------|------|---------|-------|--------|
|
| 519 |
-
| `hw_coherence_20260117_205321_..._opt-0.json` | Hardware | ibm_fez | 20,000 | d5lobdt9j2ac739k1a0g, d5locdhh2mqc739a2ubg |
|
| 520 |
-
| `hw_20260117_205401_..._opt-2.json` | Hardware | ibm_fez | 20,000 | d5locnd9j2ac739k1b80 |
|
| 521 |
-
| `coherence_*_statevector_*.json` (×2) | Ideal | statevector | 20,000 | - |
|
| 522 |
-
| `coherence_*_noisy_ibm_fez_*.json` (×2) | Noisy | ibm_fez noise | 20,000 | - |
|
| 523 |
-
| `sim_*_statevector_*.json` | Ideal | statevector | 20,000 | - |
|
| 524 |
-
| `sim_*_noisy_ibm_fez_*.json` | Noisy | ibm_fez noise | 20,000 | - |
|
| 525 |
|
| 526 |
-
|
| 527 |
|
| 528 |
```python
|
| 529 |
from datasets import load_dataset
|
| 530 |
-
import pandas as pd
|
| 531 |
-
|
| 532 |
-
# Load manifest
|
| 533 |
-
ds = load_dataset("Cohaerence/ibm-qml-kernel", data_files="manifest/runs.csv")
|
| 534 |
-
runs = pd.DataFrame(ds['train'])
|
| 535 |
-
|
| 536 |
-
# Filter hardware runs
|
| 537 |
-
hw_runs = runs[runs['run_type'] == 'hardware']
|
| 538 |
-
print(hw_runs[['backend', 'mode', 'shots', 'job_id']])
|
| 539 |
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
with open('artifacts/branch_transfer/hw_20260117_205401_ibm_fez_main_mu-1_shots-20000_opt-2.json') as f:
|
| 543 |
-
result = json.load(f)
|
| 544 |
-
print(f"Visibility: {result['visibility']:.4f} ± {result['visibility_error']:.4f}")
|
| 545 |
```
|
| 546 |
|
| 547 |
-
|
| 548 |
-
```bash
|
| 549 |
-
cd /path/to/dataset
|
| 550 |
-
shasum -a 256 -c manifest/SHA256SUMS.txt
|
| 551 |
-
# Expected: All files report "OK"
|
| 552 |
-
```
|
| 553 |
-
|
| 554 |
-
**Original Bundle:**
|
| 555 |
-
The ZIP file at `original/branch_transfer_arxiv_bundle_v2b.zip` preserves byte-for-byte parity with the arXiv submission bundle for archival compliance.
|
| 556 |
-
|
| 557 |
-
### Collapse / Nonunitary Channel Constraint Analysis
|
| 558 |
-
|
| 559 |
-
**Method:**
|
| 560 |
-
The protocol is used to constrain parameterized nonunitary channels (e.g., dephasing, amplitude damping) by:
|
| 561 |
-
1. Implementing the full protocol on ideal and noisy simulators
|
| 562 |
-
2. Comparing diagonal observables (visibility V) vs off-diagonal observables (coherence witnesses W_X, W_Y)
|
| 563 |
-
3. Sweeping a parameterized collapse channel (gamma parameter) and forecasting detectability against device noise
|
| 564 |
|
| 565 |
-
|
| 566 |
-
- **Visibility (V) is insensitive to dephasing**: Post-measurement dephasing in the Z-basis preserves diagonal populations, leaving V unchanged across all gamma values
|
| 567 |
-
- **Coherence witnesses (W_X, W_Y) detect dephasing**: At gamma=0.05, the coherence deviation exceeds shot noise uncertainty (2-sigma threshold), while V remains unaffected
|
| 568 |
-
- **Detectability threshold**: gamma ≈ 0.05 for coherence-based detection with 20k shots
|
| 569 |
|
| 570 |
-
|
| 571 |
-
This analysis constrains specific parameterized channels (e.g., continuous spontaneous localization-style dephasing) by demonstrating that coherence-based observables provide complementary sensitivity beyond population measurements. **This does not prove or disprove Many-Worlds or any specific unitary interpretation**—it operationally constrains collapse-model parameter space within the measurement precision of current hardware.
|
| 572 |
|
| 573 |
-
**Run the analysis:**
|
| 574 |
```bash
|
| 575 |
-
#
|
| 576 |
-
python -
|
| 577 |
|
| 578 |
-
#
|
| 579 |
-
python -m experiments.branch_transfer.
|
| 580 |
-
```
|
| 581 |
-
|
| 582 |
-
### Scaling Roadmap
|
| 583 |
|
| 584 |
-
|
| 585 |
-
|
| 586 |
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
- Number of qubits in the swap operation
|
| 591 |
-
- Circuit depth increase from additional branching
|
| 592 |
-
- Hamming distance between swapped branches
|
| 593 |
|
| 594 |
-
|
| 595 |
-
-
|
| 596 |
-
|
| 597 |
-
- Analysis: Plot C_magnitude vs. (swap depth, Hamming distance, hardware noise level)
|
| 598 |
|
| 599 |
-
This provides a concrete path to study how inter-branch communication degrades with system complexity and is directly implementable on current IBM hardware (up to ~10 qubits before depth/noise tradeoffs dominate).
|
| 600 |
|
| 601 |
-
|
| 602 |
|
| 603 |
-
|
|
|
|
| 604 |
|
| 605 |
-
-
|
| 606 |
-
-
|
| 607 |
-
- [ ] **Hardware runs**: Execute on IBM Brisbane/Kyoto with real queue submission
|
| 608 |
-
- [ ] **Kernel alignment optimization**: Trainable feature map parameters
|
| 609 |
-
- [ ] **Benchmarking**: Compare against classical kernels (RBF, polynomial) on standard datasets
|
| 610 |
-
- [ ] **Branch-transfer scaling**: Implement multi-qubit friend register and measure witness degradation vs swap complexity
|
| 611 |
|
| 612 |
---
|
| 613 |
|
| 614 |
## References
|
| 615 |
|
| 616 |
-
1.
|
| 617 |
|
| 618 |
-
2.
|
| 619 |
|
| 620 |
-
3. IBM Quantum Documentation (2026). Hardware specifications for Eagle r3 processors. [quantum.ibm.com/docs](https://quantum.ibm.com/docs)
|
| 621 |
-
|
| 622 |
-
4. Temme, K., Bravyi, S., & Gambetta, J. M. (2017). Error mitigation for short-depth quantum circuits. *Physical Review Letters*, 119(18), 180509. [DOI: 10.1103/PhysRevLett.119.180509](https://doi.org/10.1103/PhysRevLett.119.180509)
|
| 623 |
-
|
| 624 |
-
5. Abbas, A., et al. (2021). The power of quantum neural networks. *Nature Computational Science*, 1(6), 403–409. [DOI: 10.1038/s43588-021-00084-1](https://doi.org/10.1038/s43588-021-00084-1)
|
| 625 |
-
|
| 626 |
-
6. Violaris, M. (2026). Quantum observers can communicate across multiverse branches. *arXiv:2601.08102*. [arXiv:2601.08102](https://arxiv.org/abs/2601.08102)
|
| 627 |
-
|
| 628 |
-
---
|
| 629 |
-
|
| 630 |
-
## Citations
|
| 631 |
-
|
| 632 |
-
If you use this project in your research, please cite:
|
| 633 |
-
|
| 634 |
-
```bibtex
|
| 635 |
-
@software{altman2026ibmqmlkernel,
|
| 636 |
-
author = {Altman, Christopher},
|
| 637 |
-
title = {Quantum Kernel Methods on IBM Quantum Hardware},
|
| 638 |
-
year = {2026},
|
| 639 |
-
url = {https://github.com/christopher-altman/ibm-qml-kernel},
|
| 640 |
-
note = {Quantum kernel estimation with IBM hardware noise modeling and PSD projection}
|
| 641 |
-
}
|
| 642 |
-
```
|
| 643 |
|
| 644 |
---
|
| 645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: "IBM-QML-Kernel Branch-Transfer Benchmarks (wigner-friend-v2b)"
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- quantum-computing
|
| 6 |
+
- ibm-quantum
|
| 7 |
+
- qiskit
|
| 8 |
+
- superconducting-qubits
|
| 9 |
+
- reproducibility
|
| 10 |
+
- benchmarks
|
| 11 |
+
- wigners-friend
|
| 12 |
+
task_categories:
|
| 13 |
+
- other
|
| 14 |
+
size_categories:
|
| 15 |
+
- n<1K
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# IBM-QML-Kernel Branch-Transfer Benchmarks (wigner-friend-v2b)
|
| 19 |
|
| 20 |
+
## Dataset Summary
|
| 21 |
|
| 22 |
+
This dataset is the **reproducibility artifact bundle** corresponding to the arXiv submission:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
**“Wigner's Friend as a Circuit: Inter-Branch Communication Witness Benchmarks on Superconducting Quantum Hardware.”**
|
| 25 |
+
GitHub release checkpoint: https://github.com/christopher-altman/ibm-qml-kernel/releases/tag/v1.0-wigner-branch-benchmark
|
| 26 |
+
Discussion / Hugging Face suggestion: https://github.com/christopher-altman/ibm-qml-kernel/issues/1
|
| 27 |
+
Paper page: https://huggingface.co/papers/2601.16004
|
| 28 |
|
| 29 |
+
It snapshots the experimental and simulation outputs for a **five‑qubit “branch‑transfer / message‑transfer” circuit primitive** (message transfer in the *compiled circuit / measurement record* sense, not physical signaling), executed on **IBM Quantum hardware** and mirrored with **backend‑matched noisy simulations**.
|
| 30 |
|
| 31 |
+
This Hugging Face dataset exists because Hugging Face surfaced the paper on Daily Papers and recommended hosting the artifacts here to improve discoverability and enable programmatic access + a dataset viewer.
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
## What’s inside (high level)
|
| 34 |
|
| 35 |
+
The release is designed as a “stable, citeable checkpoint” and includes, at minimum:
|
| 36 |
|
| 37 |
+
- **Hardware execution** on IBM Quantum `ibm_fez` (N = 20,000 shots).
|
| 38 |
+
- **Coherence-sensitive witness evaluation** (X and Y bases) + a **visibility baseline**.
|
| 39 |
+
- **Backend-matched noisy simulations** using calibration-synchronized noise models.
|
| 40 |
+
- **Execution provenance**: IBM Quantum job IDs + backend calibration snapshots.
|
| 41 |
+
- **Deterministic figure regeneration** from archived artifacts.
|
| 42 |
+
- **Tamper-evident manifest**: SHA256 hashes for bundle files.
|
| 43 |
|
| 44 |
+
(See the GitHub release notes for the canonical inventory.)
|
| 45 |
|
| 46 |
+
## Intended Use
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
This dataset is for:
|
| 49 |
|
| 50 |
+
- Reproducing figures/tables/values from the associated paper.
|
| 51 |
+
- Auditing compilation + noise impacts on the reported witnesses.
|
| 52 |
+
- Serving as a reference artifact for future “branch-transfer / inter-branch witness” benchmark runs on other devices/backends.
|
| 53 |
|
| 54 |
+
Not intended for: training NLP/Vision models. It’s an experiment + provenance bundle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
+
## How to Use
|
| 57 |
|
| 58 |
+
### Option A — download the full artifact snapshot (recommended for exact reproduction)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
For non-tabular artifacts (plots, calibration dumps, intermediate files), the most faithful workflow is to download the full repository snapshot:
|
| 61 |
|
| 62 |
+
```python
|
| 63 |
+
from huggingface_hub import snapshot_download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
+
local_dir = snapshot_download(
|
| 66 |
+
repo_id="Cohaerence/wigner-friend-v2b",
|
| 67 |
+
repo_type="dataset",
|
| 68 |
+
)
|
| 69 |
+
print(local_dir)
|
| 70 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
### Option B — `datasets.load_dataset(...)` (best if files are extracted + structured)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
Hugging Face Datasets works best when the dataset includes common formats like `csv`, `jsonl`, or `parquet`, optionally referenced via `data_files=`.
|
| 75 |
|
| 76 |
```python
|
| 77 |
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
ds = load_dataset("Cohaerence/wigner-friend-v2b")
|
| 80 |
+
print(ds)
|
|
|
|
|
|
|
|
|
|
| 81 |
```
|
| 82 |
|
| 83 |
+
Docs: https://huggingface.co/docs/datasets/loading
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
## Reproduction Quickstart (paper-aligned)
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
+
These commands reflect the intended “paper-aligned” reproduction workflow described in the release notes:
|
|
|
|
| 88 |
|
|
|
|
| 89 |
```bash
|
| 90 |
+
# Verify IBM Quantum connectivity
|
| 91 |
+
python -c "from qiskit_ibm_runtime import QiskitRuntimeService as S; s=S(); bs=s.backends(simulator=False, operational=True); print('n_backends=', len(bs))"
|
| 92 |
|
| 93 |
+
# Hardware coherence witness (X + Y bases)
|
| 94 |
+
python -m experiments.branch_transfer.run_ibm --backend ibm_fez --mode coherence_witness --include-y-basis --shots 20000 --optimization-level 2
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
+
# Hardware visibility (rp_z mode)
|
| 97 |
+
python -m experiments.branch_transfer.run_ibm --backend ibm_fez --mode rp_z --mu 1 --shots 20000 --optimization-level 2
|
| 98 |
|
| 99 |
+
# Backend-matched noisy simulations
|
| 100 |
+
python -m experiments.branch_transfer.run_sim --mode coherence_witness --include-y-basis --mu 1 --shots 20000 --noise-from-backend ibm_fez
|
| 101 |
+
python -m experiments.branch_transfer.run_sim --mode rp_z --mu 1 --shots 20000 --noise-from-backend ibm_fez
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
+
# Generate analysis figures
|
| 104 |
+
python -m experiments.branch_transfer.analyze --artifacts-dir artifacts/branch_transfer --figures-dir artifacts/branch_transfer/figures --plot-all
|
| 105 |
+
```
|
|
|
|
| 106 |
|
|
|
|
| 107 |
|
| 108 |
+
## Citations
|
| 109 |
|
| 110 |
+
- arXiv:2601.16004 — “Wigner's Friend as a Circuit: Inter-Branch Communication Witness Benchmarks on Superconducting Quantum Hardware.”
|
| 111 |
+
https://arxiv.org/abs/2601.16004
|
| 112 |
|
| 113 |
+
- Code + artifact checkpoint: GitHub release tag `v1.0-wigner-branch-benchmark`.
|
| 114 |
+
https://github.com/christopher-altman/ibm-qml-kernel/releases/tag/v1.0-wigner-branch-benchmark
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
---
|
| 117 |
|
| 118 |
## References
|
| 119 |
|
| 120 |
+
1. Violaris, M. (2026). Quantum observers can communicate across multiverse branches. *arXiv:2601.08102*. [arXiv:2601.08102](https://arxiv.org/abs/2601.08102)
|
| 121 |
|
| 122 |
+
2. Mukherjee, S. and Hance, J. Limits of absoluteness of observed events in timelike scenarios: A no-go theorem, *arXiv:2510.26562*. [arXiv:2510.26562](https://arxiv.org/abs/2510.26562)
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
---
|
| 126 |
|