
# Per hop : 1 vert ex ex cha ng ed
# Old ver tex : 3 b ond s des tr oye d ( to re main ing 3 ver ti ces )
# New ver tex : 3 b ond s crea te d ( to re maini ng 3 ver tice s )
# U nc han ge d : 3 bonds a mong r et ained ve rt ices
bo nds _de str oye d = 3
bo nds _c rea ted = 3
to tal _re arr ange d = bo nds _de str oyed + bon ds_ cre ate d # = 6
# Each re arran ged bond d is turbs K s urr ou ndi ng bonds
bar ri er = t otal _rea rran ged * K
print (f " Bo nds de stroy ed per hop : { bon ds_ dest roye d } ")
print (f " Bo nds crea te d per hop : { bo nds _cr eat ed } ")
print (f " To tal re arr anged : { to tal _re arra nged }")
print (f " Each di st urbs K = {K} n eighb ors " )
print (f " Peierls - Nab ar ro ba rr ie r : { to tal _re arr ange d } x { K} = { b ar ri er } bond - stat es ")
print (f " B ar ri er / prot on m ass : { ba rr ie r }/18 36 = { barrier /18 36 :. 4 f} "
f" = { b arri er /1 83 6*1 00: .1 f }% " )
# ===== == == === == == ===== == == === == == === == == ===== == == === == == =====
# 5. SPIN -1/2: 720 PERI ODI CIT Y
# ===== == == === == == ===== == == === == == === == == ===== == == === == == =====
print (f "\ n5 . SPIN -1/2 VE RIF ICA TIO N ")
print (" -" * 40)
# R ot atio n of tet void by 360 = inve rsio n = P <- > N
# Phase ac qu ired : e ^( i ) = -1
# After 360 : -> - (P -> N)
# After 720 : -> -(- ) = + (N -> P)
pha se_ 36 0 = -1 # one P -> N flip
pha se_ 72 0 = phase _360 * p has e_ 360 # two flips
print (f " Ph ase afte r 360 : { ph ase_3 60 } ( -> - )" )
print (f " Ph ase afte r 720 : { ph ase_7 20 } ( -> + )" )
print (f " Retu rn to ori gina l after 720 : { ph ase _7 20 == +1} " )
print (f " This IS spin - 1/2 " )
# ===== == == === == == ===== == == === == == === == == ===== == == === == == =====
# 6. C ON NEC TIV ITY STRU CTU RE
# ===== == == === == == ===== == == === == == === == == ===== == == === == == =====
print (f "\ n6 . C ONN ECT IVI TY GRAPH ")
print (" -" * 40)
print (" A dj acenc y list : ")
for i in ad jac en cy :
ne igh bo rs_ str = ", ". join (
f" {n [’ index ’]}({ n[’ type ’]}) " for n in ad jacen cy [ i])
print (f " Tet {i }({ type s [i ]}) -> [{ nei ghb ors _st r }] ")
# Ve ri fy : the ad ja cency graph is b ip artit e ( P con nect s only to N )
is _b ipa rti te = all (
all ( n[ ’ type ’ ] != types [i ] for n in ad jac en cy [ i])
for i in ad jac en cy
)
print (f "\n Gra ph is bip arti te ( P< -> N only ) : { is_ bip art ite }" )
# ===== == == === == == ===== == == === == == === == == ===== == == === == == =====
# SUM MA RY
# ===== == == === == == ===== == == === == == === == == ===== == == === == == =====
print (f "\n{ ’= ’ * 60} " )
print (" V ERI FIC ATI ON SUMM AR Y ")
print (f "{ ’= ’ * 60} " )
checks = [
(" 3 n ei ghbor s per void " , all ( len ( adj ace nc y [i ]) == 3 for i in ad ja cen cy )) ,
(" All hops flip P <- >N " , s ame_h ops == 0) ,
(" Zero same - or ie nta tio n hops " , sa me_ho ps == 0) ,
(" Hop d is tanc e = a/2 ", all ( abs (d - 0.5) < 0.001 for d in dist ance s )) ,
(" Bar ri er = 72 bond - state s " , b ar ri er == 72) ,
(" 720 for spin retu rn " , pha se _72 0 == +1) ,
(" Bip art it e ad ja cen cy gra ph " , i s_b ipa rt ite ) ,
]
for desc , pas se d in chec ks :
13