From 4b7008b1dfa9c340a418522f510c4004c42657aa Mon Sep 17 00:00:00 2001 From: Hans Aschauer Date: Sat, 8 Aug 2026 00:04:26 +0200 Subject: [PATCH] feat: add new scripts for combined S_m and SO(3) symmetry checks and general-r correlation tensor validation --- paper/shadow_maps_symmetric_states.tex | 77 +++++++--- .../7_combined_sm_so3_collapse.py | 128 +++++++++++++++++ scripts/symmetric_states/8_general_r_check.py | 132 ++++++++++++++++++ scripts/symmetric_states/README.md | 29 ++++ 4 files changed, 346 insertions(+), 20 deletions(-) create mode 100644 scripts/symmetric_states/7_combined_sm_so3_collapse.py create mode 100644 scripts/symmetric_states/8_general_r_check.py diff --git a/paper/shadow_maps_symmetric_states.tex b/paper/shadow_maps_symmetric_states.tex index f132587..6fcb251 100644 --- a/paper/shadow_maps_symmetric_states.tex +++ b/paper/shadow_maps_symmetric_states.tex @@ -731,17 +731,20 @@ independent of which cut's matricization is subsequently taken. $T(\rho)(\vec\imath)=\tr(\rho\,\sigma_{\vec\imath})$ is linear in $\rho$; substituting $\rho=\sum_{a,b}c_{ab}\ketbra{\phi_a}{\phi_b}$ and using $\tr(\ketbra{\phi_a}{\phi_b}\sigma_{\vec\imath})=\bra{\phi_b}\sigma_{\vec\imath}\ket{\phi_a}=T_{ba}(\vec\imath)$ gives Eq.~\eqref{eq:general-coherence-decomposition} termwise; the cut dependence enters only afterward, through the reshape of the index set $\vec\imath$, and does not affect the coefficients $c_{ab}$ or the tensors $T_{ab}$. \end{proof} -% TODO (open / not yet carried out): Proposition~\ref{prop:coherence-templates} -% is stated and used above only for r=2 real generators (psi_1, psi_2), where -% the single real cross term C_{12} suffices because the c_{ab} happen to be -% real and symmetric in that example. For general r this requires r(r+1)/2 -% independent real tensors (r diagonal T_aa plus the real/imaginary parts of -% the r(r-1)/2 off-diagonal overlaps, or equivalently just track the full -% Hermitian r x r coefficient matrix c_{ab} against the T_{ab} disregarding -% the a<->b symmetry) -- this is mechanical but has not been written out or -% numerically tested here for r>2. Do this before submission if the general -% statement is kept; otherwise restate the Proposition for r=2 only and move -% the general case to a remark. +\begin{corollary}[Real-tensor count, corrected] +\label{cor:real-tensor-count} +Since $\sigma_{\vec\imath}$ is Hermitian, $T_{ba}=\overline{T_{ab}}$; in particular each $T_{aa}$ is real. Writing $T_{ab}=P_{ab}+iQ_{ab}$ for $a=0, sum=1):", np.round(evals_rho[np.abs(evals_rho)>1e-9],6)) + +# --- brute-force TRUE correlation tensor of rho --- +def corr_tensor_rho(rho): + rho6 = rho.reshape((2,)*12) # not directly useful; do it via trace instead + c=np.zeros((3,3,3,3,3,3),dtype=complex) + for iA in range(3): + for iB in range(3): + for iC in range(3): + for iD in range(3): + for iE in range(3): + for iF in range(3): + O = paulis[iA] + for ii in (iB,iC,iD,iE,iF): + O = np.kron(O, paulis[ii]) + c[iA,iB,iC,iD,iE,iF] = np.trace(rho @ O) + return c +T_true = corr_tensor_rho(rho).real + +# --- predicted via T(rho) = sum_ab c_ab T_ab --- +T_pred = np.zeros((3,3,3,3,3,3), dtype=complex) +for a in range(3): + for b in range(3): + T_pred += c[a,b] * T[(a,b)] +T_pred = T_pred.real + +err = np.abs(T_true - T_pred).max() +print(f"\nmax|T_true - T_pred| (full 6-index tensor, r=3, genuinely mixed rho): {err:.2e}") + +# --- verify at BOTH cuts via simple reshape, no new contraction --- +M1_true, M1_pred = T_true.reshape(27,27), T_pred.reshape(27,27) +M2_true, M2_pred = T_true.reshape(9,81), T_pred.reshape(9,81) +print(f"cut ABC|DEF: max matrix error = {np.abs(M1_true-M1_pred).max():.2e}, " + f"||M||_* true={np.linalg.svd(M1_true,compute_uv=False).sum():.4f} " + f"pred={np.linalg.svd(M1_pred,compute_uv=False).sum():.4f}") +print(f"cut AB|CDEF: max matrix error = {np.abs(M2_true-M2_pred).max():.2e}, " + f"||M||_* true={np.linalg.svd(M2_true,compute_uv=False).sum():.4f} " + f"pred={np.linalg.svd(M2_pred,compute_uv=False).sum():.4f}") diff --git a/scripts/symmetric_states/README.md b/scripts/symmetric_states/README.md index 0b7c639..475c6a7 100644 --- a/scripts/symmetric_states/README.md +++ b/scripts/symmetric_states/README.md @@ -87,3 +87,32 @@ allgemeine (nicht nur p,j<=3) geschlossene Form von Xi als zitierfaehiges Standard-6j-Symbol wurde nicht identifiziert (zwei Versuche dazu blieben erfolglos, siehe search_6j.py-Fragmente); ebenso ist Gl. (2) nur verifiziert, nicht fuer allgemeines n_leg induktiv hergeleitet. + +## 7. `7_combined_sm_so3_collapse.py` +Kombiniert S_m-Permutationssymmetrie mit voller kollektiver SO(3)-Symmetrie +an einem konkreten 6-Qubit-Beispiel: |Q> = kanonische Invariante zweier +gekoppelter Spin-3/2-Dicke-Multipletts auf ABC und DEF (Gl. +eq:dicke-network-state im .tex). Verifiziert: + - |Q> ist exakt kollektiv-rotationsinvariant (||=1 exakt). + - Innerhalb des 10-dim S_3-symmetrischen Unterraums (Typ-Basis u_alpha, + Sym^3(C^3)) zeigt der Casimir NUR j=1 (x3) und j=3 (x7) -- j=0,2 + komplett abwesend, multiplizitätsfrei wie klassisch vorhergesagt. + - Die gesamte Kernnorm (15.0) lebt exakt im doppelt-symmetrischen + Sektor (Norm ausserhalb: 7e-15). + - Konkrete Skalarwerte: A_1=1/3, A_3=2, mit 3*A_1+7*A_3=15 exakt. +Ist jetzt Proposition harmonic-decomposition + Example dicke-network im +.tex (Abschnitt sec:sm-so3-combination). + +## 8. `8_general_r_check.py` +Schliesst die letzte offene TODO im Abschnitt: verallgemeinert die +Cut-unabhaengige Template-Aussage (Proposition coherence-templates) von +r=2 auf r=3, mit einem ECHT GEMISCHTEN (volle Rang-3, nicht reine +Ueberlagerung) Zustand. Korrigiert nebenbei einen Zaehlfehler im +urspruenglichen TODO-Kommentar: die Anzahl unabhaengiger reeller Tensoren +ist r^2 (= reelle Dimension hermitescher r x r Matrizen), nicht r(r+1)/2. +Drei verschiedene Perfect-Matchings von 6 Qubits als Basis-Zustaende, +Gram-Matrix-Konditionszahl 2 (linear unabhaengig), Haar-zufaellige +hermitesche PSD-Koeffizientenmatrix voller Rang. Ergebnis: Fehler 1.1e-16 +zwischen Brute-Force- und Template-basierter Korrelationstensor-Berechnung, +an BEIDEN Schnitten gleichzeitig, ohne erneute Simulation. +Ist jetzt Corollary real-tensor-count + Example general-r-three im .tex. \ No newline at end of file