In[]:=
evolutionGraph=ResourceFunction["MultiwaySystem"][{"X""A","X""B","X""C"},"XX",3,"EvolutionGraph"]
Out[]=
In[]:=
vertexList=VertexList[evolutionGraph]
Out[]=
{0XX,1AX,1BX,1CX,1XA,1XB,1XC,2AA,2AB,2AC,2BA,2BB,2BC,2CA,2CB,2CC}
In[]:=
states=Last/@Select[vertexList,First[#]2&]
Out[]=
{AA,AB,AC,BA,BB,BC,CA,CB,CC}
In[]:=
ClearAll[Detector]
In[]:=
Detector[string1_String,string2_String]:=1/;(string1===string2&&string1=!="X")Detector[string1_String,string2_String]:=-1/2/;(string1=!=string2&&string1=!="X")Detector[string1_String,string2_String]:=0/;(string1==="X")
In[]:=
Detector[strings_List,measurement_String]:=(Detector[StringTake[#,1],measurement]*Detector[StringTake[#,-1],measurement])&/@strings
In[]:=
Detector[states,"A"]
Out[]=
1,-,-,-,,,-,,
1
2
1
2
1
2
1
4
1
4
1
2
1
4
1
4
In[]:=
Detector[states,"B"]
Out[]=
,-,,-,1,-,,-,
1
4
1
2
1
4
1
2
1
2
1
4
1
2
1
4
In[]:=
Detector[states,"C"]
Out[]=
,,-,,,-,-,-,1
1
4
1
4
1
2
1
4
1
4
1
2
1
2
1
2
In[]:=
evolutionGraph=ResourceFunction["MultiwaySystem"][{"X""A","X""B","X""C"},"CanonicalKnuthBendixCompletion"]
Out[]=
{AB,BA,AC,CA,BC,CB}
In[]:=
evolutionGraph=ResourceFunction["MultiwaySystem"][Join[{"X""A","X""B","X""C"},{"A""B","B""A","A""C","C""A","B""C","C""B"}],"XX",3,"EvolutionGraph"]
Out[]=
In[]:=
vertexList=VertexList[evolutionGraph]
Out[]=
In[]:=
states=Last/@Select[vertexList,First[#]2&]
Out[]=
{AA,AB,AC,AX,BA,BB,BC,BX,CA,CB,CC,CX,XA,XB,XC}
In[]:=
Detector[states,"A"]
Out[]=
1,-,-,0,-,,,0,-,,,0,0,0,0
1
2
1
2
1
2
1
4
1
4
1
2
1
4
1
4
In[]:=
Detector[states,"B"]
Out[]=
,-,,0,-,1,-,0,,-,,0,0,0,0
1
4
1
2
1
4
1
2
1
2
1
4
1
2
1
4
In[]:=
Detector[states,"C"]
Out[]=
,,-,0,,,-,0,-,-,1,0,0,0,0
1
4
1
4
1
2
1
4
1
4
1
2
1
2
1
2