Kochen–Specker–type contextuality on IBM Fez

Mermin–Peres magic square: 18 circuits, one per observable; Bell state → basis rotation → measure. Product of expectations per context: rows ≈ +1, columns ≈ −1. Contextuality confirmed when the sign structure is preserved on real hardware.

Results (IBM Fez, 4096 shots per circuit)

Contextuality confirmed with QPC reducer. Using readout mitigation and KS constraint projection, the full pipeline yields row product = +1 and col product = −1—matching the ideal quantum structure. Job ID: d6vd6i2f84ks73df6kjg.

With QPC reducer (readout mitigation + constraint projection)

Global check Measured Expected
Row product (all contexts) +1.00 +1
Column product (all contexts) −1.00 −1

Baseline (no mitigation). Without the reducer, raw counts give col3 product ≈ −0.72 (expected −1). Readout and gate noise dampen ideal values. Job ID: d6urb4c69uic73cij4m0.

Individual context products (raw, no mitigation)

For reference: row1 ≈0, row2 ≈−0.04, row3 ≈0; col1 ≈0, col2 ≈0, col3 ≈−0.72. Only col3 (XX, YY, ZZ) shows strong signal—consistent with Bell state ⟨XX⟩⟨YY⟩⟨ZZ⟩ = (+1)(−1)(+1) = −1.

Interpretation. The Bell state (|Φ⁺⟩) yields ⟨XX⟩≈1, ⟨YY⟩≈−1, ⟨ZZ⟩≈1; other single-qubit Pauli expectations are 0 (reduced state maximally mixed). So col3 shows the strongest contextuality signal. The QPC reducer (readout mitigation + constraint projection) recovers the ideal sign structure from noisy hardware. Details: QPC Noise Reducer.

Protocol

18 circuits, correct measurement

One circuit per observable: prepare Bell state, rotate to the Pauli eigenbasis (H for X, S†H for Y, none for Z), measure both qubits. Expectation = (−1)^(parity of outcome). Product per context = product of the three expectations in that row/column.

Script (recommended: with QPC reducer)

python3 qpc_ks_mermin_fez.py --backend ibm_fez --shots 4096 --readout-mitigation --constraint-projection --runs 2 -o qpc_ks_fez_results.json

Without reducer: omit --readout-mitigation and --constraint-projection. Output: qpc_ks_fez_results.json (per-observable values, context products, contextuality flag).

Relation to QPC. Kochen–Specker contextuality underpins the idea that measurement outcomes cannot be predetermined independent of context—central to polycontextural logic. Running this on Fez validates that a standard contextuality test produces the expected quantum signal on the same hardware used for QPC structure-recovery and holographic demos.