Skip to content

Commit c7d83fe

Browse files
branch_transfer: add coherence-witness diagnostics + collapse-constraint pipeline + IBM hardware runner
1 parent ec1f335 commit c7d83fe

8 files changed

Lines changed: 5137 additions & 0 deletions

File tree

experiments/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
Experiment modules for ibm-qml-kernel.
3+
"""
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
Branch-conditioned message transfer experiment.
3+
4+
Implements the 5-qubit "partial branch-swap" protocol to test whether
5+
information written into a branch can be recovered after a partial reversal
6+
operation, providing operational constraints on decoherence/collapse models.
7+
8+
Registers:
9+
Q - measured qubit (initial superposition)
10+
R - branch/room record
11+
F - friend (observer proxy)
12+
M - memory (message buffer)
13+
P - paper (persistent record)
14+
15+
Protocol:
16+
1. Prepare Q in |+>
17+
2. Correlate friend measurement: CNOT(Q -> F)
18+
3. Record branch: CNOT(F -> R)
19+
4. Write message (if mu=1): CNOT(F -> M)
20+
5. Copy to paper: CNOT(M -> P)
21+
6. Erase memory: CNOT(P -> M)
22+
7. Partial branch-swap: X on (Q, R, F)
23+
8. Measure (R, P) -> bitstring "PR"
24+
"""
25+
26+
from .circuit import (
27+
build_branch_transfer_circuit,
28+
build_control_circuit,
29+
build_coherence_witness_circuit,
30+
compute_coherence_witness_from_counts,
31+
compute_normalized_coherence,
32+
compute_coherence_magnitude,
33+
get_expected_ideal_coherence,
34+
COHERENCE_QUBITS,
35+
)

0 commit comments

Comments
 (0)