Full contextuality witness W beyond col3

Stronger test: W = R1 + R2 + R3 − C1 − C2 − C3. Classical bound W ≤ 4; ideal quantum W = 6. State-optimized 2-qubit preparation, 18 circuits, context-shift diagnostics.

Results (IBM Fez, March 2026)

Simulator (optimized state)

40 restarts × 35 iters, 4096 shots. Best theta found: W ≈ 1.02. R1 and C3 active; R2, R3, C1, C2 near zero.

Hardware (IBM Fez)

Metric Value
Witness W0.76
Classical bound4
Quantum target6
StatusBelow noncontextual bound (no contextuality claim)
Job IDd70511s69uic73cjuli0

Per-context products (Fez)

R1 ≈ 0.38, R2 ≈ 0, R3 ≈ 0; C1 ≈ 0, C2 ≈ 0, C3 ≈ −0.38. Shallow 4-parameter ansatz activates mainly R1 and C3; full witness W > 4 would require deeper state preparation or different witness formulation.

Interpretation. The full witness upgrades from “col3 only” to a single score with clear classical/quantum bounds. Current results show the method runs correctly on Fez but W remains far below the contextuality threshold. Next steps: deeper ansatz, 2-qubit W bound check, QPC reducer integration.

Script

qpc_contextuality_witness.py

Optimize on simulator: python3 qpc_contextuality_witness.py --mode sim-opt --restarts 40 -o best.json

Run on Fez: python3 qpc_contextuality_witness.py --mode ibm --theta-from-file best.json --backend ibm_fez -o fez_results.json

Full pipeline: python3 qpc_contextuality_witness.py --mode full --backend ibm_fez -o fez_results.json