""" Apply the EXACT Casimir-based isotypic projectors (projectors_exact.npz) to the two example states, at both cuts, replacing the earlier Monte-Carlo-based ||A_j||_* estimates with machine-precision values. Uses T1, T2, C12 (saved by recoupling_check.py) so that "Example 1" (pure psi1) and "Example 2" (Xi at alpha) are both obtained from the SAME three fixed tensors, no new quantum simulation. """ import numpy as np T1 = np.load("T1.npy") T2 = np.load("T2.npy") C12 = np.load("C12.npy") overlap = 0.25 # , real (checked earlier) P = np.load("projectors_exact.npz") def state_tensor(alpha): N2 = 1 + np.sin(2*alpha)*overlap return (np.cos(alpha)**2*T1 + np.sin(alpha)**2*T2 + np.cos(alpha)*np.sin(alpha)*C12) / N2 def report(label, alpha): T = state_tensor(alpha) M_c1 = T.reshape(27,27) # cut ABC|DEF M_c2 = T.reshape(9,81) # cut AB|CDEF print(f"\n=== {label} (alpha={alpha}) ===") print("-- cut ABC|DEF --") tot = 0.0 for j in range(4): Pj = P[f"P3_{j}"] block = Pj @ M_c1 @ Pj nn = np.linalg.svd(block, compute_uv=False).sum() Aj = nn/(2*j+1) tot += (2*j+1)*Aj print(f" j={j}: ||A_j||_* = {Aj:.6f}") raw_nn = np.linalg.svd(M_c1, compute_uv=False).sum() print(f" sum_j (2j+1)||A_j||_* = {tot:.6f} vs. ||M||_* direct = {raw_nn:.6f}") print("-- cut AB|CDEF --") tot = 0.0 for j in range(3): Pj_src = P[f"P2_{j}"] Pj_tgt = P[f"P4_{j}"] block = Pj_src @ M_c2 @ Pj_tgt nn = np.linalg.svd(block, compute_uv=False).sum() Aj = nn/(2*j+1) tot += (2*j+1)*Aj print(f" j={j}: ||A_j||_* = {Aj:.6f}") raw_nn = np.linalg.svd(M_c2, compute_uv=False).sum() print(f" sum_j (2j+1)||A_j||_* = {tot:.6f} vs. ||M||_* direct = {raw_nn:.6f}") report("Example 1 (pure psi1, three aligned singlets)", 0.0) report("Example 2 (superposition)", np.pi/5)