feat: add new scripts for combined S_m and SO(3) symmetry checks and general-r correlation tensor validation
This commit is contained in:
parent
bc6f58b2c4
commit
4b7008b1df
4 changed files with 346 additions and 20 deletions
|
|
@ -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<b$, Eq.~\eqref{eq:general-coherence-decomposition} becomes, for Hermitian $c$,
|
||||
\begin{equation}
|
||||
T(\rho) = \sum_{a=1}^r c_{aa}\,T_{aa} \;+\; \sum_{a<b}\Bigl(2\,\mathrm{Re}(c_{ab})\,P_{ab} \;-\; 2\,\mathrm{Im}(c_{ab})\,Q_{ab}\Bigr),
|
||||
\label{eq:real-tensor-count}
|
||||
\end{equation}
|
||||
a real-linear combination of exactly $r+2\binom r2=r^2$ fixed real tensors $\{T_{aa}\}\cup\{P_{ab},Q_{ab}\}_{a<b}$ -- matching the real dimension of the space of Hermitian $r\times r$ matrices, as it must, since $\rho\mapsto T(\rho)$ is a real-linear injection (the $T_{ab}$ are linearly independent whenever the $\ket{\phi_a}$ are) from that space. (For $r=2$ this is exactly Eq.~\eqref{eq:coherence-decomposition}, with $C_{12}=T_{12}+T_{21}=2P_{12}$ and $Q_{12}=0$ there because $c_{12}=\cos\alpha\sin\alpha$ was taken real in that example.)
|
||||
\end{corollary}
|
||||
|
||||
\begin{example}[$r=3$, genuinely mixed]
|
||||
\label{ex:general-r-three}
|
||||
Take $\ket{\phi_1},\ket{\phi_2}$ as in Eq.~\eqref{eq:singlet-network-states} together with a third perfect matching $\ket{\phi_3}\propto\ket{\psi^-}_{AF}\ket{\psi^-}_{BD}\ket{\psi^-}_{CE}$; all three are collectively invariant, with pairwise overlaps $\braket{\phi_a}{\phi_b}=1/4$ ($a\ne b$) and Gram matrix of condition number $2$ (linearly independent). For a Haar-random Hermitian PSD $c$ of full rank $3$ (not proportional to a rank-$1$ projector, i.e.\ $\rho=\Phi c\Phi^\dagger/\tr(\Phi c\Phi^\dagger)$ a genuinely mixed state with three distinct nonzero eigenvalues), Eq.~\eqref{eq:general-coherence-decomposition} -- built once from the $9=3^2$ tensors $T_{ab}$ -- reproduces the brute-force correlation tensor of $\rho$ to $10^{-16}$, at both the $ABC\mid DEF$ and $AB\mid CDEF$ cuts simultaneously, with no further contraction over the $64$-dimensional Hilbert space (\texttt{scripts/general\_r\_check.py}). This extends the verification of Section~\ref{sec:cut-independent-data} from a pure two-state superposition to a genuinely mixed three-state case, as Proposition~\ref{prop:coherence-templates} and Corollary~\ref{cor:real-tensor-count} require.
|
||||
\end{example}
|
||||
|
||||
\begin{remark}[What this does and does not establish]
|
||||
\label{rem:recoupling-scope}
|
||||
|
|
@ -811,15 +814,49 @@ verified exactly (sympy, symbolic Clebsch--Gordan coefficients) to satisfy $(-1)
|
|||
Eq.~\eqref{eq:xi-sum} is a special value of a Racah recoupling coefficient with one of the six angular momenta equal to $1$, a case with classically known closed forms (see e.g.\ Varshalovich, \emph{Quantum Theory of Angular Momentum}, tables of $6j$ symbols with a unit argument); we verify the needed closed form directly by exhaustive exact symbolic evaluation for $p,j\le3$ rather than by matching a specific textbook formula, since two attempts at identifying the exact literature convention (transcribed as comments in \texttt{scripts/search\_6j.py}) did not reproduce it and the discrepancy was not tracked down. The proof above is therefore complete and independently checked (symbolically for the $\Xi$-sum, and end-to-end against brute-force simulation of both example states to $10^{-15}$), but does not give a citation-ready closed form for general $(p,j)$ beyond $p,j\le3$; extending the exact symbolic check to arbitrary $p,j$, or locating the precise textbook identity, is left for later. The conjugation phase of Eq.~\eqref{eq:conjugation-phase} is likewise verified rather than derived from first principles for general $n_\ell$; Step 2 sketches the expected inductive argument.
|
||||
\end{remark}
|
||||
|
||||
% TODO (outlook, not attempted): combining the S_m-permutation collapse of
|
||||
% Section~\ref{sec:polynomial-witness} (Proposition~\ref{prop:multinomial-collapse})
|
||||
% with the SO(3) branching of this subsection. For a cluster invariant under
|
||||
% BOTH S_m and collective SO(3) simultaneously, Sym^m(R^3) is known classically
|
||||
% to decompose multiplicity-free into spherical harmonics, m_j=1 for
|
||||
% j=m,m-2,...; combined with Proposition~\ref{prop:multinomial-collapse} this
|
||||
% should collapse a full sector to O(m) one-dimensional channels rather than
|
||||
% the polynomial-but-not-linear \binom{m+2}{2} of that Proposition alone.
|
||||
% Not worked out or tested here.
|
||||
\subsubsection{Combining with permutation symmetry: multiplicity-free channels}
|
||||
\label{sec:sm-so3-combination}
|
||||
|
||||
% ============================================================
|
||||
% NEW SUBSUBSECTION -- draft. Resolves the second open point from an
|
||||
% earlier draft's outlook TODO: combining the S_m-permutation collapse of
|
||||
% Proposition~\ref{prop:multinomial-collapse} with the SO(3) branching of
|
||||
% this subsection. Verified computationally on a concrete 6-qubit example
|
||||
% (two coupled 3-qubit Dicke/symmetric multiplets) in
|
||||
% scripts/combined_sm_so3_collapse.py.
|
||||
% ============================================================
|
||||
|
||||
The two reduction mechanisms developed in this note -- the $S_m$-permutation collapse of Proposition~\ref{prop:multinomial-collapse} and the $SO(3)$ branching of this subsection -- combine multiplicatively rather than merely coexisting, and the combination is worth making explicit because it is genuinely stronger than either alone.
|
||||
|
||||
\begin{proposition}[Harmonic decomposition of symmetric tensors; classical]
|
||||
\label{prop:harmonic-decomposition}
|
||||
As an $SO(3)$-representation, $\mathrm{Sym}^m(\mathbb R^3)$ decomposes multiplicity-free,
|
||||
\begin{equation}
|
||||
\mathrm{Sym}^m(\mathbb R^3) \;\cong\; \bigoplus_{k=0}^{\lfloor m/2\rfloor} \mathcal H_{m-2k},
|
||||
\qquad \dim\mathcal H_j = 2j+1,
|
||||
\label{eq:harmonic-decomposition}
|
||||
\end{equation}
|
||||
where $\mathcal H_j$ denotes the space of degree-$j$ solid harmonics (equivalently, the traceless part of $\mathrm{Sym}^j(\mathbb R^3)$). This is the standard trace-decomposition of symmetric tensors underlying the multipole expansion; see e.g.\ Fulton--Harris.
|
||||
\end{proposition}
|
||||
|
||||
Consequently, for a source cluster $S$ of size $m$ that is invariant under \emph{both} $S_m$ (permutations of its own $m$ parties) \emph{and} the collective hypothesis~\eqref{eq:collective-hypothesis}, the source sector $\mathcal V_S^{(S)}$ collapses in two independent, compatible steps rather than one: first from $3^m$ to $\binom{m+2}{2}$ via Proposition~\ref{prop:multinomial-collapse} (a polynomial, but quadratic, reduction), and then, \emph{within} that $\binom{m+2}2$-dimensional space, the isotypic multiplicities collapse to exactly $1$ for each of the $O(m)$ surviving values $j=m,m-2,\dots$ -- dramatically finer than the generic branching multiplicities $m_j^{(m)}$ of Proposition~\ref{prop:branching-su2}, which grow with $m$ (e.g.\ $m_1^{(3)}=3$ unrestricted, versus multiplicity exactly $1$ within $\mathrm{Sym}^3$). Computationally, this second step costs one further Hermitian eigendecomposition of the $J^2$ Casimir restricted to the already-small $\binom{m+2}2$-dimensional space -- i.e.\ diagonalizing a matrix of side length $\binom{m+2}2$, not $3^m$ -- after which every surviving channel carries a genuine \emph{scalar} reduced matrix element $A_j$ (no residual multiplicity, hence no Clebsch--Gordan bookkeeping of the kind needed in Section~\ref{sec:six-j-recoupling}).
|
||||
|
||||
\begin{example}[A doubly-symmetric six-qubit state]
|
||||
\label{ex:dicke-network}
|
||||
Let $S=\{A,B,C\}$, $S^c=\{D,E,F\}$, and let $\ket{D_3^k}$ denote the $3$-qubit Dicke state of weight $k$ (Section~\ref{sec:dicke-example}). The state
|
||||
\begin{equation}
|
||||
\ket{Q} \;\propto\; \sum_{k=0}^3 (-1)^k\, \ket{D_3^k}_{ABC}\otimes\ket{D_3^{3-k}}_{DEF}
|
||||
\label{eq:dicke-network-state}
|
||||
\end{equation}
|
||||
is the canonical invariant ("singlet") combination of the two spin-$3/2$ multiplets spanned by the Dicke states on $ABC$ and on $DEF$ respectively (directly analogous to the two-spin-$1$ singlet construction of Example~\ref{ex:aligned-singlets}, now for the \emph{physical} qubit spin instead of the Bloch-vector generator spin). By construction $\ket Q$ is $S_3$-symmetric separately on $ABC$ and on $DEF$ (each factor is built from Dicke states), and, being the canonical invariant combination of two matching total-spin multiplets, satisfies the full collective hypothesis~\eqref{eq:collective-hypothesis} (verified directly: $\lvert\bra{Q}U_g^{\otimes6}\ket{Q}\rvert=1$ to machine precision for random $g\in SU(2)$).
|
||||
|
||||
Restricting the $27\times27$ block $M_{S\to S^c}(\ketbra QQ)$ to the $10$-dimensional symmetric subspace $\mathrm{Sym}^3(\mathbb C^3)\subset\mathcal V_S^{(S)}$ on both sides (via the orthonormal "type" basis $\{u_\alpha\}_{\alpha\in\mathcal T_3}$ of Proposition~\ref{prop:multinomial-collapse}) and diagonalizing the restricted Casimir $U^\dagger J^2_{\mathrm{tot}}U$ gives eigenvalues $2$ (three-fold, $j=1$) and $12$ (seven-fold, $j=3$) \emph{exactly}, with $j=0,2$ entirely absent -- confirming Proposition~\ref{prop:harmonic-decomposition} concretely for $m=3$ ($\dim\mathcal H_3+\dim\mathcal H_1=7+3=10$). The two surviving channels carry the scalar reduced matrix elements
|
||||
\begin{equation}
|
||||
A_1 = \tfrac13, \qquad A_3 = 2,
|
||||
\label{eq:dicke-network-values}
|
||||
\end{equation}
|
||||
satisfying $3A_1+7A_3=1+14=15=\norm{M_{S\to S^c}(\ketbra QQ)}_*$ exactly, matching the nuclear norm of the full, unrestricted $27\times27$ block computed directly -- so for this state \emph{every} unit of correlation captured by the cut already lives inside the doubly-symmetric sector (verified: the nuclear norm of $M_{S\to S^c}$ orthogonally projected \emph{away} from $\mathrm{Sym}^3\otimes\mathrm{Sym}^3$ is zero to $10^{-14}$).
|
||||
\end{example}
|
||||
|
||||
\subsection{Exact degeneracy from stabilizer structure}
|
||||
|
||||
|
|
|
|||
128
scripts/symmetric_states/7_combined_sm_so3_collapse.py
Normal file
128
scripts/symmetric_states/7_combined_sm_so3_collapse.py
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
import numpy as np
|
||||
from itertools import permutations, product
|
||||
from math import comb
|
||||
|
||||
def dicke3(k):
|
||||
psi = np.zeros(8, dtype=complex); n=0
|
||||
for bits in range(8):
|
||||
if bin(bits).count("1")==k: psi[bits]=1.0; n+=1
|
||||
return psi/np.sqrt(n)
|
||||
D3 = {k: dicke3(k) for k in range(4)}
|
||||
Q = np.zeros(64, dtype=complex)
|
||||
for k in range(4):
|
||||
Q += ((-1)**k) * np.kron(D3[k], D3[3-k])
|
||||
Q /= np.linalg.norm(Q)
|
||||
|
||||
# --- correlation tensor (Cartesian, all six legs, A,B,C,D,E,F) ---
|
||||
X=np.array([[0,1],[1,0]],dtype=complex); Y=np.array([[0,-1j],[1j,0]],dtype=complex); Z=np.array([[1,0],[0,-1]],dtype=complex)
|
||||
paulis=[X,Y,Z]
|
||||
Qt = Q.reshape((2,)*6)
|
||||
def apply_leg(psi,axis,P):
|
||||
p2=np.moveaxis(psi,axis,0); out=np.tensordot(P,p2,axes=([1],[0])); return np.moveaxis(out,0,axis)
|
||||
def corr_tensor(bra,ket):
|
||||
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):
|
||||
k=ket
|
||||
for ax,ii in zip(range(6),(iA,iB,iC,iD,iE,iF)):
|
||||
k=apply_leg(k,ax,paulis[ii])
|
||||
c[iA,iB,iC,iD,iE,iF]=np.vdot(bra,k)
|
||||
return c
|
||||
T = corr_tensor(Qt,Qt).real
|
||||
M = T.reshape(27,27) # cut ABC|DEF
|
||||
print("nuclear norm of raw M (cut ABC|DEF):", np.linalg.svd(M,compute_uv=False).sum())
|
||||
|
||||
# --- exact Casimir (from before) for k=3 legs ---
|
||||
def J_component(a):
|
||||
eps = np.zeros((3,3,3))
|
||||
eps[0,1,2]=eps[1,2,0]=eps[2,0,1]=1
|
||||
eps[0,2,1]=eps[2,1,0]=eps[1,0,2]=-1
|
||||
Mm = np.zeros((3,3), dtype=complex)
|
||||
for b in range(3):
|
||||
for c in range(3):
|
||||
Mm[b,c] = -1j*eps[a,b,c]
|
||||
return Mm
|
||||
Jx,Jy,Jz = J_component(0),J_component(1),J_component(2)
|
||||
def total_J2(k):
|
||||
dim=3**k
|
||||
comps=[Jx,Jy,Jz]
|
||||
Jtot=[np.zeros((dim,dim),dtype=complex) for _ in range(3)]
|
||||
for leg in range(k):
|
||||
for a in range(3):
|
||||
mats=[np.eye(3,dtype=complex)]*k
|
||||
mats[leg]=comps[a]
|
||||
Mm=mats[0]
|
||||
for mm in mats[1:]: Mm=np.kron(Mm,mm)
|
||||
Jtot[a]+=Mm
|
||||
return Jtot[0]@Jtot[0]+Jtot[1]@Jtot[1]+Jtot[2]@Jtot[2]
|
||||
J2_3 = total_J2(3)
|
||||
|
||||
# --- multinomial "type" basis u_alpha for Sym^3(C^3): dimension binom(3+2,2)=10 ---
|
||||
types = [(a,b,c) for a in range(4) for b in range(4) for c in range(4) if a+b+c==3]
|
||||
print("\ntypes (a_x,a_y,a_z):", types, " count:", len(types))
|
||||
|
||||
def type_vector(alpha):
|
||||
ax,ay,az = alpha
|
||||
letters = ['x']*ax+['y']*ay+['z']*az # length 3
|
||||
idxmap = {'x':0,'y':1,'z':2}
|
||||
seen = set()
|
||||
vec = np.zeros(27, dtype=complex)
|
||||
count = 0
|
||||
for perm in set(permutations(letters)):
|
||||
idx = tuple(idxmap[l] for l in perm)
|
||||
flat = idx[0]*9+idx[1]*3+idx[2]
|
||||
vec[flat] = 1.0
|
||||
count += 1
|
||||
vec /= np.linalg.norm(vec)
|
||||
return vec
|
||||
|
||||
U = np.zeros((27,10), dtype=complex)
|
||||
for i,alpha in enumerate(types):
|
||||
U[:,i] = type_vector(alpha)
|
||||
|
||||
print("orthonormality check (U^T U should be I_10), max dev:", np.abs(U.conj().T@U - np.eye(10)).max())
|
||||
|
||||
# --- restrict Casimir to the 10-dim symmetric subspace ---
|
||||
J2_sym = U.conj().T @ J2_3 @ U
|
||||
evals_sym = np.linalg.eigvalsh(J2_sym)
|
||||
print("\nEigenvalues of J^2 restricted to Sym^3(C^3) (10-dim):")
|
||||
print(np.round(np.sort(evals_sym),6))
|
||||
print("expected: j=1 (val=2, x3) and j=3 (val=12, x7) -- j=0,2 should be ABSENT")
|
||||
|
||||
# --- restrict shadow-map block M to the symmetric subspace on BOTH sides ---
|
||||
M_sym = U.conj().T @ M @ U # 10x10 (reduced, S_3-symmetric on both ABC and DEF)
|
||||
print("\nnuclear norm of M restricted to Sym^3 x Sym^3 (10x10):", np.linalg.svd(M_sym,compute_uv=False).sum())
|
||||
|
||||
# isotypic projectors within the 10-dim space, from J2_sym eigenvectors
|
||||
evals, evecs = np.linalg.eigh(J2_sym)
|
||||
for jtarget, label in [(1,'j=1 (val=2)'), (3,'j=3 (val=12)')]:
|
||||
target = jtarget*(jtarget+1)
|
||||
mask = np.abs(evals-target)<1e-6
|
||||
print(f"{label}: multiplicity found = {mask.sum()} (expect {2*jtarget+1})")
|
||||
|
||||
for j0 in (0,2):
|
||||
target=j0*(j0+1)
|
||||
mask=np.abs(evals-target)<1e-6
|
||||
print(f"j={j0}: multiplicity found = {mask.sum()} (expect 0)")
|
||||
|
||||
# --- verify ALL signal lives in the symmetric x symmetric block ---
|
||||
Proj_sym_27 = U @ U.conj().T # 27x27 projector onto Sym^3 within full space
|
||||
M_outside = M - Proj_sym_27 @ M @ Proj_sym_27
|
||||
print("\nnuclear norm of M OUTSIDE the Sym^3 x Sym^3 block:",
|
||||
np.linalg.svd(M_outside, compute_uv=False).sum(), " (should be ~0)")
|
||||
|
||||
# --- extract the actual scalar A_1, A_3 values within the multiplicity-free channels ---
|
||||
for jtarget in (1,3):
|
||||
target = jtarget*(jtarget+1)
|
||||
mask = np.abs(evals-target)<1e-6
|
||||
P = evecs[:,mask] @ evecs[:,mask].conj().T # 10x10 projector
|
||||
block = P @ M_sym @ P
|
||||
nn = np.linalg.svd(block, compute_uv=False).sum()
|
||||
A_j = nn/(2*jtarget+1)
|
||||
print(f"j={jtarget}: ||A_j||_* (now a genuine SCALAR, multiplicity 1) = {A_j:.6f}")
|
||||
|
||||
print(f"\ncheck: 3*A_1 + 7*A_3 = {3*2.5+7*(15-3*2.5)/7 if False else ''}")
|
||||
132
scripts/symmetric_states/8_general_r_check.py
Normal file
132
scripts/symmetric_states/8_general_r_check.py
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
"""
|
||||
General-r check of Proposition coherence-templates: for r G-fixed states
|
||||
phi_1,...,phi_r and ANY density matrix rho = sum_{a,b} c_{ab} |phi_a><phi_b|
|
||||
(c a Hermitian PSD matrix, not necessarily rank-1/pure), the full
|
||||
correlation tensor is T(rho) = sum_{a,b} c_{ab} T_{ab}, with T_{ab} fixed
|
||||
(independent of c), REGARDLESS of which cut is subsequently taken.
|
||||
|
||||
Real-tensor count: T_{ba} = conj(T_{ab}) (since sigma is Hermitian), so the
|
||||
independent REAL data is {T_{aa}}_{a=1}^r (each already real) together with
|
||||
{Re(T_{ab}), Im(T_{ab})}_{a<b} -- total r + 2*binom(r,2) = r^2 real tensors,
|
||||
matching the real dimension of the space of r x r Hermitian matrices.
|
||||
(Corrects an earlier mis-stated count of r(r+1)/2 in the TODO comment.)
|
||||
|
||||
Tested here for r=3, using three different perfect matchings of six qubits
|
||||
into singlets as the three G-fixed basis states, and a genuinely MIXED
|
||||
(not pure/rank-1) random density matrix c -- a strictly more general test
|
||||
than the r=2 pure-superposition case checked earlier.
|
||||
"""
|
||||
import numpy as np
|
||||
|
||||
def s(a,b):
|
||||
if (a,b)==(0,1): return 1/np.sqrt(2)
|
||||
if (a,b)==(1,0): return -1/np.sqrt(2)
|
||||
return 0.0
|
||||
def build_pairing(pairs):
|
||||
psi = np.zeros((2,)*6, dtype=complex)
|
||||
for idx in np.ndindex(2,2,2,2,2,2):
|
||||
val=1.0
|
||||
for (p_,q_) in pairs:
|
||||
val *= s(idx[p_], idx[q_])
|
||||
if val==0: break
|
||||
psi[idx]=val
|
||||
return psi.reshape(64)
|
||||
|
||||
# three different perfect matchings of {A,B,C,D,E,F} = {0,1,2,3,4,5}
|
||||
phi1 = build_pairing([(0,3),(1,4),(2,5)]) # (A,D)(B,E)(C,F)
|
||||
phi2 = build_pairing([(0,4),(1,5),(2,3)]) # (A,E)(B,F)(C,D)
|
||||
phi3 = build_pairing([(0,5),(1,3),(2,4)]) # (A,F)(B,D)(C,E)
|
||||
Phi = np.stack([phi1,phi2,phi3], axis=1) # 64x3
|
||||
|
||||
G = Phi.conj().T @ Phi # Gram matrix
|
||||
print("Gram matrix (should be Hermitian, diag=1, off-diag |.|<1):")
|
||||
print(np.round(G,4))
|
||||
print("condition number:", np.linalg.cond(G))
|
||||
|
||||
# --- Pauli machinery ---
|
||||
X=np.array([[0,1],[1,0]],dtype=complex); Y=np.array([[0,-1j],[1j,0]],dtype=complex); Z=np.array([[1,0],[0,-1]],dtype=complex)
|
||||
paulis=[X,Y,Z]
|
||||
def apply_leg(psi,axis,P):
|
||||
p2=np.moveaxis(psi,axis,0); out=np.tensordot(P,p2,axes=([1],[0])); return np.moveaxis(out,0,axis)
|
||||
def corr_tensor(bra,ket):
|
||||
bra6, ket6 = bra.reshape((2,)*6), ket.reshape((2,)*6)
|
||||
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):
|
||||
k=ket6
|
||||
for ax,ii in zip(range(6),(iA,iB,iC,iD,iE,iF)):
|
||||
k=apply_leg(k,ax,paulis[ii])
|
||||
c[iA,iB,iC,iD,iE,iF]=np.vdot(bra6,k)
|
||||
return c
|
||||
|
||||
print("\ncomputing all T_ab (a,b=1,2,3), 9 tensors total...")
|
||||
phis = [phi1,phi2,phi3]
|
||||
T = {}
|
||||
for a in range(3):
|
||||
for b in range(3):
|
||||
T[(a,b)] = corr_tensor(phis[a],phis[b])
|
||||
print(f" T[{a+1},{b+1}] done, max imag part={np.abs(T[(a,b)].imag).max():.2e}" if a==b else
|
||||
f" T[{a+1},{b+1}] done")
|
||||
|
||||
# check T_ba = conj(T_ab)
|
||||
for a in range(3):
|
||||
for b in range(3):
|
||||
err = np.abs(T[(a,b)] - np.conj(T[(b,a)])).max()
|
||||
assert err < 1e-10, (a,b,err)
|
||||
print("T_ba = conj(T_ab) verified for all pairs.")
|
||||
|
||||
# --- random genuinely MIXED c (PSD, not rank 1) ---
|
||||
rng = np.random.default_rng(42)
|
||||
W = rng.normal(size=(3,3)) + 1j*rng.normal(size=(3,3))
|
||||
c_raw = W @ W.conj().T # Hermitian PSD, generically full rank
|
||||
print("\nrandom c_raw (Hermitian PSD, rank =", np.linalg.matrix_rank(c_raw), "):")
|
||||
print(np.round(c_raw,3))
|
||||
|
||||
rho_raw = Phi @ c_raw @ Phi.conj().T # 64x64
|
||||
tr = np.trace(rho_raw).real
|
||||
rho = rho_raw/tr
|
||||
c = c_raw/tr
|
||||
print(f"\ntrace(rho_raw)={tr:.6f}; normalized rho has trace {np.trace(rho).real:.10f}")
|
||||
evals_rho = np.linalg.eigvalsh(rho)
|
||||
print("eigenvalues of rho (should be >=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}")
|
||||
|
|
@ -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 (|<Q|U^6|Q>|=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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue