TFPT scientific source excerpt Original repository path: experiments/theory-contracts/seam-collar-multifield-20261016/boundary_operation_response.py Original file SHA-256: e0be5a934fee1fd72b830d620b4e7bd73781eb85bec035e876d07c86f9f627f3 Inclusive original lines: 1-89 Line numbers below refer to the original source. This bounded excerpt is source evidence; it is not a new proof/checker run. Conversation metadata and personal execution details are omitted where indicated. 000001 | """Two-face source response, not an assumed local quantum instrument. 000002 | 000003 | All rational values are read from the already specified quarter-circle 000004 | product collar, alpha=1/4 and ell=4 log 2. Infinite-shift formulas are checked 000005 | coefficientwise, without truncating the shift to a finite/cyclic matrix. 000006 | """ 000007 | import json 000008 | import sys 000009 | from pathlib import Path 000010 | import sympy as s 000011 | 000012 | 000013 | def ratio(n): 000014 | return s.Rational(2)**(-(4*n+1)) 000015 | 000016 | 000017 | def occupation_chart(n): 000018 | return 1/(1+ratio(n)**2) 000019 | 000020 | 000021 | def graph(n): 000022 | r=ratio(n) 000023 | return s.Matrix([[1,r],[r,r*r]])/(1+r*r) 000024 | 000025 | 000026 | def exact_check(): 000027 | p=s.diag(1,0) 000028 | rows=[] 000029 | for n in range(-3,4): 000030 | r=ratio(n); a=occupation_chart(n); g=graph(n) 000031 | j=s.Matrix([1,r])/s.sqrt(1+r*r) 000032 | null=s.Matrix([-r,1])/s.sqrt(1+r*r) 000033 | assert g*g == g and g.T == g 000034 | assert s.simplify(j*j.T-g) == s.zeros(2) 000035 | assert g*null == s.zeros(2,1) 000036 | leak=s.simplify((null.T*p*g*p*null)[0]) 000037 | assert leak == a*(1-a) and leak > 0 000038 | m=graph(n+1) 000039 | # diag(U,U) has identity 2x2 block from mode n to n+1. 000040 | assert m != g # it fails to commute with the fixed graph. 000041 | block=s.simplify((s.Matrix([1,ratio(n+1)]).T / 000042 | s.sqrt(1+ratio(n+1)**2)*p*j)[0]) 000043 | assert s.simplify(block-s.sqrt(a*occupation_chart(n+1))) == 0 000044 | forward=a*occupation_chart(n+1) 000045 | backward=a*occupation_chart(n-1) 000046 | comm=s.factor(forward-backward) 000047 | assert comm > 0 000048 | rows.append({'n':n,'a':str(a),'Lstar_L':str(forward), 000049 | 'L_Lstar':str(backward),'commutator':str(comm), 000050 | 'null_vector_face_mask_norm_squared':str(leak)}) 000051 | # Fixed-graph facewise unitary classification, linear intertwiner space: 000052 | # the diagonal graph blocks force U0 to preserve each B eigenspace; 000053 | # nonzero offdiagonal graph block then forces U1=U0. Check both simple 000054 | # spectrum (complex dimension 3) and a double degeneracy (dimension 5). 000055 | from sympy import linear_eq_to_matrix 000056 | dimensions=[] 000057 | for modes in [(-1,0,1),(0,0,1)]: 000058 | aa=s.diag(*(occupation_chart(n) for n in modes)) 000059 | cc=s.diag(*(ratio(n)*occupation_chart(n) for n in modes)) 000060 | gg=aa.row_join(cc).col_join(cc.row_join(s.eye(3)-aa)) 000061 | variables=s.symbols('x:18') 000062 | u0=s.Matrix(3,3,variables[:9]);u1=s.Matrix(3,3,variables[9:]) 000063 | ss=s.diag(u0,u1) 000064 | coeff,_=linear_eq_to_matrix(list(ss*gg-gg*ss),variables) 000065 | dim=18-coeff.rank();dimensions.append(dim) 000066 | assert dim==(3 if len(set(modes))==3 else 5) 000067 | a0=occupation_chart(0);a1=occupation_chart(1) 000068 | w0=s.sqrt(a0*a1) 000069 | # xi=(e0+e1)/sqrt2. This is a coherent boundary-vector comparison, 000070 | # not a physically source-prepared quantum state claim. 000071 | overlap=w0/2 000072 | return {'verdict':'NONCOMMUTING_GEOMETRIC_RESPONSE_DERIVED_PHYSICAL_OPERATION_OPEN', 000073 | 'alpha':'1/4','ell':'4 log 2','mode_checks':rows, 000074 | 'coherent_overlap_I_L_on_two_mode_boundary_vector':str(overlap), 000075 | 'coherent_overlap_I_iL':str(s.I*overlap), 000076 | 'fixed_graph_intertwiner_dimensions_simple_degenerate':dimensions, 000077 | 'raw_face_mask_descends_to_G_quotient':False, 000078 | 'compressed_response_descends':True, 000079 | 'physical_local_instrument_derived':False, 000080 | 'physical_state_preparation_derived':False, 000081 | 'raw_P1_source_selected':False, 000082 | 'internal_carrier_or_coupling_assumed':False} 000083 | 000084 | 000085 | if __name__=='__main__': 000086 | result=exact_check() 000087 | target=Path(sys.argv[1]) if len(sys.argv)>1 else Path(__file__).with_name('boundary_operation_response_results.json') 000088 | target.write_text(json.dumps(result,indent=2)+'\n') 000089 | print(json.dumps(result,indent=2))