Skip to content

Commit 8df0f11

Browse files
committed
Repair relational pairing known-truth construction
1 parent 5aff928 commit 8df0f11

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

‎dark_sector_architecture/qualification/test_modal_pairing_null.py‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,25 @@ def test_mp01_aligned_field_has_zero_commutator():
2626

2727

2828
def test_mp02_same_marginal_spectra_different_pairing_changes_relation():
29-
e = []
30-
s = []
3129
base_e = np.diag([3.0, 0.4, -2.1])
3230
base_s = np.diag([1.7, 0.2, -1.0])
33-
for angle in np.linspace(0.05, 0.65, 12):
34-
e.append(base_e)
35-
s.append(rotate_tensor(base_s, rotation_matrix(np.array([0, 0, 1.0]), angle)))
36-
e = np.stack(e)
37-
s = np.stack(s)
31+
angles = np.linspace(0.05, 0.65, 12)
32+
e = np.stack([
33+
rotate_tensor(base_e, rotation_matrix(np.array([0, 0, 1.0]), angle))
34+
for angle in angles
35+
])
36+
# Observed pairs have a fixed small relative rotation.
37+
s = np.stack([
38+
rotate_tensor(base_s, rotation_matrix(np.array([0, 0, 1.0]), angle + 0.04))
39+
for angle in angles
40+
])
3841

3942
observed = normalized_commutator_field(e, s)
4043
perm = np.arange(len(e))[::-1]
4144
shuffled = normalized_commutator_field(e, s[perm])
4245

46+
# Marginal E and S spectra are unchanged by the re-pairing, but relative
47+
# geometry is not, so the relational distribution must change.
4348
assert wasserstein_1d(observed, shuffled) > 0.0
4449

4550

0 commit comments

Comments
 (0)