Redundant kenogram encoding

Runnable demo: graceful degradation under local noise — majority readout over multiple carriers per logical bit. No claim that the chip’s ε improves; the task is built to tolerate damage.

Motto for customers:
As noise drops and QEC appears, QPC’s depth can grow; today’s bottleneck is universal. We’re building the class of problems and encodings that become feasible as devices improve — not betting everything on today’s raw fidelity.

Hardware demos share the same NISQ noise ceiling as any vendor’s chip—see Holographic Memory (NISQ section) and Quantum-native task for the site-wide explanation.

What the script does

Fair claim: partial damage to some carriers still leaves a recoverable signal in the block statistics — not lower error per gate on the device.

Example output (p = 0.2, 4 logical bits, 40k shots)

RedundancyMethodWord errorPer-bit error
1Single kenogram per bit~0.59~0.20
3Majority over 3 kenograms~0.36~0.10
5Majority over 5~0.21~0.058
7Majority over 7~0.13~0.034

Numbers vary with seed; analytic checks for per-bit error are included in the JSON output.

Run it

First go to the project folder (where the script lives), e.g. cd ~/Desktop/quantum_polycontextural_architecture/site_release_2025_11_15

./run_redundant_kenogram_demo.sh
# or if python3 is broken (Homebrew path missing):
/usr/bin/python3 qpc_redundant_kenogram_demo.py --noise 0.18 --shots 50000 -o qpc_redundant_kenogram_results.json

macOS: If you see no such file or directory: /opt/homebrew/bin/python3, Homebrew’s Python is gone but your shell still points to it. Use /usr/bin/python3 (install Command Line Tools if needed: xcode-select --install) or reinstall Python from python.org.

Requires only the Python standard library. Optional: --verify-aer if Qiskit Aer is installed.

IBM Quantum (parallel blocks, many qubits)

Run the same redundancy idea on real hardware: disjoint paths on the coupling map, one repetition chain per block, majority vs single-qubit decode per shot.

export QISKIT_IBM_TOKEN='...'
# End result only (one IBM job; no local Aer, no decode search):
python3 qpc_redundant_kenogram_ibm.py --fast --quiet --backend ibm_fez --block-size 5 --target-qubits 90 --shots 4096 -o qpc_redundant_kenogram_ibm.json
# First time / other backend: omit --fast (auto-pick decode)
python3 qpc_redundant_kenogram_ibm.py --backend ibm_fez --block-size 5 --target-qubits 90 --shots 4096 -o qpc_redundant_kenogram_ibm.json
# explicit block count:
python3 qpc_redundant_kenogram_ibm.py --backend ibm_fez --blocks 15 --block-size 7 --shots 4096 -o rkn.json
# dry run locally (ideal simulator, no IBM):
python3 qpc_redundant_kenogram_ibm.py --simulator --target-qubits 100 --block-size 5 --shots 2000

JSON includes paths_physical_qubits, logical errors for majority vs single carrier, and transpiled depth.