Skip to content

Commit

Permalink
Update superdense coding example and addition example
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Aug 15, 2017
1 parent a0d321b commit 4cc4363
Showing 1 changed file with 53 additions and 44 deletions.
97 changes: 53 additions & 44 deletions src/ui/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,28 @@ const chshTestLink = {
]
};
const additionLink = {"cols":[
["Counting5",1,1,1,1,1,1,1,1,"X"],
["Chance5",1,1,1,1,"Measure","Chance5"],
["…","…","…","…","…","…","…","…","…","…","…"],
["X","X","X","X","•",1,1,"X","X","X"],
["Swap",1,1,1,"Swap",1,"•"],
["Counting5",1,1,1,1,1,1,1,"X"],
["Chance5",1,1,1,1,"Chance5"],
["X","X","X","X","•","X","X","X","X","X"],
[1,1,1,1,"•","X"],
["Swap",1,1,1,"Swap","•"],
[1,1,1,1,"•",1,"X"],
[1,"Swap",1,1,"Swap",1,"•"],
[1,1,1,1,"•",1,1,"X"],
[1,"Swap",1,1,"Swap",1,1,"•"],
[1,1,"Swap",1,"Swap",1,1,"•"],
[1,1,1,1,"•",1,1,1,"X"],
[1,1,"Swap",1,"Swap",1,1,1,"•"],
[1,1,1,"Swap","Swap",1,1,1,"•"],
[1,1,1,1,"•",1,1,1,1,"X"],
[1,1,1,"Swap","Swap",1,1,1,1,"•"],
[1,1,1,1,"•",1,1,1,1,1,"X"],
[1,1,1,"Swap","Swap",1,1,1,1,"•"],
[1,1,"Swap",1,"Swap",1,1,1,"•"],
[1,"Swap",1,1,"Swap",1,1,"•"],
["Swap",1,1,1,"Swap",1,"•"],
["X","X","X","X","•"],
[1,1,1,"•",1,1,1,1,1,"X"],
[1,1,"•",1,1,1,1,1,"X"],
[1,"•",1,1,1,1,1,"X"],
["•",1,1,1,1,1,"X"],
["…","…","…","…","…","…","…","…","…","…","…"],
["Chance5",1,1,1,1,1,"Chance5"]
[1,1,1,"Swap","Swap",1,1,1,"•"],
[1,1,1,"•",1,1,1,1,"X"],
[1,1,"Swap",1,"Swap",1,1,"•"],
[1,1,"•",1,1,1,1,"X"],
[1,"Swap",1,1,"Swap",1,"•"],
[1,"•",1,1,1,1,"X"],
["Swap",1,1,1,"Swap","•"],
["•",1,1,1,1,"X"],
["X","X","X","X","•","X","X","X","X","X"],
["Chance5",1,1,1,1,"Chance5"]
]};
const qftLink = {"cols":[
["Counting8"],
Expand All @@ -164,21 +163,34 @@ const qftLink = {"cols":[
["Z^⅟₁₂₈","Z^⅟₆₄","Z^⅟₃₂","Z^⅟₁₆","Z^⅛","Z^¼","Z^½","•"],
[1,1,1,1,1,1,1,"H"]
]};
const superdenseCodingLink = {"cols":[
[1,1,"H"],
[1,1,"•",1,1,1,"X"],
["…","…","…","…","…","…","…"],
["Counting2"],
["Measure","Measure"],
["Chance","Chance"],
[1,"•","X"],
["•",1,"Z"],
[1,1,"Swap",1,1,"Swap"],
[1,1,1,1,1,"•","X"],
[1,1,1,1,1,"H"],
[1,1,1,1,1,"Measure","Measure"],
[1,1,1,1,1,"Chance","Chance"]
]};
const superdenseCodingLink = {
"cols":[
[1,1,"H"],
[1,1,"•",1,1,1,"X"],
["…","…","…","…","…","…","…"],
["Counting2"],
["Measure","Measure"],
["~msg"],
["Chance","Chance"],
["~enc"],
[1,"•","X"],
["•",1,"Z"],
[1,1,1,"~send"],
[1,1,"Swap",1,1,"Swap"],
[1,1,1,1,1,"~dec"],
[1,1,1,1,1,"•","X"],
[1,1,1,1,1,"H"],
[1,1,1,1,1,"Measure","Measure"],
[1,1,1,1,1,"~msg"],
[1,1,1,1,1,"Chance","Chance"],
],
"gates":[
{"id":"~msg","name":"message","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~enc","name":"encode","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~send","name":"send","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~dec","name":"decode","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
]
};
const symmetryBreakingLink = {
"cols":[
["~tpqg",1,"~r2ku"],
Expand Down Expand Up @@ -209,22 +221,19 @@ const symmetryBreakingLink = {
};
const shorLink = {
"cols":[
[1,1,1,1,1,1,1,1,1,1,"~mdaf",1,1,1,"~h1nm"],
[1,1,1,1,1,1,1,1,1,1,"~input",1,1,1,"~guess"],
[1,1,1,1,1,1,1,1,1,1,{"id":"setR","arg":55},1,1,1,{"id":"setB","arg":26}],
[],
["H","H","H","H","H","H","H","H","H","H","X"],
["inputA10",1,1,1,1,1,1,1,1,1,"*BToAmodR6"],
["QFT†10"],
[1,1,1,1,"~mjoi",1,1,1,1,1,1,1,"~mjoi"],
["Chance10",1,1,1,1,1,1,1,1,1,"Chance6"],
[1,1,1,1,"~a6uq"],
["Sample10"]
[1,1,1,1,"~out"],
["Chance10"],
],
"gates":[
{"id":"~h1nm","name":"guess:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~mdaf","name":"input:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~a6uq","name":"samples:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~mjoi","name":"state:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"}
{"id":"~guess","name":"guess:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~input","name":"input:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"},
{"id":"~out","name":"out:","matrix":"{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}"}
]
};

Expand Down

0 comments on commit 4cc4363

Please sign in to comment.