In[]:=
WeightedBranchialGraph[rule_,init_,t_,mult_:1,labs_:True]:=WeightedBranchial[Graph[ResourceFunction["MultiwaySystem"][rule,init,t,"BranchialGraphStructure","IncludeStatePathWeights"->True],If[labs,VertexLabels->"VertexWeight",{}]],mult];​​WeightedBranchial[g_,mult_:12]:=With[{cc=AnnotationValue[g,VertexWeight]},Graph[g,VertexStyle->Red,VertexSize->Thread[VertexList[g]->mult*(cc/Sqrt[Total[cc^2]])]]];​​Table[WeightedBranchialGraph[{"A"->"B","B"->"AB"},"AB",t,{.2,.6,1,2,3,5}[[t-1]],t<=5],{t,2,7}]
Out[]=

,
,
,
,
,

In[]:=
WeightedBranchialGraph[rule_,init_,t_,mult_:1,labs_:True]:=WeightedBranchial[Graph[ResourceFunction["MultiwaySystem"][rule,init,t,"BranchialGraphStructure","IncludeStatePathWeights"->True],If[labs,VertexLabels->"VertexWeight",{}]],mult];​​WeightedBranchial[g_,mult_:12]:=With[{cc=AnnotationValue[g,VertexWeight]},Graph[g,VertexStyle->Red,VertexSize->Thread[VertexList[g]->mult*(cc/Sqrt[Total[cc^2]])]]];​​Table[WeightedBranchialGraph[{"AB"->"BA","BA"->"AB"},ResourceFunction["StringTuples"]["AB",4],t,{.2,.6,1,2,3,5}[[t-1]],t<=5],{t,2,7}]
Out[]=

,
,
,
,
,

In[]:=
ResourceFunction["MultiwaySystem"][{"AB"->"BA","BA"->"AB"},ResourceFunction["StringTuples"]["AB",5],8,"StatesGraph"]
Out[]=

Bell’s inequality from the leftmost character “affecting” the rightmost character

In[]:=
FirstWeaklyConnectedGraphComponents
99

Out[]=
CompleteGraph[]
In[]:=
ResourceFunction["MultiwaySystem"][{"A"->"B","B"->"A"},ResourceFunction["StringTuples"]["AB",3],8,"StatesGraph"]
Out[]=
In[]:=
Module[{g=ResourceFunction["MultiwaySystem"][{"A"->"B","B"->"A"},ResourceFunction["StringTuples"]["AB",3],8,"StatesGraph"],ge},ge=GraphEmbedding[g];Graph[g,VertexCoordinates:>{x_:>{ge[[VertexIndex[g,x],1]],FromDigits[LetterNumber[x],2]}}]]
Out[]=
Prepare initial state: a superposition/combination of the top 4 states