From 22a7b07e0a549ab36d8b45eb84ac960601392e23 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sat, 6 Apr 2019 11:29:17 +0200 Subject: [PATCH 01/20] decompose to list of matrices with QR --- MeasuredQCM.nb | 1180 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1180 insertions(+) create mode 100644 MeasuredQCM.nb diff --git a/MeasuredQCM.nb b/MeasuredQCM.nb new file mode 100644 index 0000000..51a3731 --- /dev/null +++ b/MeasuredQCM.nb @@ -0,0 +1,1180 @@ +(* Content-type: application/vnd.wolfram.mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='Mathematica 11.3' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 158, 7] +NotebookDataLength[ 44994, 1172] +NotebookOptionsPosition[ 40704, 1094] +NotebookOutlinePosition[ 41045, 1109] +CellTagsIndexPosition[ 41002, 1106] +WindowFrame->Normal*) + +(* Beginning of Notebook Content *) +Notebook[{ + +Cell[CellGroupData[{ +Cell[BoxData[ + RowBox[{"SetDirectory", "[", + "\"\\"", "]"}]], "Input", + CellChangeTimes->{3.76171691436585*^9}, + CellLabel->"In[1]:=",ExpressionUUID->"92422b64-8977-4de9-a861-4e51815262eb"], + +Cell[BoxData["\<\"C:\\\\Users\\\\Boxi\\\\OneDrive\\\\Studium\\\\QIT \ +prject\\\\code\\\\UniversalQCompiler-master\"\>"], "Output", + CellChangeTimes->{ + 3.7617168314055357`*^9, 3.7617169155045853`*^9, 3.761739880967972*^9, + 3.7617400669236774`*^9, 3.7617402671570997`*^9, {3.761743457513034*^9, + 3.761743457907978*^9}, 3.7623353704901447`*^9, 3.762952577065445*^9}, + CellLabel->"Out[1]=",ExpressionUUID->"c35e3d44-9bfe-43f6-ba69-19f57ba42b4e"] +}, Open ]], + +Cell[BoxData[ + RowBox[{ + RowBox[{"Import", "[", "\"\\"", "]"}], + ";"}]], "Input", + CellChangeTimes->{3.761716881324997*^9, 3.7617169217643223`*^9}, + CellLabel->"In[2]:=",ExpressionUUID->"c8273595-1fe1-41fa-9daf-4ea21b66a83f"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"QRSplit", "[", "v_", "]"}], ":=", "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "v1", ",", " ", "v2", ",", "q1", ",", "q2", ",", "r1", ",", "r2"}], + "}"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{"v1", ",", "v2"}], "}"}], " ", "=", " ", + RowBox[{"Partition", "[", + RowBox[{"v", ",", " ", + RowBox[{ + RowBox[{"Length", "[", "v", "]"}], "/", "2"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"q1", ",", "r1"}], "}"}], " ", "=", " ", + RowBox[{"QRDecomposition", "[", "v1", "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"q2", ",", "r2"}], "}"}], " ", "=", " ", + RowBox[{"QRDecomposition", "[", "v2", "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"r1", ",", + RowBox[{"Transpose", "[", "q1", "]"}], ",", "r2", ",", + RowBox[{"Transpose", "[", "q2", "]"}]}], "}"}]}]}], + "\[IndentingNewLine]", "]"}]}]], "Input", + CellChangeTimes->{{3.7617322657800064`*^9, 3.7617322714418325`*^9}, { + 3.7617324037499504`*^9, 3.7617326020416613`*^9}, {3.7617329062341137`*^9, + 3.7617329494814396`*^9}, {3.761733115185172*^9, 3.7617331205049477`*^9}, { + 3.761733277251341*^9, 3.7617333092826595`*^9}, 3.7617333895377865`*^9, { + 3.7617335281230683`*^9, 3.761733564121835*^9}, {3.7617336208022203`*^9, + 3.7617336246987967`*^9}, {3.761735780977034*^9, 3.7617357850870404`*^9}, { + 3.761736766005331*^9, 3.76173677113461*^9}, {3.7617370879033484`*^9, + 3.7617370975016317`*^9}, 3.7617374230938377`*^9, 3.7617379415014057`*^9, { + 3.7617392856923733`*^9, 3.761739304426289*^9}, {3.7617394210144253`*^9, + 3.761739474289889*^9}, {3.761739674803536*^9, 3.7617397132186604`*^9}, { + 3.76173974644481*^9, 3.761739746704157*^9}, {3.7617397816825514`*^9, + 3.7617397891864786`*^9}, {3.761739856660015*^9, 3.761739858697543*^9}, { + 3.761740025834587*^9, 3.761740030434311*^9}, {3.761740077619101*^9, + 3.7617400779462605`*^9}, {3.761740642275613*^9, 3.7617407033642297`*^9}, { + 3.761740835282392*^9, 3.7617408539123535`*^9}, {3.7617408938513727`*^9, + 3.7617409168019505`*^9}, {3.761740951139127*^9, 3.7617409615622454`*^9}, { + 3.761741119825877*^9, 3.761741137098731*^9}, {3.7617411846664906`*^9, + 3.7617412628827868`*^9}, {3.761741308873763*^9, 3.7617413140728617`*^9}, { + 3.761741370730278*^9, 3.7617413776657515`*^9}, {3.7617414310150013`*^9, + 3.76174145343305*^9}, {3.761741514226403*^9, 3.761741522792517*^9}, + 3.7617417195620637`*^9, {3.761741761583665*^9, 3.76174176295898*^9}, { + 3.761741800809732*^9, 3.7617418244285536`*^9}, 3.761742810016183*^9, + 3.7617428407589483`*^9, {3.76174287795944*^9, 3.761742912946875*^9}, { + 3.761742963336087*^9, 3.7617430294070034`*^9}, {3.7617434911367626`*^9, + 3.761743528885823*^9}, {3.7617435589284253`*^9, 3.7617435593503284`*^9}, + 3.7617452764122887`*^9, {3.761745694334489*^9, 3.7617457035887346`*^9}, { + 3.762959505283737*^9, 3.7629595713260603`*^9}, {3.762959602339146*^9, + 3.7629596083969436`*^9}, {3.7629597006710844`*^9, 3.762959721670905*^9}, { + 3.76295977035023*^9, 3.7629597706524076`*^9}, {3.7629598775820503`*^9, + 3.762959881388866*^9}}, + CellLabel-> + "In[163]:=",ExpressionUUID->"37f5d4d4-f15e-4b4a-87a0-96ea200d4275"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"MeasuredQCMLevel", "[", + RowBox[{"qList_", ",", " ", "rList_"}], "]"}], ":=", "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "qrSplitResult", ",", "currentrList", ",", " ", "newqList", ",", " ", + "newrList"}], "}"}], ",", "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{ + "QR", " ", "decompose", " ", "each", " ", "q", " ", "matrix", " ", + "from", " ", "the", " ", "last", " ", "iteration", " ", "and", " ", + "flatten", " ", "the", " ", "result", " ", "in", " ", "to", " ", "a", + " ", "long", " ", "list"}], "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"qrSplitResult", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{ + RowBox[{"Map", "[", + RowBox[{"QRSplit", ",", " ", "qList"}], "]"}], ",", "1"}], "]"}]}], + ";", "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{ + RowBox[{ + "Pick", " ", "the", " ", "r", " ", "matrices", " ", "and", " ", + "concatenate", " ", "every", " ", "two", " ", "of", " ", "them"}], + ",", " ", + RowBox[{"append", " ", "the", " ", "list", " ", + RowBox[{"{", + RowBox[{"ri1", ",", "ri2", ",", + RowBox[{"ri3", "..."}]}], "}"}], " ", "to", " ", "the", " ", + "exisiting", " ", "rList"}]}], "*)"}], "\[IndentingNewLine]", + RowBox[{"newrList", " ", "=", " ", + RowBox[{"Append", "[", + RowBox[{"rList", ",", " ", + RowBox[{ + RowBox[{ + RowBox[{"Flatten", "[", + RowBox[{"#", ",", "1"}], "]"}], "&"}], " ", "/@", " ", + RowBox[{"Partition", "[", + RowBox[{ + RowBox[{"qrSplitResult", "[", + RowBox[{"[", + RowBox[{"1", ";;", + RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}], ",", "2"}], + "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{ + "Pick", " ", "the", " ", "q", " ", "matrices", " ", "in", " ", "a", " ", + "list"}], "*)"}], "\[IndentingNewLine]", + RowBox[{"newqList", " ", "=", " ", + RowBox[{"qrSplitResult", "[", + RowBox[{"[", + RowBox[{"2", ";;", + RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"newqList", ",", "newrList"}], "}"}]}]}], "\[IndentingNewLine]", + "]"}]}]], "Input", + CellChangeTimes->{{3.761736925166616*^9, 3.7617369627341237`*^9}, { + 3.761737008757016*^9, 3.761737026219349*^9}, {3.7617372924890556`*^9, + 3.7617374188202453`*^9}, {3.761737450357885*^9, 3.7617374750987387`*^9}, { + 3.7617375164451065`*^9, 3.761737551334485*^9}, {3.7617376088486395`*^9, + 3.7617376692720118`*^9}, {3.761737782253359*^9, 3.761737783652645*^9}, { + 3.761737824574155*^9, 3.761737958717331*^9}, 3.761740036516015*^9, + 3.7617454114291525`*^9, {3.761745812613103*^9, 3.761745817259673*^9}, { + 3.7617461819010553`*^9, 3.761746237290985*^9}, {3.7617462839461517`*^9, + 3.7617463984109697`*^9}, {3.761746480875413*^9, 3.7617464829309063`*^9}, { + 3.761746556483223*^9, 3.761746560458565*^9}, 3.7617466032199*^9, { + 3.7617466875872*^9, 3.76174670374135*^9}, {3.7617467338129325`*^9, + 3.761746749290538*^9}, {3.761746807582584*^9, 3.761746872901718*^9}, { + 3.7617469046647906`*^9, 3.76174690481838*^9}, {3.761747465139044*^9, + 3.7617474704428573`*^9}, {3.761747519539528*^9, 3.7617475285135517`*^9}, { + 3.762968917425428*^9, 3.762968928952589*^9}, {3.762969018337469*^9, + 3.762969071451377*^9}, {3.7629691208871593`*^9, 3.7629691863601103`*^9}, { + 3.7629692307304077`*^9, 3.7629692623757486`*^9}, {3.7629693389459825`*^9, + 3.7629695259097323`*^9}, {3.76296956543196*^9, + 3.762969572847123*^9}},ExpressionUUID->"1187a008-4456-444b-a9da-\ +076ea4eaff1e"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"MeasuredQCM", "[", "krausList_", "]"}], ":=", + "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "n", ",", "m", ",", "k", ",", " ", "e2k", ",", "qrLoopNum", ",", " ", + "i", ",", "v", ",", "qList", ",", "rList"}], "}"}], ",", + "\[IndentingNewLine]", + RowBox[{"(*", "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"(", + RowBox[{"n", ",", "m"}], ")"}], " ", "=", " ", + RowBox[{"matrix", " ", "size"}]}], ",", "\[IndentingNewLine]", + RowBox[{"e2k", " ", "=", " ", + RowBox[{ + RowBox[{"kraus", " ", "rank", " ", "with", " ", "e2k"}], "=", + RowBox[{"2", "^", "k"}]}]}], ",", "\[IndentingNewLine]", + RowBox[{"qrLoopNum", " ", "=", " ", + RowBox[{ + "number", " ", "of", " ", "iteration", " ", "with", " ", "qr", " ", + "decomposition"}]}], ",", "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{ + "isometry", " ", "generated", " ", "from", " ", "all", " ", "Kraus", + " ", "operators"}]}], ",", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"The", " ", "result", " ", "is", " ", "a", " ", "list", " ", + RowBox[{"{", + RowBox[{"qList", ",", "rList"}], "}"}]}], ",", " ", + "\[IndentingNewLine]", + RowBox[{"qList", " ", "=", " ", + RowBox[{ + RowBox[{"{", + RowBox[{ + "q1", ",", " ", "q2", ",", " ", "q3", ",", " ", "q4", ",", "..."}], + "}"}], " ", "with", " ", + RowBox[{"2", "^", "qrLoopNum"}], " ", "matrix"}]}], ",", + "\[IndentingNewLine]", + RowBox[{"rList", " ", "=", " ", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "r1", "}"}], ",", + RowBox[{"{", + RowBox[{"r21", ",", "r22"}], "}"}], ",", + RowBox[{ + RowBox[{"{", + RowBox[{"r31", ",", "r32", ",", "r33", ",", "r34"}], "}"}], + "..."}]}], "}"}]}]}], "\[IndentingNewLine]", "*)"}], + "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{"e2k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", + RowBox[{"Dimensions", "[", "krausList", "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"k", " ", "=", " ", + RowBox[{"Log2", "[", "e2k", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"m", "<", "n"}], ",", " ", + RowBox[{"qrLoopNum", " ", "=", " ", "k"}], ",", + RowBox[{"qrLoopNum", " ", "=", " ", + RowBox[{"n", "+", "k", "-", "m", "-", "1"}]}]}], "]"}], ";", + "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"qList", " ", "=", " ", + RowBox[{"{", "v", "}"}]}], ";", "\[IndentingNewLine]", + RowBox[{"rList", " ", "=", " ", + RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + "have", " ", "to", " ", "make", " ", "sure", " ", "that", " ", "k", " ", + "is", " ", "an", " ", + RowBox[{"integer", "?"}]}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "0"}], ",", + RowBox[{"i", "<", "k"}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{ + RowBox[{"{", + RowBox[{"qList", ",", " ", "rList"}], "}"}], "=", + RowBox[{"MeasuredQCMLevel", "[", + RowBox[{"qList", ",", " ", "rList"}], "]"}]}]}], "]"}], ";", + "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"qList", ",", " ", "rList"}], "}"}]}]}], "\[IndentingNewLine]", + "]"}], " "}]], "Input", + CellChangeTimes->{{3.7617377864840765`*^9, 3.7617378194997277`*^9}, { + 3.7617379748013487`*^9, 3.761738003892516*^9}, {3.761738052689681*^9, + 3.761738058012427*^9}, {3.7617381340280666`*^9, 3.761738150069158*^9}, { + 3.761738398747989*^9, 3.7617384010218787`*^9}, {3.7617384438014517`*^9, + 3.761738573208374*^9}, {3.761738670003517*^9, 3.761738837678238*^9}, { + 3.7617389148922296`*^9, 3.761738917075367*^9}, {3.76173896753539*^9, + 3.761738973253096*^9}, {3.7617390070437107`*^9, 3.761739100788925*^9}, { + 3.76173925359522*^9, 3.761739263836835*^9}, {3.761747374595267*^9, + 3.76174740002524*^9}, {3.7617491702256966`*^9, 3.7617491703862667`*^9}, { + 3.7617494500720043`*^9, 3.761749456504767*^9}, 3.7617512296199136`*^9, { + 3.7629574622175756`*^9, 3.7629574702001476`*^9}, {3.762957620383648*^9, + 3.7629576662887993`*^9}, {3.762957830664685*^9, 3.762957990832176*^9}, { + 3.7629580840478263`*^9, 3.76295843960859*^9}, {3.762958778830966*^9, + 3.7629587894136534`*^9}, {3.762958853576043*^9, 3.762959268666835*^9}, { + 3.7629676846354847`*^9, 3.7629677084323125`*^9}, {3.7629697597301655`*^9, + 3.762969779574246*^9}, {3.762969939926265*^9, 3.762969955279194*^9}, + 3.76297007927248*^9, {3.7629702369516497`*^9, 3.762970237958955*^9}}, + CellLabel-> + "In[212]:=",ExpressionUUID->"4d31936d-f5c5-4a93-a77e-6c45e4d5ce00"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"DecChannelRecursively", "[", "krausList_", "]"}], " ", ":=", + "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "e2k", ",", "n", ",", "m", ",", "v", ",", "r1", ",", "q1", ",", "r2", + ",", "q2"}], "}"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{"e2k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", + RowBox[{"Dimensions", "[", "krausList", "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"r1", ",", "q1", ",", "r2", ",", "q2"}], "}"}], " ", "=", " ", + RowBox[{"QRSplit", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"Join", "[", + RowBox[{"r1", ",", "r2"}], "]"}], ",", + RowBox[{"Partition", "[", + RowBox[{"q1", ",", "n"}], "]"}], ",", + RowBox[{"Partition", "[", + RowBox[{"q2", ",", "n"}], "]"}]}], "}"}]}]}], "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + "q1", " ", "q2", " ", "could", " ", "be", " ", "decomposed", " ", + "later"}], " ", "*)"}], "\[IndentingNewLine]", "]"}]}]], "Input", + CellChangeTimes->{ + 3.76297025185478*^9, {3.762970290006715*^9, 3.7629702995581617`*^9}, { + 3.7629703631510353`*^9, 3.7629703873084087`*^9}, {3.7629710158607793`*^9, + 3.7629710843705015`*^9}, {3.762971204861157*^9, 3.762971213628702*^9}, { + 3.7629712597015266`*^9, + 3.7629712730458307`*^9}},ExpressionUUID->"bf9400e4-112f-455e-ad27-\ +b1570cb960bc"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"2", ",", "4", ",", "4"}], "]"}]}]], "Input", + CellChangeTimes->{ + 3.762345226235097*^9, {3.76295773396966*^9, 3.762957742377147*^9}, { + 3.7629584774792767`*^9, 3.7629585011808696`*^9}, {3.762958616453359*^9, + 3.7629586774312315`*^9}, {3.762958798359782*^9, 3.762958804997046*^9}, + 3.7629689996654215`*^9}, + CellLabel-> + "In[207]:=",ExpressionUUID->"6aa016f4-c810-44a1-beae-1de455e59c51"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.18396889024069`", ",", "0.3566138746439067`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.3986546917168834`", ",", "0.22281326960585973`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.12323336447825374`", ",", "0.12935302033661175`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.2260943534345638`"}], ",", "0.22841668098803036`"}], + "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.37665754188567346`", ",", "0.1825987305520381`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.26686809932469824`"}], ",", "0.17218233146244227`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.18358347747372472`"}], ",", "0.23893082658999515`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.14411921088914306`", ",", "0.2875371513492605`"}], "}"}]}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.01886247381017142`", ",", "0.017810794040872144`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.29708201792338906`", ",", "0.13436770545221965`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.16332384112066298`", ",", "0.15462336292517292`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.21468468458051249`"}], ",", "0.34281875363133246`"}], + "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.20070429749097596`", ",", "0.34872627859902855`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.4313711156291747`"}], ",", "0.293578512276416`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.2867955311786994`"}], ",", "0.3176923036844874`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.05804652165996908`", ",", "0.2880764748713832`"}], "}"}]}], + "}"}]}], "}"}]], "Output", + CellChangeTimes->{ + 3.7617500313671465`*^9, 3.7623353828261967`*^9, 3.7623452299371986`*^9, + 3.7629571075016623`*^9, {3.762957735701007*^9, 3.7629577432198925`*^9}, { + 3.7629584584442005`*^9, 3.7629585024933586`*^9}, {3.762958617450691*^9, + 3.7629586458327627`*^9}, 3.7629586780665283`*^9, {3.7629587842773943`*^9, + 3.7629588053759904`*^9}, 3.7629595805474186`*^9, 3.762959616690753*^9, + 3.7629597439293575`*^9, 3.762959886504181*^9, 3.762968940804912*^9, { + 3.762969000709628*^9, 3.7629690476989217`*^9}, 3.7629691907433825`*^9, + 3.762969272350065*^9, 3.762970084628153*^9}, + CellLabel-> + "Out[207]=",ExpressionUUID->"4e902d86-cff5-4c5c-be20-a0df5af7fe54"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"result", " ", "=", " ", + RowBox[{ + RowBox[{"MeasuredQCM", "[", "krausList", "]"}], "[", + RowBox[{"[", "2", "]"}], "]"}]}]], "Input", + CellChangeTimes->{{3.7617496464813423`*^9, 3.761749675950652*^9}, { + 3.7623452627215776`*^9, 3.762345278926222*^9}, 3.7629584878555183`*^9, { + 3.7629692794650307`*^9, 3.7629692802559147`*^9}}, + CellLabel-> + "In[208]:=",ExpressionUUID->"41ec07a0-d058-43fd-849e-7267184e40fa"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.7256982575596331`"}], ",", + RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.7013856395392531`", ",", + RowBox[{"-", "0.1539614363039084`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.6816663834643358`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.7127820035944462`", ",", "0.15149981329753096`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.6990526620768311`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.5838819631992359`", ",", "0.13705251282363012`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.5587169950334525`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.8118385634167706`", ",", + RowBox[{"-", "0.09856946178075165`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.8119950673457139`"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Output", + CellChangeTimes->{{3.7617496618272924`*^9, 3.761749676467271*^9}, + 3.7623353848847647`*^9, {3.7623452529476767`*^9, 3.7623452795106583`*^9}, { + 3.7629571090116224`*^9, 3.7629571268748364`*^9}, {3.762958460111739*^9, + 3.7629585042386894`*^9}, 3.7629586214629574`*^9, 3.762958683574794*^9, { + 3.7629587867318573`*^9, 3.762958807654894*^9}, 3.7629595826707106`*^9, + 3.7629596185787015`*^9, 3.762959745807334*^9, 3.762959887705967*^9, + 3.762968941753374*^9, {3.7629690021986465`*^9, 3.7629690484319596`*^9}, + 3.7629691917756214`*^9, {3.76296927448635*^9, 3.76296928135697*^9}, + 3.7629700862129126`*^9}, + CellLabel-> + "Out[208]=",ExpressionUUID->"a0522204-1ad4-4a85-adb6-f1322c219741"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"result", "[", + RowBox[{"[", "2", "]"}], "]"}]], "Input", + CellChangeTimes->{{3.7629587190588655`*^9, 3.762958749710843*^9}, { + 3.762969305356764*^9, 3.7629693054963913`*^9}}, + CellLabel-> + "In[209]:=",ExpressionUUID->"3d0c5e51-f455-46e4-82c9-33de2d223ca1"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.7013856395392531`", ",", + RowBox[{"-", "0.1539614363039084`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.6816663834643358`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.7127820035944462`", ",", "0.15149981329753096`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.6990526620768311`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.5838819631992359`", ",", "0.13705251282363012`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.5587169950334525`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.8118385634167706`", ",", + RowBox[{"-", "0.09856946178075165`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.8119950673457139`"}], "}"}]}], "}"}]}], + "}"}]], "Output", + CellChangeTimes->{{3.762958722666036*^9, 3.7629587501446805`*^9}, + 3.7629588095478296`*^9, 3.7629689428753967`*^9, 3.762969003269779*^9, + 3.762969049166993*^9, {3.7629692871734085`*^9, 3.7629693059452677`*^9}, + 3.7629700872092466`*^9}, + CellLabel-> + "Out[209]=",ExpressionUUID->"a58e58d5-26d0-4577-bafe-563c3fd33d97"] +}, Open ]], + +Cell["4 q matrices :", "Text", + CellChangeTimes->{{3.7617499275138626`*^9, + 3.7617499416151423`*^9}},ExpressionUUID->"aaf22bd3-28b0-4a45-86a2-\ +95feae5ae1e0"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "<", "5"}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{ + RowBox[{"result", "[", + RowBox[{"[", + RowBox[{"1", ",", "i"}], "]"}], "]"}], "//", "MatrixForm"}], " ", + "]"}]}], "]"}], ";"}]], "Input", + CellChangeTimes->{{3.7617496827753987`*^9, 3.7617497914947033`*^9}}, + CellLabel-> + "In[119]:=",ExpressionUUID->"f12c1f99-0fc0-4a0a-91db-21806a8c4ec3"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + { + RowBox[{"-", "0.9003286144077534`"}], "0.43521073754977`"}, + {"0.43521073754977`", "0.9003286144077535`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, + 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, + 3.762958463068856*^9, 3.7629597516272755`*^9}, + CellLabel-> + "During evaluation of \ +In[119]:=",ExpressionUUID->"3e7e1e24-6077-431a-9e3f-d80b646c3891"], + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + { + RowBox[{"-", "0.8503187897479074`"}], + RowBox[{"-", "0.5262679505742809`"}]}, + { + RowBox[{"-", "0.5262679505742809`"}], "0.8503187897479075`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, + 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, + 3.762958463068856*^9, 3.762959751633259*^9}, + CellLabel-> + "During evaluation of \ +In[119]:=",ExpressionUUID->"f90f9ada-5b2d-4a9b-8461-c6048dbe7f2c"], + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + { + RowBox[{"-", "0.8800126962950792`"}], "0.4749501598688693`"}, + {"0.4749501598688693`", "0.8800126962950793`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, + 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, + 3.762958463068856*^9, 3.7629597516402407`*^9}, + CellLabel-> + "During evaluation of \ +In[119]:=",ExpressionUUID->"a8ef8baf-3e3b-4b0f-a7eb-990e3a6ed268"], + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + { + RowBox[{"-", "0.27489473902626704`"}], + RowBox[{"-", "0.9614743275073342`"}]}, + { + RowBox[{"-", "0.9614743275073342`"}], "0.27489473902626704`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, + 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, + 3.762958463068856*^9, 3.7629597516432323`*^9}, + CellLabel-> + "During evaluation of \ +In[119]:=",ExpressionUUID->"25592c01-a5d7-4849-8a18-871e89fc8673"] +}, Open ]] +}, Open ]], + +Cell[BoxData["\[AliasDelimiter]"], "Input", + CellChangeTimes->{ + 3.762957447924599*^9},ExpressionUUID->"78a57f7a-85b2-49f0-ab0d-\ +801153560001"], + +Cell["2 * 4 r matrices:", "Text", + CellChangeTimes->{{3.7617498938100176`*^9, + 3.761749959734758*^9}},ExpressionUUID->"c5e85b62-0b60-4ac8-b9c4-\ +849a700c3216"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "<", "3"}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", + RowBox[{"2", ",", "i"}], "]"}], "]"}], "]"}]}], "]"}], ";"}]], "Input", + CellChangeTimes->{{3.7617498175200596`*^9, 3.76174986261845*^9}}, + CellLabel->"In[9]:=",ExpressionUUID->"1a5fc7bc-be81-4b3e-99c8-9d7766eabcf4"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6487064040145105`"}], ",", + RowBox[{"-", "0.38319158446372736`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.39918280383512017`"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.7610387647095008`", ",", + RowBox[{"-", "0.32663097641415595`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.766243762757809`"}]}], "}"}]}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{{3.7617498188983727`*^9, 3.7617498633844037`*^9}, + 3.7623353899900436`*^9}, + CellLabel-> + "During evaluation of \ +In[9]:=",ExpressionUUID->"3846fa17-e029-4f34-a9ea-21f703b7627c"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.855316564561603`", ",", "0.23109538778738808`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.7262256176665085`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.5181057559866878`", ",", + RowBox[{"-", "0.38150456906604785`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.5231114009176483`"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.6988137212216664`", ",", + RowBox[{"-", "0.5633448986815061`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.5644650201051727`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.7153036998592467`", ",", "0.5503580438019973`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.24724034830429556`"}]}], "}"}]}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{{3.7617498188983727`*^9, 3.7617498633844037`*^9}, + 3.7623353899960275`*^9}, + CellLabel-> + "During evaluation of \ +In[9]:=",ExpressionUUID->"fdcda5a9-d18b-42f2-ad51-fd056dc2adc7"] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"v", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{"krausList", ",", "1"}], "]"}]}]], "Input", + CellLabel-> + "In[216]:=",ExpressionUUID->"63ea91d8-da59-4d3c-a17e-9bfbe009b486"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0.18396889024069`", ",", "0.3566138746439067`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.3986546917168834`", ",", "0.22281326960585973`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.12323336447825374`", ",", "0.12935302033661175`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.2260943534345638`"}], ",", "0.22841668098803036`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.37665754188567346`", ",", "0.1825987305520381`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.26686809932469824`"}], ",", "0.17218233146244227`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.18358347747372472`"}], ",", "0.23893082658999515`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.14411921088914306`", ",", "0.2875371513492605`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.01886247381017142`", ",", "0.017810794040872144`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.29708201792338906`", ",", "0.13436770545221965`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.16332384112066298`", ",", "0.15462336292517292`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.21468468458051249`"}], ",", "0.34281875363133246`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.20070429749097596`", ",", "0.34872627859902855`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.4313711156291747`"}], ",", "0.293578512276416`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.2867955311786994`"}], ",", "0.3176923036844874`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.05804652165996908`", ",", "0.2880764748713832`"}], "}"}]}], + "}"}]], "Output", + CellChangeTimes->{3.7629708184113584`*^9}, + CellLabel-> + "Out[216]=",ExpressionUUID->"d243c2c7-f5ab-416c-bcc5-427594a58e0a"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"{", + RowBox[{"r1", ",", "q1", ",", "r2", ",", "q2"}], "}"}], " ", "=", " ", + RowBox[{"QRSplit", "[", "v", "]"}]}]], "Input", + CellChangeTimes->{{3.7629708292842712`*^9, 3.7629708576693335`*^9}}, + CellLabel-> + "In[218]:=",ExpressionUUID->"2c15d24a-8cc2-4656-b55c-6748a23d0a1b"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.7256982575596331`"}], ",", + RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.25350603825250695`"}], ",", "0.4800253756663065`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.5493394638392453`"}], ",", "0.18310960618617414`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.16981350471015458`"}], ",", "0.15085363848712216`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.31155421840872316`", ",", "0.4490688953914218`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.5190277611417886`"}], ",", "0.12949346565535347`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.36773975484262306`", ",", "0.3782172769920468`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.25297494593837994`", ",", "0.44795192007006207`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.1985938499753119`"}], ",", "0.38877889452582526`"}], + "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.027415863952459096`"}], ",", + RowBox[{"-", "0.03268332608427621`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.43179703087076776`"}], ",", + RowBox[{"-", "0.31023292837461836`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.23738478067190708`"}], ",", + RowBox[{"-", "0.2835616661743438`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.31203574697408293`", ",", + RowBox[{"-", "0.3914437170719313`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.2917158040913648`"}], ",", + RowBox[{"-", "0.5705687837950306`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.6269809537247787`", ",", + RowBox[{"-", "0.23340832644012668`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.4168460268837344`", ",", + RowBox[{"-", "0.32662056513665033`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.08436833666457018`"}], ",", + RowBox[{"-", "0.42701610124960343`"}]}], "}"}]}], "}"}]}], + "}"}]], "Output", + CellChangeTimes->{{3.762970829943507*^9, 3.76297085793263*^9}}, + CellLabel-> + "Out[218]=",ExpressionUUID->"d3836d4a-2f4f-49a1-b860-161cf9a7f423"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Join", "[", + RowBox[{"r1", ",", "r2"}], "]"}]], "Input", + CellChangeTimes->{{3.762970863306254*^9, 3.762970903118661*^9}}, + CellLabel-> + "In[223]:=",ExpressionUUID->"a02398fa-3040-4eaf-9b33-4298b5ea9e0a"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.7256982575596331`"}], ",", + RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}]], "Output", + CellChangeTimes->{{3.7629708640652237`*^9, 3.7629709097219915`*^9}}, + CellLabel-> + "Out[223]=",ExpressionUUID->"abb61450-0781-4545-a5fb-54dd94d788f8"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"{", + RowBox[{"e2k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", + RowBox[{"Dimensions", "[", "krausList", "]"}]}]], "Input", + CellChangeTimes->{{3.7629709518300457`*^9, 3.762970957021158*^9}}, + CellLabel-> + "In[226]:=",ExpressionUUID->"914d1fd5-33d3-4683-bccd-3bd709dc62e5"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"4", ",", "4", ",", "2"}], "}"}]], "Output", + CellChangeTimes->{3.7629709655832844`*^9}, + CellLabel-> + "Out[226]=",ExpressionUUID->"a61baa0a-02b1-42ac-88ad-cda93b2f46c7"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Partition", "[", + RowBox[{"q1", ",", "n"}], "]"}]], "Input", + CellChangeTimes->{{3.7629709604460273`*^9, 3.762970988462077*^9}}, + CellLabel-> + "In[227]:=",ExpressionUUID->"26b6d862-05cf-4d43-a5db-3840b74d0c75"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.25350603825250695`"}], ",", "0.4800253756663065`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.5493394638392453`"}], ",", "0.18310960618617414`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.16981350471015458`"}], ",", "0.15085363848712216`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.31155421840872316`", ",", "0.4490688953914218`"}], "}"}]}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.5190277611417886`"}], ",", "0.12949346565535347`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.36773975484262306`", ",", "0.3782172769920468`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{"0.25297494593837994`", ",", "0.44795192007006207`"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.1985938499753119`"}], ",", "0.38877889452582526`"}], + "}"}]}], "}"}]}], "}"}]], "Output", + CellChangeTimes->{3.7629709891402645`*^9}, + CellLabel-> + "Out[227]=",ExpressionUUID->"79c0b39d-a49f-468e-9fa8-19caf013e933"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"DecChannelRecursively", "[", "krausList", "]"}], "[", + RowBox[{"[", "1", "]"}], "]"}]], "Input", + CellChangeTimes->{{3.762971123235526*^9, 3.7629711744156065`*^9}}, + CellLabel-> + "In[234]:=",ExpressionUUID->"1652a19b-aa2c-45e5-bbdf-20be341e7c21"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.7256982575596331`"}], ",", + RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{"0.`", ",", + RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}]], "Output", + CellChangeTimes->{{3.7629711305788813`*^9, 3.7629711750718513`*^9}}, + CellLabel-> + "Out[234]=",ExpressionUUID->"eb910894-c84f-4920-a9ce-9e5e01e78cad"] +}, Open ]], + +Cell["What is the cost of flatten and partition", "Section", + CellChangeTimes->{{3.762970185052496*^9, + 3.7629702011584053`*^9}},ExpressionUUID->"634da45f-756d-47a0-ab2d-\ +9e5d4f23c146"], + +Cell["Do we require that the number of kraus operators is 2^k", "Section", + CellChangeTimes->{{3.762971477225597*^9, 3.7629714923800554`*^9}, + 3.7629717827452574`*^9},ExpressionUUID->"ba5d60e7-52ab-4904-8eb9-\ +b41c0caa2bc1"] +}, +WindowSize->{958, 988}, +WindowMargins->{{Automatic, -4}, {Automatic, 0}}, +FrontEndVersion->"11.3 for Microsoft Windows (64-bit) (March 6, 2018)", +StyleDefinitions->"Default.nb" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[CellGroupData[{ +Cell[580, 22, 289, 5, 28, "Input",ExpressionUUID->"92422b64-8977-4de9-a861-4e51815262eb"], +Cell[872, 29, 449, 6, 32, "Output",ExpressionUUID->"c35e3d44-9bfe-43f6-ba69-19f57ba42b4e"] +}, Open ]], +Cell[1336, 38, 251, 5, 28, "Input",ExpressionUUID->"c8273595-1fe1-41fa-9daf-4ea21b66a83f"], +Cell[1590, 45, 3436, 64, 143, "Input",ExpressionUUID->"37f5d4d4-f15e-4b4a-87a0-96ea200d4275"], +Cell[5029, 111, 3833, 80, 200, "Input",ExpressionUUID->"1187a008-4456-444b-a9da-076ea4eaff1e"], +Cell[8865, 193, 5077, 112, 428, "Input",ExpressionUUID->"4d31936d-f5c5-4a93-a77e-6c45e4d5ce00"], +Cell[13945, 307, 1700, 41, 162, "Input",ExpressionUUID->"bf9400e4-112f-455e-ad27-b1570cb960bc"], +Cell[CellGroupData[{ +Cell[15670, 352, 499, 10, 28, "Input",ExpressionUUID->"6aa016f4-c810-44a1-beae-1de455e59c51"], +Cell[16172, 364, 2724, 74, 90, "Output",ExpressionUUID->"4e902d86-cff5-4c5c-be20-a0df5af7fe54"] +}, Open ]], +Cell[CellGroupData[{ +Cell[18933, 443, 444, 9, 28, "Input",ExpressionUUID->"41ec07a0-d058-43fd-849e-7267184e40fa"], +Cell[19380, 454, 2285, 57, 71, "Output",ExpressionUUID->"a0522204-1ad4-4a85-adb6-f1322c219741"] +}, Open ]], +Cell[CellGroupData[{ +Cell[21702, 516, 284, 6, 28, "Input",ExpressionUUID->"3d0c5e51-f455-46e4-82c9-33de2d223ca1"], +Cell[21989, 524, 1275, 34, 52, "Output",ExpressionUUID->"a58e58d5-26d0-4577-bafe-563c3fd33d97"] +}, Open ]], +Cell[23279, 561, 160, 3, 34, "Text",ExpressionUUID->"aaf22bd3-28b0-4a45-86a2-95feae5ae1e0"], +Cell[CellGroupData[{ +Cell[23464, 568, 517, 15, 28, "Input",ExpressionUUID->"f12c1f99-0fc0-4a0a-91db-21806a8c4ec3"], +Cell[CellGroupData[{ +Cell[24006, 587, 976, 24, 35, "Print",ExpressionUUID->"3e7e1e24-6077-431a-9e3f-d80b646c3891"], +Cell[24985, 613, 1022, 26, 35, "Print",ExpressionUUID->"f90f9ada-5b2d-4a9b-8461-c6048dbe7f2c"], +Cell[26010, 641, 980, 24, 35, "Print",ExpressionUUID->"a8ef8baf-3e3b-4b0f-a7eb-990e3a6ed268"], +Cell[26993, 667, 1026, 26, 35, "Print",ExpressionUUID->"25592c01-a5d7-4849-8a18-871e89fc8673"] +}, Open ]] +}, Open ]], +Cell[28046, 697, 145, 3, 28, "Input",ExpressionUUID->"78a57f7a-85b2-49f0-ab0d-801153560001"], +Cell[28194, 702, 161, 3, 34, "Text",ExpressionUUID->"c5e85b62-0b60-4ac8-b9c4-849a700c3216"], +Cell[CellGroupData[{ +Cell[28380, 709, 459, 12, 28, "Input",ExpressionUUID->"1a5fc7bc-be81-4b3e-99c8-9d7766eabcf4"], +Cell[CellGroupData[{ +Cell[28864, 725, 793, 24, 22, "Print",ExpressionUUID->"3846fa17-e029-4f34-a9ea-21f703b7627c"], +Cell[29660, 751, 1258, 37, 41, "Print",ExpressionUUID->"fdcda5a9-d18b-42f2-ad51-fd056dc2adc7"] +}, Open ]] +}, Open ]], +Cell[CellGroupData[{ +Cell[30967, 794, 209, 5, 28, "Input",ExpressionUUID->"63ea91d8-da59-4d3c-a17e-9bfbe009b486"], +Cell[31179, 801, 1881, 51, 90, "Output",ExpressionUUID->"d243c2c7-f5ab-416c-bcc5-427594a58e0a"] +}, Open ]], +Cell[CellGroupData[{ +Cell[33097, 857, 317, 7, 28, "Input",ExpressionUUID->"2c15d24a-8cc2-4656-b55c-6748a23d0a1b"], +Cell[33417, 866, 2897, 85, 109, "Output",ExpressionUUID->"d3836d4a-2f4f-49a1-b860-161cf9a7f423"] +}, Open ]], +Cell[CellGroupData[{ +Cell[36351, 956, 231, 5, 28, "Input",ExpressionUUID->"a02398fa-3040-4eaf-9b33-4298b5ea9e0a"], +Cell[36585, 963, 645, 18, 32, "Output",ExpressionUUID->"abb61450-0781-4545-a5fb-54dd94d788f8"] +}, Open ]], +Cell[CellGroupData[{ +Cell[37267, 986, 314, 7, 28, "Input",ExpressionUUID->"914d1fd5-33d3-4683-bccd-3bd709dc62e5"], +Cell[37584, 995, 210, 5, 32, "Output",ExpressionUUID->"a61baa0a-02b1-42ac-88ad-cda93b2f46c7"] +}, Open ]], +Cell[CellGroupData[{ +Cell[37831, 1005, 237, 5, 28, InheritFromParent,ExpressionUUID->"26b6d862-05cf-4d43-a5db-3840b74d0c75"], +Cell[38071, 1012, 1227, 38, 52, "Output",ExpressionUUID->"79c0b39d-a49f-468e-9fa8-19caf013e933"] +}, Open ]], +Cell[CellGroupData[{ +Cell[39335, 1055, 284, 6, 28, "Input",ExpressionUUID->"1652a19b-aa2c-45e5-bbdf-20be341e7c21"], +Cell[39622, 1063, 645, 18, 32, "Output",ExpressionUUID->"eb910894-c84f-4920-a9ce-9e5e01e78cad"] +}, Open ]], +Cell[40282, 1084, 188, 3, 67, "Section",ExpressionUUID->"634da45f-756d-47a0-ab2d-9e5d4f23c146"], +Cell[40473, 1089, 227, 3, 53, "Section",ExpressionUUID->"ba5d60e7-52ab-4904-8eb9-b41c0caa2bc1"] +} +] +*) + From 0c21b04dc329a20f71fd80240a24eac5ac5c48e2 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sat, 8 Jun 2019 23:24:32 +0200 Subject: [PATCH 02/20] Complete tests --- MeasuredQCM.nb | 6550 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 5769 insertions(+), 781 deletions(-) diff --git a/MeasuredQCM.nb b/MeasuredQCM.nb index 51a3731..900f35a 100644 --- a/MeasuredQCM.nb +++ b/MeasuredQCM.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] -NotebookDataLength[ 44994, 1172] -NotebookOptionsPosition[ 40704, 1094] -NotebookOutlinePosition[ 41045, 1109] -CellTagsIndexPosition[ 41002, 1106] +NotebookDataLength[ 257467, 6160] +NotebookOptionsPosition[ 244249, 5939] +NotebookOutlinePosition[ 244590, 5954] +CellTagsIndexPosition[ 244547, 5951] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -22,30 +22,262 @@ Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"SetDirectory", "[", - "\"\\"", "]"}]], "Input", - CellChangeTimes->{3.76171691436585*^9}, - CellLabel->"In[1]:=",ExpressionUUID->"92422b64-8977-4de9-a861-4e51815262eb"], + "\"\\"", "]"}]], "Input", + CellChangeTimes->{ + 3.76171691436585*^9, 3.7635323076881866`*^9, {3.7643140219951878`*^9, + 3.764314025596841*^9}, {3.7643418585372095`*^9, 3.7643418589880905`*^9}, { + 3.7674322077962646`*^9, 3.767432209792924*^9}, {3.7689851085117607`*^9, + 3.768985108817954*^9}}, + CellLabel->"In[2]:=",ExpressionUUID->"146c2df9-6b11-4cd7-8f49-23585d3617b5"], -Cell[BoxData["\<\"C:\\\\Users\\\\Boxi\\\\OneDrive\\\\Studium\\\\QIT \ -prject\\\\code\\\\UniversalQCompiler-master\"\>"], "Output", +Cell[BoxData["\<\"C:\\\\Users\\\\boxi\\\\OneDrive\\\\Studium\\\\QIT \ +prject\\\\UniversalQCompiler\"\>"], "Output", CellChangeTimes->{ - 3.7617168314055357`*^9, 3.7617169155045853`*^9, 3.761739880967972*^9, - 3.7617400669236774`*^9, 3.7617402671570997`*^9, {3.761743457513034*^9, - 3.761743457907978*^9}, 3.7623353704901447`*^9, 3.762952577065445*^9}, - CellLabel->"Out[1]=",ExpressionUUID->"c35e3d44-9bfe-43f6-ba69-19f57ba42b4e"] + 3.767440651685522*^9, {3.7674407294040236`*^9, 3.7674407404130645`*^9}, { + 3.7689851044894934`*^9, 3.7689851100236883`*^9}}, + CellLabel->"Out[2]=",ExpressionUUID->"53500a27-c22e-4791-a772-9717e2a24c29"] }, Open ]], +Cell[CellGroupData[{ + Cell[BoxData[ + RowBox[{"cgs", "=", "100", " ", + RowBox[{"(*", " ", + RowBox[{ + "Define", " ", "the", " ", "gate", " ", "index", " ", "for", " ", + "controlled", " ", "gate", " ", "sequence"}], " ", "*)"}]}]], "Input", + CellChangeTimes->{{3.766330603414702*^9, 3.7663306245332317`*^9}, { + 3.769001220299117*^9, + 3.769001245987015*^9}},ExpressionUUID->"c7b79881-36f6-45ea-8e5a-\ +d369c93caba8"], + +Cell[BoxData["100"], "Output", + CellChangeTimes->{3.7663306317758656`*^9, 3.766340304744173*^9, + 3.7665704806298847`*^9, 3.766574075107668*^9, 3.7665829081036353`*^9, + 3.766584880541045*^9, 3.7666009975779676`*^9, 3.7666020666450377`*^9, + 3.7666021783992863`*^9, 3.767432212707131*^9, 3.7674326151023912`*^9, + 3.767436791194034*^9, 3.767437078395499*^9, 3.7674387282714396`*^9, + 3.7674406518529205`*^9, 3.767440739492152*^9, 3.768985111775998*^9}, + CellLabel->"Out[3]=",ExpressionUUID->"51542b02-8d5d-45c1-b473-3be58efc088f"] +}, Open ]], + +Cell[BoxData[{ + RowBox[{"Import", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Import", "[", "\"\\"", "]"}], - ";"}]], "Input", - CellChangeTimes->{3.761716881324997*^9, 3.7617169217643223`*^9}, - CellLabel->"In[2]:=",ExpressionUUID->"c8273595-1fe1-41fa-9daf-4ea21b66a83f"], + ";"}]}], "Input", + CellChangeTimes->{ + 3.761716881324997*^9, 3.7617169217643223`*^9, {3.763533170974185*^9, + 3.7635331749666014`*^9}, {3.7635333334835033`*^9, + 3.7635333407220964`*^9}, {3.763533564091385*^9, 3.7635335652413087`*^9}, { + 3.764151442249364*^9, 3.7641514470804105`*^9}, 3.7642179272099495`*^9, { + 3.765951549696049*^9, 3.7659515728790593`*^9}, {3.7663306388728886`*^9, + 3.7663306436590905`*^9}, 3.768985556475051*^9, {3.768987613049039*^9, + 3.768987617459203*^9}}, + CellLabel-> + "In[238]:=",ExpressionUUID->"c18f187d-e07f-46c7-b748-3ead076c47bd"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", + CellLabel->"In[6]:=",ExpressionUUID->"2212a215-9499-4930-918e-e48f2ca07e83"], + +Cell[CellGroupData[{ + +Cell[BoxData["\<\"All tests for the basic methods pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689851154561515`*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"54cdea01-1dd0-4bca-bb6c-3b93b3124c51"], + +Cell[BoxData["\<\"All tests for UCGs pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689851180751443`*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"56826109-81db-4c58-bf26-5f776793c1d0"], + +Cell[BoxData["\<\"All tests for diagonal gates pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985118110051*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"60f607f0-925b-45e0-8728-b11cd497353c"], + +Cell[BoxData["\<\"All tests for the isometries on a small number of qubits \ +pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985174856271*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"3fe111e0-f431-45e7-bee6-ac3de95c536c"], + +Cell[BoxData["\<\"All tests for the column-by-column decomposition \ +pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985186223856*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"75000055-0cfe-44da-a136-f3d5b4aef264"], + +Cell[BoxData["\<\"All tests for Dec2Qubit pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985188732209*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"211fc8ec-89d1-4143-892d-bad4dc8a6b9d"], + +Cell[BoxData["\<\"All tests for ZYZDec and XYXDec pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985188843914*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"b2a2599b-fcd4-4777-9e2a-d7dc0a37d82d"], + +Cell[BoxData["\<\"All tests for the QSD pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985203819841*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"120f6dcd-c07c-4d71-afc9-0a447bf12e7b"], + +Cell[BoxData["\<\"All tests for State preparation pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.76898521827015*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"70d0e901-d1a1-4f98-b6a7-418e0ec725a5"], + +Cell[BoxData["\<\"All tests for MCGs pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689852196564407`*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"6c0e1dee-03fb-4222-8e12-9b4bfded53c7"], + +Cell[BoxData["\<\"All tests for Knill's decomposition pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985227150392*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"ba2f1ae3-9c0c-42f7-9ed4-3c64e231f2c7"], + +Cell[BoxData["\<\"All tests for DecIsometry pass.\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689852456312*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"4a408491-90c2-4a69-8cef-c576a968475f"], + +Cell[BoxData["\<\"All tests for StinespringQubit on generic inputs \ +pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.768985264921837*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"7e26b9c5-62ed-4845-9153-aaaeb995873a"], + +Cell[BoxData["\<\"All tests for StinespringQubit pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689852653831377`*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"6a63bc70-4ac1-411f-8991-f4d968248258"], + +Cell[BoxData["\<\"All tests for POVMToIsometry on generic inputs pass\"\>"], \ +"Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689852653851314`*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"034b5d03-e9b0-4548-96d6-beb0f0e38afd"], + +Cell[BoxData["\<\"All tests for POVMToIsometry pass\"\>"], "Print", + CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, + 3.7689852654748926`*^9}, + CellLabel-> + "During evaluation of \ +In[6]:=",ExpressionUUID->"c59add0c-cd4c-4c3b-9b94-617e3ab34a3a"] +}, Open ]] +}, Open ]], + +Cell[BoxData[ + RowBox[{"\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{"Mmt2", "[", + RowBox[{"j_", ",", "i_"}], "]"}], ":=", + RowBox[{"{", + RowBox[{"7", ",", "j", ",", "i"}], "}"}]}], ";"}], + "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"NOT", "[", "i_", "]"}], ":=", + RowBox[{"{", + RowBox[{"8", ",", ",", "i"}], "}"}]}], ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"Bit", "[", + RowBox[{"p_", ",", "i_"}], "]"}], ":=", + RowBox[{"{", + RowBox[{"9", ",", "p", ",", "i"}], "}"}]}], ";"}], + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"CTRLST", "[", + RowBox[{"z_", ",", "o_", ",", "u_", ",", "stList_"}], "]"}], ":=", + RowBox[{"{", + RowBox[{"cgs", ",", " ", + RowBox[{"{", + RowBox[{"z", ",", "o", ",", "u"}], "}"}], ",", "stList"}], "}"}], + " "}]}]}]], "Input", + CellChangeTimes->{{3.7689852987165623`*^9, 3.7689853712805567`*^9}, { + 3.7689854484570303`*^9, 3.7689854749571505`*^9}, {3.7689855347850533`*^9, + 3.7689855461137776`*^9}, {3.7689905238624887`*^9, 3.7689906602336435`*^9}, { + 3.769012648887411*^9, 3.7690126597653055`*^9}, {3.769013051906109*^9, + 3.7690130557578015`*^9}, {3.7690136236207976`*^9, 3.7690136739877033`*^9}}, + CellLabel-> + "In[241]:=",ExpressionUUID->"4dff3dd5-51f5-49b9-897e-4c02e8f7b3c5"], + +Cell[CellGroupData[{ + +Cell["Algorithm", "Section", + CellChangeTimes->{{3.766584308769024*^9, + 3.7665843232623215`*^9}},ExpressionUUID->"c2372715-452d-4c7f-bbcc-\ +3772470f6bd3"], Cell[BoxData[ RowBox[{ RowBox[{"QRSplit", "[", "v_", "]"}], ":=", "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{ + RowBox[{ + RowBox[{"Input", ":", " ", + RowBox[{"a", " ", "rectangular", " ", + RowBox[{"matrix", " ", "[", + RowBox[{"q1", ":", "q2"}], "]"}], " ", "with", " ", "an", " ", "even", + " ", "number", " ", "of", " ", "rows"}]}], ";", "\[IndentingNewLine]", + " ", + RowBox[{ + RowBox[{"Output", ":", " ", + RowBox[{ + RowBox[{"{", + RowBox[{"R", ",", + RowBox[{"{", + RowBox[{"Q1", ",", "Q2"}], "}"}]}], "}"}], " ", "where", " ", + "R"}]}], "=", + RowBox[{ + RowBox[{ + RowBox[{"[", + RowBox[{"R1", ":", "R2"}], "]"}], " ", "is", " ", "an", " ", + "isometry", " ", "and", " ", "V1"}], "=", + RowBox[{"Q1", "*", "R1"}]}]}]}], ",", " ", + RowBox[{ + RowBox[{"V2", "=", + RowBox[{"Q2", "*", "R2"}]}], ";"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", @@ -53,6 +285,16 @@ Cell[BoxData[ "v1", ",", " ", "v2", ",", "q1", ",", "q2", ",", "r1", ",", "r2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ + RowBox[{"If", "[", + RowBox[{ + RowBox[{"!", + RowBox[{"EvenQ", "[", + RowBox[{"Length", "[", "v", "]"}], "]"}]}], ",", " ", + RowBox[{"Throw", "[", + RowBox[{ + "Stringform", "[", + "\"\\"", "]"}], + "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"v1", ",", "v2"}], "}"}], " ", "=", " ", @@ -71,10 +313,15 @@ Cell[BoxData[ RowBox[{"q2", ",", "r2"}], "}"}], " ", "=", " ", RowBox[{"QRDecomposition", "[", "v2", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"r1", ",", - RowBox[{"Transpose", "[", "q1", "]"}], ",", "r2", ",", - RowBox[{"Transpose", "[", "q2", "]"}]}], "}"}]}]}], + RowBox[{"Return", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"Join", "[", + RowBox[{"r1", ",", "r2"}], "]"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"Transpose", "[", "q1", "]"}], ",", + RowBox[{"Transpose", "[", "q2", "]"}]}], "}"}]}], "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.7617322657800064`*^9, 3.7617322714418325`*^9}, { 3.7617324037499504`*^9, 3.7617326020416613`*^9}, {3.7617329062341137`*^9, @@ -105,492 +352,5076 @@ Cell[BoxData[ 3.762959505283737*^9, 3.7629595713260603`*^9}, {3.762959602339146*^9, 3.7629596083969436`*^9}, {3.7629597006710844`*^9, 3.762959721670905*^9}, { 3.76295977035023*^9, 3.7629597706524076`*^9}, {3.7629598775820503`*^9, - 3.762959881388866*^9}}, + 3.762959881388866*^9}, {3.7641550884283133`*^9, 3.7641552914824376`*^9}, { + 3.7665812220702076`*^9, 3.766581224374049*^9}, {3.766581747087158*^9, + 3.7665817517656493`*^9}, {3.7665828084388733`*^9, + 3.7665828165422144`*^9}, {3.766584059258024*^9, 3.7665840690707903`*^9}, + 3.7665848484408593`*^9, {3.7665980601423492`*^9, 3.7665980853738976`*^9}, { + 3.76666944094154*^9, 3.7666694425123396`*^9}, {3.7689856331917944`*^9, + 3.7689857036572623`*^9}, {3.768985773081476*^9, 3.7689858116014132`*^9}, { + 3.7689861973965874`*^9, 3.768986282964658*^9}, {3.768986402432001*^9, + 3.7689864345999117`*^9}, {3.7689866185877733`*^9, 3.76898663834094*^9}, { + 3.768986868695569*^9, 3.7689868762174788`*^9}, {3.7689871569712887`*^9, + 3.7689871595633583`*^9}, 3.7689883827610717`*^9}, CellLabel-> - "In[163]:=",ExpressionUUID->"37f5d4d4-f15e-4b4a-87a0-96ea200d4275"], + "In[215]:=",ExpressionUUID->"55f763f1-1536-4b4a-84bc-20c83739561e"], Cell[BoxData[ RowBox[{ - RowBox[{"MeasuredQCMLevel", "[", - RowBox[{"qList_", ",", " ", "rList_"}], "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"Module", "[", + RowBox[{"ReducedCSDSplit", "[", + RowBox[{"q_", ",", " ", + RowBox[{"OptionsPattern", "[", + RowBox[{"EfficientRepresentation", "\[Rule]", "False"}], "]"}]}], "]"}], + " ", ":=", "\[IndentingNewLine]", + RowBox[{"(*", RowBox[{ - RowBox[{"{", + RowBox[{ RowBox[{ - "qrSplitResult", ",", "currentrList", ",", " ", "newqList", ",", " ", - "newrList"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{"(*", + "Use", " ", "reduced", " ", "CSD", " ", "decomposition", " ", "to", " ", + "decompose", " ", "an", " ", + RowBox[{"isometry", " ", "[", + RowBox[{"q1", ":", "q2"}], "]"}], " ", "in", " ", "to", " ", "q1"}], + "=", RowBox[{ - "QR", " ", "decompose", " ", "each", " ", "q", " ", "matrix", " ", - "from", " ", "the", " ", "last", " ", "iteration", " ", "and", " ", - "flatten", " ", "the", " ", "result", " ", "in", " ", "to", " ", "a", - " ", "long", " ", "list"}], "*)"}], "\[IndentingNewLine]", + RowBox[{"u1", "*", "c", "*", "v", " ", "and", " ", "q2"}], "=", + RowBox[{"u2", "*", "s", "*", "v"}]}]}], ",", RowBox[{ - RowBox[{"qrSplitResult", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"Map", "[", - RowBox[{"QRSplit", ",", " ", "qList"}], "]"}], ",", "1"}], "]"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"(*", + RowBox[{ + "where", " ", "c", " ", "and", " ", "s", " ", "are", " ", "diagonal", + " ", "matrix", " ", "with", " ", "entries", " ", "of", " ", "the", " ", + "form", " ", "cos", " ", "and", " ", "sin", " ", RowBox[{ - RowBox[{ - "Pick", " ", "the", " ", "r", " ", "matrices", " ", "and", " ", - "concatenate", " ", "every", " ", "two", " ", "of", " ", "them"}], - ",", " ", - RowBox[{"append", " ", "the", " ", "list", " ", - RowBox[{"{", - RowBox[{"ri1", ",", "ri2", ",", - RowBox[{"ri3", "..."}]}], "}"}], " ", "to", " ", "the", " ", - "exisiting", " ", "rList"}]}], "*)"}], "\[IndentingNewLine]", - RowBox[{"newrList", " ", "=", " ", - RowBox[{"Append", "[", - RowBox[{"rList", ",", " ", + RowBox[{"(", RowBox[{ RowBox[{ - RowBox[{"Flatten", "[", - RowBox[{"#", ",", "1"}], "]"}], "&"}], " ", "/@", " ", - RowBox[{"Partition", "[", - RowBox[{ - RowBox[{"qrSplitResult", "[", - RowBox[{"[", - RowBox[{"1", ";;", - RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}], ",", "2"}], - "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - "Pick", " ", "the", " ", "q", " ", "matrices", " ", "in", " ", "a", " ", - "list"}], "*)"}], "\[IndentingNewLine]", - RowBox[{"newqList", " ", "=", " ", - RowBox[{"qrSplitResult", "[", + RowBox[{"means", " ", "that", " ", + RowBox[{"c", "^", "2"}]}], "+", + RowBox[{"s", "^", "2"}]}], "=", "I"}], ")"}], ".", + "\[IndentingNewLine]", "This"}], " ", "version", " ", "works", " ", + "ONLY", " ", "if", " ", "q", " ", "is", " ", "an", " ", "isometry", " ", + "with", " ", "dimention", " ", + RowBox[{"(", + RowBox[{"m", ",", "n"}], ")"}], " ", "where", " ", "2", "m"}], + "\[LessEqual]", "n"}], ",", " ", + RowBox[{ + RowBox[{ + "ortherwise", " ", "the", " ", "removal", " ", "of", " ", "0", "s", " ", + "in", " ", "s", " ", "has", " ", "to", " ", "be", " ", + RowBox[{ + "modified", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "If"}], + " ", "EfficientRepresentation"}], "->", "False"}], ",", " ", + RowBox[{"it", " ", "returns", " ", "three", " ", "matrix", " ", "m1"}], + ",", "m2", ",", + RowBox[{ + RowBox[{"m3", " ", "so", " ", "that", " ", "m1", "*", "m2", "*", "m3"}], + "=", + RowBox[{ + RowBox[{ RowBox[{"[", - RowBox[{"2", ";;", - RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", + RowBox[{"q1", ":", "q2"}], "]"}], "\[IndentingNewLine]", "If", " ", + "EfficiqentRepresentation"}], "->", "True"}]}], ",", " ", + RowBox[{"it", " ", "only", " ", "returns", " ", "v"}], ",", " ", + RowBox[{ + "a", " ", "list", " ", "of", " ", "diagonal", " ", "elements", " ", "c", + " ", "and", " ", "s", " ", "and", " ", RowBox[{"{", - RowBox[{"newqList", ",", "newrList"}], "}"}]}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.761736925166616*^9, 3.7617369627341237`*^9}, { - 3.761737008757016*^9, 3.761737026219349*^9}, {3.7617372924890556`*^9, - 3.7617374188202453`*^9}, {3.761737450357885*^9, 3.7617374750987387`*^9}, { - 3.7617375164451065`*^9, 3.761737551334485*^9}, {3.7617376088486395`*^9, - 3.7617376692720118`*^9}, {3.761737782253359*^9, 3.761737783652645*^9}, { - 3.761737824574155*^9, 3.761737958717331*^9}, 3.761740036516015*^9, - 3.7617454114291525`*^9, {3.761745812613103*^9, 3.761745817259673*^9}, { - 3.7617461819010553`*^9, 3.761746237290985*^9}, {3.7617462839461517`*^9, - 3.7617463984109697`*^9}, {3.761746480875413*^9, 3.7617464829309063`*^9}, { - 3.761746556483223*^9, 3.761746560458565*^9}, 3.7617466032199*^9, { - 3.7617466875872*^9, 3.76174670374135*^9}, {3.7617467338129325`*^9, - 3.761746749290538*^9}, {3.761746807582584*^9, 3.761746872901718*^9}, { - 3.7617469046647906`*^9, 3.76174690481838*^9}, {3.761747465139044*^9, - 3.7617474704428573`*^9}, {3.761747519539528*^9, 3.7617475285135517`*^9}, { - 3.762968917425428*^9, 3.762968928952589*^9}, {3.762969018337469*^9, - 3.762969071451377*^9}, {3.7629691208871593`*^9, 3.7629691863601103`*^9}, { - 3.7629692307304077`*^9, 3.7629692623757486`*^9}, {3.7629693389459825`*^9, - 3.7629695259097323`*^9}, {3.76296956543196*^9, - 3.762969572847123*^9}},ExpressionUUID->"1187a008-4456-444b-a9da-\ -076ea4eaff1e"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"MeasuredQCM", "[", "krausList_", "]"}], ":=", - "\[IndentingNewLine]", + RowBox[{"u1", ",", " ", "u2"}], "}"}]}]}], "\[IndentingNewLine]", + "*)"}], "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ - "n", ",", "m", ",", "k", ",", " ", "e2k", ",", "qrLoopNum", ",", " ", - "i", ",", "v", ",", "qList", ",", "rList"}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"(*", "\[IndentingNewLine]", + "n", ",", "m", ",", " ", "u1", ",", "u2", ",", "s", ",", "c", ",", "v", + ",", "q1", ",", "q2", ",", "x", ",", " ", "r", ",", "reducedDim"}], + "}"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"If", "[", + RowBox[{ + RowBox[{"!", + RowBox[{"EvenQ", "[", + RowBox[{"Length", "[", "q", "]"}], "]"}]}], ",", " ", + RowBox[{"Throw", "[", + RowBox[{ + "Stringform", "[", + "\"\\"", + "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ + RowBox[{"{", + RowBox[{"n", ",", "m"}], "}"}], "=", + RowBox[{"Dimensions", "[", "q", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", RowBox[{ - RowBox[{"(", - RowBox[{"n", ",", "m"}], ")"}], " ", "=", " ", - RowBox[{"matrix", " ", "size"}]}], ",", "\[IndentingNewLine]", - RowBox[{"e2k", " ", "=", " ", - RowBox[{ - RowBox[{"kraus", " ", "rank", " ", "with", " ", "e2k"}], "=", - RowBox[{"2", "^", "k"}]}]}], ",", "\[IndentingNewLine]", - RowBox[{"qrLoopNum", " ", "=", " ", - RowBox[{ - "number", " ", "of", " ", "iteration", " ", "with", " ", "qr", " ", - "decomposition"}]}], ",", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{ - "isometry", " ", "generated", " ", "from", " ", "all", " ", "Kraus", - " ", "operators"}]}], ",", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"The", " ", "result", " ", "is", " ", "a", " ", "list", " ", - RowBox[{"{", - RowBox[{"qList", ",", "rList"}], "}"}]}], ",", " ", - "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", RowBox[{ - RowBox[{"{", - RowBox[{ - "q1", ",", " ", "q2", ",", " ", "q3", ",", " ", "q4", ",", "..."}], - "}"}], " ", "with", " ", - RowBox[{"2", "^", "qrLoopNum"}], " ", "matrix"}]}], ",", - "\[IndentingNewLine]", - RowBox[{"rList", " ", "=", " ", - RowBox[{"{", + RowBox[{"2", "*", "m"}], ">", "n"}], ",", " ", + RowBox[{"Throw", "[", RowBox[{ - RowBox[{"{", "r1", "}"}], ",", - RowBox[{"{", - RowBox[{"r21", ",", "r22"}], "}"}], ",", - RowBox[{ - RowBox[{"{", - RowBox[{"r31", ",", "r32", ",", "r33", ",", "r34"}], "}"}], - "..."}]}], "}"}]}]}], "\[IndentingNewLine]", "*)"}], - "\[IndentingNewLine]", - RowBox[{ + "Stringform", "[", + "\"\\"", "]"}], "]"}]}], + "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"q1", ",", "q2"}], "}"}], " ", "=", " ", + RowBox[{"Partition", "[", + RowBox[{"q", ",", " ", + RowBox[{ + RowBox[{"Length", "[", "q", "]"}], "/", "2"}]}], "]"}]}], ";", + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"calculate", " ", "reduced", " ", "u2", " ", "and", " ", "s"}], + " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"{", - RowBox[{"e2k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Dimensions", "[", "krausList", "]"}]}], ";", + RowBox[{"u2", ",", "s", ",", "v"}], "}"}], " ", "=", " ", + RowBox[{"SingularValueDecomposition", "[", "q2", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"k", " ", "=", " ", - RowBox[{"Log2", "[", "e2k", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", + RowBox[{"reducedDim", " ", "=", RowBox[{ - RowBox[{"m", "<", "n"}], ",", " ", - RowBox[{"qrLoopNum", " ", "=", " ", "k"}], ",", - RowBox[{"qrLoopNum", " ", "=", " ", - RowBox[{"n", "+", "k", "-", "m", "-", "1"}]}]}], "]"}], ";", + RowBox[{"Dimensions", "[", "q1", "]"}], "[", + RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"u2", " ", "=", " ", + RowBox[{"u2", "[", + RowBox[{"[", + RowBox[{"All", ",", + RowBox[{"1", ";;", "reducedDim"}]}], "]"}], "]"}]}], ";", " ", + RowBox[{"(*", " ", + RowBox[{"Cut", " ", "unnecessary", " ", "columns"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{"s", " ", "=", " ", + RowBox[{"s", "[", + RowBox[{"[", + RowBox[{ + RowBox[{"1", ";;", "reducedDim"}], ",", + RowBox[{"1", ";;", "reducedDim"}]}], "]"}], "]"}]}], ";", " ", + RowBox[{"(*", " ", + RowBox[{"Cut", " ", "zeros"}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"{", "v", "}"}]}], ";", "\[IndentingNewLine]", - RowBox[{"rList", " ", "=", " ", - RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ - "have", " ", "to", " ", "make", " ", "sure", " ", "that", " ", "k", " ", - "is", " ", "an", " ", - RowBox[{"integer", "?"}]}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"For", "[", + "calculate", " ", "u1", " ", "and", " ", "c", " ", "using", " ", "QR", + " ", "decomposition"}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"x", " ", "=", " ", + RowBox[{"q1", ".", "v"}]}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"u1", ",", "r"}], "}"}], " ", "=", " ", + RowBox[{"QRDecomposition", "[", "x", "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"c", " ", "=", " ", + RowBox[{"DiagonalMatrix", "[", + RowBox[{"Diagonal", "[", "r", "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"u1", " ", "=", " ", + RowBox[{"x", ".", + RowBox[{"Inverse", "[", "c", "]"}]}]}], ";", "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{"Transpose", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"output", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", RowBox[{ - RowBox[{"i", "=", "0"}], ",", - RowBox[{"i", "<", "k"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ + RowBox[{"OptionValue", "[", "EfficientRepresentation", "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Return", "[", RowBox[{"{", - RowBox[{"qList", ",", " ", "rList"}], "}"}], "=", - RowBox[{"MeasuredQCMLevel", "[", - RowBox[{"qList", ",", " ", "rList"}], "]"}]}]}], "]"}], ";", - "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"qList", ",", " ", "rList"}], "}"}]}]}], "\[IndentingNewLine]", - "]"}], " "}]], "Input", - CellChangeTimes->{{3.7617377864840765`*^9, 3.7617378194997277`*^9}, { - 3.7617379748013487`*^9, 3.761738003892516*^9}, {3.761738052689681*^9, - 3.761738058012427*^9}, {3.7617381340280666`*^9, 3.761738150069158*^9}, { - 3.761738398747989*^9, 3.7617384010218787`*^9}, {3.7617384438014517`*^9, - 3.761738573208374*^9}, {3.761738670003517*^9, 3.761738837678238*^9}, { - 3.7617389148922296`*^9, 3.761738917075367*^9}, {3.76173896753539*^9, - 3.761738973253096*^9}, {3.7617390070437107`*^9, 3.761739100788925*^9}, { - 3.76173925359522*^9, 3.761739263836835*^9}, {3.761747374595267*^9, - 3.76174740002524*^9}, {3.7617491702256966`*^9, 3.7617491703862667`*^9}, { - 3.7617494500720043`*^9, 3.761749456504767*^9}, 3.7617512296199136`*^9, { - 3.7629574622175756`*^9, 3.7629574702001476`*^9}, {3.762957620383648*^9, - 3.7629576662887993`*^9}, {3.762957830664685*^9, 3.762957990832176*^9}, { - 3.7629580840478263`*^9, 3.76295843960859*^9}, {3.762958778830966*^9, - 3.7629587894136534`*^9}, {3.762958853576043*^9, 3.762959268666835*^9}, { - 3.7629676846354847`*^9, 3.7629677084323125`*^9}, {3.7629697597301655`*^9, - 3.762969779574246*^9}, {3.762969939926265*^9, 3.762969955279194*^9}, - 3.76297007927248*^9, {3.7629702369516497`*^9, 3.762970237958955*^9}}, - CellLabel-> - "In[212]:=",ExpressionUUID->"4d31936d-f5c5-4a93-a77e-6c45e4d5ce00"], + RowBox[{"v", ",", "\[IndentingNewLine]", + RowBox[{"MapThread", "[", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"#1", ",", "#2"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "#2"}], ",", "#1"}], "}"}]}], "}"}], "&"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"Diagonal", "[", "c", "]"}], ",", + RowBox[{"Diagonal", "[", "s", "]"}]}], "}"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"u1", ",", "u2"}], "}"}]}], "}"}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Return", "[", + RowBox[{"{", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"ArrayFlatten", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "v", "}"}], ",", + RowBox[{"{", + RowBox[{"SparseArray", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"reducedDim", ",", "reducedDim"}], "}"}]}], "]"}], + "}"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", + RowBox[{"ArrayFlatten", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"c", ",", "s"}], "}"}], ",", + RowBox[{"{", + RowBox[{"s", ",", "c"}], "}"}]}], "}"}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"ArrayFlatten", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"u1", ",", "0"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "u2"}], "}"}]}], "}"}], "]"}]}], + "\[IndentingNewLine]", "}"}], "]"}]}], "\[IndentingNewLine]", + "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", + CellChangeTimes->{{3.7641740356972055`*^9, 3.764174037511384*^9}, { + 3.7641741003203382`*^9, 3.764174100711294*^9}, {3.764313790510702*^9, + 3.7643138544547887`*^9}, {3.7643138897762947`*^9, + 3.7643138944692945`*^9}, {3.7643139355685463`*^9, 3.764313971427433*^9}, { + 3.764314108863223*^9, 3.7643141236366215`*^9}, {3.7643141677455626`*^9, + 3.764314173743504*^9}, {3.7643146515530024`*^9, 3.7643146565642653`*^9}, { + 3.764315035113085*^9, 3.764315044606406*^9}, {3.76431512002225*^9, + 3.764315121058582*^9}, {3.7643155305957174`*^9, 3.7643155824075956`*^9}, { + 3.76431574217001*^9, 3.764315769583948*^9}, {3.7643158436112638`*^9, + 3.7643158700543194`*^9}, {3.7643161812560782`*^9, + 3.7643161840658464`*^9}, {3.764342009796929*^9, 3.764342013363389*^9}, { + 3.76434234066908*^9, 3.764342341156148*^9}, {3.765943388063779*^9, + 3.7659434158654704`*^9}, {3.7659435095859785`*^9, 3.765943511401125*^9}, { + 3.7659437524603786`*^9, 3.7659437554813356`*^9}, 3.765943876449839*^9, { + 3.765943944172777*^9, 3.7659439721220427`*^9}, {3.7659441434429383`*^9, + 3.765944197693014*^9}, {3.7659442446584463`*^9, 3.765944334585556*^9}, { + 3.7659444117392225`*^9, 3.765944427649678*^9}, {3.7659444609556203`*^9, + 3.76594446152011*^9}, {3.7659445211147566`*^9, 3.7659445292011347`*^9}, { + 3.7659450280971546`*^9, 3.7659450547548523`*^9}, {3.7659451034885416`*^9, + 3.765945131594387*^9}, {3.7659455225789366`*^9, 3.7659455446508913`*^9}, { + 3.7659455804970407`*^9, 3.7659455828347893`*^9}, {3.765946468066487*^9, + 3.765946480385546*^9}, {3.765946718400012*^9, 3.765947098304867*^9}, { + 3.765947245563077*^9, 3.765947281090079*^9}, {3.7659476556253815`*^9, + 3.7659477085997934`*^9}, {3.765947837760481*^9, 3.765947843609816*^9}, { + 3.765947884721884*^9, 3.7659479357384677`*^9}, {3.765948006513219*^9, + 3.7659480499061904`*^9}, 3.765948105209341*^9, {3.7659481563368063`*^9, + 3.765948174568056*^9}, {3.765948320098813*^9, 3.7659483222879596`*^9}, + 3.7659484765212584`*^9, {3.765948794794286*^9, 3.7659488100963926`*^9}, { + 3.7659494230665083`*^9, 3.76594942688826*^9}, {3.76594964917791*^9, + 3.7659496638879066`*^9}, {3.765949772888795*^9, 3.7659498441852045`*^9}, { + 3.7659498850670595`*^9, 3.765949893985214*^9}, {3.765949930203905*^9, + 3.765950021463606*^9}, {3.7659500816271515`*^9, 3.7659501091755257`*^9}, { + 3.765950229744213*^9, 3.76595030669592*^9}, {3.7659503724031963`*^9, + 3.7659503729527473`*^9}, {3.765950596135972*^9, 3.7659507050797863`*^9}, { + 3.76595124468877*^9, 3.7659512459434147`*^9}, {3.7659519533289394`*^9, + 3.7659519625921717`*^9}, {3.765952252392784*^9, 3.765952254088277*^9}, { + 3.7659523545536103`*^9, 3.7659523659762373`*^9}, {3.7659524687610197`*^9, + 3.7659524720681777`*^9}, {3.765952508922634*^9, 3.76595250989503*^9}, { + 3.7663306726266327`*^9, 3.7663306895583577`*^9}, {3.7663307684953012`*^9, + 3.766330780191027*^9}, {3.7663317097279634`*^9, 3.7663317374628015`*^9}, { + 3.76633271173733*^9, 3.766332718199052*^9}, {3.766332821462929*^9, + 3.766332880222807*^9}, {3.7663330305018635`*^9, 3.7663330739267473`*^9}, { + 3.7663331269898624`*^9, 3.7663331453692274`*^9}, 3.7663370773789253`*^9, + 3.766584848445846*^9, {3.7665997310889864`*^9, 3.7665997349037886`*^9}, { + 3.7689861274138284`*^9, 3.76898613400021*^9}, {3.768986771333069*^9, + 3.768986803179861*^9}, {3.768986853788454*^9, 3.7689869064934664`*^9}, { + 3.768986948355467*^9, 3.768987151767227*^9}, {3.768988364380226*^9, + 3.7689883772099*^9}, {3.768988573274419*^9, 3.7689886066670523`*^9}, + 3.7689886547434497`*^9, {3.768988788137658*^9, 3.7689888098366013`*^9}, { + 3.7689888795640745`*^9, 3.768988883685073*^9}, {3.768989124204567*^9, + 3.76898914522731*^9}, {3.7689891914615717`*^9, 3.7689892630500712`*^9}, { + 3.7689892955929623`*^9, 3.7689893303380213`*^9}}, + CellLabel-> + "In[216]:=",ExpressionUUID->"c762e94d-1812-4ecd-b180-e44e618b1fde"], Cell[BoxData[ RowBox[{ - RowBox[{"DecChannelRecursively", "[", "krausList_", "]"}], " ", ":=", + RowBox[{"ChooseDecMethod", "[", "MethodName_", "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ - RowBox[{"{", + RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", + RowBox[{"(*", " ", RowBox[{ - "e2k", ",", "n", ",", "m", ",", "v", ",", "r1", ",", "q1", ",", "r2", - ",", "q2"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{ + "check", " ", "if", " ", "input", " ", "is", " ", "string", "??"}], + "*)"}], "\[IndentingNewLine]", + RowBox[{"Switch", "[", "\[IndentingNewLine]", RowBox[{ - RowBox[{"{", - RowBox[{"e2k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Dimensions", "[", "krausList", "]"}]}], ";", + "MethodName", ",", "\[IndentingNewLine]", "\"\\"", ",", + "\[IndentingNewLine]", + RowBox[{"Return", "[", "QSD", "]"}], ",", "\[IndentingNewLine]", + "\"\\"", ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", "DecIsometry", "]"}], ",", + "\[IndentingNewLine]", "\"\\"", ",", + "\[IndentingNewLine]", + RowBox[{"Return", "[", "DecIsometryGeneric", "]"}], ",", + "\[IndentingNewLine]", "\"\\"", ",", + "\[IndentingNewLine]", + RowBox[{"Return", "[", "ColumnByColumnDec", "]"}], ",", + "\[IndentingNewLine]", "\"\\"", ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", "KnillDec", "]"}], ",", "\[IndentingNewLine]", + "_", ",", "\[IndentingNewLine]", + RowBox[{"Throw", "[", + RowBox[{ + "\"\\"", "<>", "MethodName", "<>", + "\"\< is not found. The available methods are QSD, DecIsometry, \ +DecIsometryGeneric, ColumnByColumnDec and KnillDec.\>\""}], "]"}]}], "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"r1", ",", "q1", ",", "r2", ",", "q2"}], "}"}], " ", "=", " ", - RowBox[{"QRSplit", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"Join", "[", - RowBox[{"r1", ",", "r2"}], "]"}], ",", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "n"}], "]"}], ",", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "n"}], "]"}]}], "}"}]}]}], "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "q1", " ", "q2", " ", "could", " ", "be", " ", "decomposed", " ", - "later"}], " ", "*)"}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{ - 3.76297025185478*^9, {3.762970290006715*^9, 3.7629702995581617`*^9}, { - 3.7629703631510353`*^9, 3.7629703873084087`*^9}, {3.7629710158607793`*^9, - 3.7629710843705015`*^9}, {3.762971204861157*^9, 3.762971213628702*^9}, { - 3.7629712597015266`*^9, - 3.7629712730458307`*^9}},ExpressionUUID->"bf9400e4-112f-455e-ad27-\ -b1570cb960bc"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "4"}], "]"}]}]], "Input", - CellChangeTimes->{ - 3.762345226235097*^9, {3.76295773396966*^9, 3.762957742377147*^9}, { - 3.7629584774792767`*^9, 3.7629585011808696`*^9}, {3.762958616453359*^9, - 3.7629586774312315`*^9}, {3.762958798359782*^9, 3.762958804997046*^9}, - 3.7629689996654215`*^9}, + RowBox[{"(*", " ", + RowBox[{"TODO", ":", " ", + RowBox[{ + "add", " ", "exception", " ", "for", " ", "wrong", " ", "input"}]}], + " ", "*)"}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", + "]"}]}]], "Input", CellLabel-> - "In[207]:=",ExpressionUUID->"6aa016f4-c810-44a1-beae-1de455e59c51"], + "In[278]:=",ExpressionUUID->"b88a9287-3e20-41af-ac35-e426ea9f7706"], Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.18396889024069`", ",", "0.3566138746439067`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.3986546917168834`", ",", "0.22281326960585973`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.12323336447825374`", ",", "0.12935302033661175`"}], "}"}], - ",", + RowBox[{ + RowBox[{"DecChannelRecursively", "[", + RowBox[{"krausList_", ",", + RowBox[{"OptionsPattern", "[", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2260943534345638`"}], ",", "0.22841668098803036`"}], - "}"}]}], "}"}], ",", - RowBox[{"{", + RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], "}"}], "]"}]}], + "]"}], " ", ":=", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ RowBox[{ - RowBox[{"{", - RowBox[{"0.37665754188567346`", ",", "0.1825987305520381`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.26686809932469824`"}], ",", "0.17218233146244227`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.18358347747372472`"}], ",", "0.23893082658999515`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.14411921088914306`", ",", "0.2875371513492605`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", + RowBox[{ + "Recursively", " ", "decompose", " ", "a", " ", "list", " ", "of", " ", + RowBox[{"2", "^", "k"}], " ", "Kraus", " ", "operators", " ", "into", + " ", "an", " ", "m", " ", "x", " ", "n", " ", "Isometry", " ", "and", + " ", "two", " ", "list", " ", "of", " ", "Krau", " ", "operators", " ", + "controlled", " ", "by", " ", "the", " ", "measured", " ", "result", + " ", "after", " ", "the", " ", + RowBox[{"isometry", ".", " ", "The"}], " ", "measurement", " ", "gates", + " ", "are", " ", "not", " ", "included"}], ";", "\[IndentingNewLine]", + RowBox[{"Input", ":", " ", + RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operator"}]}], + ";", "\[IndentingNewLine]", + RowBox[{"Output", ":", " ", + RowBox[{"isometry", "/", "st"}]}]}], ",", " ", + RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operators"}], + ",", " ", RowBox[{ - RowBox[{"{", - RowBox[{"0.01886247381017142`", ",", "0.017810794040872144`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.29708201792338906`", ",", "0.13436770545221965`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.16332384112066298`", ",", "0.15462336292517292`"}], "}"}], - ",", - RowBox[{"{", + RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operators"}], + ";", + RowBox[{"(", RowBox[{ - RowBox[{"-", "0.21468468458051249`"}], ",", "0.34281875363133246`"}], - "}"}]}], "}"}], ",", - RowBox[{"{", + RowBox[{ + "If", " ", "the", " ", "list", " ", "of", " ", "Kraus", " ", + "operators", " ", "is", " ", "no", " ", "longer", " ", "decomposible", + " ", "with", " ", "QR"}], ",", " ", + RowBox[{"it", " ", "will", " ", "returns", " ", + RowBox[{"{", + RowBox[{ + RowBox[{"isometry", "/", "st"}], ",", "None", ",", "None"}], + "}"}]}]}], ")"}]}], "\:ff1b", "\[IndentingNewLine]", + "\[IndentingNewLine]", RowBox[{ - RowBox[{"{", - RowBox[{"0.20070429749097596`", ",", "0.34872627859902855`"}], "}"}], + RowBox[{ + RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", + RowBox[{"\"\\"", ":", " ", + RowBox[{ + "Use", " ", "QRSplit", " ", "and", " ", "the", " ", "isometry", " ", + "is", " ", "in", " ", "the", " ", "matrix", " ", + "representation"}]}]}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", + RowBox[{"\"\\"", ":", " ", + RowBox[{ + "Use", " ", "ReducedCSDSplit", " ", "and", " ", "the", " ", "isometry", + " ", "is", " ", "give", " ", "as", " ", "gate", " ", + "sequence"}]}]}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{ + "\"\\"", "/", "\"\\""}], + "/", "\"\\""}], "/", "\"\\""}], + ":", " ", + RowBox[{ + "Use", " ", "QRSplit", " ", "and", " ", "the", " ", "isometry", " ", + "is", " ", "decomposed", " ", "by", " ", "the", " ", "corresponding", + " ", "decomposition", " ", "methods"}]}]}]}]}], "\[IndentingNewLine]", + "*)"}], "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "k", ",", "n", ",", "e2n", ",", "m", ",", "DecMethod", ",", "q", ",", + "v", ",", "r", ",", "rList", ",", "q1", ",", "q2", ",", + "gateSequence"}], "}"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"e2n", " ", "=", " ", + RowBox[{ + RowBox[{"Dimensions", "[", "krausList", "]"}], "[", + RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", + RowBox[{"Log2", "[", + RowBox[{"Dimensions", "[", "krausList", "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"IntegerQ", "[", "k", "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", + "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"IntegerQ", "[", "m", "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"IntegerQ", "[", "n", "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"StringQ", "[", + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", "]"}], + "]"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"q", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + RowBox[{ + "If", " ", "the", " ", "stacked", " ", "kraus", " ", "operators", " ", + "is", " ", "already", " ", "a", " ", "m", " ", "to", " ", "n", " ", + "isometry", " ", "with", " ", "n"}], "<=", + RowBox[{"m", "+", "1"}]}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"If", "[", + RowBox[{ + RowBox[{ + RowBox[{"n", "+", "k"}], "\[LessEqual]", + RowBox[{"m", "+", "1"}]}], ",", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{ + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", + "\"\\""}], ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", + RowBox[{"{", + RowBox[{"q", ",", "None", ",", "None"}], "}"}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"DecMethod", " ", "=", " ", + RowBox[{"ChooseDecMethod", "[", + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"Return", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"DecMethod", "[", "q", "]"}], ",", "None", ",", + "None"}], "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], + "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"QR", " ", "or", " ", "ReducedCSD", " ", "Decomposition"}], + " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{ + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", + "\"\\""}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"Use", " ", "ReducedCSDSplit"}], "*)"}], + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"DecMethod", "=", "QSD"}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"v", ",", "rList", ",", + RowBox[{"{", + RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], "=", + RowBox[{"ReducedCSDSplit", "[", + RowBox[{"q", ",", " ", + RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], "]"}]}], + ";", "\[IndentingNewLine]", + RowBox[{"gateSequence", " ", "=", " ", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"DecMethod", "[", + RowBox[{"v", ",", + RowBox[{"action", "=", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"n", "-", "m", "+", "1"}], ",", "n"}], "]"}]}]}], + "]"}], "}"}]}], "\[IndentingNewLine]", "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"n", "-", "m", "+", "1"}], ",", "n"}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"{", "1", "}"}]}]}], "]"}], "&"}], ",", "rList"}], + "]"}]}], "\[IndentingNewLine]", "]"}]}], + "\[IndentingNewLine]", "}"}]}], ";", "\[IndentingNewLine]", + RowBox[{"Return", "[", + RowBox[{"{", + RowBox[{"gateSequence", ",", " ", + RowBox[{"Partition", "[", + RowBox[{"q1", ",", "e2n"}], "]"}], ",", + RowBox[{"Partition", "[", + RowBox[{"q2", ",", "e2n"}], "]"}]}], "}"}], "]"}]}], ",", + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"Use", " ", "QRSplit"}], "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{"r", ",", + RowBox[{"{", + RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], " ", "=", " ", + RowBox[{"QRSplit", "[", "q", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{ + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", + "\"\\""}], ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", + RowBox[{"{", + RowBox[{"r", ",", + RowBox[{"Partition", "[", + RowBox[{"q1", ",", "e2n"}], "]"}], ",", + RowBox[{"Partition", "[", + RowBox[{"q2", ",", "e2n"}], "]"}]}], "}"}], "]"}], ",", " ", + RowBox[{"(*", " ", + RowBox[{ + "Partition", " ", "transform", " ", "it", " ", "to", " ", "a", + " ", "list", " ", "of", " ", "kraus"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"DecMethod", " ", "=", " ", + RowBox[{"ChooseDecMethod", "[", + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"Return", "[", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"DecMethod", "[", "r", "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Partition", "[", + RowBox[{"q1", ",", "e2n"}], "]"}], ",", "\[IndentingNewLine]", + RowBox[{"Partition", "[", + RowBox[{"q2", ",", "e2n"}], "]"}]}], "\[IndentingNewLine]", + "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], + "\[IndentingNewLine]", "]"}]}]}]}], "\[IndentingNewLine]", + "]"}]}]], "Input", + CellChangeTimes->{{3.7665840777186775`*^9, 3.7665840967428236`*^9}, + 3.766584132727624*^9, {3.766584185303074*^9, 3.766584191447653*^9}, + 3.766584848450833*^9, {3.766598507623108*^9, 3.76659850835116*^9}, { + 3.766598544085631*^9, 3.766598563182579*^9}, {3.7665988492458973`*^9, + 3.7665988711912303`*^9}, {3.766598920022687*^9, 3.766599089182914*^9}, { + 3.7665992731831007`*^9, 3.7665993078544126`*^9}, {3.7665993511297245`*^9, + 3.766599413399262*^9}, {3.766599462080122*^9, 3.766599505294603*^9}, { + 3.7665997577666693`*^9, 3.7665998531197605`*^9}, {3.766599911295239*^9, + 3.7665999333752112`*^9}, {3.7665999706635284`*^9, 3.766599979110946*^9}, { + 3.7666000230963583`*^9, 3.7666000875749874`*^9}, {3.7666001225754204`*^9, + 3.7666001486965895`*^9}, {3.7666001793027706`*^9, 3.7666004194957*^9}, { + 3.7666004733118324`*^9, 3.766600511919162*^9}, {3.766600611944977*^9, + 3.76660065587152*^9}, {3.7666007283293552`*^9, 3.76660081278459*^9}, { + 3.76660084585618*^9, 3.7666008534718227`*^9}, {3.7666015185288115`*^9, + 3.7666015210410933`*^9}, {3.7674386349753284`*^9, + 3.7674386353108406`*^9}, {3.7674395536896477`*^9, + 3.7674395537009387`*^9}, {3.767439686168064*^9, 3.767439694732544*^9}, { + 3.768990320335496*^9, 3.7689904671900144`*^9}, {3.7689910125321655`*^9, + 3.768991045824093*^9}, {3.768991102709888*^9, 3.76899110768458*^9}, + 3.7689911479169335`*^9, {3.76899121850906*^9, 3.7689912501693525`*^9}, { + 3.7689912808213387`*^9, 3.768991322804012*^9}, {3.7689913851871376`*^9, + 3.768991400815298*^9}, {3.7689914740144386`*^9, 3.768991502047434*^9}, { + 3.7689915394045095`*^9, 3.7689915437817736`*^9}, {3.7689915759237757`*^9, + 3.7689915775244923`*^9}, {3.7689916252168875`*^9, 3.768991641197132*^9}, { + 3.7689917100778365`*^9, 3.7689918152524357`*^9}, {3.7689918473645186`*^9, + 3.768991875811509*^9}, {3.7689922186643405`*^9, 3.76899234087503*^9}, { + 3.7689924599055567`*^9, 3.768992549598576*^9}, {3.768992582171423*^9, + 3.768992753585827*^9}, {3.7689928062678432`*^9, 3.7689928915222483`*^9}, { + 3.7689930078989067`*^9, 3.768993031218549*^9}, 3.768993066242803*^9, { + 3.7689934886367116`*^9, 3.768993503131282*^9}, {3.768993571410596*^9, + 3.7689936732544827`*^9}, {3.7689937200523033`*^9, 3.768993748120085*^9}, { + 3.7689940278024035`*^9, 3.7689940324250355`*^9}, {3.7689989938726206`*^9, + 3.768999118840295*^9}, {3.768999148923776*^9, 3.7689991994935336`*^9}, { + 3.768999245671011*^9, 3.768999352238721*^9}, {3.7689994049477024`*^9, + 3.7689994455520363`*^9}, {3.768999491511098*^9, 3.7689995886052933`*^9}, { + 3.768999784720758*^9, 3.7689998544921074`*^9}, {3.768999911621227*^9, + 3.768999960029707*^9}, {3.7690103458709807`*^9, 3.769010360456957*^9}, { + 3.7690132711425257`*^9, + 3.7690132799559455`*^9}},ExpressionUUID->"24986737-5337-49bd-afcb-\ +fe344c8d98f8"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList_", ",", + RowBox[{"OptionsPattern", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", + RowBox[{"DecomposeLastIso", "\[Rule]", "\"\\""}], ",", + RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "}"}], "]"}]}], + "]"}], ":=", "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{ + "Recursively", " ", "decompose", " ", "a", " ", "list", " ", "of", + " ", + RowBox[{"2", "^", "k"}], " ", "Kraus", " ", "operators", " ", + "into", " ", "an", " ", "m", " ", "x", " ", "n", " ", "Isometry", + " ", "and", " ", "two", " ", "list", " ", "of", " ", "Krau", " ", + "operators", " ", "controlled", " ", "by", " ", "the", " ", + "measured", " ", "result", " ", "after", " ", "the", " ", + "isometry"}], ";", "\[IndentingNewLine]", + RowBox[{"Input", ":", " ", + RowBox[{ + "a", " ", "list", " ", "of", " ", "kraus", " ", "operators", " ", + RowBox[{"{", + RowBox[{"K1", ",", "K2", ",", + RowBox[{"...", "K_", + RowBox[{"(", + RowBox[{"2", "^", "k"}], ")"}]}]}], "}"}]}]}], ";", + "\[IndentingNewLine]", + RowBox[{"Output", ":", " ", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"st", "[", "r1", "]"}], "}"}], " ", ",", " ", + RowBox[{"{", + RowBox[{ + RowBox[{"st", "[", "r21", "]"}], ",", + RowBox[{"st", "[", "r22", "]"}]}], "}"}], " ", ",", " ", + RowBox[{"{", + RowBox[{ + RowBox[{"st", "[", "r31", "]"}], ",", + RowBox[{"st", "[", "r32", "]"}], ",", + RowBox[{"st", "[", "r33", "]"}], ",", + RowBox[{"st", "[", "r34", "]"}]}], "}"}], " ", ",", " ", "...", + ",", " ", + RowBox[{"{", + RowBox[{"st", "[", "q1"}]}]}]}]}]}], "}"}], ",", " ", + RowBox[{"st", "[", "q2", "]"}], ",", " ", "...", ",", " ", + RowBox[{"st", "[", + RowBox[{"q_", + RowBox[{"(", + RowBox[{"2", "^", "k"}], ")"}]}], "]"}]}], "}"}], "}"}], ",", " ", + RowBox[{"where", " ", + RowBox[{"st", "[", "g", "]"}], " ", "is", " ", "the", " ", "gate", " ", + "sequence", " ", "of", " ", "gate", " ", + RowBox[{"g", "."}]}]}], "\[IndentingNewLine]", "*)"}], + "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "SplitResult", ",", " ", "gateSequence", ",", " ", "DecMethod", ",", "l", + ",", "n", ",", "m", ",", "k", ",", "loopNum", ",", " ", "i", ",", "v", + ",", "vList", ",", " ", "qList", ",", "rList"}], "}"}], ",", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{"k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", + RowBox[{"Log2", "[", + RowBox[{"Dimensions", "[", "krausList", "]"}], "]"}]}], ";", " ", + RowBox[{"(*", " ", + RowBox[{ + RowBox[{"(", + RowBox[{"n", ",", "m"}], ")"}], " ", "size", " ", "of", " ", "each", + " ", "kraus", " ", "operator"}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"IntegerQ", "[", "k", "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", + "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"IntegerQ", "[", "m", "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"IntegerQ", "[", "n", "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"StringQ", "[", + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}], ",", ",", + RowBox[{"Throw", "[", + RowBox[{ + "StringForm", "[", + "\"\\"", "]"}], + "]"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"loopNum", " ", "=", " ", + RowBox[{ + "number", " ", "of", " ", "iteration", " ", "with", " ", "qr", " ", + "decomposition"}]}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"If", "[", + RowBox[{ + RowBox[{"m", "<", "n"}], ",", " ", + RowBox[{ + RowBox[{"loopNum", " ", "=", " ", "k"}], ";", " ", + RowBox[{"l", "=", + RowBox[{"n", "-", "m"}]}]}], ",", + RowBox[{ + RowBox[{"loopNum", " ", "=", " ", + RowBox[{"n", "+", "k", "-", "m", "-", "1"}]}], ";", + RowBox[{"l", "=", "1"}]}]}], "]"}], ";", "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"qList", " ", "=", " ", + RowBox[{"{", "v", "}"}]}], ";", "\[IndentingNewLine]", + RowBox[{"gateSequence", " ", "=", " ", + RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "<=", "loopNum"}], ",", + RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", + RowBox[{"Which", "[", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + "Reduced", " ", "CSD", " ", "is", " ", "choosen", " ", "to", " ", + "do", " ", "the", " ", "decomposition"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", + "\"\\""}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"DecMethod", " ", "=", " ", "QSD"}], ";", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"Matrix", " ", "calculation"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{"SplitResult", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{ + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"ReducedCSDSplit", "[", + RowBox[{"#", ",", + RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], + "]"}], "&"}], ",", " ", "qList"}], "]"}], ",", "1"}], + "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + RowBox[{ + "A", " ", "list", " ", "bellow", " ", "contains", " ", "all", " ", + "gate", " ", "sequences", " ", "multiplex", " ", "controlled", + " ", "by", " ", "the", " ", "first", " ", "i"}], "-", + RowBox[{"1", " ", "bits"}]}], "*)"}], "\[IndentingNewLine]", + RowBox[{"vList", " ", "=", + RowBox[{"SplitResult", "[", + RowBox[{"[", + RowBox[{"1", ";;", + RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}]}], ";", " ", + RowBox[{"(*", " ", + RowBox[{"Zero", " ", "controlled", " ", "gate", " ", "v"}], " ", + "*)"}], "\[IndentingNewLine]", + RowBox[{"rList", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{ + RowBox[{"SplitResult", "[", + RowBox[{"[", + RowBox[{"2", ";;", + RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}], ",", "1"}], + "]"}]}], ";", " ", + RowBox[{"(*", " ", + RowBox[{ + "Matrices", " ", "with", " ", "cos", " ", "and", " ", "sin", " ", + "elements"}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"qList", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{ + RowBox[{"SplitResult", "[", + RowBox[{"[", + RowBox[{"3", ";;", + RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}], ",", "1"}], + "]"}]}], ";", " ", + RowBox[{"(*", " ", + RowBox[{ + "Isometry", " ", "for", " ", "the", " ", "decomposition", " ", + "in", " ", "the", " ", "next", " ", "round"}], "*)"}], + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"Append", " ", "results"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{"Which", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], + "\[Equal]", "False"}], ",", "\[IndentingNewLine]", + RowBox[{"gateSequence", "=", + RowBox[{"Join", "[", + RowBox[{"gateSequence", ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", + RowBox[{"loopNum", "+", "1"}], "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{"1", ",", + RowBox[{"i", "-", "1"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"loopNum", "+", "l", "+", "1"}], ",", + RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}]}], + "]"}], "&"}], ",", "vList"}], "]"}]}], + "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Join", "[", + RowBox[{ + RowBox[{"Range", "[", + RowBox[{"1", ",", + RowBox[{"i", "-", "1"}]}], "]"}], ",", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"loopNum", "+", "l", "+", "1"}], ",", + RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], + ",", "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"{", + RowBox[{"loopNum", "+", "1"}], "}"}]}]}], "]"}], "&"}], + ",", "rList"}], "]"}]}], "\[IndentingNewLine]", "]"}], + ",", "\[IndentingNewLine]", + RowBox[{"Mmt2", "[", + RowBox[{"i", ",", + RowBox[{"loopNum", "+", "1"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "i", "}"}], ",", + RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"{", + RowBox[{"NOT", "[", + RowBox[{"loopNum", "+", "1"}], "]"}], "}"}], "}"}]}], + "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", + "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], + "\[Equal]", "True"}], ",", "\[IndentingNewLine]", + RowBox[{"gateSequence", "=", + RowBox[{"Join", "[", + RowBox[{"gateSequence", ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{"1", ",", + RowBox[{"i", "-", "1"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"k", "+", "l", "+", "1"}], ",", + RowBox[{"k", "+", "l", "+", "m"}]}], "]"}]}]}], "]"}], + "&"}], ",", "vList"}], "]"}]}], "\[IndentingNewLine]", + "]"}], ",", "\[IndentingNewLine]", + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Join", "[", + RowBox[{ + RowBox[{"Range", "[", + RowBox[{"1", ",", + RowBox[{"i", "-", "1"}]}], "]"}], ",", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"loopNum", "+", "l", "+", "1"}], ",", + RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], + ",", "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"{", "i", "}"}]}]}], "]"}], "&"}], ",", "rList"}], + "]"}]}], "\[IndentingNewLine]", "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Mmt", "[", "i", "]"}]}], "\[IndentingNewLine]", + "}"}]}], "\[IndentingNewLine]", "]"}]}]}], + "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + "Other", " ", "decomposition", " ", "method", " ", "is", " ", + "choosen"}], "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "!=", + "\"\\""}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"DecMethod", " ", "=", " ", + RowBox[{"ChooseDecMethod", "[", + RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"Matrix", " ", "calculation"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{"qrSplitResult", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{ + RowBox[{"Map", "[", + RowBox[{"QRSplit", ",", " ", "qList"}], "]"}], ",", "1"}], + "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"rList", " ", "=", " ", + RowBox[{"qrSplitResult", "[", + RowBox[{"[", + RowBox[{"1", ";;", + RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"qList", " ", "=", " ", + RowBox[{"Flatten", "[", + RowBox[{ + RowBox[{"qrSplitResult", "[", + RowBox[{"[", + RowBox[{"2", ";;", + RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}], ",", "1"}], + "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"Append", " ", "results"}], " ", "*)"}], + "\[IndentingNewLine]", + RowBox[{"Which", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], "==", + "False"}], ",", "\[IndentingNewLine]", + RowBox[{"gateSequence", "=", + RowBox[{"Join", "[", + RowBox[{"gateSequence", ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{"1", ",", + RowBox[{"i", "-", "1"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"Join", "[", + RowBox[{ + RowBox[{"{", + RowBox[{"loopNum", "+", "1"}], "}"}], ",", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"loopNum", "+", "l", "+", "1"}], ",", + RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], + "]"}]}]}], "]"}], "&"}], ",", "rList"}], "]"}]}], + "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", + RowBox[{"Mmt2", "[", + RowBox[{"i", ",", + RowBox[{"loopNum", "+", "1"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "i", "}"}], ",", + RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{"{", + RowBox[{"NOT", "[", + RowBox[{"loopNum", "+", "1"}], "]"}], "}"}], "}"}]}], + "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", + "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], "==", + "True"}], ",", "\[IndentingNewLine]", + RowBox[{"gateSequence", "=", + RowBox[{"Join", "[", + RowBox[{"gateSequence", ",", "\[IndentingNewLine]", + RowBox[{"{", + RowBox[{ + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{"1", ",", + RowBox[{"i", "-", "1"}]}], "]"}], ",", + "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"action", "=", + RowBox[{"Join", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"loopNum", "+", "l", "+", "1"}], ",", + RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], + "]"}]}]}], "]"}], "&"}], ",", "rList"}], "]"}]}], + "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", + RowBox[{"Mmt", "[", "i", "]"}]}], "\[IndentingNewLine]", + "}"}]}], "\[IndentingNewLine]", "]"}]}]}], + "\[IndentingNewLine]", "]"}]}]}], " ", + RowBox[{"(*", " ", + RowBox[{"end", " ", "whether", " ", "reuse", " ", "qubit"}], " ", + "*)"}], "\[IndentingNewLine]", "]"}]}], " ", + RowBox[{"(*", " ", + RowBox[{"end", " ", "which", " ", "decomposition"}], " ", "*)"}], + "\[IndentingNewLine]", "]"}], ";", " ", + RowBox[{"(*", " ", + RowBox[{"end", " ", "for", " ", "loop"}], " ", "*)"}], + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"DecMethod", "=", + RowBox[{"ChooseDecMethod", "[", + RowBox[{"OptionValue", "[", "DecomposeLastIso", "]"}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"AppendTo", "[", + RowBox[{"gateSequence", ",", " ", "\[IndentingNewLine]", + RowBox[{"CTRLST", "[", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"Range", "[", + RowBox[{"1", ",", "loopNum"}], "]"}], ",", "\[IndentingNewLine]", + RowBox[{"Map", "[", + RowBox[{ + RowBox[{ + RowBox[{"DecMethod", "[", + RowBox[{"#", ",", + RowBox[{"Range", "[", + RowBox[{ + RowBox[{"loopNum", "+", "1"}], ",", + RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], + "&"}], ",", " ", "qList"}], "]"}]}], "\[IndentingNewLine]", + "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", + RowBox[{"Return", "[", "gateSequence", "]"}]}]}], "\[IndentingNewLine]", + "]"}]}]], "Input", + CellChangeTimes->{{3.7665811982668424`*^9, 3.7665812110087795`*^9}, { + 3.766581619785474*^9, 3.7665816344233427`*^9}, {3.766581775880185*^9, + 3.7665818205193624`*^9}, {3.7665818987066283`*^9, + 3.7665819770412207`*^9}, {3.7665820764476123`*^9, + 3.7665821329356017`*^9}, {3.7665821789136934`*^9, + 3.7665822377284665`*^9}, {3.766582268616893*^9, 3.7665822780885725`*^9}, { + 3.766582411457036*^9, 3.7665824717917447`*^9}, {3.7665825030641713`*^9, + 3.7665825764250374`*^9}, {3.7665848484588118`*^9, 3.766584848494714*^9}, { + 3.766591265623946*^9, 3.7665912874057455`*^9}, {3.766591446062413*^9, + 3.7665914526936855`*^9}, {3.766591529374693*^9, 3.7665915345568466`*^9}, { + 3.7665915692471113`*^9, 3.7665916674148564`*^9}, {3.76659188259067*^9, + 3.7665918826784363`*^9}, {3.766591921431836*^9, 3.766591940062032*^9}, { + 3.7665919823679376`*^9, 3.7665920229424973`*^9}, {3.7665920831734533`*^9, + 3.7665920847741747`*^9}, {3.766592134798443*^9, 3.766592153557295*^9}, { + 3.7665921849595723`*^9, 3.7665921899173284`*^9}, {3.7665922273662434`*^9, + 3.7665922341590567`*^9}, {3.766592297325202*^9, 3.766592361541536*^9}, { + 3.766592432948642*^9, 3.766592468944413*^9}, {3.7665925012540407`*^9, + 3.766592505333136*^9}, {3.766593699814333*^9, 3.7665938628866973`*^9}, { + 3.7665939092957726`*^9, 3.7665940392783365`*^9}, {3.766594081823598*^9, + 3.766594082126789*^9}, {3.7665941298003426`*^9, 3.7665942099610863`*^9}, { + 3.766594308688158*^9, 3.7665943216059427`*^9}, {3.7665943763825073`*^9, + 3.766594403646638*^9}, {3.7665944358635125`*^9, 3.7665945699670334`*^9}, { + 3.7665946540243206`*^9, 3.7665946674474397`*^9}, {3.766594709463953*^9, + 3.7665947121836815`*^9}, {3.766594757025811*^9, 3.766594882297595*^9}, { + 3.766594959197019*^9, 3.7665949953792915`*^9}, {3.766595049000944*^9, + 3.7665951237291746`*^9}, {3.7665951785875263`*^9, + 3.7665951862560253`*^9}, {3.766595247072443*^9, 3.766595288377023*^9}, { + 3.7665953489321704`*^9, 3.7665954784987993`*^9}, {3.7665955708289757`*^9, + 3.766595694086472*^9}, {3.7665957364711647`*^9, 3.7665957718904896`*^9}, { + 3.7665958416739674`*^9, 3.766595865952035*^9}, {3.7665959436104326`*^9, + 3.7665959491037464`*^9}, {3.766596057017265*^9, 3.766596116135255*^9}, { + 3.7665961534744086`*^9, 3.7665962038078527`*^9}, {3.766596253121052*^9, + 3.7665963033597817`*^9}, 3.7665963353702083`*^9, {3.766596384089965*^9, + 3.76659656035176*^9}, {3.766596678674448*^9, 3.76659670382225*^9}, { + 3.7665967374892473`*^9, 3.766596820152421*^9}, {3.7665969034357796`*^9, + 3.766596999041196*^9}, {3.7665970869452095`*^9, 3.766597119929035*^9}, { + 3.7665974170966573`*^9, 3.766597447634031*^9}, {3.766597495849169*^9, + 3.7665975076092353`*^9}, {3.7665975507279935`*^9, + 3.7665977640516844`*^9}, {3.7665978357639747`*^9, 3.76659785781702*^9}, { + 3.7665979878914986`*^9, 3.766598007842165*^9}, {3.7665981016663437`*^9, + 3.7665981090176897`*^9}, {3.766598171185497*^9, 3.7665982383050795`*^9}, { + 3.7665985870836844`*^9, 3.766598589817404*^9}, {3.7665987154505196`*^9, + 3.7665987771216736`*^9}, {3.7674329273057675`*^9, 3.767433001984829*^9}, { + 3.767433058311113*^9, 3.7674330622106514`*^9}, {3.7674330973384385`*^9, + 3.7674331043869076`*^9}, {3.767433240675272*^9, 3.7674332627181053`*^9}, { + 3.767433315111947*^9, 3.767433316489848*^9}, {3.7674343820168777`*^9, + 3.7674344617855587`*^9}, {3.7674345662623816`*^9, + 3.7674348604973974`*^9}, {3.767434910544444*^9, 3.7674349477554617`*^9}, { + 3.7674350483225746`*^9, 3.7674350872584567`*^9}, {3.7674351575706434`*^9, + 3.767435168983175*^9}, {3.7674352053951683`*^9, 3.767435205963521*^9}, { + 3.7674352446495113`*^9, 3.767435260508898*^9}, {3.7674354113590784`*^9, + 3.7674354180313826`*^9}, {3.767436925393983*^9, 3.7674369265028734`*^9}, { + 3.7674391842688227`*^9, 3.7674391996164327`*^9}, {3.7674392447270317`*^9, + 3.767439286098486*^9}, {3.767439384702837*^9, 3.7674394821563063`*^9}, { + 3.7674395537145863`*^9, 3.767439553738364*^9}, {3.7674396297952394`*^9, + 3.7674396628320494`*^9}, {3.767440685107992*^9, 3.767440691699963*^9}, { + 3.7689999875441217`*^9, 3.7690000317528076`*^9}, {3.7690103856535697`*^9, + 3.7690104231891613`*^9}, {3.769010719795543*^9, 3.769010796934086*^9}, { + 3.7690109149563103`*^9, 3.7690109581418023`*^9}, {3.769011024243966*^9, + 3.769011045652687*^9}, {3.769011088910946*^9, 3.7690112787360554`*^9}, { + 3.769011380012113*^9, 3.769011471372706*^9}, {3.76901198520442*^9, + 3.7690121625007706`*^9}, {3.769013075586748*^9, 3.7690131923862476`*^9}, { + 3.769013223216756*^9, 3.7690132233683486`*^9}, {3.7690133446099586`*^9, + 3.769013406034613*^9}, {3.7690134387919683`*^9, 3.7690134472403646`*^9}, { + 3.769013702367876*^9, 3.7690138950034666`*^9}, {3.769014350618451*^9, + 3.769014356271325*^9}, {3.7690147081837597`*^9, 3.7690147116315355`*^9}, { + 3.769015006181808*^9, + 3.769015019340603*^9}},ExpressionUUID->"b3753863-602f-43a6-addd-\ +8958fa819ca4"] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["Tests", "Section", + CellChangeTimes->{{3.766584346105257*^9, + 3.7665843523924475`*^9}},ExpressionUUID->"ab5407d3-9e8a-48ac-9144-\ +fd589f8d19ac"], + +Cell[CellGroupData[{ + +Cell["Test for the Split functions", "Subsection", + CellChangeTimes->{{3.766584355546017*^9, 3.7665843765259514`*^9}, + 3.7665848485336113`*^9, + 3.766599173173456*^9},ExpressionUUID->"e01b2ca7-8a75-45f2-87f6-\ +a438e8178b52"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"TestReducedCSDSplit", "[", "]"}], ":=", "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{"m", ",", "n", ",", "v", ",", "m1", ",", "m2", ",", "m3"}], + "}"}], ",", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + RowBox[{"2", "m"}], "\[LessEqual]", + RowBox[{ + "n", " ", "and", " ", "n", " ", "must", " ", "be", " ", "even"}]}], + "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"result", "=", "True"}], ";", "\[IndentingNewLine]", + RowBox[{"m", "=", + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{"2", ",", "10"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"n", "=", + RowBox[{ + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"2", "*", "m"}], ",", "30"}], "}"}], "]"}], "*", "2"}]}], + ";", "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{"RPickRandomIsometry", "[", + RowBox[{"m", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"test", " ", "without", " ", "EfficientRepresentation"}], " ", + "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"m3", ",", "m2", ",", "m1"}], "}"}], " ", "=", " ", + RowBox[{"ReducedCSDSplit", "[", "v", "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"isZeroMatrix", "[", + RowBox[{"v", "-", + RowBox[{"m1", ".", "m2", ".", "m3"}]}], "]"}], ",", + "\[IndentingNewLine]", ",", "\[IndentingNewLine]", + RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"test", " ", "with", " ", "EfficientRepresentation"}], " ", + "*)"}], "\[IndentingNewLine]", + RowBox[{"r", "=", + RowBox[{ + RowBox[{ + RowBox[{"ReducedCSDSplit", "[", + RowBox[{"v", ",", " ", + RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], "]"}], + "[", + RowBox[{"[", "2", "]"}], "]"}], "[", + RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"isIdentity", "[", + RowBox[{ + RowBox[{"ConjugateTranspose", "[", "r", "]"}], ".", "r"}], "]"}], + ",", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", + RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"return", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{"result", ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"Print", "[", "\"\\"", "]"}], ";", + " ", + RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", + "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", + CellChangeTimes->{{3.7665846660459614`*^9, 3.7665847816718597`*^9}, { + 3.766584848555552*^9, 3.766584848560539*^9}, {3.766585194416991*^9, + 3.766585260152951*^9}, {3.7689867057804594`*^9, 3.768986762177565*^9}, { + 3.768987178419902*^9, 3.768987203302307*^9}, {3.768988351916609*^9, + 3.768988352230774*^9}, {3.7689884095613413`*^9, 3.768988468127643*^9}, { + 3.768988670497406*^9, 3.7689886954576235`*^9}, {3.76898882426506*^9, + 3.7689888245203476`*^9}}, + CellLabel->"In[69]:=",ExpressionUUID->"99ad6fee-8738-44c6-b736-17148c858be1"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"TestReducedCSDSplit", "[", "]"}]], "Input", + CellChangeTimes->{{3.768988518301433*^9, 3.768988525951964*^9}}, + CellLabel->"In[71]:=",ExpressionUUID->"53d0b155-a0a4-4e28-8eb7-49537ab5e794"], + +Cell[BoxData["True"], "Output", + CellChangeTimes->{{3.76898852659624*^9, 3.768988530972578*^9}, { + 3.768988594767914*^9, 3.7689886135815573`*^9}, {3.7689886633864083`*^9, + 3.7689886974482727`*^9}, {3.768988819143733*^9, 3.768988841560755*^9}}, + CellLabel->"Out[71]=",ExpressionUUID->"c10ce11d-504a-4055-af67-f13ad9108447"] +}, Open ]], + +Cell[BoxData[ + RowBox[{ + RowBox[{"TestQRSplit", "[", "]"}], ":=", "\[IndentingNewLine]", + RowBox[{"Module", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + "result", ",", "m", ",", "n", ",", "v", ",", "r", ",", "q1", ",", "q2"}], + "}"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"result", "=", "True"}], ";", "\[IndentingNewLine]", + RowBox[{"m", "=", + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{"2", ",", "10"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"n", "=", + RowBox[{ + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"2", "*", "m"}], ",", "30"}], "}"}], "]"}], "*", "2"}]}], + ";", "\[IndentingNewLine]", + RowBox[{"v", " ", "=", " ", + RowBox[{"RPickRandomIsometry", "[", + RowBox[{"m", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"r", ",", + RowBox[{"{", + RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], " ", "=", " ", + RowBox[{"QRSplit", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"isZeroMatrix", "[", + RowBox[{"v", "-", + RowBox[{ + RowBox[{"ArrayFlatten", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"q1", ",", "0"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "q2"}], "}"}]}], "}"}], "]"}], ".", "r"}]}], + "]"}], ",", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", + RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{"result", ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"Print", "[", "\"\\"", "]"}], ";", + " ", + RowBox[{"Return", " ", "[", "False", "]"}]}]}], "\[IndentingNewLine]", + "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", + CellChangeTimes->{{3.7665848284343333`*^9, 3.7665848619986153`*^9}, { + 3.766584905023596*^9, 3.7665849355110917`*^9}, {3.7665849675913315`*^9, + 3.7665851912315063`*^9}, {3.7665852904150205`*^9, 3.7665853755364637`*^9}, { + 3.7665854417284856`*^9, 3.7665855325606756`*^9}, {3.7674327190314503`*^9, + 3.7674327195784035`*^9}, {3.767432793323058*^9, 3.767432821094531*^9}}, + CellLabel-> + "In[213]:=",ExpressionUUID->"55c35b25-c1ba-4d20-8b02-98a32cd64908"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"TestQRSplit", "[", "]"}]], "Input", + CellLabel-> + "In[214]:=",ExpressionUUID->"62af65db-8e03-4b38-bed4-3eb19cc5fe59"], + +Cell[BoxData["True"], "Output", + CellChangeTimes->{{3.766585353053567*^9, 3.766585378135491*^9}, + 3.766585482316984*^9, 3.766585534260481*^9, 3.7674327129805813`*^9, + 3.7674328250115333`*^9, {3.7689885045931015`*^9, 3.768988507690789*^9}, + 3.7689998743838587`*^9}, + CellLabel-> + "Out[214]=",ExpressionUUID->"80d6cfd6-8f67-4c80-b6a5-44c9322d4645"] +}, Open ]] +}, Closed]], + +Cell[CellGroupData[{ + +Cell["Test Reduced CSD decomposition", "Subsection", + CellChangeTimes->{{3.7665855457158575`*^9, + 3.7665855761342564`*^9}},ExpressionUUID->"c840a135-7e44-4968-bab0-\ +c6b8263d8ec2"], + +Cell[CellGroupData[{ + +Cell["Example1 (reuse qubit) n=2,m=1,k=1", "Subsubsection", + CellChangeTimes->{{3.7665774119114876`*^9, 3.7665774202582064`*^9}, { + 3.7674339073536777`*^9, + 3.7674339309547105`*^9}},ExpressionUUID->"46bada4f-2b65-46d6-8449-\ +2ff3d19c5383"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", " ", + RowBox[{"Length", "[", "krausList", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{ + RowBox[{"Print", "[", + RowBox[{ + RowBox[{"krausList", "[", + RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], + "]"}]}]], "Input", + CellChangeTimes->{{3.766333712554659*^9, 3.7663337216144323`*^9}, { + 3.766335015462319*^9, 3.766335015573023*^9}, {3.7663355964537024`*^9, + 3.7663356093023815`*^9}, {3.766337755407365*^9, 3.7663377555410175`*^9}, + 3.76633962691089*^9, 3.7663397065581903`*^9, 3.766340787222144*^9, + 3.7663408373760347`*^9, 3.766342288093828*^9, {3.7663424555071993`*^9, + 3.766342466628435*^9}, 3.7663427493833647`*^9, {3.766342983790574*^9, + 3.7663429935095863`*^9}, {3.7665756385086913`*^9, 3.7665756656361394`*^9}, + 3.766575783131547*^9}, + CellLabel-> + "In[246]:=",ExpressionUUID->"222c615b-a42b-4ee3-a8d3-36120f9f8aec"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + {"0.5562031488102216`", + RowBox[{"-", "0.08943537113846498`"}]}, + {"0.2868927457431966`", "0.4476530327151198`"}, + {"0.5203187231731158`", + RowBox[{"-", "0.04086198887217893`"}]}, + {"0.4026406600219025`", "0.26147882915254467`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{{3.766333713915021*^9, 3.7663337223315153`*^9}, + 3.7663350160836573`*^9, {3.766335600169801*^9, 3.7663356102877464`*^9}, + 3.7663377176861954`*^9, {3.766337755969861*^9, 3.7663377718474054`*^9}, { + 3.7663378369483657`*^9, 3.7663378684740963`*^9}, {3.7663396272978306`*^9, + 3.7663396388519354`*^9}, 3.7663397068972836`*^9, 3.7663401069530573`*^9, + 3.7663402211018295`*^9, 3.7663403238022113`*^9, 3.766340428904173*^9, + 3.7663404653796406`*^9, 3.7663407879053173`*^9, 3.7663408382915874`*^9, + 3.766342292852105*^9, 3.76634246715403*^9, 3.7663427502500467`*^9, + 3.76634289545079*^9, {3.766342985802194*^9, 3.7663429944889665`*^9}, + 3.7663432208267484`*^9, 3.7665717762284293`*^9, 3.76657412703884*^9, { + 3.766575640436507*^9, 3.766575666436002*^9}, 3.766575783849626*^9, + 3.7665758454499493`*^9, 3.766576211483008*^9, 3.7665820369412255`*^9, + 3.766596881845497*^9, 3.7674328399519067`*^9, 3.7674329411285715`*^9, + 3.7674375146122665`*^9, 3.767441070248887*^9, 3.7690115009575496`*^9, + 3.769011594581498*^9, 3.769013989427829*^9}, + CellLabel-> + "During evaluation of \ +In[246]:=",ExpressionUUID->"3bc23efe-2da5-44a4-8729-811d09773bfb"], + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + { + RowBox[{"-", "0.29153628927818365`"}], "0.8035624703210873`"}, + {"0.17513502141877502`", "0.24671250620362192`"}, + {"0.15903026796401692`", "0.10525957774645245`"}, + {"0.18580426551614765`", "0.06251330520412025`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{{3.766333713915021*^9, 3.7663337223315153`*^9}, + 3.7663350160836573`*^9, {3.766335600169801*^9, 3.7663356102877464`*^9}, + 3.7663377176861954`*^9, {3.766337755969861*^9, 3.7663377718474054`*^9}, { + 3.7663378369483657`*^9, 3.7663378684740963`*^9}, {3.7663396272978306`*^9, + 3.7663396388519354`*^9}, 3.7663397068972836`*^9, 3.7663401069530573`*^9, + 3.7663402211018295`*^9, 3.7663403238022113`*^9, 3.766340428904173*^9, + 3.7663404653796406`*^9, 3.7663407879053173`*^9, 3.7663408382915874`*^9, + 3.766342292852105*^9, 3.76634246715403*^9, 3.7663427502500467`*^9, + 3.76634289545079*^9, {3.766342985802194*^9, 3.7663429944889665`*^9}, + 3.7663432208267484`*^9, 3.7665717762284293`*^9, 3.76657412703884*^9, { + 3.766575640436507*^9, 3.766575666436002*^9}, 3.766575783849626*^9, + 3.7665758454499493`*^9, 3.766576211483008*^9, 3.7665820369412255`*^9, + 3.766596881845497*^9, 3.7674328399519067`*^9, 3.7674329411285715`*^9, + 3.7674375146122665`*^9, 3.767441070248887*^9, 3.7690115009575496`*^9, + 3.769011594581498*^9, 3.769013989433812*^9}, + CellLabel-> + "During evaluation of \ +In[246]:=",ExpressionUUID->"6b9d1c6f-941f-4f62-acc6-ecf31fc62a6f"] +}, Open ]] +}, Open ]], + +Cell[BoxData[ + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DoNotReuseAncilla", "->", "False"}]}], "]"}]}], ";"}]], "Input", + CellChangeTimes->{{3.7663401374076233`*^9, 3.7663401493806076`*^9}, { + 3.7663406072024155`*^9, 3.766340629564616*^9}, 3.766342307390231*^9, + 3.766342396110996*^9, {3.766573880787141*^9, 3.7665739190259237`*^9}, + 3.7665740602184715`*^9, {3.7665742140512342`*^9, 3.76657425788206*^9}, { + 3.7665753909793406`*^9, 3.766575392499277*^9}, 3.767433304109812*^9, { + 3.76743506677325*^9, 3.7674350785940804`*^9}, {3.767440842489877*^9, + 3.7674408441010723`*^9}, {3.767441073824912*^9, 3.7674410982729425`*^9}}, + CellLabel-> + "In[247]:=",ExpressionUUID->"ba4be30b-5d55-411a-8bcc-aac08aebc97e"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]], "Input", + CellLabel-> + "In[248]:=",ExpressionUUID->"1ac403f0-5f25-40d4-9c0b-ce8fa7ace86d"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "2", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.604198436302705`", ",", "3"}], "}"}]}], "}"}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014000788432*^9}, + CellLabel-> + "During evaluation of \ +In[248]:=",ExpressionUUID->"73f0c737-de2d-4b5c-ab21-7f2dbd3cf34e"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "3", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "2.132628864021706`", ",", "2"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7397390797851134`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690140007914243`*^9}, + CellLabel-> + "During evaluation of \ +In[248]:=",ExpressionUUID->"c085a5fe-9ad4-4e60-ae6b-a0b52254501f"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", + CellChangeTimes->{3.7690140007964106`*^9}, + CellLabel-> + "During evaluation of \ +In[248]:=",ExpressionUUID->"dc224ae0-c42c-4d12-bb72-7bc15354acdd"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"{", + RowBox[{"8", ",", "Null", ",", "2"}], "}"}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.769014000799402*^9}, + CellLabel-> + "During evaluation of \ +In[248]:=",ExpressionUUID->"ac24ab55-ed6d-4276-bdda-37926afabda8"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.892985682289386`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.297567516716601`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.32448118279653304`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.570796326794897`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6638984806276833`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.04217005175780123`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.026242032066981`", ",", "3"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.536207742565916`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9132376867051183`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7920692507684786`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5488051600495136`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.213548282435862`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.7223266753685267`", ",", "3"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014000806384*^9}, + CellLabel-> + "During evaluation of \ +In[248]:=",ExpressionUUID->"0b76d735-371b-4ba9-950a-5cdc3fde639a"] +}, Open ]] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["Example2 (reuse qubits) n=1, m=2, k=4, l=1", "Subsubsection", + CellChangeTimes->{{3.76657742354143*^9, 3.766577430234536*^9}, { + 3.7674414915129547`*^9, + 3.7674415141282196`*^9}},ExpressionUUID->"8a768103-8b13-4c07-925d-\ +13ff2ca833f3"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"4", ",", "2", ",", "16"}], "]"}]}], ";"}]], "Input", + CellChangeTimes->{{3.7665762788664417`*^9, 3.7665762859395337`*^9}, { + 3.7665764137887516`*^9, 3.766576431263038*^9}, {3.7674354008618374`*^9, + 3.767435401450264*^9}, {3.767442839492713*^9, 3.7674428407576847`*^9}}, + CellLabel-> + "In[249]:=",ExpressionUUID->"57b1b16d-3b19-4cbf-a509-84b4572b91c3"], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", + RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", + CellChangeTimes->{{3.7674420583748116`*^9, 3.767442058764325*^9}}, + CellLabel-> + "In[250]:=",ExpressionUUID->"620d403d-270c-46e9-8e54-f25140ad0167"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "3", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.8280775612433653`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.376672524400894`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.608662815152222`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.2072494079946614`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.7139058079960678`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.11803086773045168`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}]}], "}"}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014034106288*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"34255a8f-a948-43f9-a9b7-e7c097c92df6"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.9958254406913325`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.6615473715262772`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.3831572268983727`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.0714275981482493`", ",", "3"}], "}"}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.76901403410928*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"6768665e-77d2-4b0e-ad7c-d1fc92148d53"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"7", ",", "1", ",", "3"}], "}"}]], "Print", + CellChangeTimes->{3.76901403411327*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"56c6d456-c216-4701-9050-d3a9be3bc3aa"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"{", + RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.7690140341152644`*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"7bd4ea3d-50b8-47e6-b724-5c209a6b8807"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "3", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"2", ",", "2.769292338446094`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.819694821793526`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.660989400975847`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.805880634273674`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.4537125107229643`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.8184618454103907`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.6701496482891196`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.382916862476793`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.501546010214703`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.721974181164784`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.8448949036902185`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.0836722564762353`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}]}], "}"}]}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.7690140341202745`*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"6b32e4b8-8b31-47af-8b50-80e85137b219"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.9747672967446808`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.6679896034680475`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.0950471054760964`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "0.8425238090663874`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "2.166241343439897`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.9072567614406906`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "0.9855809675374413`", ",", "3"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7344694416936551`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.76901403412424*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"0dc3d6d3-3af1-465a-9ba1-a312125c1b52"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"7", ",", "2", ",", "3"}], "}"}]], "Print", + CellChangeTimes->{3.7690140341272316`*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"ebbcf39c-0ac6-4eb8-af03-636fdf62a1b5"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "2", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"{", + RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.7690140341292267`*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"32924fce-4acd-4cda-a59a-3c364e58a306"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0634722998084318`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.6485292218626135`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.036877834921227`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.349380664256114`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.7123889803846755`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.281177780412549`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.855644772367313`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589779`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.581928146544639`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.712388980384686`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.26193299790204`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.165121430945345`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948992`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.4410946548335946`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.03992056678949463`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.229055460763314`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.689202681089035`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267949006`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.4777578488041034`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897967`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.3185955877203162`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.735892585490398`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.759981444294862`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.9850391977462056`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.778602648495147`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.9777501416456467`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.026037088185856`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.807076687623449`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589795`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.0415346345375136`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5192348031823117`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.011338270408583`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.119566383071059`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.3235216359266837`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5498149036569777`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.579273607952427`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.268963202336125`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0264247964982691`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948992`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.14607638877319643`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.183780239753981`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.9635671160790977`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.9306444003481875`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.279738351460031`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.816006109212173`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.7795311302910637`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.0395424699088025`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.117124053825603`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.9641306467378277`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.691614084456748`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.126030306292516`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.42967847609639`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8375288172897114`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948961`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.3126100109582004`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.582264047982358`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.010835585730236`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.872110877242105`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5439811570038429`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.864511866726148`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.7339507102014866`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "6.258566492942777`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.4862442949614912`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.000022580785504544565`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.01001826081326973`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7346245487344991`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.633805851356526`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.536827154063772`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.0361181440069`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.455192236448855`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.279787336855088`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.49776445133915`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.130830267755233`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.298395562210642`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.8584687150151686`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.014838776871981`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5679214085384117`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707466235955903`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.138467713988371`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.7812906359539493`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974484`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.0726909980205335`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.6549269685407686`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.355453513590073`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5674305996877975`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.979040976244281`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.482537399278808`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.76154939959504`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5231143672877858`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7702503361188254`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.3544646169159007`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2.776937105069661`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.1764965004489656`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5457410004233374`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.643563060425247`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.704197226305973`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.7822992474073633`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.07114812583583`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.945529584652656`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.817292977554391`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.506244408212568`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8666106344934212`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.185847411682689`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.965762556895329`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.175497481398352`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.17137879990917448`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.890045127453771`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897922`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.111235931174971`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.99661846730412`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589792`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.634180542531002`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.986734680942202`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.638996851813481`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.352842963484637`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.792035638211256`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.712388980384688`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.72306948695187`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2.155038996767058`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.666770236553685`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.8565792524356155`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014034157152*^9}, + CellLabel-> + "During evaluation of \ +In[250]:=",ExpressionUUID->"2a30a3e1-2ecb-48d9-9807-e99c79ac2471"] +}, Open ]] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["Example3 ", "Subsubsection", + CellChangeTimes->{{3.766577441126419*^9, + 3.7665774579115467`*^9}},ExpressionUUID->"9dd04ade-e7e5-4bd6-a8de-\ +8ed4e1855024"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", " ", + RowBox[{"Length", "[", "krausList", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{ + RowBox[{"Print", "[", + RowBox[{ + RowBox[{"krausList", "[", + RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], + "]"}]}]], "Input", + CellLabel-> + "In[229]:=",ExpressionUUID->"c0c24c64-880d-4e7d-a3bf-c1a83384242c"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + { + RowBox[{"-", "0.17353950519770414`"}], "0.5892337973307986`"}, + {"0.1384273896469801`", "0.18591471991697917`"}, + {"0.46138875837201115`", "0.37164727375160844`"}, + {"0.7119556307515604`", + RowBox[{"-", "0.1300433413383928`"}]} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{3.766577487608159*^9, 3.766578161287359*^9, + 3.767433851804544*^9, 3.769011672323495*^9}, + CellLabel-> + "During evaluation of \ +In[229]:=",ExpressionUUID->"e7e607b1-61aa-4263-a0bd-bd7ee87de726"], + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + {"0.375049043188997`", "0.2546327183257929`"}, + { + RowBox[{"-", "0.2516967189967966`"}], "0.5667417595932759`"}, + {"0.07665389538847718`", "0.0808467070808438`"}, + {"0.145164212502183`", "0.26577443242942145`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{3.766577487608159*^9, 3.766578161287359*^9, + 3.767433851804544*^9, 3.769011672330476*^9}, + CellLabel-> + "During evaluation of \ +In[229]:=",ExpressionUUID->"e1e35eaf-fbda-459b-b409-ea072144e8a3"] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", + RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", + CellChangeTimes->{{3.7665774853551826`*^9, 3.7665774989717836`*^9}, { + 3.767441202228734*^9, 3.7674412043101454`*^9}}, + CellLabel-> + "In[230]:=",ExpressionUUID->"ace8a1c1-dd1b-4a70-b555-0a26dbb185cf"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.121193451669002`", ",", "3"}], "}"}]}], "}"}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, + 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, + 3.7690116754591045`*^9}, + CellLabel-> + "During evaluation of \ +In[230]:=",ExpressionUUID->"3b5c0afe-9c73-41ab-a8ea-76da1c390cdd"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "3", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.4971907763902148`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0025849446305877`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, + 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, + 3.769011675463095*^9}, + CellLabel-> + "During evaluation of \ +In[230]:=",ExpressionUUID->"bcecbe03-1bf6-4892-a54b-abcdd1a0ec19"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", + CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, + 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, + 3.7690116754670844`*^9}, + CellLabel-> + "During evaluation of \ +In[230]:=",ExpressionUUID->"14cd420d-b574-4ffd-a797-3b63a50bf76a"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7384543309879236`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.1319016107057145`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.463393384238476`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.1078484089492`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.1443077150222452`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.40717219201273236`", ",", "3"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.784276456449035`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.1034756981751142`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5110574230803501`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2198100061942907`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.183596594086367`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589792`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.719121009359385`", ",", "3"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, + 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, + 3.769011675474066*^9}, + CellLabel-> + "During evaluation of \ +In[230]:=",ExpressionUUID->"49c5d714-13c6-4209-b65c-334f1257455c"] +}, Open ]] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["Example4", "Subsubsection", + CellChangeTimes->{{3.7665787521737967`*^9, + 3.7665787713874435`*^9}},ExpressionUUID->"3cee5c3f-5857-4ee5-b683-\ +10f96cafaf92"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"4", ",", "4", ",", "8"}], "]"}]}], ";"}]], "Input", + CellChangeTimes->{{3.7665777584112206`*^9, 3.766577763708061*^9}, { + 3.766577885134451*^9, 3.766577908333433*^9}, {3.7665783916134787`*^9, + 3.766578399411631*^9}, {3.7665784792232704`*^9, 3.766578487427555*^9}, + 3.7674428801632166`*^9}, + CellLabel-> + "In[252]:=",ExpressionUUID->"7b6b0b07-02d5-4722-9ed3-d1108461c3ae"], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", + RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}], ";"}]}], "Input", + CellChangeTimes->{{3.7665777159587097`*^9, 3.7665777205085473`*^9}, { + 3.7665777765317793`*^9, 3.7665777850280666`*^9}}, + CellLabel-> + "In[253]:=",ExpressionUUID->"34e20742-d410-41fb-949c-7e2276e33f2b"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948988`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.059297703155052`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.7221283514439631`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.280901899959243`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.362668950262355`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.12552967895197226`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.27964529179144093`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948972`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "6"}], "}"}]}], "}"}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690140790211163`*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"767a298c-e8ef-4903-bccc-cb93b2b23236"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.8918707965322608`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.583947991187743`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.4497231741233862`", ",", "1"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.1564396658636353`", ",", "1"}], "}"}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014079025106*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"ce7f941f-b733-4ef0-968c-d07421ac66c4"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", + CellChangeTimes->{3.7690140790290937`*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"3a624d72-13ff-4460-b7ce-157cc54f5d62"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "2", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"2", ",", "0.5169081709494948`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948968`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.484855061512915`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.4114427343502225`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948946`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.173133026036519`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.11201950440398514`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.125781040963981`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "6"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948968`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.9474364598421694`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.1148265154808827`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.707244641257323`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.8272866500374547`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.4031920613535402`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.85969886912041`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "6"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "6"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690140790350776`*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"3248d98f-5ce8-493c-aadf-6b20a0445b7e"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.675280537891014`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "2.16924269973481`", ",", "2"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.0343125255125214`", ",", "2"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "0.7106753558398746`", ",", "2"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.1040594793921743`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.9511658106966199`", ",", "2"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.3880088396089856`", ",", "2"}], "}"}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7354755866073815`", ",", "2"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690140790390673`*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"8df78050-03ee-4732-8a3f-f6a8c41b91f7"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"4", ",", "1", ",", "2"}], "}"}]], "Print", + CellChangeTimes->{3.7690140790410624`*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"630a5e75-5ab6-4276-bd22-08b30f404368"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.1009004280076566`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8664263045967944`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.976869193994792`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.68474219778307`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.0974401745844844`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.0341741890348777`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.741041219593595`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5388984508031436`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.530526614056157`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.153921967406397`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7027408452473962`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.371028901217718`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7485388757162179`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.25878440203473185`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.43992138750749765`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.812372153980152`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.472959722731246`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.245586360887163`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5630528990854764`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.097741511681132`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.0112388990906855`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.285944486958395`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.58913119972569`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.362629590778057`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.3012984520519675`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.26949787474292913`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7494924716490279`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.556754646001274`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.7206799880612613`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.547266936651667`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.466807879993062`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.142684279948441`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.88904979974148`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.6367228522158026`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8130542454069246`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.992909685246225`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6696068493785725`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.283927602461581`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.938011074775515`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.9385855409632704`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589792`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5767374891510083`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948943`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.271700267584534`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.987481190006596`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2.733192502911591`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.5827107562206107`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.561624541810766`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948961`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.144306227479552`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8398046440020516`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6856456643550358`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948957`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.17443767838443947`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.587359192047772`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.758449019137225`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.73540967137021`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.8417177869478776`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948948`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.821531172155046`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.5762932588157526`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.046871350069871`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.8215670408725222`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.095177036216354`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.712388980384691`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.923958971345887`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.880777698176664`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.614213487557229`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.579626751349725`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.3154217213110797`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.125844453208251`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.323807389159554`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.849423636246845`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.89020137627495`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.0253157752604753`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.9697350544409336`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7590892310469446`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.177015910462604`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7085885725911886`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.4399154768821125`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.37935853471254394`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.054739428708739`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5599786852824986`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.068859385529503`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.705996354342444`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.6648649853117634`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.025211428889126`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.8895843305367226`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5291336457017651`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.7134222990711585`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0918090820781752`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.3833813624102715`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.4588562934286737`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.11194003336622277`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2853649096371966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.9098809040673927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.437755283910963`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.2401906671914045`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.6574133244524845`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.15637617742791546`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.2031249399635136`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.508839212840409`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.0381999787747427`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.8345796385683766`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.3119307289292514`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.566423452709351`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.8332110304111064`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5785512123688585`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.285406783907758`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.218034392784138`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.318395309537807`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.2777745747349976`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.2092059049951336`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.0353523386735697`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.11534334923930056`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6768870049188682`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.12308639485584982`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948806`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.798324082246086`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948983`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1448517648787173`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.944674858683144`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "6.283185307179583`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.777495861211376`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897896`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.6436717244035624`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.6126074595299107`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.119996881395514`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.128109437646448`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948999`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.749296749770654`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.057031553831026`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.253979825520041`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.47133293888481154`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.5789396066742776`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589794`", ",", "5"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014079070982*^9}, + CellLabel-> + "During evaluation of \ +In[253]:=",ExpressionUUID->"2b38ffe7-43f2-4da1-9756-d4a5eb25bea0"] +}, Open ]] +}, Open ]] +}, Open ]] +}, Closed]], + +Cell[CellGroupData[{ + +Cell["Test QR decomposition", "Subsection", + CellChangeTimes->{{3.7665857059432364`*^9, + 3.766585725983663*^9}},ExpressionUUID->"9e3e465f-7792-498e-8cb5-\ +d148e0ec6bce"], + +Cell[CellGroupData[{ + +Cell["Example 1 (reuse qubit) n = 2, m = 1, k = 1", "Subsubsection", + CellChangeTimes->{{3.7674419174355516`*^9, + 3.767441951909088*^9}},ExpressionUUID->"91db1d89-924f-408c-985b-\ +2313b9c7fd4e"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", " ", + RowBox[{"Length", "[", "krausList", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{ + RowBox[{"Print", "[", + RowBox[{ + RowBox[{"krausList", "[", + RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], + "]"}]}]], "Input", + CellChangeTimes->{3.76743945433722*^9}, + CellLabel-> + "In[255]:=",ExpressionUUID->"013e166b-cb35-4b15-9fc8-544f9e2327c7"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + {"0.4905582701802258`", "0.0993935690435814`"}, + {"0.152912791594013`", "0.23759144339156918`"}, + {"0.040334938884184185`", "0.3244158701763987`"}, + {"0.37423495367316617`", "0.18802532036184996`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{ + 3.7665919437122736`*^9, 3.7665921936832604`*^9, 3.7665969253691454`*^9, + 3.76743253048674*^9, 3.767436796745864*^9, 3.7674371074018326`*^9, + 3.7674382516422677`*^9, 3.7674387503237066`*^9, {3.7674406996119804`*^9, + 3.767440702834814*^9}, 3.767440759005213*^9, 3.767441291448786*^9, + 3.7690121714578047`*^9, 3.769014117816327*^9}, + CellLabel-> + "During evaluation of \ +In[255]:=",ExpressionUUID->"831e0a0e-439f-4395-ac88-5d25bf3228a8"], + +Cell[BoxData[ + TagBox[ + RowBox[{"(", "\[NoBreak]", GridBox[{ + {"0.5124715008820717`", "0.07365637905491745`"}, + {"0.28376219252291285`", "0.5117317954644107`"}, + { + RowBox[{"-", "0.17919316148420472`"}], "0.4225579844929883`"}, + { + RowBox[{"-", "0.4680099824092695`"}], "0.589255550348841`"} + }, + GridBoxAlignment->{ + "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, + "RowsIndexed" -> {}}, + GridBoxSpacings->{"Columns" -> { + Offset[0.27999999999999997`], { + Offset[0.7]}, + Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { + Offset[0.2], { + Offset[0.4]}, + Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], + Function[BoxForm`e$, + MatrixForm[BoxForm`e$]]]], "Print", + CellChangeTimes->{ + 3.7665919437122736`*^9, 3.7665921936832604`*^9, 3.7665969253691454`*^9, + 3.76743253048674*^9, 3.767436796745864*^9, 3.7674371074018326`*^9, + 3.7674382516422677`*^9, 3.7674387503237066`*^9, {3.7674406996119804`*^9, + 3.767440702834814*^9}, 3.767440759005213*^9, 3.767441291448786*^9, + 3.7690121714578047`*^9, 3.7690141178223114`*^9}, + CellLabel-> + "During evaluation of \ +In[255]:=",ExpressionUUID->"94864cd4-9458-43da-b0c2-e7ff0c1d6491"] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], "]"}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", + CellChangeTimes->{{3.7665913479698105`*^9, 3.7665913901399097`*^9}, + 3.7665914305568647`*^9, {3.7665914908117833`*^9, 3.766591504050392*^9}, { + 3.7665918022683525`*^9, 3.7665918575725513`*^9}, {3.766591906052977*^9, + 3.7665919065546083`*^9}, {3.7665919528887424`*^9, 3.766591959475134*^9}, { + 3.766592518372278*^9, 3.766592522690734*^9}, {3.7665941085910416`*^9, + 3.766594139291998*^9}, {3.766594693285367*^9, 3.766594694156039*^9}, { + 3.7665958759822197`*^9, 3.766595877116188*^9}, {3.7665977768793917`*^9, + 3.766597777917617*^9}, {3.7674325690336103`*^9, 3.7674325699591775`*^9}, { + 3.7674367546936903`*^9, 3.767436784081429*^9}, {3.767436822802719*^9, + 3.767436873467663*^9}, 3.7674382589051857`*^9, {3.767438379487771*^9, + 3.767438408706781*^9}, 3.767438816691412*^9, {3.7674395769103565`*^9, + 3.7674395776277037`*^9}}, + CellLabel-> + "In[256]:=",ExpressionUUID->"27230ac3-13d8-40e8-b787-4b4c8860c54c"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.356194490192345`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.122526805787985`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.1225268057879865`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6567914445064659`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589795`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6567914445064665`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.7605154932052614`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}]}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.7690141234163566`*^9}, + CellLabel-> + "During evaluation of \ +In[256]:=",ExpressionUUID->"1202cb52-bf83-4d90-8dd4-125f9dcbb1b7"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", + CellChangeTimes->{3.7690141234183407`*^9}, + CellLabel-> + "During evaluation of \ +In[256]:=",ExpressionUUID->"4b9c9173-3617-401e-8ccb-c250aa4e5300"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"8", ",", "Null", ",", "2"}], "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690141234223275`*^9}, + CellLabel-> + "During evaluation of \ +In[256]:=",ExpressionUUID->"fd2cd305-ac99-44fe-836c-5cb085f9284f"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.7652202470189495`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.43349770179704805`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "\[Pi]", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.2846309159917961`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5178622051255108`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.725789958541886`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948957`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.0835921630907634`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.23211670088035694`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.840858328417524`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.2373074764429255`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.7123889803846915`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.3026964007876685`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.8984868329353475`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.3123147333702805`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690141234283123`*^9}, + CellLabel-> + "During evaluation of \ +In[256]:=",ExpressionUUID->"7a6095c2-cfa6-4bb1-8653-eee9ed06a2de"] +}, Open ]] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["Example 2(reuse qubit) n = 1, m = 2, k = 4, l =1", "Subsubsection", + CellChangeTimes->{{3.767441958982495*^9, + 3.767442003913947*^9}},ExpressionUUID->"22a251d4-6170-4c1a-a48d-\ +28055fc236cd"], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"4", ",", "2", ",", "16"}], "]"}]}], ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], + "]"}]}], ";"}], "\[IndentingNewLine]", + RowBox[{"For", "[", + RowBox[{ + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", + CellChangeTimes->{{3.7674420362351923`*^9, 3.767442043834205*^9}, { + 3.7674420763325677`*^9, 3.7674420974443064`*^9}, {3.769014409630559*^9, + 3.7690144134593143`*^9}, 3.7690148208626437`*^9}, + CellLabel-> + "In[285]:=",ExpressionUUID->"da50a357-49d4-47c6-84e8-e23d5c987dda"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897922`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.651029748869265`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.948155600614766`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.29867674105246`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.283185307179586`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.773748211899188`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7278804142575657`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7278804142575657`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.21892959595147748`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653590699`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8429159125373331`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.736269685841565`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.21892959595148562`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.26941796653242284`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.26941796653242284`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2831427242604823`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5256347639324687`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2831427242604818`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.053697555821586`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897505`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.053697555821586`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6911081229791372`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6911081229791392`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.7173496740076062`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.879688203815761`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.7173496740076057`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2450225972094562`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.3257737295854419`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.32577372958544326`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.9554403000666867`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.8965700563803383`", ",", "5"}], "}"}]}], "}"}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.7690166147449493`*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"bf6b2743-6a11-474b-b7f8-d52b361fec8c"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"7", ",", "1", ",", "3"}], "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.7690166147489386`*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"6cfd4140-7233-4b65-9b2f-97df450451fd"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"{", + RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.7690166147559195`*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"c0844e7b-31a6-42b5-8f02-ca0ad252c812"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.7123889803846915`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.816855147662351`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.773903685601554`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.235289201819701`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589794`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.0371264863121326`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6644928750248054`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6644928750248047`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0179473798667182`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.906303451770093`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.6079093084159088`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0179473798667205`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.4928695225069542`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.49286952250695604`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897913`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0960592711930655`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.31102998701198237`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.096059271193065`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.1566803741492493`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.15668037414925`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.27391700539096586`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897944`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.27391700539097075`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589796`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.927621869507145`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2968793214039327`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.9276218695071452`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.4081243080561106`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.16267201873878442`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897944`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.1626720187387899`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589792`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.0356932805988213`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.875060999123476`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.712388980384696`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.730952223540754`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.7524279545711545`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.187837843318253`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.712388980384689`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.1230294104337295`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6170415165233577`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6170415165233577`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.9329049606567643`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589796`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9537548102715405`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9234289012030839`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589794`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.932904960656763`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8502686343799979`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589792`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8502686343799962`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.19011167731301973`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535898078`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.0692736594501614`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897154`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.19011167731301973`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.104566845969395`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.1045668459693943`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5780937661416636`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5780937661416636`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2648363027698477`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9927025606532356`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2648363027698477`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.4513230564557515`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.11947327033915325`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.1415926535897913`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.11947327033915325`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.673208497915234`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.690269597134043`", ",", "5"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.769016614771911*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"14f91e34-081d-4bf7-ba82-ef8186edbf14"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"7", ",", "2", ",", "3"}], "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.76901661477487*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"610f210d-f066-4c61-ae4d-2ec8199d2748"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "2", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{"{", + RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.769016614776864*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"e2434990-6053-4c70-98d3-4883bd44b9bc"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.324297674078698`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.15316464909979743`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.120280487771906`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.316452582221372`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.062640748080721`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9178044888309683`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.850045941033423`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5930102707266824`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.35708312929421`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.020672590169667604`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8839679863436584`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.28440861086606645`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.2258516051258526`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.2496826019484808`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.2191303504578768`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.9051316456784293`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.514304670870944`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.814175940867257`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.294550695152459`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.8834983507849474`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7052707092216935`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.984457222097622`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.4570513755504997`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.554493686719099`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.349020263577334`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.22177606321756244`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0792696684550775`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7832405099217379`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9192667019198612`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.1091761889965825`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.427933950554309`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.5949661183118193`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.137429002828867`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.5048378561346905`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.0922137589915546`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2.3577892192447956`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.6673125964997824`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.3264068459948914`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.8827043646564454`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.570796326794896`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.3614258489375377`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.18484627962524308`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948957`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.266953892025835`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.657727107623833`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.9826793718688955`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.4173344159029106`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.27873662081906`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "\[Pi]", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.202532348196124`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8398544889535976`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.014279633071335873`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.7123889803846915`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.15335400664018106`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.444505728334`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.435869482856203`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.570796326794894`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.4065686911055333`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.087402430080827`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.422239413246927`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.399929641776418`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.484329143387078`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.714185695708634`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.09482923331831412`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.712388980384692`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.261715053514674`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.756412656301751`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.678241523619434`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.8860039903481294`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.632469549745644`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.61432370066413`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.009130177986377`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.298315490529787`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.8051539266616385`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.028792439998833`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.8512559852737285`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.5475782715707664`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.712388980384689`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.14416881131068696`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.06032656024496319`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.42244075535707815`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.829792936832482`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.558466189542015`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.36751483317170575`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.140061339019372`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.15895123759309`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.134787243378931`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.0458163243193774`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.776265381924855`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.8737432117697996`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.469939004554`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.5831326680959077`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.674812828769679`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.083427786415201`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.237069526541723`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974482`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.33372680025317325`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.534754944199727`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.119717132219801`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.639696630782196`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.489836365575634`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.579901411482197`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.3002279428517549`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.865931476201238`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.332584163646238`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.098449408494993`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.7766497768097318`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.8432689004086464`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.5502721041805247`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.6873785552208083`", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.4313711156291747`"}], ",", "0.293578512276416`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2867955311786994`"}], ",", "0.3176923036844874`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.05804652165996908`", ",", "0.2880764748713832`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7617500313671465`*^9, 3.7623353828261967`*^9, 3.7623452299371986`*^9, - 3.7629571075016623`*^9, {3.762957735701007*^9, 3.7629577432198925`*^9}, { - 3.7629584584442005`*^9, 3.7629585024933586`*^9}, {3.762958617450691*^9, - 3.7629586458327627`*^9}, 3.7629586780665283`*^9, {3.7629587842773943`*^9, - 3.7629588053759904`*^9}, 3.7629595805474186`*^9, 3.762959616690753*^9, - 3.7629597439293575`*^9, 3.762959886504181*^9, 3.762968940804912*^9, { - 3.762969000709628*^9, 3.7629690476989217`*^9}, 3.7629691907433825`*^9, - 3.762969272350065*^9, 3.762970084628153*^9}, - CellLabel-> - "Out[207]=",ExpressionUUID->"4e902d86-cff5-4c5c-be20-a0df5af7fe54"] + RowBox[{"{", + RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.241605874696052`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.5319593366465847`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.570796326794898`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "5.045783796889824`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.779614866224179`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.634973925558749`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.243226717098216`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.7381971233722515`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.7535511029730397`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7830944379258464`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.18140878481976275`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7784900593965665`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.4090430529755979`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.43625288099458`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "6.178443356884394`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.568635689524333`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.5527981554197807`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.397260996523069`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "6.04819704109487`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "1.3789434405068999`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.1375254153051846`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.2075331336175896`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.577102462523062`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.9065412037547042`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.9663639468375536`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.8217342636564564`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974484`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "6.032247370318027`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "2.2872950914382066`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.250101927712953`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.7853981633974482`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0539886419165756`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.801011242305021`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.3574346441737735`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "2.980490043967262`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.916827189982998`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.944786298196013`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.6079724783825873`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "3.800938247654976`", ",", "4"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.8965118411032549`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "5.891447342113909`", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.04662368234019`", ",", "5"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, + 3.7690166148067837`*^9}, + CellLabel-> + "During evaluation of \ +In[285]:=",ExpressionUUID->"9e624d09-8984-4945-993b-b9bcfa4c04e1"] +}, Open ]] +}, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[BoxData[ - RowBox[{"result", " ", "=", " ", +Cell["Example 3(not reuse qubits) n=2, m=1, k=1, l=1", "Subsubsection", + CellChangeTimes->{{3.7674426067759476`*^9, + 3.7674426529214177`*^9}},ExpressionUUID->"d11717aa-aab0-4786-b0f7-\ +16a918b8135b"], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"result", " ", "=", " ", + RowBox[{"MeasuredQCM", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", + RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{"For", "[", RowBox[{ - RowBox[{"MeasuredQCM", "[", "krausList", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.7617496464813423`*^9, 3.761749675950652*^9}, { - 3.7623452627215776`*^9, 3.762345278926222*^9}, 3.7629584878555183`*^9, { - 3.7629692794650307`*^9, 3.7629692802559147`*^9}}, + RowBox[{"i", "=", "1"}], ",", + RowBox[{"i", "\[LessEqual]", + RowBox[{"Length", "[", "result", "]"}]}], ",", + RowBox[{"i", "++"}], ",", + RowBox[{"Print", "[", + RowBox[{"result", "[", + RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", + CellChangeTimes->{{3.7674426597487755`*^9, 3.767442677508273*^9}, + 3.767442794513642*^9, {3.769014914028371*^9, 3.7690149161387243`*^9}}, CellLabel-> - "In[208]:=",ExpressionUUID->"41ec07a0-d058-43fd-849e-7267184e40fa"], + "In[275]:=",ExpressionUUID->"d36c163e-c658-4479-bd58-b6d075e4b29e"], + +Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"{", - RowBox[{ + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.7256982575596331`"}], ",", - RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", + RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}], ",", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], - "}"}], ",", + RowBox[{"3", ",", "2.3561944901923444`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.0038814802033937`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}], "}"}], ",", + RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.003881480203395`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.3136149946325575`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589803`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.31361499463255604`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.855426671867701`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], + "}"}]], "Print", + CellChangeTimes->{3.769014326281565*^9, 3.7690149178451877`*^9}, + CellLabel-> + "During evaluation of \ +In[275]:=",ExpressionUUID->"291e2fdc-54da-4322-9bb5-161af318e6fb"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", + CellChangeTimes->{3.769014326281565*^9, 3.7690149178491483`*^9}, + CellLabel-> + "During evaluation of \ +In[275]:=",ExpressionUUID->"768a44cc-9175-41b2-88c1-12945e364234"], + +Cell[BoxData[ + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", - RowBox[{"0.7013856395392531`", ",", - RowBox[{"-", "0.1539614363039084`"}]}], "}"}], ",", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "2.3339725375910074`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "0.7619628681628114`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "\[Pi]", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.8766028579634924`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "5.4324570250635995`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5030630273603551`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.5989407533816453`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "1.5707963267948972`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", "0.6816663834643358`"}], "}"}], ",", + RowBox[{"1", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.7127820035944462`", ",", "0.15149981329753096`"}], "}"}], - ",", + RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.6990526620768311`"}]}], "}"}]}], "}"}], ",", + RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}], + ",", RowBox[{"{", RowBox[{ RowBox[{"{", - RowBox[{"0.5838819631992359`", ",", "0.13705251282363012`"}], "}"}], - ",", + RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.032493898713202`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "1.7696843973597192`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "0.9619090728816282`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"1", ",", "4.712388980384691`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", "0.5587169950334525`"}], "}"}], ",", + RowBox[{"2", ",", "1.1245322987871447`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.8118385634167706`", ",", - RowBox[{"-", "0.09856946178075165`"}]}], "}"}], ",", + RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", "0.8119950673457139`"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7617496618272924`*^9, 3.761749676467271*^9}, - 3.7623353848847647`*^9, {3.7623452529476767`*^9, 3.7623452795106583`*^9}, { - 3.7629571090116224`*^9, 3.7629571268748364`*^9}, {3.762958460111739*^9, - 3.7629585042386894`*^9}, 3.7629586214629574`*^9, 3.762958683574794*^9, { - 3.7629587867318573`*^9, 3.762958807654894*^9}, 3.7629595826707106`*^9, - 3.7629596185787015`*^9, 3.762959745807334*^9, 3.762959887705967*^9, - 3.762968941753374*^9, {3.7629690021986465`*^9, 3.7629690484319596`*^9}, - 3.7629691917756214`*^9, {3.76296927448635*^9, 3.76296928135697*^9}, - 3.7629700862129126`*^9}, + RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.6480505023652552`", ",", "3"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "3.342184722027676`", ",", "3"}], "}"}]}], "}"}]}], + "}"}]}], "}"}]], "Print", + CellChangeTimes->{3.769014326281565*^9, 3.769014917855132*^9}, CellLabel-> - "Out[208]=",ExpressionUUID->"a0522204-1ad4-4a85-adb6-f1322c219741"] -}, Open ]], + "During evaluation of \ +In[275]:=",ExpressionUUID->"c5580d21-837e-48f9-a42f-25c58b7d0308"] +}, Open ]] +}, Open ]] +}, Open ]] +}, Closed]], Cell[CellGroupData[{ -Cell[BoxData[ - RowBox[{"result", "[", - RowBox[{"[", "2", "]"}], "]"}]], "Input", - CellChangeTimes->{{3.7629587190588655`*^9, 3.762958749710843*^9}, { - 3.762969305356764*^9, 3.7629693054963913`*^9}}, - CellLabel-> - "In[209]:=",ExpressionUUID->"3d0c5e51-f455-46e4-82c9-33de2d223ca1"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.7013856395392531`", ",", - RowBox[{"-", "0.1539614363039084`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.6816663834643358`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.7127820035944462`", ",", "0.15149981329753096`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.6990526620768311`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.5838819631992359`", ",", "0.13705251282363012`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.5587169950334525`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.8118385634167706`", ",", - RowBox[{"-", "0.09856946178075165`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.8119950673457139`"}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.762958722666036*^9, 3.7629587501446805`*^9}, - 3.7629588095478296`*^9, 3.7629689428753967`*^9, 3.762969003269779*^9, - 3.762969049166993*^9, {3.7629692871734085`*^9, 3.7629693059452677`*^9}, - 3.7629700872092466`*^9}, - CellLabel-> - "Out[209]=",ExpressionUUID->"a58e58d5-26d0-4577-bafe-563c3fd33d97"] -}, Open ]], - -Cell["4 q matrices :", "Text", - CellChangeTimes->{{3.7617499275138626`*^9, - 3.7617499416151423`*^9}},ExpressionUUID->"aaf22bd3-28b0-4a45-86a2-\ -95feae5ae1e0"], +Cell["Test Recursive decomposition", "Subsection", + CellChangeTimes->{{3.7665986471231785`*^9, + 3.7665986617740135`*^9}},ExpressionUUID->"cc11ec87-d371-4360-a100-\ +5230d6d0b2d8"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{"2", ",", "2", ",", "4"}], "]"}]}], ";", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<", "5"}], ",", + RowBox[{"i", "\[LessEqual]", " ", + RowBox[{"Length", "[", "krausList", "]"}]}], ",", RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"result", "[", - RowBox[{"[", - RowBox[{"1", ",", "i"}], "]"}], "]"}], "//", "MatrixForm"}], " ", - "]"}]}], "]"}], ";"}]], "Input", - CellChangeTimes->{{3.7617496827753987`*^9, 3.7617497914947033`*^9}}, + RowBox[{ + RowBox[{"Print", "[", + RowBox[{ + RowBox[{"krausList", "[", + RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], + "]"}]}]], "Input", + CellChangeTimes->{{3.7689941204395776`*^9, 3.768994121366068*^9}, { + 3.7689984275707397`*^9, 3.768998440911021*^9}, {3.768998866108413*^9, + 3.7689988677420087`*^9}, {3.768999640014763*^9, 3.76899968428529*^9}}, CellLabel-> - "In[119]:=",ExpressionUUID->"f12c1f99-0fc0-4a0a-91db-21806a8c4ec3"], + "In[200]:=",ExpressionUUID->"1ccefe4d-94ea-4aa3-98c1-3d4d6ff6ffc1"], Cell[CellGroupData[{ Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.9003286144077534`"}], "0.43521073754977`"}, - {"0.43521073754977`", "0.9003286144077535`"} + {"0.4327552472352544`", "0.1943386412407394`"}, + {"0.033956392243256736`", "0.12420766400950808`"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, @@ -604,21 +5435,24 @@ Cell[BoxData[ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, - 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, - 3.762958463068856*^9, 3.7629597516272755`*^9}, + CellChangeTimes->{ + 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, + 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, + 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, + 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, + 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { + 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { + 3.76899964080263*^9, 3.768999684977438*^9}}, CellLabel-> "During evaluation of \ -In[119]:=",ExpressionUUID->"3e7e1e24-6077-431a-9e3f-d80b646c3891"], +In[200]:=",ExpressionUUID->"76df781c-e9b6-4b1f-ab5b-6707630e20e8"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ + {"0.5055951663090607`", "0.030975409518328084`"}, { - RowBox[{"-", "0.8503187897479074`"}], - RowBox[{"-", "0.5262679505742809`"}]}, - { - RowBox[{"-", "0.5262679505742809`"}], "0.8503187897479075`"} + RowBox[{"-", "0.3716970155404267`"}], "0.8272508586435787`"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, @@ -632,19 +5466,24 @@ Cell[BoxData[ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, - 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, - 3.762958463068856*^9, 3.762959751633259*^9}, + CellChangeTimes->{ + 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, + 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, + 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, + 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, + 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { + 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { + 3.76899964080263*^9, 3.7689996849834213`*^9}}, CellLabel-> "During evaluation of \ -In[119]:=",ExpressionUUID->"f90f9ada-5b2d-4a9b-8461-c6048dbe7f2c"], +In[200]:=",ExpressionUUID->"95ecc6c8-ed45-4146-96e8-42fb7b6612ed"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { - RowBox[{"-", "0.8800126962950792`"}], "0.4749501598688693`"}, - {"0.4749501598688693`", "0.8800126962950793`"} + RowBox[{"-", "0.07230843755956334`"}], "0.2457012293140841`"}, + {"0.510811136458537`", "0.10487406953092518`"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, @@ -658,21 +5497,23 @@ Cell[BoxData[ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, - 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, - 3.762958463068856*^9, 3.7629597516402407`*^9}, + CellChangeTimes->{ + 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, + 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, + 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, + 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, + 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { + 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { + 3.76899964080263*^9, 3.7689996849904027`*^9}}, CellLabel-> "During evaluation of \ -In[119]:=",ExpressionUUID->"a8ef8baf-3e3b-4b0f-a7eb-990e3a6ed268"], +In[200]:=",ExpressionUUID->"b178205a-7591-4fdd-8347-666cf2e80a54"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.27489473902626704`"}], - RowBox[{"-", "0.9614743275073342`"}]}, - { - RowBox[{"-", "0.9614743275073342`"}], "0.27489473902626704`"} + {"0.11780979955906214`", "0.1953165588998851`"}, + {"0.37114557752304567`", "0.3898528784986921`"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, @@ -686,183 +5527,146 @@ Cell[BoxData[ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.7617497685430083`*^9, 3.7617497921040735`*^9}, - 3.7623353875954742`*^9, {3.762957113088715*^9, 3.7629571294030724`*^9}, - 3.762958463068856*^9, 3.7629597516432323`*^9}, - CellLabel-> - "During evaluation of \ -In[119]:=",ExpressionUUID->"25592c01-a5d7-4849-8a18-871e89fc8673"] -}, Open ]] -}, Open ]], - -Cell[BoxData["\[AliasDelimiter]"], "Input", CellChangeTimes->{ - 3.762957447924599*^9},ExpressionUUID->"78a57f7a-85b2-49f0-ab0d-\ -801153560001"], - -Cell["2 * 4 r matrices:", "Text", - CellChangeTimes->{{3.7617498938100176`*^9, - 3.761749959734758*^9}},ExpressionUUID->"c5e85b62-0b60-4ac8-b9c4-\ -849a700c3216"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<", "3"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", - RowBox[{"2", ",", "i"}], "]"}], "]"}], "]"}]}], "]"}], ";"}]], "Input", - CellChangeTimes->{{3.7617498175200596`*^9, 3.76174986261845*^9}}, - CellLabel->"In[9]:=",ExpressionUUID->"1a5fc7bc-be81-4b3e-99c8-9d7766eabcf4"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6487064040145105`"}], ",", - RowBox[{"-", "0.38319158446372736`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.39918280383512017`"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.7610387647095008`", ",", - RowBox[{"-", "0.32663097641415595`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.766243762757809`"}]}], "}"}]}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{{3.7617498188983727`*^9, 3.7617498633844037`*^9}, - 3.7623353899900436`*^9}, - CellLabel-> - "During evaluation of \ -In[9]:=",ExpressionUUID->"3846fa17-e029-4f34-a9ea-21f703b7627c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.855316564561603`", ",", "0.23109538778738808`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.7262256176665085`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.5181057559866878`", ",", - RowBox[{"-", "0.38150456906604785`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.5231114009176483`"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.6988137212216664`", ",", - RowBox[{"-", "0.5633448986815061`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.5644650201051727`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.7153036998592467`", ",", "0.5503580438019973`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.24724034830429556`"}]}], "}"}]}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{{3.7617498188983727`*^9, 3.7617498633844037`*^9}, - 3.7623353899960275`*^9}, + 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, + 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, + 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, + 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, + 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { + 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { + 3.76899964080263*^9, 3.7689996849923973`*^9}}, CellLabel-> "During evaluation of \ -In[9]:=",ExpressionUUID->"fdcda5a9-d18b-42f2-ad51-fd056dc2adc7"] +In[200]:=",ExpressionUUID->"c0221ebc-23f4-455a-967f-e7a7bc662436"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ - RowBox[{"v", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}]], "Input", + RowBox[{"DecChannelRecursively", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]], "Input", + CellChangeTimes->{{3.7666006942818375`*^9, 3.766600710879007*^9}, { + 3.766601809672996*^9, 3.766601822471787*^9}, {3.7666019584163675`*^9, + 3.7666019960637255`*^9}, {3.766602164577238*^9, 3.766602165775036*^9}, { + 3.766602448114402*^9, 3.766602504912565*^9}, {3.7666025718655825`*^9, + 3.7666025750081797`*^9}, {3.768993911256152*^9, 3.768993938398531*^9}}, CellLabel-> - "In[216]:=",ExpressionUUID->"63ea91d8-da59-4d3c-a17e-9bfbe009b486"], + "In[201]:=",ExpressionUUID->"dc27bfc0-a1bc-48a9-93ef-7f16b63cbd21"], Cell[BoxData[ RowBox[{"{", RowBox[{ - RowBox[{"{", - RowBox[{"0.18396889024069`", ",", "0.3566138746439067`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.3986546917168834`", ",", "0.22281326960585973`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.12323336447825374`", ",", "0.12935302033661175`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2260943534345638`"}], ",", "0.22841668098803036`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.37665754188567346`", ",", "0.1825987305520381`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.26686809932469824`"}], ",", "0.17218233146244227`"}], - "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.18358347747372472`"}], ",", "0.23893082658999515`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.14411921088914306`", ",", "0.2875371513492605`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.01886247381017142`", ",", "0.017810794040872144`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.29708201792338906`", ",", "0.13436770545221965`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.16332384112066298`", ",", "0.15462336292517292`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.21468468458051249`"}], ",", "0.34281875363133246`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.20070429749097596`", ",", "0.34872627859902855`"}], "}"}], ",", + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "1", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"2", ",", "1.2041803315424144`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], + "}"}], ",", + RowBox[{"{", + RowBox[{"100", ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", "}"}], ",", + RowBox[{"{", "}"}], ",", + RowBox[{"{", "1", "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"{", + RowBox[{"2", ",", "1.6863264679163665`", ",", "1"}], "}"}], "}"}], + ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"2", ",", "0.7125443944608612`", ",", "1"}], "}"}], ",", + RowBox[{"{", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], + "}"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.4313711156291747`"}], ",", "0.293578512276416`"}], "}"}], - ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.7017303421332263`"}], ",", "0.0906239716713129`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.1478450294045026`"}], ",", + RowBox[{"-", "0.08870478607712337`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6528776058810655`"}], ",", "0.2782998293211451`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.2438589878371821`"}], ",", + RowBox[{"-", "0.9520861104361045`"}]}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.2867955311786994`"}], ",", "0.3176923036844874`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.05804652165996908`", ",", "0.2880764748713832`"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7629708184113584`*^9}, + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.10654645391845971`"}], ",", "0.6979946052444087`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.643298983732884`"}], ",", + RowBox[{"-", "0.5816622647649508`"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.27815720228484475`"}], ",", "0.2702177489035383`"}], + "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.7052962792349808`"}], ",", "0.3185198721833761`"}], + "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", + CellChangeTimes->{{3.766601682727855*^9, 3.766601698836791*^9}, + 3.766601735060951*^9, {3.766601778148257*^9, 3.766601793143185*^9}, + 3.766601830213091*^9, {3.7666019475155096`*^9, 3.7666020009277945`*^9}, + 3.766602077766311*^9, {3.7666021663465085`*^9, 3.7666021892692275`*^9}, { + 3.7666022304686003`*^9, 3.766602234386134*^9}, 3.7666023061373205`*^9, { + 3.7666023902370396`*^9, 3.766602406562483*^9}, {3.766602439237132*^9, + 3.7666024856520534`*^9}, 3.7666025332897077`*^9, {3.7666025683519754`*^9, + 3.76660257576017*^9}, {3.766602620434742*^9, 3.7666026884279947`*^9}, + 3.7689934179129066`*^9, 3.7689935111737633`*^9, 3.768993587382861*^9, { + 3.7689936201112947`*^9, 3.7689936480020213`*^9}, 3.7689936791596565`*^9, + 3.7689937544074783`*^9, {3.7689939125407143`*^9, 3.7689939396122837`*^9}, + 3.7689941237965965`*^9, {3.768999660144906*^9, 3.7689996870449057`*^9}}, CellLabel-> - "Out[216]=",ExpressionUUID->"d243c2c7-f5ab-416c-bcc5-427594a58e0a"] + "Out[201]=",ExpressionUUID->"71e10840-d192-421e-bd36-8f4efa5598a4"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ - RowBox[{ - RowBox[{"{", - RowBox[{"r1", ",", "q1", ",", "r2", ",", "q2"}], "}"}], " ", "=", " ", - RowBox[{"QRSplit", "[", "v", "]"}]}]], "Input", - CellChangeTimes->{{3.7629708292842712`*^9, 3.7629708576693335`*^9}}, + RowBox[{"DecChannelRecursively", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], + "]"}]], "Input", + CellChangeTimes->{{3.7689939974007454`*^9, 3.768993999879114*^9}}, CellLabel-> - "In[218]:=",ExpressionUUID->"2c15d24a-8cc2-4656-b55c-6748a23d0a1b"], + "In[202]:=",ExpressionUUID->"6989921b-b79a-4eed-98fb-39aa78f5b7f7"], Cell[BoxData[ RowBox[{"{", @@ -870,145 +5674,86 @@ Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.7256982575596331`"}], ",", - RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", + RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ + RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.25350603825250695`"}], ",", "0.4800253756663065`"}], - "}"}], ",", + RowBox[{"3", ",", "5.497787143782137`", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.5493394638392453`"}], ",", "0.18310960618617414`"}], - "}"}], ",", + RowBox[{"2", ",", "2.7702317579835127`", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.16981350471015458`"}], ",", "0.15085363848712216`"}], - "}"}], ",", + RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.31155421840872316`", ",", "0.4490688953914218`"}], "}"}], - ",", + RowBox[{"0", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.5190277611417886`"}], ",", "0.12949346565535347`"}], - "}"}], ",", + RowBox[{"2", ",", "2.7702317579835127`", ",", "1"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.36773975484262306`", ",", "0.3782172769920468`"}], "}"}], - ",", + RowBox[{"2", ",", "1.112060349883618`", ",", "2"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.25297494593837994`", ",", "0.44795192007006207`"}], "}"}], - ",", + RowBox[{"3", ",", "3.1415926535897936`", ",", "2"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.1985938499753119`"}], ",", "0.38877889452582526`"}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ + RowBox[{"0", ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], - "}"}], ",", + RowBox[{"2", ",", "1.1120603498836183`", ",", "2"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}], ",", + RowBox[{"2", ",", "1.4056156326988132`", ",", "1"}], "}"}]}], "}"}], + ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ - RowBox[{"-", "0.027415863952459096`"}], ",", - RowBox[{"-", "0.03268332608427621`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.43179703087076776`"}], ",", - RowBox[{"-", "0.31023292837461836`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.567153401842887`"}], ",", + RowBox[{"-", "0.4230546017831959`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.04450202163488772`"}], ",", + RowBox[{"-", "0.16657209208932444`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.23738478067190708`"}], ",", - RowBox[{"-", "0.2835616661743438`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.31203574697408293`", ",", - RowBox[{"-", "0.3914437170719313`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6626147698022501`"}], ",", + RowBox[{"-", "0.254247183074034`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.4871326879694686`", ",", + RowBox[{"-", "0.8536023148668035`"}]}], "}"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ RowBox[{"{", RowBox[{ - RowBox[{"-", "0.2917158040913648`"}], ",", - RowBox[{"-", "0.5705687837950306`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.6269809537247787`", ",", - RowBox[{"-", "0.23340832644012668`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.4168460268837344`", ",", - RowBox[{"-", "0.32662056513665033`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.11186975926120546`"}], ",", + RowBox[{"-", "0.6971612243633005`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.7902856263003505`", ",", "0.35722990018518275`"}], "}"}]}], + "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.08436833666457018`"}], ",", - RowBox[{"-", "0.42701610124960343`"}]}], "}"}]}], "}"}]}], + RowBox[{"{", + RowBox[{"0.18226578197636742`", ",", + RowBox[{"-", "0.34229847461823576`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.5742063832338036`", ",", + RowBox[{"-", "0.5188302033729114`"}]}], "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.762970829943507*^9, 3.76297085793263*^9}}, - CellLabel-> - "Out[218]=",ExpressionUUID->"d3836d4a-2f4f-49a1-b860-161cf9a7f423"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Join", "[", - RowBox[{"r1", ",", "r2"}], "]"}]], "Input", - CellChangeTimes->{{3.762970863306254*^9, 3.762970903118661*^9}}, - CellLabel-> - "In[223]:=",ExpressionUUID->"a02398fa-3040-4eaf-9b33-4298b5ea9e0a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.7256982575596331`"}], ",", - RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7629708640652237`*^9, 3.7629709097219915`*^9}}, - CellLabel-> - "Out[223]=",ExpressionUUID->"abb61450-0781-4545-a5fb-54dd94d788f8"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"{", - RowBox[{"e2k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Dimensions", "[", "krausList", "]"}]}]], "Input", - CellChangeTimes->{{3.7629709518300457`*^9, 3.762970957021158*^9}}, - CellLabel-> - "In[226]:=",ExpressionUUID->"914d1fd5-33d3-4683-bccd-3bd709dc62e5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "4", ",", "2"}], "}"}]], "Output", - CellChangeTimes->{3.7629709655832844`*^9}, + CellChangeTimes->{3.768994001221526*^9, 3.768994037121497*^9, + 3.768994125810212*^9, 3.7689996887563562`*^9}, CellLabel-> - "Out[226]=",ExpressionUUID->"a61baa0a-02b1-42ac-88ad-cda93b2f46c7"] + "Out[202]=",ExpressionUUID->"1752710a-4436-4a13-89b2-8e886d935de0"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "n"}], "]"}]], "Input", - CellChangeTimes->{{3.7629709604460273`*^9, 3.762970988462077*^9}}, + RowBox[{"DecChannelRecursively", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]], "Input", + CellChangeTimes->{{3.7689939719458513`*^9, 3.7689939752869363`*^9}}, CellLabel-> - "In[227]:=",ExpressionUUID->"26b6d862-05cf-4d43-a5db-3840b74d0c75"], + "In[203]:=",ExpressionUUID->"d2e53e16-623a-4706-9dae-5f482fc10bbf"], Cell[BoxData[ RowBox[{"{", @@ -1017,80 +5762,180 @@ Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ - RowBox[{"-", "0.25350603825250695`"}], ",", "0.4800253756663065`"}], + RowBox[{"-", "0.7630303297645324`"}], ",", "0.26670885690840035`"}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.5493394638392453`"}], ",", "0.18310960618617414`"}], - "}"}], ",", + RowBox[{"0.`", ",", + RowBox[{"-", "0.8169240454570893`"}]}], "}"}], ",", RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.16981350471015458`"}], ",", "0.15085363848712216`"}], - "}"}], ",", + RowBox[{"0.6463626813635122`", ",", "0.3148494690452071`"}], "}"}], ",", RowBox[{"{", - RowBox[{"0.31155421840872316`", ",", "0.4490688953914218`"}], "}"}]}], - "}"}], ",", + RowBox[{"0.`", ",", + RowBox[{"-", "0.4029532248817336`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ - RowBox[{"-", "0.5190277611417886`"}], ",", "0.12949346565535347`"}], - "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.567153401842887`"}], ",", + RowBox[{"-", "0.4230546017831959`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.04450202163488772`"}], ",", + RowBox[{"-", "0.16657209208932444`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", - RowBox[{"0.36773975484262306`", ",", "0.3782172769920468`"}], "}"}], - ",", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.6626147698022501`"}], ",", + RowBox[{"-", "0.254247183074034`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.4871326879694686`", ",", + RowBox[{"-", "0.8536023148668035`"}]}], "}"}]}], "}"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ RowBox[{"{", - RowBox[{"0.25297494593837994`", ",", "0.44795192007006207`"}], "}"}], - ",", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "0.11186975926120546`"}], ",", + RowBox[{"-", "0.6971612243633005`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.7902856263003505`", ",", "0.35722990018518275`"}], "}"}]}], + "}"}], ",", RowBox[{"{", RowBox[{ - RowBox[{"-", "0.1985938499753119`"}], ",", "0.38877889452582526`"}], - "}"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.7629709891402645`*^9}, + RowBox[{"{", + RowBox[{"0.18226578197636742`", ",", + RowBox[{"-", "0.34229847461823576`"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{"0.5742063832338036`", ",", + RowBox[{"-", "0.5188302033729114`"}]}], "}"}]}], "}"}]}], "}"}]}], + "}"}]], "Output", + CellChangeTimes->{3.7689939759331827`*^9, 3.7689940384060335`*^9, + 3.7689941340391617`*^9, 3.7689984471981993`*^9, 3.7689988730468435`*^9, + 3.768999689987034*^9}, CellLabel-> - "Out[227]=",ExpressionUUID->"79c0b39d-a49f-468e-9fa8-19caf013e933"] + "Out[203]=",ExpressionUUID->"e730bc81-8feb-40a6-a3cc-2b9e53d599d7"] }, Open ]], -Cell[CellGroupData[{ - Cell[BoxData[ RowBox[{ - RowBox[{"DecChannelRecursively", "[", "krausList", "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}]], "Input", - CellChangeTimes->{{3.762971123235526*^9, 3.7629711744156065`*^9}}, - CellLabel-> - "In[234]:=",ExpressionUUID->"1652a19b-aa2c-45e5-bbdf-20be341e7c21"], - -Cell[BoxData[ - RowBox[{"{", RowBox[{ - RowBox[{"{", + RowBox[{"TestDecChannelRecursively", "[", "]"}], ":=", + "\[IndentingNewLine]", + RowBox[{"Module", "[", RowBox[{ - RowBox[{"-", "0.7256982575596331`"}], ",", - RowBox[{"-", "0.19172072072316304`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.6416567329485914`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6880131095952406`"}], ",", "0.20222200860202788`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.7145810391719699`"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7629711305788813`*^9, 3.7629711750718513`*^9}}, + RowBox[{"{", + RowBox[{"m", ",", "n", ",", "k", ",", "r", ",", "q1", ",", "q2"}], + "}"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"m", "=", + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{"1", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"n", "=", + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{"1", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"k", " ", "=", " ", + RowBox[{"RandomInteger", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"Max", "[", + RowBox[{ + RowBox[{"m", "-", "n"}], ",", "1"}], "]"}], ",", "4"}], "}"}], + "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"m", "=", "4"}], ";", + RowBox[{"n", "=", "2"}], ";", + RowBox[{"k", "=", "2"}], ";", "\[IndentingNewLine]", + RowBox[{"krausList", " ", "=", " ", + RowBox[{"RPickRandomChannel", "[", + RowBox[{ + RowBox[{"2", "^", "m"}], ",", + RowBox[{"2", "^", "n"}], ",", + RowBox[{"4", "^", "k"}]}], "]"}]}], ";", "\[IndentingNewLine]", + "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{ + RowBox[{"Test", " ", "for", " ", "DecomposeIso"}], "\[Rule]", + "\"\\""}], "*)"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"r", ",", "q1", ",", "q2"}], "}"}], "=", + RowBox[{"DecChannelRecursively", "[", + RowBox[{"krausList", ",", " ", + RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]}], + ";", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"{", + RowBox[{"q1", ",", "q2"}], "}"}], " ", "=", " ", + RowBox[{"{", + RowBox[{ + RowBox[{"Flatten", "[", + RowBox[{"q1", ",", "1"}], "]"}], ",", + RowBox[{"Flatten", "[", + RowBox[{"q2", ",", "1"}], "]"}]}], "}"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"isZeroMatrix", "[", + RowBox[{ + RowBox[{ + RowBox[{"ArrayFlatten", "[", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"q1", ",", "0"}], "}"}], ",", + RowBox[{"{", + RowBox[{"0", ",", "q2"}], "}"}]}], "}"}], "]"}], ".", "r"}], + " ", "-", " ", + RowBox[{"Flatten", "[", + RowBox[{"krausList", ",", "1"}], "]"}]}], "]"}], ",", + "\[IndentingNewLine]", ",", "\[IndentingNewLine]", + RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", + "\[IndentingNewLine]", "\[IndentingNewLine]", + RowBox[{"(*", " ", + RowBox[{"return", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", + RowBox[{"If", "[", "\[IndentingNewLine]", + RowBox[{"result", ",", "\[IndentingNewLine]", + RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", + RowBox[{ + RowBox[{"Print", "[", "\"\\"", "]"}], ";", + " ", + RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", + "]"}]}]}], "\[IndentingNewLine]", "]"}]}], + "\[IndentingNewLine]"}]], "Input", + CellChangeTimes->{{3.768994466423875*^9, 3.7689945115986624`*^9}, { + 3.7689974747871113`*^9, 3.7689974954169717`*^9}, {3.7689975356642604`*^9, + 3.768997556957325*^9}, {3.768997594121874*^9, 3.768997594410082*^9}, { + 3.7689976841130753`*^9, 3.7689977384866214`*^9}, {3.7689977742279916`*^9, + 3.7689977966989617`*^9}, {3.768997847904957*^9, 3.7689980222169476`*^9}, { + 3.7689980582974052`*^9, 3.7689981824731655`*^9}, {3.768998231007315*^9, + 3.7689982515214295`*^9}, {3.768998298863761*^9, 3.7689982990153275`*^9}, { + 3.768998408552254*^9, 3.7689984097271357`*^9}, {3.768998883332326*^9, + 3.7689989088530416`*^9}, {3.768999711222218*^9, 3.76899975835335*^9}}, CellLabel-> - "Out[234]=",ExpressionUUID->"eb910894-c84f-4920-a9ce-9e5e01e78cad"] -}, Open ]], + "In[211]:=",ExpressionUUID->"494b24e5-51a1-412f-bce0-419a663c9911"], + +Cell[CellGroupData[{ -Cell["What is the cost of flatten and partition", "Section", - CellChangeTimes->{{3.762970185052496*^9, - 3.7629702011584053`*^9}},ExpressionUUID->"634da45f-756d-47a0-ab2d-\ -9e5d4f23c146"], +Cell[BoxData[ + RowBox[{"TestDecChannelRecursively", "[", "]"}]], "Input", + CellChangeTimes->{{3.7689984019858227`*^9, 3.768998402487481*^9}, { + 3.768998913804822*^9, 3.768998924127204*^9}}, + CellLabel-> + "In[210]:=",ExpressionUUID->"e0efbda9-1065-426e-91bf-5e07fc7dc84b"], -Cell["Do we require that the number of kraus operators is 2^k", "Section", - CellChangeTimes->{{3.762971477225597*^9, 3.7629714923800554`*^9}, - 3.7629717827452574`*^9},ExpressionUUID->"ba5d60e7-52ab-4904-8eb9-\ -b41c0caa2bc1"] +Cell[BoxData["True"], "Output", + CellChangeTimes->{{3.768998900163292*^9, 3.768998927372521*^9}, { + 3.7689996974460773`*^9, 3.7689997032216244`*^9}, 3.7689997551948185`*^9}, + CellLabel-> + "Out[210]=",ExpressionUUID->"d43ef657-399b-4906-8645-46603d19ce03"] +}, Open ]] +}, Closed]] +}, Open ]] }, WindowSize->{958, 988}, WindowMargins->{{Automatic, -4}, {Automatic, 0}}, @@ -1109,71 +5954,214 @@ CellTagsIndex->{} (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ -Cell[580, 22, 289, 5, 28, "Input",ExpressionUUID->"92422b64-8977-4de9-a861-4e51815262eb"], -Cell[872, 29, 449, 6, 32, "Output",ExpressionUUID->"c35e3d44-9bfe-43f6-ba69-19f57ba42b4e"] +Cell[580, 22, 507, 9, 28, "Input",ExpressionUUID->"146c2df9-6b11-4cd7-8f49-23585d3617b5"], +Cell[1090, 33, 342, 5, 32, "Output",ExpressionUUID->"53500a27-c22e-4791-a772-9717e2a24c29"] +}, Open ]], +Cell[CellGroupData[{ +Cell[1469, 43, 404, 9, 28, "Input",ExpressionUUID->"c7b79881-36f6-45ea-8e5a-d369c93caba8"], +Cell[1876, 54, 535, 7, 32, "Output",ExpressionUUID->"51542b02-8d5d-45c1-b473-3be58efc088f"] +}, Open ]], +Cell[2426, 64, 740, 14, 48, "Input",ExpressionUUID->"c18f187d-e07f-46c7-b748-3ead076c47bd"], +Cell[CellGroupData[{ +Cell[3191, 82, 156, 2, 28, "Input",ExpressionUUID->"2212a215-9499-4930-918e-e48f2ca07e83"], +Cell[CellGroupData[{ +Cell[3372, 88, 270, 5, 22, "Print",ExpressionUUID->"54cdea01-1dd0-4bca-bb6c-3b93b3124c51"], +Cell[3645, 95, 257, 5, 22, "Print",ExpressionUUID->"56826109-81db-4c58-bf26-5f776793c1d0"], +Cell[3905, 102, 265, 5, 22, "Print",ExpressionUUID->"60f607f0-925b-45e0-8728-b11cd497353c"], +Cell[4173, 109, 295, 6, 22, "Print",ExpressionUUID->"3fe111e0-f431-45e7-bee6-ac3de95c536c"], +Cell[4471, 117, 287, 6, 22, "Print",ExpressionUUID->"75000055-0cfe-44da-a136-f3d5b4aef264"], +Cell[4761, 125, 259, 5, 22, "Print",ExpressionUUID->"211fc8ec-89d1-4143-892d-bad4dc8a6b9d"], +Cell[5023, 132, 267, 5, 22, "Print",ExpressionUUID->"b2a2599b-fcd4-4777-9e2a-d7dc0a37d82d"], +Cell[5293, 139, 258, 5, 22, "Print",ExpressionUUID->"120f6dcd-c07c-4d71-afc9-0a447bf12e7b"], +Cell[5554, 146, 266, 5, 22, "Print",ExpressionUUID->"70d0e901-d1a1-4f98-b6a7-418e0ec725a5"], +Cell[5823, 153, 257, 5, 22, "Print",ExpressionUUID->"6c0e1dee-03fb-4222-8e12-9b4bfded53c7"], +Cell[6083, 160, 271, 5, 22, "Print",ExpressionUUID->"ba2f1ae3-9c0c-42f7-9ed4-3c64e231f2c7"], +Cell[6357, 167, 260, 5, 22, "Print",ExpressionUUID->"4a408491-90c2-4a69-8cef-c576a968475f"], +Cell[6620, 174, 286, 6, 22, "Print",ExpressionUUID->"7e26b9c5-62ed-4845-9153-aaaeb995873a"], +Cell[6909, 182, 268, 5, 22, "Print",ExpressionUUID->"6a63bc70-4ac1-411f-8991-f4d968248258"], +Cell[7180, 189, 286, 6, 22, "Print",ExpressionUUID->"034b5d03-e9b0-4548-96d6-beb0f0e38afd"], +Cell[7469, 197, 266, 5, 22, "Print",ExpressionUUID->"c59add0c-cd4c-4c3b-9b94-617e3ab34a3a"] +}, Open ]] +}, Open ]], +Cell[7762, 206, 1369, 36, 105, "Input",ExpressionUUID->"4dff3dd5-51f5-49b9-897e-4c02e8f7b3c5"], +Cell[CellGroupData[{ +Cell[9156, 246, 156, 3, 67, "Section",ExpressionUUID->"c2372715-452d-4c7f-bbcc-3772470f6bd3"], +Cell[9315, 251, 5616, 115, 200, "Input",ExpressionUUID->"55f763f1-1536-4b4a-84bc-20c83739561e"], +Cell[14934, 368, 12315, 262, 884, "Input",ExpressionUUID->"c762e94d-1812-4ecd-b180-e44e618b1fde"], +Cell[27252, 632, 1833, 40, 387, "Input",ExpressionUUID->"b88a9287-3e20-41af-ac35-e426ea9f7706"], +Cell[29088, 674, 14251, 306, 1150, "Input",ExpressionUUID->"24986737-5337-49bd-afcb-fe344c8d98f8"], +Cell[43342, 982, 26868, 564, 1967, "Input",ExpressionUUID->"b3753863-602f-43a6-addd-8958fa819ca4"] +}, Open ]], +Cell[CellGroupData[{ +Cell[70247, 1551, 152, 3, 67, "Section",ExpressionUUID->"ab5407d3-9e8a-48ac-9144-fd589f8d19ac"], +Cell[CellGroupData[{ +Cell[70424, 1558, 229, 4, 53, "Subsection",ExpressionUUID->"e01b2ca7-8a75-45f2-87f6-a438e8178b52"], +Cell[70656, 1564, 3753, 84, 567, "Input",ExpressionUUID->"99ad6fee-8738-44c6-b736-17148c858be1"], +Cell[CellGroupData[{ +Cell[74434, 1652, 212, 3, 26, "Input",ExpressionUUID->"53d0b155-a0a4-4e28-8eb7-49537ab5e794"], +Cell[74649, 1657, 325, 4, 30, "Output",ExpressionUUID->"c10ce11d-504a-4055-af67-f13ad9108447"] +}, Open ]], +Cell[74989, 1664, 2651, 61, 369, "Input",ExpressionUUID->"55c35b25-c1ba-4d20-8b02-98a32cd64908"], +Cell[CellGroupData[{ +Cell[77665, 1729, 142, 3, 26, "Input",ExpressionUUID->"62af65db-8e03-4b38-bed4-3eb19cc5fe59"], +Cell[77810, 1734, 356, 6, 30, "Output",ExpressionUUID->"80d6cfd6-8f67-4c80-b6a5-44c9322d4645"] +}, Open ]] +}, Closed]], +Cell[CellGroupData[{ +Cell[78215, 1746, 182, 3, 37, "Subsection",ExpressionUUID->"c840a135-7e44-4968-bab0-c6b8263d8ec2"], +Cell[CellGroupData[{ +Cell[78422, 1753, 242, 4, 40, "Subsubsection",ExpressionUUID->"46bada4f-2b65-46d6-8449-2ff3d19c5383"], +Cell[CellGroupData[{ +Cell[78689, 1761, 1170, 26, 45, "Input",ExpressionUUID->"222c615b-a42b-4ee3-a8d3-36120f9f8aec"], +Cell[CellGroupData[{ +Cell[79884, 1791, 2000, 39, 62, "Print",ExpressionUUID->"3bc23efe-2da5-44a4-8729-811d09773bfb"], +Cell[81887, 1832, 1982, 38, 62, "Print",ExpressionUUID->"6b9d1c6f-941f-4f62-acc6-ecf31fc62a6f"] +}, Open ]] }, Open ]], -Cell[1336, 38, 251, 5, 28, "Input",ExpressionUUID->"c8273595-1fe1-41fa-9daf-4ea21b66a83f"], -Cell[1590, 45, 3436, 64, 143, "Input",ExpressionUUID->"37f5d4d4-f15e-4b4a-87a0-96ea200d4275"], -Cell[5029, 111, 3833, 80, 200, "Input",ExpressionUUID->"1187a008-4456-444b-a9da-076ea4eaff1e"], -Cell[8865, 193, 5077, 112, 428, "Input",ExpressionUUID->"4d31936d-f5c5-4a93-a77e-6c45e4d5ce00"], -Cell[13945, 307, 1700, 41, 162, "Input",ExpressionUUID->"bf9400e4-112f-455e-ad27-b1570cb960bc"], -Cell[CellGroupData[{ -Cell[15670, 352, 499, 10, 28, "Input",ExpressionUUID->"6aa016f4-c810-44a1-beae-1de455e59c51"], -Cell[16172, 364, 2724, 74, 90, "Output",ExpressionUUID->"4e902d86-cff5-4c5c-be20-a0df5af7fe54"] +Cell[83896, 1874, 807, 14, 26, "Input",ExpressionUUID->"ba4be30b-5d55-411a-8bcc-aac08aebc97e"], +Cell[CellGroupData[{ +Cell[84728, 1892, 395, 11, 26, "Input",ExpressionUUID->"1ac403f0-5f25-40d4-9c0b-ce8fa7ace86d"], +Cell[CellGroupData[{ +Cell[85148, 1907, 590, 19, 21, "Print",ExpressionUUID->"73f0c737-de2d-4b5c-ab21-7f2dbd3cf34e"], +Cell[85741, 1928, 839, 25, 21, "Print",ExpressionUUID->"c085a5fe-9ad4-4e60-ae6b-a0b52254501f"], +Cell[86583, 1955, 232, 6, 21, "Print",ExpressionUUID->"dc224ae0-c42c-4d12-bb72-7bc15354acdd"], +Cell[86818, 1963, 477, 16, 21, "Print",ExpressionUUID->"ac24ab55-ed6d-4276-bdda-37926afabda8"], +Cell[87298, 1981, 2834, 71, 73, "Print",ExpressionUUID->"0b76d735-371b-4ba9-950a-5cdc3fde639a"] +}, Open ]] +}, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[18933, 443, 444, 9, 28, "Input",ExpressionUUID->"41ec07a0-d058-43fd-849e-7267184e40fa"], -Cell[19380, 454, 2285, 57, 71, "Output",ExpressionUUID->"a0522204-1ad4-4a85-adb6-f1322c219741"] +Cell[90193, 2059, 245, 4, 40, "Subsubsection",ExpressionUUID->"8a768103-8b13-4c07-925d-13ff2ca833f3"], +Cell[90441, 2065, 470, 9, 26, "Input",ExpressionUUID->"57b1b16d-3b19-4cbf-a509-84b4572b91c3"], +Cell[CellGroupData[{ +Cell[90936, 2078, 675, 18, 45, "Input",ExpressionUUID->"620d403d-270c-46e9-8e54-f25140ad0167"], +Cell[CellGroupData[{ +Cell[91636, 2100, 1938, 49, 56, "Print",ExpressionUUID->"34255a8f-a948-43f9-a9b7-e7c097c92df6"], +Cell[93577, 2151, 1108, 33, 21, "Print",ExpressionUUID->"6768665e-77d2-4b0e-ad7c-d1fc92148d53"], +Cell[94688, 2186, 229, 6, 21, "Print",ExpressionUUID->"56c6d456-c216-4701-9050-d3a9be3bc3aa"], +Cell[94920, 2194, 479, 16, 21, "Print",ExpressionUUID->"7bd4ea3d-50b8-47e6-b724-5c209a6b8807"], +Cell[95402, 2212, 3231, 79, 73, "Print",ExpressionUUID->"6b32e4b8-8b31-47af-8b50-80e85137b219"], +Cell[98636, 2293, 1800, 50, 39, "Print",ExpressionUUID->"0dc3d6d3-3af1-465a-9ba1-a312125c1b52"], +Cell[100439, 2345, 232, 6, 21, "Print",ExpressionUUID->"ebbcf39c-0ac6-4eb8-af03-636fdf62a1b5"], +Cell[100674, 2353, 479, 16, 21, "Print",ExpressionUUID->"32924fce-4acd-4cda-a59a-3c364e58a306"], +Cell[101156, 2371, 21296, 486, 481, "Print",ExpressionUUID->"2a30a3e1-2ecb-48d9-9807-e99c79ac2471"] +}, Open ]] +}, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[21702, 516, 284, 6, 28, "Input",ExpressionUUID->"3d0c5e51-f455-46e4-82c9-33de2d223ca1"], -Cell[21989, 524, 1275, 34, 52, "Output",ExpressionUUID->"a58e58d5-26d0-4577-bafe-563c3fd33d97"] +Cell[122513, 2864, 162, 3, 40, "Subsubsection",ExpressionUUID->"9dd04ade-e7e5-4bd6-a8de-8ed4e1855024"], +Cell[CellGroupData[{ +Cell[122700, 2871, 625, 18, 45, "Input",ExpressionUUID->"c0c24c64-880d-4e7d-a3bf-c1a83384242c"], +Cell[CellGroupData[{ +Cell[123350, 2893, 1027, 26, 62, "Print",ExpressionUUID->"e7e607b1-61aa-4263-a0bd-bd7ee87de726"], +Cell[124380, 2921, 1001, 25, 62, "Print",ExpressionUUID->"e1e35eaf-fbda-459b-b409-ea072144e8a3"] +}, Open ]] }, Open ]], -Cell[23279, 561, 160, 3, 34, "Text",ExpressionUUID->"aaf22bd3-28b0-4a45-86a2-95feae5ae1e0"], Cell[CellGroupData[{ -Cell[23464, 568, 517, 15, 28, "Input",ExpressionUUID->"f12c1f99-0fc0-4a0a-91db-21806a8c4ec3"], +Cell[125430, 2952, 727, 19, 45, "Input",ExpressionUUID->"ace8a1c1-dd1b-4a70-b555-0a26dbb185cf"], Cell[CellGroupData[{ -Cell[24006, 587, 976, 24, 35, "Print",ExpressionUUID->"3e7e1e24-6077-431a-9e3f-d80b646c3891"], -Cell[24985, 613, 1022, 26, 35, "Print",ExpressionUUID->"f90f9ada-5b2d-4a9b-8461-c6048dbe7f2c"], -Cell[26010, 641, 980, 24, 35, "Print",ExpressionUUID->"a8ef8baf-3e3b-4b0f-a7eb-990e3a6ed268"], -Cell[26993, 667, 1026, 26, 35, "Print",ExpressionUUID->"25592c01-a5d7-4849-8a18-871e89fc8673"] +Cell[126182, 2975, 716, 21, 21, "Print",ExpressionUUID->"3b5c0afe-9c73-41ab-a8ea-76da1c390cdd"], +Cell[126901, 2998, 1175, 33, 21, "Print",ExpressionUUID->"bcecbe03-1bf6-4892-a54b-abcdd1a0ec19"], +Cell[128079, 3033, 356, 8, 21, "Print",ExpressionUUID->"14cd420d-b574-4ffd-a797-3b63a50bf76a"], +Cell[128438, 3043, 3146, 77, 90, "Print",ExpressionUUID->"49c5d714-13c6-4209-b65c-334f1257455c"] +}, Open ]] }, Open ]] }, Open ]], -Cell[28046, 697, 145, 3, 28, "Input",ExpressionUUID->"78a57f7a-85b2-49f0-ab0d-801153560001"], -Cell[28194, 702, 161, 3, 34, "Text",ExpressionUUID->"c5e85b62-0b60-4ac8-b9c4-849a700c3216"], Cell[CellGroupData[{ -Cell[28380, 709, 459, 12, 28, "Input",ExpressionUUID->"1a5fc7bc-be81-4b3e-99c8-9d7766eabcf4"], +Cell[131645, 3127, 163, 3, 40, "Subsubsection",ExpressionUUID->"3cee5c3f-5857-4ee5-b683-10f96cafaf92"], +Cell[131811, 3132, 495, 10, 26, "Input",ExpressionUUID->"7b6b0b07-02d5-4722-9ed3-d1108461c3ae"], +Cell[CellGroupData[{ +Cell[132331, 3146, 755, 20, 45, "Input",ExpressionUUID->"34e20742-d410-41fb-949c-7e2276e33f2b"], +Cell[CellGroupData[{ +Cell[133111, 3170, 1943, 49, 56, "Print",ExpressionUUID->"767a298c-e8ef-4903-bccc-cb93b2b23236"], +Cell[135057, 3221, 1321, 39, 39, "Print",ExpressionUUID->"ce7f941f-b733-4ef0-968c-d07421ac66c4"], +Cell[136381, 3262, 232, 6, 21, "Print",ExpressionUUID->"3a624d72-13ff-4460-b7ce-157cc54f5d62"], +Cell[136616, 3270, 3140, 76, 73, "Print",ExpressionUUID->"3248d98f-5ce8-493c-aadf-6b20a0445b7e"], +Cell[139759, 3348, 2014, 56, 56, "Print",ExpressionUUID->"8df78050-03ee-4732-8a3f-f6a8c41b91f7"], +Cell[141776, 3406, 232, 6, 21, "Print",ExpressionUUID->"630a5e75-5ab6-4276-bd22-08b30f404368"], +Cell[142011, 3414, 21771, 495, 532, "Print",ExpressionUUID->"2b38ffe7-43f2-4da1-9756-d4a5eb25bea0"] +}, Open ]] +}, Open ]] +}, Open ]] +}, Closed]], +Cell[CellGroupData[{ +Cell[163855, 3917, 171, 3, 37, "Subsection",ExpressionUUID->"9e3e465f-7792-498e-8cb5-d148e0ec6bce"], +Cell[CellGroupData[{ +Cell[164051, 3924, 197, 3, 40, "Subsubsection",ExpressionUUID->"91db1d89-924f-408c-985b-2313b9c7fd4e"], Cell[CellGroupData[{ -Cell[28864, 725, 793, 24, 22, "Print",ExpressionUUID->"3846fa17-e029-4f34-a9ea-21f703b7627c"], -Cell[29660, 751, 1258, 37, 41, "Print",ExpressionUUID->"fdcda5a9-d18b-42f2-ad51-fd056dc2adc7"] +Cell[164273, 3931, 666, 19, 45, "Input",ExpressionUUID->"013e166b-cb35-4b15-9fc8-544f9e2327c7"], +Cell[CellGroupData[{ +Cell[164964, 3954, 1236, 28, 62, "Print",ExpressionUUID->"831e0a0e-439f-4395-ac88-5d25bf3228a8"], +Cell[166203, 3984, 1280, 30, 62, "Print",ExpressionUUID->"94864cd4-9458-43da-b0c2-e7ff0c1d6491"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[30967, 794, 209, 5, 28, "Input",ExpressionUUID->"63ea91d8-da59-4d3c-a17e-9bfbe009b486"], -Cell[31179, 801, 1881, 51, 90, "Output",ExpressionUUID->"d243c2c7-f5ab-416c-bcc5-427594a58e0a"] +Cell[167532, 4020, 1475, 29, 45, "Input",ExpressionUUID->"27230ac3-13d8-40e8-b787-4b4c8860c54c"], +Cell[CellGroupData[{ +Cell[169032, 4053, 1550, 41, 39, "Print",ExpressionUUID->"1202cb52-bf83-4d90-8dd4-125f9dcbb1b7"], +Cell[170585, 4096, 232, 6, 21, "Print",ExpressionUUID->"4b9c9173-3617-401e-8ccb-c250aa4e5300"], +Cell[170820, 4104, 423, 13, 21, "Print",ExpressionUUID->"fd2cd305-ac99-44fe-836c-5cb085f9284f"], +Cell[171246, 4119, 3208, 79, 73, "Print",ExpressionUUID->"7a6095c2-cfa6-4bb1-8653-eee9ed06a2de"] +}, Open ]] +}, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[33097, 857, 317, 7, 28, "Input",ExpressionUUID->"2c15d24a-8cc2-4656-b55c-6748a23d0a1b"], -Cell[33417, 866, 2897, 85, 109, "Output",ExpressionUUID->"d3836d4a-2f4f-49a1-b860-161cf9a7f423"] +Cell[174515, 4205, 200, 3, 40, "Subsubsection",ExpressionUUID->"22a251d4-6170-4c1a-a48d-28055fc236cd"], +Cell[CellGroupData[{ +Cell[174740, 4212, 996, 24, 63, "Input",ExpressionUUID->"da50a357-49d4-47c6-84e8-e23d5c987dda"], +Cell[CellGroupData[{ +Cell[175761, 4240, 5696, 136, 141, "Print",ExpressionUUID->"bf6b2743-6a11-474b-b7f8-d52b361fec8c"], +Cell[181460, 4378, 283, 7, 21, "Print",ExpressionUUID->"6cfd4140-7233-4b65-9b2f-97df450451fd"], +Cell[181746, 4387, 530, 17, 21, "Print",ExpressionUUID->"c0844e7b-31a6-42b5-8f02-ca0ad252c812"], +Cell[182279, 4406, 11607, 268, 277, "Print",ExpressionUUID->"14f91e34-081d-4bf7-ba82-ef8186edbf14"], +Cell[193889, 4676, 280, 7, 21, "Print",ExpressionUUID->"610f210d-f066-4c61-ae4d-2ec8199d2748"], +Cell[194172, 4685, 528, 17, 21, "Print",ExpressionUUID->"e2434990-6053-4c70-98d3-4883bd44b9bc"], +Cell[194703, 4704, 22189, 505, 515, "Print",ExpressionUUID->"9e624d09-8984-4945-993b-b9bcfa4c04e1"] +}, Open ]] +}, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[36351, 956, 231, 5, 28, "Input",ExpressionUUID->"a02398fa-3040-4eaf-9b33-4298b5ea9e0a"], -Cell[36585, 963, 645, 18, 32, "Output",ExpressionUUID->"abb61450-0781-4545-a5fb-54dd94d788f8"] +Cell[216953, 5216, 201, 3, 40, "Subsubsection",ExpressionUUID->"d11717aa-aab0-4786-b0f7-16a918b8135b"], +Cell[CellGroupData[{ +Cell[217179, 5223, 991, 24, 63, "Input",ExpressionUUID->"d36c163e-c658-4479-bd58-b6d075e4b29e"], +Cell[CellGroupData[{ +Cell[218195, 5251, 1573, 41, 39, "Print",ExpressionUUID->"291e2fdc-54da-4322-9bb5-161af318e6fb"], +Cell[219771, 5294, 254, 6, 21, "Print",ExpressionUUID->"768a44cc-9175-41b2-88c1-12945e364234"], +Cell[220028, 5302, 3127, 77, 73, "Print",ExpressionUUID->"c5580d21-837e-48f9-a42f-25c58b7d0308"] +}, Open ]] +}, Open ]] +}, Open ]] +}, Closed]], +Cell[CellGroupData[{ +Cell[223228, 5387, 180, 3, 37, "Subsection",ExpressionUUID->"cc11ec87-d371-4360-a100-5230d6d0b2d8"], +Cell[CellGroupData[{ +Cell[223433, 5394, 840, 21, 45, "Input",ExpressionUUID->"1ccefe4d-94ea-4aa3-98c1-3d4d6ff6ffc1"], +Cell[CellGroupData[{ +Cell[224298, 5419, 1283, 28, 34, "Print",ExpressionUUID->"76df781c-e9b6-4b1f-ab5b-6707630e20e8"], +Cell[225584, 5449, 1306, 29, 34, "Print",ExpressionUUID->"95ecc6c8-ed45-4146-96e8-42fb7b6612ed"], +Cell[226893, 5480, 1305, 29, 34, "Print",ExpressionUUID->"b178205a-7591-4fdd-8347-666cf2e80a54"], +Cell[228201, 5511, 1284, 28, 34, "Print",ExpressionUUID->"c0221ebc-23f4-455a-967f-e7a7bc662436"] +}, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[37267, 986, 314, 7, 28, "Input",ExpressionUUID->"914d1fd5-33d3-4683-bccd-3bd709dc62e5"], -Cell[37584, 995, 210, 5, 32, "Output",ExpressionUUID->"a61baa0a-02b1-42ac-88ad-cda93b2f46c7"] +Cell[229534, 5545, 613, 10, 26, "Input",ExpressionUUID->"dc27bfc0-a1bc-48a9-93ef-7f16b63cbd21"], +Cell[230150, 5557, 3723, 99, 85, "Output",ExpressionUUID->"71e10840-d192-421e-bd36-8f4efa5598a4"] }, Open ]], Cell[CellGroupData[{ -Cell[37831, 1005, 237, 5, 28, InheritFromParent,ExpressionUUID->"26b6d862-05cf-4d43-a5db-3840b74d0c75"], -Cell[38071, 1012, 1227, 38, 52, "Output",ExpressionUUID->"79c0b39d-a49f-468e-9fa8-19caf013e933"] +Cell[233910, 5661, 328, 7, 26, "Input",ExpressionUUID->"6989921b-b79a-4eed-98fb-39aa78f5b7f7"], +Cell[234241, 5670, 2689, 74, 85, "Output",ExpressionUUID->"1752710a-4436-4a13-89b2-8e886d935de0"] }, Open ]], Cell[CellGroupData[{ -Cell[39335, 1055, 284, 6, 28, "Input",ExpressionUUID->"1652a19b-aa2c-45e5-bbdf-20be341e7c21"], -Cell[39622, 1063, 645, 18, 32, "Output",ExpressionUUID->"eb910894-c84f-4920-a9ce-9e5e01e78cad"] +Cell[236967, 5749, 320, 6, 26, "Input",ExpressionUUID->"d2e53e16-623a-4706-9dae-5f482fc10bbf"], +Cell[237290, 5757, 2147, 62, 67, "Output",ExpressionUUID->"e730bc81-8feb-40a6-a3cc-2b9e53d599d7"] }, Open ]], -Cell[40282, 1084, 188, 3, 67, "Section",ExpressionUUID->"634da45f-756d-47a0-ab2d-9e5d4f23c146"], -Cell[40473, 1089, 227, 3, 53, "Section",ExpressionUUID->"ba5d60e7-52ab-4904-8eb9-b41c0caa2bc1"] +Cell[239452, 5822, 4198, 97, 459, "Input",ExpressionUUID->"494b24e5-51a1-412f-bce0-419a663c9911"], +Cell[CellGroupData[{ +Cell[243675, 5923, 273, 5, 26, "Input",ExpressionUUID->"e0efbda9-1065-426e-91bf-5e07fc7dc84b"], +Cell[243951, 5930, 258, 4, 30, "Output",ExpressionUUID->"d43ef657-399b-4906-8645-46603d19ce03"] +}, Open ]] +}, Closed]] +}, Open ]] } ] *) From 0cb16ce4442d1be341685e6e9585bf8ab572537f Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 16 Jun 2019 23:25:02 +0200 Subject: [PATCH 03/20] add MeasuredQCM --- UniversalQCompiler.m | 248 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 247 insertions(+), 1 deletion(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index d854047..4c76b1d 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -145,6 +145,10 @@ DecChannelInQCM::usage="TBA." DecPOVMInQCM::usage="TBA." PrepareForQASM::usage="PrepareForQASM[gatelist] takes a list of gates and prepares it into a form suitable for use with the python script that converts to QASM." +QRSplit::usage="TBA" +ReducedCSDSplit::usage="TBA" +DecChannelRecursively::usage="TBA" +MeasuredQCM::"TBA" Begin["`Private`"]; (*Set debug to True to run additional tests during running the methods.*) @@ -3726,7 +3730,249 @@ outputs set1 and set2 should be equal (may be useful for checking) *) IsListForm[st_,methodName_:"UNKNOWN"]:=Module[{postsel,postselnums,traceout,traceoutnums,measure,measurenums,int1,int2,int3},If[st=={},,If[Length[Dimensions[st]]==1, IsListFormHelp[st,methodName],postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];traceout=Cases[st,{4,0,_}];If[traceout==={},traceoutnums={},traceoutnums=Transpose[traceout][[3]]];measure=Cases[st,{4,1,_}];If[measure==={},measurenums={},measurenums=Transpose[measure][[3]]];int1=Intersection[postselnums,traceoutnums];int2=Intersection[postselnums,measurenums];int3=Intersection[traceoutnums,measurenums];If[int1==={},,Throw[StringJoin["For qubits ",ToString[int1]," appering as an input in method ",methodName ," there is both a postselection and a trace."]]];If[int2==={},,Throw[StringJoin["For qubits ",ToString[int2]," appering as an input in method ",methodName ," there is both a postselection and a measurement."]]];If[int3==={},,Throw[StringJoin["For qubits ",ToString[int3]," appering as an input in method ",methodName ," there is both a trace and a measurement."]]];IsListFormHelp[#,methodName]&/@st]]] PrepareForQASM[st_]:=Module[{out,traceouts,traceoutnums,i},out=NGateList[st];If[Cases[out,{5,_,_}]==={},,Print["Notice: ancillas found in the input have been removed. Output gate sequence corresponds to the same operation as the input provided the ancillas in the input sequence start in the correct states."];out=DeleteCases[out,{5,_,_}]];If[Cases[out,{-2,_,_}]==={},,Throw["Error in PrepareForQASM: diagonal gates found in the input, which is not supported by QASM. You may want to decompose them using DecDiagGate[]."];out=DeleteCases[out,{-2,_,_}]];If[Cases[st,{6,_,_}]==={},,Print["Warning: postselection gate found in the input has been removed. Output gate sequence may not be as intended."];out=DeleteCases[out,{6,_,_}]];traceouts=Cases[st,{4,0,_}];If[traceouts==={},,traceoutnums=Transpose[traceouts][[3]];Print["Notice: trace out gate found in the input has been replaced by measurement. Forgetting the outcome will recover the same operation as the input."];out=DeleteCases[out,{4,0,_}];For[i=1,i<=Length[traceoutnums],i++,out=Insert[out,{4,1,traceoutnums[[i]]},-1]]];out] - + + +(*Boxi*) +cgs=100 +Mmt2[j_,i_]:={7,j,i}; +NOT[i_]:={8,,i}; +Bit[p_,i_]:={9,p,i}; +CTRLST[z_,o_,u_,stList_]:=Module[{}, +If[Length[stList]==2^Length[u],,Throw[StringForm["Invalid use of controlled sequence, Length[stList]\[Equal]Length[u] is not fulfilled"]]]; +Return[{cgs, {z,o,u},stList} ] +] + +(*MeasuredQCM*) +QRSplit[v_]:= +(*Input: a rectangular matrix [q1:q2] with an even number of rows; + Output: {R,{Q1,Q2}} where R=[R1:R2] is an isometry and V1=Q1*R1, V2=Q2*R2;*) +Module[{v1, v2,q1,q2,r1,r2}, +If[!EvenQ[Length[v]], Throw[Stringform["The number of rows has to be even for QRSplit."]]]; +{v1,v2} = Partition[v, Length[v]/2]; +{q1,r1} = QRDecomposition[v1]; +{q2,r2} = QRDecomposition[v2]; +Return[{Join[r1,r2],{Transpose[q1],Transpose[q2]}}] +] +ReducedCSDSplit[q_, OptionsPattern[EfficientRepresentation->False]] := +(*Use reduced CSD decomposition to decompose an isometry [q1:q2] in to q1=u1*c*v and q2=u2*s*v,where c and s are diagonal matrix with entries of the form cos and sin (means that c^2+s^2=I). +This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessEqual]n, ortherwise the removal of 0s in s has to be modified. + +If EfficientRepresentation->False, it returns three matrix m1,m2,m3 so that m1*m2*m3=[q1:q2] +If EfficiqentRepresentation->True, it only returns v, a list of diagonal elements c and s and {u1, u2} +*) +Module[{n,m, u1,u2,s,c,v,q1,q2,x, r,reducedDim}, +If[!EvenQ[Length[q]], Throw[Stringform["The number of rows has to be even for ReducedCSDSplit."]]]; +{n,m}=Dimensions[q]; +If[2*m>n, Throw[Stringform["The input has to be an isometry with 2m<=n, where m, n are the nunber of columns and rows in the matrix representation."]]]; + +{q1,q2} = Partition[q, Length[q]/2]; + +(* calculate reduced u2 and s *) +{u2,s,v} = SingularValueDecomposition[q2]; +reducedDim =Dimensions[q1][[2]]; +u2 = u2[[All,1;;reducedDim]]; (* Cut unnecessary columns *) +s = s[[1;;reducedDim,1;;reducedDim]]; (* Cut zeros *) + +(* calculate u1 and c using QR decomposition *) +x = q1.v; +{u1,r} = QRDecomposition[x]; +c = DiagonalMatrix[Diagonal[r]]; +u1 = x.Inverse[c]; +v = Transpose[v]; + +(* output result *) +If[ +OptionValue[EfficientRepresentation], +Return[{v, +MapThread[{{#1,#2},{-#2,#1}}&,{Diagonal[c],Diagonal[s]}], +{u1,u2}}], +Return[{ +ArrayFlatten[{{v},{SparseArray[{},{reducedDim,reducedDim}]}}], +ArrayFlatten[{{c,s},{s,c}}], +ArrayFlatten[{{u1,0},{0,u2}}] +}] +] +] +ChooseDecMethod[MethodName_]:= +Module[{method}, +Switch[ +MethodName, +"QSD", +Return[QSD], +"DecIsometry", +Return[DecIsometry], +"DecIsometryGeneric", +Return[DecIsometryGeneric], +"ColumnByColumnDec", +Return[ColumnByColumnDec], +"KnillDec", +Return[KnillDec], +_, +Throw["The decomposition method "<>MethodName<>" is not found. The available methods are QSD, DecIsometry, DecIsometryGeneric, ColumnByColumnDec and KnillDec."] +] +] +DecChannelRecursively[krausList_,OptionsPattern[{DecomposeIso->"None"}]] := +(* Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; +After those gates, the first qubit is to be measured but the measurement gates are not included here; +The total number of qubis involved is max(m,n)+1; + +Input: a list of Kraus operator; +Output: isometry/st, a list of Kraus operators, a list of Kraus operators;(If the list of Kraus operators is no longer decomposible with QR, it will returns {isometry/st,None,None})\:ff1b + +If DecomposeIso\[Rule]"None": Use QRSplit and the isometry is in the matrix representation; +If DecomposeIso\[Rule]"QSD": Use ReducedCSDSplit and the isometry is give as gate sequence; +If DecomposeIso\[Rule]"DecIsometryGeneric"/"ColumnByColumnDec"/"DecIsometry"/"KnillDecomposition": Use QRSplit and the isometry is decomposed by the corresponding decomposition methods +*) +Module[{k,n,e2n,m,DecMethod,q,v,r,rList,q1,q2,gateSequence}, +e2n = Dimensions[krausList][[2]]; +{k,n,m} = Log2[Dimensions[krausList]]; +If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; +If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; +If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; +If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; + +q= Flatten[krausList,1]; + +(* If the stacked kraus operators is already a m to n isometry with n<=m+1 *) +If[n+k<=m+1, +If[OptionValue[DecomposeIso]=="None", +Return[{q,None,None}], +DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; +Return[{DecMethod[q],None,None}] +] +]; + +(* QR or ReducedCSD Decomposition *) +If[OptionValue[DecomposeIso]=="QSD", + +(* Use ReducedCSDSplit*) +DecMethod=QSD; +{v,rList,{q1,q2}}=ReducedCSDSplit[q, EfficientRepresentation->True]; +gateSequence = +{Ancilla[0,1], +CTRLST[{1},{},{}, +{DecMethod[v,action=Range[Max[m,n]-m+2,Max[n,m]+1]]} +], +CTRLST[{},{},Range[Max[m,n]-m+2,Max[n,m]+1], +Map[DecMethod[#,action={1}]&,rList] +] +}; +Return[{gateSequence, Partition[q1,e2n],Partition[q2,e2n]}], + +(* Use QRSplit*) +{r,{q1,q2}} = QRSplit[q]; +If[OptionValue[DecomposeIso]=="None", +Return[{r,Partition[q1,e2n],Partition[q2,e2n]}], (* Partition transform it to a list of kraus *) +DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; +Return[ +{DecMethod[r, action=Range[1,Max[m,n]+1]], +Partition[q1,e2n], +Partition[q2,e2n] +}] +] +] +] +MeasuredQCM[krausList_,OptionsPattern[{DecomposeIso->"QSD",DecomposeLastIso->"DecIsometry",DoNotReuseAncilla->False}]]:= +(*Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; +Input: a list of kraus operators {K1,K2,...K_(2^k)}; +Output: {{st[r1]} , {st[r21],st[r22]} , {st[r31],st[r32],st[r33],st[r34]} , ..., {st[q1}, st[q2], ..., st[q_(2^k)]}}, where st[g] is the gate sequence of gate g. +*) +Module[{SplitResult, gateSequence, DecMethod,l,n,m,k,loopNum, i,v,vList, qList,rList}, +{k,n,m} = Log2[Dimensions[krausList]]; (* (n,m) size of each kraus operator *) +If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; +If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; +If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; +If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; + +(* loopNum = number of iteration with qr decomposition *) +If[mTrue]&, qList],1]; +(* A list bellow contains all gate sequences multiplex controlled by the first i-1 bits*) +vList =SplitResult[[1;;-1;;3]]; (* Zero controlled gate v *) +rList = Flatten[SplitResult[[2;;-1;;3]],1]; (* Matrices with cos and sin elements *) +qList = Flatten[SplitResult[[3;;-1;;3]],1]; (* Isometry for the decomposition in the next round*) + +(* Append results *) +Which[ +OptionValue[DoNotReuseAncilla]==False, +gateSequence=Join[gateSequence, +{CTRLST[{loopNum+1},{},Range[1,i-1], +Map[DecMethod[#,action=Range[loopNum+l+1,loopNum+l+m]]&,vList] +], +CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], +Map[DecMethod[#,action={loopNum+1}]&,rList] +], +Mmt2[i,loopNum+1], +CTRLST[{},{i},{}, +{{NOT[loopNum+1]}} +] +} +], +OptionValue[DoNotReuseAncilla]==True, +gateSequence=Join[gateSequence, +{CTRLST[{i},{},Range[1,i-1], +Map[DecMethod[#,action=Range[k+l+1,k+l+m]]&,vList] +], +CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], +Map[DecMethod[#,action={i}]&,rList] +], +Mmt[i] +} +] +], + +(* Other decomposition method is choosen*) +OptionValue[DecomposeIso]!="CSD", +DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; +(* Matrix calculation *) +qrSplitResult = Flatten[Map[QRSplit, qList],1]; +rList = qrSplitResult[[1;;-1;;2]]; +qList = Flatten[qrSplitResult[[2;;-1;;2]],1]; + +(* Append results *) +Which[ +OptionValue[DoNotReuseAncilla]==False, +gateSequence=Join[gateSequence, +{CTRLST[{},{},Range[1,i-1], +Map[DecMethod[#,action=Join[{loopNum+1},Range[loopNum+l+1,loopNum+l+m]]]&,rList] +], +Mmt2[i,loopNum+1], +CTRLST[{},{i},{}, +{{NOT[loopNum+1]}} +] +} +], +OptionValue[DoNotReuseAncilla]==True, +gateSequence=Join[gateSequence, +{CTRLST[{},{},Range[1,i-1], +Map[DecMethod[#,action=Join[{i},Range[loopNum+l+1,loopNum+l+m]]]&,rList] +], +Mmt[i] +} +] +] (* end whether reuse qubit *) +] (* end which decomposition *) +]; (* end for loop *) + +DecMethod=ChooseDecMethod[OptionValue[DecomposeLastIso]]; +AppendTo[gateSequence, +CTRLST[{},{},Range[1,loopNum], +Map[DecMethod[#,Range[loopNum+1,loopNum+l+m]]&, qList] +] +]; +Return[gateSequence] +] + End[]; EndPackage[] From 1194a5f0e288a715480e2c9eeedb3eac1fae3662 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 14 Jul 2019 23:13:22 +0200 Subject: [PATCH 04/20] add indent and fix >=5 problem --- UniversalQCompiler.m | 411 ++++++++++++++++++++++--------------------- 1 file changed, 214 insertions(+), 197 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 4c76b1d..2396f8e 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -148,7 +148,11 @@ QRSplit::usage="TBA" ReducedCSDSplit::usage="TBA" DecChannelRecursively::usage="TBA" -MeasuredQCM::"TBA" +MeasuredQCM::usage="TBA" +CTRLSTM::usage="TBA" +RemoveUnusedQubits::usage="TBA" +CreateCompactIsometryFromList::usage="TBA" +ApplyControl::usage="TBA" Begin["`Private`"]; (*Set debug to True to run additional tests during running the methods.*) @@ -271,7 +275,8 @@ list[[1]]==-1,CZM[list[[2]],list[[3]],numQubits], list[[1]]==-2,If[Dimensions[list[[2]]]!= {},DiagMat[list[[2]],list[[3]],numQubits],Throw[StringForm["Unspecified diagonal gate cannot be represented as a matrix using ListFormToOp[]"]]], list[[1]]==4,Throw[StringForm["Measurements/Trace cannot be represented by matrices using ListFormToOp[]"]], -list[[1]]>=5,Throw[StringForm["Starting in |0> or postselection cannot be represented by matrices using ListFormToOp[]"]] +(*Boxi TODO: Add here new gate handling*) +MemberQ[{5,6},list[[1]]],Throw[StringForm["Starting in |0> or postselection cannot be represented by matrices using ListFormToOp[]"]] ],ListFormToOp[#,numQubits]&/@list]] (*Transforms a list in list format to a list containing the corresponding string representations of the gates*) @@ -299,10 +304,11 @@ Options[CreateIsometryFromList]={FullSimp->True}; CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, IsListForm[st]; -If[n===Null,n1=NumberOfQubits[st]];ancillain=SortBy[Cases[st,{5,_,_}],Last]; +If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[Cases[ToSimpleGate[st],{5,_,_}],Last]; If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; -st2=DeleteCases[st,{x_/;x>=5,_,_}];mat={{1}};k=0; +st2=DeleteCases[st,{x_/;x==5,_,_}|{x_/;x==6,_,_}];mat={{1}};k=0; +(*st2 = DeleteCases[st, {x_ /; x == 6, _, _}];*) For[i=1,i<=n1,i++,mat=KroneckerProduct[mat,If[MemberQ[ancillainnums,i],k++;KetV[ancillainvals[[k]],2],IdentityMatrix[2]]]]; isAnalytic=True; For[i=1,i<=Length[st2],i++, @@ -3723,6 +3729,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) If[gate[[2]]==gate[[3]],Throw[StringJoin["There is a controlled gate ",ToString[gate]," appearing as an input in method ",methodName ," that has a control qubit number equal to the target qubit number (which is not supported)."]]], MemberQ[{1,2,3},gate[[1]]], If[NumericQ[gate[[2]]]&&IntegerQ[gate[[3]]],,Throw[StringJoin["There is a rotation gate ",ToString[gate]," appering as an input in method ",methodName ," that has a wrong types."]]], MemberQ[{4,5,6},gate[[1]]],If[MemberQ[{0,1},gate[[2]]]&&IntegerQ[gate[[3]]],,Throw[ToString[StringForm["The gate `1` appearing as an input in method `2` has unknown parameter types.",gate,methodName]]]] + (*Boxi TODO: MemberQ[{cgs},gate[[1]]],Map[IsListFormHelp[#]&,gate[[3]]]*) ]; Label[LabelEnd]; ]; @@ -3738,7 +3745,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) NOT[i_]:={8,,i}; Bit[p_,i_]:={9,p,i}; CTRLST[z_,o_,u_,stList_]:=Module[{}, -If[Length[stList]==2^Length[u],,Throw[StringForm["Invalid use of controlled sequence, Length[stList]\[Equal]Length[u] is not fulfilled"]]]; + If[Length[stList]==2^Length[u],,Throw[StringForm["Invalid use of controlled sequence, Length[stList]\[Equal]Length[u] is not fulfilled"]]]; Return[{cgs, {z,o,u},stList} ] ] @@ -3746,13 +3753,14 @@ outputs set1 and set2 should be equal (may be useful for checking) *) QRSplit[v_]:= (*Input: a rectangular matrix [q1:q2] with an even number of rows; Output: {R,{Q1,Q2}} where R=[R1:R2] is an isometry and V1=Q1*R1, V2=Q2*R2;*) -Module[{v1, v2,q1,q2,r1,r2}, -If[!EvenQ[Length[v]], Throw[Stringform["The number of rows has to be even for QRSplit."]]]; -{v1,v2} = Partition[v, Length[v]/2]; -{q1,r1} = QRDecomposition[v1]; -{q2,r2} = QRDecomposition[v2]; -Return[{Join[r1,r2],{Transpose[q1],Transpose[q2]}}] + Module[{v1, v2,q1,q2,r1,r2}, + If[!EvenQ[Length[v]], Throw[Stringform["The number of rows has to be even for QRSplit."]]]; + {v1,v2} = Partition[v, Length[v]/2]; + {q1,r1} = QRDecomposition[v1]; + {q2,r2} = QRDecomposition[v2]; + Return[{Join[r1,r2],{Transpose[q1],Transpose[q2]}}] ] + ReducedCSDSplit[q_, OptionsPattern[EfficientRepresentation->False]] := (*Use reduced CSD decomposition to decompose an isometry [q1:q2] in to q1=u1*c*v and q2=u2*s*v,where c and s are diagonal matrix with entries of the form cos and sin (means that c^2+s^2=I). This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessEqual]n, ortherwise the removal of 0s in s has to be modified. @@ -3760,58 +3768,59 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If EfficientRepresentation->False, it returns three matrix m1,m2,m3 so that m1*m2*m3=[q1:q2] If EfficiqentRepresentation->True, it only returns v, a list of diagonal elements c and s and {u1, u2} *) -Module[{n,m, u1,u2,s,c,v,q1,q2,x, r,reducedDim}, -If[!EvenQ[Length[q]], Throw[Stringform["The number of rows has to be even for ReducedCSDSplit."]]]; -{n,m}=Dimensions[q]; -If[2*m>n, Throw[Stringform["The input has to be an isometry with 2m<=n, where m, n are the nunber of columns and rows in the matrix representation."]]]; - -{q1,q2} = Partition[q, Length[q]/2]; - -(* calculate reduced u2 and s *) -{u2,s,v} = SingularValueDecomposition[q2]; -reducedDim =Dimensions[q1][[2]]; -u2 = u2[[All,1;;reducedDim]]; (* Cut unnecessary columns *) -s = s[[1;;reducedDim,1;;reducedDim]]; (* Cut zeros *) - -(* calculate u1 and c using QR decomposition *) -x = q1.v; -{u1,r} = QRDecomposition[x]; -c = DiagonalMatrix[Diagonal[r]]; -u1 = x.Inverse[c]; -v = Transpose[v]; - -(* output result *) -If[ -OptionValue[EfficientRepresentation], -Return[{v, -MapThread[{{#1,#2},{-#2,#1}}&,{Diagonal[c],Diagonal[s]}], -{u1,u2}}], -Return[{ -ArrayFlatten[{{v},{SparseArray[{},{reducedDim,reducedDim}]}}], -ArrayFlatten[{{c,s},{s,c}}], -ArrayFlatten[{{u1,0},{0,u2}}] -}] -] +Module[{n,m, u1,u2,s,c,v,q1,q2,x, r,reducedDim,cDial}, + If[!EvenQ[Length[q]], Throw[Stringform["The number of rows has to be even for ReducedCSDSplit."]]]; + {n,m}=Dimensions[q]; + If[2*m>n, Throw[Stringform["The input has to be an isometry with 2m<=n, where m, n are the nunber of columns and rows in the matrix representation."]]]; + + {q1,q2} = Partition[q, Length[q]/2]; + + (* calculate reduced u2 and s *) + {u2,s,v} = SingularValueDecomposition[q2]; + reducedDim =Dimensions[q1][[2]]; + u2 = u2[[All,1;;reducedDim]]; (* Cut unnecessary columns *) + s = s[[1;;reducedDim,1;;reducedDim]]; (* Cut zeros *) + + (* calculate u1 and c using QR decomposition *) + x = q1.v; + {u1,r} = QRDecomposition[x]; + cDial = Diagonal[r]; + u1 = Transpose[Transpose[x]/cDial]; + v = Transpose[v]; + + (* output result *) + If[ + OptionValue[EfficientRepresentation], + Return[{v, + MapThread[{{#1,#2},{-#2,#1}}&,{cDial,Diagonal[s]}], + {u1,u2}}], + Return[{ + ArrayFlatten[{{v},{SparseArray[{},{reducedDim,reducedDim}]}}], + ArrayFlatten[{{c,s},{s,c}}], + ArrayFlatten[{{u1,0},{0,u2}}] + }] + ] ] + ChooseDecMethod[MethodName_]:= Module[{method}, -Switch[ -MethodName, -"QSD", -Return[QSD], -"DecIsometry", -Return[DecIsometry], -"DecIsometryGeneric", -Return[DecIsometryGeneric], -"ColumnByColumnDec", -Return[ColumnByColumnDec], -"KnillDec", -Return[KnillDec], -_, -Throw["The decomposition method "<>MethodName<>" is not found. The available methods are QSD, DecIsometry, DecIsometryGeneric, ColumnByColumnDec and KnillDec."] -] + Switch[ + MethodName, + "QSD", + Return[QSD], + "DecIsometry", + Return[DecIsometry], + "DecIsometryGeneric", + Return[DecIsometryGeneric], + "ColumnByColumnDec", + Return[ColumnByColumnDec], + "KnillDec", + Return[KnillDec], + _, + Throw["The decomposition method "<>MethodName<>" is not found. The available methods are QSD, DecIsometry, DecIsometryGeneric, ColumnByColumnDec and KnillDec."] + ] ] -DecChannelRecursively[krausList_,OptionsPattern[{DecomposeIso->"None"}]] := + (* Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; After those gates, the first qubit is to be measured but the measurement gates are not included here; The total number of qubis involved is max(m,n)+1; @@ -3823,155 +3832,163 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If DecomposeIso\[Rule]"QSD": Use ReducedCSDSplit and the isometry is give as gate sequence; If DecomposeIso\[Rule]"DecIsometryGeneric"/"ColumnByColumnDec"/"DecIsometry"/"KnillDecomposition": Use QRSplit and the isometry is decomposed by the corresponding decomposition methods *) +DecChannelRecursively[krausList_,OptionsPattern[{DecomposeIso->"None"}]] := Module[{k,n,e2n,m,DecMethod,q,v,r,rList,q1,q2,gateSequence}, -e2n = Dimensions[krausList][[2]]; -{k,n,m} = Log2[Dimensions[krausList]]; -If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; -If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; -If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; -If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; - -q= Flatten[krausList,1]; - -(* If the stacked kraus operators is already a m to n isometry with n<=m+1 *) -If[n+k<=m+1, -If[OptionValue[DecomposeIso]=="None", -Return[{q,None,None}], -DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; -Return[{DecMethod[q],None,None}] -] -]; - -(* QR or ReducedCSD Decomposition *) -If[OptionValue[DecomposeIso]=="QSD", - -(* Use ReducedCSDSplit*) -DecMethod=QSD; -{v,rList,{q1,q2}}=ReducedCSDSplit[q, EfficientRepresentation->True]; -gateSequence = -{Ancilla[0,1], -CTRLST[{1},{},{}, -{DecMethod[v,action=Range[Max[m,n]-m+2,Max[n,m]+1]]} -], -CTRLST[{},{},Range[Max[m,n]-m+2,Max[n,m]+1], -Map[DecMethod[#,action={1}]&,rList] -] -}; -Return[{gateSequence, Partition[q1,e2n],Partition[q2,e2n]}], + e2n = Dimensions[krausList][[2]]; + {k,n,m} = Log2[Dimensions[krausList]]; + If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; + If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; + If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; + If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; + + q= Flatten[krausList,1]; + + (* If the stacked kraus operators is already a m to n isometry with n<=m+1 *) + If[n+k<=m+1, + If[OptionValue[DecomposeIso]=="None", + Return[{q,None,None}], + DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; + Return[{DecMethod[q],None,None}] + ] + ]; -(* Use QRSplit*) -{r,{q1,q2}} = QRSplit[q]; -If[OptionValue[DecomposeIso]=="None", -Return[{r,Partition[q1,e2n],Partition[q2,e2n]}], (* Partition transform it to a list of kraus *) -DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; -Return[ -{DecMethod[r, action=Range[1,Max[m,n]+1]], -Partition[q1,e2n], -Partition[q2,e2n] -}] -] -] + (* QR or ReducedCSD Decomposition *) + If[OptionValue[DecomposeIso]=="QSD", + + (* Use ReducedCSDSplit*) + DecMethod=QSD; + {v,rList,{q1,q2}}=ReducedCSDSplit[q, EfficientRepresentation->True]; + gateSequence = + {Ancilla[0,1], + CTRLST[{1},{},{}, + {DecMethod[v,action=Range[Max[m,n]-m+2,Max[n,m]+1]]} + ], + CTRLST[{},{},Range[Max[m,n]-m+2,Max[n,m]+1], + Map[DecMethod[#,action={1}]&,rList] + ] + }; + Return[{gateSequence, Partition[q1,e2n],Partition[q2,e2n]}], + + (* Use QRSplit*) + {r,{q1,q2}} = QRSplit[q]; + If[OptionValue[DecomposeIso]=="None", + Return[{r,Partition[q1,e2n],Partition[q2,e2n]}], (* Partition transform it to a list of kraus *) + DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; + Return[ + {DecMethod[r, action=Range[1,Max[m,n]+1]], + Partition[q1,e2n], + Partition[q2,e2n] + }] + ] + ] ] + MeasuredQCM[krausList_,OptionsPattern[{DecomposeIso->"QSD",DecomposeLastIso->"DecIsometry",DoNotReuseAncilla->False}]]:= (*Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; Input: a list of kraus operators {K1,K2,...K_(2^k)}; Output: {{st[r1]} , {st[r21],st[r22]} , {st[r31],st[r32],st[r33],st[r34]} , ..., {st[q1}, st[q2], ..., st[q_(2^k)]}}, where st[g] is the gate sequence of gate g. *) -Module[{SplitResult, gateSequence, DecMethod,l,n,m,k,loopNum, i,v,vList, qList,rList}, -{k,n,m} = Log2[Dimensions[krausList]]; (* (n,m) size of each kraus operator *) -If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; -If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; -If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; -If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; - -(* loopNum = number of iteration with qr decomposition *) -If[mTrue]&, qList],1]; -(* A list bellow contains all gate sequences multiplex controlled by the first i-1 bits*) -vList =SplitResult[[1;;-1;;3]]; (* Zero controlled gate v *) -rList = Flatten[SplitResult[[2;;-1;;3]],1]; (* Matrices with cos and sin elements *) -qList = Flatten[SplitResult[[3;;-1;;3]],1]; (* Isometry for the decomposition in the next round*) - -(* Append results *) -Which[ -OptionValue[DoNotReuseAncilla]==False, -gateSequence=Join[gateSequence, -{CTRLST[{loopNum+1},{},Range[1,i-1], -Map[DecMethod[#,action=Range[loopNum+l+1,loopNum+l+m]]&,vList] -], -CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], -Map[DecMethod[#,action={loopNum+1}]&,rList] -], -Mmt2[i,loopNum+1], -CTRLST[{},{i},{}, -{{NOT[loopNum+1]}} -] -} -], -OptionValue[DoNotReuseAncilla]==True, -gateSequence=Join[gateSequence, -{CTRLST[{i},{},Range[1,i-1], -Map[DecMethod[#,action=Range[k+l+1,k+l+m]]&,vList] -], -CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], -Map[DecMethod[#,action={i}]&,rList] -], -Mmt[i] -} +Module[{SplitResult, gateSequence, DecMethod,l,n,m,k,loopNum, i,v,vList, qList,rList,temp}, + {k,n,m} = Log2[Dimensions[krausList]]; (* (n,m) size of each kraus operator *) + If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; + If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; + If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; + If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; + + (* loopNum = number of iteration with qr decomposition *) + If[mTrue]&, qList],1]; + (* A list bellow contains all gate sequences multiplex controlled by the first i-1 bits*) + vList =SplitResult[[1;;-1;;3]]; (* Zero controlled gate v *) + rList = Flatten[SplitResult[[2;;-1;;3]],1]; (* Matrices with cos and sin elements *) + qList = Flatten[SplitResult[[3;;-1;;3]],1]; (* Isometry for the decomposition in the next round*) + + (* Append results *) + Which[ + OptionValue[DoNotReuseAncilla]==False, + gateSequence=Join[gateSequence, + { + CTRLST[{loopNum+1},{},Range[1,i-1], + Map[DecMethod[#,action=Range[loopNum+l+1,loopNum+l+m]]&,vList] + ], + CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], + Map[DecMethod[#,action={loopNum+1}]&,rList] + ], + Mmt2[i,loopNum+1], + CTRLST[{},{i},{}, + {{NOT[loopNum+1]}} + ] + } + ], + OptionValue[DoNotReuseAncilla]==True, + gateSequence=Join[gateSequence, + { + CTRLST[{i},{},Range[1,i-1], + Map[DecMethod[#,action=Range[k+l+1,k+l+m]]&,vList] + ], + CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], + Map[DecMethod[#,action={i}]&,rList] + ], + Mmt[i] + } + ] + ], + + (* Other decomposition method is choosen*) + OptionValue[DecomposeIso]!="CSD", + DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; + (* Matrix calculation *) + qrSplitResult = Flatten[Map[QRSplit, qList],1]; + rList = qrSplitResult[[1;;-1;;2]]; + qList = Flatten[qrSplitResult[[2;;-1;;2]],1]; + (* Append results *) + Which[ + OptionValue[DoNotReuseAncilla]==False, + gateSequence=Join[gateSequence, + { + CTRLST[{},{},Range[1,i-1], + Map[DecMethod[#,action=Join[{loopNum+1},Range[loopNum+l+1,loopNum+l+m]]]&,rList] + ], + Mmt2[i,loopNum+1], + CTRLST[{},{i},{}, + {{NOT[loopNum+1]}} + ] + } + ], + OptionValue[DoNotReuseAncilla]==True, + gateSequence=Join[gateSequence, + { + CTRLST[{},{},Range[1,i-1], + Map[DecMethod[#,action=Join[{i},Range[loopNum+l+1,loopNum+l+m]]]&,rList] + ], + Mmt[i] + } + ] + ] (* end whether reuse qubit *) + ] (* end which decomposition *) + ]; (* end for loop *) + + + DecMethod=ChooseDecMethod[OptionValue[DecomposeLastIso]]; + AppendTo[gateSequence, + CTRLST[{},{},Range[1,loopNum], + Map[DecMethod[#,Range[loopNum+1,loopNum+l+m]]&, qList] + ] + ]; + Return[gateSequence] ] -], -(* Other decomposition method is choosen*) -OptionValue[DecomposeIso]!="CSD", -DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; -(* Matrix calculation *) -qrSplitResult = Flatten[Map[QRSplit, qList],1]; -rList = qrSplitResult[[1;;-1;;2]]; -qList = Flatten[qrSplitResult[[2;;-1;;2]],1]; -(* Append results *) -Which[ -OptionValue[DoNotReuseAncilla]==False, -gateSequence=Join[gateSequence, -{CTRLST[{},{},Range[1,i-1], -Map[DecMethod[#,action=Join[{loopNum+1},Range[loopNum+l+1,loopNum+l+m]]]&,rList] -], -Mmt2[i,loopNum+1], -CTRLST[{},{i},{}, -{{NOT[loopNum+1]}} -] -} -], -OptionValue[DoNotReuseAncilla]==True, -gateSequence=Join[gateSequence, -{CTRLST[{},{},Range[1,i-1], -Map[DecMethod[#,action=Join[{i},Range[loopNum+l+1,loopNum+l+m]]]&,rList] -], -Mmt[i] -} -] -] (* end whether reuse qubit *) -] (* end which decomposition *) -]; (* end for loop *) - -DecMethod=ChooseDecMethod[OptionValue[DecomposeLastIso]]; -AppendTo[gateSequence, -CTRLST[{},{},Range[1,loopNum], -Map[DecMethod[#,Range[loopNum+1,loopNum+l+m]]&, qList] -] -]; -Return[gateSequence] -] End[]; From 2cfcd6787c55486c6fa3b97ff525e87d9fa06c85 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 14 Jul 2019 23:13:55 +0200 Subject: [PATCH 05/20] ApplyControlled --- UniversalQCompiler.m | 96 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 2396f8e..c5db40c 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -3988,7 +3988,103 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Return[gateSequence] ] +(*###########################################################################*) +(*CreateOperationFromGateList*) +FindUsedQubits[st_]:= Module[{QubitsLabel}, + If[ + st=={}, + QubitsLabel={}, + QubitsLabel=Map[ + If[#[[1]] == -2 || #[[1]] == -1 || #[[1]] == 0, + {#[[2]], #[[3]]}, + #[[3]] + ]&, + st + ] + ]; + Sort @ DeleteDuplicates @ Flatten[QubitsLabel] +] + +(*Remove unused qubits in st qubits{2,5,1}->qubits{2,3,1}*) +RemoveUnusedQubits[st_] := Module[{oldQubitsLabel, newQubitsLabel, asso}, + If[ + Not[MemberQ[Range[-2, 6], #[[1]]]] & @@ st, + Throw[StringForm["Gate type not implemented in RemoveUnusedQubits"]], + ]; + oldQubitsLabel=FindUsedQubits[st]; + newQubitsLabel=Range[Length[oldQubitsLabel]]; + asso=AssociationThread[oldQubitsLabel -> newQubitsLabel]; + Map[ + If[#[[1]] == -2 || #[[1]] == -1 || #[[1]] == 0, + {#[[1]], #[[2]]/.asso, #[[3]]/.asso}, + {#[[1]], #[[2]], #[[3]]/.asso} + ]&, st + ] +] + +(*Create a compact isometry with all not used qubits neglected.*) +CreateCompactIsometryFromList[st_] := Module[{}, + Return[CreateIsometryFromList[RemoveUnusedQubits[st]]]; +] + +(*If the gate is cgs gate, this function maps all the gate in to a gate list to perform some validity check like NumberOfQubits*) +ToSimpleGate[st_] := Module[{}, + Flatten[ + Map[ + (If[#[[1]]==cgs, + Flatten[#[[3]],1], + {#}] + )&, (*This function acts on each gate in the st*) + st], + 1] +] + +(*Each gate matrix must be a m to n qubits isometry of the same size with mnumQubits, + Throw[StringForm["The numQubits number must be larger than the elements in controls and isoTargets"]], + ]; + If[nm"]], + ]; + ids = Complement[Range @ numQubits, controls, isoTargets]; + (*Find new order and check duplication: new order is that the most significant qubits control and the most insignificant qubits are controlled*) + newOrder = Flatten[{controls, ids, isoTargets}]; + If[Length @ Part[Select[Tally @ newOrder, Part[#, 2] > 1 &], All, 1]>0, + Throw[StringForm["There is duplication of the qubits indices in controls and isoTargets."]], + ]; + (*Permute the rows of mat, here is a trick, I don't know how to make ExchangeSystems work for isometry-like matrix, so I use Partition to make it "looks like" a state*) + mat2 = Flatten[#, 1]& @ ExchangeSystems[Partition[mat, 1], newOrder, + ConstantArray[2, Length[newOrder]]]; + (*If n>m (isometry), many entries can be neglected*) + targetMats = Take[Partition[mat, 2^m], ;; ;;2^(n-m)]; (*only m Date: Sun, 21 Jul 2019 22:04:34 +0200 Subject: [PATCH 06/20] CreateIsometryFromList works for QR decompose --- UniversalQCompiler.m | 203 +++++++++++++++++++++++++++++++------------ 1 file changed, 149 insertions(+), 54 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index c5db40c..35b918f 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -153,6 +153,7 @@ RemoveUnusedQubits::usage="TBA" CreateCompactIsometryFromList::usage="TBA" ApplyControl::usage="TBA" +BoxiTest::usage="temp" Begin["`Private`"]; (*Set debug to True to run additional tests during running the methods.*) @@ -267,17 +268,31 @@ (*Transforms a list in list format to a list containing the corresponding matrices*) ListFormToOp[list_,n_:Null]:=Module[{numQubits=n}, -IsListForm[list,"ListFormToOp"]; -If[n==Null,numQubits=If[Dimensions[list]=={3},NumberOfQubits[{list}],NumberOfQubits[list]]];If[Dimensions[list]=={3}, -Which[ -MemberQ[{1,2,3},list[[1]]],RotGateM[list[[2]],list[[1]],list[[3]],numQubits], -list[[1]]==0,CNOTM[list[[2]],list[[3]],numQubits], -list[[1]]==-1,CZM[list[[2]],list[[3]],numQubits], -list[[1]]==-2,If[Dimensions[list[[2]]]!= {},DiagMat[list[[2]],list[[3]],numQubits],Throw[StringForm["Unspecified diagonal gate cannot be represented as a matrix using ListFormToOp[]"]]], -list[[1]]==4,Throw[StringForm["Measurements/Trace cannot be represented by matrices using ListFormToOp[]"]], -(*Boxi TODO: Add here new gate handling*) -MemberQ[{5,6},list[[1]]],Throw[StringForm["Starting in |0> or postselection cannot be represented by matrices using ListFormToOp[]"]] -],ListFormToOp[#,numQubits]&/@list]] + IsListForm[list,"ListFormToOp"]; + If[n==Null, + numQubits=If[Dimensions[list]=={3}, + NumberOfQubits[{list}], + NumberOfQubits[list] + ] + ]; + If[Dimensions[list]=={3}, + Which[ + MemberQ[{1,2,3},list[[1]]], + RotGateM[list[[2]],list[[1]],list[[3]],numQubits], + list[[1]]==0, + CNOTM[list[[2]],list[[3]],numQubits], + list[[1]]==-1, + CZM[list[[2]],list[[3]],numQubits], + list[[1]]==-2, + If[Dimensions[list[[2]]]!= {},DiagMat[list[[2]],list[[3]],numQubits],Throw[StringForm["Unspecified diagonal gate cannot be represented as a matrix using ListFormToOp[]"]]], + list[[1]]==4, + Throw[StringForm["Measurements/Trace cannot be represented by matrices using ListFormToOp[]"]], + MemberQ[{5,6},list[[1]]], + Throw[StringForm["Starting in |0> or postselection cannot be represented by matrices using ListFormToOp[]"]] + ], + ListFormToOp[#,numQubits]&/@list + ] +] (*Transforms a list in list format to a list containing the corresponding string representations of the gates*) ListFormToStr[list_]:= @@ -303,29 +318,65 @@ (* Use FullSimp\[Rule]False to avoid attempts to use FullSimplify *) Options[CreateIsometryFromList]={FullSimp->True}; CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, -IsListForm[st]; -If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[Cases[ToSimpleGate[st],{5,_,_}],Last]; -If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; -If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; -st2=DeleteCases[st,{x_/;x==5,_,_}|{x_/;x==6,_,_}];mat={{1}};k=0; -(*st2 = DeleteCases[st, {x_ /; x == 6, _, _}];*) -For[i=1,i<=n1,i++,mat=KroneckerProduct[mat,If[MemberQ[ancillainnums,i],k++;KetV[ancillainvals[[k]],2],IdentityMatrix[2]]]]; -isAnalytic=True; -For[i=1,i<=Length[st2],i++, -If[isAnalyticGate[st2[[i]]],,isAnalytic=False]; -If[isAnalytic, -If[OptionValue[FullSimp],mat=FullSimplifyNoRoots[ListFormToOp[st2[[i]],n1].mat],mat=Simplify[ListFormToOp[st2[[i]],n1].mat],Print["CreateIsometryFromList: Error"]], -mat=ListFormToOp[st2[[i]],n1].mat + IsListForm[st]; + If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[DeleteDuplicates@Cases[ToSimpleGate[st],{5,_,_}],Last]; + If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; + If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; + st2=DeleteCases[st,{x_/;x==5,_,_}|{x_/;x==6,_,_}];mat={{1}};k=0; + For[i=1,i<=n1,i++, + mat=KroneckerProduct[mat, + If[MemberQ[ancillainnums,i], + k++;KetV[ancillainvals[[k]], + 2 + ],IdentityMatrix[2]] + ] + ]; + isAnalytic=True; + For[i=1,i<=Length[st2],i++, + If[isAnalyticGate[st2[[i]]],,isAnalytic=False]; + If[isAnalytic, + If[OptionValue[FullSimp], + mat=FullSimplifyNoRoots[ApplyGate[st2[[i]], mat, n1]], + mat=Simplify[ApplyGate[st2[[i]], mat, n1]], + Print["CreateIsometryFromList: Error"] + ], + mat=ApplyGate[st2[[i]], mat, n1] + ] + ]; + If[ancillaoutnums=={}, + mat,mat2={{1}}; + k=0; + For[i=1,i<=n1,i++, + (* usually ancillaoutvals will be all 1s, so create ket 0, sometimes (for instrument generation) we want to create ket 1 *) + mat2=KroneckerProduct[mat2, + If[MemberQ[ancillaoutnums,i], + k++;KetV[ancillaoutvals[[k]],2], + IdentityMatrix[2] + ] + ] + ]; + CT[mat2].mat] +] + +(*This is seperated from CreateIsometryFromList to deal with matrix that can be applied efficently to mat without create the whole operator, such as uniformly controlled gate*) +ApplyGate[gate_, mat_, numQubits_]:=Module[{i,j,newOrder}, + Which[ + gate[[1]]==labelCTRLST, + CTRLSTM[gate[[2]],gate[[3]], numQubits, mat], + gate[[1]]==labelMmt2, + i=gate[[2]];j=gate[[3]];newOrder=Range[numQubits];newOrder[[{i,j}]]=newOrder[[{j,i}]]; + Flatten[#, 1] &@ ExchangeSystems[Partition[mat, 1], newOrder, ConstantArray[2, Length[newOrder]]], + True, + ListFormToOp[gate,numQubits].mat + ] ] -]; -If[ancillaoutnums=={},mat,mat2={{1}};k=0;For[i=1,i<=n1,i++,(* usually ancillaoutvals will be all 1s, so create ket 0, sometimes (for instrument generation) we want to create ket 1 *)mat2=KroneckerProduct[mat2,If[MemberQ[ancillaoutnums,i],k++;KetV[ancillaoutvals[[k]],2],IdentityMatrix[2]]]]; -CT[mat2].mat]] (*Create an n qubit isometry from list form. Multiplies the unitaries described in the list (numerically) and outputs the first m columns*) NCreateIsometryFromList[st_,n_:Null]:=CreateIsometryFromList[NGateList[st],n] Options[CreateChannelFromList]={POVM->False,DropZero->True,FullSimp->True}; -CreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,traces,tracesnums,postsel,postselnums,posn,chanout,st2,dims,n1=n},If[Not[OptionValue[POVM]]&&MemberQ[st,{4,1,_}],Print["CreateChannelFromList: measurement gate type found"]]; +CreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,traces,tracesnums,postsel,postselnums,posn,chanout,st2,dims,n1=n}, +If[Not[OptionValue[POVM]]&&MemberQ[st,{4,1,_}],Print["CreateChannelFromList: measurement gate type found"]]; If[n===Null,n1=NumberOfQubits[st]];traces=Cases[st,{4,_,_}];If[traces==={},tracesnums={},tracesnums=Transpose[traces][[3]]];postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];If[Dimensions[Intersection[tracesnums,postselnums]]=={0},,Print["CreateChannelFromList: Cannot postselect on zero and measure/trace on the same qubit."]];st2=DeleteCases[st,{4,_,_}]; mat=CreateIsometryFromList[st2,n1,FullSimp->OptionValue[FullSimp]]; chanout={};posn={};dims={};For[i=1,i<=n1,i++,If[MemberQ[postselnums,i],,If[MemberQ[tracesnums,i],posn=Insert[posn,1,-1];dims=Insert[dims,{1,2},-1],posn=Insert[posn,2,-1];dims=Insert[dims,{2,2},-1]]]];For[i=0,i<=2^(Length[tracesnums])-1,i++,chanout=Insert[chanout,Tensor[BraV[i,2^(Length[tracesnums])],IdentityMatrix[2^(n1-Length[postselnums]-Length[tracesnums])],posn,dims].mat,-1]]; @@ -1970,10 +2021,21 @@ This is fixed in ArcTan2 by ignoring the imaginary part (hence, ArcTan2 should o ]; isAnalyticGate[gate_]:=Module[{}, -If[Length[gate[[2]]]==0,out=Not[MachineNumberQ[gate[[2]]]];,out=True;Do[If[MachineNumberQ[gate[[2]][[i]]],out=False;Goto[LabelEnd]],{i,1,Length[gate[[2]]]}]; -Label[LabelEnd]; -]; -out + Which[Length[gate[[2]]]==0, + out=Not[MachineNumberQ[gate[[2]]]];, + gate[[1]]!=labelCTRLST, + out=True; + Do[ + If[MachineNumberQ[gate[[2]][[i]]], + out=False;Goto[LabelEnd] + ], + {i,1,Length[gate[[2]]]} + ]; + Label[LabelEnd];, + gate[[1]]==labelCTRLST, + out=And @@ isAnalyticGate /@ Flatten[gate[[3]],1]; + ]; + out ] isListEqualOpUpToPhase[st_,mat_,free_:0]:=If[st!={},isIdentityUpToPhase[ConjugateTranspose[mat[[All,1;;2^(Log2[Dimensions[mat][[1]]]-free)]]].(CreateIsometryFromList[st][[All,1;;2^(Log2[Dimensions[mat][[1]]]-free)]])],isIdentityUpToPhase[mat]] @@ -3721,15 +3783,17 @@ outputs set1 and set2 should be equal (may be useful for checking) *) ] IsListFormHelp[gate_,methodName_]:=Module[{}, - If[MemberQ[{-2,-1,0,1,2,3,4,5,6},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; + If[MemberQ[{-2,-1,0,1,2,3,4,5,6,labelMmt2,labelCTRLST},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; Which[ MemberQ[{-2},gate[[1]]],If[gate[[2]]=={}&&gate[[3]]=={},Goto[LabelEnd];];If[Length[Dimensions[gate[[2]]]]==1&&Length[Dimensions[gate[[3]]]]==1,,Throw[StringJoin["The dimensions of the parameter lists of the diagonal gate ",ToString[gate]," appearing in the input of method ",methodName," are not supported."]]]; If[Log2[Length[gate[[2]]]]==Length[gate[[3]]],,Throw[ToString[StringForm["The diagonal gate `1` appearing as an input in method `2` does not contain 2^`3` entries.",gate,methodName,Length[gate[[3]]]]]]], MemberQ[{-1,0},gate[[1]]],If[IntegerQ[gate[[2]]]&&IntegerQ[gate[[3]]],,Throw[StringJoin["There is a control gate ",ToString[gate]," appearing as an input in method ",methodName ," that has a control or a target qubit number that is not an integer."]]]; If[gate[[2]]==gate[[3]],Throw[StringJoin["There is a controlled gate ",ToString[gate]," appearing as an input in method ",methodName ," that has a control qubit number equal to the target qubit number (which is not supported)."]]], MemberQ[{1,2,3},gate[[1]]], If[NumericQ[gate[[2]]]&&IntegerQ[gate[[3]]],,Throw[StringJoin["There is a rotation gate ",ToString[gate]," appering as an input in method ",methodName ," that has a wrong types."]]], - MemberQ[{4,5,6},gate[[1]]],If[MemberQ[{0,1},gate[[2]]]&&IntegerQ[gate[[3]]],,Throw[ToString[StringForm["The gate `1` appearing as an input in method `2` has unknown parameter types.",gate,methodName]]]] - (*Boxi TODO: MemberQ[{cgs},gate[[1]]],Map[IsListFormHelp[#]&,gate[[3]]]*) + MemberQ[{4,5,6},gate[[1]]],If[MemberQ[{0,1},gate[[2]]]&&IntegerQ[gate[[3]]],,Throw[ToString[StringForm["The gate `1` appearing as an input in method `2` has unknown parameter types.",gate,methodName]]]], + MemberQ[{labelCTRLST},gate[[1]]], + Map[IsListFormHelp[#]&,gate[[3]] + ] ]; Label[LabelEnd]; ]; @@ -3739,14 +3803,28 @@ outputs set1 and set2 should be equal (may be useful for checking) *) PrepareForQASM[st_]:=Module[{out,traceouts,traceoutnums,i},out=NGateList[st];If[Cases[out,{5,_,_}]==={},,Print["Notice: ancillas found in the input have been removed. Output gate sequence corresponds to the same operation as the input provided the ancillas in the input sequence start in the correct states."];out=DeleteCases[out,{5,_,_}]];If[Cases[out,{-2,_,_}]==={},,Throw["Error in PrepareForQASM: diagonal gates found in the input, which is not supported by QASM. You may want to decompose them using DecDiagGate[]."];out=DeleteCases[out,{-2,_,_}]];If[Cases[st,{6,_,_}]==={},,Print["Warning: postselection gate found in the input has been removed. Output gate sequence may not be as intended."];out=DeleteCases[out,{6,_,_}]];traceouts=Cases[st,{4,0,_}];If[traceouts==={},,traceoutnums=Transpose[traceouts][[3]];Print["Notice: trace out gate found in the input has been replaced by measurement. Forgetting the outcome will recover the same operation as the input."];out=DeleteCases[out,{4,0,_}];For[i=1,i<=Length[traceoutnums],i++,out=Insert[out,{4,1,traceoutnums[[i]]},-1]]];out] -(*Boxi*) -cgs=100 +(*Boxi definded gates*) +labelDiagGate=-2; +labelCZ=-1; +labelCNOT=0; +labelRX=1; +labelRY=2; +labelRZ=3; +labelMmt=4; +labelInit=5; +labelPostSelect=6; +labelMmt2=7; +labelNOT=8; +labelBit=9; +labelCTRLST=100; +SimpleGate={labelDiagGate,labelCZ,labelCNOT,labelRX,labelRY,labelRZ,labelMmt,labelInit,labelPostSelect,labelMmt2,labelNOT,labelBit} + Mmt2[j_,i_]:={7,j,i}; NOT[i_]:={8,,i}; Bit[p_,i_]:={9,p,i}; CTRLST[z_,o_,u_,stList_]:=Module[{}, If[Length[stList]==2^Length[u],,Throw[StringForm["Invalid use of controlled sequence, Length[stList]\[Equal]Length[u] is not fulfilled"]]]; -Return[{cgs, {z,o,u},stList} ] +Return[{labelCTRLST, {z,o,u},stList} ] ] (*MeasuredQCM*) @@ -3924,10 +4002,10 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], Map[DecMethod[#,action={loopNum+1}]&,rList] ], - Mmt2[i,loopNum+1], - CTRLST[{},{i},{}, + Mmt2[i,loopNum+1] + (*CTRLST[{},{i},{}, {{NOT[loopNum+1]}} - ] + ]*) } ], OptionValue[DoNotReuseAncilla]==True, @@ -3959,10 +4037,10 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE CTRLST[{},{},Range[1,i-1], Map[DecMethod[#,action=Join[{loopNum+1},Range[loopNum+l+1,loopNum+l+m]]]&,rList] ], - Mmt2[i,loopNum+1], - CTRLST[{},{i},{}, + Mmt2[i,loopNum+1] + (*CTRLST[{},{i},{}, {{NOT[loopNum+1]}} - ] + ]*) } ], OptionValue[DoNotReuseAncilla]==True, @@ -3991,12 +4069,17 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE (*###########################################################################*) (*CreateOperationFromGateList*) -FindUsedQubits[st_]:= Module[{QubitsLabel}, +FindUsedBits[st_]:= Module[{QubitsLabel,implementedGate}, + implementedGate={labelDiagGate,labelCZ,labelCNOT,labelRX,labelRY,labelRZ,labelMmt,labelInit,labelPostSelect,labelMmt2}; + If[ + Not[AllTrue[st, MemberQ[implementedGate, #[[1]]] &]], + Throw[StringForm["Gate type not implemented in FindUsedBits"]], + ]; If[ st=={}, QubitsLabel={}, QubitsLabel=Map[ - If[#[[1]] == -2 || #[[1]] == -1 || #[[1]] == 0, + If[MemberQ[{labelDiagGate,labelCZ,labelCNOT,labelMmt2}, #[[1]]], {#[[2]], #[[3]]}, #[[3]] ]&, @@ -4008,15 +4091,16 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE (*Remove unused qubits in st qubits{2,5,1}->qubits{2,3,1}*) RemoveUnusedQubits[st_] := Module[{oldQubitsLabel, newQubitsLabel, asso}, + implementedGate={labelDiagGate,labelCZ,labelCNOT,labelRX,labelRY,labelRZ,labelMmt,labelInit,labelPostSelect}; If[ - Not[MemberQ[Range[-2, 6], #[[1]]]] & @@ st, + Not[AllTrue[st, MemberQ[implementedGate, #[[1]]] &]], Throw[StringForm["Gate type not implemented in RemoveUnusedQubits"]], ]; - oldQubitsLabel=FindUsedQubits[st]; + oldQubitsLabel=FindUsedBits[st]; newQubitsLabel=Range[Length[oldQubitsLabel]]; asso=AssociationThread[oldQubitsLabel -> newQubitsLabel]; Map[ - If[#[[1]] == -2 || #[[1]] == -1 || #[[1]] == 0, + If[MemberQ[{labelDiagGate,labelCZ,labelCNOT}, #[[1]]], {#[[1]], #[[2]]/.asso, #[[3]]/.asso}, {#[[1]], #[[2]], #[[3]]/.asso} ]&, st @@ -4028,11 +4112,11 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Return[CreateIsometryFromList[RemoveUnusedQubits[st]]]; ] -(*If the gate is cgs gate, this function maps all the gate in to a gate list to perform some validity check like NumberOfQubits*) +(*If the gate is labelCTRLST gate, this function maps all the gate in to a gate list to perform some validity check like NumberOfQubits*) ToSimpleGate[st_] := Module[{}, Flatten[ Map[ - (If[#[[1]]==cgs, + (If[#[[1]]==labelCTRLST, Flatten[#[[3]],1], {#}] )&, (*This function acts on each gate in the st*) @@ -4059,12 +4143,12 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Throw[StringForm["The program only works for m to n qubits isometry with n>m"]], ]; ids = Complement[Range @ numQubits, controls, isoTargets]; - (*Find new order and check duplication: new order is that the most significant qubits control and the most insignificant qubits are controlled*) + (*Find new order and check duplication: the new order is that the most significant qubits control and the most insignificant qubits are controlled*) newOrder = Flatten[{controls, ids, isoTargets}]; If[Length @ Part[Select[Tally @ newOrder, Part[#, 2] > 1 &], All, 1]>0, Throw[StringForm["There is duplication of the qubits indices in controls and isoTargets."]], ]; - (*Permute the rows of mat, here is a trick, I don't know how to make ExchangeSystems work for isometry-like matrix, so I use Partition to make it "looks like" a state*) + (*Permute the rows of mat, here is a trick, ExchangeSystems doesn't work for isometry, so I use Partition to make it "looks like" a state, and only do row permuation*) mat2 = Flatten[#, 1]& @ ExchangeSystems[Partition[mat, 1], newOrder, ConstantArray[2, Length[newOrder]]]; (*If n>m (isometry), many entries can be neglected*) @@ -4082,10 +4166,21 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE CTRLSTM[controls_,stList_, numQubits_, mat_]:=Module[{zeroControls,oneControls,multiControls, gates, isoTargets}, {zeroControls,oneControls,multiControls}=controls; gates = CreateCompactIsometryFromList[#] & /@ stList; - isoTargets = DeleteDuplicates @ Flatten[FindUsedQubits /@ stList]; + isoTargets = DeleteDuplicates @ Flatten[FindUsedBits /@ stList]; ApplyControl[{gates, multiControls, isoTargets, numQubits}, mat] ] +BoxiTest[st_]:=Module[ + {}, + IsListFormHelp[#, "UNKNOWN"]& /@ st; + IsListForm[st]; + isAnalyticGate /@ st; + ListFormToOp[DeleteCases[st,{4,_,_}]]; + CreateIsometryFromList[DeleteCases[st,{4,_,_}]]; + CreateInstrumentFromList[st] + (* + *) +] End[]; EndPackage[] From d821a7d872d10c3e4224c2ba42738e9f21c88e00 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sat, 21 Sep 2019 11:26:31 +0800 Subject: [PATCH 07/20] temp --- UniversalQCompiler.m | 367 +++++++++++++++++++++++++------------------ 1 file changed, 216 insertions(+), 151 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 35b918f..54afc4f 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -317,9 +317,12 @@ (*Create an n qubit isometry from list form. Multiplies the unitaries described in the list (in reversed order!) and outputs the first m columns*) (* Use FullSimp\[Rule]False to avoid attempts to use FullSimplify *) Options[CreateIsometryFromList]={FullSimp->True}; -CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, +CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n, mmt2}, IsListForm[st]; If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[DeleteDuplicates@Cases[ToSimpleGate[st],{5,_,_}],Last]; + Print[ancillain]; + (* Deal with Mmt2 {7,j,i}, if i is in ancillain, we add j *) + mmt2 = Case{st, {7,_,_}}; If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; st2=DeleteCases[st,{x_/;x==5,_,_}|{x_/;x==6,_,_}];mat={{1}};k=0; @@ -386,10 +389,51 @@ NCreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateIsometryFromList[NGateList[st],n,{POVM->OptionValue[POVM],DropZero->OptionValue[DropZero]}] Options[CreateInstrumentFromList]={DropZero->True,FullSimp->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) -CreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,j,traces,tracesnums,postsel,postselnums,posn,mmt,mmtnums,inst,chanout,st2,st3,digs,dims,n1=n}, -If[n===Null,n1=NumberOfQubits[st]];traces=Cases[st,{4,0,_}];If[traces==={},tracesnums={},tracesnums=Transpose[traces][[3]]];postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];mmt=Cases[st,{4,1,_}];If[mmt==={},mmtnums={},mmtnums=Transpose[mmt][[3]]];If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0},,Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."]];inst={};st2=DeleteCases[st,{4,1,_}]; -For[j=1,j<=2^(Length[mmtnums]),j++,digs=IntegerDigits[j-1,2,Length[mmtnums]];st3=st2;For[i=1,i<=Length[mmtnums],i++,st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1]]; -inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1]];inst] +CreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,j,traces,tracesnums,postsel,postselnums,posn,mmt,mmtnums,mmtnums2,inst,chanout,st2,st3,digs,dims,n1=n}, + If[n===Null, + n1=NumberOfQubits[ToSimpleGate[st]] + ]; + traces=Cases[st,{4,0,_}]; + If[traces==={}, + tracesnums={}, + tracesnums=Transpose[traces][[3]] + ]; + postsel=Cases[st,{6,_,_}]; + If[postsel==={}, + postselnums={}, + postselnums=Transpose[postsel][[3]] + ]; + (*This is modified for the new gate Mmt2 {7,j,i}. The program needs to know that j is a classical bit. Mmt1 in the form of {4,1,_} is deleted here later, but {7,j,i} can not because we need to do the bit exchange i->j*) + mmt=Cases[st,{4,1,_}]; + If[mmt==={}, + mmtnums={}, + mmtnums=Transpose[mmt][[3]] + ]; + (* + mmt2=Cases[st,{7,_,_}]; + If[mmt2==={}, + mmtnums2={}, + mmtnums2=Transpose[mmt2][[2]] + ]; + mmtnums=Join[mmtnums, mmtnums2]; + *) + If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0}, + , + Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."] + ]; + inst={}; + st2=DeleteCases[st,{4,1,_}]; + For[j=1,j<=2^(Length[mmtnums]),j++, + digs=IntegerDigits[j-1,2,Length[mmtnums]]; + st3=st2; + For[i=1,i<=Length[mmtnums],i++, + st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1] + ]; + Print[st3]; + inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1] + ]; + inst +] Options[NCreateInstrumentFromList]={DropZero->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) NCreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateInstrumentFromList[NGateList[st],n,{DropZero->OptionValue[DropZero]}] @@ -1663,24 +1707,34 @@ Decomposes a diagonal gate (up to gloabal phase) into single qubit gates, Rz and (*Except[_?OptionQ] is a trick to allow for optional arguments (together with options). Without this trick, having something like f[x_,y:Null,OptionsPattern[]]:=... would give an error calling f[x,option\[Rule]optionValue]*) DecUnitary2Qubits[u_,action:Except[_?OptionQ]:Null,OptionsPattern[]]:= Module[{actionQ,diag,st,qBits}, -IsQubitIsometry[u,"DecUnitary2Qubits"]; -qBits=2; -actionQ= -Switch[action, -Null,Range[qBits], -_, action -]; -If[OptionValue[UpToDiagonal]==True, -{diag,st}=DecUnitary2QubitsHelp[SimplifyTrigo[u],2,{UpToDiagonal->OptionValue[UpToDiagonal],precision->OptionValue[precision],FullSimp->OptionValue[FullSimp]}]; -st=RelabelQubits[st,{1,2},{2,1}]; -If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; -Append[If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]],{-2,diag,actionQ}] -, -st=DecUnitary2QubitsHelp[SimplifyTrigo[u],2,{UpToDiagonal->OptionValue[UpToDiagonal],precision->OptionValue[precision],FullSimp->OptionValue[FullSimp]}]; -st=RelabelQubits[st,{1,2},{2,1}]; -If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; -If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]] -]] + IsQubitIsometry[u,"DecUnitary2Qubits"]; + qBits=2; + actionQ= + Switch[ + action, + Null, + Range[qBits], + _, + action + ]; + If[OptionValue[UpToDiagonal]==True, + {diag,st}=DecUnitary2QubitsHelp[ + SimplifyTrigo[u], + 2, + {UpToDiagonal->OptionValue[UpToDiagonal], + precision->OptionValue[precision], + FullSimp->OptionValue[FullSimp]} + ]; + st=RelabelQubits[st,{1,2},{2,1}]; + If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; + Append[If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]],{-2,diag,actionQ}] + , + st=DecUnitary2QubitsHelp[SimplifyTrigo[u],2,{UpToDiagonal->OptionValue[UpToDiagonal],precision->OptionValue[precision],FullSimp->OptionValue[FullSimp]}]; + st=RelabelQubits[st,{1,2},{2,1}]; + If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; + If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]] + ] +] (*-------------------------------------------Decomposition of two qubit gates (private) --------------------------------------------*) (*ToDo: Make some of the following methods public and tidy up the code (e.g., never use the notation that the first @@ -1863,74 +1917,74 @@ The Mathematica documentation does not gurantee any ordering for complex numbers [Notation for DecUnitary2QubitsHelp is such that the most significant qubit in the two qubit gate is labelled n while the least significant is labelled n-1]*) Options[DecUnitary2QubitsHelp] = { UpToDiagonal -> False, precision -> 10^-10,FullSimp->True}; DecUnitary2QubitsHelp[u_, n_, OptionsPattern[]]:= Module[{m,det,su,diag,gu,realTraceU,traceFixingMatrix,eigenVals,st,threeCnotsInOutput}, -m={{1,0,0,I},{0,I,1,0},{0,I,-1,0},{1,0,0,-I}}/Sqrt[2]; -det=Simplify[Det[u]]; -su=Simplify[u*ConjSimplify[det^(1/4)]]; -gu=Simplify[Gam[su]]; -eigenVals = If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[gu]],Simplify[Eigenvalues[gu]]]; -(* -by construction su is an su(4) matrix -we now check if su requires 0, 1 or 2 cnots to decompose -*) -(*Prop III.1 - no cnots needed if \[Chi][\[Gamma][u]](x) = (x+1)^4 or (x-1)^4*) -If[ Fold[And, Map[Abs[#-1] < OptionValue[precision] &,N[eigenVals]]] || Fold[And,Map[Abs[#+1] < OptionValue[precision]&,N[eigenVals]]], -Module[{m1, m2,a1,b1,c1,d1,a2,b2,c2,d2}, -If[analyzeAnalyticDecUnitary2Qubits, -Print["Matrix su in DecUnitary2QubitsHelp (case: zero C-NOTs): ",su] -]; -{m1, m2} = KronFactorUnitaryDim4[su,FullSimp->OptionValue[FullSimp]]; -{d1,c1,b1,a1} = ZYZDecomposition[m1]; -{d2,c2,b2,a2}= ZYZDecomposition[m2]; -st = { -{3,b1,n}, -{2,c1,n}, -{3,d1,n}, -{3,b2,n-1}, -{2,c2,n-1}, -{3,d2,n-1} -}; - -If[OptionValue[UpToDiagonal], -Return[{{1,1,1,1}, st}], -Return[st] -]; -]; -]; + m={{1,0,0,I},{0,I,1,0},{0,I,-1,0},{1,0,0,-I}}/Sqrt[2]; + det=Simplify[Det[u]]; + su=Simplify[u*ConjSimplify[det^(1/4)]]; + gu=Simplify[Gam[su]]; + eigenVals = If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[gu]],Simplify[Eigenvalues[gu]]]; + (* + by construction su is an su(4) matrix + we now check if su requires 0, 1 or 2 cnots to decompose + *) + (*Prop III.1 - no cnots needed if \[Chi][\[Gamma][u]](x) = (x+1)^4 or (x-1)^4*) + If[ Fold[And, Map[Abs[#-1] < OptionValue[precision] &,N[eigenVals]]] || Fold[And,Map[Abs[#+1] < OptionValue[precision]&,N[eigenVals]]], + Module[{m1, m2,a1,b1,c1,d1,a2,b2,c2,d2}, + If[analyzeAnalyticDecUnitary2Qubits, + Print["Matrix su in DecUnitary2QubitsHelp (case: zero C-NOTs): ",su] + ]; + {m1, m2} = KronFactorUnitaryDim4[su,FullSimp->OptionValue[FullSimp]]; + {d1,c1,b1,a1} = ZYZDecomposition[m1]; + {d2,c2,b2,a2}= ZYZDecomposition[m2]; + st = { + {3,b1,n}, + {2,c1,n}, + {3,d1,n}, + {3,b2,n-1}, + {2,c2,n-1}, + {3,d2,n-1} + }; + + If[OptionValue[UpToDiagonal], + Return[{{1,1,1,1}, st}], + Return[st] + ]; + ]; + ]; (*Prop III.2 - one cnot needed if \[Chi][\[Gamma][u]](x) = (x+I)^2(x-I)^2*) -If[Length[Select[N[eigenVals], Abs[# - I] < OptionValue[precision] &]] == 2 && Length[Select[N[eigenVals], Abs[# + I] < OptionValue[precision] &]] == 2, -Return[Module[{a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, -If[analyzeAnalyticDecUnitary2Qubits, -Print["Matrix su in DecUnitary2QubitsHelp (case: one C-NOTs): ",su] -]; -{a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,CNOTM[1,2,2],OptionValue[precision],OptionValue[FullSimp]]; -{d1,c1,b1,a1} = ZYZDecomposition[a]; -{d2,c2,b2,a2} = ZYZDecomposition[b]; -{d3,c3,b3,a3} = ZYZDecomposition[c]; -{d4,c4,b4,a4} = ZYZDecomposition[d]; -st = { -{3,b1,n}, -{2,c1,n}, -{3,d1,n}, -{3,b2,n-1}, -{2,c2,n-1}, -{3,d2,n-1}, -{0,n,n-1}, -{3,b3,n}, -{2,c3,n}, -{3,d3,n}, -{3,b4,n-1}, -{2,c4,n-1}, -{3,d4,n-1} -}; - -If[OptionValue[UpToDiagonal], -{{1,1,1,1}, st}, -st -] -] -] -]; + If[Length[Select[N[eigenVals], Abs[# - I] < OptionValue[precision] &]] == 2 && Length[Select[N[eigenVals], Abs[# + I] < OptionValue[precision] &]] == 2, + Return[Module[{a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, + If[analyzeAnalyticDecUnitary2Qubits, + Print["Matrix su in DecUnitary2QubitsHelp (case: one C-NOTs): ",su] + ]; + {a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,CNOTM[1,2,2],OptionValue[precision],OptionValue[FullSimp]]; + {d1,c1,b1,a1} = ZYZDecomposition[a]; + {d2,c2,b2,a2} = ZYZDecomposition[b]; + {d3,c3,b3,a3} = ZYZDecomposition[c]; + {d4,c4,b4,a4} = ZYZDecomposition[d]; + st = { + {3,b1,n}, + {2,c1,n}, + {3,d1,n}, + {3,b2,n-1}, + {2,c2,n-1}, + {3,d2,n-1}, + {0,n,n-1}, + {3,b3,n}, + {2,c3,n}, + {3,d3,n}, + {3,b4,n-1}, + {2,c4,n-1}, + {3,d4,n-1} + }; + + If[OptionValue[UpToDiagonal], + {{1,1,1,1}, st}, + st + ] + ] + ] + ]; (*We now require two C-NOTS*) (* @@ -1938,67 +1992,67 @@ by construction su is an su(4) matrix we can fix this, at the cost of being out by a diagonal gate *) -If[Abs[Im[Tr[N[Gam[su]]]]] > OptionValue[precision] && OptionValue[UpToDiagonal], -traceFixingMatrix = Simplify[RealTrace3[su]]; -su = Simplify[traceFixingMatrix.su]; -, -traceFixingMatrix = IdentityMatrix[4]; -]; - -If[Abs[Im[Tr[N[Gam[su]]]]] < OptionValue[precision], -(*Prop III.3 - two cnot needed if Tr[\[Gamma][u]] is real*) -Module[{x1,x2,del,phi,eVals,v,a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, -eVals = Sort[If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[Gam[su]]],Simplify[Eigenvalues[Gam[su]]]],ComplexOrderingFunction]; -x1=Arg[eVals[[1]]]; -x2=Arg[eVals[[3]]]; -If[OptionValue[FullSimp], -del=Arg[FullSimplifyNoRoots[eVals[[1]]*eVals[[3]]]]/2; -phi=Arg[FullSimplifyNoRoots[eVals[[1]]/eVals[[3]]]]/2,del=Arg[Simplify[eVals[[1]]*eVals[[3]]]]/2; -phi=Arg[Simplify[eVals[[1]]/eVals[[3]]]]/2]; -v=CNOTM[2,1,2].KroneckerProduct[SimplifyTrigo[RotGate[del,3]],SimplifyTrigo[RotGate[phi,1]]].CNOTM[2,1,2]; -If[analyzeAnalyticDecUnitary2Qubits, -Print["Matrix su in DecUnitary2QubitsHelp (case: two C-NOTs): ",su]; -Print["Matrix v in DecUnitary2QubitsHelp (case: two C-NOTs): ",v] -]; -{a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,v,OptionValue[precision],OptionValue[FullSimp]]; -{d1,c1,b1,a1} = ZYZDecomposition[a]; -{d2,c2,b2,a2} = ZYZDecomposition[b]; -{d3,c3,b3,a3} = ZYZDecomposition[c]; -{d4,c4,b4,a4} = ZYZDecomposition[d]; -st = { -{3,b1,n}, -{2,c1,n}, -{3,d1,n}, -{3,b2,n-1}, -{2,c2,n-1}, -{3,d2,n-1}, -{0,n-1,n}, -{3,del,n}, -{1,phi,n-1}, -{0,n-1,n}, -{3,b3,n}, -{2,c3,n}, -{3,d3,n}, -{3,b4,n-1}, -{2,c4,n-1}, -{3,d4,n-1} -}; -If[OptionValue[UpToDiagonal], -Return[{Conjugate[Diagonal[traceFixingMatrix]], st}], -Return[st] -]; -]; -]; + If[Abs[Im[Tr[N[Gam[su]]]]] > OptionValue[precision] && OptionValue[UpToDiagonal], + traceFixingMatrix = Simplify[RealTrace3[su]]; + su = Simplify[traceFixingMatrix.su]; + , + traceFixingMatrix = IdentityMatrix[4]; + ]; -(* -Otherwise we need three cnots -see "http://web.eecs.umich.edu/~imarkov/pubs/jour/pra04-univ.pdf" - Minimal Universal Two-Qubit CNOT -based Circuits Theorem VI.3 -*) -su = CNOTM[1,2,2].su; -traceFixingMatrix = Simplify[RealTrace3[su]]; -su = Simplify[traceFixingMatrix.su]; -st = DecUnitary2QubitsHelp[su, n, {precision-> OptionValue[precision], UpToDiagonal->False,FullSimp->OptionValue[FullSimp]}]; -Return[Join[{{3,-Arg[traceFixingMatrix[[1,1]]/traceFixingMatrix[[2,2]]],n-1}, {0,n,n-1}}, st]]; + If[Abs[Im[Tr[N[Gam[su]]]]] < OptionValue[precision], + (*Prop III.3 - two cnot needed if Tr[\[Gamma][u]] is real*) + Module[{x1,x2,del,phi,eVals,v,a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, + eVals = Sort[If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[Gam[su]]],Simplify[Eigenvalues[Gam[su]]]],ComplexOrderingFunction]; + x1=Arg[eVals[[1]]]; + x2=Arg[eVals[[3]]]; + If[OptionValue[FullSimp], + del=Arg[FullSimplifyNoRoots[eVals[[1]]*eVals[[3]]]]/2; + phi=Arg[FullSimplifyNoRoots[eVals[[1]]/eVals[[3]]]]/2,del=Arg[Simplify[eVals[[1]]*eVals[[3]]]]/2; + phi=Arg[Simplify[eVals[[1]]/eVals[[3]]]]/2]; + v=CNOTM[2,1,2].KroneckerProduct[SimplifyTrigo[RotGate[del,3]],SimplifyTrigo[RotGate[phi,1]]].CNOTM[2,1,2]; + If[analyzeAnalyticDecUnitary2Qubits, + Print["Matrix su in DecUnitary2QubitsHelp (case: two C-NOTs): ",su]; + Print["Matrix v in DecUnitary2QubitsHelp (case: two C-NOTs): ",v] + ]; + {a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,v,OptionValue[precision],OptionValue[FullSimp]]; + {d1,c1,b1,a1} = ZYZDecomposition[a]; + {d2,c2,b2,a2} = ZYZDecomposition[b]; + {d3,c3,b3,a3} = ZYZDecomposition[c]; + {d4,c4,b4,a4} = ZYZDecomposition[d]; + st = { + {3,b1,n}, + {2,c1,n}, + {3,d1,n}, + {3,b2,n-1}, + {2,c2,n-1}, + {3,d2,n-1}, + {0,n-1,n}, + {3,del,n}, + {1,phi,n-1}, + {0,n-1,n}, + {3,b3,n}, + {2,c3,n}, + {3,d3,n}, + {3,b4,n-1}, + {2,c4,n-1}, + {3,d4,n-1} + }; + If[OptionValue[UpToDiagonal], + Return[{Conjugate[Diagonal[traceFixingMatrix]], st}], + Return[st] + ]; + ]; + ]; + + (* + Otherwise we need three cnots + see "http://web.eecs.umich.edu/~imarkov/pubs/jour/pra04-univ.pdf" - Minimal Universal Two-Qubit CNOT -based Circuits Theorem VI.3 + *) + su = CNOTM[1,2,2].su; + traceFixingMatrix = Simplify[RealTrace3[su]]; + su = Simplify[traceFixingMatrix.su]; + st = DecUnitary2QubitsHelp[su, n, {precision-> OptionValue[precision], UpToDiagonal->False,FullSimp->OptionValue[FullSimp]}]; + Return[Join[{{3,-Arg[traceFixingMatrix[[1,1]]/traceFixingMatrix[[2,2]]],n-1}, {0,n,n-1}}, st]]; ]; (*-------------------------------------------Basic helper methods (private) --------------------------------------------*) @@ -4170,15 +4224,26 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ApplyControl[{gates, multiControls, isoTargets, numQubits}, mat] ] +(*Find the input ancilla qubits, the cgs gate with {100,_,_} is treated separately*) +FindAncillain[st_] := Module[{result, result2, cgsSt}, + result = Cases[st, {5, _, _}]; + cgsSt = Cases[st, {100, _, _}]; + result2 = + DeleteDuplicates @ + Flatten[Map[FindAncillain, #[[3]]] & /@ cgsSt, 2]; + result = Join[result, result2]; + Return[result]; + ] + BoxiTest[st_]:=Module[ {}, IsListFormHelp[#, "UNKNOWN"]& /@ st; IsListForm[st]; isAnalyticGate /@ st; ListFormToOp[DeleteCases[st,{4,_,_}]]; - CreateIsometryFromList[DeleteCases[st,{4,_,_}]]; - CreateInstrumentFromList[st] + CreateIsometryFromList[DeleteCases[st,{4,_,_}]] (* + CreateInstrumentFromList[st] *) ] End[]; From 3e75896e8d04e2e22493f58ee37c42eaa4f29256 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 13 Oct 2019 10:31:53 +0200 Subject: [PATCH 08/20] CreateIsometryFromList works for QR --- UniversalQCompiler.m | 103 ++++++++++++++++++++++++++++++++----------- 1 file changed, 78 insertions(+), 25 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 54afc4f..443a9b1 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -153,7 +153,10 @@ RemoveUnusedQubits::usage="TBA" CreateCompactIsometryFromList::usage="TBA" ApplyControl::usage="TBA" +FindAncilla::usage="TBA" BoxiTest::usage="temp" +TestCreateIsometryFromList1::usage="TBA" + Begin["`Private`"]; (*Set debug to True to run additional tests during running the methods.*) @@ -319,10 +322,8 @@ Options[CreateIsometryFromList]={FullSimp->True}; CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n, mmt2}, IsListForm[st]; - If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[DeleteDuplicates@Cases[ToSimpleGate[st],{5,_,_}],Last]; - Print[ancillain]; - (* Deal with Mmt2 {7,j,i}, if i is in ancillain, we add j *) - mmt2 = Case{st, {7,_,_}}; + If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[FindAncilla[st],Last]; + (* Deal with Mmt2 {labelMmt2,j,i}, if i is in ancillain, we add j *) If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; st2=DeleteCases[st,{x_/;x==5,_,_}|{x_/;x==6,_,_}];mat={{1}};k=0; @@ -364,8 +365,10 @@ (*This is seperated from CreateIsometryFromList to deal with matrix that can be applied efficently to mat without create the whole operator, such as uniformly controlled gate*) ApplyGate[gate_, mat_, numQubits_]:=Module[{i,j,newOrder}, Which[ + (*Multi-controled gate*) gate[[1]]==labelCTRLST, CTRLSTM[gate[[2]],gate[[3]], numQubits, mat], + (*Measure and store the result*) gate[[1]]==labelMmt2, i=gate[[2]];j=gate[[3]];newOrder=Range[numQubits];newOrder[[{i,j}]]=newOrder[[{j,i}]]; Flatten[#, 1] &@ ExchangeSystems[Partition[mat, 1], newOrder, ConstantArray[2, Length[newOrder]]], @@ -382,6 +385,7 @@ If[Not[OptionValue[POVM]]&&MemberQ[st,{4,1,_}],Print["CreateChannelFromList: measurement gate type found"]]; If[n===Null,n1=NumberOfQubits[st]];traces=Cases[st,{4,_,_}];If[traces==={},tracesnums={},tracesnums=Transpose[traces][[3]]];postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];If[Dimensions[Intersection[tracesnums,postselnums]]=={0},,Print["CreateChannelFromList: Cannot postselect on zero and measure/trace on the same qubit."]];st2=DeleteCases[st,{4,_,_}]; mat=CreateIsometryFromList[st2,n1,FullSimp->OptionValue[FullSimp]]; +Print[mat]; chanout={};posn={};dims={};For[i=1,i<=n1,i++,If[MemberQ[postselnums,i],,If[MemberQ[tracesnums,i],posn=Insert[posn,1,-1];dims=Insert[dims,{1,2},-1],posn=Insert[posn,2,-1];dims=Insert[dims,{2,2},-1]]]];For[i=0,i<=2^(Length[tracesnums])-1,i++,chanout=Insert[chanout,Tensor[BraV[i,2^(Length[tracesnums])],IdentityMatrix[2^(n1-Length[postselnums]-Length[tracesnums])],posn,dims].mat,-1]]; If[OptionValue[DropZero],For[i=Length[chanout],i>=1,i--,If[Chop[chanout[[i]]]==0*chanout[[i]],chanout=Drop[chanout,{i}]]]];chanout] @@ -429,7 +433,6 @@ For[i=1,i<=Length[mmtnums],i++, st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1] ]; - Print[st3]; inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1] ]; inst @@ -3856,7 +3859,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) PrepareForQASM[st_]:=Module[{out,traceouts,traceoutnums,i},out=NGateList[st];If[Cases[out,{5,_,_}]==={},,Print["Notice: ancillas found in the input have been removed. Output gate sequence corresponds to the same operation as the input provided the ancillas in the input sequence start in the correct states."];out=DeleteCases[out,{5,_,_}]];If[Cases[out,{-2,_,_}]==={},,Throw["Error in PrepareForQASM: diagonal gates found in the input, which is not supported by QASM. You may want to decompose them using DecDiagGate[]."];out=DeleteCases[out,{-2,_,_}]];If[Cases[st,{6,_,_}]==={},,Print["Warning: postselection gate found in the input has been removed. Output gate sequence may not be as intended."];out=DeleteCases[out,{6,_,_}]];traceouts=Cases[st,{4,0,_}];If[traceouts==={},,traceoutnums=Transpose[traceouts][[3]];Print["Notice: trace out gate found in the input has been replaced by measurement. Forgetting the outcome will recover the same operation as the input."];out=DeleteCases[out,{4,0,_}];For[i=1,i<=Length[traceoutnums],i++,out=Insert[out,{4,1,traceoutnums[[i]]},-1]]];out] - +(*####################################################################*) (*Boxi definded gates*) labelDiagGate=-2; labelCZ=-1; @@ -3873,13 +3876,10 @@ outputs set1 and set2 should be equal (may be useful for checking) *) labelCTRLST=100; SimpleGate={labelDiagGate,labelCZ,labelCNOT,labelRX,labelRY,labelRZ,labelMmt,labelInit,labelPostSelect,labelMmt2,labelNOT,labelBit} -Mmt2[j_,i_]:={7,j,i}; -NOT[i_]:={8,,i}; -Bit[p_,i_]:={9,p,i}; -CTRLST[z_,o_,u_,stList_]:=Module[{}, - If[Length[stList]==2^Length[u],,Throw[StringForm["Invalid use of controlled sequence, Length[stList]\[Equal]Length[u] is not fulfilled"]]]; -Return[{labelCTRLST, {z,o,u},stList} ] -] +Mmt2[j_,i_]:={labelMmt2,j,i}; +NOT[i_]:={labelNOT,,i}; +Bit[p_,i_]:={labelBit,p,i}; +CTRLST[z_,o_,u_,stList_]:=Module[{}, Return[{labelCTRLST, {z,o,u}, stList}]] (*MeasuredQCM*) QRSplit[v_]:= @@ -4143,7 +4143,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Sort @ DeleteDuplicates @ Flatten[QubitsLabel] ] -(*Remove unused qubits in st qubits{2,5,1}->qubits{2,3,1}*) +(*Remove unused qubits in st: e.g. qubits{2,5,1}->qubits{2,3,1}*) RemoveUnusedQubits[st_] := Module[{oldQubitsLabel, newQubitsLabel, asso}, implementedGate={labelDiagGate,labelCZ,labelCNOT,labelRX,labelRY,labelRZ,labelMmt,labelInit,labelPostSelect}; If[ @@ -4225,14 +4225,24 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] (*Find the input ancilla qubits, the cgs gate with {100,_,_} is treated separately*) -FindAncillain[st_] := Module[{result, result2, cgsSt}, - result = Cases[st, {5, _, _}]; - cgsSt = Cases[st, {100, _, _}]; - result2 = - DeleteDuplicates @ - Flatten[Map[FindAncillain, #[[3]]] & /@ cgsSt, 2]; - result = Join[result, result2]; - Return[result]; + +FindAncilla[st_] := + Module[{result, gate, ancilla, ancilla1, ancilla2, mmt2List, anciPos}, + result = {}; + Do[ + Which[ + gate[[1]] == labelInit, + AppendTo[result, gate], + gate[[1]] == labelCTRLST, + ancilla2 = DeleteDuplicates@Flatten[FindAncilla /@ gate[[3]], 1]; + result = Join[result, ancilla2], + gate[[1]] == labelMmt2, + anciPos = Position[result, {5, _, gate[[3]]}]; + If[Length[anciPos] >= 1, result[[Last@anciPos]][[3]] = gate[[2]]]; + ], + {gate, st} + ]; + Return[result] ] BoxiTest[st_]:=Module[ @@ -4240,12 +4250,55 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE IsListFormHelp[#, "UNKNOWN"]& /@ st; IsListForm[st]; isAnalyticGate /@ st; - ListFormToOp[DeleteCases[st,{4,_,_}]]; - CreateIsometryFromList[DeleteCases[st,{4,_,_}]] + ListFormToOp[DeleteCases[st,{labelMmt,_,_}]]; + CreateIsometryFromList[DeleteCases[st,{labelMmt,_,_}]] + CreateChannelFromList[st] (* - CreateInstrumentFromList[st] *) ] + +(*##########################################################*) + +TestCreateIsometryFromList1[] := Module[{m, n, check, krausList, st1, m1}, + m = 2; + n = 4; + krausList = RPickRandomChannel[m, n, 2]; + (* no ancilla*) + check = True; + st1 = MeasuredQCM[krausList, DecomposeIso -> "DecIsometry", + DoNotReuseAncilla -> True]; + result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; + {m1, m2} = Partition[result, n]; + m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); + m2 = m2/(m2[[1,1]]/krausList[[2,1,1]]); + If[isZeroMatrix[Chop[m1-krausList[[1]]]], ,check=False]; + If[isZeroMatrix[Chop[m2-krausList[[2]]]], ,check=False]; + If[check, ,"Error in QR dec without ancilla"]; + + Return[check] + ] + +TestCreateIsometryFromList2[] := Module[{m, n, check, krausList, st1, m1}, + m = 2; + n = 4; + krausList = RPickRandomChannel[m, n, 2]; + Print[krausList]; + (* with ancilla*) + check = True; + st1 = MeasuredQCM[krausList, DecomposeIso -> "DecIsometry"]; + result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; + {m1, m2} = Partition[result, n]; + m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); + m2 = m2/(m2[[1,1]]/krausList[[2,1,1]]); + Print[m1]; + If[isZeroMatrix[Chop[m1-krausList[[1]]]], ,check=False]; + If[isZeroMatrix[Chop[m2-krausList[[2]]]], ,check=False]; + If[check, ,"Error in QR dec without ancilla"]; + + Return[check] + ] +(*####################################################################*) + End[]; EndPackage[] From 98610044fb1fc20747766f420ca6a7b2206d9672 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 13 Oct 2019 10:33:48 +0200 Subject: [PATCH 09/20] revert temp --- UniversalQCompiler.m | 348 ++++++++++++++++++------------------------- 1 file changed, 149 insertions(+), 199 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 443a9b1..8f336ae 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -320,7 +320,7 @@ (*Create an n qubit isometry from list form. Multiplies the unitaries described in the list (in reversed order!) and outputs the first m columns*) (* Use FullSimp\[Rule]False to avoid attempts to use FullSimplify *) Options[CreateIsometryFromList]={FullSimp->True}; -CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n, mmt2}, +CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, IsListForm[st]; If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[FindAncilla[st],Last]; (* Deal with Mmt2 {labelMmt2,j,i}, if i is in ancillain, we add j *) @@ -393,50 +393,10 @@ NCreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateIsometryFromList[NGateList[st],n,{POVM->OptionValue[POVM],DropZero->OptionValue[DropZero]}] Options[CreateInstrumentFromList]={DropZero->True,FullSimp->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) -CreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,j,traces,tracesnums,postsel,postselnums,posn,mmt,mmtnums,mmtnums2,inst,chanout,st2,st3,digs,dims,n1=n}, - If[n===Null, - n1=NumberOfQubits[ToSimpleGate[st]] - ]; - traces=Cases[st,{4,0,_}]; - If[traces==={}, - tracesnums={}, - tracesnums=Transpose[traces][[3]] - ]; - postsel=Cases[st,{6,_,_}]; - If[postsel==={}, - postselnums={}, - postselnums=Transpose[postsel][[3]] - ]; - (*This is modified for the new gate Mmt2 {7,j,i}. The program needs to know that j is a classical bit. Mmt1 in the form of {4,1,_} is deleted here later, but {7,j,i} can not because we need to do the bit exchange i->j*) - mmt=Cases[st,{4,1,_}]; - If[mmt==={}, - mmtnums={}, - mmtnums=Transpose[mmt][[3]] - ]; - (* - mmt2=Cases[st,{7,_,_}]; - If[mmt2==={}, - mmtnums2={}, - mmtnums2=Transpose[mmt2][[2]] - ]; - mmtnums=Join[mmtnums, mmtnums2]; - *) - If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0}, - , - Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."] - ]; - inst={}; - st2=DeleteCases[st,{4,1,_}]; - For[j=1,j<=2^(Length[mmtnums]),j++, - digs=IntegerDigits[j-1,2,Length[mmtnums]]; - st3=st2; - For[i=1,i<=Length[mmtnums],i++, - st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1] - ]; - inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1] - ]; - inst -] +CreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,j,traces,tracesnums,postsel,postselnums,posn,mmt,mmtnums,inst,chanout,st2,st3,digs,dims,n1=n}, +If[n===Null,n1=NumberOfQubits[st]];traces=Cases[st,{4,0,_}];If[traces==={},tracesnums={},tracesnums=Transpose[traces][[3]]];postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];mmt=Cases[st,{4,1,_}];If[mmt==={},mmtnums={},mmtnums=Transpose[mmt][[3]]];If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0},,Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."]];inst={};st2=DeleteCases[st,{4,1,_}]; +For[j=1,j<=2^(Length[mmtnums]),j++,digs=IntegerDigits[j-1,2,Length[mmtnums]];st3=st2;For[i=1,i<=Length[mmtnums],i++,st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1]]; +inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1]];inst] Options[NCreateInstrumentFromList]={DropZero->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) NCreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateInstrumentFromList[NGateList[st],n,{DropZero->OptionValue[DropZero]}] @@ -1710,34 +1670,24 @@ Decomposes a diagonal gate (up to gloabal phase) into single qubit gates, Rz and (*Except[_?OptionQ] is a trick to allow for optional arguments (together with options). Without this trick, having something like f[x_,y:Null,OptionsPattern[]]:=... would give an error calling f[x,option\[Rule]optionValue]*) DecUnitary2Qubits[u_,action:Except[_?OptionQ]:Null,OptionsPattern[]]:= Module[{actionQ,diag,st,qBits}, - IsQubitIsometry[u,"DecUnitary2Qubits"]; - qBits=2; - actionQ= - Switch[ - action, - Null, - Range[qBits], - _, - action - ]; - If[OptionValue[UpToDiagonal]==True, - {diag,st}=DecUnitary2QubitsHelp[ - SimplifyTrigo[u], - 2, - {UpToDiagonal->OptionValue[UpToDiagonal], - precision->OptionValue[precision], - FullSimp->OptionValue[FullSimp]} - ]; - st=RelabelQubits[st,{1,2},{2,1}]; - If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; - Append[If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]],{-2,diag,actionQ}] - , - st=DecUnitary2QubitsHelp[SimplifyTrigo[u],2,{UpToDiagonal->OptionValue[UpToDiagonal],precision->OptionValue[precision],FullSimp->OptionValue[FullSimp]}]; - st=RelabelQubits[st,{1,2},{2,1}]; - If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; - If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]] - ] -] +IsQubitIsometry[u,"DecUnitary2Qubits"]; +qBits=2; +actionQ= +Switch[action, +Null,Range[qBits], +_, action +]; +If[OptionValue[UpToDiagonal]==True, +{diag,st}=DecUnitary2QubitsHelp[SimplifyTrigo[u],2,{UpToDiagonal->OptionValue[UpToDiagonal],precision->OptionValue[precision],FullSimp->OptionValue[FullSimp]}]; +st=RelabelQubits[st,{1,2},{2,1}]; +If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; +Append[If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]],{-2,diag,actionQ}] +, +st=DecUnitary2QubitsHelp[SimplifyTrigo[u],2,{UpToDiagonal->OptionValue[UpToDiagonal],precision->OptionValue[precision],FullSimp->OptionValue[FullSimp]}]; +st=RelabelQubits[st,{1,2},{2,1}]; +If[actionQ==Range[qBits],,st=RelabelQubits[st,Range[qBits],actionQ]]; +If[OptionValue[Simp],SimplifyGateList[Reverse[st],FullSimp->OptionValue[FullSimp]],Reverse[st]] +]] (*-------------------------------------------Decomposition of two qubit gates (private) --------------------------------------------*) (*ToDo: Make some of the following methods public and tidy up the code (e.g., never use the notation that the first @@ -1920,74 +1870,74 @@ The Mathematica documentation does not gurantee any ordering for complex numbers [Notation for DecUnitary2QubitsHelp is such that the most significant qubit in the two qubit gate is labelled n while the least significant is labelled n-1]*) Options[DecUnitary2QubitsHelp] = { UpToDiagonal -> False, precision -> 10^-10,FullSimp->True}; DecUnitary2QubitsHelp[u_, n_, OptionsPattern[]]:= Module[{m,det,su,diag,gu,realTraceU,traceFixingMatrix,eigenVals,st,threeCnotsInOutput}, - m={{1,0,0,I},{0,I,1,0},{0,I,-1,0},{1,0,0,-I}}/Sqrt[2]; - det=Simplify[Det[u]]; - su=Simplify[u*ConjSimplify[det^(1/4)]]; - gu=Simplify[Gam[su]]; - eigenVals = If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[gu]],Simplify[Eigenvalues[gu]]]; - (* - by construction su is an su(4) matrix - we now check if su requires 0, 1 or 2 cnots to decompose - *) - (*Prop III.1 - no cnots needed if \[Chi][\[Gamma][u]](x) = (x+1)^4 or (x-1)^4*) - If[ Fold[And, Map[Abs[#-1] < OptionValue[precision] &,N[eigenVals]]] || Fold[And,Map[Abs[#+1] < OptionValue[precision]&,N[eigenVals]]], - Module[{m1, m2,a1,b1,c1,d1,a2,b2,c2,d2}, - If[analyzeAnalyticDecUnitary2Qubits, - Print["Matrix su in DecUnitary2QubitsHelp (case: zero C-NOTs): ",su] - ]; - {m1, m2} = KronFactorUnitaryDim4[su,FullSimp->OptionValue[FullSimp]]; - {d1,c1,b1,a1} = ZYZDecomposition[m1]; - {d2,c2,b2,a2}= ZYZDecomposition[m2]; - st = { - {3,b1,n}, - {2,c1,n}, - {3,d1,n}, - {3,b2,n-1}, - {2,c2,n-1}, - {3,d2,n-1} - }; - - If[OptionValue[UpToDiagonal], - Return[{{1,1,1,1}, st}], - Return[st] - ]; - ]; - ]; +m={{1,0,0,I},{0,I,1,0},{0,I,-1,0},{1,0,0,-I}}/Sqrt[2]; +det=Simplify[Det[u]]; +su=Simplify[u*ConjSimplify[det^(1/4)]]; +gu=Simplify[Gam[su]]; +eigenVals = If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[gu]],Simplify[Eigenvalues[gu]]]; +(* +by construction su is an su(4) matrix +we now check if su requires 0, 1 or 2 cnots to decompose +*) +(*Prop III.1 - no cnots needed if \[Chi][\[Gamma][u]](x) = (x+1)^4 or (x-1)^4*) +If[ Fold[And, Map[Abs[#-1] < OptionValue[precision] &,N[eigenVals]]] || Fold[And,Map[Abs[#+1] < OptionValue[precision]&,N[eigenVals]]], +Module[{m1, m2,a1,b1,c1,d1,a2,b2,c2,d2}, +If[analyzeAnalyticDecUnitary2Qubits, +Print["Matrix su in DecUnitary2QubitsHelp (case: zero C-NOTs): ",su] +]; +{m1, m2} = KronFactorUnitaryDim4[su,FullSimp->OptionValue[FullSimp]]; +{d1,c1,b1,a1} = ZYZDecomposition[m1]; +{d2,c2,b2,a2}= ZYZDecomposition[m2]; +st = { +{3,b1,n}, +{2,c1,n}, +{3,d1,n}, +{3,b2,n-1}, +{2,c2,n-1}, +{3,d2,n-1} +}; + +If[OptionValue[UpToDiagonal], +Return[{{1,1,1,1}, st}], +Return[st] +]; +]; +]; (*Prop III.2 - one cnot needed if \[Chi][\[Gamma][u]](x) = (x+I)^2(x-I)^2*) - If[Length[Select[N[eigenVals], Abs[# - I] < OptionValue[precision] &]] == 2 && Length[Select[N[eigenVals], Abs[# + I] < OptionValue[precision] &]] == 2, - Return[Module[{a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, - If[analyzeAnalyticDecUnitary2Qubits, - Print["Matrix su in DecUnitary2QubitsHelp (case: one C-NOTs): ",su] - ]; - {a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,CNOTM[1,2,2],OptionValue[precision],OptionValue[FullSimp]]; - {d1,c1,b1,a1} = ZYZDecomposition[a]; - {d2,c2,b2,a2} = ZYZDecomposition[b]; - {d3,c3,b3,a3} = ZYZDecomposition[c]; - {d4,c4,b4,a4} = ZYZDecomposition[d]; - st = { - {3,b1,n}, - {2,c1,n}, - {3,d1,n}, - {3,b2,n-1}, - {2,c2,n-1}, - {3,d2,n-1}, - {0,n,n-1}, - {3,b3,n}, - {2,c3,n}, - {3,d3,n}, - {3,b4,n-1}, - {2,c4,n-1}, - {3,d4,n-1} - }; - - If[OptionValue[UpToDiagonal], - {{1,1,1,1}, st}, - st - ] - ] - ] - ]; +If[Length[Select[N[eigenVals], Abs[# - I] < OptionValue[precision] &]] == 2 && Length[Select[N[eigenVals], Abs[# + I] < OptionValue[precision] &]] == 2, +Return[Module[{a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, +If[analyzeAnalyticDecUnitary2Qubits, +Print["Matrix su in DecUnitary2QubitsHelp (case: one C-NOTs): ",su] +]; +{a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,CNOTM[1,2,2],OptionValue[precision],OptionValue[FullSimp]]; +{d1,c1,b1,a1} = ZYZDecomposition[a]; +{d2,c2,b2,a2} = ZYZDecomposition[b]; +{d3,c3,b3,a3} = ZYZDecomposition[c]; +{d4,c4,b4,a4} = ZYZDecomposition[d]; +st = { +{3,b1,n}, +{2,c1,n}, +{3,d1,n}, +{3,b2,n-1}, +{2,c2,n-1}, +{3,d2,n-1}, +{0,n,n-1}, +{3,b3,n}, +{2,c3,n}, +{3,d3,n}, +{3,b4,n-1}, +{2,c4,n-1}, +{3,d4,n-1} +}; + +If[OptionValue[UpToDiagonal], +{{1,1,1,1}, st}, +st +] +] +] +]; (*We now require two C-NOTS*) (* @@ -1995,67 +1945,67 @@ by construction su is an su(4) matrix we can fix this, at the cost of being out by a diagonal gate *) - If[Abs[Im[Tr[N[Gam[su]]]]] > OptionValue[precision] && OptionValue[UpToDiagonal], - traceFixingMatrix = Simplify[RealTrace3[su]]; - su = Simplify[traceFixingMatrix.su]; - , - traceFixingMatrix = IdentityMatrix[4]; - ]; - - If[Abs[Im[Tr[N[Gam[su]]]]] < OptionValue[precision], - (*Prop III.3 - two cnot needed if Tr[\[Gamma][u]] is real*) - Module[{x1,x2,del,phi,eVals,v,a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, - eVals = Sort[If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[Gam[su]]],Simplify[Eigenvalues[Gam[su]]]],ComplexOrderingFunction]; - x1=Arg[eVals[[1]]]; - x2=Arg[eVals[[3]]]; - If[OptionValue[FullSimp], - del=Arg[FullSimplifyNoRoots[eVals[[1]]*eVals[[3]]]]/2; - phi=Arg[FullSimplifyNoRoots[eVals[[1]]/eVals[[3]]]]/2,del=Arg[Simplify[eVals[[1]]*eVals[[3]]]]/2; - phi=Arg[Simplify[eVals[[1]]/eVals[[3]]]]/2]; - v=CNOTM[2,1,2].KroneckerProduct[SimplifyTrigo[RotGate[del,3]],SimplifyTrigo[RotGate[phi,1]]].CNOTM[2,1,2]; - If[analyzeAnalyticDecUnitary2Qubits, - Print["Matrix su in DecUnitary2QubitsHelp (case: two C-NOTs): ",su]; - Print["Matrix v in DecUnitary2QubitsHelp (case: two C-NOTs): ",v] - ]; - {a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,v,OptionValue[precision],OptionValue[FullSimp]]; - {d1,c1,b1,a1} = ZYZDecomposition[a]; - {d2,c2,b2,a2} = ZYZDecomposition[b]; - {d3,c3,b3,a3} = ZYZDecomposition[c]; - {d4,c4,b4,a4} = ZYZDecomposition[d]; - st = { - {3,b1,n}, - {2,c1,n}, - {3,d1,n}, - {3,b2,n-1}, - {2,c2,n-1}, - {3,d2,n-1}, - {0,n-1,n}, - {3,del,n}, - {1,phi,n-1}, - {0,n-1,n}, - {3,b3,n}, - {2,c3,n}, - {3,d3,n}, - {3,b4,n-1}, - {2,c4,n-1}, - {3,d4,n-1} - }; - If[OptionValue[UpToDiagonal], - Return[{Conjugate[Diagonal[traceFixingMatrix]], st}], - Return[st] - ]; - ]; - ]; +If[Abs[Im[Tr[N[Gam[su]]]]] > OptionValue[precision] && OptionValue[UpToDiagonal], +traceFixingMatrix = Simplify[RealTrace3[su]]; +su = Simplify[traceFixingMatrix.su]; +, +traceFixingMatrix = IdentityMatrix[4]; +]; + +If[Abs[Im[Tr[N[Gam[su]]]]] < OptionValue[precision], +(*Prop III.3 - two cnot needed if Tr[\[Gamma][u]] is real*) +Module[{x1,x2,del,phi,eVals,v,a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,a4,b4,c4,d4}, +eVals = Sort[If[OptionValue[FullSimp],FullSimplifyNoRoots[Eigenvalues[Gam[su]]],Simplify[Eigenvalues[Gam[su]]]],ComplexOrderingFunction]; +x1=Arg[eVals[[1]]]; +x2=Arg[eVals[[3]]]; +If[OptionValue[FullSimp], +del=Arg[FullSimplifyNoRoots[eVals[[1]]*eVals[[3]]]]/2; +phi=Arg[FullSimplifyNoRoots[eVals[[1]]/eVals[[3]]]]/2,del=Arg[Simplify[eVals[[1]]*eVals[[3]]]]/2; +phi=Arg[Simplify[eVals[[1]]/eVals[[3]]]]/2]; +v=CNOTM[2,1,2].KroneckerProduct[SimplifyTrigo[RotGate[del,3]],SimplifyTrigo[RotGate[phi,1]]].CNOTM[2,1,2]; +If[analyzeAnalyticDecUnitary2Qubits, +Print["Matrix su in DecUnitary2QubitsHelp (case: two C-NOTs): ",su]; +Print["Matrix v in DecUnitary2QubitsHelp (case: two C-NOTs): ",v] +]; +{a,b,c,d} = TwoQubitFindMatchingProductMatrices[su,v,OptionValue[precision],OptionValue[FullSimp]]; +{d1,c1,b1,a1} = ZYZDecomposition[a]; +{d2,c2,b2,a2} = ZYZDecomposition[b]; +{d3,c3,b3,a3} = ZYZDecomposition[c]; +{d4,c4,b4,a4} = ZYZDecomposition[d]; +st = { +{3,b1,n}, +{2,c1,n}, +{3,d1,n}, +{3,b2,n-1}, +{2,c2,n-1}, +{3,d2,n-1}, +{0,n-1,n}, +{3,del,n}, +{1,phi,n-1}, +{0,n-1,n}, +{3,b3,n}, +{2,c3,n}, +{3,d3,n}, +{3,b4,n-1}, +{2,c4,n-1}, +{3,d4,n-1} +}; +If[OptionValue[UpToDiagonal], +Return[{Conjugate[Diagonal[traceFixingMatrix]], st}], +Return[st] +]; +]; +]; - (* - Otherwise we need three cnots - see "http://web.eecs.umich.edu/~imarkov/pubs/jour/pra04-univ.pdf" - Minimal Universal Two-Qubit CNOT -based Circuits Theorem VI.3 - *) - su = CNOTM[1,2,2].su; - traceFixingMatrix = Simplify[RealTrace3[su]]; - su = Simplify[traceFixingMatrix.su]; - st = DecUnitary2QubitsHelp[su, n, {precision-> OptionValue[precision], UpToDiagonal->False,FullSimp->OptionValue[FullSimp]}]; - Return[Join[{{3,-Arg[traceFixingMatrix[[1,1]]/traceFixingMatrix[[2,2]]],n-1}, {0,n,n-1}}, st]]; +(* +Otherwise we need three cnots +see "http://web.eecs.umich.edu/~imarkov/pubs/jour/pra04-univ.pdf" - Minimal Universal Two-Qubit CNOT -based Circuits Theorem VI.3 +*) +su = CNOTM[1,2,2].su; +traceFixingMatrix = Simplify[RealTrace3[su]]; +su = Simplify[traceFixingMatrix.su]; +st = DecUnitary2QubitsHelp[su, n, {precision-> OptionValue[precision], UpToDiagonal->False,FullSimp->OptionValue[FullSimp]}]; +Return[Join[{{3,-Arg[traceFixingMatrix[[1,1]]/traceFixingMatrix[[2,2]]],n-1}, {0,n,n-1}}, st]]; ]; (*-------------------------------------------Basic helper methods (private) --------------------------------------------*) From ad170174928ee51233d8aa5317e79b933a8e2578 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 13 Oct 2019 17:02:45 +0200 Subject: [PATCH 10/20] CreateOperationFromGateList works for QR --- UniversalQCompiler.m | 105 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 88 insertions(+), 17 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 8f336ae..544b804 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -156,6 +156,8 @@ FindAncilla::usage="TBA" BoxiTest::usage="temp" TestCreateIsometryFromList1::usage="TBA" +CreateIsometryFromList::usage="TBA" +CreateInstrumentFromList::usage="TBA" Begin["`Private`"]; @@ -382,32 +384,103 @@ Options[CreateChannelFromList]={POVM->False,DropZero->True,FullSimp->True}; CreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,traces,tracesnums,postsel,postselnums,posn,chanout,st2,dims,n1=n}, -If[Not[OptionValue[POVM]]&&MemberQ[st,{4,1,_}],Print["CreateChannelFromList: measurement gate type found"]]; -If[n===Null,n1=NumberOfQubits[st]];traces=Cases[st,{4,_,_}];If[traces==={},tracesnums={},tracesnums=Transpose[traces][[3]]];postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];If[Dimensions[Intersection[tracesnums,postselnums]]=={0},,Print["CreateChannelFromList: Cannot postselect on zero and measure/trace on the same qubit."]];st2=DeleteCases[st,{4,_,_}]; -mat=CreateIsometryFromList[st2,n1,FullSimp->OptionValue[FullSimp]]; -Print[mat]; -chanout={};posn={};dims={};For[i=1,i<=n1,i++,If[MemberQ[postselnums,i],,If[MemberQ[tracesnums,i],posn=Insert[posn,1,-1];dims=Insert[dims,{1,2},-1],posn=Insert[posn,2,-1];dims=Insert[dims,{2,2},-1]]]];For[i=0,i<=2^(Length[tracesnums])-1,i++,chanout=Insert[chanout,Tensor[BraV[i,2^(Length[tracesnums])],IdentityMatrix[2^(n1-Length[postselnums]-Length[tracesnums])],posn,dims].mat,-1]]; -If[OptionValue[DropZero],For[i=Length[chanout],i>=1,i--,If[Chop[chanout[[i]]]==0*chanout[[i]],chanout=Drop[chanout,{i}]]]];chanout] + If[Not[OptionValue[POVM]]&&MemberQ[st,{4,1,_}], + Print["CreateChannelFromList: measurement gate type found"] + ]; + If[n===Null, + n1=NumberOfQubits[ToSimpleGate[st]]]; + traces=Cases[st,{4,_,_}]; + If[traces==={},tracesnums={}, + tracesnums=Transpose[traces][[3]] + ]; + postsel=Cases[st,{6,_,_}]; + If[postsel==={}, + postselnums={}, + postselnums=Transpose[postsel][[3]] + ]; + If[Dimensions[Intersection[tracesnums,postselnums]]=={0}, + , + Print["CreateChannelFromList: Cannot postselect on zero and measure/trace on the same qubit."] + ]; + st2=DeleteCases[st,{4,_,_}]; + mat=CreateIsometryFromList[st2,n1,FullSimp->OptionValue[FullSimp]]; + chanout={}; + posn={}; + dims={}; + For[i=1,i<=n1,i++, + If[MemberQ[postselnums,i], + , + If[MemberQ[tracesnums,i], + posn=Insert[posn,1,-1];dims=Insert[dims,{1,2},-1], + posn=Insert[posn,2,-1];dims=Insert[dims,{2,2},-1]] + ] + ]; + For[i=0,i<=2^(Length[tracesnums])-1,i++, + chanout=Insert[chanout,Tensor[BraV[i,2^(Length[tracesnums])],IdentityMatrix[2^(n1-Length[postselnums]-Length[tracesnums])],posn,dims].mat,-1] + ]; + If[OptionValue[DropZero], + For[i=Length[chanout],i>=1,i--, + If[Chop[chanout[[i]]]==0*chanout[[i]], + chanout=Drop[chanout,{i}] + ] + ] + ]; + chanout +] Options[NCreateChannelFromList]={POVM->False,DropZero->True}; NCreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateIsometryFromList[NGateList[st],n,{POVM->OptionValue[POVM],DropZero->OptionValue[DropZero]}] Options[CreateInstrumentFromList]={DropZero->True,FullSimp->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) CreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,j,traces,tracesnums,postsel,postselnums,posn,mmt,mmtnums,inst,chanout,st2,st3,digs,dims,n1=n}, -If[n===Null,n1=NumberOfQubits[st]];traces=Cases[st,{4,0,_}];If[traces==={},tracesnums={},tracesnums=Transpose[traces][[3]]];postsel=Cases[st,{6,_,_}];If[postsel==={},postselnums={},postselnums=Transpose[postsel][[3]]];mmt=Cases[st,{4,1,_}];If[mmt==={},mmtnums={},mmtnums=Transpose[mmt][[3]]];If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0},,Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."]];inst={};st2=DeleteCases[st,{4,1,_}]; -For[j=1,j<=2^(Length[mmtnums]),j++,digs=IntegerDigits[j-1,2,Length[mmtnums]];st3=st2;For[i=1,i<=Length[mmtnums],i++,st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1]]; -inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1]];inst] + (*if there is a (7,_,_) gate, add a (4,1,_) gate at the end for correct number of channels. We cannot delete (7,_,_) since they are used in creating the isometry.*) + If[n===Null, + n1=NumberOfQubits[ToSimpleGate[st]] + ]; + traces=Cases[st,{4,0,_}]; + If[traces==={}, + tracesnums={}, + tracesnums=Transpose[traces][[3]] + ]; + postsel=Cases[st,{6,_,_}]; + If[postsel==={}, + postselnums={}, + postselnums=Transpose[postsel][[3]] + ]; + mmt2=Cases[st, {7,1,2}]; + pesudoSt=Join[st, mmt2/.{7,x_,_}->{4,1,x}]; + mmt=Cases[pesudoSt,{4,1,_}]; + If[mmt==={}, + mmtnums={}, + mmtnums=Transpose[mmt][[3]] + ]; + If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0}, + , + Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."] + ]; + inst={}; + st2=DeleteCases[st,{4,1,_}]; + For[j=1,j<=2^(Length[mmtnums]),j++, + digs=IntegerDigits[j-1,2,Length[mmtnums] + ]; + st3=st2; + For[i=1,i<=Length[mmtnums], + i++,st3=Insert[st3,{6,digs[[i]],mmtnums[[i]]},-1] + ]; + inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1]]; + inst +] Options[NCreateInstrumentFromList]={DropZero->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) NCreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateInstrumentFromList[NGateList[st],n,{DropZero->OptionValue[DropZero]}] (*ToDo: Improve efficiency by implementing the application of C-NOTs and single-qubit rotations efficiently*) Options[CreateOperationFromGateList]={FullSimp->True}; -CreateOperationFromGateList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{four0s,four1s},four1s=MemberQ[st,{4,1,_}]; +CreateOperationFromGateList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{four0s,four1s},four1s=(MemberQ[st,{4,1,_}] || MemberQ[st,{7,_,_}]); If[four1s,CreateInstrumentFromList[st,n,{DropZero->False,FullSimp->OptionValue[FullSimp]}],four0s=MemberQ[st,{4,0,_}]; If[four0s,CreateChannelFromList[st,n,FullSimp->OptionValue[FullSimp]],CreateIsometryFromList[st,n,FullSimp->OptionValue[FullSimp]]]]] -NCreateOperationFromGateList[st_,n_: Null]:=Module[{four0s,four1s},four1s=MemberQ[st,{4,1,_}]; +NCreateOperationFromGateList[st_,n_: Null]:=Module[{four0s,four1s},four1s=(MemberQ[st,{4,1,_}] || MemberQ[st,{7,_,_}]); If[four1s,NCreateInstrumentFromList[st,n,DropZero->False],four0s=MemberQ[st,{4,0,_}]; If[four0s,NCreateChannelFromList[st,n],NCreateIsometryFromList[st,n]]]] @@ -4058,7 +4131,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] ] (* end whether reuse qubit *) ] (* end which decomposition *) - ]; (* end for loop *) + ]; (* end for the loop *) DecMethod=ChooseDecMethod[OptionValue[DecomposeLastIso]]; @@ -4201,10 +4274,8 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE IsListForm[st]; isAnalyticGate /@ st; ListFormToOp[DeleteCases[st,{labelMmt,_,_}]]; - CreateIsometryFromList[DeleteCases[st,{labelMmt,_,_}]] - CreateChannelFromList[st] - (* - *) + CreateChannelFromList[st]; + CreateInstrumentFromList[st] ] (*##########################################################*) @@ -4216,7 +4287,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE (* no ancilla*) check = True; st1 = MeasuredQCM[krausList, DecomposeIso -> "DecIsometry", - DoNotReuseAncilla -> True]; + DoNotReuseAncilla -> False]; result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; {m1, m2} = Partition[result, n]; m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); From f5cfec7229be22c74071bbb47a313183d92e346d Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Wed, 16 Oct 2019 13:35:46 +0200 Subject: [PATCH 11/20] CreateOperationFromGateList works for CSD without reusing qutbis --- UniversalQCompiler.m | 110 +++++++++++++++++++++++++++++++------------ 1 file changed, 80 insertions(+), 30 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 544b804..c4dda54 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -150,7 +150,7 @@ DecChannelRecursively::usage="TBA" MeasuredQCM::usage="TBA" CTRLSTM::usage="TBA" -RemoveUnusedQubits::usage="TBA" +RepalceQubitsInd::usage="TBA" CreateCompactIsometryFromList::usage="TBA" ApplyControl::usage="TBA" FindAncilla::usage="TBA" @@ -324,7 +324,7 @@ Options[CreateIsometryFromList]={FullSimp->True}; CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, IsListForm[st]; - If[n===Null,n1=NumberOfQubits[ToSimpleGate[st]]];ancillain=SortBy[FindAncilla[st],Last]; + If[n===Null,n1=NumberOfQubits[st]];ancillain=SortBy[FindAncilla[st],Last]; (* Deal with Mmt2 {labelMmt2,j,i}, if i is in ancillain, we add j *) If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; @@ -388,7 +388,7 @@ Print["CreateChannelFromList: measurement gate type found"] ]; If[n===Null, - n1=NumberOfQubits[ToSimpleGate[st]]]; + n1=NumberOfQubits[st]]; traces=Cases[st,{4,_,_}]; If[traces==={},tracesnums={}, tracesnums=Transpose[traces][[3]] @@ -435,7 +435,7 @@ CreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,j,traces,tracesnums,postsel,postselnums,posn,mmt,mmtnums,inst,chanout,st2,st3,digs,dims,n1=n}, (*if there is a (7,_,_) gate, add a (4,1,_) gate at the end for correct number of channels. We cannot delete (7,_,_) since they are used in creating the isometry.*) If[n===Null, - n1=NumberOfQubits[ToSimpleGate[st]] + n1=NumberOfQubits[st] ]; traces=Cases[st,{4,0,_}]; If[traces==={}, @@ -2310,14 +2310,21 @@ This is fixed in ArcTan2 by ignoring the imaginary part (hence, ArcTan2 should o )] (*Finds the highest qubit number in st (on which is acted non trivially)*) -NumberOfQubits[st_]:=Module[{},( -If[st=={},0, -Max[Map[ If[#[[1]] == -1 || #[[1]] == 0, -Max[#[[2]], #[[3]]], -If[#[[1]]==-2,Max[#[[3]]], - #[[3]]]] & ,st]] - ] - )] +NumberOfQubits[st_]:=Module[{}, + If[st == {}, 0, Max[ + Which[ + #[[1]] == labelCZ || #[[1]] == labelCNOT, + Max[#[[2]], + #[[3]]], + #[[1]] == labelDiagGate, + Max[#[[3]]], + #[[1]] == labelCTRLST, + Max[Max[Flatten[#[[2]], 1]], NumberOfQubits[ToSimpleGate[{#}]]], + True, + #[[3]] + ]& /@ st] + ] +] (*------------------------------------------- Adapted matrix decompositions (private)--------------------------------------------*) @@ -4054,7 +4061,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If[mqubits{2,3,1}*) -RemoveUnusedQubits[st_] := Module[{oldQubitsLabel, newQubitsLabel, asso}, +RepalceQubitsInd[st_, asso_] := Module[{oldQubitsLabel, newQubitsLabel}, implementedGate={labelDiagGate,labelCZ,labelCNOT,labelRX,labelRY,labelRZ,labelMmt,labelInit,labelPostSelect}; If[ Not[AllTrue[st, MemberQ[implementedGate, #[[1]]] &]], - Throw[StringForm["Gate type not implemented in RemoveUnusedQubits"]], + Throw[StringForm["Gate type not implemented in RepalceQubitsInd"]], ]; - oldQubitsLabel=FindUsedBits[st]; - newQubitsLabel=Range[Length[oldQubitsLabel]]; - asso=AssociationThread[oldQubitsLabel -> newQubitsLabel]; Map[ If[MemberQ[{labelDiagGate,labelCZ,labelCNOT}, #[[1]]], {#[[1]], #[[2]]/.asso, #[[3]]/.asso}, @@ -4185,8 +4189,9 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] (*Create a compact isometry with all not used qubits neglected.*) -CreateCompactIsometryFromList[st_] := Module[{}, - Return[CreateIsometryFromList[RemoveUnusedQubits[st]]]; +CreateCompactIsometryFromList[st_, targetQubits_] := Module[{asso, st2}, + asso = AssociationThread[Sort[targetQubits] -> Range[Length[targetQubits]]]; + Return[CreateIsometryFromList[RepalceQubitsInd[st, asso]]]; ] (*If the gate is labelCTRLST gate, this function maps all the gate in to a gate list to perform some validity check like NumberOfQubits*) @@ -4201,6 +4206,22 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE 1] ] +BoxiNumberOfQubits[st_] := Module[{}, + If[st == {}, 0, Max[ + Which[ + #[[1]] == labelCZ || #[[1]] == labelCNOT, + Max[#[[2]], + #[[3]]], + #[[1]] == labelDiagGate, + Max[#[[3]]], + #[[1]] == labelCTRLST, + Max[Max[Flatten[#[[2]], 1]], BoxiNumberOfQubits[ToSimpleGate[{#}]]], + True, + #[[3]] + ]& /@ st] + ] +] + (*Each gate matrix must be a m to n qubits isometry of the same size with mm (isometry), many entries can be neglected*) - targetMats = Take[Partition[mat, 2^m], ;; ;;2^(n-m)]; (*only m0, + Do[ + multiControls = Sort@Append[multiControls, controlqubit]; + pos = FirstPosition[multiControls, controlqubit][[1]]; + toAdd = ConstantArray[idiso, 2^(Length[multiControls] - pos)]; + gates = Join[#, toAdd] & /@ Partition[gates, 2^(Length[multiControls] - pos)]; + gates = Flatten[gates, 1] + , + {controlqubit, zeroControls} + ] + ]; + If[Length[oneControls]>0, + Do[ + multiControls = Sort@Append[multiControls, controlqubit]; + pos = FirstPosition[multiControls, controlqubit][[1]]; + toAdd = ConstantArray[idiso, 2^(Length[multiControls] - pos)]; + gates = Join[toAdd, #] & /@ Partition[gates, 2^(Length[multiControls] - pos)]; + gates = Flatten[gates, 1] + , + {controlqubit, oneControls} + ] + ]; ApplyControl[{gates, multiControls, isoTargets, numQubits}, mat] ] @@ -4266,7 +4314,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE {gate, st} ]; Return[result] - ] +] BoxiTest[st_]:=Module[ {}, @@ -4274,20 +4322,23 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE IsListForm[st]; isAnalyticGate /@ st; ListFormToOp[DeleteCases[st,{labelMmt,_,_}]]; + CreateIsometryFromList[DeleteCases[st,{labelMmt,_,_}]] + (* CreateChannelFromList[st]; CreateInstrumentFromList[st] + *) ] (*##########################################################*) -TestCreateIsometryFromList1[] := Module[{m, n, check, krausList, st1, m1}, +TestCreateIsometryFromList1[decmeth_,useanci_] := Module[{m, n, check, krausList, st1, m1}, m = 2; n = 4; krausList = RPickRandomChannel[m, n, 2]; (* no ancilla*) check = True; - st1 = MeasuredQCM[krausList, DecomposeIso -> "DecIsometry", - DoNotReuseAncilla -> False]; + st1 = MeasuredQCM[krausList, DecomposeIso -> decmeth, + DoNotReuseAncilla -> useanci]; result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; {m1, m2} = Partition[result, n]; m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); @@ -4295,9 +4346,8 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If[isZeroMatrix[Chop[m1-krausList[[1]]]], ,check=False]; If[isZeroMatrix[Chop[m2-krausList[[2]]]], ,check=False]; If[check, ,"Error in QR dec without ancilla"]; - Return[check] - ] +] TestCreateIsometryFromList2[] := Module[{m, n, check, krausList, st1, m1}, m = 2; @@ -4306,7 +4356,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Print[krausList]; (* with ancilla*) check = True; - st1 = MeasuredQCM[krausList, DecomposeIso -> "DecIsometry"]; + st1 = MeasuredQCM[krausList, DecomposeIso -> "QSD"]; result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; {m1, m2} = Partition[result, n]; m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); From 490911df79ed6585eabee8da890c84d65bc7c193 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Mon, 21 Oct 2019 15:55:01 +0200 Subject: [PATCH 12/20] Complete test for MeasuredQCM --- UniversalQCompiler.m | 75 +++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index c4dda54..f3febcf 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -158,6 +158,7 @@ TestCreateIsometryFromList1::usage="TBA" CreateIsometryFromList::usage="TBA" CreateInstrumentFromList::usage="TBA" +TestCreateOperationFromGateList::usage="TBA" Begin["`Private`"]; @@ -326,7 +327,8 @@ IsListForm[st]; If[n===Null,n1=NumberOfQubits[st]];ancillain=SortBy[FindAncilla[st],Last]; (* Deal with Mmt2 {labelMmt2,j,i}, if i is in ancillain, we add j *) - If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{6,_,_}],Last]; + If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]]; + ancillaout=SortBy[Cases[st,{6,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; st2=DeleteCases[st,{x_/;x==5,_,_}|{x_/;x==6,_,_}];mat={{1}};k=0; For[i=1,i<=n1,i++, @@ -447,7 +449,7 @@ postselnums={}, postselnums=Transpose[postsel][[3]] ]; - mmt2=Cases[st, {7,1,2}]; + mmt2=Cases[st, {7,_,_}]; pesudoSt=Join[st, mmt2/.{7,x_,_}->{4,1,x}]; mmt=Cases[pesudoSt,{4,1,_}]; If[mmt==={}, @@ -4045,7 +4047,8 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] ] -MeasuredQCM[krausList_,OptionsPattern[{DecomposeIso->"QSD",DecomposeLastIso->"DecIsometry",DoNotReuseAncilla->False}]]:= +Options[MeasuredQCM]={DecomposeIso->"QSD", DecomposeLastIso->"DecIsometry", DoNotReuseAncilla->False} +MeasuredQCM[krausList_,OptionsPattern[]]:= (*Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; Input: a list of kraus operators {K1,K2,...K_(2^k)}; Output: {{st[r1]} , {st[r21],st[r22]} , {st[r31],st[r32],st[r33],st[r34]} , ..., {st[q1}, st[q2], ..., st[q_(2^k)]}}, where st[g] is the gate sequence of gate g. @@ -4096,7 +4099,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE gateSequence=Join[gateSequence, { CTRLST[{i},{},Range[1,i-1], - Map[DecMethod[#,action=Range[k+l+1,k+l+m]]&,vList] + Map[DecMethod[#,action=Range[loopNum+l+1,loopNum+l+m]]&,vList] ], CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], Map[DecMethod[#,action={i}]&,rList] @@ -4147,6 +4150,9 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Map[DecMethod[#,Range[loopNum+1,loopNum+l+m]]&, qList] ] ]; + If[n <= m, + gateSequence = Join[gateSequence, Table[{4, 1, i}, {i, loopNum+1, k}]] + ]; Return[gateSequence] ] @@ -4229,7 +4235,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE mat: a two dimensional matrix, can be a state or operator *) ApplyControl[ucg_, mat_] := - Module[{gates, controls, isoTargets, numQubits, ids,m,targetMats,gateMats,newOrder, mat2, matlist, mat3}, + Module[{gates, controls, isoTargets, numQubits, ids,m,targetMats,gateMats,newOrder,asso, mat2, matlist, mat3}, {gates, controls, isoTargets, numQubits} = ucg; {n,m} = Log2[Dimensions[gates[[1]]]]; (*Validity check*) @@ -4243,12 +4249,12 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ids = Complement[Range @ numQubits, controls, isoTargets]; (*Find new order and check duplication: the new order is that the most significant qubits control and the most insignificant qubits are controlled*) newOrder = Flatten[{controls, ids, isoTargets}]; + asso = AssociationThread[newOrder -> Table[n, {n, numQubits}]]; If[Length @ Part[Select[Tally @ newOrder, Part[#, 2] > 1 &], All, 1]>0, Throw[StringForm["There is duplication of the qubits indices in controls and isoTargets."]], ]; (*Permute the rows of mat, here is a trick, ExchangeSystems doesn't work for isometry, so I use Partition to make it "looks like" a state, and only do row permuation*) - mat2 = Flatten[#, 1]& @ ExchangeSystems[Partition[mat, 1], newOrder, - ConstantArray[2, Length[newOrder]]]; + mat2 = Flatten[#, 1]& @ ExchangeSystems[Partition[mat, 1], (Table[n, {n, numQubits}]/.asso), ConstantArray[2, Length[newOrder]]]; (*If n>m (isometry), many entries can be neglected*) targetMats = Take[Partition[mat2, 2^m], ;; ;;2^(n-m)]; (*only m decmeth, - DoNotReuseAncilla -> useanci]; - result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; - {m1, m2} = Partition[result, n]; - m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); - m2 = m2/(m2[[1,1]]/krausList[[2,1,1]]); - If[isZeroMatrix[Chop[m1-krausList[[1]]]], ,check=False]; - If[isZeroMatrix[Chop[m2-krausList[[2]]]], ,check=False]; + gatelist = MeasuredQCM[krausList, DecomposeIso -> decmeth, + DoNotReuseAncilla -> Not[useanci]]; + result = CreateIsometryFromList[DeleteCases[gatelist, {labelMmt, _, _}]]; + channout = Partition[result, 2^n]; + For[i=1, i<=2^k, i++, + mat1 = channout[[i]]; + mat2 = krausList[[i]]; + mat1 = mat1/mat1[[1,1]] * mat2[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat2]], ,check=False]; + ] If[check, ,"Error in QR dec without ancilla"]; Return[check] ] -TestCreateIsometryFromList2[] := Module[{m, n, check, krausList, st1, m1}, - m = 2; - n = 4; - krausList = RPickRandomChannel[m, n, 2]; - Print[krausList]; - (* with ancilla*) +TestCreateOperationFromGateList[m_,n_,k_,decMeth_,useAncilla_] := Module[{check, krausList, gatelist, mat1,mat2}, check = True; - st1 = MeasuredQCM[krausList, DecomposeIso -> "QSD"]; - result = CreateIsometryFromList[DeleteCases[st1, {labelMmt, _, _}]]; - {m1, m2} = Partition[result, n]; - m1 = m1/(m1[[1,1]]/krausList[[1,1,1]]); - m2 = m2/(m2[[1,1]]/krausList[[2,1,1]]); - Print[m1]; - If[isZeroMatrix[Chop[m1-krausList[[1]]]], ,check=False]; - If[isZeroMatrix[Chop[m2-krausList[[2]]]], ,check=False]; - If[check, ,"Error in QR dec without ancilla"]; - + krausList = RPickRandomChannel[2^m, 2^n, 2^k]; + gatelist = MeasuredQCM[krausList, DecomposeIso->decMeth, DoNotReuseAncilla->Not[useAncilla]]; + Print[gatelist]; + channout = CreateOperationFromGateList[gatelist][[;;,1]]; + Print[CreateOperationFromGateList[gatelist]]; + For[i=1,i<=2^k,i++, + mat1 = channout[[i]]; + mat2 = krausList[[i]]; + mat1 = mat1/mat1[[1,1]] * mat2[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat2]], ,check=False] + ]; + If[check, ,"Error in creating operation from the MeasuredQCM gate list"]; Return[check] - ] +] (*####################################################################*) End[]; From bb2bad6a8f884854f55a57a6782dd958c2d03480 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Mon, 21 Oct 2019 22:11:17 +0200 Subject: [PATCH 13/20] Wrong file included --- MeasuredQCM.nb | 6168 --------- MeasuredQCMWork-Boxi-Desktop.nb | 20223 ------------------------------ QI.m | 478 - 3 files changed, 26869 deletions(-) delete mode 100644 MeasuredQCM.nb delete mode 100644 MeasuredQCMWork-Boxi-Desktop.nb delete mode 100644 QI.m diff --git a/MeasuredQCM.nb b/MeasuredQCM.nb deleted file mode 100644 index 900f35a..0000000 --- a/MeasuredQCM.nb +++ /dev/null @@ -1,6168 +0,0 @@ -(* Content-type: application/vnd.wolfram.mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 11.3' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 158, 7] -NotebookDataLength[ 257467, 6160] -NotebookOptionsPosition[ 244249, 5939] -NotebookOutlinePosition[ 244590, 5954] -CellTagsIndexPosition[ 244547, 5951] -WindowFrame->Normal*) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell[BoxData[ - RowBox[{"SetDirectory", "[", - "\"\\"", "]"}]], "Input", - CellChangeTimes->{ - 3.76171691436585*^9, 3.7635323076881866`*^9, {3.7643140219951878`*^9, - 3.764314025596841*^9}, {3.7643418585372095`*^9, 3.7643418589880905`*^9}, { - 3.7674322077962646`*^9, 3.767432209792924*^9}, {3.7689851085117607`*^9, - 3.768985108817954*^9}}, - CellLabel->"In[2]:=",ExpressionUUID->"146c2df9-6b11-4cd7-8f49-23585d3617b5"], - -Cell[BoxData["\<\"C:\\\\Users\\\\boxi\\\\OneDrive\\\\Studium\\\\QIT \ -prject\\\\UniversalQCompiler\"\>"], "Output", - CellChangeTimes->{ - 3.767440651685522*^9, {3.7674407294040236`*^9, 3.7674407404130645`*^9}, { - 3.7689851044894934`*^9, 3.7689851100236883`*^9}}, - CellLabel->"Out[2]=",ExpressionUUID->"53500a27-c22e-4791-a772-9717e2a24c29"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"cgs", "=", "100", " ", - RowBox[{"(*", " ", - RowBox[{ - "Define", " ", "the", " ", "gate", " ", "index", " ", "for", " ", - "controlled", " ", "gate", " ", "sequence"}], " ", "*)"}]}]], "Input", - CellChangeTimes->{{3.766330603414702*^9, 3.7663306245332317`*^9}, { - 3.769001220299117*^9, - 3.769001245987015*^9}},ExpressionUUID->"c7b79881-36f6-45ea-8e5a-\ -d369c93caba8"], - -Cell[BoxData["100"], "Output", - CellChangeTimes->{3.7663306317758656`*^9, 3.766340304744173*^9, - 3.7665704806298847`*^9, 3.766574075107668*^9, 3.7665829081036353`*^9, - 3.766584880541045*^9, 3.7666009975779676`*^9, 3.7666020666450377`*^9, - 3.7666021783992863`*^9, 3.767432212707131*^9, 3.7674326151023912`*^9, - 3.767436791194034*^9, 3.767437078395499*^9, 3.7674387282714396`*^9, - 3.7674406518529205`*^9, 3.767440739492152*^9, 3.768985111775998*^9}, - CellLabel->"Out[3]=",ExpressionUUID->"51542b02-8d5d-45c1-b473-3be58efc088f"] -}, Open ]], - -Cell[BoxData[{ - RowBox[{"Import", "[", "\"\\"", "]"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Import", "[", "\"\\"", "]"}], - ";"}]}], "Input", - CellChangeTimes->{ - 3.761716881324997*^9, 3.7617169217643223`*^9, {3.763533170974185*^9, - 3.7635331749666014`*^9}, {3.7635333334835033`*^9, - 3.7635333407220964`*^9}, {3.763533564091385*^9, 3.7635335652413087`*^9}, { - 3.764151442249364*^9, 3.7641514470804105`*^9}, 3.7642179272099495`*^9, { - 3.765951549696049*^9, 3.7659515728790593`*^9}, {3.7663306388728886`*^9, - 3.7663306436590905`*^9}, 3.768985556475051*^9, {3.768987613049039*^9, - 3.768987617459203*^9}}, - CellLabel-> - "In[238]:=",ExpressionUUID->"c18f187d-e07f-46c7-b748-3ead076c47bd"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel->"In[6]:=",ExpressionUUID->"2212a215-9499-4930-918e-e48f2ca07e83"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"All tests for the basic methods pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689851154561515`*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"54cdea01-1dd0-4bca-bb6c-3b93b3124c51"], - -Cell[BoxData["\<\"All tests for UCGs pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689851180751443`*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"56826109-81db-4c58-bf26-5f776793c1d0"], - -Cell[BoxData["\<\"All tests for diagonal gates pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985118110051*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"60f607f0-925b-45e0-8728-b11cd497353c"], - -Cell[BoxData["\<\"All tests for the isometries on a small number of qubits \ -pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985174856271*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"3fe111e0-f431-45e7-bee6-ac3de95c536c"], - -Cell[BoxData["\<\"All tests for the column-by-column decomposition \ -pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985186223856*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"75000055-0cfe-44da-a136-f3d5b4aef264"], - -Cell[BoxData["\<\"All tests for Dec2Qubit pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985188732209*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"211fc8ec-89d1-4143-892d-bad4dc8a6b9d"], - -Cell[BoxData["\<\"All tests for ZYZDec and XYXDec pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985188843914*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"b2a2599b-fcd4-4777-9e2a-d7dc0a37d82d"], - -Cell[BoxData["\<\"All tests for the QSD pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985203819841*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"120f6dcd-c07c-4d71-afc9-0a447bf12e7b"], - -Cell[BoxData["\<\"All tests for State preparation pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.76898521827015*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"70d0e901-d1a1-4f98-b6a7-418e0ec725a5"], - -Cell[BoxData["\<\"All tests for MCGs pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689852196564407`*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"6c0e1dee-03fb-4222-8e12-9b4bfded53c7"], - -Cell[BoxData["\<\"All tests for Knill's decomposition pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985227150392*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"ba2f1ae3-9c0c-42f7-9ed4-3c64e231f2c7"], - -Cell[BoxData["\<\"All tests for DecIsometry pass.\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689852456312*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"4a408491-90c2-4a69-8cef-c576a968475f"], - -Cell[BoxData["\<\"All tests for StinespringQubit on generic inputs \ -pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.768985264921837*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"7e26b9c5-62ed-4845-9153-aaaeb995873a"], - -Cell[BoxData["\<\"All tests for StinespringQubit pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689852653831377`*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"6a63bc70-4ac1-411f-8991-f4d968248258"], - -Cell[BoxData["\<\"All tests for POVMToIsometry on generic inputs pass\"\>"], \ -"Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689852653851314`*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"034b5d03-e9b0-4548-96d6-beb0f0e38afd"], - -Cell[BoxData["\<\"All tests for POVMToIsometry pass\"\>"], "Print", - CellChangeTimes->{3.7665704814786158`*^9, 3.7665829102997656`*^9, - 3.7689852654748926`*^9}, - CellLabel-> - "During evaluation of \ -In[6]:=",ExpressionUUID->"c59add0c-cd4c-4c3b-9b94-617e3ab34a3a"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"Mmt2", "[", - RowBox[{"j_", ",", "i_"}], "]"}], ":=", - RowBox[{"{", - RowBox[{"7", ",", "j", ",", "i"}], "}"}]}], ";"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"NOT", "[", "i_", "]"}], ":=", - RowBox[{"{", - RowBox[{"8", ",", ",", "i"}], "}"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"Bit", "[", - RowBox[{"p_", ",", "i_"}], "]"}], ":=", - RowBox[{"{", - RowBox[{"9", ",", "p", ",", "i"}], "}"}]}], ";"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{"z_", ",", "o_", ",", "u_", ",", "stList_"}], "]"}], ":=", - RowBox[{"{", - RowBox[{"cgs", ",", " ", - RowBox[{"{", - RowBox[{"z", ",", "o", ",", "u"}], "}"}], ",", "stList"}], "}"}], - " "}]}]}]], "Input", - CellChangeTimes->{{3.7689852987165623`*^9, 3.7689853712805567`*^9}, { - 3.7689854484570303`*^9, 3.7689854749571505`*^9}, {3.7689855347850533`*^9, - 3.7689855461137776`*^9}, {3.7689905238624887`*^9, 3.7689906602336435`*^9}, { - 3.769012648887411*^9, 3.7690126597653055`*^9}, {3.769013051906109*^9, - 3.7690130557578015`*^9}, {3.7690136236207976`*^9, 3.7690136739877033`*^9}}, - CellLabel-> - "In[241]:=",ExpressionUUID->"4dff3dd5-51f5-49b9-897e-4c02e8f7b3c5"], - -Cell[CellGroupData[{ - -Cell["Algorithm", "Section", - CellChangeTimes->{{3.766584308769024*^9, - 3.7665843232623215`*^9}},ExpressionUUID->"c2372715-452d-4c7f-bbcc-\ -3772470f6bd3"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"QRSplit", "[", "v_", "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{"Input", ":", " ", - RowBox[{"a", " ", "rectangular", " ", - RowBox[{"matrix", " ", "[", - RowBox[{"q1", ":", "q2"}], "]"}], " ", "with", " ", "an", " ", "even", - " ", "number", " ", "of", " ", "rows"}]}], ";", "\[IndentingNewLine]", - " ", - RowBox[{ - RowBox[{"Output", ":", " ", - RowBox[{ - RowBox[{"{", - RowBox[{"R", ",", - RowBox[{"{", - RowBox[{"Q1", ",", "Q2"}], "}"}]}], "}"}], " ", "where", " ", - "R"}]}], "=", - RowBox[{ - RowBox[{ - RowBox[{"[", - RowBox[{"R1", ":", "R2"}], "]"}], " ", "is", " ", "an", " ", - "isometry", " ", "and", " ", "V1"}], "=", - RowBox[{"Q1", "*", "R1"}]}]}]}], ",", " ", - RowBox[{ - RowBox[{"V2", "=", - RowBox[{"Q2", "*", "R2"}]}], ";"}]}], "*)"}], "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "v1", ",", " ", "v2", ",", "q1", ",", "q2", ",", "r1", ",", "r2"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"!", - RowBox[{"EvenQ", "[", - RowBox[{"Length", "[", "v", "]"}], "]"}]}], ",", " ", - RowBox[{"Throw", "[", - RowBox[{ - "Stringform", "[", - "\"\\"", "]"}], - "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"v1", ",", "v2"}], "}"}], " ", "=", " ", - RowBox[{"Partition", "[", - RowBox[{"v", ",", " ", - RowBox[{ - RowBox[{"Length", "[", "v", "]"}], "/", "2"}]}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "r1"}], "}"}], " ", "=", " ", - RowBox[{"QRDecomposition", "[", "v1", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q2", ",", "r2"}], "}"}], " ", "=", " ", - RowBox[{"QRDecomposition", "[", "v2", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"Join", "[", - RowBox[{"r1", ",", "r2"}], "]"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"Transpose", "[", "q1", "]"}], ",", - RowBox[{"Transpose", "[", "q2", "]"}]}], "}"}]}], "}"}], "]"}]}]}], - "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7617322657800064`*^9, 3.7617322714418325`*^9}, { - 3.7617324037499504`*^9, 3.7617326020416613`*^9}, {3.7617329062341137`*^9, - 3.7617329494814396`*^9}, {3.761733115185172*^9, 3.7617331205049477`*^9}, { - 3.761733277251341*^9, 3.7617333092826595`*^9}, 3.7617333895377865`*^9, { - 3.7617335281230683`*^9, 3.761733564121835*^9}, {3.7617336208022203`*^9, - 3.7617336246987967`*^9}, {3.761735780977034*^9, 3.7617357850870404`*^9}, { - 3.761736766005331*^9, 3.76173677113461*^9}, {3.7617370879033484`*^9, - 3.7617370975016317`*^9}, 3.7617374230938377`*^9, 3.7617379415014057`*^9, { - 3.7617392856923733`*^9, 3.761739304426289*^9}, {3.7617394210144253`*^9, - 3.761739474289889*^9}, {3.761739674803536*^9, 3.7617397132186604`*^9}, { - 3.76173974644481*^9, 3.761739746704157*^9}, {3.7617397816825514`*^9, - 3.7617397891864786`*^9}, {3.761739856660015*^9, 3.761739858697543*^9}, { - 3.761740025834587*^9, 3.761740030434311*^9}, {3.761740077619101*^9, - 3.7617400779462605`*^9}, {3.761740642275613*^9, 3.7617407033642297`*^9}, { - 3.761740835282392*^9, 3.7617408539123535`*^9}, {3.7617408938513727`*^9, - 3.7617409168019505`*^9}, {3.761740951139127*^9, 3.7617409615622454`*^9}, { - 3.761741119825877*^9, 3.761741137098731*^9}, {3.7617411846664906`*^9, - 3.7617412628827868`*^9}, {3.761741308873763*^9, 3.7617413140728617`*^9}, { - 3.761741370730278*^9, 3.7617413776657515`*^9}, {3.7617414310150013`*^9, - 3.76174145343305*^9}, {3.761741514226403*^9, 3.761741522792517*^9}, - 3.7617417195620637`*^9, {3.761741761583665*^9, 3.76174176295898*^9}, { - 3.761741800809732*^9, 3.7617418244285536`*^9}, 3.761742810016183*^9, - 3.7617428407589483`*^9, {3.76174287795944*^9, 3.761742912946875*^9}, { - 3.761742963336087*^9, 3.7617430294070034`*^9}, {3.7617434911367626`*^9, - 3.761743528885823*^9}, {3.7617435589284253`*^9, 3.7617435593503284`*^9}, - 3.7617452764122887`*^9, {3.761745694334489*^9, 3.7617457035887346`*^9}, { - 3.762959505283737*^9, 3.7629595713260603`*^9}, {3.762959602339146*^9, - 3.7629596083969436`*^9}, {3.7629597006710844`*^9, 3.762959721670905*^9}, { - 3.76295977035023*^9, 3.7629597706524076`*^9}, {3.7629598775820503`*^9, - 3.762959881388866*^9}, {3.7641550884283133`*^9, 3.7641552914824376`*^9}, { - 3.7665812220702076`*^9, 3.766581224374049*^9}, {3.766581747087158*^9, - 3.7665817517656493`*^9}, {3.7665828084388733`*^9, - 3.7665828165422144`*^9}, {3.766584059258024*^9, 3.7665840690707903`*^9}, - 3.7665848484408593`*^9, {3.7665980601423492`*^9, 3.7665980853738976`*^9}, { - 3.76666944094154*^9, 3.7666694425123396`*^9}, {3.7689856331917944`*^9, - 3.7689857036572623`*^9}, {3.768985773081476*^9, 3.7689858116014132`*^9}, { - 3.7689861973965874`*^9, 3.768986282964658*^9}, {3.768986402432001*^9, - 3.7689864345999117`*^9}, {3.7689866185877733`*^9, 3.76898663834094*^9}, { - 3.768986868695569*^9, 3.7689868762174788`*^9}, {3.7689871569712887`*^9, - 3.7689871595633583`*^9}, 3.7689883827610717`*^9}, - CellLabel-> - "In[215]:=",ExpressionUUID->"55f763f1-1536-4b4a-84bc-20c83739561e"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"q_", ",", " ", - RowBox[{"OptionsPattern", "[", - RowBox[{"EfficientRepresentation", "\[Rule]", "False"}], "]"}]}], "]"}], - " ", ":=", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{ - "Use", " ", "reduced", " ", "CSD", " ", "decomposition", " ", "to", " ", - "decompose", " ", "an", " ", - RowBox[{"isometry", " ", "[", - RowBox[{"q1", ":", "q2"}], "]"}], " ", "in", " ", "to", " ", "q1"}], - "=", - RowBox[{ - RowBox[{"u1", "*", "c", "*", "v", " ", "and", " ", "q2"}], "=", - RowBox[{"u2", "*", "s", "*", "v"}]}]}], ",", - RowBox[{ - RowBox[{ - "where", " ", "c", " ", "and", " ", "s", " ", "are", " ", "diagonal", - " ", "matrix", " ", "with", " ", "entries", " ", "of", " ", "the", " ", - "form", " ", "cos", " ", "and", " ", "sin", " ", - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{ - RowBox[{"means", " ", "that", " ", - RowBox[{"c", "^", "2"}]}], "+", - RowBox[{"s", "^", "2"}]}], "=", "I"}], ")"}], ".", - "\[IndentingNewLine]", "This"}], " ", "version", " ", "works", " ", - "ONLY", " ", "if", " ", "q", " ", "is", " ", "an", " ", "isometry", " ", - "with", " ", "dimention", " ", - RowBox[{"(", - RowBox[{"m", ",", "n"}], ")"}], " ", "where", " ", "2", "m"}], - "\[LessEqual]", "n"}], ",", " ", - RowBox[{ - RowBox[{ - "ortherwise", " ", "the", " ", "removal", " ", "of", " ", "0", "s", " ", - "in", " ", "s", " ", "has", " ", "to", " ", "be", " ", - RowBox[{ - "modified", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "If"}], - " ", "EfficientRepresentation"}], "->", "False"}], ",", " ", - RowBox[{"it", " ", "returns", " ", "three", " ", "matrix", " ", "m1"}], - ",", "m2", ",", - RowBox[{ - RowBox[{"m3", " ", "so", " ", "that", " ", "m1", "*", "m2", "*", "m3"}], - "=", - RowBox[{ - RowBox[{ - RowBox[{"[", - RowBox[{"q1", ":", "q2"}], "]"}], "\[IndentingNewLine]", "If", " ", - "EfficiqentRepresentation"}], "->", "True"}]}], ",", " ", - RowBox[{"it", " ", "only", " ", "returns", " ", "v"}], ",", " ", - RowBox[{ - "a", " ", "list", " ", "of", " ", "diagonal", " ", "elements", " ", "c", - " ", "and", " ", "s", " ", "and", " ", - RowBox[{"{", - RowBox[{"u1", ",", " ", "u2"}], "}"}]}]}], "\[IndentingNewLine]", - "*)"}], "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "n", ",", "m", ",", " ", "u1", ",", "u2", ",", "s", ",", "c", ",", "v", - ",", "q1", ",", "q2", ",", "x", ",", " ", "r", ",", "reducedDim"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"!", - RowBox[{"EvenQ", "[", - RowBox[{"Length", "[", "q", "]"}], "]"}]}], ",", " ", - RowBox[{"Throw", "[", - RowBox[{ - "Stringform", "[", - "\"\\"", - "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"n", ",", "m"}], "}"}], "=", - RowBox[{"Dimensions", "[", "q", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"2", "*", "m"}], ">", "n"}], ",", " ", - RowBox[{"Throw", "[", - RowBox[{ - "Stringform", "[", - "\"\\"", "]"}], "]"}]}], - "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}], " ", "=", " ", - RowBox[{"Partition", "[", - RowBox[{"q", ",", " ", - RowBox[{ - RowBox[{"Length", "[", "q", "]"}], "/", "2"}]}], "]"}]}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"calculate", " ", "reduced", " ", "u2", " ", "and", " ", "s"}], - " ", "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"u2", ",", "s", ",", "v"}], "}"}], " ", "=", " ", - RowBox[{"SingularValueDecomposition", "[", "q2", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"reducedDim", " ", "=", - RowBox[{ - RowBox[{"Dimensions", "[", "q1", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"u2", " ", "=", " ", - RowBox[{"u2", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"1", ";;", "reducedDim"}]}], "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"Cut", " ", "unnecessary", " ", "columns"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"s", " ", "=", " ", - RowBox[{"s", "[", - RowBox[{"[", - RowBox[{ - RowBox[{"1", ";;", "reducedDim"}], ",", - RowBox[{"1", ";;", "reducedDim"}]}], "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"Cut", " ", "zeros"}], " ", "*)"}], "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "calculate", " ", "u1", " ", "and", " ", "c", " ", "using", " ", "QR", - " ", "decomposition"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"x", " ", "=", " ", - RowBox[{"q1", ".", "v"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"u1", ",", "r"}], "}"}], " ", "=", " ", - RowBox[{"QRDecomposition", "[", "x", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"c", " ", "=", " ", - RowBox[{"DiagonalMatrix", "[", - RowBox[{"Diagonal", "[", "r", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"u1", " ", "=", " ", - RowBox[{"x", ".", - RowBox[{"Inverse", "[", "c", "]"}]}]}], ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"Transpose", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"output", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "EfficientRepresentation", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"v", ",", "\[IndentingNewLine]", - RowBox[{"MapThread", "[", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"#1", ",", "#2"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "#2"}], ",", "#1"}], "}"}]}], "}"}], "&"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"Diagonal", "[", "c", "]"}], ",", - RowBox[{"Diagonal", "[", "s", "]"}]}], "}"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"u1", ",", "u2"}], "}"}]}], "}"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "v", "}"}], ",", - RowBox[{"{", - RowBox[{"SparseArray", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"reducedDim", ",", "reducedDim"}], "}"}]}], "]"}], - "}"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"c", ",", "s"}], "}"}], ",", - RowBox[{"{", - RowBox[{"s", ",", "c"}], "}"}]}], "}"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"u1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "u2"}], "}"}]}], "}"}], "]"}]}], - "\[IndentingNewLine]", "}"}], "]"}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7641740356972055`*^9, 3.764174037511384*^9}, { - 3.7641741003203382`*^9, 3.764174100711294*^9}, {3.764313790510702*^9, - 3.7643138544547887`*^9}, {3.7643138897762947`*^9, - 3.7643138944692945`*^9}, {3.7643139355685463`*^9, 3.764313971427433*^9}, { - 3.764314108863223*^9, 3.7643141236366215`*^9}, {3.7643141677455626`*^9, - 3.764314173743504*^9}, {3.7643146515530024`*^9, 3.7643146565642653`*^9}, { - 3.764315035113085*^9, 3.764315044606406*^9}, {3.76431512002225*^9, - 3.764315121058582*^9}, {3.7643155305957174`*^9, 3.7643155824075956`*^9}, { - 3.76431574217001*^9, 3.764315769583948*^9}, {3.7643158436112638`*^9, - 3.7643158700543194`*^9}, {3.7643161812560782`*^9, - 3.7643161840658464`*^9}, {3.764342009796929*^9, 3.764342013363389*^9}, { - 3.76434234066908*^9, 3.764342341156148*^9}, {3.765943388063779*^9, - 3.7659434158654704`*^9}, {3.7659435095859785`*^9, 3.765943511401125*^9}, { - 3.7659437524603786`*^9, 3.7659437554813356`*^9}, 3.765943876449839*^9, { - 3.765943944172777*^9, 3.7659439721220427`*^9}, {3.7659441434429383`*^9, - 3.765944197693014*^9}, {3.7659442446584463`*^9, 3.765944334585556*^9}, { - 3.7659444117392225`*^9, 3.765944427649678*^9}, {3.7659444609556203`*^9, - 3.76594446152011*^9}, {3.7659445211147566`*^9, 3.7659445292011347`*^9}, { - 3.7659450280971546`*^9, 3.7659450547548523`*^9}, {3.7659451034885416`*^9, - 3.765945131594387*^9}, {3.7659455225789366`*^9, 3.7659455446508913`*^9}, { - 3.7659455804970407`*^9, 3.7659455828347893`*^9}, {3.765946468066487*^9, - 3.765946480385546*^9}, {3.765946718400012*^9, 3.765947098304867*^9}, { - 3.765947245563077*^9, 3.765947281090079*^9}, {3.7659476556253815`*^9, - 3.7659477085997934`*^9}, {3.765947837760481*^9, 3.765947843609816*^9}, { - 3.765947884721884*^9, 3.7659479357384677`*^9}, {3.765948006513219*^9, - 3.7659480499061904`*^9}, 3.765948105209341*^9, {3.7659481563368063`*^9, - 3.765948174568056*^9}, {3.765948320098813*^9, 3.7659483222879596`*^9}, - 3.7659484765212584`*^9, {3.765948794794286*^9, 3.7659488100963926`*^9}, { - 3.7659494230665083`*^9, 3.76594942688826*^9}, {3.76594964917791*^9, - 3.7659496638879066`*^9}, {3.765949772888795*^9, 3.7659498441852045`*^9}, { - 3.7659498850670595`*^9, 3.765949893985214*^9}, {3.765949930203905*^9, - 3.765950021463606*^9}, {3.7659500816271515`*^9, 3.7659501091755257`*^9}, { - 3.765950229744213*^9, 3.76595030669592*^9}, {3.7659503724031963`*^9, - 3.7659503729527473`*^9}, {3.765950596135972*^9, 3.7659507050797863`*^9}, { - 3.76595124468877*^9, 3.7659512459434147`*^9}, {3.7659519533289394`*^9, - 3.7659519625921717`*^9}, {3.765952252392784*^9, 3.765952254088277*^9}, { - 3.7659523545536103`*^9, 3.7659523659762373`*^9}, {3.7659524687610197`*^9, - 3.7659524720681777`*^9}, {3.765952508922634*^9, 3.76595250989503*^9}, { - 3.7663306726266327`*^9, 3.7663306895583577`*^9}, {3.7663307684953012`*^9, - 3.766330780191027*^9}, {3.7663317097279634`*^9, 3.7663317374628015`*^9}, { - 3.76633271173733*^9, 3.766332718199052*^9}, {3.766332821462929*^9, - 3.766332880222807*^9}, {3.7663330305018635`*^9, 3.7663330739267473`*^9}, { - 3.7663331269898624`*^9, 3.7663331453692274`*^9}, 3.7663370773789253`*^9, - 3.766584848445846*^9, {3.7665997310889864`*^9, 3.7665997349037886`*^9}, { - 3.7689861274138284`*^9, 3.76898613400021*^9}, {3.768986771333069*^9, - 3.768986803179861*^9}, {3.768986853788454*^9, 3.7689869064934664`*^9}, { - 3.768986948355467*^9, 3.768987151767227*^9}, {3.768988364380226*^9, - 3.7689883772099*^9}, {3.768988573274419*^9, 3.7689886066670523`*^9}, - 3.7689886547434497`*^9, {3.768988788137658*^9, 3.7689888098366013`*^9}, { - 3.7689888795640745`*^9, 3.768988883685073*^9}, {3.768989124204567*^9, - 3.76898914522731*^9}, {3.7689891914615717`*^9, 3.7689892630500712`*^9}, { - 3.7689892955929623`*^9, 3.7689893303380213`*^9}}, - CellLabel-> - "In[216]:=",ExpressionUUID->"c762e94d-1812-4ecd-b180-e44e618b1fde"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ChooseDecMethod", "[", "MethodName_", "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "check", " ", "if", " ", "input", " ", "is", " ", "string", "??"}], - "*)"}], "\[IndentingNewLine]", - RowBox[{"Switch", "[", "\[IndentingNewLine]", - RowBox[{ - "MethodName", ",", "\[IndentingNewLine]", "\"\\"", ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "QSD", "]"}], ",", "\[IndentingNewLine]", - "\"\\"", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "DecIsometry", "]"}], ",", - "\[IndentingNewLine]", "\"\\"", ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "DecIsometryGeneric", "]"}], ",", - "\[IndentingNewLine]", "\"\\"", ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "ColumnByColumnDec", "]"}], ",", - "\[IndentingNewLine]", "\"\\"", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "KnillDec", "]"}], ",", "\[IndentingNewLine]", - "_", ",", "\[IndentingNewLine]", - RowBox[{"Throw", "[", - RowBox[{ - "\"\\"", "<>", "MethodName", "<>", - "\"\< is not found. The available methods are QSD, DecIsometry, \ -DecIsometryGeneric, ColumnByColumnDec and KnillDec.\>\""}], "]"}]}], - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"TODO", ":", " ", - RowBox[{ - "add", " ", "exception", " ", "for", " ", "wrong", " ", "input"}]}], - " ", "*)"}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellLabel-> - "In[278]:=",ExpressionUUID->"b88a9287-3e20-41af-ac35-e426ea9f7706"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList_", ",", - RowBox[{"OptionsPattern", "[", - RowBox[{"{", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], "}"}], "]"}]}], - "]"}], " ", ":=", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - RowBox[{ - "Recursively", " ", "decompose", " ", "a", " ", "list", " ", "of", " ", - RowBox[{"2", "^", "k"}], " ", "Kraus", " ", "operators", " ", "into", - " ", "an", " ", "m", " ", "x", " ", "n", " ", "Isometry", " ", "and", - " ", "two", " ", "list", " ", "of", " ", "Krau", " ", "operators", " ", - "controlled", " ", "by", " ", "the", " ", "measured", " ", "result", - " ", "after", " ", "the", " ", - RowBox[{"isometry", ".", " ", "The"}], " ", "measurement", " ", "gates", - " ", "are", " ", "not", " ", "included"}], ";", "\[IndentingNewLine]", - RowBox[{"Input", ":", " ", - RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operator"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"Output", ":", " ", - RowBox[{"isometry", "/", "st"}]}]}], ",", " ", - RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operators"}], - ",", " ", - RowBox[{ - RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operators"}], - ";", - RowBox[{"(", - RowBox[{ - RowBox[{ - "If", " ", "the", " ", "list", " ", "of", " ", "Kraus", " ", - "operators", " ", "is", " ", "no", " ", "longer", " ", "decomposible", - " ", "with", " ", "QR"}], ",", " ", - RowBox[{"it", " ", "will", " ", "returns", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"isometry", "/", "st"}], ",", "None", ",", "None"}], - "}"}]}]}], ")"}]}], "\:ff1b", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", - RowBox[{"\"\\"", ":", " ", - RowBox[{ - "Use", " ", "QRSplit", " ", "and", " ", "the", " ", "isometry", " ", - "is", " ", "in", " ", "the", " ", "matrix", " ", - "representation"}]}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", - RowBox[{"\"\\"", ":", " ", - RowBox[{ - "Use", " ", "ReducedCSDSplit", " ", "and", " ", "the", " ", "isometry", - " ", "is", " ", "give", " ", "as", " ", "gate", " ", - "sequence"}]}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - "\"\\"", "/", "\"\\""}], - "/", "\"\\""}], "/", "\"\\""}], - ":", " ", - RowBox[{ - "Use", " ", "QRSplit", " ", "and", " ", "the", " ", "isometry", " ", - "is", " ", "decomposed", " ", "by", " ", "the", " ", "corresponding", - " ", "decomposition", " ", "methods"}]}]}]}]}], "\[IndentingNewLine]", - "*)"}], "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "k", ",", "n", ",", "e2n", ",", "m", ",", "DecMethod", ",", "q", ",", - "v", ",", "r", ",", "rList", ",", "q1", ",", "q2", ",", - "gateSequence"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"e2n", " ", "=", " ", - RowBox[{ - RowBox[{"Dimensions", "[", "krausList", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Log2", "[", - RowBox[{"Dimensions", "[", "krausList", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "k", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", - "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "m", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "n", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"StringQ", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], - "]"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"q", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - "If", " ", "the", " ", "stacked", " ", "kraus", " ", "operators", " ", - "is", " ", "already", " ", "a", " ", "m", " ", "to", " ", "n", " ", - "isometry", " ", "with", " ", "n"}], "<=", - RowBox[{"m", "+", "1"}]}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"n", "+", "k"}], "\[LessEqual]", - RowBox[{"m", "+", "1"}]}], ",", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"q", ",", "None", ",", "None"}], "}"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"DecMethod", "[", "q", "]"}], ",", "None", ",", - "None"}], "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], - "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"QR", " ", "or", " ", "ReducedCSD", " ", "Decomposition"}], - " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Use", " ", "ReducedCSDSplit"}], "*)"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", "=", "QSD"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"v", ",", "rList", ",", - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], "=", - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"q", ",", " ", - RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], "]"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"gateSequence", " ", "=", " ", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"DecMethod", "[", - RowBox[{"v", ",", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"n", "-", "m", "+", "1"}], ",", "n"}], "]"}]}]}], - "]"}], "}"}]}], "\[IndentingNewLine]", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"n", "-", "m", "+", "1"}], ",", "n"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"{", "1", "}"}]}]}], "]"}], "&"}], ",", "rList"}], - "]"}]}], "\[IndentingNewLine]", "]"}]}], - "\[IndentingNewLine]", "}"}]}], ";", "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"gateSequence", ",", " ", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "e2n"}], "]"}], ",", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "e2n"}], "]"}]}], "}"}], "]"}]}], ",", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Use", " ", "QRSplit"}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"r", ",", - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], " ", "=", " ", - RowBox[{"QRSplit", "[", "q", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"r", ",", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "e2n"}], "]"}], ",", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "e2n"}], "]"}]}], "}"}], "]"}], ",", " ", - RowBox[{"(*", " ", - RowBox[{ - "Partition", " ", "transform", " ", "it", " ", "to", " ", "a", - " ", "list", " ", "of", " ", "kraus"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"DecMethod", "[", "r", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "e2n"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "e2n"}], "]"}]}], "\[IndentingNewLine]", - "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], - "\[IndentingNewLine]", "]"}]}]}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.7665840777186775`*^9, 3.7665840967428236`*^9}, - 3.766584132727624*^9, {3.766584185303074*^9, 3.766584191447653*^9}, - 3.766584848450833*^9, {3.766598507623108*^9, 3.76659850835116*^9}, { - 3.766598544085631*^9, 3.766598563182579*^9}, {3.7665988492458973`*^9, - 3.7665988711912303`*^9}, {3.766598920022687*^9, 3.766599089182914*^9}, { - 3.7665992731831007`*^9, 3.7665993078544126`*^9}, {3.7665993511297245`*^9, - 3.766599413399262*^9}, {3.766599462080122*^9, 3.766599505294603*^9}, { - 3.7665997577666693`*^9, 3.7665998531197605`*^9}, {3.766599911295239*^9, - 3.7665999333752112`*^9}, {3.7665999706635284`*^9, 3.766599979110946*^9}, { - 3.7666000230963583`*^9, 3.7666000875749874`*^9}, {3.7666001225754204`*^9, - 3.7666001486965895`*^9}, {3.7666001793027706`*^9, 3.7666004194957*^9}, { - 3.7666004733118324`*^9, 3.766600511919162*^9}, {3.766600611944977*^9, - 3.76660065587152*^9}, {3.7666007283293552`*^9, 3.76660081278459*^9}, { - 3.76660084585618*^9, 3.7666008534718227`*^9}, {3.7666015185288115`*^9, - 3.7666015210410933`*^9}, {3.7674386349753284`*^9, - 3.7674386353108406`*^9}, {3.7674395536896477`*^9, - 3.7674395537009387`*^9}, {3.767439686168064*^9, 3.767439694732544*^9}, { - 3.768990320335496*^9, 3.7689904671900144`*^9}, {3.7689910125321655`*^9, - 3.768991045824093*^9}, {3.768991102709888*^9, 3.76899110768458*^9}, - 3.7689911479169335`*^9, {3.76899121850906*^9, 3.7689912501693525`*^9}, { - 3.7689912808213387`*^9, 3.768991322804012*^9}, {3.7689913851871376`*^9, - 3.768991400815298*^9}, {3.7689914740144386`*^9, 3.768991502047434*^9}, { - 3.7689915394045095`*^9, 3.7689915437817736`*^9}, {3.7689915759237757`*^9, - 3.7689915775244923`*^9}, {3.7689916252168875`*^9, 3.768991641197132*^9}, { - 3.7689917100778365`*^9, 3.7689918152524357`*^9}, {3.7689918473645186`*^9, - 3.768991875811509*^9}, {3.7689922186643405`*^9, 3.76899234087503*^9}, { - 3.7689924599055567`*^9, 3.768992549598576*^9}, {3.768992582171423*^9, - 3.768992753585827*^9}, {3.7689928062678432`*^9, 3.7689928915222483`*^9}, { - 3.7689930078989067`*^9, 3.768993031218549*^9}, 3.768993066242803*^9, { - 3.7689934886367116`*^9, 3.768993503131282*^9}, {3.768993571410596*^9, - 3.7689936732544827`*^9}, {3.7689937200523033`*^9, 3.768993748120085*^9}, { - 3.7689940278024035`*^9, 3.7689940324250355`*^9}, {3.7689989938726206`*^9, - 3.768999118840295*^9}, {3.768999148923776*^9, 3.7689991994935336`*^9}, { - 3.768999245671011*^9, 3.768999352238721*^9}, {3.7689994049477024`*^9, - 3.7689994455520363`*^9}, {3.768999491511098*^9, 3.7689995886052933`*^9}, { - 3.768999784720758*^9, 3.7689998544921074`*^9}, {3.768999911621227*^9, - 3.768999960029707*^9}, {3.7690103458709807`*^9, 3.769010360456957*^9}, { - 3.7690132711425257`*^9, - 3.7690132799559455`*^9}},ExpressionUUID->"24986737-5337-49bd-afcb-\ -fe344c8d98f8"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList_", ",", - RowBox[{"OptionsPattern", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DecomposeLastIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "}"}], "]"}]}], - "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - "Recursively", " ", "decompose", " ", "a", " ", "list", " ", "of", - " ", - RowBox[{"2", "^", "k"}], " ", "Kraus", " ", "operators", " ", - "into", " ", "an", " ", "m", " ", "x", " ", "n", " ", "Isometry", - " ", "and", " ", "two", " ", "list", " ", "of", " ", "Krau", " ", - "operators", " ", "controlled", " ", "by", " ", "the", " ", - "measured", " ", "result", " ", "after", " ", "the", " ", - "isometry"}], ";", "\[IndentingNewLine]", - RowBox[{"Input", ":", " ", - RowBox[{ - "a", " ", "list", " ", "of", " ", "kraus", " ", "operators", " ", - RowBox[{"{", - RowBox[{"K1", ",", "K2", ",", - RowBox[{"...", "K_", - RowBox[{"(", - RowBox[{"2", "^", "k"}], ")"}]}]}], "}"}]}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Output", ":", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"st", "[", "r1", "]"}], "}"}], " ", ",", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"st", "[", "r21", "]"}], ",", - RowBox[{"st", "[", "r22", "]"}]}], "}"}], " ", ",", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"st", "[", "r31", "]"}], ",", - RowBox[{"st", "[", "r32", "]"}], ",", - RowBox[{"st", "[", "r33", "]"}], ",", - RowBox[{"st", "[", "r34", "]"}]}], "}"}], " ", ",", " ", "...", - ",", " ", - RowBox[{"{", - RowBox[{"st", "[", "q1"}]}]}]}]}]}], "}"}], ",", " ", - RowBox[{"st", "[", "q2", "]"}], ",", " ", "...", ",", " ", - RowBox[{"st", "[", - RowBox[{"q_", - RowBox[{"(", - RowBox[{"2", "^", "k"}], ")"}]}], "]"}]}], "}"}], "}"}], ",", " ", - RowBox[{"where", " ", - RowBox[{"st", "[", "g", "]"}], " ", "is", " ", "the", " ", "gate", " ", - "sequence", " ", "of", " ", "gate", " ", - RowBox[{"g", "."}]}]}], "\[IndentingNewLine]", "*)"}], - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "SplitResult", ",", " ", "gateSequence", ",", " ", "DecMethod", ",", "l", - ",", "n", ",", "m", ",", "k", ",", "loopNum", ",", " ", "i", ",", "v", - ",", "vList", ",", " ", "qList", ",", "rList"}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Log2", "[", - RowBox[{"Dimensions", "[", "krausList", "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{"(", - RowBox[{"n", ",", "m"}], ")"}], " ", "size", " ", "of", " ", "each", - " ", "kraus", " ", "operator"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "k", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", - "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "m", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "n", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"StringQ", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], - "]"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"loopNum", " ", "=", " ", - RowBox[{ - "number", " ", "of", " ", "iteration", " ", "with", " ", "qr", " ", - "decomposition"}]}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"m", "<", "n"}], ",", " ", - RowBox[{ - RowBox[{"loopNum", " ", "=", " ", "k"}], ";", " ", - RowBox[{"l", "=", - RowBox[{"n", "-", "m"}]}]}], ",", - RowBox[{ - RowBox[{"loopNum", " ", "=", " ", - RowBox[{"n", "+", "k", "-", "m", "-", "1"}]}], ";", - RowBox[{"l", "=", "1"}]}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"{", "v", "}"}]}], ";", "\[IndentingNewLine]", - RowBox[{"gateSequence", " ", "=", " ", - RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<=", "loopNum"}], ",", - RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "Reduced", " ", "CSD", " ", "is", " ", "choosen", " ", "to", " ", - "do", " ", "the", " ", "decomposition"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", "QSD"}], ";", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Matrix", " ", "calculation"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"SplitResult", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"#", ",", - RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], - "]"}], "&"}], ",", " ", "qList"}], "]"}], ",", "1"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - "A", " ", "list", " ", "bellow", " ", "contains", " ", "all", " ", - "gate", " ", "sequences", " ", "multiplex", " ", "controlled", - " ", "by", " ", "the", " ", "first", " ", "i"}], "-", - RowBox[{"1", " ", "bits"}]}], "*)"}], "\[IndentingNewLine]", - RowBox[{"vList", " ", "=", - RowBox[{"SplitResult", "[", - RowBox[{"[", - RowBox[{"1", ";;", - RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"Zero", " ", "controlled", " ", "gate", " ", "v"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{"rList", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"SplitResult", "[", - RowBox[{"[", - RowBox[{"2", ";;", - RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}], ",", "1"}], - "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{ - "Matrices", " ", "with", " ", "cos", " ", "and", " ", "sin", " ", - "elements"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"SplitResult", "[", - RowBox[{"[", - RowBox[{"3", ";;", - RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}], ",", "1"}], - "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{ - "Isometry", " ", "for", " ", "the", " ", "decomposition", " ", - "in", " ", "the", " ", "next", " ", "round"}], "*)"}], - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Append", " ", "results"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], - "\[Equal]", "False"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"loopNum", "+", "1"}], "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}]}], - "]"}], "&"}], ",", "vList"}], "]"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], - ",", "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"{", - RowBox[{"loopNum", "+", "1"}], "}"}]}]}], "]"}], "&"}], - ",", "rList"}], "]"}]}], "\[IndentingNewLine]", "]"}], - ",", "\[IndentingNewLine]", - RowBox[{"Mmt2", "[", - RowBox[{"i", ",", - RowBox[{"loopNum", "+", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "i", "}"}], ",", - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"{", - RowBox[{"NOT", "[", - RowBox[{"loopNum", "+", "1"}], "]"}], "}"}], "}"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], - "\[Equal]", "True"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "i", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"k", "+", "l", "+", "1"}], ",", - RowBox[{"k", "+", "l", "+", "m"}]}], "]"}]}]}], "]"}], - "&"}], ",", "vList"}], "]"}]}], "\[IndentingNewLine]", - "]"}], ",", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], - ",", "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"{", "i", "}"}]}]}], "]"}], "&"}], ",", "rList"}], - "]"}]}], "\[IndentingNewLine]", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Mmt", "[", "i", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}]}], - "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "Other", " ", "decomposition", " ", "method", " ", "is", " ", - "choosen"}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "!=", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Matrix", " ", "calculation"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"qrSplitResult", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"Map", "[", - RowBox[{"QRSplit", ",", " ", "qList"}], "]"}], ",", "1"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"rList", " ", "=", " ", - RowBox[{"qrSplitResult", "[", - RowBox[{"[", - RowBox[{"1", ";;", - RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"qrSplitResult", "[", - RowBox[{"[", - RowBox[{"2", ";;", - RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}], ",", "1"}], - "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Append", " ", "results"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], "==", - "False"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"loopNum", "+", "1"}], "}"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], - "]"}]}]}], "]"}], "&"}], ",", "rList"}], "]"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Mmt2", "[", - RowBox[{"i", ",", - RowBox[{"loopNum", "+", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "i", "}"}], ",", - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"{", - RowBox[{"NOT", "[", - RowBox[{"loopNum", "+", "1"}], "]"}], "}"}], "}"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], "==", - "True"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"{", "i", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], - "]"}]}]}], "]"}], "&"}], ",", "rList"}], "]"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Mmt", "[", "i", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}]}], - "\[IndentingNewLine]", "]"}]}]}], " ", - RowBox[{"(*", " ", - RowBox[{"end", " ", "whether", " ", "reuse", " ", "qubit"}], " ", - "*)"}], "\[IndentingNewLine]", "]"}]}], " ", - RowBox[{"(*", " ", - RowBox[{"end", " ", "which", " ", "decomposition"}], " ", "*)"}], - "\[IndentingNewLine]", "]"}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"end", " ", "for", " ", "loop"}], " ", "*)"}], - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"DecMethod", "=", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeLastIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"AppendTo", "[", - RowBox[{"gateSequence", ",", " ", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", "loopNum"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], - "&"}], ",", " ", "qList"}], "]"}]}], "\[IndentingNewLine]", - "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", - RowBox[{"Return", "[", "gateSequence", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.7665811982668424`*^9, 3.7665812110087795`*^9}, { - 3.766581619785474*^9, 3.7665816344233427`*^9}, {3.766581775880185*^9, - 3.7665818205193624`*^9}, {3.7665818987066283`*^9, - 3.7665819770412207`*^9}, {3.7665820764476123`*^9, - 3.7665821329356017`*^9}, {3.7665821789136934`*^9, - 3.7665822377284665`*^9}, {3.766582268616893*^9, 3.7665822780885725`*^9}, { - 3.766582411457036*^9, 3.7665824717917447`*^9}, {3.7665825030641713`*^9, - 3.7665825764250374`*^9}, {3.7665848484588118`*^9, 3.766584848494714*^9}, { - 3.766591265623946*^9, 3.7665912874057455`*^9}, {3.766591446062413*^9, - 3.7665914526936855`*^9}, {3.766591529374693*^9, 3.7665915345568466`*^9}, { - 3.7665915692471113`*^9, 3.7665916674148564`*^9}, {3.76659188259067*^9, - 3.7665918826784363`*^9}, {3.766591921431836*^9, 3.766591940062032*^9}, { - 3.7665919823679376`*^9, 3.7665920229424973`*^9}, {3.7665920831734533`*^9, - 3.7665920847741747`*^9}, {3.766592134798443*^9, 3.766592153557295*^9}, { - 3.7665921849595723`*^9, 3.7665921899173284`*^9}, {3.7665922273662434`*^9, - 3.7665922341590567`*^9}, {3.766592297325202*^9, 3.766592361541536*^9}, { - 3.766592432948642*^9, 3.766592468944413*^9}, {3.7665925012540407`*^9, - 3.766592505333136*^9}, {3.766593699814333*^9, 3.7665938628866973`*^9}, { - 3.7665939092957726`*^9, 3.7665940392783365`*^9}, {3.766594081823598*^9, - 3.766594082126789*^9}, {3.7665941298003426`*^9, 3.7665942099610863`*^9}, { - 3.766594308688158*^9, 3.7665943216059427`*^9}, {3.7665943763825073`*^9, - 3.766594403646638*^9}, {3.7665944358635125`*^9, 3.7665945699670334`*^9}, { - 3.7665946540243206`*^9, 3.7665946674474397`*^9}, {3.766594709463953*^9, - 3.7665947121836815`*^9}, {3.766594757025811*^9, 3.766594882297595*^9}, { - 3.766594959197019*^9, 3.7665949953792915`*^9}, {3.766595049000944*^9, - 3.7665951237291746`*^9}, {3.7665951785875263`*^9, - 3.7665951862560253`*^9}, {3.766595247072443*^9, 3.766595288377023*^9}, { - 3.7665953489321704`*^9, 3.7665954784987993`*^9}, {3.7665955708289757`*^9, - 3.766595694086472*^9}, {3.7665957364711647`*^9, 3.7665957718904896`*^9}, { - 3.7665958416739674`*^9, 3.766595865952035*^9}, {3.7665959436104326`*^9, - 3.7665959491037464`*^9}, {3.766596057017265*^9, 3.766596116135255*^9}, { - 3.7665961534744086`*^9, 3.7665962038078527`*^9}, {3.766596253121052*^9, - 3.7665963033597817`*^9}, 3.7665963353702083`*^9, {3.766596384089965*^9, - 3.76659656035176*^9}, {3.766596678674448*^9, 3.76659670382225*^9}, { - 3.7665967374892473`*^9, 3.766596820152421*^9}, {3.7665969034357796`*^9, - 3.766596999041196*^9}, {3.7665970869452095`*^9, 3.766597119929035*^9}, { - 3.7665974170966573`*^9, 3.766597447634031*^9}, {3.766597495849169*^9, - 3.7665975076092353`*^9}, {3.7665975507279935`*^9, - 3.7665977640516844`*^9}, {3.7665978357639747`*^9, 3.76659785781702*^9}, { - 3.7665979878914986`*^9, 3.766598007842165*^9}, {3.7665981016663437`*^9, - 3.7665981090176897`*^9}, {3.766598171185497*^9, 3.7665982383050795`*^9}, { - 3.7665985870836844`*^9, 3.766598589817404*^9}, {3.7665987154505196`*^9, - 3.7665987771216736`*^9}, {3.7674329273057675`*^9, 3.767433001984829*^9}, { - 3.767433058311113*^9, 3.7674330622106514`*^9}, {3.7674330973384385`*^9, - 3.7674331043869076`*^9}, {3.767433240675272*^9, 3.7674332627181053`*^9}, { - 3.767433315111947*^9, 3.767433316489848*^9}, {3.7674343820168777`*^9, - 3.7674344617855587`*^9}, {3.7674345662623816`*^9, - 3.7674348604973974`*^9}, {3.767434910544444*^9, 3.7674349477554617`*^9}, { - 3.7674350483225746`*^9, 3.7674350872584567`*^9}, {3.7674351575706434`*^9, - 3.767435168983175*^9}, {3.7674352053951683`*^9, 3.767435205963521*^9}, { - 3.7674352446495113`*^9, 3.767435260508898*^9}, {3.7674354113590784`*^9, - 3.7674354180313826`*^9}, {3.767436925393983*^9, 3.7674369265028734`*^9}, { - 3.7674391842688227`*^9, 3.7674391996164327`*^9}, {3.7674392447270317`*^9, - 3.767439286098486*^9}, {3.767439384702837*^9, 3.7674394821563063`*^9}, { - 3.7674395537145863`*^9, 3.767439553738364*^9}, {3.7674396297952394`*^9, - 3.7674396628320494`*^9}, {3.767440685107992*^9, 3.767440691699963*^9}, { - 3.7689999875441217`*^9, 3.7690000317528076`*^9}, {3.7690103856535697`*^9, - 3.7690104231891613`*^9}, {3.769010719795543*^9, 3.769010796934086*^9}, { - 3.7690109149563103`*^9, 3.7690109581418023`*^9}, {3.769011024243966*^9, - 3.769011045652687*^9}, {3.769011088910946*^9, 3.7690112787360554`*^9}, { - 3.769011380012113*^9, 3.769011471372706*^9}, {3.76901198520442*^9, - 3.7690121625007706`*^9}, {3.769013075586748*^9, 3.7690131923862476`*^9}, { - 3.769013223216756*^9, 3.7690132233683486`*^9}, {3.7690133446099586`*^9, - 3.769013406034613*^9}, {3.7690134387919683`*^9, 3.7690134472403646`*^9}, { - 3.769013702367876*^9, 3.7690138950034666`*^9}, {3.769014350618451*^9, - 3.769014356271325*^9}, {3.7690147081837597`*^9, 3.7690147116315355`*^9}, { - 3.769015006181808*^9, - 3.769015019340603*^9}},ExpressionUUID->"b3753863-602f-43a6-addd-\ -8958fa819ca4"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Tests", "Section", - CellChangeTimes->{{3.766584346105257*^9, - 3.7665843523924475`*^9}},ExpressionUUID->"ab5407d3-9e8a-48ac-9144-\ -fd589f8d19ac"], - -Cell[CellGroupData[{ - -Cell["Test for the Split functions", "Subsection", - CellChangeTimes->{{3.766584355546017*^9, 3.7665843765259514`*^9}, - 3.7665848485336113`*^9, - 3.766599173173456*^9},ExpressionUUID->"e01b2ca7-8a75-45f2-87f6-\ -a438e8178b52"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"TestReducedCSDSplit", "[", "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"m", ",", "n", ",", "v", ",", "m1", ",", "m2", ",", "m3"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{"2", "m"}], "\[LessEqual]", - RowBox[{ - "n", " ", "and", " ", "n", " ", "must", " ", "be", " ", "even"}]}], - "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", "True"}], ";", "\[IndentingNewLine]", - RowBox[{"m", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"2", ",", "10"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"n", "=", - RowBox[{ - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"2", "*", "m"}], ",", "30"}], "}"}], "]"}], "*", "2"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"m", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"test", " ", "without", " ", "EfficientRepresentation"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"m3", ",", "m2", ",", "m1"}], "}"}], " ", "=", " ", - RowBox[{"ReducedCSDSplit", "[", "v", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{"v", "-", - RowBox[{"m1", ".", "m2", ".", "m3"}]}], "]"}], ",", - "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"test", " ", "with", " ", "EfficientRepresentation"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{"r", "=", - RowBox[{ - RowBox[{ - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"v", ",", " ", - RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], "]"}], - "[", - RowBox[{"[", "2", "]"}], "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isIdentity", "[", - RowBox[{ - RowBox[{"ConjugateTranspose", "[", "r", "]"}], ".", "r"}], "]"}], - ",", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"return", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{"result", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", "\"\\"", "]"}], ";", - " ", - RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7665846660459614`*^9, 3.7665847816718597`*^9}, { - 3.766584848555552*^9, 3.766584848560539*^9}, {3.766585194416991*^9, - 3.766585260152951*^9}, {3.7689867057804594`*^9, 3.768986762177565*^9}, { - 3.768987178419902*^9, 3.768987203302307*^9}, {3.768988351916609*^9, - 3.768988352230774*^9}, {3.7689884095613413`*^9, 3.768988468127643*^9}, { - 3.768988670497406*^9, 3.7689886954576235`*^9}, {3.76898882426506*^9, - 3.7689888245203476`*^9}}, - CellLabel->"In[69]:=",ExpressionUUID->"99ad6fee-8738-44c6-b736-17148c858be1"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestReducedCSDSplit", "[", "]"}]], "Input", - CellChangeTimes->{{3.768988518301433*^9, 3.768988525951964*^9}}, - CellLabel->"In[71]:=",ExpressionUUID->"53d0b155-a0a4-4e28-8eb7-49537ab5e794"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.76898852659624*^9, 3.768988530972578*^9}, { - 3.768988594767914*^9, 3.7689886135815573`*^9}, {3.7689886633864083`*^9, - 3.7689886974482727`*^9}, {3.768988819143733*^9, 3.768988841560755*^9}}, - CellLabel->"Out[71]=",ExpressionUUID->"c10ce11d-504a-4055-af67-f13ad9108447"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"TestQRSplit", "[", "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "result", ",", "m", ",", "n", ",", "v", ",", "r", ",", "q1", ",", "q2"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", "True"}], ";", "\[IndentingNewLine]", - RowBox[{"m", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"2", ",", "10"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"n", "=", - RowBox[{ - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"2", "*", "m"}], ",", "30"}], "}"}], "]"}], "*", "2"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"m", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"r", ",", - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], " ", "=", " ", - RowBox[{"QRSplit", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{"v", "-", - RowBox[{ - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "q2"}], "}"}]}], "}"}], "]"}], ".", "r"}]}], - "]"}], ",", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{"result", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", "\"\\"", "]"}], ";", - " ", - RowBox[{"Return", " ", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7665848284343333`*^9, 3.7665848619986153`*^9}, { - 3.766584905023596*^9, 3.7665849355110917`*^9}, {3.7665849675913315`*^9, - 3.7665851912315063`*^9}, {3.7665852904150205`*^9, 3.7665853755364637`*^9}, { - 3.7665854417284856`*^9, 3.7665855325606756`*^9}, {3.7674327190314503`*^9, - 3.7674327195784035`*^9}, {3.767432793323058*^9, 3.767432821094531*^9}}, - CellLabel-> - "In[213]:=",ExpressionUUID->"55c35b25-c1ba-4d20-8b02-98a32cd64908"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestQRSplit", "[", "]"}]], "Input", - CellLabel-> - "In[214]:=",ExpressionUUID->"62af65db-8e03-4b38-bed4-3eb19cc5fe59"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.766585353053567*^9, 3.766585378135491*^9}, - 3.766585482316984*^9, 3.766585534260481*^9, 3.7674327129805813`*^9, - 3.7674328250115333`*^9, {3.7689885045931015`*^9, 3.768988507690789*^9}, - 3.7689998743838587`*^9}, - CellLabel-> - "Out[214]=",ExpressionUUID->"80d6cfd6-8f67-4c80-b6a5-44c9322d4645"] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Test Reduced CSD decomposition", "Subsection", - CellChangeTimes->{{3.7665855457158575`*^9, - 3.7665855761342564`*^9}},ExpressionUUID->"c840a135-7e44-4968-bab0-\ -c6b8263d8ec2"], - -Cell[CellGroupData[{ - -Cell["Example1 (reuse qubit) n=2,m=1,k=1", "Subsubsection", - CellChangeTimes->{{3.7665774119114876`*^9, 3.7665774202582064`*^9}, { - 3.7674339073536777`*^9, - 3.7674339309547105`*^9}},ExpressionUUID->"46bada4f-2b65-46d6-8449-\ -2ff3d19c5383"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.766333712554659*^9, 3.7663337216144323`*^9}, { - 3.766335015462319*^9, 3.766335015573023*^9}, {3.7663355964537024`*^9, - 3.7663356093023815`*^9}, {3.766337755407365*^9, 3.7663377555410175`*^9}, - 3.76633962691089*^9, 3.7663397065581903`*^9, 3.766340787222144*^9, - 3.7663408373760347`*^9, 3.766342288093828*^9, {3.7663424555071993`*^9, - 3.766342466628435*^9}, 3.7663427493833647`*^9, {3.766342983790574*^9, - 3.7663429935095863`*^9}, {3.7665756385086913`*^9, 3.7665756656361394`*^9}, - 3.766575783131547*^9}, - CellLabel-> - "In[246]:=",ExpressionUUID->"222c615b-a42b-4ee3-a8d3-36120f9f8aec"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.5562031488102216`", - RowBox[{"-", "0.08943537113846498`"}]}, - {"0.2868927457431966`", "0.4476530327151198`"}, - {"0.5203187231731158`", - RowBox[{"-", "0.04086198887217893`"}]}, - {"0.4026406600219025`", "0.26147882915254467`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.766333713915021*^9, 3.7663337223315153`*^9}, - 3.7663350160836573`*^9, {3.766335600169801*^9, 3.7663356102877464`*^9}, - 3.7663377176861954`*^9, {3.766337755969861*^9, 3.7663377718474054`*^9}, { - 3.7663378369483657`*^9, 3.7663378684740963`*^9}, {3.7663396272978306`*^9, - 3.7663396388519354`*^9}, 3.7663397068972836`*^9, 3.7663401069530573`*^9, - 3.7663402211018295`*^9, 3.7663403238022113`*^9, 3.766340428904173*^9, - 3.7663404653796406`*^9, 3.7663407879053173`*^9, 3.7663408382915874`*^9, - 3.766342292852105*^9, 3.76634246715403*^9, 3.7663427502500467`*^9, - 3.76634289545079*^9, {3.766342985802194*^9, 3.7663429944889665`*^9}, - 3.7663432208267484`*^9, 3.7665717762284293`*^9, 3.76657412703884*^9, { - 3.766575640436507*^9, 3.766575666436002*^9}, 3.766575783849626*^9, - 3.7665758454499493`*^9, 3.766576211483008*^9, 3.7665820369412255`*^9, - 3.766596881845497*^9, 3.7674328399519067`*^9, 3.7674329411285715`*^9, - 3.7674375146122665`*^9, 3.767441070248887*^9, 3.7690115009575496`*^9, - 3.769011594581498*^9, 3.769013989427829*^9}, - CellLabel-> - "During evaluation of \ -In[246]:=",ExpressionUUID->"3bc23efe-2da5-44a4-8729-811d09773bfb"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.29153628927818365`"}], "0.8035624703210873`"}, - {"0.17513502141877502`", "0.24671250620362192`"}, - {"0.15903026796401692`", "0.10525957774645245`"}, - {"0.18580426551614765`", "0.06251330520412025`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.766333713915021*^9, 3.7663337223315153`*^9}, - 3.7663350160836573`*^9, {3.766335600169801*^9, 3.7663356102877464`*^9}, - 3.7663377176861954`*^9, {3.766337755969861*^9, 3.7663377718474054`*^9}, { - 3.7663378369483657`*^9, 3.7663378684740963`*^9}, {3.7663396272978306`*^9, - 3.7663396388519354`*^9}, 3.7663397068972836`*^9, 3.7663401069530573`*^9, - 3.7663402211018295`*^9, 3.7663403238022113`*^9, 3.766340428904173*^9, - 3.7663404653796406`*^9, 3.7663407879053173`*^9, 3.7663408382915874`*^9, - 3.766342292852105*^9, 3.76634246715403*^9, 3.7663427502500467`*^9, - 3.76634289545079*^9, {3.766342985802194*^9, 3.7663429944889665`*^9}, - 3.7663432208267484`*^9, 3.7665717762284293`*^9, 3.76657412703884*^9, { - 3.766575640436507*^9, 3.766575666436002*^9}, 3.766575783849626*^9, - 3.7665758454499493`*^9, 3.766576211483008*^9, 3.7665820369412255`*^9, - 3.766596881845497*^9, 3.7674328399519067`*^9, 3.7674329411285715`*^9, - 3.7674375146122665`*^9, 3.767441070248887*^9, 3.7690115009575496`*^9, - 3.769011594581498*^9, 3.769013989433812*^9}, - CellLabel-> - "During evaluation of \ -In[246]:=",ExpressionUUID->"6b9d1c6f-941f-4f62-acc6-ecf31fc62a6f"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DoNotReuseAncilla", "->", "False"}]}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7663401374076233`*^9, 3.7663401493806076`*^9}, { - 3.7663406072024155`*^9, 3.766340629564616*^9}, 3.766342307390231*^9, - 3.766342396110996*^9, {3.766573880787141*^9, 3.7665739190259237`*^9}, - 3.7665740602184715`*^9, {3.7665742140512342`*^9, 3.76657425788206*^9}, { - 3.7665753909793406`*^9, 3.766575392499277*^9}, 3.767433304109812*^9, { - 3.76743506677325*^9, 3.7674350785940804`*^9}, {3.767440842489877*^9, - 3.7674408441010723`*^9}, {3.767441073824912*^9, 3.7674410982729425`*^9}}, - CellLabel-> - "In[247]:=",ExpressionUUID->"ba4be30b-5d55-411a-8bcc-aac08aebc97e"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]], "Input", - CellLabel-> - "In[248]:=",ExpressionUUID->"1ac403f0-5f25-40d4-9c0b-ce8fa7ace86d"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.604198436302705`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014000788432*^9}, - CellLabel-> - "During evaluation of \ -In[248]:=",ExpressionUUID->"73f0c737-de2d-4b5c-ab21-7f2dbd3cf34e"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.132628864021706`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7397390797851134`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690140007914243`*^9}, - CellLabel-> - "During evaluation of \ -In[248]:=",ExpressionUUID->"c085a5fe-9ad4-4e60-ae6b-a0b52254501f"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{3.7690140007964106`*^9}, - CellLabel-> - "During evaluation of \ -In[248]:=",ExpressionUUID->"dc224ae0-c42c-4d12-bb72-7bc15354acdd"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"{", - RowBox[{"8", ",", "Null", ",", "2"}], "}"}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.769014000799402*^9}, - CellLabel-> - "During evaluation of \ -In[248]:=",ExpressionUUID->"ac24ab55-ed6d-4276-bdda-37926afabda8"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.892985682289386`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.297567516716601`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.32448118279653304`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794897`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6638984806276833`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.04217005175780123`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.026242032066981`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.536207742565916`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9132376867051183`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7920692507684786`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5488051600495136`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.213548282435862`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.7223266753685267`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014000806384*^9}, - CellLabel-> - "During evaluation of \ -In[248]:=",ExpressionUUID->"0b76d735-371b-4ba9-950a-5cdc3fde639a"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example2 (reuse qubits) n=1, m=2, k=4, l=1", "Subsubsection", - CellChangeTimes->{{3.76657742354143*^9, 3.766577430234536*^9}, { - 3.7674414915129547`*^9, - 3.7674415141282196`*^9}},ExpressionUUID->"8a768103-8b13-4c07-925d-\ -13ff2ca833f3"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "2", ",", "16"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7665762788664417`*^9, 3.7665762859395337`*^9}, { - 3.7665764137887516`*^9, 3.766576431263038*^9}, {3.7674354008618374`*^9, - 3.767435401450264*^9}, {3.767442839492713*^9, 3.7674428407576847`*^9}}, - CellLabel-> - "In[249]:=",ExpressionUUID->"57b1b16d-3b19-4cbf-a509-84b4572b91c3"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7674420583748116`*^9, 3.767442058764325*^9}}, - CellLabel-> - "In[250]:=",ExpressionUUID->"620d403d-270c-46e9-8e54-f25140ad0167"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8280775612433653`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.376672524400894`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.608662815152222`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2072494079946614`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7139058079960678`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11803086773045168`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014034106288*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"34255a8f-a948-43f9-a9b7-e7c097c92df6"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.9958254406913325`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.6615473715262772`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3831572268983727`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.0714275981482493`", ",", "3"}], "}"}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.76901403410928*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"6768665e-77d2-4b0e-ad7c-d1fc92148d53"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{3.76901403411327*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"56c6d456-c216-4701-9050-d3a9be3bc3aa"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"{", - RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690140341152644`*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"7bd4ea3d-50b8-47e6-b724-5c209a6b8807"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "2.769292338446094`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.819694821793526`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.660989400975847`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.805880634273674`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4537125107229643`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8184618454103907`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6701496482891196`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.382916862476793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.501546010214703`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.721974181164784`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8448949036902185`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0836722564762353`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}]}], "}"}]}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690140341202745`*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"6b32e4b8-8b31-47af-8b50-80e85137b219"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.9747672967446808`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6679896034680475`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.0950471054760964`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "0.8425238090663874`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.166241343439897`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.9072567614406906`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "0.9855809675374413`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7344694416936551`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.76901403412424*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"0dc3d6d3-3af1-465a-9ba1-a312125c1b52"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "2", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{3.7690140341272316`*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"ebbcf39c-0ac6-4eb8-af03-636fdf62a1b5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"{", - RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690140341292267`*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"32924fce-4acd-4cda-a59a-3c364e58a306"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0634722998084318`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.6485292218626135`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.036877834921227`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.349380664256114`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.7123889803846755`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.281177780412549`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.855644772367313`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589779`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.581928146544639`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384686`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.26193299790204`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.165121430945345`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948992`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.4410946548335946`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.03992056678949463`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.229055460763314`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.689202681089035`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267949006`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4777578488041034`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897967`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.3185955877203162`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.735892585490398`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.759981444294862`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9850391977462056`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.778602648495147`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.9777501416456467`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.026037088185856`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.807076687623449`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589795`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0415346345375136`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5192348031823117`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.011338270408583`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.119566383071059`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.3235216359266837`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5498149036569777`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.579273607952427`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.268963202336125`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0264247964982691`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948992`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.14607638877319643`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.183780239753981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.9635671160790977`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.9306444003481875`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.279738351460031`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.816006109212173`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.7795311302910637`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.0395424699088025`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.117124053825603`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9641306467378277`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.691614084456748`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.126030306292516`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.42967847609639`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8375288172897114`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948961`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3126100109582004`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.582264047982358`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.010835585730236`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.872110877242105`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5439811570038429`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.864511866726148`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7339507102014866`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "6.258566492942777`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4862442949614912`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.000022580785504544565`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.01001826081326973`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7346245487344991`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.633805851356526`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.536827154063772`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.0361181440069`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.455192236448855`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.279787336855088`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.49776445133915`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.130830267755233`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.298395562210642`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.8584687150151686`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.014838776871981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5679214085384117`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707466235955903`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.138467713988371`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7812906359539493`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974484`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.0726909980205335`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6549269685407686`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.355453513590073`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5674305996877975`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.979040976244281`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.482537399278808`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.76154939959504`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5231143672877858`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7702503361188254`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3544646169159007`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.776937105069661`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1764965004489656`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5457410004233374`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.643563060425247`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.704197226305973`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7822992474073633`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.07114812583583`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.945529584652656`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.817292977554391`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.506244408212568`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8666106344934212`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.185847411682689`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.965762556895329`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.175497481398352`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.17137879990917448`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.890045127453771`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.111235931174971`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.99661846730412`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589792`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.634180542531002`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.986734680942202`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.638996851813481`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.352842963484637`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.792035638211256`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384688`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.72306948695187`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.155038996767058`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.666770236553685`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.8565792524356155`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014034157152*^9}, - CellLabel-> - "During evaluation of \ -In[250]:=",ExpressionUUID->"2a30a3e1-2ecb-48d9-9807-e99c79ac2471"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example3 ", "Subsubsection", - CellChangeTimes->{{3.766577441126419*^9, - 3.7665774579115467`*^9}},ExpressionUUID->"9dd04ade-e7e5-4bd6-a8de-\ -8ed4e1855024"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellLabel-> - "In[229]:=",ExpressionUUID->"c0c24c64-880d-4e7d-a3bf-c1a83384242c"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.17353950519770414`"}], "0.5892337973307986`"}, - {"0.1384273896469801`", "0.18591471991697917`"}, - {"0.46138875837201115`", "0.37164727375160844`"}, - {"0.7119556307515604`", - RowBox[{"-", "0.1300433413383928`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{3.766577487608159*^9, 3.766578161287359*^9, - 3.767433851804544*^9, 3.769011672323495*^9}, - CellLabel-> - "During evaluation of \ -In[229]:=",ExpressionUUID->"e7e607b1-61aa-4263-a0bd-bd7ee87de726"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.375049043188997`", "0.2546327183257929`"}, - { - RowBox[{"-", "0.2516967189967966`"}], "0.5667417595932759`"}, - {"0.07665389538847718`", "0.0808467070808438`"}, - {"0.145164212502183`", "0.26577443242942145`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{3.766577487608159*^9, 3.766578161287359*^9, - 3.767433851804544*^9, 3.769011672330476*^9}, - CellLabel-> - "During evaluation of \ -In[229]:=",ExpressionUUID->"e1e35eaf-fbda-459b-b409-ea072144e8a3"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7665774853551826`*^9, 3.7665774989717836`*^9}, { - 3.767441202228734*^9, 3.7674412043101454`*^9}}, - CellLabel-> - "In[230]:=",ExpressionUUID->"ace8a1c1-dd1b-4a70-b555-0a26dbb185cf"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.121193451669002`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, - 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, - 3.7690116754591045`*^9}, - CellLabel-> - "During evaluation of \ -In[230]:=",ExpressionUUID->"3b5c0afe-9c73-41ab-a8ea-76da1c390cdd"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4971907763902148`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0025849446305877`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, - 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, - 3.769011675463095*^9}, - CellLabel-> - "During evaluation of \ -In[230]:=",ExpressionUUID->"bcecbe03-1bf6-4892-a54b-abcdd1a0ec19"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, - 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, - 3.7690116754670844`*^9}, - CellLabel-> - "During evaluation of \ -In[230]:=",ExpressionUUID->"14cd420d-b574-4ffd-a797-3b63a50bf76a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7384543309879236`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.1319016107057145`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.463393384238476`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.1078484089492`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1443077150222452`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.40717219201273236`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.784276456449035`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1034756981751142`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5110574230803501`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2198100061942907`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.183596594086367`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589792`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.719121009359385`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.766577488916665*^9, 3.7665775001286907`*^9}, - 3.766578162477178*^9, {3.767441205527023*^9, 3.767441208691697*^9}, - 3.769011675474066*^9}, - CellLabel-> - "During evaluation of \ -In[230]:=",ExpressionUUID->"49c5d714-13c6-4209-b65c-334f1257455c"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example4", "Subsubsection", - CellChangeTimes->{{3.7665787521737967`*^9, - 3.7665787713874435`*^9}},ExpressionUUID->"3cee5c3f-5857-4ee5-b683-\ -10f96cafaf92"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "4", ",", "8"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7665777584112206`*^9, 3.766577763708061*^9}, { - 3.766577885134451*^9, 3.766577908333433*^9}, {3.7665783916134787`*^9, - 3.766578399411631*^9}, {3.7665784792232704`*^9, 3.766578487427555*^9}, - 3.7674428801632166`*^9}, - CellLabel-> - "In[252]:=",ExpressionUUID->"7b6b0b07-02d5-4722-9ed3-d1108461c3ae"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}], ";"}]}], "Input", - CellChangeTimes->{{3.7665777159587097`*^9, 3.7665777205085473`*^9}, { - 3.7665777765317793`*^9, 3.7665777850280666`*^9}}, - CellLabel-> - "In[253]:=",ExpressionUUID->"34e20742-d410-41fb-949c-7e2276e33f2b"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.059297703155052`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7221283514439631`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.280901899959243`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.362668950262355`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.12552967895197226`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.27964529179144093`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "6"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690140790211163`*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"767a298c-e8ef-4903-bccc-cb93b2b23236"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8918707965322608`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.583947991187743`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.4497231741233862`", ",", "1"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.1564396658636353`", ",", "1"}], "}"}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014079025106*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"ce7f941f-b733-4ef0-968c-d07421ac66c4"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{3.7690140790290937`*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"3a624d72-13ff-4460-b7ce-157cc54f5d62"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "0.5169081709494948`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.484855061512915`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.4114427343502225`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948946`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.173133026036519`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11201950440398514`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.125781040963981`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "6"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.9474364598421694`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1148265154808827`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.707244641257323`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.8272866500374547`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4031920613535402`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.85969886912041`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "6"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690140790350776`*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"3248d98f-5ce8-493c-aadf-6b20a0445b7e"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.675280537891014`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.16924269973481`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.0343125255125214`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "0.7106753558398746`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1040594793921743`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.9511658106966199`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.3880088396089856`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7354755866073815`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690140790390673`*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"8df78050-03ee-4732-8a3f-f6a8c41b91f7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{3.7690140790410624`*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"630a5e75-5ab6-4276-bd22-08b30f404368"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.1009004280076566`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8664263045967944`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.976869193994792`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.68474219778307`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0974401745844844`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0341741890348777`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.741041219593595`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5388984508031436`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.530526614056157`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.153921967406397`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7027408452473962`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.371028901217718`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7485388757162179`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.25878440203473185`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.43992138750749765`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.812372153980152`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.472959722731246`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.245586360887163`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5630528990854764`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.097741511681132`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0112388990906855`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.285944486958395`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.58913119972569`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.362629590778057`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.3012984520519675`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.26949787474292913`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7494924716490279`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.556754646001274`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7206799880612613`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.547266936651667`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.466807879993062`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.142684279948441`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.88904979974148`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.6367228522158026`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8130542454069246`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.992909685246225`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6696068493785725`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.283927602461581`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.938011074775515`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.9385855409632704`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589792`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5767374891510083`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948943`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.271700267584534`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.987481190006596`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.733192502911591`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.5827107562206107`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.561624541810766`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.144306227479552`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8398046440020516`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6856456643550358`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948957`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.17443767838443947`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.587359192047772`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.758449019137225`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.73540967137021`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8417177869478776`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948948`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.821531172155046`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.5762932588157526`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.046871350069871`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8215670408725222`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.095177036216354`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.923958971345887`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.880777698176664`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.614213487557229`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.579626751349725`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3154217213110797`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.125844453208251`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.323807389159554`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.849423636246845`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.89020137627495`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.0253157752604753`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.9697350544409336`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7590892310469446`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.177015910462604`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7085885725911886`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4399154768821125`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.37935853471254394`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.054739428708739`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5599786852824986`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.068859385529503`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.705996354342444`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.6648649853117634`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.025211428889126`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.8895843305367226`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5291336457017651`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.7134222990711585`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0918090820781752`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.3833813624102715`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.4588562934286737`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.11194003336622277`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2853649096371966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.9098809040673927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.437755283910963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.2401906671914045`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.6574133244524845`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.15637617742791546`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2031249399635136`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.508839212840409`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0381999787747427`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.8345796385683766`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3119307289292514`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.566423452709351`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.8332110304111064`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5785512123688585`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.285406783907758`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.218034392784138`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.318395309537807`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2777745747349976`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2092059049951336`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0353523386735697`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11534334923930056`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6768870049188682`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.12308639485584982`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948806`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.798324082246086`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1448517648787173`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.944674858683144`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "6.283185307179583`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.777495861211376`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897896`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.6436717244035624`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.6126074595299107`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.119996881395514`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.128109437646448`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948999`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.749296749770654`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.057031553831026`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.253979825520041`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.47133293888481154`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5789396066742776`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014079070982*^9}, - CellLabel-> - "During evaluation of \ -In[253]:=",ExpressionUUID->"2b38ffe7-43f2-4da1-9756-d4a5eb25bea0"] -}, Open ]] -}, Open ]] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Test QR decomposition", "Subsection", - CellChangeTimes->{{3.7665857059432364`*^9, - 3.766585725983663*^9}},ExpressionUUID->"9e3e465f-7792-498e-8cb5-\ -d148e0ec6bce"], - -Cell[CellGroupData[{ - -Cell["Example 1 (reuse qubit) n = 2, m = 1, k = 1", "Subsubsection", - CellChangeTimes->{{3.7674419174355516`*^9, - 3.767441951909088*^9}},ExpressionUUID->"91db1d89-924f-408c-985b-\ -2313b9c7fd4e"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellChangeTimes->{3.76743945433722*^9}, - CellLabel-> - "In[255]:=",ExpressionUUID->"013e166b-cb35-4b15-9fc8-544f9e2327c7"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.4905582701802258`", "0.0993935690435814`"}, - {"0.152912791594013`", "0.23759144339156918`"}, - {"0.040334938884184185`", "0.3244158701763987`"}, - {"0.37423495367316617`", "0.18802532036184996`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7665919437122736`*^9, 3.7665921936832604`*^9, 3.7665969253691454`*^9, - 3.76743253048674*^9, 3.767436796745864*^9, 3.7674371074018326`*^9, - 3.7674382516422677`*^9, 3.7674387503237066`*^9, {3.7674406996119804`*^9, - 3.767440702834814*^9}, 3.767440759005213*^9, 3.767441291448786*^9, - 3.7690121714578047`*^9, 3.769014117816327*^9}, - CellLabel-> - "During evaluation of \ -In[255]:=",ExpressionUUID->"831e0a0e-439f-4395-ac88-5d25bf3228a8"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.5124715008820717`", "0.07365637905491745`"}, - {"0.28376219252291285`", "0.5117317954644107`"}, - { - RowBox[{"-", "0.17919316148420472`"}], "0.4225579844929883`"}, - { - RowBox[{"-", "0.4680099824092695`"}], "0.589255550348841`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7665919437122736`*^9, 3.7665921936832604`*^9, 3.7665969253691454`*^9, - 3.76743253048674*^9, 3.767436796745864*^9, 3.7674371074018326`*^9, - 3.7674382516422677`*^9, 3.7674387503237066`*^9, {3.7674406996119804`*^9, - 3.767440702834814*^9}, 3.767440759005213*^9, 3.767441291448786*^9, - 3.7690121714578047`*^9, 3.7690141178223114`*^9}, - CellLabel-> - "During evaluation of \ -In[255]:=",ExpressionUUID->"94864cd4-9458-43da-b0c2-e7ff0c1d6491"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7665913479698105`*^9, 3.7665913901399097`*^9}, - 3.7665914305568647`*^9, {3.7665914908117833`*^9, 3.766591504050392*^9}, { - 3.7665918022683525`*^9, 3.7665918575725513`*^9}, {3.766591906052977*^9, - 3.7665919065546083`*^9}, {3.7665919528887424`*^9, 3.766591959475134*^9}, { - 3.766592518372278*^9, 3.766592522690734*^9}, {3.7665941085910416`*^9, - 3.766594139291998*^9}, {3.766594693285367*^9, 3.766594694156039*^9}, { - 3.7665958759822197`*^9, 3.766595877116188*^9}, {3.7665977768793917`*^9, - 3.766597777917617*^9}, {3.7674325690336103`*^9, 3.7674325699591775`*^9}, { - 3.7674367546936903`*^9, 3.767436784081429*^9}, {3.767436822802719*^9, - 3.767436873467663*^9}, 3.7674382589051857`*^9, {3.767438379487771*^9, - 3.767438408706781*^9}, 3.767438816691412*^9, {3.7674395769103565`*^9, - 3.7674395776277037`*^9}}, - CellLabel-> - "In[256]:=",ExpressionUUID->"27230ac3-13d8-40e8-b787-4b4c8860c54c"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.356194490192345`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.122526805787985`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1225268057879865`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6567914445064659`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589795`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6567914445064665`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7605154932052614`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690141234163566`*^9}, - CellLabel-> - "During evaluation of \ -In[256]:=",ExpressionUUID->"1202cb52-bf83-4d90-8dd4-125f9dcbb1b7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{3.7690141234183407`*^9}, - CellLabel-> - "During evaluation of \ -In[256]:=",ExpressionUUID->"4b9c9173-3617-401e-8ccb-c250aa4e5300"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"8", ",", "Null", ",", "2"}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141234223275`*^9}, - CellLabel-> - "During evaluation of \ -In[256]:=",ExpressionUUID->"fd2cd305-ac99-44fe-836c-5cb085f9284f"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.7652202470189495`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.43349770179704805`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.2846309159917961`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5178622051255108`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.725789958541886`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948957`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.0835921630907634`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.23211670088035694`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.840858328417524`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.2373074764429255`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.7123889803846915`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.3026964007876685`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8984868329353475`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3123147333702805`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141234283123`*^9}, - CellLabel-> - "During evaluation of \ -In[256]:=",ExpressionUUID->"7a6095c2-cfa6-4bb1-8653-eee9ed06a2de"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example 2(reuse qubit) n = 1, m = 2, k = 4, l =1", "Subsubsection", - CellChangeTimes->{{3.767441958982495*^9, - 3.767442003913947*^9}},ExpressionUUID->"22a251d4-6170-4c1a-a48d-\ -28055fc236cd"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "2", ",", "16"}], "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], - "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7674420362351923`*^9, 3.767442043834205*^9}, { - 3.7674420763325677`*^9, 3.7674420974443064`*^9}, {3.769014409630559*^9, - 3.7690144134593143`*^9}, 3.7690148208626437`*^9}, - CellLabel-> - "In[285]:=",ExpressionUUID->"da50a357-49d4-47c6-84e8-e23d5c987dda"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.651029748869265`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.948155600614766`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.29867674105246`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.773748211899188`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7278804142575657`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7278804142575657`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.21892959595147748`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653590699`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8429159125373331`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.736269685841565`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.21892959595148562`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.26941796653242284`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.26941796653242284`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2831427242604823`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5256347639324687`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2831427242604818`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.053697555821586`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897505`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.053697555821586`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6911081229791372`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6911081229791392`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7173496740076062`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.879688203815761`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7173496740076057`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2450225972094562`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3257737295854419`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.32577372958544326`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9554403000666867`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8965700563803383`", ",", "5"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147449493`*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"bf6b2743-6a11-474b-b7f8-d52b361fec8c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147489386`*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"6cfd4140-7233-4b65-9b2f-97df450451fd"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"{", - RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147559195`*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"c0844e7b-31a6-42b5-8f02-ca0ad252c812"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.7123889803846915`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.816855147662351`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.773903685601554`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.235289201819701`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.0371264863121326`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6644928750248054`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6644928750248047`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0179473798667182`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.906303451770093`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6079093084159088`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0179473798667205`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4928695225069542`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.49286952250695604`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897913`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0960592711930655`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.31102998701198237`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.096059271193065`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1566803741492493`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.15668037414925`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.27391700539096586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897944`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.27391700539097075`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589796`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.927621869507145`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2968793214039327`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9276218695071452`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4081243080561106`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.16267201873878442`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897944`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.1626720187387899`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589792`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0356932805988213`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.875060999123476`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384696`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.730952223540754`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.7524279545711545`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.187837843318253`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384689`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.1230294104337295`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6170415165233577`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6170415165233577`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9329049606567643`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589796`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9537548102715405`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9234289012030839`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.932904960656763`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8502686343799979`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589792`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8502686343799962`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.19011167731301973`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535898078`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.0692736594501614`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897154`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.19011167731301973`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.104566845969395`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1045668459693943`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5780937661416636`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5780937661416636`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2648363027698477`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9927025606532356`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2648363027698477`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4513230564557515`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11947327033915325`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897913`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11947327033915325`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.673208497915234`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.690269597134043`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.769016614771911*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"14f91e34-081d-4bf7-ba82-ef8186edbf14"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "2", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.76901661477487*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"610f210d-f066-4c61-ae4d-2ec8199d2748"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"{", - RowBox[{"8", ",", "Null", ",", "3"}], "}"}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.769016614776864*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"e2434990-6053-4c70-98d3-4883bd44b9bc"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.324297674078698`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.15316464909979743`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.120280487771906`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.316452582221372`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.062640748080721`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9178044888309683`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.850045941033423`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5930102707266824`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.35708312929421`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.020672590169667604`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8839679863436584`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.28440861086606645`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.2258516051258526`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.2496826019484808`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.2191303504578768`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.9051316456784293`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.514304670870944`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.814175940867257`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.294550695152459`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.8834983507849474`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7052707092216935`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.984457222097622`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4570513755504997`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.554493686719099`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.349020263577334`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.22177606321756244`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0792696684550775`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7832405099217379`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9192667019198612`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.1091761889965825`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.427933950554309`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.5949661183118193`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.137429002828867`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.5048378561346905`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0922137589915546`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.3577892192447956`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6673125964997824`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.3264068459948914`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.8827043646564454`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.570796326794896`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.3614258489375377`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.18484627962524308`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948957`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.266953892025835`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.657727107623833`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.9826793718688955`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4173344159029106`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.27873662081906`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.202532348196124`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8398544889535976`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.014279633071335873`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.7123889803846915`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.15335400664018106`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.444505728334`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.435869482856203`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794894`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4065686911055333`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.087402430080827`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.422239413246927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.399929641776418`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.484329143387078`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.714185695708634`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.09482923331831412`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384692`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.261715053514674`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.756412656301751`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.678241523619434`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8860039903481294`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.632469549745644`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.61432370066413`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.009130177986377`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.298315490529787`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.8051539266616385`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.028792439998833`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.8512559852737285`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5475782715707664`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384689`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.14416881131068696`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.06032656024496319`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.42244075535707815`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.829792936832482`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.558466189542015`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.36751483317170575`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.140061339019372`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.15895123759309`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.134787243378931`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.0458163243193774`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.776265381924855`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.8737432117697996`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.469939004554`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5831326680959077`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.674812828769679`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.083427786415201`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.237069526541723`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974482`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.33372680025317325`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.534754944199727`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.119717132219801`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.639696630782196`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.489836365575634`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.579901411482197`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.3002279428517549`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.865931476201238`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.332584163646238`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.098449408494993`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.7766497768097318`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8432689004086464`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.5502721041805247`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.6873785552208083`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.241605874696052`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5319593366465847`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.570796326794898`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.045783796889824`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.779614866224179`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.634973925558749`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.243226717098216`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7381971233722515`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7535511029730397`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7830944379258464`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.18140878481976275`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7784900593965665`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4090430529755979`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.43625288099458`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.178443356884394`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.568635689524333`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.5527981554197807`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.397260996523069`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "6.04819704109487`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.3789434405068999`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1375254153051846`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2075331336175896`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.577102462523062`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9065412037547042`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.9663639468375536`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.8217342636564564`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974484`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.032247370318027`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.2872950914382066`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.250101927712953`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974482`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0539886419165756`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.801011242305021`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.3574346441737735`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.980490043967262`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.916827189982998`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.944786298196013`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6079724783825873`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.800938247654976`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8965118411032549`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.891447342113909`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.04662368234019`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166148067837`*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"9e624d09-8984-4945-993b-b9bcfa4c04e1"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example 3(not reuse qubits) n=2, m=1, k=1, l=1", "Subsubsection", - CellChangeTimes->{{3.7674426067759476`*^9, - 3.7674426529214177`*^9}},ExpressionUUID->"d11717aa-aab0-4786-b0f7-\ -16a918b8135b"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7674426597487755`*^9, 3.767442677508273*^9}, - 3.767442794513642*^9, {3.769014914028371*^9, 3.7690149161387243`*^9}}, - CellLabel-> - "In[275]:=",ExpressionUUID->"d36c163e-c658-4479-bd58-b6d075e4b29e"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3561944901923444`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0038814802033937`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.003881480203395`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3136149946325575`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589803`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.31361499463255604`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.855426671867701`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.769014326281565*^9, 3.7690149178451877`*^9}, - CellLabel-> - "During evaluation of \ -In[275]:=",ExpressionUUID->"291e2fdc-54da-4322-9bb5-161af318e6fb"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{3.769014326281565*^9, 3.7690149178491483`*^9}, - CellLabel-> - "During evaluation of \ -In[275]:=",ExpressionUUID->"768a44cc-9175-41b2-88c1-12945e364234"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3339725375910074`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.7619628681628114`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8766028579634924`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.4324570250635995`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5030630273603551`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.5989407533816453`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.032493898713202`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7696843973597192`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.9619090728816282`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1245322987871447`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6480505023652552`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.342184722027676`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014326281565*^9, 3.769014917855132*^9}, - CellLabel-> - "During evaluation of \ -In[275]:=",ExpressionUUID->"c5580d21-837e-48f9-a42f-25c58b7d0308"] -}, Open ]] -}, Open ]] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Test Recursive decomposition", "Subsection", - CellChangeTimes->{{3.7665986471231785`*^9, - 3.7665986617740135`*^9}},ExpressionUUID->"cc11ec87-d371-4360-a100-\ -5230d6d0b2d8"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "2", ",", "4"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.7689941204395776`*^9, 3.768994121366068*^9}, { - 3.7689984275707397`*^9, 3.768998440911021*^9}, {3.768998866108413*^9, - 3.7689988677420087`*^9}, {3.768999640014763*^9, 3.76899968428529*^9}}, - CellLabel-> - "In[200]:=",ExpressionUUID->"1ccefe4d-94ea-4aa3-98c1-3d4d6ff6ffc1"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.4327552472352544`", "0.1943386412407394`"}, - {"0.033956392243256736`", "0.12420766400950808`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.768999684977438*^9}}, - CellLabel-> - "During evaluation of \ -In[200]:=",ExpressionUUID->"76df781c-e9b6-4b1f-ab5b-6707630e20e8"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.5055951663090607`", "0.030975409518328084`"}, - { - RowBox[{"-", "0.3716970155404267`"}], "0.8272508586435787`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.7689996849834213`*^9}}, - CellLabel-> - "During evaluation of \ -In[200]:=",ExpressionUUID->"95ecc6c8-ed45-4146-96e8-42fb7b6612ed"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.07230843755956334`"}], "0.2457012293140841`"}, - {"0.510811136458537`", "0.10487406953092518`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.7689996849904027`*^9}}, - CellLabel-> - "During evaluation of \ -In[200]:=",ExpressionUUID->"b178205a-7591-4fdd-8347-666cf2e80a54"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.11780979955906214`", "0.1953165588998851`"}, - {"0.37114557752304567`", "0.3898528784986921`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.7689996849923973`*^9}}, - CellLabel-> - "During evaluation of \ -In[200]:=",ExpressionUUID->"c0221ebc-23f4-455a-967f-e7a7bc662436"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]], "Input", - CellChangeTimes->{{3.7666006942818375`*^9, 3.766600710879007*^9}, { - 3.766601809672996*^9, 3.766601822471787*^9}, {3.7666019584163675`*^9, - 3.7666019960637255`*^9}, {3.766602164577238*^9, 3.766602165775036*^9}, { - 3.766602448114402*^9, 3.766602504912565*^9}, {3.7666025718655825`*^9, - 3.7666025750081797`*^9}, {3.768993911256152*^9, 3.768993938398531*^9}}, - CellLabel-> - "In[201]:=",ExpressionUUID->"dc27bfc0-a1bc-48a9-93ef-7f16b63cbd21"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "1.2041803315424144`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.6863264679163665`", ",", "1"}], "}"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7125443944608612`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.7017303421332263`"}], ",", "0.0906239716713129`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.1478450294045026`"}], ",", - RowBox[{"-", "0.08870478607712337`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6528776058810655`"}], ",", "0.2782998293211451`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2438589878371821`"}], ",", - RowBox[{"-", "0.9520861104361045`"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.10654645391845971`"}], ",", "0.6979946052444087`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.643298983732884`"}], ",", - RowBox[{"-", "0.5816622647649508`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.27815720228484475`"}], ",", "0.2702177489035383`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.7052962792349808`"}], ",", "0.3185198721833761`"}], - "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.766601682727855*^9, 3.766601698836791*^9}, - 3.766601735060951*^9, {3.766601778148257*^9, 3.766601793143185*^9}, - 3.766601830213091*^9, {3.7666019475155096`*^9, 3.7666020009277945`*^9}, - 3.766602077766311*^9, {3.7666021663465085`*^9, 3.7666021892692275`*^9}, { - 3.7666022304686003`*^9, 3.766602234386134*^9}, 3.7666023061373205`*^9, { - 3.7666023902370396`*^9, 3.766602406562483*^9}, {3.766602439237132*^9, - 3.7666024856520534`*^9}, 3.7666025332897077`*^9, {3.7666025683519754`*^9, - 3.76660257576017*^9}, {3.766602620434742*^9, 3.7666026884279947`*^9}, - 3.7689934179129066`*^9, 3.7689935111737633`*^9, 3.768993587382861*^9, { - 3.7689936201112947`*^9, 3.7689936480020213`*^9}, 3.7689936791596565`*^9, - 3.7689937544074783`*^9, {3.7689939125407143`*^9, 3.7689939396122837`*^9}, - 3.7689941237965965`*^9, {3.768999660144906*^9, 3.7689996870449057`*^9}}, - CellLabel-> - "Out[201]=",ExpressionUUID->"71e10840-d192-421e-bd36-8f4efa5598a4"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], - "]"}]], "Input", - CellChangeTimes->{{3.7689939974007454`*^9, 3.768993999879114*^9}}, - CellLabel-> - "In[202]:=",ExpressionUUID->"6989921b-b79a-4eed-98fb-39aa78f5b7f7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782137`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7702317579835127`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7702317579835127`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.112060349883618`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1120603498836183`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4056156326988132`", ",", "1"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.567153401842887`"}], ",", - RowBox[{"-", "0.4230546017831959`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.04450202163488772`"}], ",", - RowBox[{"-", "0.16657209208932444`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6626147698022501`"}], ",", - RowBox[{"-", "0.254247183074034`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.4871326879694686`", ",", - RowBox[{"-", "0.8536023148668035`"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.11186975926120546`"}], ",", - RowBox[{"-", "0.6971612243633005`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.7902856263003505`", ",", "0.35722990018518275`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.18226578197636742`", ",", - RowBox[{"-", "0.34229847461823576`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.5742063832338036`", ",", - RowBox[{"-", "0.5188302033729114`"}]}], "}"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.768994001221526*^9, 3.768994037121497*^9, - 3.768994125810212*^9, 3.7689996887563562`*^9}, - CellLabel-> - "Out[202]=",ExpressionUUID->"1752710a-4436-4a13-89b2-8e886d935de0"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]], "Input", - CellChangeTimes->{{3.7689939719458513`*^9, 3.7689939752869363`*^9}}, - CellLabel-> - "In[203]:=",ExpressionUUID->"d2e53e16-623a-4706-9dae-5f482fc10bbf"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.7630303297645324`"}], ",", "0.26670885690840035`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.8169240454570893`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.6463626813635122`", ",", "0.3148494690452071`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.4029532248817336`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.567153401842887`"}], ",", - RowBox[{"-", "0.4230546017831959`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.04450202163488772`"}], ",", - RowBox[{"-", "0.16657209208932444`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.6626147698022501`"}], ",", - RowBox[{"-", "0.254247183074034`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.4871326879694686`", ",", - RowBox[{"-", "0.8536023148668035`"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.11186975926120546`"}], ",", - RowBox[{"-", "0.6971612243633005`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.7902856263003505`", ",", "0.35722990018518275`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.18226578197636742`", ",", - RowBox[{"-", "0.34229847461823576`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.5742063832338036`", ",", - RowBox[{"-", "0.5188302033729114`"}]}], "}"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7689939759331827`*^9, 3.7689940384060335`*^9, - 3.7689941340391617`*^9, 3.7689984471981993`*^9, 3.7689988730468435`*^9, - 3.768999689987034*^9}, - CellLabel-> - "Out[203]=",ExpressionUUID->"e730bc81-8feb-40a6-a3cc-2b9e53d599d7"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"TestDecChannelRecursively", "[", "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"m", ",", "n", ",", "k", ",", "r", ",", "q1", ",", "q2"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"m", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"1", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"n", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"1", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"k", " ", "=", " ", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"Max", "[", - RowBox[{ - RowBox[{"m", "-", "n"}], ",", "1"}], "]"}], ",", "4"}], "}"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"m", "=", "4"}], ";", - RowBox[{"n", "=", "2"}], ";", - RowBox[{"k", "=", "2"}], ";", "\[IndentingNewLine]", - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{ - RowBox[{"2", "^", "m"}], ",", - RowBox[{"2", "^", "n"}], ",", - RowBox[{"4", "^", "k"}]}], "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{"Test", " ", "for", " ", "DecomposeIso"}], "\[Rule]", - "\"\\""}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"r", ",", "q1", ",", "q2"}], "}"}], "=", - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]}], - ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}], " ", "=", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"Flatten", "[", - RowBox[{"q1", ",", "1"}], "]"}], ",", - RowBox[{"Flatten", "[", - RowBox[{"q2", ",", "1"}], "]"}]}], "}"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{ - RowBox[{ - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "q2"}], "}"}]}], "}"}], "]"}], ".", "r"}], - " ", "-", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], "]"}], ",", - "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"return", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{"result", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", "\"\\"", "]"}], ";", - " ", - RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}], - "\[IndentingNewLine]"}]], "Input", - CellChangeTimes->{{3.768994466423875*^9, 3.7689945115986624`*^9}, { - 3.7689974747871113`*^9, 3.7689974954169717`*^9}, {3.7689975356642604`*^9, - 3.768997556957325*^9}, {3.768997594121874*^9, 3.768997594410082*^9}, { - 3.7689976841130753`*^9, 3.7689977384866214`*^9}, {3.7689977742279916`*^9, - 3.7689977966989617`*^9}, {3.768997847904957*^9, 3.7689980222169476`*^9}, { - 3.7689980582974052`*^9, 3.7689981824731655`*^9}, {3.768998231007315*^9, - 3.7689982515214295`*^9}, {3.768998298863761*^9, 3.7689982990153275`*^9}, { - 3.768998408552254*^9, 3.7689984097271357`*^9}, {3.768998883332326*^9, - 3.7689989088530416`*^9}, {3.768999711222218*^9, 3.76899975835335*^9}}, - CellLabel-> - "In[211]:=",ExpressionUUID->"494b24e5-51a1-412f-bce0-419a663c9911"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestDecChannelRecursively", "[", "]"}]], "Input", - CellChangeTimes->{{3.7689984019858227`*^9, 3.768998402487481*^9}, { - 3.768998913804822*^9, 3.768998924127204*^9}}, - CellLabel-> - "In[210]:=",ExpressionUUID->"e0efbda9-1065-426e-91bf-5e07fc7dc84b"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.768998900163292*^9, 3.768998927372521*^9}, { - 3.7689996974460773`*^9, 3.7689997032216244`*^9}, 3.7689997551948185`*^9}, - CellLabel-> - "Out[210]=",ExpressionUUID->"d43ef657-399b-4906-8645-46603d19ce03"] -}, Open ]] -}, Closed]] -}, Open ]] -}, -WindowSize->{958, 988}, -WindowMargins->{{Automatic, -4}, {Automatic, 0}}, -FrontEndVersion->"11.3 for Microsoft Windows (64-bit) (March 6, 2018)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[580, 22, 507, 9, 28, "Input",ExpressionUUID->"146c2df9-6b11-4cd7-8f49-23585d3617b5"], -Cell[1090, 33, 342, 5, 32, "Output",ExpressionUUID->"53500a27-c22e-4791-a772-9717e2a24c29"] -}, Open ]], -Cell[CellGroupData[{ -Cell[1469, 43, 404, 9, 28, "Input",ExpressionUUID->"c7b79881-36f6-45ea-8e5a-d369c93caba8"], -Cell[1876, 54, 535, 7, 32, "Output",ExpressionUUID->"51542b02-8d5d-45c1-b473-3be58efc088f"] -}, Open ]], -Cell[2426, 64, 740, 14, 48, "Input",ExpressionUUID->"c18f187d-e07f-46c7-b748-3ead076c47bd"], -Cell[CellGroupData[{ -Cell[3191, 82, 156, 2, 28, "Input",ExpressionUUID->"2212a215-9499-4930-918e-e48f2ca07e83"], -Cell[CellGroupData[{ -Cell[3372, 88, 270, 5, 22, "Print",ExpressionUUID->"54cdea01-1dd0-4bca-bb6c-3b93b3124c51"], -Cell[3645, 95, 257, 5, 22, "Print",ExpressionUUID->"56826109-81db-4c58-bf26-5f776793c1d0"], -Cell[3905, 102, 265, 5, 22, "Print",ExpressionUUID->"60f607f0-925b-45e0-8728-b11cd497353c"], -Cell[4173, 109, 295, 6, 22, "Print",ExpressionUUID->"3fe111e0-f431-45e7-bee6-ac3de95c536c"], -Cell[4471, 117, 287, 6, 22, "Print",ExpressionUUID->"75000055-0cfe-44da-a136-f3d5b4aef264"], -Cell[4761, 125, 259, 5, 22, "Print",ExpressionUUID->"211fc8ec-89d1-4143-892d-bad4dc8a6b9d"], -Cell[5023, 132, 267, 5, 22, "Print",ExpressionUUID->"b2a2599b-fcd4-4777-9e2a-d7dc0a37d82d"], -Cell[5293, 139, 258, 5, 22, "Print",ExpressionUUID->"120f6dcd-c07c-4d71-afc9-0a447bf12e7b"], -Cell[5554, 146, 266, 5, 22, "Print",ExpressionUUID->"70d0e901-d1a1-4f98-b6a7-418e0ec725a5"], -Cell[5823, 153, 257, 5, 22, "Print",ExpressionUUID->"6c0e1dee-03fb-4222-8e12-9b4bfded53c7"], -Cell[6083, 160, 271, 5, 22, "Print",ExpressionUUID->"ba2f1ae3-9c0c-42f7-9ed4-3c64e231f2c7"], -Cell[6357, 167, 260, 5, 22, "Print",ExpressionUUID->"4a408491-90c2-4a69-8cef-c576a968475f"], -Cell[6620, 174, 286, 6, 22, "Print",ExpressionUUID->"7e26b9c5-62ed-4845-9153-aaaeb995873a"], -Cell[6909, 182, 268, 5, 22, "Print",ExpressionUUID->"6a63bc70-4ac1-411f-8991-f4d968248258"], -Cell[7180, 189, 286, 6, 22, "Print",ExpressionUUID->"034b5d03-e9b0-4548-96d6-beb0f0e38afd"], -Cell[7469, 197, 266, 5, 22, "Print",ExpressionUUID->"c59add0c-cd4c-4c3b-9b94-617e3ab34a3a"] -}, Open ]] -}, Open ]], -Cell[7762, 206, 1369, 36, 105, "Input",ExpressionUUID->"4dff3dd5-51f5-49b9-897e-4c02e8f7b3c5"], -Cell[CellGroupData[{ -Cell[9156, 246, 156, 3, 67, "Section",ExpressionUUID->"c2372715-452d-4c7f-bbcc-3772470f6bd3"], -Cell[9315, 251, 5616, 115, 200, "Input",ExpressionUUID->"55f763f1-1536-4b4a-84bc-20c83739561e"], -Cell[14934, 368, 12315, 262, 884, "Input",ExpressionUUID->"c762e94d-1812-4ecd-b180-e44e618b1fde"], -Cell[27252, 632, 1833, 40, 387, "Input",ExpressionUUID->"b88a9287-3e20-41af-ac35-e426ea9f7706"], -Cell[29088, 674, 14251, 306, 1150, "Input",ExpressionUUID->"24986737-5337-49bd-afcb-fe344c8d98f8"], -Cell[43342, 982, 26868, 564, 1967, "Input",ExpressionUUID->"b3753863-602f-43a6-addd-8958fa819ca4"] -}, Open ]], -Cell[CellGroupData[{ -Cell[70247, 1551, 152, 3, 67, "Section",ExpressionUUID->"ab5407d3-9e8a-48ac-9144-fd589f8d19ac"], -Cell[CellGroupData[{ -Cell[70424, 1558, 229, 4, 53, "Subsection",ExpressionUUID->"e01b2ca7-8a75-45f2-87f6-a438e8178b52"], -Cell[70656, 1564, 3753, 84, 567, "Input",ExpressionUUID->"99ad6fee-8738-44c6-b736-17148c858be1"], -Cell[CellGroupData[{ -Cell[74434, 1652, 212, 3, 26, "Input",ExpressionUUID->"53d0b155-a0a4-4e28-8eb7-49537ab5e794"], -Cell[74649, 1657, 325, 4, 30, "Output",ExpressionUUID->"c10ce11d-504a-4055-af67-f13ad9108447"] -}, Open ]], -Cell[74989, 1664, 2651, 61, 369, "Input",ExpressionUUID->"55c35b25-c1ba-4d20-8b02-98a32cd64908"], -Cell[CellGroupData[{ -Cell[77665, 1729, 142, 3, 26, "Input",ExpressionUUID->"62af65db-8e03-4b38-bed4-3eb19cc5fe59"], -Cell[77810, 1734, 356, 6, 30, "Output",ExpressionUUID->"80d6cfd6-8f67-4c80-b6a5-44c9322d4645"] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[78215, 1746, 182, 3, 37, "Subsection",ExpressionUUID->"c840a135-7e44-4968-bab0-c6b8263d8ec2"], -Cell[CellGroupData[{ -Cell[78422, 1753, 242, 4, 40, "Subsubsection",ExpressionUUID->"46bada4f-2b65-46d6-8449-2ff3d19c5383"], -Cell[CellGroupData[{ -Cell[78689, 1761, 1170, 26, 45, "Input",ExpressionUUID->"222c615b-a42b-4ee3-a8d3-36120f9f8aec"], -Cell[CellGroupData[{ -Cell[79884, 1791, 2000, 39, 62, "Print",ExpressionUUID->"3bc23efe-2da5-44a4-8729-811d09773bfb"], -Cell[81887, 1832, 1982, 38, 62, "Print",ExpressionUUID->"6b9d1c6f-941f-4f62-acc6-ecf31fc62a6f"] -}, Open ]] -}, Open ]], -Cell[83896, 1874, 807, 14, 26, "Input",ExpressionUUID->"ba4be30b-5d55-411a-8bcc-aac08aebc97e"], -Cell[CellGroupData[{ -Cell[84728, 1892, 395, 11, 26, "Input",ExpressionUUID->"1ac403f0-5f25-40d4-9c0b-ce8fa7ace86d"], -Cell[CellGroupData[{ -Cell[85148, 1907, 590, 19, 21, "Print",ExpressionUUID->"73f0c737-de2d-4b5c-ab21-7f2dbd3cf34e"], -Cell[85741, 1928, 839, 25, 21, "Print",ExpressionUUID->"c085a5fe-9ad4-4e60-ae6b-a0b52254501f"], -Cell[86583, 1955, 232, 6, 21, "Print",ExpressionUUID->"dc224ae0-c42c-4d12-bb72-7bc15354acdd"], -Cell[86818, 1963, 477, 16, 21, "Print",ExpressionUUID->"ac24ab55-ed6d-4276-bdda-37926afabda8"], -Cell[87298, 1981, 2834, 71, 73, "Print",ExpressionUUID->"0b76d735-371b-4ba9-950a-5cdc3fde639a"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[90193, 2059, 245, 4, 40, "Subsubsection",ExpressionUUID->"8a768103-8b13-4c07-925d-13ff2ca833f3"], -Cell[90441, 2065, 470, 9, 26, "Input",ExpressionUUID->"57b1b16d-3b19-4cbf-a509-84b4572b91c3"], -Cell[CellGroupData[{ -Cell[90936, 2078, 675, 18, 45, "Input",ExpressionUUID->"620d403d-270c-46e9-8e54-f25140ad0167"], -Cell[CellGroupData[{ -Cell[91636, 2100, 1938, 49, 56, "Print",ExpressionUUID->"34255a8f-a948-43f9-a9b7-e7c097c92df6"], -Cell[93577, 2151, 1108, 33, 21, "Print",ExpressionUUID->"6768665e-77d2-4b0e-ad7c-d1fc92148d53"], -Cell[94688, 2186, 229, 6, 21, "Print",ExpressionUUID->"56c6d456-c216-4701-9050-d3a9be3bc3aa"], -Cell[94920, 2194, 479, 16, 21, "Print",ExpressionUUID->"7bd4ea3d-50b8-47e6-b724-5c209a6b8807"], -Cell[95402, 2212, 3231, 79, 73, "Print",ExpressionUUID->"6b32e4b8-8b31-47af-8b50-80e85137b219"], -Cell[98636, 2293, 1800, 50, 39, "Print",ExpressionUUID->"0dc3d6d3-3af1-465a-9ba1-a312125c1b52"], -Cell[100439, 2345, 232, 6, 21, "Print",ExpressionUUID->"ebbcf39c-0ac6-4eb8-af03-636fdf62a1b5"], -Cell[100674, 2353, 479, 16, 21, "Print",ExpressionUUID->"32924fce-4acd-4cda-a59a-3c364e58a306"], -Cell[101156, 2371, 21296, 486, 481, "Print",ExpressionUUID->"2a30a3e1-2ecb-48d9-9807-e99c79ac2471"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[122513, 2864, 162, 3, 40, "Subsubsection",ExpressionUUID->"9dd04ade-e7e5-4bd6-a8de-8ed4e1855024"], -Cell[CellGroupData[{ -Cell[122700, 2871, 625, 18, 45, "Input",ExpressionUUID->"c0c24c64-880d-4e7d-a3bf-c1a83384242c"], -Cell[CellGroupData[{ -Cell[123350, 2893, 1027, 26, 62, "Print",ExpressionUUID->"e7e607b1-61aa-4263-a0bd-bd7ee87de726"], -Cell[124380, 2921, 1001, 25, 62, "Print",ExpressionUUID->"e1e35eaf-fbda-459b-b409-ea072144e8a3"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[125430, 2952, 727, 19, 45, "Input",ExpressionUUID->"ace8a1c1-dd1b-4a70-b555-0a26dbb185cf"], -Cell[CellGroupData[{ -Cell[126182, 2975, 716, 21, 21, "Print",ExpressionUUID->"3b5c0afe-9c73-41ab-a8ea-76da1c390cdd"], -Cell[126901, 2998, 1175, 33, 21, "Print",ExpressionUUID->"bcecbe03-1bf6-4892-a54b-abcdd1a0ec19"], -Cell[128079, 3033, 356, 8, 21, "Print",ExpressionUUID->"14cd420d-b574-4ffd-a797-3b63a50bf76a"], -Cell[128438, 3043, 3146, 77, 90, "Print",ExpressionUUID->"49c5d714-13c6-4209-b65c-334f1257455c"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[131645, 3127, 163, 3, 40, "Subsubsection",ExpressionUUID->"3cee5c3f-5857-4ee5-b683-10f96cafaf92"], -Cell[131811, 3132, 495, 10, 26, "Input",ExpressionUUID->"7b6b0b07-02d5-4722-9ed3-d1108461c3ae"], -Cell[CellGroupData[{ -Cell[132331, 3146, 755, 20, 45, "Input",ExpressionUUID->"34e20742-d410-41fb-949c-7e2276e33f2b"], -Cell[CellGroupData[{ -Cell[133111, 3170, 1943, 49, 56, "Print",ExpressionUUID->"767a298c-e8ef-4903-bccc-cb93b2b23236"], -Cell[135057, 3221, 1321, 39, 39, "Print",ExpressionUUID->"ce7f941f-b733-4ef0-968c-d07421ac66c4"], -Cell[136381, 3262, 232, 6, 21, "Print",ExpressionUUID->"3a624d72-13ff-4460-b7ce-157cc54f5d62"], -Cell[136616, 3270, 3140, 76, 73, "Print",ExpressionUUID->"3248d98f-5ce8-493c-aadf-6b20a0445b7e"], -Cell[139759, 3348, 2014, 56, 56, "Print",ExpressionUUID->"8df78050-03ee-4732-8a3f-f6a8c41b91f7"], -Cell[141776, 3406, 232, 6, 21, "Print",ExpressionUUID->"630a5e75-5ab6-4276-bd22-08b30f404368"], -Cell[142011, 3414, 21771, 495, 532, "Print",ExpressionUUID->"2b38ffe7-43f2-4da1-9756-d4a5eb25bea0"] -}, Open ]] -}, Open ]] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[163855, 3917, 171, 3, 37, "Subsection",ExpressionUUID->"9e3e465f-7792-498e-8cb5-d148e0ec6bce"], -Cell[CellGroupData[{ -Cell[164051, 3924, 197, 3, 40, "Subsubsection",ExpressionUUID->"91db1d89-924f-408c-985b-2313b9c7fd4e"], -Cell[CellGroupData[{ -Cell[164273, 3931, 666, 19, 45, "Input",ExpressionUUID->"013e166b-cb35-4b15-9fc8-544f9e2327c7"], -Cell[CellGroupData[{ -Cell[164964, 3954, 1236, 28, 62, "Print",ExpressionUUID->"831e0a0e-439f-4395-ac88-5d25bf3228a8"], -Cell[166203, 3984, 1280, 30, 62, "Print",ExpressionUUID->"94864cd4-9458-43da-b0c2-e7ff0c1d6491"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[167532, 4020, 1475, 29, 45, "Input",ExpressionUUID->"27230ac3-13d8-40e8-b787-4b4c8860c54c"], -Cell[CellGroupData[{ -Cell[169032, 4053, 1550, 41, 39, "Print",ExpressionUUID->"1202cb52-bf83-4d90-8dd4-125f9dcbb1b7"], -Cell[170585, 4096, 232, 6, 21, "Print",ExpressionUUID->"4b9c9173-3617-401e-8ccb-c250aa4e5300"], -Cell[170820, 4104, 423, 13, 21, "Print",ExpressionUUID->"fd2cd305-ac99-44fe-836c-5cb085f9284f"], -Cell[171246, 4119, 3208, 79, 73, "Print",ExpressionUUID->"7a6095c2-cfa6-4bb1-8653-eee9ed06a2de"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[174515, 4205, 200, 3, 40, "Subsubsection",ExpressionUUID->"22a251d4-6170-4c1a-a48d-28055fc236cd"], -Cell[CellGroupData[{ -Cell[174740, 4212, 996, 24, 63, "Input",ExpressionUUID->"da50a357-49d4-47c6-84e8-e23d5c987dda"], -Cell[CellGroupData[{ -Cell[175761, 4240, 5696, 136, 141, "Print",ExpressionUUID->"bf6b2743-6a11-474b-b7f8-d52b361fec8c"], -Cell[181460, 4378, 283, 7, 21, "Print",ExpressionUUID->"6cfd4140-7233-4b65-9b2f-97df450451fd"], -Cell[181746, 4387, 530, 17, 21, "Print",ExpressionUUID->"c0844e7b-31a6-42b5-8f02-ca0ad252c812"], -Cell[182279, 4406, 11607, 268, 277, "Print",ExpressionUUID->"14f91e34-081d-4bf7-ba82-ef8186edbf14"], -Cell[193889, 4676, 280, 7, 21, "Print",ExpressionUUID->"610f210d-f066-4c61-ae4d-2ec8199d2748"], -Cell[194172, 4685, 528, 17, 21, "Print",ExpressionUUID->"e2434990-6053-4c70-98d3-4883bd44b9bc"], -Cell[194703, 4704, 22189, 505, 515, "Print",ExpressionUUID->"9e624d09-8984-4945-993b-b9bcfa4c04e1"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[216953, 5216, 201, 3, 40, "Subsubsection",ExpressionUUID->"d11717aa-aab0-4786-b0f7-16a918b8135b"], -Cell[CellGroupData[{ -Cell[217179, 5223, 991, 24, 63, "Input",ExpressionUUID->"d36c163e-c658-4479-bd58-b6d075e4b29e"], -Cell[CellGroupData[{ -Cell[218195, 5251, 1573, 41, 39, "Print",ExpressionUUID->"291e2fdc-54da-4322-9bb5-161af318e6fb"], -Cell[219771, 5294, 254, 6, 21, "Print",ExpressionUUID->"768a44cc-9175-41b2-88c1-12945e364234"], -Cell[220028, 5302, 3127, 77, 73, "Print",ExpressionUUID->"c5580d21-837e-48f9-a42f-25c58b7d0308"] -}, Open ]] -}, Open ]] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[223228, 5387, 180, 3, 37, "Subsection",ExpressionUUID->"cc11ec87-d371-4360-a100-5230d6d0b2d8"], -Cell[CellGroupData[{ -Cell[223433, 5394, 840, 21, 45, "Input",ExpressionUUID->"1ccefe4d-94ea-4aa3-98c1-3d4d6ff6ffc1"], -Cell[CellGroupData[{ -Cell[224298, 5419, 1283, 28, 34, "Print",ExpressionUUID->"76df781c-e9b6-4b1f-ab5b-6707630e20e8"], -Cell[225584, 5449, 1306, 29, 34, "Print",ExpressionUUID->"95ecc6c8-ed45-4146-96e8-42fb7b6612ed"], -Cell[226893, 5480, 1305, 29, 34, "Print",ExpressionUUID->"b178205a-7591-4fdd-8347-666cf2e80a54"], -Cell[228201, 5511, 1284, 28, 34, "Print",ExpressionUUID->"c0221ebc-23f4-455a-967f-e7a7bc662436"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[229534, 5545, 613, 10, 26, "Input",ExpressionUUID->"dc27bfc0-a1bc-48a9-93ef-7f16b63cbd21"], -Cell[230150, 5557, 3723, 99, 85, "Output",ExpressionUUID->"71e10840-d192-421e-bd36-8f4efa5598a4"] -}, Open ]], -Cell[CellGroupData[{ -Cell[233910, 5661, 328, 7, 26, "Input",ExpressionUUID->"6989921b-b79a-4eed-98fb-39aa78f5b7f7"], -Cell[234241, 5670, 2689, 74, 85, "Output",ExpressionUUID->"1752710a-4436-4a13-89b2-8e886d935de0"] -}, Open ]], -Cell[CellGroupData[{ -Cell[236967, 5749, 320, 6, 26, "Input",ExpressionUUID->"d2e53e16-623a-4706-9dae-5f482fc10bbf"], -Cell[237290, 5757, 2147, 62, 67, "Output",ExpressionUUID->"e730bc81-8feb-40a6-a3cc-2b9e53d599d7"] -}, Open ]], -Cell[239452, 5822, 4198, 97, 459, "Input",ExpressionUUID->"494b24e5-51a1-412f-bce0-419a663c9911"], -Cell[CellGroupData[{ -Cell[243675, 5923, 273, 5, 26, "Input",ExpressionUUID->"e0efbda9-1065-426e-91bf-5e07fc7dc84b"], -Cell[243951, 5930, 258, 4, 30, "Output",ExpressionUUID->"d43ef657-399b-4906-8645-46603d19ce03"] -}, Open ]] -}, Closed]] -}, Open ]] -} -] -*) - diff --git a/MeasuredQCMWork-Boxi-Desktop.nb b/MeasuredQCMWork-Boxi-Desktop.nb deleted file mode 100644 index aa889f2..0000000 --- a/MeasuredQCMWork-Boxi-Desktop.nb +++ /dev/null @@ -1,20223 +0,0 @@ -(* Content-type: application/vnd.wolfram.mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 11.3' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 158, 7] -NotebookDataLength[ 834970, 20215] -NotebookOptionsPosition[ 775139, 19241] -NotebookOutlinePosition[ 775511, 19257] -CellTagsIndexPosition[ 775468, 19254] -WindowFrame->Normal*) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell[BoxData[ - RowBox[{"SetDirectory", "[", - "\"\\"", "]"}]], "Input", - CellChangeTimes->{ - 3.76171691436585*^9, 3.7635323076881866`*^9, {3.7643140219951878`*^9, - 3.764314025596841*^9}, {3.7643418585372095`*^9, 3.7643418589880905`*^9}, { - 3.7674322077962646`*^9, 3.767432209792924*^9}, {3.7689851085117607`*^9, - 3.768985108817954*^9}, 3.7710660918199406`*^9}, - CellLabel->"In[85]:=",ExpressionUUID->"d5e7172c-e871-40fc-b9a8-dab8b5b0a457"], - -Cell[BoxData["\<\"C:\\\\Users\\\\boxi\\\\OneDrive\\\\Studium\\\\QIT \ -prject\\\\UniversalQCompiler\"\>"], "Output", - CellChangeTimes->{ - 3.767440651685522*^9, {3.7674407294040236`*^9, 3.7674407404130645`*^9}, { - 3.7689851044894934`*^9, 3.7689851100236883`*^9}, 3.7690188234196243`*^9, - 3.7690192926355343`*^9, 3.7695973788866634`*^9, 3.76968058718064*^9, - 3.7696829864390993`*^9, 3.769701670749346*^9, 3.7697018080251865`*^9, - 3.769702148244892*^9, 3.769702270269155*^9, 3.7697025570956836`*^9, - 3.769707239314153*^9, 3.7697075515226655`*^9, 3.7697077489243827`*^9, - 3.7697079715185394`*^9, 3.769708179703933*^9, 3.7708002081773415`*^9, - 3.7708061027089148`*^9, {3.7708062005071063`*^9, 3.7708062292239666`*^9}, - 3.770892122858367*^9, 3.770892232182201*^9, 3.771066110134531*^9, - 3.7710665616473646`*^9, 3.771066684912819*^9, 3.7710713354879155`*^9, - 3.7710714013552628`*^9, 3.7710736010038767`*^9, 3.771074612542319*^9, - 3.7710899037405925`*^9, 3.7712616761616735`*^9, 3.7712637762077584`*^9, - 3.7720110969598665`*^9, 3.772016281685964*^9, 3.7721255453033156`*^9, - 3.772702715793109*^9, 3.773311022954133*^9, 3.773315813095049*^9, - 3.7796338225052834`*^9, 3.7796385311402283`*^9, 3.779642251184574*^9, - 3.779714218998089*^9, 3.7799426312198796`*^9, 3.779944443443104*^9, - 3.7799489324103465`*^9, 3.779983271395136*^9, 3.780213733841084*^9, - 3.7802140215502944`*^9, 3.7802141523006835`*^9, 3.7806354144556913`*^9, - 3.7806585854373937`*^9, 3.780659941359166*^9, 3.7806603793970366`*^9, - 3.780664211233425*^9, 3.7806693223665333`*^9}, - CellLabel->"Out[85]=",ExpressionUUID->"e460719f-832d-4fbe-bb70-0df1cb6ffbb0"] -}, Open ]], - -Cell[BoxData[{ - RowBox[{"Import", "[", "\"\\"", "]"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Import", "[", "\"\\"", "]"}], - ";"}]}], "Input", - CellChangeTimes->{ - 3.761716881324997*^9, 3.7617169217643223`*^9, {3.763533170974185*^9, - 3.7635331749666014`*^9}, {3.7635333334835033`*^9, - 3.7635333407220964`*^9}, {3.763533564091385*^9, 3.7635335652413087`*^9}, { - 3.764151442249364*^9, 3.7641514470804105`*^9}, 3.7642179272099495`*^9, { - 3.765951549696049*^9, 3.7659515728790593`*^9}, {3.7663306388728886`*^9, - 3.7663306436590905`*^9}, 3.768985556475051*^9, {3.768987613049039*^9, - 3.768987617459203*^9}}, - CellLabel->"In[92]:=",ExpressionUUID->"718cd24d-ada6-4d18-9b0a-f972b8a8b51f"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel->"In[94]:=",ExpressionUUID->"3497a986-5550-422a-b972-8c6af90ad4ea"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"All tests for the basic methods pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806695842777395`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"be341b41-75d1-4374-b0a9-54d3279e335b"], - -Cell[BoxData["\<\"All tests for UCGs pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806695940758433`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"0892d211-c412-4fad-9d5e-c8a9b1917917"], - -Cell[BoxData["\<\"All tests for diagonal gates pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669594146654*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"786ddeda-1823-46bb-9a5e-feae415bfd58"], - -Cell[BoxData["\<\"All tests for the isometries on a small number of qubits \ -pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669706502507*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"82968c0e-ed6b-4a6e-9bba-66ff0c03fbe5"], - -Cell[BoxData["\<\"All tests for the column-by-column decomposition \ -pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669751836956*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"bb6db158-5757-4f32-83d3-3288603b1013"], - -Cell[BoxData["\<\"All tests for Dec2Qubit pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806697587019844`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"ca4f9f33-252a-47be-8ad5-f6db768967dd"], - -Cell[BoxData["\<\"All tests for ZYZDec, XYXDec, ZXZDec, XZXDec, YXYDec and \ -YZYDec pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806697604802165`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"abeacc84-1eee-41d5-926c-62523250561f"], - -Cell[BoxData["\<\"All tests for the QSD pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669799626916*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"eae6cc73-527f-4fbd-9606-b727565edc2c"], - -Cell[BoxData["\<\"All tests for State preparation pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669843757161*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"24e43420-0143-458c-ab29-a5308f0555ed"], - -Cell[BoxData["\<\"All tests for MCGs pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806698476070943`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"f7409e0c-cab7-418a-9958-d026ec0dc9b0"], - -Cell[BoxData["\<\"All tests for Knill's decomposition pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806698698931875`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"bd617e61-7269-45fb-ab58-1c97fe6b14d8"], - -Cell[BoxData["\<\"All tests for DecIsometry pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669936462602*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"6ccf37dc-a45f-4785-bfa3-867e108983cc"], - -Cell[BoxData["\<\"All tests for StinespringQubit on generic inputs \ -pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669991446982*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"e1697742-66ed-4218-aa86-01f609070b2c"], - -Cell[BoxData["\<\"All tests for StinespringQubit pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806699923157654`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"f76513d3-2b6c-413d-b51d-25a4e8859020"], - -Cell[BoxData["\<\"All tests for POVMToIsometry on generic inputs pass.\"\>"], \ -"Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806699923157654`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"03597869-0a7f-48de-8970-2addadab0a5d"], - -Cell[BoxData["\<\"All tests for POVMToIsometry pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780669992565711*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"e8dd33f6-2ffe-4844-aa73-96407ca54d9c"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"Error in CheckXXtoCNOT with error message code \"\>", - "\[InvisibleSpace]", "0"}], - SequenceForm["Error in CheckXXtoCNOT with error message code ", 0], - Editable->False]], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806700203747044`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"047ab667-b81b-4a66-a41a-454c28ee4df2"], - -Cell[BoxData["\<\"All tests for DecChannelInQCM pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.780670277861986*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"4c0fd90f-dc91-4c8c-8faf-06341b97ba96"], - -Cell[BoxData["\<\"All tests for DecInstrumentInQCM pass.\"\>"], "Print", - CellChangeTimes->{3.7806695291500196`*^9, 3.7806707360007114`*^9}, - CellLabel-> - "During evaluation of \ -In[94]:=",ExpressionUUID->"84bc3e8a-4345-45ba-a8a2-f6bb9c4d810d"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"\[IndentingNewLine]", "testKnill"}]], "Input", - CellChangeTimes->{{3.780661683042179*^9, 3.780661683329425*^9}}, - CellLabel->"In[76]:=",ExpressionUUID->"b5672cc2-ad7c-491d-bdc4-2ce2c6d19ae7"], - -Cell[BoxData["\<\"All tests for Knill's decomposition pass.\"\>"], "Print", - CellChangeTimes->{3.7806617101275797`*^9, 3.780662162949911*^9}, - CellLabel-> - "During evaluation of \ -In[76]:=",ExpressionUUID->"58f9e6ca-5de7-454b-b2ef-8b15d411f1df"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["testStatePreparationAll"], "Input", - CellChangeTimes->{{3.780661709063391*^9, 3.7806617091072717`*^9}}, - CellLabel->"In[66]:=",ExpressionUUID->"dd70be94-d306-4da8-846a-7f1ef69dc5b3"], - -Cell[BoxData["\<\"All tests for State preparation pass.\"\>"], "Print", - CellChangeTimes->{3.780661746491*^9}, - CellLabel-> - "During evaluation of \ -In[66]:=",ExpressionUUID->"37014bf7-614c-4bc8-a23a-74026a376903"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["testChannelDecompositions"], "Input", - CellChangeTimes->{{3.7806617652028913`*^9, 3.780661765252758*^9}}, - CellLabel->"In[68]:=",ExpressionUUID->"e75b7d01-c3d1-4d00-9234-b90c6b4537aa"], - -Cell[BoxData["$Aborted"], "Output", - CellChangeTimes->{3.780661989390365*^9}, - CellLabel->"Out[68]=",ExpressionUUID->"f673e8d1-26c3-42dc-9073-753c2ba9ac7d"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["testInstrumentDecompositions"], "Input", - CellChangeTimes->{{3.780661811064752*^9, 3.780661811116613*^9}}, - CellLabel->"In[77]:=",ExpressionUUID->"563e9ad5-72f9-4e44-9a3b-d370694ae8f3"], - -Cell[BoxData["\<\"All tests for DecInstrumentInQCM pass.\"\>"], "Print", - CellChangeTimes->{3.780662560467846*^9}, - CellLabel-> - "During evaluation of \ -In[77]:=",ExpressionUUID->"2b8a27b5-3e80-43c1-b5a6-9a1fc0dade91"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["testXXCNOTAll"], "Input", - CellChangeTimes->{{3.780661742948174*^9, 3.780661742991056*^9}}, - CellLabel-> - "In[106]:=",ExpressionUUID->"e24c86f0-1f0a-4dc4-96f1-11f2c39c8540"], - -Cell[BoxData["\<\"All tests for converting to and from XX gates pass.\"\>"], \ -"Print", - GeneratedCell->False, - CellAutoOverwrite->False, - CellChangeTimes->{ - 3.7806709561555605`*^9, 3.7806710285650806`*^9, 3.780671122848603*^9, - 3.780671220659696*^9, 3.7806713327346916`*^9, 3.780671425366698*^9, - 3.7806715300964346`*^9, 3.780671598453947*^9, {3.780672160830381*^9, - 3.780672172276012*^9}},ExpressionUUID->"95dd1b3c-dc82-4ac7-9e64-\ -3a5f4fd27790"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["TestIsoToUnitarySpecial"], "Input", - CellChangeTimes->{{3.780661622726577*^9, 3.780661622764477*^9}}, - CellLabel->"In[75]:=",ExpressionUUID->"92e49e7e-3dbf-42c0-897a-517e74b8cae0"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.7806616151909175`*^9, 3.780661623423509*^9}, - 3.7806621297244186`*^9}, - CellLabel->"Out[75]=",ExpressionUUID->"9c9f4ae6-f163-44bb-9308-09f3b1e36ed9"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.780643361745576*^9, 3.780643362481636*^9}}, - CellLabel-> - "(Dialog) In[504]:=",ExpressionUUID->"0ee638ea-56b2-4841-a480-f8e20ae5ef4f"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"TestReducedCSDSplit \"\>", "\[InvisibleSpace]", "True"}], - SequenceForm["TestReducedCSDSplit ", True], - Editable->False]], "Print", - CellChangeTimes->{{3.779637286389328*^9, 3.7796372919493885`*^9}, - 3.7797142341486163`*^9, 3.779716623560813*^9, 3.77994265252389*^9, - 3.7799444497765923`*^9, 3.7799489401591988`*^9, 3.7799832722877436`*^9, { - 3.779983819033101*^9, 3.779983832093335*^9}, 3.7800398935896196`*^9, - 3.780041226641303*^9, 3.780058156545305*^9, 3.780060417436734*^9, - 3.7802118776603994`*^9, 3.780213202174069*^9, 3.780214162363037*^9, - 3.780640287886527*^9, {3.7806406230169067`*^9, 3.780640642590599*^9}, - 3.7806406925049763`*^9, 3.7806407383226857`*^9, {3.780640800943879*^9, - 3.78064082642585*^9}, {3.7806411280963116`*^9, 3.780641159992132*^9}, - 3.7806411906012*^9, 3.7806418375030584`*^9, {3.7806421469028664`*^9, - 3.7806421754741564`*^9}, 3.7806422458007774`*^9, {3.7806422813867445`*^9, - 3.78064233595131*^9}, 3.7806423717307544`*^9, {3.7806433437684236`*^9, - 3.7806433630062284`*^9}}, - CellLabel-> - "During evaluation of (Dialog) \ -In[504]:=",ExpressionUUID->"056f319c-bd26-474c-9c6d-73e532d804a7"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"TestQRSplit \"\>", "\[InvisibleSpace]", "True"}], - SequenceForm["TestQRSplit ", True], - Editable->False]], "Print", - CellChangeTimes->{{3.779637286389328*^9, 3.7796372919493885`*^9}, - 3.7797142341486163`*^9, 3.779716623560813*^9, 3.77994265252389*^9, - 3.7799444497765923`*^9, 3.7799489401591988`*^9, 3.7799832722877436`*^9, { - 3.779983819033101*^9, 3.779983832093335*^9}, 3.7800398935896196`*^9, - 3.780041226641303*^9, 3.780058156545305*^9, 3.780060417436734*^9, - 3.7802118776603994`*^9, 3.780213202174069*^9, 3.780214162363037*^9, - 3.780640287886527*^9, {3.7806406230169067`*^9, 3.780640642590599*^9}, - 3.7806406925049763`*^9, 3.7806407383226857`*^9, {3.780640800943879*^9, - 3.78064082642585*^9}, {3.7806411280963116`*^9, 3.780641159992132*^9}, - 3.7806411906012*^9, 3.7806418375030584`*^9, {3.7806421469028664`*^9, - 3.7806421754741564`*^9}, 3.7806422458007774`*^9, {3.7806422813867445`*^9, - 3.78064233595131*^9}, 3.7806423717307544`*^9, {3.7806433437684236`*^9, - 3.7806433630181932`*^9}}, - CellLabel-> - "During evaluation of (Dialog) \ -In[504]:=",ExpressionUUID->"16cfb2b7-1dad-4a71-8bc1-58dd21aff62d"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"TestRemoveUnusedQubits \"\>", "\[InvisibleSpace]", "True"}], - SequenceForm["TestRemoveUnusedQubits ", True], - Editable->False]], "Print", - CellChangeTimes->{{3.779637286389328*^9, 3.7796372919493885`*^9}, - 3.7797142341486163`*^9, 3.779716623560813*^9, 3.77994265252389*^9, - 3.7799444497765923`*^9, 3.7799489401591988`*^9, 3.7799832722877436`*^9, { - 3.779983819033101*^9, 3.779983832093335*^9}, 3.7800398935896196`*^9, - 3.780041226641303*^9, 3.780058156545305*^9, 3.780060417436734*^9, - 3.7802118776603994`*^9, 3.780213202174069*^9, 3.780214162363037*^9, - 3.780640287886527*^9, {3.7806406230169067`*^9, 3.780640642590599*^9}, - 3.7806406925049763`*^9, 3.7806407383226857`*^9, {3.780640800943879*^9, - 3.78064082642585*^9}, {3.7806411280963116`*^9, 3.780641159992132*^9}, - 3.7806411906012*^9, 3.7806418375030584`*^9, {3.7806421469028664`*^9, - 3.7806421754741564`*^9}, 3.7806422458007774`*^9, {3.7806422813867445`*^9, - 3.78064233595131*^9}, 3.7806423717307544`*^9, {3.7806433437684236`*^9, - 3.780643363034151*^9}}, - CellLabel-> - "During evaluation of (Dialog) \ -In[504]:=",ExpressionUUID->"a49fa21b-a7d1-40a6-9f9f-9573a7d51675"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"TestFindAncilla \"\>", "\[InvisibleSpace]", "True"}], - SequenceForm["TestFindAncilla ", True], - Editable->False]], "Print", - CellChangeTimes->{{3.779637286389328*^9, 3.7796372919493885`*^9}, - 3.7797142341486163`*^9, 3.779716623560813*^9, 3.77994265252389*^9, - 3.7799444497765923`*^9, 3.7799489401591988`*^9, 3.7799832722877436`*^9, { - 3.779983819033101*^9, 3.779983832093335*^9}, 3.7800398935896196`*^9, - 3.780041226641303*^9, 3.780058156545305*^9, 3.780060417436734*^9, - 3.7802118776603994`*^9, 3.780213202174069*^9, 3.780214162363037*^9, - 3.780640287886527*^9, {3.7806406230169067`*^9, 3.780640642590599*^9}, - 3.7806406925049763`*^9, 3.7806407383226857`*^9, {3.780640800943879*^9, - 3.78064082642585*^9}, {3.7806411280963116`*^9, 3.780641159992132*^9}, - 3.7806411906012*^9, 3.7806418375030584`*^9, {3.7806421469028664`*^9, - 3.7806421754741564`*^9}, 3.7806422458007774`*^9, {3.7806422813867445`*^9, - 3.78064233595131*^9}, 3.7806423717307544`*^9, {3.7806433437684236`*^9, - 3.7806433630401344`*^9}}, - CellLabel-> - "During evaluation of (Dialog) \ -In[504]:=",ExpressionUUID->"7b1286af-7e0b-469f-87b9-54036f261e21"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"TestMeasureQCM \"\>", "\[InvisibleSpace]", "True"}], - SequenceForm["TestMeasureQCM ", True], - Editable->False]], "Print", - CellChangeTimes->{{3.779637286389328*^9, 3.7796372919493885`*^9}, - 3.7797142341486163`*^9, 3.779716623560813*^9, 3.77994265252389*^9, - 3.7799444497765923`*^9, 3.7799489401591988`*^9, 3.7799832722877436`*^9, { - 3.779983819033101*^9, 3.779983832093335*^9}, 3.7800398935896196`*^9, - 3.780041226641303*^9, 3.780058156545305*^9, 3.780060417436734*^9, - 3.7802118776603994`*^9, 3.780213202174069*^9, 3.780214162363037*^9, - 3.780640287886527*^9, {3.7806406230169067`*^9, 3.780640642590599*^9}, - 3.7806406925049763`*^9, 3.7806407383226857`*^9, {3.780640800943879*^9, - 3.78064082642585*^9}, {3.7806411280963116`*^9, 3.780641159992132*^9}, - 3.7806411906012*^9, 3.7806418375030584`*^9, {3.7806421469028664`*^9, - 3.7806421754741564`*^9}, 3.7806422458007774`*^9, {3.7806422813867445`*^9, - 3.78064233595131*^9}, 3.7806423717307544`*^9, 3.7806433437684236`*^9, - 3.7806434470162563`*^9}, - CellLabel-> - "During evaluation of (Dialog) \ -In[504]:=",ExpressionUUID->"86d303dd-cf8e-4f17-88e7-7e4cc8f980a1"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]], "Input", - CellChangeTimes->{{3.7806413777122126`*^9, 3.7806413890637913`*^9}}, - CellLabel-> - "(Debug) (Dialog) \ -In[474]:=",ExpressionUUID->"8959ff37-984c-4d2a-a3e7-c8ff64f921dc"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "0.8386448573994129`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.8926721239939823`", ",", "2"}], "}"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7093206952616568`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], - "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.426586772872184`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6543160557497377`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589792`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9947289186795695`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1079369745120207`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.25942018580002923`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589794`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7821350168700344`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.596784618287055`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9236025154832657`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.866618665142383`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4602978838921439`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.075769244874555`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6910431399374677`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.780641374293559*^9, 3.7806413906677465`*^9}}, - CellLabel-> - "(Debug) (Dialog) \ -Out[474]=",ExpressionUUID->"54d0d166-5985-44d2-ad2a-3421b377a18f"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{"TestCreateIsometryFromList1", "[", - RowBox[{"\"\\"", ",", "False"}], "]"}], "\[IndentingNewLine]", - RowBox[{"TestCreateIsometryFromList1", "[", - RowBox[{"\"\\"", ",", "True"}], "]"}], "\[IndentingNewLine]", - RowBox[{"TestCreateIsometryFromList1", "[", - RowBox[{"\"\\"", ",", "True"}], "]"}], "\[IndentingNewLine]", - RowBox[{"TestCreateIsometryFromList1", "[", - RowBox[{"\"\\"", ",", "False"}], "]"}]}], "Input", - CellChangeTimes->{{3.780041239940747*^9, 3.7800412465337315`*^9}, { - 3.7800422242390223`*^9, 3.7800422654463205`*^9}, {3.780042311501933*^9, - 3.780042320320405*^9}, {3.780214528990548*^9, 3.780214534485843*^9}}, - CellLabel-> - "In[262]:=",ExpressionUUID->"8939ccda-2947-4654-bc8a-3646fe6f4f24"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780042240792297*^9, 3.780042267164502*^9}, { - 3.7800423216177416`*^9, 3.7800423313747873`*^9}, 3.7800581612002163`*^9, - 3.7800582432186985`*^9, 3.780060421270611*^9, 3.7800609222018213`*^9, - 3.7800613968243585`*^9, {3.780061442117632*^9, 3.780061462027367*^9}, - 3.780061502656332*^9, 3.7800615391535597`*^9, 3.780214166983818*^9, { - 3.780594619328718*^9, 3.780594630535987*^9}, {3.7805947100628443`*^9, - 3.780594723092662*^9}, 3.7805947659482684`*^9, 3.7805948022236195`*^9}, - CellLabel-> - "Out[262]=",ExpressionUUID->"94ab862a-7072-469c-b405-c54091287abb"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780042240792297*^9, 3.780042267164502*^9}, { - 3.7800423216177416`*^9, 3.7800423313747873`*^9}, 3.7800581612002163`*^9, - 3.7800582432186985`*^9, 3.780060421270611*^9, 3.7800609222018213`*^9, - 3.7800613968243585`*^9, {3.780061442117632*^9, 3.780061462027367*^9}, - 3.780061502656332*^9, 3.7800615391535597`*^9, 3.780214166983818*^9, { - 3.780594619328718*^9, 3.780594630535987*^9}, {3.7805947100628443`*^9, - 3.780594723092662*^9}, 3.7805947659482684`*^9, 3.780594836962615*^9}, - CellLabel-> - "Out[263]=",ExpressionUUID->"873c5959-c9e0-4f04-a655-cbe1853be047"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780042240792297*^9, 3.780042267164502*^9}, { - 3.7800423216177416`*^9, 3.7800423313747873`*^9}, 3.7800581612002163`*^9, - 3.7800582432186985`*^9, 3.780060421270611*^9, 3.7800609222018213`*^9, - 3.7800613968243585`*^9, {3.780061442117632*^9, 3.780061462027367*^9}, - 3.780061502656332*^9, 3.7800615391535597`*^9, 3.780214166983818*^9, { - 3.780594619328718*^9, 3.780594630535987*^9}, {3.7805947100628443`*^9, - 3.780594723092662*^9}, 3.7805947659482684`*^9, 3.780594857999607*^9}, - CellLabel-> - "Out[264]=",ExpressionUUID->"cb69f5af-2d2c-44df-acc8-b31e6732a1a5"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780042240792297*^9, 3.780042267164502*^9}, { - 3.7800423216177416`*^9, 3.7800423313747873`*^9}, 3.7800581612002163`*^9, - 3.7800582432186985`*^9, 3.780060421270611*^9, 3.7800609222018213`*^9, - 3.7800613968243585`*^9, {3.780061442117632*^9, 3.780061462027367*^9}, - 3.780061502656332*^9, 3.7800615391535597`*^9, 3.780214166983818*^9, { - 3.780594619328718*^9, 3.780594630535987*^9}, {3.7805947100628443`*^9, - 3.780594723092662*^9}, 3.7805947659482684`*^9, 3.7805948725814934`*^9}, - CellLabel-> - "Out[265]=",ExpressionUUID->"f2915da4-7eb6-4cee-b123-b707286a65f8"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Import", "[", "\"\\"", "]"}], - ";"}]], "Input", - CellLabel-> - "(Dialog) In[499]:=",ExpressionUUID->"ded3362b-96e8-498d-80d1-ff0a5daf8578"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestCreateIsometryFromList1", "[", - RowBox[{"1", ",", "2", ",", "2", ",", "\"\\"", ",", "True"}], - "]"}]], "Input", - CellChangeTimes->{{3.780631547390937*^9, 3.780631576209985*^9}, { - 3.7806379464722385`*^9, 3.780637957631464*^9}, {3.780638071953164*^9, - 3.7806381197719793`*^9}, {3.7806383916609864`*^9, 3.780638397073853*^9}, { - 3.7806385482300816`*^9, 3.7806385870766573`*^9}, {3.7806386734234324`*^9, - 3.7806386735327783`*^9}, {3.7806387368901334`*^9, 3.7806387370593143`*^9}, { - 3.7806388974291964`*^9, 3.7806388974916515`*^9}, {3.780639989537661*^9, - 3.7806399906718726`*^9}, {3.780642584183283*^9, 3.7806425843208857`*^9}}, - CellLabel-> - "(Dialog) In[488]:=",ExpressionUUID->"7bbd7741-4663-45b1-a172-326de16535e7"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780631544969944*^9, 3.780631578905841*^9}, - 3.7806316473714695`*^9, 3.780631775827421*^9, 3.7806360382066164`*^9, - 3.780637959634418*^9, 3.780638007001527*^9, 3.7806380395362835`*^9, { - 3.7806380732767057`*^9, 3.780638121646407*^9}, 3.7806381577673607`*^9, - 3.780638265322908*^9, {3.7806383949172726`*^9, 3.7806383989899015`*^9}, - 3.780638450908486*^9, {3.780638552806733*^9, 3.7806386077519035`*^9}, { - 3.7806386393291717`*^9, 3.7806386753808813`*^9}, {3.780638713424851*^9, - 3.780638740012511*^9}, 3.7806388095467987`*^9, 3.7806388994965544`*^9, - 3.7806389726837597`*^9, 3.780639350967663*^9, 3.7806395547242546`*^9, - 3.7806396108803067`*^9, {3.7806399794142256`*^9, 3.780639992653324*^9}, - 3.7806400325951633`*^9, 3.7806425896097355`*^9}, - CellLabel-> - "(Dialog) Out[488]=",ExpressionUUID->"0fba72f0-73e3-4e01-9057-ef09a25aee0f"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestCreateOperationFromGateList", "[", - RowBox[{"1", ",", "2", ",", "2", ",", "\"\\"", ",", "True"}], - "]"}]], "Input", - CellChangeTimes->{{3.780630051284514*^9, 3.7806300699316206`*^9}, { - 3.7806306195687428`*^9, 3.7806306637485495`*^9}, {3.780632311831593*^9, - 3.780632312805109*^9}, {3.7806360401683292`*^9, 3.780636056186022*^9}, { - 3.7806373602682095`*^9, 3.7806373773648987`*^9}, {3.780637415322978*^9, - 3.7806374154168377`*^9}, {3.7806375763747945`*^9, 3.780637576530998*^9}, { - 3.780637637907406*^9, 3.7806376391629767`*^9}, {3.780637746298689*^9, - 3.780637836506379*^9}, {3.780637875445687*^9, 3.780637898298915*^9}, { - 3.780640090261326*^9, 3.7806401266456213`*^9}, {3.7806403614333615`*^9, - 3.7806403626938133`*^9}, {3.7806423978037753`*^9, 3.7806424738893647`*^9}, { - 3.7806428914613853`*^9, 3.78064290579685*^9}}, - CellLabel-> - "(Dialog) In[500]:=",ExpressionUUID->"a6e4f4c6-8b7f-4eaa-adb3-307e6ebb1893"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.201712214158616`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.08147309302097`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.869677657357252`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.869677657357252`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5803525416585167`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.568389027722245`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897913`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5683890277222448`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.3255603436463215`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9576249635332643`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6982301384894951`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897944`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589664`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.08992779562823877`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.14159265358992`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.08992779562823383`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.153641538489775`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1295437686898113`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9293925398507068`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9877870748641663`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.19611446314371`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7944713503883563`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0710810283424983`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9062576490492174`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1278547902572236`", ",", "4"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794899`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.516756874586539`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.689592609966961`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.060640877708742`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.039765406859538`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.039512077241734`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.749331863840707`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.445579558413938`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0514339580832128`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8258385933658199`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589794`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1676616976100358`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8619227140281916`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589792`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.490053247806479`", ",", "4"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.8578203243597167`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4334658916767795`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8282822826481494`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1330054565146546`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.46819526097010034`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.871085872788637`", ",", "4"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780642627587763*^9, 3.7806427023411646`*^9, 3.780642809322467*^9, { - 3.7806428946449013`*^9, 3.7806429110523877`*^9}, 3.7806429469216003`*^9}, - CellLabel-> - "During evaluation of (Dialog) \ -In[500]:=",ExpressionUUID->"b8b94016-ecfd-4747-999a-f6aa27da221f"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.780642627587763*^9, 3.7806427023411646`*^9, 3.780642809322467*^9, { - 3.7806428946449013`*^9, 3.7806429110523877`*^9}, 3.780642946935562*^9}, - CellLabel-> - "During evaluation of (Dialog) \ -In[500]:=",ExpressionUUID->"2b082659-41d0-4cd2-9983-d98a53ee9cd5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.780642627587763*^9, 3.7806427023411646`*^9, 3.780642809322467*^9, { - 3.7806428946449013`*^9, 3.7806429110523877`*^9}, 3.7806429471300406`*^9}, - CellLabel-> - "During evaluation of (Dialog) \ -In[500]:=",ExpressionUUID->"ab403513-7bb4-4d9c-9e71-ecaf1bb2e94e"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"2.4711606818854504`*^-16", "-", - RowBox[{"0.3865205352979728`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "3.7470027081099033`*^-16"}], "+", - RowBox[{"0.4992294541328156`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "3.399334257508189`*^-16"}], "+", - RowBox[{"0.23199186415369372`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "2.0816681711721685`*^-16"}], "+", - RowBox[{"0.3958092211625824`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "1.5547251059871706`*^-16"}], "+", - RowBox[{"0.08421228186651344`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"6.245004513516506`*^-17", "+", - RowBox[{"0.1424543862530673`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"4.1296768845330306`*^-17", "-", - RowBox[{"0.0763691511370741`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "1.6653345369377348`*^-16"}], "+", - RowBox[{"0.35535649152760646`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.08139163220515633`", "\[VeryThinSpace]", "+", - RowBox[{"0.08139163220515669`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.034705432994440566`", "\[VeryThinSpace]", "+", - RowBox[{"0.0347054329944409`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.1497678361440694`", "\[VeryThinSpace]", "+", - RowBox[{"0.1497678361440698`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.06027599704465153`", "\[VeryThinSpace]", "+", - RowBox[{"0.060275997044652044`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.0833593792639432`", "\[VeryThinSpace]", "+", - RowBox[{"0.08335937926394231`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.015046484700400447`"}], "-", - RowBox[{"0.015046484700400702`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.321770168826611`", "\[VeryThinSpace]", "+", - RowBox[{"0.3217701688266109`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.026274402584198324`", "\[VeryThinSpace]", "+", - RowBox[{"0.026274402584198508`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.10940061926610961`", "\[VeryThinSpace]", "+", - RowBox[{"4.200858543195649`*^-17", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.32667731383992293`", "\[VeryThinSpace]", "+", - RowBox[{"4.0245584642661925`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.12958827125434402`", "\[VeryThinSpace]", "-", - RowBox[{"6.418971984000837`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.2741465235174597`", "\[VeryThinSpace]", "+", - RowBox[{"6.245004513516506`*^-17", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.08821953296916234`", "\[VeryThinSpace]", "+", - RowBox[{"2.2322011876019946`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.3155177223513329`", "\[VeryThinSpace]", "+", - RowBox[{"6.522560269672795`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.3567439478952069`", "\[VeryThinSpace]", "-", - RowBox[{"3.812658334091303`*^-15", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.11386345960583977`", "\[VeryThinSpace]", "-", - RowBox[{"1.8596235662471372`*^-15", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.06988368226413014`", "\[VeryThinSpace]", "+", - RowBox[{"6.501257305478789`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.12116861267859565`", "\[VeryThinSpace]", "-", - RowBox[{"1.2646134139870924`*^-15", " ", "\[ImaginaryI]"}]}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.5360334820297155`", "\[VeryThinSpace]", "+", - RowBox[{"1.7145382620316556`*^-15", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.08185953408683609`"}], "+", - RowBox[{"1.5612511283791264`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.1681857364536382`"}], "+", - RowBox[{"3.5397178854820286`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.301339375228548`", "\[VeryThinSpace]", "-", - RowBox[{"2.6489227478165844`*^-15", " ", "\[ImaginaryI]"}]}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.14305741490239962`", "\[VeryThinSpace]", "+", - RowBox[{"9.574986943277652`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.1715977193997745`", "\[VeryThinSpace]", "-", - RowBox[{"1.7121720707891086`*^-15", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780642627587763*^9, 3.7806427023411646`*^9, 3.780642809322467*^9, { - 3.7806428946449013`*^9, 3.7806429110523877`*^9}, 3.7806429473534756`*^9}, - CellLabel-> - "During evaluation of (Dialog) \ -In[500]:=",ExpressionUUID->"767141ef-dcd5-41e6-99d6-04f14fd08d2f"] -}, Open ]], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780630558676958*^9, 3.7806305789395666`*^9}, { - 3.7806306269376383`*^9, 3.780630706800479*^9}, 3.7806315674069223`*^9, - 3.780631658328033*^9, 3.7806317025365844`*^9, 3.780631784376405*^9, { - 3.780631833361394*^9, 3.780631846694374*^9}, 3.7806319343354874`*^9, - 3.78063220446456*^9, 3.7806322401763997`*^9, {3.78063229541206*^9, - 3.7806323170406094`*^9}, {3.780632543515333*^9, 3.780632555589634*^9}, - 3.7806329747741027`*^9, 3.780635423322343*^9, 3.780635488409137*^9, - 3.780635531846463*^9, {3.7806358751359177`*^9, 3.780635898402627*^9}, { - 3.7806360445257926`*^9, 3.7806360582778177`*^9}, {3.7806373731053696`*^9, - 3.7806373941353874`*^9}, 3.780637474761485*^9, {3.7806376233156395`*^9, - 3.78063767472829*^9}, {3.780637710824609*^9, 3.7806378514747133`*^9}, { - 3.780637886370058*^9, 3.780637919943747*^9}, 3.780640039768805*^9, { - 3.780640124143957*^9, 3.780640137671913*^9}, {3.7806403783469687`*^9, - 3.7806403995977955`*^9}, {3.7806424208431735`*^9, 3.780642504876414*^9}, - 3.780642576040362*^9, 3.780642628133301*^9, 3.780642702925145*^9, - 3.7806428099604564`*^9, {3.780642894754631*^9, 3.7806429117531633`*^9}, - 3.7806429473584585`*^9}, - CellLabel-> - "(Dialog) Out[500]=",ExpressionUUID->"8f25b8fe-3215-4e10-81a6-f295fd9a4690"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "i"}], "}"}], ",", - RowBox[{"{", - RowBox[{"i", ",", "5", ",", "4"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.78063567898641*^9, 3.7806357201059804`*^9}, { - 3.7806357508049088`*^9, 3.780635750885338*^9}}, - CellLabel-> - "In[363]:=",ExpressionUUID->"b2d3543a-bfbf-4f6f-beac-b5da2204c0dd"], - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Output", - CellChangeTimes->{3.7806357203263516`*^9, 3.7806357513607545`*^9}, - CellLabel-> - "Out[363]=",ExpressionUUID->"2ecf3555-08d3-4093-a6d9-3e20127d9128"] -}, Open ]], - -Cell[BoxData[""], "Input", - CellChangeTimes->{{3.7806321612166586`*^9, - 3.7806321716055565`*^9}},ExpressionUUID->"a7ef98d3-362f-423a-b859-\ -8957666125f0"], - -Cell[CellGroupData[{ - -Cell["Algorithm", "Section", - CellChangeTimes->{{3.766584308769024*^9, - 3.7665843232623215`*^9}},ExpressionUUID->"ef572160-aedc-4b5d-915c-\ -aa090aba68bb"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"QRSplit", "[", "v_", "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{"Input", ":", " ", - RowBox[{"a", " ", "rectangular", " ", - RowBox[{"matrix", " ", "[", - RowBox[{"q1", ":", "q2"}], "]"}], " ", "with", " ", "an", " ", "even", - " ", "number", " ", "of", " ", "rows"}]}], ";", "\[IndentingNewLine]", - " ", - RowBox[{ - RowBox[{"Output", ":", " ", - RowBox[{ - RowBox[{"{", - RowBox[{"R", ",", - RowBox[{"{", - RowBox[{"Q1", ",", "Q2"}], "}"}]}], "}"}], " ", "where", " ", - "R"}]}], "=", - RowBox[{ - RowBox[{ - RowBox[{"[", - RowBox[{"R1", ":", "R2"}], "]"}], " ", "is", " ", "an", " ", - "isometry", " ", "and", " ", "V1"}], "=", - RowBox[{"Q1", "*", "R1"}]}]}]}], ",", " ", - RowBox[{ - RowBox[{"V2", "=", - RowBox[{"Q2", "*", "R2"}]}], ";"}]}], "*)"}], "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "v1", ",", " ", "v2", ",", "q1", ",", "q2", ",", "r1", ",", "r2"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"!", - RowBox[{"EvenQ", "[", - RowBox[{"Length", "[", "v", "]"}], "]"}]}], ",", " ", - RowBox[{"Throw", "[", - RowBox[{ - "Stringform", "[", - "\"\\"", "]"}], - "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"v1", ",", "v2"}], "}"}], " ", "=", " ", - RowBox[{"Partition", "[", - RowBox[{"v", ",", " ", - RowBox[{ - RowBox[{"Length", "[", "v", "]"}], "/", "2"}]}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "r1"}], "}"}], " ", "=", " ", - RowBox[{"QRDecomposition", "[", "v1", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q2", ",", "r2"}], "}"}], " ", "=", " ", - RowBox[{"QRDecomposition", "[", "v2", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"Join", "[", - RowBox[{"r1", ",", "r2"}], "]"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"Transpose", "[", "q1", "]"}], ",", - RowBox[{"Transpose", "[", "q2", "]"}]}], "}"}]}], "}"}], "]"}]}]}], - "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7617322657800064`*^9, 3.7617322714418325`*^9}, { - 3.7617324037499504`*^9, 3.7617326020416613`*^9}, {3.7617329062341137`*^9, - 3.7617329494814396`*^9}, {3.761733115185172*^9, 3.7617331205049477`*^9}, { - 3.761733277251341*^9, 3.7617333092826595`*^9}, 3.7617333895377865`*^9, { - 3.7617335281230683`*^9, 3.761733564121835*^9}, {3.7617336208022203`*^9, - 3.7617336246987967`*^9}, {3.761735780977034*^9, 3.7617357850870404`*^9}, { - 3.761736766005331*^9, 3.76173677113461*^9}, {3.7617370879033484`*^9, - 3.7617370975016317`*^9}, 3.7617374230938377`*^9, 3.7617379415014057`*^9, { - 3.7617392856923733`*^9, 3.761739304426289*^9}, {3.7617394210144253`*^9, - 3.761739474289889*^9}, {3.761739674803536*^9, 3.7617397132186604`*^9}, { - 3.76173974644481*^9, 3.761739746704157*^9}, {3.7617397816825514`*^9, - 3.7617397891864786`*^9}, {3.761739856660015*^9, 3.761739858697543*^9}, { - 3.761740025834587*^9, 3.761740030434311*^9}, {3.761740077619101*^9, - 3.7617400779462605`*^9}, {3.761740642275613*^9, 3.7617407033642297`*^9}, { - 3.761740835282392*^9, 3.7617408539123535`*^9}, {3.7617408938513727`*^9, - 3.7617409168019505`*^9}, {3.761740951139127*^9, 3.7617409615622454`*^9}, { - 3.761741119825877*^9, 3.761741137098731*^9}, {3.7617411846664906`*^9, - 3.7617412628827868`*^9}, {3.761741308873763*^9, 3.7617413140728617`*^9}, { - 3.761741370730278*^9, 3.7617413776657515`*^9}, {3.7617414310150013`*^9, - 3.76174145343305*^9}, {3.761741514226403*^9, 3.761741522792517*^9}, - 3.7617417195620637`*^9, {3.761741761583665*^9, 3.76174176295898*^9}, { - 3.761741800809732*^9, 3.7617418244285536`*^9}, 3.761742810016183*^9, - 3.7617428407589483`*^9, {3.76174287795944*^9, 3.761742912946875*^9}, { - 3.761742963336087*^9, 3.7617430294070034`*^9}, {3.7617434911367626`*^9, - 3.761743528885823*^9}, {3.7617435589284253`*^9, 3.7617435593503284`*^9}, - 3.7617452764122887`*^9, {3.761745694334489*^9, 3.7617457035887346`*^9}, { - 3.762959505283737*^9, 3.7629595713260603`*^9}, {3.762959602339146*^9, - 3.7629596083969436`*^9}, {3.7629597006710844`*^9, 3.762959721670905*^9}, { - 3.76295977035023*^9, 3.7629597706524076`*^9}, {3.7629598775820503`*^9, - 3.762959881388866*^9}, {3.7641550884283133`*^9, 3.7641552914824376`*^9}, { - 3.7665812220702076`*^9, 3.766581224374049*^9}, {3.766581747087158*^9, - 3.7665817517656493`*^9}, {3.7665828084388733`*^9, - 3.7665828165422144`*^9}, {3.766584059258024*^9, 3.7665840690707903`*^9}, - 3.7665848484408593`*^9, {3.7665980601423492`*^9, 3.7665980853738976`*^9}, { - 3.76666944094154*^9, 3.7666694425123396`*^9}, {3.7689856331917944`*^9, - 3.7689857036572623`*^9}, {3.768985773081476*^9, 3.7689858116014132`*^9}, { - 3.7689861973965874`*^9, 3.768986282964658*^9}, {3.768986402432001*^9, - 3.7689864345999117`*^9}, {3.7689866185877733`*^9, 3.76898663834094*^9}, { - 3.768986868695569*^9, 3.7689868762174788`*^9}, {3.7689871569712887`*^9, - 3.7689871595633583`*^9}, 3.7689883827610717`*^9, 3.769708058668933*^9}, - CellLabel->"In[19]:=",ExpressionUUID->"0574746a-30ed-4d5c-b877-cc44f5503a42"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"q_", ",", " ", - RowBox[{"OptionsPattern", "[", - RowBox[{"EfficientRepresentation", "\[Rule]", "False"}], "]"}]}], "]"}], - " ", ":=", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{ - "Use", " ", "reduced", " ", "CSD", " ", "decomposition", " ", "to", " ", - "decompose", " ", "an", " ", - RowBox[{"isometry", " ", "[", - RowBox[{"q1", ":", "q2"}], "]"}], " ", "in", " ", "to", " ", "q1"}], - "=", - RowBox[{ - RowBox[{"u1", "*", "c", "*", "v", " ", "and", " ", "q2"}], "=", - RowBox[{"u2", "*", "s", "*", "v"}]}]}], ",", - RowBox[{ - RowBox[{ - "where", " ", "c", " ", "and", " ", "s", " ", "are", " ", "diagonal", - " ", "matrix", " ", "with", " ", "entries", " ", "of", " ", "the", " ", - "form", " ", "cos", " ", "and", " ", "sin", " ", - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{ - RowBox[{"means", " ", "that", " ", - RowBox[{"c", "^", "2"}]}], "+", - RowBox[{"s", "^", "2"}]}], "=", "I"}], ")"}], ".", - "\[IndentingNewLine]", "This"}], " ", "version", " ", "works", " ", - "ONLY", " ", "if", " ", "q", " ", "is", " ", "an", " ", "isometry", " ", - "with", " ", "dimention", " ", - RowBox[{"(", - RowBox[{"m", ",", "n"}], ")"}], " ", "where", " ", "2", "m"}], - "\[LessEqual]", "n"}], ",", " ", - RowBox[{ - RowBox[{ - "ortherwise", " ", "the", " ", "removal", " ", "of", " ", "0", "s", " ", - "in", " ", "s", " ", "has", " ", "to", " ", "be", " ", - RowBox[{ - "modified", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "If"}], - " ", "EfficientRepresentation"}], "->", "False"}], ",", " ", - RowBox[{"it", " ", "returns", " ", "three", " ", "matrix", " ", "m1"}], - ",", "m2", ",", - RowBox[{ - RowBox[{"m3", " ", "so", " ", "that", " ", "m1", "*", "m2", "*", "m3"}], - "=", - RowBox[{ - RowBox[{ - RowBox[{"[", - RowBox[{"q1", ":", "q2"}], "]"}], "\[IndentingNewLine]", "If", " ", - "EfficiqentRepresentation"}], "->", "True"}]}], ",", " ", - RowBox[{"it", " ", "only", " ", "returns", " ", "v"}], ",", " ", - RowBox[{ - "a", " ", "list", " ", "of", " ", "diagonal", " ", "elements", " ", "c", - " ", "and", " ", "s", " ", "and", " ", - RowBox[{"{", - RowBox[{"u1", ",", " ", "u2"}], "}"}]}]}], "\[IndentingNewLine]", - "*)"}], "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "n", ",", "m", ",", " ", "u1", ",", "u2", ",", "s", ",", "c", ",", "v", - ",", "q1", ",", "q2", ",", "x", ",", " ", "r", ",", "reducedDim"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"!", - RowBox[{"EvenQ", "[", - RowBox[{"Length", "[", "q", "]"}], "]"}]}], ",", " ", - RowBox[{"Throw", "[", - RowBox[{ - "Stringform", "[", - "\"\\"", - "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"n", ",", "m"}], "}"}], "=", - RowBox[{"Dimensions", "[", "q", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"2", "*", "m"}], ">", "n"}], ",", " ", - RowBox[{"Throw", "[", - RowBox[{ - "Stringform", "[", - "\"\\"", "]"}], "]"}]}], - "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}], " ", "=", " ", - RowBox[{"Partition", "[", - RowBox[{"q", ",", " ", - RowBox[{ - RowBox[{"Length", "[", "q", "]"}], "/", "2"}]}], "]"}]}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"calculate", " ", "reduced", " ", "u2", " ", "and", " ", "s"}], - " ", "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"u2", ",", "s", ",", "v"}], "}"}], " ", "=", " ", - RowBox[{"SingularValueDecomposition", "[", "q2", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"reducedDim", " ", "=", - RowBox[{ - RowBox[{"Dimensions", "[", "q1", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"u2", " ", "=", " ", - RowBox[{"u2", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"1", ";;", "reducedDim"}]}], "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"Cut", " ", "unnecessary", " ", "columns"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"s", " ", "=", " ", - RowBox[{"s", "[", - RowBox[{"[", - RowBox[{ - RowBox[{"1", ";;", "reducedDim"}], ",", - RowBox[{"1", ";;", "reducedDim"}]}], "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"Cut", " ", "zeros"}], " ", "*)"}], "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "calculate", " ", "u1", " ", "and", " ", "c", " ", "using", " ", "QR", - " ", "decomposition"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"x", " ", "=", " ", - RowBox[{"q1", ".", "v"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"u1", ",", "r"}], "}"}], " ", "=", " ", - RowBox[{"QRDecomposition", "[", "x", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"c", " ", "=", " ", - RowBox[{"DiagonalMatrix", "[", - RowBox[{"Diagonal", "[", "r", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"u1", " ", "=", " ", - RowBox[{"x", ".", - RowBox[{"Inverse", "[", "c", "]"}]}]}], ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"Transpose", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"output", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "EfficientRepresentation", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"v", ",", "\[IndentingNewLine]", - RowBox[{"MapThread", "[", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"#1", ",", "#2"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "#2"}], ",", "#1"}], "}"}]}], "}"}], "&"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"Diagonal", "[", "c", "]"}], ",", - RowBox[{"Diagonal", "[", "s", "]"}]}], "}"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"u1", ",", "u2"}], "}"}]}], "}"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "v", "}"}], ",", - RowBox[{"{", - RowBox[{"SparseArray", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"reducedDim", ",", "reducedDim"}], "}"}]}], "]"}], - "}"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"c", ",", "s"}], "}"}], ",", - RowBox[{"{", - RowBox[{"s", ",", "c"}], "}"}]}], "}"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"u1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "u2"}], "}"}]}], "}"}], "]"}]}], - "\[IndentingNewLine]", "}"}], "]"}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7641740356972055`*^9, 3.764174037511384*^9}, { - 3.7641741003203382`*^9, 3.764174100711294*^9}, {3.764313790510702*^9, - 3.7643138544547887`*^9}, {3.7643138897762947`*^9, - 3.7643138944692945`*^9}, {3.7643139355685463`*^9, 3.764313971427433*^9}, { - 3.764314108863223*^9, 3.7643141236366215`*^9}, {3.7643141677455626`*^9, - 3.764314173743504*^9}, {3.7643146515530024`*^9, 3.7643146565642653`*^9}, { - 3.764315035113085*^9, 3.764315044606406*^9}, {3.76431512002225*^9, - 3.764315121058582*^9}, {3.7643155305957174`*^9, 3.7643155824075956`*^9}, { - 3.76431574217001*^9, 3.764315769583948*^9}, {3.7643158436112638`*^9, - 3.7643158700543194`*^9}, {3.7643161812560782`*^9, - 3.7643161840658464`*^9}, {3.764342009796929*^9, 3.764342013363389*^9}, { - 3.76434234066908*^9, 3.764342341156148*^9}, {3.765943388063779*^9, - 3.7659434158654704`*^9}, {3.7659435095859785`*^9, 3.765943511401125*^9}, { - 3.7659437524603786`*^9, 3.7659437554813356`*^9}, 3.765943876449839*^9, { - 3.765943944172777*^9, 3.7659439721220427`*^9}, {3.7659441434429383`*^9, - 3.765944197693014*^9}, {3.7659442446584463`*^9, 3.765944334585556*^9}, { - 3.7659444117392225`*^9, 3.765944427649678*^9}, {3.7659444609556203`*^9, - 3.76594446152011*^9}, {3.7659445211147566`*^9, 3.7659445292011347`*^9}, { - 3.7659450280971546`*^9, 3.7659450547548523`*^9}, {3.7659451034885416`*^9, - 3.765945131594387*^9}, {3.7659455225789366`*^9, 3.7659455446508913`*^9}, { - 3.7659455804970407`*^9, 3.7659455828347893`*^9}, {3.765946468066487*^9, - 3.765946480385546*^9}, {3.765946718400012*^9, 3.765947098304867*^9}, { - 3.765947245563077*^9, 3.765947281090079*^9}, {3.7659476556253815`*^9, - 3.7659477085997934`*^9}, {3.765947837760481*^9, 3.765947843609816*^9}, { - 3.765947884721884*^9, 3.7659479357384677`*^9}, {3.765948006513219*^9, - 3.7659480499061904`*^9}, 3.765948105209341*^9, {3.7659481563368063`*^9, - 3.765948174568056*^9}, {3.765948320098813*^9, 3.7659483222879596`*^9}, - 3.7659484765212584`*^9, {3.765948794794286*^9, 3.7659488100963926`*^9}, { - 3.7659494230665083`*^9, 3.76594942688826*^9}, {3.76594964917791*^9, - 3.7659496638879066`*^9}, {3.765949772888795*^9, 3.7659498441852045`*^9}, { - 3.7659498850670595`*^9, 3.765949893985214*^9}, {3.765949930203905*^9, - 3.765950021463606*^9}, {3.7659500816271515`*^9, 3.7659501091755257`*^9}, { - 3.765950229744213*^9, 3.76595030669592*^9}, {3.7659503724031963`*^9, - 3.7659503729527473`*^9}, {3.765950596135972*^9, 3.7659507050797863`*^9}, { - 3.76595124468877*^9, 3.7659512459434147`*^9}, {3.7659519533289394`*^9, - 3.7659519625921717`*^9}, {3.765952252392784*^9, 3.765952254088277*^9}, { - 3.7659523545536103`*^9, 3.7659523659762373`*^9}, {3.7659524687610197`*^9, - 3.7659524720681777`*^9}, {3.765952508922634*^9, 3.76595250989503*^9}, { - 3.7663306726266327`*^9, 3.7663306895583577`*^9}, {3.7663307684953012`*^9, - 3.766330780191027*^9}, {3.7663317097279634`*^9, 3.7663317374628015`*^9}, { - 3.76633271173733*^9, 3.766332718199052*^9}, {3.766332821462929*^9, - 3.766332880222807*^9}, {3.7663330305018635`*^9, 3.7663330739267473`*^9}, { - 3.7663331269898624`*^9, 3.7663331453692274`*^9}, 3.7663370773789253`*^9, - 3.766584848445846*^9, {3.7665997310889864`*^9, 3.7665997349037886`*^9}, { - 3.7689861274138284`*^9, 3.76898613400021*^9}, {3.768986771333069*^9, - 3.768986803179861*^9}, {3.768986853788454*^9, 3.7689869064934664`*^9}, { - 3.768986948355467*^9, 3.768987151767227*^9}, {3.768988364380226*^9, - 3.7689883772099*^9}, {3.768988573274419*^9, 3.7689886066670523`*^9}, - 3.7689886547434497`*^9, {3.768988788137658*^9, 3.7689888098366013`*^9}, { - 3.7689888795640745`*^9, 3.768988883685073*^9}, {3.768989124204567*^9, - 3.76898914522731*^9}, {3.7689891914615717`*^9, 3.7689892630500712`*^9}, { - 3.7689892955929623`*^9, 3.7689893303380213`*^9}}, - CellLabel->"In[20]:=",ExpressionUUID->"5f42cdaa-e43b-4846-8f5d-f7ea7532e652"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ChooseDecMethod", "[", "MethodName_", "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", "method", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"Switch", "[", "\[IndentingNewLine]", - RowBox[{ - "MethodName", ",", "\[IndentingNewLine]", "\"\\"", ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "QSD", "]"}], ",", "\[IndentingNewLine]", - "\"\\"", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "DecIsometry", "]"}], ",", - "\[IndentingNewLine]", "\"\\"", ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "DecIsometryGeneric", "]"}], ",", - "\[IndentingNewLine]", "\"\\"", ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "ColumnByColumnDec", "]"}], ",", - "\[IndentingNewLine]", "\"\\"", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "KnillDec", "]"}], ",", "\[IndentingNewLine]", - "_", ",", "\[IndentingNewLine]", - RowBox[{"Throw", "[", - RowBox[{ - "\"\\"", "<>", "MethodName", "<>", - "\"\< is not found. The available methods are QSD, DecIsometry, \ -DecIsometryGeneric, ColumnByColumnDec and KnillDec.\>\""}], "]"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.76970293567719*^9, 3.7697032152597203`*^9}, { - 3.7697033166138134`*^9, 3.76970332353119*^9}, {3.769703364756817*^9, - 3.7697033807151794`*^9}, {3.769703736290546*^9, 3.7697037393385677`*^9}, { - 3.7697038492096405`*^9, 3.7697038829377728`*^9}, {3.769704153363648*^9, - 3.7697041554181533`*^9}, {3.769706973320961*^9, 3.769706974599513*^9}, { - 3.7697070997228584`*^9, 3.7697071387032785`*^9}, {3.7697072917608795`*^9, - 3.769707303559349*^9}}, - CellLabel->"In[21]:=",ExpressionUUID->"52f367e3-597d-490a-82a9-335c95c000aa"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList_", ",", - RowBox[{"OptionsPattern", "[", - RowBox[{"{", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], "}"}], "]"}]}], - "]"}], " ", ":=", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - RowBox[{ - "Recursively", " ", "decompose", " ", "a", " ", "list", " ", "of", " ", - RowBox[{"2", "^", "k"}], " ", "Kraus", " ", "operators", " ", "into", - " ", "an", " ", "m", " ", "x", " ", "n", " ", "Isometry", " ", "and", - " ", "two", " ", "list", " ", "of", " ", "Krau", " ", "operators", " ", - "controlled", " ", "by", " ", "the", " ", "measured", " ", "result", - " ", "after", " ", "the", " ", "isometry"}], ";", " ", - "\[IndentingNewLine]", - RowBox[{"After", " ", "those", " ", "gates"}]}], ",", " ", - RowBox[{ - RowBox[{ - "the", " ", "first", " ", "qubit", " ", "is", " ", "to", " ", "be", " ", - "measured", " ", "but", " ", "the", " ", "measurement", " ", "gates", - " ", "are", " ", "not", " ", "included", " ", "here"}], ";", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - "The", " ", "total", " ", "number", " ", "of", " ", "qubis", " ", - "involved", " ", "is", " ", "max", - RowBox[{"(", - RowBox[{"m", ",", "n"}], ")"}]}], "+", "1"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"Input", ":", " ", - RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operator"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"Output", ":", " ", - RowBox[{"isometry", "/", "st"}]}]}], ",", " ", - RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operators"}], - ",", " ", - RowBox[{ - RowBox[{"a", " ", "list", " ", "of", " ", "Kraus", " ", "operators"}], - ";", - RowBox[{"(", - RowBox[{ - RowBox[{ - "If", " ", "the", " ", "list", " ", "of", " ", "Kraus", " ", - "operators", " ", "is", " ", "no", " ", "longer", " ", "decomposible", - " ", "with", " ", "QR"}], ",", " ", - RowBox[{"it", " ", "will", " ", "returns", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"isometry", "/", "st"}], ",", "None", ",", "None"}], - "}"}]}]}], ")"}]}], "\:ff1b", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", - RowBox[{"\"\\"", ":", " ", - RowBox[{ - "Use", " ", "QRSplit", " ", "and", " ", "the", " ", "isometry", " ", - "is", " ", "in", " ", "the", " ", "matrix", " ", - "representation"}]}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", - RowBox[{"\"\\"", ":", " ", - RowBox[{ - "Use", " ", "ReducedCSDSplit", " ", "and", " ", "the", " ", "isometry", - " ", "is", " ", "give", " ", "as", " ", "gate", " ", - "sequence"}]}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"If", " ", "DecomposeIso"}], "\[Rule]", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - "\"\\"", "/", "\"\\""}], - "/", "\"\\""}], "/", "\"\\""}], - ":", " ", - RowBox[{ - "Use", " ", "QRSplit", " ", "and", " ", "the", " ", "isometry", " ", - "is", " ", "decomposed", " ", "by", " ", "the", " ", "corresponding", - " ", "decomposition", " ", "methods"}]}]}]}]}], "\[IndentingNewLine]", - "*)"}], "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "k", ",", "n", ",", "e2n", ",", "m", ",", "DecMethod", ",", "q", ",", - "v", ",", "r", ",", "rList", ",", "q1", ",", "q2", ",", - "gateSequence"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"e2n", " ", "=", " ", - RowBox[{ - RowBox[{"Dimensions", "[", "krausList", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Log2", "[", - RowBox[{"Dimensions", "[", "krausList", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "k", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", - "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "m", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "n", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"StringQ", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], - "]"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"q", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - "If", " ", "the", " ", "stacked", " ", "kraus", " ", "operators", " ", - "is", " ", "already", " ", "a", " ", "m", " ", "to", " ", "n", " ", - "isometry", " ", "with", " ", "n"}], "<=", - RowBox[{"m", "+", "1"}]}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"n", "+", "k"}], "\[LessEqual]", - RowBox[{"m", "+", "1"}]}], ",", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"q", ",", "None", ",", "None"}], "}"}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"DecMethod", "[", "q", "]"}], ",", "None", ",", "None"}], - "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], - "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"QR", " ", "or", " ", "ReducedCSD", " ", "Decomposition"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Use", " ", "ReducedCSDSplit"}], "*)"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", "=", "QSD"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"v", ",", "rList", ",", - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], "=", - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"q", ",", " ", - RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], "]"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"gateSequence", " ", "=", " ", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"Ancilla", "[", - RowBox[{"0", ",", "1"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"DecMethod", "[", - RowBox[{"v", ",", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{ - RowBox[{"Max", "[", - RowBox[{"m", ",", "n"}], "]"}], "-", "m", "+", "2"}], ",", - RowBox[{ - RowBox[{"Max", "[", - RowBox[{"n", ",", "m"}], "]"}], "+", "1"}]}], "]"}]}]}], - "]"}], "}"}]}], "\[IndentingNewLine]", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{ - RowBox[{"Max", "[", - RowBox[{"m", ",", "n"}], "]"}], "-", "m", "+", "2"}], ",", - RowBox[{ - RowBox[{"Max", "[", - RowBox[{"n", ",", "m"}], "]"}], "+", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"{", "1", "}"}]}]}], "]"}], "&"}], ",", "rList"}], - "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", - "}"}]}], ";", "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"gateSequence", ",", " ", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "e2n"}], "]"}], ",", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "e2n"}], "]"}]}], "}"}], "]"}]}], ",", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Use", " ", "QRSplit"}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"r", ",", - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], " ", "=", " ", - RowBox[{"QRSplit", "[", "q", "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", - RowBox[{"{", - RowBox[{"r", ",", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "e2n"}], "]"}], ",", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "e2n"}], "]"}]}], "}"}], "]"}], ",", " ", - RowBox[{"(*", " ", - RowBox[{ - "Partition", " ", "transform", " ", "it", " ", "to", " ", "a", " ", - "list", " ", "of", " ", "kraus"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"r", ",", " ", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{ - RowBox[{"Max", "[", - RowBox[{"m", ",", "n"}], "]"}], "+", "1"}]}], "]"}]}]}], - "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Partition", "[", - RowBox[{"q1", ",", "e2n"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Partition", "[", - RowBox[{"q2", ",", "e2n"}], "]"}]}], "\[IndentingNewLine]", - "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], - "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.7665840777186775`*^9, 3.7665840967428236`*^9}, - 3.766584132727624*^9, {3.766584185303074*^9, 3.766584191447653*^9}, - 3.766584848450833*^9, {3.766598507623108*^9, 3.76659850835116*^9}, { - 3.766598544085631*^9, 3.766598563182579*^9}, {3.7665988492458973`*^9, - 3.7665988711912303`*^9}, {3.766598920022687*^9, 3.766599089182914*^9}, { - 3.7665992731831007`*^9, 3.7665993078544126`*^9}, {3.7665993511297245`*^9, - 3.766599413399262*^9}, {3.766599462080122*^9, 3.766599505294603*^9}, { - 3.7665997577666693`*^9, 3.7665998531197605`*^9}, {3.766599911295239*^9, - 3.7665999333752112`*^9}, {3.7665999706635284`*^9, 3.766599979110946*^9}, { - 3.7666000230963583`*^9, 3.7666000875749874`*^9}, {3.7666001225754204`*^9, - 3.7666001486965895`*^9}, {3.7666001793027706`*^9, 3.7666004194957*^9}, { - 3.7666004733118324`*^9, 3.766600511919162*^9}, {3.766600611944977*^9, - 3.76660065587152*^9}, {3.7666007283293552`*^9, 3.76660081278459*^9}, { - 3.76660084585618*^9, 3.7666008534718227`*^9}, {3.7666015185288115`*^9, - 3.7666015210410933`*^9}, {3.7674386349753284`*^9, - 3.7674386353108406`*^9}, {3.7674395536896477`*^9, - 3.7674395537009387`*^9}, {3.767439686168064*^9, 3.767439694732544*^9}, { - 3.768990320335496*^9, 3.7689904671900144`*^9}, {3.7689910125321655`*^9, - 3.768991045824093*^9}, {3.768991102709888*^9, 3.76899110768458*^9}, - 3.7689911479169335`*^9, {3.76899121850906*^9, 3.7689912501693525`*^9}, { - 3.7689912808213387`*^9, 3.768991322804012*^9}, {3.7689913851871376`*^9, - 3.768991400815298*^9}, {3.7689914740144386`*^9, 3.768991502047434*^9}, { - 3.7689915394045095`*^9, 3.7689915437817736`*^9}, {3.7689915759237757`*^9, - 3.7689915775244923`*^9}, {3.7689916252168875`*^9, 3.768991641197132*^9}, { - 3.7689917100778365`*^9, 3.7689918152524357`*^9}, {3.7689918473645186`*^9, - 3.768991875811509*^9}, {3.7689922186643405`*^9, 3.76899234087503*^9}, { - 3.7689924599055567`*^9, 3.768992549598576*^9}, {3.768992582171423*^9, - 3.768992753585827*^9}, {3.7689928062678432`*^9, 3.7689928915222483`*^9}, { - 3.7689930078989067`*^9, 3.768993031218549*^9}, 3.768993066242803*^9, { - 3.7689934886367116`*^9, 3.768993503131282*^9}, {3.768993571410596*^9, - 3.7689936732544827`*^9}, {3.7689937200523033`*^9, 3.768993748120085*^9}, { - 3.7689940278024035`*^9, 3.7689940324250355`*^9}, {3.7689989938726206`*^9, - 3.768999118840295*^9}, {3.768999148923776*^9, 3.7689991994935336`*^9}, { - 3.768999245671011*^9, 3.768999352238721*^9}, {3.7689994049477024`*^9, - 3.7689994455520363`*^9}, {3.768999491511098*^9, 3.7689995886052933`*^9}, { - 3.768999784720758*^9, 3.7689998544921074`*^9}, {3.768999911621227*^9, - 3.768999960029707*^9}, {3.7690103458709807`*^9, 3.769010360456957*^9}, { - 3.7690132711425257`*^9, 3.7690132799559455`*^9}, {3.769599514515067*^9, - 3.769599519667288*^9}, {3.769599773436741*^9, 3.769599814450002*^9}, { - 3.7695998844938574`*^9, 3.769599928939083*^9}, {3.7695999608218336`*^9, - 3.7695999721458845`*^9}, {3.7696000082981887`*^9, 3.7696002306757*^9}, { - 3.7696002721707172`*^9, 3.7696002881948586`*^9}, {3.769601804985136*^9, - 3.7696018063863893`*^9}, {3.769601947081113*^9, 3.76960198277781*^9}}, - CellLabel->"In[22]:=",ExpressionUUID->"588a5cca-c270-4c4b-b168-5e806f92c1ea"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList_", ",", - RowBox[{"OptionsPattern", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DecomposeLastIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "}"}], "]"}]}], - "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{ - "Recursively", " ", "decompose", " ", "a", " ", "list", " ", "of", - " ", - RowBox[{"2", "^", "k"}], " ", "Kraus", " ", "operators", " ", - "into", " ", "an", " ", "m", " ", "x", " ", "n", " ", "Isometry", - " ", "and", " ", "two", " ", "list", " ", "of", " ", "Krau", " ", - "operators", " ", "controlled", " ", "by", " ", "the", " ", - "measured", " ", "result", " ", "after", " ", "the", " ", - "isometry"}], ";", "\[IndentingNewLine]", - RowBox[{"Input", ":", " ", - RowBox[{ - "a", " ", "list", " ", "of", " ", "kraus", " ", "operators", " ", - RowBox[{"{", - RowBox[{"K1", ",", "K2", ",", - RowBox[{"...", "K_", - RowBox[{"(", - RowBox[{"2", "^", "k"}], ")"}]}]}], "}"}]}]}], ";", - "\[IndentingNewLine]", - RowBox[{"Output", ":", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"st", "[", "r1", "]"}], "}"}], " ", ",", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"st", "[", "r21", "]"}], ",", - RowBox[{"st", "[", "r22", "]"}]}], "}"}], " ", ",", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"st", "[", "r31", "]"}], ",", - RowBox[{"st", "[", "r32", "]"}], ",", - RowBox[{"st", "[", "r33", "]"}], ",", - RowBox[{"st", "[", "r34", "]"}]}], "}"}], " ", ",", " ", "...", - ",", " ", - RowBox[{"{", - RowBox[{"st", "[", "q1"}]}]}]}]}]}], "}"}], ",", " ", - RowBox[{"st", "[", "q2", "]"}], ",", " ", "...", ",", " ", - RowBox[{"st", "[", - RowBox[{"q_", - RowBox[{"(", - RowBox[{"2", "^", "k"}], ")"}]}], "]"}]}], "}"}], "}"}], ",", " ", - RowBox[{"where", " ", - RowBox[{"st", "[", "g", "]"}], " ", "is", " ", "the", " ", "gate", " ", - "sequence", " ", "of", " ", "gate", " ", - RowBox[{"g", "."}]}]}], "\[IndentingNewLine]", "*)"}], - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "SplitResult", ",", " ", "gateSequence", ",", " ", "DecMethod", ",", "l", - ",", "n", ",", "m", ",", "k", ",", "loopNum", ",", " ", "i", ",", "v", - ",", "vList", ",", " ", "qList", ",", "rList"}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"k", ",", "n", ",", "m"}], "}"}], " ", "=", " ", - RowBox[{"Log2", "[", - RowBox[{"Dimensions", "[", "krausList", "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{"(", - RowBox[{"n", ",", "m"}], ")"}], " ", "size", " ", "of", " ", "each", - " ", "kraus", " ", "operator"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "k", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", - "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "m", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"IntegerQ", "[", "n", "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"StringQ", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], - "]"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"loopNum", " ", "=", " ", - RowBox[{ - "number", " ", "of", " ", "iteration", " ", "with", " ", "qr", " ", - "decomposition"}]}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"m", "<", "n"}], ",", " ", - RowBox[{ - RowBox[{"loopNum", " ", "=", " ", "k"}], ";", " ", - RowBox[{"l", "=", - RowBox[{"n", "-", "m"}]}]}], ",", - RowBox[{ - RowBox[{"loopNum", " ", "=", " ", - RowBox[{"n", "+", "k", "-", "m", "-", "1"}]}], ";", - RowBox[{"l", "=", "1"}]}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"{", "v", "}"}]}], ";", "\[IndentingNewLine]", - RowBox[{"gateSequence", " ", "=", " ", - RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<=", "loopNum"}], ",", - RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "Reduced", " ", "CSD", " ", "is", " ", "choosen", " ", "to", " ", - "do", " ", "the", " ", "decomposition"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "\[Equal]", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", "QSD"}], ";", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Matrix", " ", "calculation"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"SplitResult", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"#", ",", - RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], - "]"}], "&"}], ",", " ", "qList"}], "]"}], ",", "1"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - "A", " ", "list", " ", "bellow", " ", "contains", " ", "all", " ", - "gate", " ", "sequences", " ", "multiplex", " ", "controlled", - " ", "by", " ", "the", " ", "first", " ", "i"}], "-", - RowBox[{"1", " ", "bits"}]}], "*)"}], "\[IndentingNewLine]", - RowBox[{"vList", " ", "=", - RowBox[{"SplitResult", "[", - RowBox[{"[", - RowBox[{"1", ";;", - RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"Zero", " ", "controlled", " ", "gate", " ", "v"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{"rList", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"SplitResult", "[", - RowBox[{"[", - RowBox[{"2", ";;", - RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}], ",", "1"}], - "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{ - "Matrices", " ", "with", " ", "cos", " ", "and", " ", "sin", " ", - "elements"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"SplitResult", "[", - RowBox[{"[", - RowBox[{"3", ";;", - RowBox[{"-", "1"}], ";;", "3"}], "]"}], "]"}], ",", "1"}], - "]"}]}], ";", " ", - RowBox[{"(*", " ", - RowBox[{ - "Isometry", " ", "for", " ", "the", " ", "decomposition", " ", - "in", " ", "the", " ", "next", " ", "round"}], "*)"}], - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Append", " ", "results"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], - "\[Equal]", "False"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"loopNum", "+", "1"}], "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}]}], - "]"}], "&"}], ",", "vList"}], "]"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], - ",", "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"{", - RowBox[{"loopNum", "+", "1"}], "}"}]}]}], "]"}], "&"}], - ",", "rList"}], "]"}]}], "\[IndentingNewLine]", "]"}], - ",", "\[IndentingNewLine]", - RowBox[{"Mmt2", "[", - RowBox[{"i", ",", - RowBox[{"loopNum", "+", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "i", "}"}], ",", - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"{", - RowBox[{"NOT", "[", - RowBox[{"loopNum", "+", "1"}], "]"}], "}"}], "}"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], - "\[Equal]", "True"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "i", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"k", "+", "l", "+", "1"}], ",", - RowBox[{"k", "+", "l", "+", "m"}]}], "]"}]}]}], "]"}], - "&"}], ",", "vList"}], "]"}]}], "\[IndentingNewLine]", - "]"}], ",", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], - ",", "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"{", "i", "}"}]}]}], "]"}], "&"}], ",", "rList"}], - "]"}]}], "\[IndentingNewLine]", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Mmt", "[", "i", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}]}], - "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "Other", " ", "decomposition", " ", "method", " ", "is", " ", - "choosen"}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "!=", - "\"\\""}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"DecMethod", " ", "=", " ", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Matrix", " ", "calculation"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"qrSplitResult", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"Map", "[", - RowBox[{"QRSplit", ",", " ", "qList"}], "]"}], ",", "1"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"rList", " ", "=", " ", - RowBox[{"qrSplitResult", "[", - RowBox[{"[", - RowBox[{"1", ";;", - RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"qList", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"qrSplitResult", "[", - RowBox[{"[", - RowBox[{"2", ";;", - RowBox[{"-", "1"}], ";;", "2"}], "]"}], "]"}], ",", "1"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"Append", " ", "results"}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], "==", - "False"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"loopNum", "+", "1"}], "}"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], - "]"}]}]}], "]"}], "&"}], ",", "rList"}], "]"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Mmt2", "[", - RowBox[{"i", ",", - RowBox[{"loopNum", "+", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "i", "}"}], ",", - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"{", - RowBox[{"NOT", "[", - RowBox[{"loopNum", "+", "1"}], "]"}], "}"}], "}"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"OptionValue", "[", "DoNotReuseAncilla", "]"}], "==", - "True"}], ",", "\[IndentingNewLine]", - RowBox[{"gateSequence", "=", - RowBox[{"Join", "[", - RowBox[{"gateSequence", ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", - RowBox[{"i", "-", "1"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"action", "=", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"{", "i", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "l", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], - "]"}]}]}], "]"}], "&"}], ",", "rList"}], "]"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Mmt", "[", "i", "]"}]}], "\[IndentingNewLine]", - "}"}]}], "\[IndentingNewLine]", "]"}]}]}], - "\[IndentingNewLine]", "]"}]}]}], " ", - RowBox[{"(*", " ", - RowBox[{"end", " ", "whether", " ", "reuse", " ", "qubit"}], " ", - "*)"}], "\[IndentingNewLine]", "]"}]}], " ", - RowBox[{"(*", " ", - RowBox[{"end", " ", "which", " ", "decomposition"}], " ", "*)"}], - "\[IndentingNewLine]", "]"}], ";", " ", - RowBox[{"(*", " ", - RowBox[{"end", " ", "for", " ", "loop"}], " ", "*)"}], - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"DecMethod", "=", - RowBox[{"ChooseDecMethod", "[", - RowBox[{"OptionValue", "[", "DecomposeLastIso", "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"AppendTo", "[", - RowBox[{"gateSequence", ",", " ", "\[IndentingNewLine]", - RowBox[{"CTRLST", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", "loopNum"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"DecMethod", "[", - RowBox[{"#", ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"loopNum", "+", "1"}], ",", - RowBox[{"loopNum", "+", "l", "+", "m"}]}], "]"}]}], "]"}], - "&"}], ",", " ", "qList"}], "]"}]}], "\[IndentingNewLine]", - "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", - RowBox[{"Return", "[", "gateSequence", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.7665811982668424`*^9, 3.7665812110087795`*^9}, { - 3.766581619785474*^9, 3.7665816344233427`*^9}, {3.766581775880185*^9, - 3.7665818205193624`*^9}, {3.7665818987066283`*^9, - 3.7665819770412207`*^9}, {3.7665820764476123`*^9, - 3.7665821329356017`*^9}, {3.7665821789136934`*^9, - 3.7665822377284665`*^9}, {3.766582268616893*^9, 3.7665822780885725`*^9}, { - 3.766582411457036*^9, 3.7665824717917447`*^9}, {3.7665825030641713`*^9, - 3.7665825764250374`*^9}, {3.7665848484588118`*^9, 3.766584848494714*^9}, { - 3.766591265623946*^9, 3.7665912874057455`*^9}, {3.766591446062413*^9, - 3.7665914526936855`*^9}, {3.766591529374693*^9, 3.7665915345568466`*^9}, { - 3.7665915692471113`*^9, 3.7665916674148564`*^9}, {3.76659188259067*^9, - 3.7665918826784363`*^9}, {3.766591921431836*^9, 3.766591940062032*^9}, { - 3.7665919823679376`*^9, 3.7665920229424973`*^9}, {3.7665920831734533`*^9, - 3.7665920847741747`*^9}, {3.766592134798443*^9, 3.766592153557295*^9}, { - 3.7665921849595723`*^9, 3.7665921899173284`*^9}, {3.7665922273662434`*^9, - 3.7665922341590567`*^9}, {3.766592297325202*^9, 3.766592361541536*^9}, { - 3.766592432948642*^9, 3.766592468944413*^9}, {3.7665925012540407`*^9, - 3.766592505333136*^9}, {3.766593699814333*^9, 3.7665938628866973`*^9}, { - 3.7665939092957726`*^9, 3.7665940392783365`*^9}, {3.766594081823598*^9, - 3.766594082126789*^9}, {3.7665941298003426`*^9, 3.7665942099610863`*^9}, { - 3.766594308688158*^9, 3.7665943216059427`*^9}, {3.7665943763825073`*^9, - 3.766594403646638*^9}, {3.7665944358635125`*^9, 3.7665945699670334`*^9}, { - 3.7665946540243206`*^9, 3.7665946674474397`*^9}, {3.766594709463953*^9, - 3.7665947121836815`*^9}, {3.766594757025811*^9, 3.766594882297595*^9}, { - 3.766594959197019*^9, 3.7665949953792915`*^9}, {3.766595049000944*^9, - 3.7665951237291746`*^9}, {3.7665951785875263`*^9, - 3.7665951862560253`*^9}, {3.766595247072443*^9, 3.766595288377023*^9}, { - 3.7665953489321704`*^9, 3.7665954784987993`*^9}, {3.7665955708289757`*^9, - 3.766595694086472*^9}, {3.7665957364711647`*^9, 3.7665957718904896`*^9}, { - 3.7665958416739674`*^9, 3.766595865952035*^9}, {3.7665959436104326`*^9, - 3.7665959491037464`*^9}, {3.766596057017265*^9, 3.766596116135255*^9}, { - 3.7665961534744086`*^9, 3.7665962038078527`*^9}, {3.766596253121052*^9, - 3.7665963033597817`*^9}, 3.7665963353702083`*^9, {3.766596384089965*^9, - 3.76659656035176*^9}, {3.766596678674448*^9, 3.76659670382225*^9}, { - 3.7665967374892473`*^9, 3.766596820152421*^9}, {3.7665969034357796`*^9, - 3.766596999041196*^9}, {3.7665970869452095`*^9, 3.766597119929035*^9}, { - 3.7665974170966573`*^9, 3.766597447634031*^9}, {3.766597495849169*^9, - 3.7665975076092353`*^9}, {3.7665975507279935`*^9, - 3.7665977640516844`*^9}, {3.7665978357639747`*^9, 3.76659785781702*^9}, { - 3.7665979878914986`*^9, 3.766598007842165*^9}, {3.7665981016663437`*^9, - 3.7665981090176897`*^9}, {3.766598171185497*^9, 3.7665982383050795`*^9}, { - 3.7665985870836844`*^9, 3.766598589817404*^9}, {3.7665987154505196`*^9, - 3.7665987771216736`*^9}, {3.7674329273057675`*^9, 3.767433001984829*^9}, { - 3.767433058311113*^9, 3.7674330622106514`*^9}, {3.7674330973384385`*^9, - 3.7674331043869076`*^9}, {3.767433240675272*^9, 3.7674332627181053`*^9}, { - 3.767433315111947*^9, 3.767433316489848*^9}, {3.7674343820168777`*^9, - 3.7674344617855587`*^9}, {3.7674345662623816`*^9, - 3.7674348604973974`*^9}, {3.767434910544444*^9, 3.7674349477554617`*^9}, { - 3.7674350483225746`*^9, 3.7674350872584567`*^9}, {3.7674351575706434`*^9, - 3.767435168983175*^9}, {3.7674352053951683`*^9, 3.767435205963521*^9}, { - 3.7674352446495113`*^9, 3.767435260508898*^9}, {3.7674354113590784`*^9, - 3.7674354180313826`*^9}, {3.767436925393983*^9, 3.7674369265028734`*^9}, { - 3.7674391842688227`*^9, 3.7674391996164327`*^9}, {3.7674392447270317`*^9, - 3.767439286098486*^9}, {3.767439384702837*^9, 3.7674394821563063`*^9}, { - 3.7674395537145863`*^9, 3.767439553738364*^9}, {3.7674396297952394`*^9, - 3.7674396628320494`*^9}, {3.767440685107992*^9, 3.767440691699963*^9}, { - 3.7689999875441217`*^9, 3.7690000317528076`*^9}, {3.7690103856535697`*^9, - 3.7690104231891613`*^9}, {3.769010719795543*^9, 3.769010796934086*^9}, { - 3.7690109149563103`*^9, 3.7690109581418023`*^9}, {3.769011024243966*^9, - 3.769011045652687*^9}, {3.769011088910946*^9, 3.7690112787360554`*^9}, { - 3.769011380012113*^9, 3.769011471372706*^9}, {3.76901198520442*^9, - 3.7690121625007706`*^9}, {3.769013075586748*^9, 3.7690131923862476`*^9}, { - 3.769013223216756*^9, 3.7690132233683486`*^9}, {3.7690133446099586`*^9, - 3.769013406034613*^9}, {3.7690134387919683`*^9, 3.7690134472403646`*^9}, { - 3.769013702367876*^9, 3.7690138950034666`*^9}, {3.769014350618451*^9, - 3.769014356271325*^9}, {3.7690147081837597`*^9, 3.7690147116315355`*^9}, { - 3.769015006181808*^9, 3.769015019340603*^9}, {3.7720286576350994`*^9, - 3.772028673986709*^9}, {3.772028714668262*^9, 3.7720287168686104`*^9}, { - 3.772028970812748*^9, - 3.772028976667965*^9}},ExpressionUUID->"e1c79a07-32a8-4d76-a312-\ -1814641fe3e5"] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Tests", "Section", - CellChangeTimes->{{3.766584346105257*^9, - 3.7665843523924475`*^9}},ExpressionUUID->"b02dfa1d-28bc-471f-824c-\ -f84d11f65d5a"], - -Cell[CellGroupData[{ - -Cell["Test for the Split functions", "Subsection", - CellChangeTimes->{{3.766584355546017*^9, 3.7665843765259514`*^9}, - 3.7665848485336113`*^9, - 3.766599173173456*^9},ExpressionUUID->"2a2efca1-a05b-4ca2-b092-\ -a8965083ee65"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"TestReducedCSDSplit", "[", "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "m", ",", "n", ",", "v", ",", "m1", ",", "m2", ",", "m3", ",", "rotList", - ",", "u1", ",", "u2", ",", "c", ",", "s", ",", ",", "q", ",", - "reducedDim"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{"2", "m"}], "\[LessEqual]", - RowBox[{ - "n", " ", "and", " ", "n", " ", "must", " ", "be", " ", "even"}]}], - "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", "True"}], ";", "\[IndentingNewLine]", - RowBox[{"m", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"2", ",", "10"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"n", "=", - RowBox[{ - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"2", "*", "m"}], ",", "30"}], "}"}], "]"}], "*", "2"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"m", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"test", " ", "without", " ", "EfficientRepresentation"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"m3", ",", "m2", ",", "m1"}], "}"}], " ", "=", " ", - RowBox[{"ReducedCSDSplit", "[", "v", "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{"v", "-", - RowBox[{"m1", ".", "m2", ".", "m3"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"Print", "[", "\"\\"", "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"test", " ", "with", " ", "EfficientRepresentation"}], " ", - "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q", ",", "rotList", ",", - RowBox[{"{", - RowBox[{"u1", ",", "u2"}], "}"}]}], "}"}], "=", - RowBox[{"ReducedCSDSplit", "[", - RowBox[{"v", ",", " ", - RowBox[{"EfficientRepresentation", "\[Rule]", "True"}]}], "]"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"c", "=", - RowBox[{"DiagonalMatrix", "[", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}], "&"}], ",", "rotList"}], - "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"s", "=", - RowBox[{"DiagonalMatrix", "[", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", - RowBox[{"1", ",", "2"}], "]"}], "]"}], "&"}], ",", "rotList"}], - "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"reducedDim", " ", "=", " ", - RowBox[{ - RowBox[{"Dimensions", "[", "s", "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"m3", "=", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "q", "}"}], ",", - RowBox[{"{", - RowBox[{"SparseArray", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"reducedDim", ",", "reducedDim"}], "}"}]}], "]"}], - "}"}]}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"m2", "=", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"c", ",", "s"}], "}"}], ",", - RowBox[{"{", - RowBox[{"s", ",", "c"}], "}"}]}], "}"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"m1", "=", - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"u1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "u2"}], "}"}]}], "}"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{"v", "-", - RowBox[{"m1", ".", "m2", ".", "m3"}]}], "]"}], ",", - "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"return", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{"result", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", "\"\\"", "]"}], ";", - " ", - RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7665846660459614`*^9, 3.7665847816718597`*^9}, { - 3.766584848555552*^9, 3.766584848560539*^9}, {3.766585194416991*^9, - 3.766585260152951*^9}, {3.7689867057804594`*^9, 3.768986762177565*^9}, { - 3.768987178419902*^9, 3.768987203302307*^9}, {3.768988351916609*^9, - 3.768988352230774*^9}, {3.7689884095613413`*^9, 3.768988468127643*^9}, { - 3.768988670497406*^9, 3.7689886954576235`*^9}, {3.76898882426506*^9, - 3.7689888245203476`*^9}, {3.770889533264018*^9, 3.7708895545098743`*^9}, { - 3.770889602919665*^9, 3.770889738375421*^9}, {3.7708899111669893`*^9, - 3.7708900654141445`*^9}, {3.770890240742178*^9, 3.7708902622410965`*^9}, { - 3.7708902962921104`*^9, 3.770890333192399*^9}, {3.770890404958663*^9, - 3.770890446574895*^9}, {3.7708904798772087`*^9, 3.7708905222390995`*^9}, { - 3.7708905577994595`*^9, 3.7708906587423763`*^9}, 3.7708915891016455`*^9, { - 3.770891714518305*^9, 3.770891766744281*^9}, {3.7708935994183426`*^9, - 3.7708935996975956`*^9}}, - CellLabel->"In[17]:=",ExpressionUUID->"e304fb25-1d9c-412d-85d4-14613c055d7a"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestReducedCSDSplit", "[", "]"}]], "Input", - CellChangeTimes->{{3.768988518301433*^9, 3.768988525951964*^9}}, - CellLabel->"In[18]:=",ExpressionUUID->"c85804b2-328d-416a-808f-455205eda651"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.76898852659624*^9, 3.768988530972578*^9}, { - 3.768988594767914*^9, 3.7689886135815573`*^9}, {3.7689886633864083`*^9, - 3.7689886974482727`*^9}, {3.768988819143733*^9, 3.768988841560755*^9}, - 3.7697082302071333`*^9, 3.7697083609008923`*^9, 3.7697084242600136`*^9, - 3.7697098425129356`*^9, {3.770800406817214*^9, 3.7708004322009087`*^9}, { - 3.7708895472206135`*^9, 3.7708895576838226`*^9}, 3.7708903386826954`*^9, { - 3.770890419010635*^9, 3.7708904479973593`*^9}, 3.7708904831170616`*^9, - 3.7708905245824633`*^9, 3.7708905649620185`*^9, {3.7708906237072678`*^9, - 3.7708906597773294`*^9}, 3.7708914612830553`*^9, 3.7708915268453712`*^9, { - 3.7708917558653107`*^9, 3.770891769491496*^9}, {3.770891815715897*^9, - 3.770891857253543*^9}, 3.770891915523162*^9, 3.7708919804481983`*^9, - 3.7708920167103815`*^9, 3.770892053164715*^9, 3.7708921256904335`*^9, { - 3.770892169264842*^9, 3.7708921824496236`*^9}, {3.770892236771125*^9, - 3.7708922546074266`*^9}, {3.770892570213071*^9, 3.7708925974502163`*^9}, { - 3.7708935954794235`*^9, 3.770893602432184*^9}, 3.772125450853467*^9, - 3.772125674836503*^9, 3.7721257264337387`*^9, {3.772125903611442*^9, - 3.772125925464552*^9}, {3.7721259566469755`*^9, 3.7721259787073727`*^9}, { - 3.772126366810758*^9, 3.7721263867865353`*^9}, {3.7721264285189953`*^9, - 3.772126436782191*^9}, {3.7721264833047953`*^9, 3.772126496637941*^9}, { - 3.772126621358186*^9, 3.7721266420531783`*^9}, 3.779634155317728*^9}, - CellLabel->"Out[18]=",ExpressionUUID->"c897db74-e96b-458f-a101-75389481d390"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"TestQRSplit", "[", "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "result", ",", "m", ",", "n", ",", "v", ",", "r", ",", "q1", ",", "q2"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", "True"}], ";", "\[IndentingNewLine]", - RowBox[{"m", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"2", ",", "10"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"n", "=", - RowBox[{ - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"2", "*", "m"}], ",", "30"}], "}"}], "]"}], "*", "2"}]}], - ";", "\[IndentingNewLine]", - RowBox[{"v", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"m", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"r", ",", - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}]}], "}"}], " ", "=", " ", - RowBox[{"QRSplit", "[", "v", "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{"v", "-", - RowBox[{ - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "q2"}], "}"}]}], "}"}], "]"}], ".", "r"}]}], - "]"}], ",", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{"result", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", "\"\\"", "]"}], ";", - " ", - RowBox[{"Return", " ", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7665848284343333`*^9, 3.7665848619986153`*^9}, { - 3.766584905023596*^9, 3.7665849355110917`*^9}, {3.7665849675913315`*^9, - 3.7665851912315063`*^9}, {3.7665852904150205`*^9, 3.7665853755364637`*^9}, { - 3.7665854417284856`*^9, 3.7665855325606756`*^9}, {3.7674327190314503`*^9, - 3.7674327195784035`*^9}, {3.767432793323058*^9, 3.767432821094531*^9}}, - CellLabel->"In[19]:=",ExpressionUUID->"46ae33b0-8443-4ffe-b406-153c7b476d98"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestQRSplit", "[", "]"}]], "Input", - CellLabel->"In[20]:=",ExpressionUUID->"b6e76dc2-d410-432d-8dc4-87d24e433d44"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.766585353053567*^9, 3.766585378135491*^9}, - 3.766585482316984*^9, 3.766585534260481*^9, 3.7674327129805813`*^9, - 3.7674328250115333`*^9, {3.7689885045931015`*^9, 3.768988507690789*^9}, - 3.7689998743838587`*^9, 3.76970823025301*^9, 3.7697083609503856`*^9, - 3.7697084243109055`*^9, 3.7697098425657964`*^9, {3.7708004098057547`*^9, - 3.7708004322328234`*^9}, 3.772125450878359*^9, {3.772126489787347*^9, - 3.7721264966618767`*^9}, {3.7721266213831196`*^9, 3.7721266420770903`*^9}, - 3.7796341592016416`*^9}, - CellLabel->"Out[20]=",ExpressionUUID->"10d515d2-f494-4138-a9b6-94e3a197be8e"] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Test Reduced CSD decomposition", "Subsection", - CellChangeTimes->{{3.7665855457158575`*^9, - 3.7665855761342564`*^9}},ExpressionUUID->"f1bf7c60-e764-4d6a-b3ea-\ -35f797a60804"], - -Cell[CellGroupData[{ - -Cell["Example1 (reuse qubit) n=2,m=1,k=1", "Subsubsection", - CellChangeTimes->{{3.7665774119114876`*^9, 3.7665774202582064`*^9}, { - 3.7674339073536777`*^9, - 3.7674339309547105`*^9}},ExpressionUUID->"0f40fa43-f7a9-49df-9f62-\ -89ac7789b735"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.766333712554659*^9, 3.7663337216144323`*^9}, { - 3.766335015462319*^9, 3.766335015573023*^9}, {3.7663355964537024`*^9, - 3.7663356093023815`*^9}, {3.766337755407365*^9, 3.7663377555410175`*^9}, - 3.76633962691089*^9, 3.7663397065581903`*^9, 3.766340787222144*^9, - 3.7663408373760347`*^9, 3.766342288093828*^9, {3.7663424555071993`*^9, - 3.766342466628435*^9}, 3.7663427493833647`*^9, {3.766342983790574*^9, - 3.7663429935095863`*^9}, {3.7665756385086913`*^9, 3.7665756656361394`*^9}, - 3.766575783131547*^9}, - CellLabel->"In[21]:=",ExpressionUUID->"899d248c-0c5a-4368-b9d4-d0a838593cd7"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.4997711470739363`", "0.095578989379979`"}, - {"0.6394848890501866`", - RowBox[{"-", "0.01780941070410047`"}]}, - {"0.24889553864521713`", "0.43843264463502085`"}, - { - RowBox[{"-", "0.17251687562561374`"}], "0.5841795178256499`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.766333713915021*^9, 3.7663337223315153`*^9}, - 3.7663350160836573`*^9, {3.766335600169801*^9, 3.7663356102877464`*^9}, - 3.7663377176861954`*^9, {3.766337755969861*^9, 3.7663377718474054`*^9}, { - 3.7663378369483657`*^9, 3.7663378684740963`*^9}, {3.7663396272978306`*^9, - 3.7663396388519354`*^9}, 3.7663397068972836`*^9, 3.7663401069530573`*^9, - 3.7663402211018295`*^9, 3.7663403238022113`*^9, 3.766340428904173*^9, - 3.7663404653796406`*^9, 3.7663407879053173`*^9, 3.7663408382915874`*^9, - 3.766342292852105*^9, 3.76634246715403*^9, 3.7663427502500467`*^9, - 3.76634289545079*^9, {3.766342985802194*^9, 3.7663429944889665`*^9}, - 3.7663432208267484`*^9, 3.7665717762284293`*^9, 3.76657412703884*^9, { - 3.766575640436507*^9, 3.766575666436002*^9}, 3.766575783849626*^9, - 3.7665758454499493`*^9, 3.766576211483008*^9, 3.7665820369412255`*^9, - 3.766596881845497*^9, 3.7674328399519067`*^9, 3.7674329411285715`*^9, - 3.7674375146122665`*^9, 3.767441070248887*^9, 3.7690115009575496`*^9, - 3.769011594581498*^9, 3.769013989427829*^9, 3.769018852602543*^9, - 3.7690188836534653`*^9, 3.769703293833984*^9, 3.769703337902712*^9, - 3.769704181787656*^9, 3.7697082302814713`*^9, 3.769708360980277*^9, - 3.769708424341823*^9, 3.769709842591755*^9, {3.770800412739735*^9, - 3.7708004322517724`*^9}, 3.772125450911271*^9, 3.772126496676837*^9, { - 3.772126621400074*^9, 3.7721266421072063`*^9}, 3.779634170037143*^9}, - CellLabel-> - "During evaluation of \ -In[21]:=",ExpressionUUID->"8ab5fe66-1270-4a79-bbfd-c6f42ed009d2"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.45428019362486993`", "0.12784518519300458`"}, - { - RowBox[{"-", "0.19988193364984352`"}], "0.5970954525170556`"}, - {"0.04026291558302847`", "0.20220638577843986`"}, - {"0.040403361308931685`", "0.20809564028985983`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.766333713915021*^9, 3.7663337223315153`*^9}, - 3.7663350160836573`*^9, {3.766335600169801*^9, 3.7663356102877464`*^9}, - 3.7663377176861954`*^9, {3.766337755969861*^9, 3.7663377718474054`*^9}, { - 3.7663378369483657`*^9, 3.7663378684740963`*^9}, {3.7663396272978306`*^9, - 3.7663396388519354`*^9}, 3.7663397068972836`*^9, 3.7663401069530573`*^9, - 3.7663402211018295`*^9, 3.7663403238022113`*^9, 3.766340428904173*^9, - 3.7663404653796406`*^9, 3.7663407879053173`*^9, 3.7663408382915874`*^9, - 3.766342292852105*^9, 3.76634246715403*^9, 3.7663427502500467`*^9, - 3.76634289545079*^9, {3.766342985802194*^9, 3.7663429944889665`*^9}, - 3.7663432208267484`*^9, 3.7665717762284293`*^9, 3.76657412703884*^9, { - 3.766575640436507*^9, 3.766575666436002*^9}, 3.766575783849626*^9, - 3.7665758454499493`*^9, 3.766576211483008*^9, 3.7665820369412255`*^9, - 3.766596881845497*^9, 3.7674328399519067`*^9, 3.7674329411285715`*^9, - 3.7674375146122665`*^9, 3.767441070248887*^9, 3.7690115009575496`*^9, - 3.769011594581498*^9, 3.769013989427829*^9, 3.769018852602543*^9, - 3.7690188836534653`*^9, 3.769703293833984*^9, 3.769703337902712*^9, - 3.769704181787656*^9, 3.7697082302814713`*^9, 3.769708360980277*^9, - 3.769708424341823*^9, 3.769709842591755*^9, {3.770800412739735*^9, - 3.7708004322517724`*^9}, 3.772125450911271*^9, 3.772126496676837*^9, { - 3.772126621400074*^9, 3.7721266421072063`*^9}, 3.779634170054097*^9}, - CellLabel-> - "During evaluation of \ -In[21]:=",ExpressionUUID->"3667c2b7-8fc8-4441-bdbb-651227ff7aa0"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DoNotReuseAncilla", "->", "False"}]}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7663401374076233`*^9, 3.7663401493806076`*^9}, { - 3.7663406072024155`*^9, 3.766340629564616*^9}, 3.766342307390231*^9, - 3.766342396110996*^9, {3.766573880787141*^9, 3.7665739190259237`*^9}, - 3.7665740602184715`*^9, {3.7665742140512342`*^9, 3.76657425788206*^9}, { - 3.7665753909793406`*^9, 3.766575392499277*^9}, 3.767433304109812*^9, { - 3.76743506677325*^9, 3.7674350785940804`*^9}, {3.767440842489877*^9, - 3.7674408441010723`*^9}, {3.767441073824912*^9, 3.7674410982729425`*^9}}, - CellLabel->"In[22]:=",ExpressionUUID->"582b2c41-feb5-46c3-b8a0-0584cd1ab818"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]], "Input", - CellLabel->"In[23]:=",ExpressionUUID->"9fd4fa04-0c82-4a9e-b64b-1f0add6a54c3"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.734573283355779`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126497039817*^9, {3.772126621753461*^9, 3.772126642449233*^9}, - 3.779634173756056*^9}, - CellLabel-> - "During evaluation of \ -In[23]:=",ExpressionUUID->"ec53ae30-040b-43ea-b76b-55ba58741d6c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.5033205122294484`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0247593396426542`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126497039817*^9, {3.772126621753461*^9, 3.772126642449233*^9}, - 3.7796341737650337`*^9}, - CellLabel-> - "During evaluation of \ -In[23]:=",ExpressionUUID->"b6bedd6e-c728-432d-b3bb-1cad7fdcf749"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126497039817*^9, {3.772126621753461*^9, 3.772126642449233*^9}, - 3.7796341737765226`*^9}, - CellLabel-> - "During evaluation of \ -In[23]:=",ExpressionUUID->"0b926c9d-e4c9-4bcd-9b4c-82ef2b0c8cb5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.039696655533428`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948952`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.43429043108990173`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3313454204907873`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3683128446497101`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0806374406013466`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.854471358826586`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.44280166293391`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4755353199246612`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.145787835527863`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.5209393912589673`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.4795359356889278`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7327844885157924`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126497039817*^9, {3.772126621753461*^9, 3.772126642449233*^9}, - 3.779634173793477*^9}, - CellLabel-> - "During evaluation of \ -In[23]:=",ExpressionUUID->"5b1629dc-b025-447b-8aa9-515ad3b587c7"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example2 (reuse qubits) n=1, m=2, k=4, l=1", "Subsubsection", - CellChangeTimes->{{3.76657742354143*^9, 3.766577430234536*^9}, { - 3.7674414915129547`*^9, - 3.7674415141282196`*^9}},ExpressionUUID->"166c61ca-2b85-4882-ac90-\ -06cfde79534d"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "2", ",", "16"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7665762788664417`*^9, 3.7665762859395337`*^9}, { - 3.7665764137887516`*^9, 3.766576431263038*^9}, {3.7674354008618374`*^9, - 3.767435401450264*^9}, {3.767442839492713*^9, 3.7674428407576847`*^9}}, - CellLabel->"In[24]:=",ExpressionUUID->"648f7801-ea78-4b91-b185-630a9d4c69cf"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7674420583748116`*^9, 3.767442058764325*^9}}, - CellLabel->"In[25]:=",ExpressionUUID->"5b49a435-ac7f-43bf-b8bd-9bdca9e4fdf1"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5108086851463863`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6245623595119367`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948957`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.614596842674569`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.0591142187106115`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.46766912767268`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.906780390830233`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.779634193025812*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"9f948fb0-eb23-478f-8441-ed038b8990c1"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.062369922384918`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6793451860265098`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.408878708773279`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2446177865865622`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.779634193040769*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"28265972-2370-46f6-bce4-41bdd81af119"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.7796341930477543`*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"f267ac2b-c60b-4337-b792-414ad1ffd94d"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4170919375320263`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.6797475712722632`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.447169942377857`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.349759326315211`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.428546343505517`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.286283716598166`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8448118479436757`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.224791422229283`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.401473102630349`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.9644440298098229`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.29713730805843225`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7949345437206767`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.7796341930637074`*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"e6545cfc-77da-4b13-a144-8ab3535f0fc8"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6509182430191616`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.715923623530266`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.382673535481766`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.191518686886959`", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.045842335727193`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6667023573046864`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.414228784919759`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "0.8337164506558132`", ",", "3"}], "}"}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.7796341930766754`*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"4dc2dbb1-03f2-47ad-beee-82f8949a9b35"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "2", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.7796341930816607`*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"df92b177-7a34-442a-8a14-0441b82c89bf"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3066276076860697`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.126013670877555`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267949157`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.2599191189944765`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.114325295582627`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.982359384873995`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.1741596042074525`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7664124032701953`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.26681649926394746`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.665675666476244`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.6842693946276084`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.22087419617451`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8274943341407732`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.913837936516971`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.485498318954454`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.107743349099212`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.959759208544659`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.044712564959125`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0833197313667697`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267949003`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.110592130893821`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.2472932465957093`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.759937878630444`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.2191195805073445`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179584`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948992`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.883513175526982`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.40771934149456845`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384688`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.957761738981599`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.105702963832531`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.181962451932812`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.949484971924138`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.4629336125545374`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.098065636773982`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9956621557770989`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.5143449666455275`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.030603465624327697`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5800830241842165`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.965362240423002`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.391535476674951`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948932`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3005605188653306`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.741366296345213`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.167693591506492`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948863`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.681336377526636`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.843909120015686`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.069235718950173`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6837252528304116`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.074768112750001`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535898064`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.440684456363245`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.46217750107449`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.97672937417673`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.373603403823988`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.8133905640580044`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0517407238288754`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.196735546345966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.553204064890653`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.629984615087407`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.15444443928291984`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6375386435963881`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.262028535270184`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.760697037606465`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.16342591132507578`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9334441602776186`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.5284384809488265`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.652262415656625`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1599863560928783`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.318990174535129`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.586015063329432`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6097588598971614`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.45846440776964`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.407079121019726`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.9808447949055044`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.265934563308118`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974484`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.30486176348677874`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8417080484543182`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.5191001042698034`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6757254838019422`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.260594632331388`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.139689004052605`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.155098281085193`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5048266360470173`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.596210858596944`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7659988180446571`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.689926881390225`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.57013009326893`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7875529358758586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3530110264786983`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.685870890414391`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8959295179944977`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.25003456910302`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.352823719016278`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.2881936588489182`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0170757067479441`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.3573180709419787`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0798466136160747`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.9548876225339766`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.260383314556561`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5932176832480539`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5462662324914541`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.289588131285131`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.249277058574482`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.311008487103057`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.457903008291137`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.561369726064839`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5344734399144555`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.988172394150915`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.761592649515801`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1756665520553087`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.8136786413876145`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.518762678525448`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.236347789844547`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.222921731781304`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782138`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.7726525557829715`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3209932102038437`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.039960517709586`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782138`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0984303325125353`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.02144167288634`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.550819595506193`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.019039152728273`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.279578111979603`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.2393021521164878`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6227651668939957`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.9055794008292845`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.413474672643708`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.132561337674171`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.9134369775389208`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126502604491*^9, {3.7721266272918434`*^9, 3.772126647988301*^9}, - 3.7796341931544657`*^9}, - CellLabel-> - "During evaluation of \ -In[25]:=",ExpressionUUID->"67f15a3a-1ccc-49ce-a6fa-c869f9059252"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example3 ", "Subsubsection", - CellChangeTimes->{{3.766577441126419*^9, - 3.7665774579115467`*^9}},ExpressionUUID->"70731bb5-c9ae-44dc-8d2b-\ -6ff8e610e7d8"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellLabel->"In[27]:=",ExpressionUUID->"2bc8d0ec-6fc1-4d40-918e-083215024db2"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.5441856001253048`", - RowBox[{"-", "0.13673541545758908`"}]}, - {"0.45200118256856364`", "0.10342470164602878`"}, - {"0.01173805143367252`", "0.23583427699933923`"}, - {"0.5494653641427596`", - RowBox[{"-", "0.18243808249317067`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.766577487608159*^9, 3.766578161287359*^9, 3.767433851804544*^9, - 3.769011672323495*^9, 3.7697082361590643`*^9, 3.769708366757369*^9, - 3.769708430213092*^9, 3.769709848553425*^9, 3.770800438009224*^9, - 3.7721254511456676`*^9, 3.7721265026872697`*^9, {3.772126627374199*^9, - 3.7721266481073046`*^9}, 3.7796341969374104`*^9}, - CellLabel-> - "During evaluation of \ -In[27]:=",ExpressionUUID->"7206fda4-6239-4baa-84f1-12c9598ced1a"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.32805882529538055`", "0.38258559206501797`"}, - {"0.15860832758559928`", - RowBox[{"-", "0.02967597130884727`"}]}, - { - RowBox[{"-", "0.1630283555426065`"}], "0.6468895761091942`"}, - {"0.19531911371976593`", "0.5621270095715805`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.766577487608159*^9, 3.766578161287359*^9, 3.767433851804544*^9, - 3.769011672323495*^9, 3.7697082361590643`*^9, 3.769708366757369*^9, - 3.769708430213092*^9, 3.769709848553425*^9, 3.770800438009224*^9, - 3.7721254511456676`*^9, 3.7721265026872697`*^9, {3.772126627374199*^9, - 3.7721266481073046`*^9}, 3.7796341969503727`*^9}, - CellLabel-> - "During evaluation of \ -In[27]:=",ExpressionUUID->"3b9c6d44-082b-4540-82e4-c57911b68522"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7665774853551826`*^9, 3.7665774989717836`*^9}, { - 3.767441202228734*^9, 3.7674412043101454`*^9}}, - CellLabel->"In[28]:=",ExpressionUUID->"84946456-c973-4750-a6ae-458d53599b37"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "2.7909206418743437`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{ - 3.772126503037871*^9, {3.7721266277131786`*^9, 3.772126648450858*^9}, - 3.7796341989450874`*^9}, - CellLabel-> - "During evaluation of \ -In[28]:=",ExpressionUUID->"a1e2f480-7f70-43f5-bfc2-3d957cb90fb8"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.5111179612741306`", ",", "1"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8641021941658058`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126503037871*^9, {3.7721266277131786`*^9, 3.772126648450858*^9}, - 3.779634198953066*^9}, - CellLabel-> - "During evaluation of \ -In[28]:=",ExpressionUUID->"b528faca-e6e4-417f-9e1b-e2a4d81d9e66"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126503037871*^9, {3.7721266277131786`*^9, 3.772126648450858*^9}, - 3.7796341989620404`*^9}, - CellLabel-> - "During evaluation of \ -In[28]:=",ExpressionUUID->"165ebaea-0dff-4175-a54e-a74cf318c885"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.243981768453335`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "6.229314195686335`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.6644272761434351`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5223407289662763`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.8485533811479122`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948974`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.577520016107684`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.468186691111187`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384691`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.30396406167703244`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7605399726962974`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3373221993644504`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8547103218324854`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7136697176530145`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.772126503037871*^9, {3.7721266277131786`*^9, 3.772126648450858*^9}, - 3.7796341989750123`*^9}, - CellLabel-> - "During evaluation of \ -In[28]:=",ExpressionUUID->"0cd9ca3f-1257-400d-9d93-00c80b15bebf"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example4", "Subsubsection", - CellChangeTimes->{{3.7665787521737967`*^9, - 3.7665787713874435`*^9}},ExpressionUUID->"af89b655-5ef3-413d-9a28-\ -7282927f3fbe"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "4", ",", "8"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7665777584112206`*^9, 3.766577763708061*^9}, { - 3.766577885134451*^9, 3.766577908333433*^9}, {3.7665783916134787`*^9, - 3.766578399411631*^9}, {3.7665784792232704`*^9, 3.766578487427555*^9}, - 3.7674428801632166`*^9}, - CellLabel->"In[30]:=",ExpressionUUID->"fe6b7694-da49-4107-b3a0-c4ac1c7d5fab"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}], ";"}]}], "Input", - CellChangeTimes->{{3.7665777159587097`*^9, 3.7665777205085473`*^9}, { - 3.7665777765317793`*^9, 3.7665777850280666`*^9}}, - CellLabel->"In[31]:=",ExpressionUUID->"963f98d8-31b2-4abf-9150-e2e3391f8298"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.504781773432047`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.0947571801694904`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.1620885067362385`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4632360319558482`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5612186918289819`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9673836406461993`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "6"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.779634223811608*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"f3156549-2b78-4d73-8995-7c7f136b0c40"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0771542783853683`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.7701256816963318`", ",", "1"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.555836597670681`", ",", "1"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.3151368021282273`", ",", "1"}], "}"}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.779634223825571*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"9a49262f-a426-49f6-85fc-8258c3dd3d0b"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.7796342238355446`*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"ab8208f5-fd13-415f-b0fe-a132c3b5ba90"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.493282827292166`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3434482011839526`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.0920208188953735`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.996238230072029`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.254882541949851`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.659669860140007`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "6"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.558046774008743`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.2087670556585195`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.265059869498144`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.19039062217162`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1120218953387742`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6241660203651829`", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "6"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.779634223852501*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"0168b029-cafb-4cdd-bd2c-3f6972134f93"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.3030293394955046`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.687611180829437`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "0.7074204456779071`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4458709726307607`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.9693503230083924`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.6232239319137944`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1978233824681455`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9454694590166023`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.7796342238644667`*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"e4510147-50c8-4d60-9b3b-b99db1413af3"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.7796342238704505`*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"cc3a56e4-68ee-4641-980c-2e8c6d922c87"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794899`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.3693451425306722`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.498776248631082`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948954`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.074070578534956`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.717983337218639`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.340634638707369`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4588467655499213`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.25210699938824`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948999`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948961`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.130323945193486`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6679040862989981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.9605167704181303`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.079710592554183`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.167586020195816`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.164481734276513`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589787`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.6343151333962982`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.17388665909475987`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.170322133759736`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.249812730421052`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.4081716914269817`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.863935390493793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.776638695177265`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.182195472419709`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1983301749087092`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.9514902182795641`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7783936121505663`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.396038784008487`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.376726382946796`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.406794715035118`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.930346142037707`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1375201314451653`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.033562373528751`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.477784791706739`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.023288049205567`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8020779259672209`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.896234326709197`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.465843659720738`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.2730404900671002`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.2930127050379294`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.725032231468999`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.701352142765619`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.037206073181941246`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.024733009589688`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.434885506846007`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.483857883130854`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.747116126077119`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8135457273392046`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.8803072549106714`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.3973758415221482`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974482`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.17342048527274806`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9424189706152539`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.6169675091212485`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974485`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6896332404598112`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.508291880818755`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.710541728364487`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.565868225190566`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.290370927170513`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5267619763033575`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.03229599585982`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0979785079911943`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9799409438274562`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.686899201826694`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.524812210721288`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.044679026023008`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5529036146918225`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948948`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.2462106331376805`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.879856126705671`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.8229639024154736`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.1552628684389499`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.4007533199384476`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2214324844572897`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.303496432105483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.1870922287494443`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8560790428529921`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8026133988624233`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7007601304312451`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.239311187901345`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.253290224762172`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.9133372898197347`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.40281249307885`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.6424288180255979`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0070259447701142`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8114150327326757`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.384836365558429`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.294877365075305`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.883773936064691`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.874341074621816`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.747600017598712`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974482`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.106381616375771`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.094548481830162`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.000135191338289`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.890084745779598`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3506746295011847`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.699973333339838`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.704033447484023`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2709488269770945`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.8137954460271457`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.421720861757146`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.134524669664339`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8150939542275236`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.1150189555577454`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.3882368246210515`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.21237576249066925`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.5736210407047055`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.993947436285037`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.9968633018153445`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5668359190892918`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.378001998066553`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8700336204275511`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.0949115315679896`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5285973040946115`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.31724037090544255`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384691`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.2976386427697262`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.9827901627766038`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.153936781296032`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384646`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.549083880640653`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.40649049081956284`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589834`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.599806689299024`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.854579456610226`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.980384859728802`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2323819981946342`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384695`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.968653401591957`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.558627659536589`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.0896750405111724`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5082850881792782`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179556`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.7721265085791225`*^9, {3.772126632187375*^9, 3.772126653980095*^9}, - 3.7796342239522324`*^9}, - CellLabel-> - "During evaluation of \ -In[31]:=",ExpressionUUID->"cc2d9967-1c81-483d-b6cd-92c1f0a80e38"] -}, Open ]] -}, Open ]] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Test QR decomposition", "Subsection", - CellChangeTimes->{{3.7665857059432364`*^9, - 3.766585725983663*^9}},ExpressionUUID->"e8cd5415-df61-49b4-8ef5-\ -792286136d00"], - -Cell[CellGroupData[{ - -Cell["Example 1 (reuse qubit) n = 2, m = 1, k = 1", "Subsubsection", - CellChangeTimes->{{3.7674419174355516`*^9, - 3.767441951909088*^9}},ExpressionUUID->"2352149d-4b91-46b1-a7b5-\ -275a13b2eb61"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellChangeTimes->{3.76743945433722*^9}, - CellLabel->"In[33]:=",ExpressionUUID->"7acbf3c3-2042-4ce9-9585-adfa6f9427ee"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.3300612963352457`", "0.18067422739549477`"}, - {"0.3297078359094298`", "0.06508931140959495`"}, - { - RowBox[{"-", "0.20229157883184667`"}], "0.7991963679884938`"}, - {"0.3770814790923283`", "0.3539479889507183`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7665919437122736`*^9, 3.7665921936832604`*^9, 3.7665969253691454`*^9, - 3.76743253048674*^9, 3.767436796745864*^9, 3.7674371074018326`*^9, - 3.7674382516422677`*^9, 3.7674387503237066`*^9, {3.7674406996119804`*^9, - 3.767440702834814*^9}, 3.767440759005213*^9, 3.767441291448786*^9, - 3.7690121714578047`*^9, 3.769014117816327*^9, 3.769708241955194*^9, - 3.769708372504819*^9, 3.7697084360235505`*^9, 3.7697098544662285`*^9, - 3.7708004436520042`*^9, 3.772125451351096*^9, 3.772126508691389*^9, - 3.77212665407589*^9, 3.7796342430586557`*^9}, - CellLabel-> - "During evaluation of \ -In[33]:=",ExpressionUUID->"ea55df68-2fae-40f0-8cea-f4e5b19eafdd"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.08426089914914316`", "0.4189765379441981`"}, - {"0.4603899013250589`", - RowBox[{"-", "0.023185278752807292`"}]}, - {"0.5229357475103062`", - RowBox[{"-", "0.15171157108285854`"}]}, - {"0.3266793572740646`", "0.005558264839610028`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7665919437122736`*^9, 3.7665921936832604`*^9, 3.7665969253691454`*^9, - 3.76743253048674*^9, 3.767436796745864*^9, 3.7674371074018326`*^9, - 3.7674382516422677`*^9, 3.7674387503237066`*^9, {3.7674406996119804`*^9, - 3.767440702834814*^9}, 3.767440759005213*^9, 3.767441291448786*^9, - 3.7690121714578047`*^9, 3.769014117816327*^9, 3.769708241955194*^9, - 3.769708372504819*^9, 3.7697084360235505`*^9, 3.7697098544662285`*^9, - 3.7708004436520042`*^9, 3.772125451351096*^9, 3.772126508691389*^9, - 3.77212665407589*^9, 3.7796342430745745`*^9}, - CellLabel-> - "During evaluation of \ -In[33]:=",ExpressionUUID->"ec0aca3a-0792-4078-8808-1ccd190ca0a8"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7665913479698105`*^9, 3.7665913901399097`*^9}, - 3.7665914305568647`*^9, {3.7665914908117833`*^9, 3.766591504050392*^9}, { - 3.7665918022683525`*^9, 3.7665918575725513`*^9}, {3.766591906052977*^9, - 3.7665919065546083`*^9}, {3.7665919528887424`*^9, 3.766591959475134*^9}, { - 3.766592518372278*^9, 3.766592522690734*^9}, {3.7665941085910416`*^9, - 3.766594139291998*^9}, {3.766594693285367*^9, 3.766594694156039*^9}, { - 3.7665958759822197`*^9, 3.766595877116188*^9}, {3.7665977768793917`*^9, - 3.766597777917617*^9}, {3.7674325690336103`*^9, 3.7674325699591775`*^9}, { - 3.7674367546936903`*^9, 3.767436784081429*^9}, {3.767436822802719*^9, - 3.767436873467663*^9}, 3.7674382589051857`*^9, {3.767438379487771*^9, - 3.767438408706781*^9}, 3.767438816691412*^9, {3.7674395769103565`*^9, - 3.7674395776277037`*^9}}, - CellLabel->"In[34]:=",ExpressionUUID->"28554071-027f-41d4-a239-9f9ba926a235"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782137`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.009229547896061`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0092295478960613`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3137392916660227`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3137392916660227`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7706030650624727`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.7690141234163566`*^9, 3.7697082424319277`*^9, - 3.7697083729765644`*^9, 3.769708436519225*^9, 3.769709854981989*^9, - 3.770800444137706*^9, 3.772125451834337*^9, 3.7721265091882772`*^9, - 3.7721266545652924`*^9, 3.7796342458266335`*^9}, - CellLabel-> - "During evaluation of \ -In[34]:=",ExpressionUUID->"a5f176e5-bacf-4439-bf72-9dbdd3f8cbd9"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{3.7690141234163566`*^9, 3.7697082424319277`*^9, - 3.7697083729765644`*^9, 3.769708436519225*^9, 3.769709854981989*^9, - 3.770800444137706*^9, 3.772125451834337*^9, 3.7721265091882772`*^9, - 3.7721266545652924`*^9, 3.779634245833619*^9}, - CellLabel-> - "During evaluation of \ -In[34]:=",ExpressionUUID->"e712d12f-7e4c-49b0-bc76-f967d81b832c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.870207232760732`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7696539153328787`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.754321689160518`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5580301420406228`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9854652958034108`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897944`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.710784350823804`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5149906323828706`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7230161895901246`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.1426317360637235`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.3796670923431484`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7127249067956434`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8947635125938389`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141234163566`*^9, 3.7697082424319277`*^9, - 3.7697083729765644`*^9, 3.769708436519225*^9, 3.769709854981989*^9, - 3.770800444137706*^9, 3.772125451834337*^9, 3.7721265091882772`*^9, - 3.7721266545652924`*^9, 3.779634245851534*^9}, - CellLabel-> - "During evaluation of \ -In[34]:=",ExpressionUUID->"b1247fc9-c1c4-4655-b2f1-3673174eac24"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example 2(reuse qubit) n = 1, m = 2, k = 4, l =1", "Subsubsection", - CellChangeTimes->{{3.767441958982495*^9, - 3.767442003913947*^9}},ExpressionUUID->"08a22a6b-263c-4482-a30e-\ -3c4eb66b5928"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "2", ",", "16"}], "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], - "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7674420362351923`*^9, 3.767442043834205*^9}, { - 3.7674420763325677`*^9, 3.7674420974443064`*^9}, {3.769014409630559*^9, - 3.7690144134593143`*^9}, 3.7690148208626437`*^9, 3.7796342548143015`*^9}, - CellLabel->"In[36]:=",ExpressionUUID->"0b7db2ef-0273-4bb0-9aeb-a4eb4e944d0b"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.359417925469555`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.2519849511503502`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6811886243554561`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589792`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6811886243554535`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7396083334514096`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8896077024394433`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.505587290899269`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7396083334514105`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.29630207667037584`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.29630207667037733`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897944`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0015273351533125`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535898064`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4848781610701485`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.001527335153312`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9026005119913436`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9026005119913445`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5500871969657757`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5500871969657757`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.68750387994144`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0207091298291247`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6875038799414401`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.454833970918325`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11596235587657229`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11596235587657229`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897887`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7735433420329045`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4548339709183256`", ",", "5"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147449493`*^9, 3.7697082479902782`*^9, 3.769708378495612*^9, - 3.7697084421381984`*^9, 3.7697098606407647`*^9, 3.770800449598709*^9, - 3.772125457685274*^9, 3.7721265150250645`*^9, 3.7721266603165503`*^9, - 3.7796342679371915`*^9}, - CellLabel-> - "During evaluation of \ -In[36]:=",ExpressionUUID->"53448b60-9096-414b-a248-1d284548e379"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147449493`*^9, 3.7697082479902782`*^9, 3.769708378495612*^9, - 3.7697084421381984`*^9, 3.7697098606407647`*^9, 3.770800449598709*^9, - 3.772125457685274*^9, 3.7721265150250645`*^9, 3.7721266603165503`*^9, - 3.779634267946168*^9}, - CellLabel-> - "During evaluation of \ -In[36]:=",ExpressionUUID->"6b66a7a7-b290-4eef-a1a2-18b149feae1c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.2831853071795845`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179585`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.2581751934691026`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0345244576842103`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4637281308893137`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4637281308893166`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.316285008240869`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1070681959055844`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9698328934033844`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.316285008240869`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.38101418478414717`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3810141847841495`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3952386531936307`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535898087`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1486086038931942`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3952386531936303`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6859934057198764`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6859934057198764`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5476451705016788`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589795`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.547645170501682`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0128183224203258`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589803`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1184414972965757`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0128183224203258`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5658101175679824`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.00498620922705591`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897785`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.00498620922705591`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2950201737878144`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.707402771157776`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948986`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.08590292412159517`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1995729761265703`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.120441783163054`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.4848934026733014`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5496454563681589`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589794`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5496454563681572`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1169163070120527`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0211508704267414`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2001184547445445`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1169163070120551`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3425608869458268`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3425608869458242`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.840932888055791`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589772`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6736079000421854`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8409328880557916`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1821464945064415`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1821464945064424`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3029300279918307`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3029300279918366`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897896`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.15782763068804692`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589797`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2678662988030631`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.15782763068804692`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4168707768403541`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.1539255499545525`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897962`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.15392554995453805`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.164030210432434`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.724721876749441`", ",", "5"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147449493`*^9, 3.7697082479902782`*^9, 3.769708378495612*^9, - 3.7697084421381984`*^9, 3.7697098606407647`*^9, 3.770800449598709*^9, - 3.772125457685274*^9, 3.7721265150250645`*^9, 3.7721266603165503`*^9, - 3.7796342679890523`*^9}, - CellLabel-> - "During evaluation of \ -In[36]:=",ExpressionUUID->"f07fab41-8b05-4d9c-8ab0-e1792bbfd541"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "2", ",", "3"}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147449493`*^9, 3.7697082479902782`*^9, 3.769708378495612*^9, - 3.7697084421381984`*^9, 3.7697098606407647`*^9, 3.770800449598709*^9, - 3.772125457685274*^9, 3.7721265150250645`*^9, 3.7721266603165503`*^9, - 3.779634267995087*^9}, - CellLabel-> - "During evaluation of \ -In[36]:=",ExpressionUUID->"937a9ba3-2e68-4c30-9c83-a9034e34b2fe"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.430795153566441`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.616519712150876`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.027532387997972`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.46831089193717`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.1461771321923352`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4829477989757855`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.8652497635278786`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794897`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.17464862555597294`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0021653275949904`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794899`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7082477725324319`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.983721972417621`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5502568640817311`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.045809755357004`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5136441468138901`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.5362010560606665`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.875627471783435`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.213812519722786`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.764816731793982`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9279815325460952`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.920911528363968`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.963207763872521`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.554424633860402`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.10783870935001`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5326704196122634`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8951462485745506`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.999658336946803`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.835476599084685`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384689`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.795569984822161`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2453186511743883`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0484941836730832`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.046916257650389`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8244768685068624`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.10630003983904`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.07733941083938656`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7806070571252695`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.573666351184711`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.839587710939477`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948932`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.8317169579211932`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.6719558806559505`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.224466796267306`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.283185307179586`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.415768934264612`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.12768427730922`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2018586491957064`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.863828659184831`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.553605976686099`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.736179235951557`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.28313187954699887`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384688`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.959465306679567`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.6382527961492865`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.917916062720996`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.036901571728208`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.0103404689091942`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.8866817872085657`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.4199721239966516`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.11233919957412031`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.055588983306298`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.2087165320806376`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.32940875805560516`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.142639856062511`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.015294622440498`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.1501908429383687`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.551811061716565`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.001643570274216799`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.893683354321091`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1488022954579562`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9708028388404426`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.6334340252794046`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1728098996107654`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.8350447620424895`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.10001842017311602`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782138`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.612370560211573`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8184928342971659`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.105696940257919`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782138`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7169484492950131`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.4470050917707387`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.617472973964874`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.725213422259695`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.53918765598785`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.507308485415061`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5481617246298657`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.381178856736082`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9548764939000481`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.688710695140118`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.4592374948810207`", ",", "5"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4808630170857502`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.905934842046276`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.238724906890974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.800052520348352`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1195157066307964`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.869483841491584`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.19871725195949425`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.734908961305992`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.25686793874538816`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.15486768864766276`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.1811009643604145`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0238601494903856`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5967738587099016`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.032819594747161`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.09945445887054416`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.180278030867489`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.7093661276607435`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.4245132634665385`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.4660464952360766`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4702445097152732`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.5828619203758523`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7579495038618903`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.31185562938437`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9693354096140786`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.6824941346129965`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1234523725652654`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.4473439542296312`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1908275760642033`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.8116501108702945`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974483`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6392392526828475`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.414543767708266`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.827526690629077`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.8304481652423408`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.186119259296483`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5778583665152425`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4995377718824023`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.8703589730552456`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7447924043309592`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7820861300637997`", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "4", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.24518431970980148`", ",", "5"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7690141546517725`*^9, 3.7690148287495403`*^9, - 3.7690166147449493`*^9, 3.7697082479902782`*^9, 3.769708378495612*^9, - 3.7697084421381984`*^9, 3.7697098606407647`*^9, 3.770800449598709*^9, - 3.772125457685274*^9, 3.7721265150250645`*^9, 3.7721266603165503`*^9, - 3.7796342680678816`*^9}, - CellLabel-> - "During evaluation of \ -In[36]:=",ExpressionUUID->"6b60c265-68ca-4197-88e1-b75a0809f26a"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example 3(not reuse qubits) n=2, m=1, k=1, l=1", "Subsubsection", - CellChangeTimes->{{3.7674426067759476`*^9, - 3.7674426529214177`*^9}},ExpressionUUID->"4406a8e7-185f-4896-bc5b-\ -36ec682d3262"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", " ", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7674426597487755`*^9, 3.767442677508273*^9}, - 3.767442794513642*^9, {3.769014914028371*^9, 3.7690149161387243`*^9}}, - CellLabel->"In[62]:=",ExpressionUUID->"e684450d-dc55-4683-a7b0-08745a67ecf4"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633973585`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0851264199276685`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897043`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.0851264199276685`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1916979068924267`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1916979068924258`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6166376165408445`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{3.769014326281565*^9, 3.7690149178451877`*^9, - 3.7697082485448256`*^9, 3.769708379060694*^9, 3.769708442686757*^9, - 3.769709861256684*^9, 3.770800450140294*^9, 3.7721254582278347`*^9, - 3.772126515572274*^9, 3.7721266609304476`*^9, 3.779946334968238*^9}, - CellLabel-> - "During evaluation of \ -In[62]:=",ExpressionUUID->"ec890902-f0b2-4b05-99fb-b73d01bb5a26"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{3.769014326281565*^9, 3.7690149178451877`*^9, - 3.7697082485448256`*^9, 3.769708379060694*^9, 3.769708442686757*^9, - 3.769709861256684*^9, 3.770800450140294*^9, 3.7721254582278347`*^9, - 3.772126515572274*^9, 3.7721266609304476`*^9, 3.779946334976242*^9}, - CellLabel-> - "During evaluation of \ -In[62]:=",ExpressionUUID->"729cff7a-54ee-4779-96e8-43700d188980"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7628630431564178`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.006845835410647`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.492952618191529`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384691`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.0341424877474121`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.66187495988681`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3352039207380964`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.5567362529549715`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.008278857303637`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9947673706239738`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3464056097536983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7116280810875657`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4592882720668`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.769014326281565*^9, 3.7690149178451877`*^9, - 3.7697082485448256`*^9, 3.769708379060694*^9, 3.769708442686757*^9, - 3.769709861256684*^9, 3.770800450140294*^9, 3.7721254582278347`*^9, - 3.772126515572274*^9, 3.7721266609304476`*^9, 3.779946334997155*^9}, - CellLabel-> - "During evaluation of \ -In[62]:=",ExpressionUUID->"fe311434-705f-465c-b7aa-fa6a966a487e"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7721293645169554`*^9, 3.7721293826175175`*^9}}, - CellLabel-> - "In[705]:=",ExpressionUUID->"2ba35661-f037-420b-a855-29f3f56d8059"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"BoxiTest", "[", "result", "]"}]], "Input", - CellChangeTimes->{{3.772130522196424*^9, 3.772130536995611*^9}}, - CellLabel-> - "In[706]:=",ExpressionUUID->"5eeb9f45-fd92-45b0-9fe0-d3c8482d8987"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"Apply multicontrolled.\"\>"], "Print", - CellChangeTimes->{3.7721344212762585`*^9}, - CellLabel-> - "During evaluation of \ -In[706]:=",ExpressionUUID->"d70b06e8-98db-4b25-997d-d6a4db947efc"], - -Cell[BoxData["\<\"Apply multicontrolled.\"\>"], "Print", - CellChangeTimes->{3.772134421281245*^9}, - CellLabel-> - "During evaluation of \ -In[706]:=",ExpressionUUID->"c7412e6b-3540-4c44-bb4d-a74f63c8a0f2"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"Null", ",", "Null"}], "}"}]], "Output", - CellChangeTimes->{{3.77213053069518*^9, 3.772130558646582*^9}, { - 3.772130609515174*^9, 3.77213062335231*^9}, {3.7721306637451963`*^9, - 3.772130680309323*^9}, 3.7721307363001337`*^9, 3.7721307823167057`*^9, { - 3.772130953959807*^9, 3.7721309640323763`*^9}, 3.7721310289389544`*^9, { - 3.7721313324928555`*^9, 3.7721313468378277`*^9}, 3.7721313925352387`*^9, - 3.772131454546916*^9, {3.772131525240035*^9, 3.772131573429537*^9}, { - 3.772131608692735*^9, 3.7721316177338467`*^9}, {3.7721316501477175`*^9, - 3.7721316561809807`*^9}, 3.7721316952751493`*^9, 3.7721317431777735`*^9, - 3.77213177850114*^9, 3.772131813619952*^9, {3.772132292588622*^9, - 3.7721323490069523`*^9}, 3.772132674159912*^9, {3.7721327293149824`*^9, - 3.7721328023547025`*^9}, 3.772132849032241*^9, 3.7721329397578907`*^9, { - 3.772132984516341*^9, 3.7721329948312836`*^9}, {3.772133032186781*^9, - 3.7721330540395064`*^9}, {3.772133088717595*^9, 3.7721331631754165`*^9}, { - 3.772133231912202*^9, 3.772133304641037*^9}, 3.7721333568042173`*^9, - 3.7721335514640493`*^9, 3.772133637514202*^9, 3.772133692284752*^9, - 3.772134421285263*^9}, - CellLabel-> - "Out[706]=",ExpressionUUID->"fbf0b8a8-f71e-41a0-8a11-3ea08ec1d049"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Test Recursive decomposition", "Subsection", - CellChangeTimes->{{3.7665986471231785`*^9, - 3.7665986617740135`*^9}},ExpressionUUID->"6decde45-201b-4a90-bb32-\ -84f44776e13c"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"4", ",", "4", ",", "4"}], "]"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", " ", - RowBox[{"Length", "[", "krausList", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "i", "]"}], "]"}], "//", "MatrixForm"}], "]"}], ";"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.7689941204395776`*^9, 3.768994121366068*^9}, { - 3.7689984275707397`*^9, 3.768998440911021*^9}, {3.768998866108413*^9, - 3.7689988677420087`*^9}, {3.768999640014763*^9, 3.76899968428529*^9}, { - 3.769600349403174*^9, 3.769600358953409*^9}, {3.7696006604190454`*^9, - 3.7696006609845333`*^9}, {3.7696007224511347`*^9, 3.7696007420088253`*^9}, { - 3.769600890510642*^9, 3.7696009118415914`*^9}, {3.769601152470005*^9, - 3.7696011609592996`*^9}, {3.769601379000641*^9, 3.7696013791671686`*^9}, { - 3.7696015623522453`*^9, 3.769601577920207*^9}, {3.769601620617716*^9, - 3.769601637711836*^9}}, - CellLabel-> - "In[547]:=",ExpressionUUID->"b1c623d2-e86a-4143-8737-7c6489f48013"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.0062326399557944626`"}], "0.21168193854512588`", - "0.3851230099572619`", - RowBox[{"-", "0.014636406404321942`"}]}, - {"0.05803995018668787`", "0.39245903580421493`", "0.007391877785761974`", - "0.07964371636601221`"}, - { - RowBox[{"-", "0.018680010476405766`"}], - RowBox[{"-", "0.17978975471490455`"}], "0.4508617278699655`", - "0.2511304050223038`"}, - { - RowBox[{"-", "0.09951469907085612`"}], "0.31771097648904306`", - "0.09873986271411751`", - RowBox[{"-", "0.1296028660711362`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.768999684977438*^9}, 3.7696002960478554`*^9, { - 3.7696003526933517`*^9, 3.7696003600853577`*^9}, {3.7696006615450335`*^9, - 3.769600675595454*^9}, {3.7696007386109133`*^9, 3.769600742319993*^9}, { - 3.7696009000760584`*^9, 3.7696009122794194`*^9}, {3.769601153938079*^9, - 3.769601161795065*^9}, 3.7696013796478825`*^9, {3.7696015635769453`*^9, - 3.769601578554512*^9}, {3.7696016231419945`*^9, 3.7696016387810016`*^9}, - 3.7696020119487886`*^9, 3.769708248580702*^9, 3.769708379101585*^9, - 3.7697084427306223`*^9, 3.769709861294609*^9, 3.770800450166225*^9, - 3.7721254582617383`*^9, 3.772126515597329*^9, 3.772126660956379*^9}, - CellLabel-> - "During evaluation of \ -In[547]:=",ExpressionUUID->"52cbbf97-2e9e-439b-b1ad-5e496fe867b7"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.3105105571215673`"}], "0.358511265892242`", - "0.06763520881735154`", "0.04425126636718245`"}, - {"0.3686465732953913`", "0.27591939629732926`", - RowBox[{"-", "0.07599955179202728`"}], - RowBox[{"-", "0.08015468484634497`"}]}, - {"0.12630726331960435`", - RowBox[{"-", "0.03072355695667319`"}], "0.2272474905605189`", - "0.3799849722920918`"}, - {"0.10729082875473517`", "0.22029224472523015`", "0.47092589709617`", - RowBox[{"-", "0.29283556326630755`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.768999684977438*^9}, 3.7696002960478554`*^9, { - 3.7696003526933517`*^9, 3.7696003600853577`*^9}, {3.7696006615450335`*^9, - 3.769600675595454*^9}, {3.7696007386109133`*^9, 3.769600742319993*^9}, { - 3.7696009000760584`*^9, 3.7696009122794194`*^9}, {3.769601153938079*^9, - 3.769601161795065*^9}, 3.7696013796478825`*^9, {3.7696015635769453`*^9, - 3.769601578554512*^9}, {3.7696016231419945`*^9, 3.7696016387810016`*^9}, - 3.7696020119487886`*^9, 3.769708248580702*^9, 3.769708379101585*^9, - 3.7697084427306223`*^9, 3.769709861294609*^9, 3.770800450166225*^9, - 3.7721254582617383`*^9, 3.772126515597329*^9, 3.772126660960903*^9}, - CellLabel-> - "During evaluation of \ -In[547]:=",ExpressionUUID->"170fb8cf-c8bf-4e78-8468-0f234e3489f4"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.05277433523916278`", "0.1469542366867158`", "0.224937256099688`", - "0.168236298721007`"}, - {"0.7328491542761275`", - RowBox[{"-", "0.04844626244706826`"}], - RowBox[{"-", "0.16891009525242923`"}], "0.18859982041530265`"}, - {"0.2480155915774956`", "0.26329648073822776`", - RowBox[{"-", "0.10020087308624592`"}], "0.1572287520941747`"}, - { - RowBox[{"-", "0.05657738837238096`"}], "0.09414810722900765`", - "0.06460202224542802`", "0.4809564939972161`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.768999684977438*^9}, 3.7696002960478554`*^9, { - 3.7696003526933517`*^9, 3.7696003600853577`*^9}, {3.7696006615450335`*^9, - 3.769600675595454*^9}, {3.7696007386109133`*^9, 3.769600742319993*^9}, { - 3.7696009000760584`*^9, 3.7696009122794194`*^9}, {3.769601153938079*^9, - 3.769601161795065*^9}, 3.7696013796478825`*^9, {3.7696015635769453`*^9, - 3.769601578554512*^9}, {3.7696016231419945`*^9, 3.7696016387810016`*^9}, - 3.7696020119487886`*^9, 3.769708248580702*^9, 3.769708379101585*^9, - 3.7697084427306223`*^9, 3.769709861294609*^9, 3.770800450166225*^9, - 3.7721254582617383`*^9, 3.772126515597329*^9, 3.7721266609678626`*^9}, - CellLabel-> - "During evaluation of \ -In[547]:=",ExpressionUUID->"6ed06276-7164-4b43-abc3-70cb7998da98"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.058130934843855814`"}], "0.4890333732182519`", - RowBox[{"-", "0.198467051887237`"}], - RowBox[{"-", "0.028964600201188864`"}]}, - {"0.10828565115299016`", - RowBox[{"-", "0.12465529072734793`"}], "0.4092707286220662`", - "0.11609073328276306`"}, - {"0.27946946124581606`", "0.14002355605630784`", "0.1686568557695286`", - RowBox[{"-", "0.24982547936983854`"}]}, - { - RowBox[{"-", "0.16966005996162212`"}], "0.1932276424247936`", - RowBox[{"-", "0.1617369241587297`"}], "0.52764848700503`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.7666006851931334`*^9, 3.766600859127704*^9, 3.7666010189478397`*^9, - 3.766601574974911*^9, 3.7666016816756687`*^9, 3.7666020764837365`*^9, - 3.766602188160194*^9, {3.7666022294353623`*^9, 3.766602233778759*^9}, - 3.7666023054401855`*^9, {3.7666023894575806`*^9, 3.766602405798521*^9}, - 3.7689934165685043`*^9, 3.768993617385587*^9, 3.7689941224741035`*^9, { - 3.7689984374622483`*^9, 3.7689984414625454`*^9}, 3.7689988681738544`*^9, { - 3.76899964080263*^9, 3.768999684977438*^9}, 3.7696002960478554`*^9, { - 3.7696003526933517`*^9, 3.7696003600853577`*^9}, {3.7696006615450335`*^9, - 3.769600675595454*^9}, {3.7696007386109133`*^9, 3.769600742319993*^9}, { - 3.7696009000760584`*^9, 3.7696009122794194`*^9}, {3.769601153938079*^9, - 3.769601161795065*^9}, 3.7696013796478825`*^9, {3.7696015635769453`*^9, - 3.769601578554512*^9}, {3.7696016231419945`*^9, 3.7696016387810016`*^9}, - 3.7696020119487886`*^9, 3.769708248580702*^9, 3.769708379101585*^9, - 3.7697084427306223`*^9, 3.769709861294609*^9, 3.770800450166225*^9, - 3.7721254582617383`*^9, 3.772126515597329*^9, 3.7721266609708548`*^9}, - CellLabel-> - "During evaluation of \ -In[547]:=",ExpressionUUID->"e39be550-c012-463f-a3b7-07fc05d86dbb"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]], "Input", - CellChangeTimes->{{3.7666006942818375`*^9, 3.766600710879007*^9}, { - 3.766601809672996*^9, 3.766601822471787*^9}, {3.7666019584163675`*^9, - 3.7666019960637255`*^9}, {3.766602164577238*^9, 3.766602165775036*^9}, { - 3.766602448114402*^9, 3.766602504912565*^9}, {3.7666025718655825`*^9, - 3.7666025750081797`*^9}, {3.768993911256152*^9, 3.768993938398531*^9}}, - CellLabel-> - "In[548]:=",ExpressionUUID->"26d4a316-7dd7-4c0a-9193-a3c6a3afa899"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "0.26546042965247485`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.9615900583730127`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.164182951503896`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.100624034152153`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.876208003341575`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7121295383601955`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1358997072044685`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.0325609206958073`", ",", "1"}], "}"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4499000815151404`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.023952250644192`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.04411422964742756`"}], ",", - RowBox[{"-", "0.017411171620220024`"}], ",", - RowBox[{"-", "0.1483256662586513`"}], ",", - RowBox[{"-", "0.4873664805417319`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.5081871951842997`", ",", - RowBox[{"-", "0.046602059017667945`"}], ",", "0.25254094845547465`", - ",", - RowBox[{"-", "0.2979651355952146`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.027279550786371756`", ",", - RowBox[{"-", "0.04419323633661884`"}], ",", - RowBox[{"-", "0.690845931348366`"}], ",", - RowBox[{"-", "0.20159928117397838`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.05837258241519828`"}], ",", - RowBox[{"-", "0.19858954472887871`"}], ",", "0.25319052046973267`", - ",", - RowBox[{"-", "0.3436395512231237`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.15719244615461658`", ",", - RowBox[{"-", "0.6794365646659073`"}], ",", "0.19386955241206544`", - ",", - RowBox[{"-", "0.31768242123123347`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0.37222392928104825`", ",", "0.6155186863691402`", ",", - "0.34051073944014065`", ",", - RowBox[{"-", "0.170349761583723`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.5818238144412231`", ",", "0.08499208331863994`", ",", - RowBox[{"-", "0.46747762287949973`"}], ",", - RowBox[{"-", "0.11389509634823757`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.4836001524151676`"}], ",", "0.32926174524708035`", - ",", - RowBox[{"-", "0.02794155769131898`"}], ",", - RowBox[{"-", "0.609956576549718`"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.18184629354202503`"}], ",", - "0.00047613476281270495`", ",", "0.2087487621081398`", ",", - "0.4946867978344048`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.45322694952776366`"}], ",", "0.761522289886288`", - ",", "0.01378399054602017`", ",", - RowBox[{"-", "0.3328000899789136`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.38638651355222187`"}], ",", "0.1761532254243473`", - ",", - RowBox[{"-", "0.2165958952373228`"}], ",", "0.18167466322070785`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.4574093981614822`"}], ",", - RowBox[{"-", "0.21760340007183038`"}], ",", "0.33885087052064294`", - ",", "0.09608724576731682`"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.24238470891914743`"}], ",", - RowBox[{"-", "0.16060184811396405`"}], ",", - RowBox[{"-", "0.6479173189656884`"}], ",", "0.37875003778379696`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - "0.029716158581361993`", ",", "0.14169367594461613`", ",", - "0.5878820430888132`", ",", "0.4137860049427342`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.11901185701010011`", ",", "0.37511744539335035`", ",", - RowBox[{"-", "0.15527281396472165`"}], ",", "0.521972197865753`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.5737613990655454`"}], ",", - RowBox[{"-", "0.3938517836611366`"}], ",", "0.07062907388750046`", - ",", - RowBox[{"-", "0.12314708989806752`"}]}], "}"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.766601682727855*^9, 3.766601698836791*^9}, - 3.766601735060951*^9, {3.766601778148257*^9, 3.766601793143185*^9}, - 3.766601830213091*^9, {3.7666019475155096`*^9, 3.7666020009277945`*^9}, - 3.766602077766311*^9, {3.7666021663465085`*^9, 3.7666021892692275`*^9}, { - 3.7666022304686003`*^9, 3.766602234386134*^9}, 3.7666023061373205`*^9, { - 3.7666023902370396`*^9, 3.766602406562483*^9}, {3.766602439237132*^9, - 3.7666024856520534`*^9}, 3.7666025332897077`*^9, {3.7666025683519754`*^9, - 3.76660257576017*^9}, {3.766602620434742*^9, 3.7666026884279947`*^9}, - 3.7689934179129066`*^9, 3.7689935111737633`*^9, 3.768993587382861*^9, { - 3.7689936201112947`*^9, 3.7689936480020213`*^9}, 3.7689936791596565`*^9, - 3.7689937544074783`*^9, {3.7689939125407143`*^9, 3.7689939396122837`*^9}, - 3.7689941237965965`*^9, {3.768999660144906*^9, 3.7689996870449057`*^9}, - 3.769600297165865*^9, 3.769600363031479*^9, {3.7696006630579863`*^9, - 3.7696006683977356`*^9}, 3.7696009187351527`*^9, 3.769601163387805*^9, - 3.7696013810032845`*^9, {3.7696015668641825`*^9, 3.7696015800146527`*^9}, { - 3.7696016289374943`*^9, 3.7696016400276413`*^9}, 3.7696020128693547`*^9, - 3.7697082486625195`*^9, 3.769708379176054*^9, 3.769708442810427*^9, - 3.7697098614132957`*^9, 3.77080045023657*^9, 3.7721254583395243`*^9, - 3.77212651566718*^9, 3.7721266610287*^9}, - CellLabel-> - "Out[548]=",ExpressionUUID->"ef27df12-bb4c-4b0a-b2dc-42357de18dbe"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], - "]"}]], "Input", - CellChangeTimes->{{3.7689939974007454`*^9, 3.768993999879114*^9}}, - CellLabel-> - "In[549]:=",ExpressionUUID->"dab6a392-49ca-4274-b36f-215a5bf2fca1"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.26546042965246686`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4855560400272316`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.844710634729592`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.79406358465702`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.078436889233869`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.1190023556756898`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.0002594420244972`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267949203`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794897`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.2831853071795845`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.08065226109057066`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.42365207393523474`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948992`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5021604577529477`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.193403393959579`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.273130807607611`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589759`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.534902744842966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267949459`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.712388980384695`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.48244621364941315`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897496`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.163217554677696`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.357177016320843`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.073749644893607`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7004586895517189`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.165734558096093`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.209693371058891`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.9132575597958414`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.444567865007655`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.011918999102625616`"}], ",", - RowBox[{"-", "0.27657998608320883`"}], ",", - RowBox[{"-", "0.4297512321014192`"}], ",", - RowBox[{"-", "0.02123984574326232`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.11099279263651717`", ",", - RowBox[{"-", "0.5116664542481741`"}], ",", "0.1081237864456166`", - ",", "0.35661381958015603`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.03572274825506689`"}], ",", "0.2345265391392484`", - ",", - RowBox[{"-", "0.6289617467858727`"}], ",", "0.2621753150775295`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.19030709576298593`"}], ",", - RowBox[{"-", "0.4165586043926502`"}], ",", - RowBox[{"-", "0.037162226065390006`"}], ",", - RowBox[{"-", "0.1179824302028766`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.5938053662552651`"}], ",", - RowBox[{"-", "0.4732250537849471`"}], ",", "0.005417376124031523`", - ",", "0.219715548283435`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.7049818708376976`", ",", - RowBox[{"-", "0.35448181715545174`"}], ",", "0.19376121713359332`", - ",", "0.046693742364202706`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.24154389934907763`", ",", "0.04214978005933736`", ",", - RowBox[{"-", "0.2936131633409155`"}], ",", "0.6564459438401251`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.20517778994417102`", ",", - RowBox[{"-", "0.28600921009380076`"}], ",", - RowBox[{"-", "0.5318531455483585`"}], ",", - RowBox[{"-", "0.5552865909123486`"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.061913804577299114`"}], ",", "0.22883929748389775`", - ",", "0.49083895439281644`", ",", - RowBox[{"-", "0.15567836199366167`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.8597641091425885`"}], ",", - RowBox[{"-", "0.07006263920132372`"}], ",", - RowBox[{"-", "0.31126010131908816`"}], ",", - RowBox[{"-", "0.2351399936260749`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2909669785410622`"}], ",", "0.4111093215660197`", - ",", - RowBox[{"-", "0.019057622542810668`"}], ",", - RowBox[{"-", "0.07879157261842609`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0.06637547116997322`", ",", "0.14596081684945938`", ",", - "0.1693672216109121`", ",", - RowBox[{"-", "0.571167006677048`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.06819806111261771`", ",", "0.7598541597463995`", ",", - RowBox[{"-", "0.07176214406361735`"}], ",", "0.2461963020199915`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.12703858065912`"}], ",", - RowBox[{"-", "0.19301780711039812`"}], ",", "0.6642623606808171`", - ",", - RowBox[{"-", "0.20771409124427181`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.3278680352956167`"}], ",", "0.21968978192075087`", - ",", "0.39203357042835496`", ",", "0.3768158341377849`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.19904182116995564`", ",", "0.29918313781927336`", ",", - RowBox[{"-", "0.181827423573977`"}], ",", - RowBox[{"-", "0.5850518215386473`"}]}], "}"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.768994001221526*^9, 3.768994037121497*^9, - 3.768994125810212*^9, 3.7689996887563562`*^9, 3.769601781375312*^9, - 3.7697082498937144`*^9, 3.7697083804087324`*^9, 3.7697084440580893`*^9, - 3.769709862682892*^9, 3.7708004514294667`*^9, 3.772125459621518*^9, - 3.77212651690644*^9, 3.7721266623182964`*^9}, - CellLabel-> - "Out[549]=",ExpressionUUID->"c7cadc5b-4982-402b-9645-9ff440df93cc"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]], "Input", - CellChangeTimes->{{3.7689939719458513`*^9, 3.7689939752869363`*^9}}, - CellLabel-> - "In[550]:=",ExpressionUUID->"c24463c7-81bf-42aa-80d0-3caccdce0b0e"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0.5229163877041909`", ",", "0.006407265280344576`", ",", - "0.01910657146872563`", ",", - RowBox[{"-", "0.026376934281395203`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", - RowBox[{"-", "0.7656313449612558`"}], ",", - RowBox[{"-", "0.17586831957674712`"}], ",", "0.18342357447819735`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.`", ",", - RowBox[{"-", "0.7834976577914178`"}], ",", - RowBox[{"-", "0.10934791116631729`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.`", ",", "0.`", ",", "0.5278712035297005`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.8523839812375645`"}], ",", "0.0039306980060743735`", - ",", "0.0117214067295493`", ",", - RowBox[{"-", "0.016181593620649998`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.6432356801185944`", ",", - RowBox[{"-", "0.20959470440262637`"}], ",", "0.2186872577908167`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.`", ",", "0.5574669154685152`", ",", - RowBox[{"-", "0.012352484612553193`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.`", ",", "0.`", ",", "0.`", ",", - RowBox[{"-", "0.7917174571164581`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.011918999102625616`"}], ",", - RowBox[{"-", "0.27657998608320883`"}], ",", - RowBox[{"-", "0.4297512321014192`"}], ",", - RowBox[{"-", "0.02123984574326232`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.11099279263651717`", ",", - RowBox[{"-", "0.5116664542481741`"}], ",", "0.1081237864456166`", - ",", "0.35661381958015603`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.03572274825506689`"}], ",", "0.2345265391392484`", - ",", - RowBox[{"-", "0.6289617467858727`"}], ",", "0.2621753150775295`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.19030709576298593`"}], ",", - RowBox[{"-", "0.4165586043926502`"}], ",", - RowBox[{"-", "0.037162226065390006`"}], ",", - RowBox[{"-", "0.1179824302028766`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.5938053662552651`"}], ",", - RowBox[{"-", "0.4732250537849471`"}], ",", "0.005417376124031523`", - ",", "0.219715548283435`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.7049818708376976`", ",", - RowBox[{"-", "0.35448181715545174`"}], ",", "0.19376121713359332`", - ",", "0.046693742364202706`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.24154389934907763`", ",", "0.04214978005933736`", ",", - RowBox[{"-", "0.2936131633409155`"}], ",", "0.6564459438401251`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.20517778994417102`", ",", - RowBox[{"-", "0.28600921009380076`"}], ",", - RowBox[{"-", "0.5318531455483585`"}], ",", - RowBox[{"-", "0.5552865909123486`"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.061913804577299114`"}], ",", "0.22883929748389775`", - ",", "0.49083895439281644`", ",", - RowBox[{"-", "0.15567836199366167`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.8597641091425885`"}], ",", - RowBox[{"-", "0.07006263920132372`"}], ",", - RowBox[{"-", "0.31126010131908816`"}], ",", - RowBox[{"-", "0.2351399936260749`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2909669785410622`"}], ",", "0.4111093215660197`", - ",", - RowBox[{"-", "0.019057622542810668`"}], ",", - RowBox[{"-", "0.07879157261842609`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0.06637547116997322`", ",", "0.14596081684945938`", ",", - "0.1693672216109121`", ",", - RowBox[{"-", "0.571167006677048`"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.06819806111261771`", ",", "0.7598541597463995`", ",", - RowBox[{"-", "0.07176214406361735`"}], ",", "0.2461963020199915`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.12703858065912`"}], ",", - RowBox[{"-", "0.19301780711039812`"}], ",", "0.6642623606808171`", - ",", - RowBox[{"-", "0.20771409124427181`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.3278680352956167`"}], ",", "0.21968978192075087`", - ",", "0.39203357042835496`", ",", "0.3768158341377849`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.19904182116995564`", ",", "0.29918313781927336`", ",", - RowBox[{"-", "0.181827423573977`"}], ",", - RowBox[{"-", "0.5850518215386473`"}]}], "}"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7689939759331827`*^9, 3.7689940384060335`*^9, - 3.7689941340391617`*^9, 3.7689984471981993`*^9, 3.7689988730468435`*^9, - 3.768999689987034*^9, 3.769708249951595*^9, 3.7697083804775476`*^9, - 3.7697084441029696`*^9, 3.769709862750738*^9, 3.7708004514733152`*^9, - 3.7721254596664267`*^9, 3.7721265169692626`*^9, 3.7721266623810997`*^9}, - CellLabel-> - "Out[550]=",ExpressionUUID->"560c90ff-fd28-4d1d-91b8-d73371524e29"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"TestDecChannelRecursively", "[", "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"m", ",", "n", ",", "k", ",", "r", ",", "q1", ",", "q2"}], - "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"m", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"1", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"n", "=", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{"1", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"k", " ", "=", " ", - RowBox[{"RandomInteger", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"Max", "[", - RowBox[{ - RowBox[{"m", "-", "n"}], ",", "1"}], "]"}], ",", "4"}], "}"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"m", "=", "4"}], ";", - RowBox[{"n", "=", "2"}], ";", - RowBox[{"k", "=", "2"}], ";", "\[IndentingNewLine]", - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{ - RowBox[{"2", "^", "m"}], ",", - RowBox[{"2", "^", "n"}], ",", - RowBox[{"4", "^", "k"}]}], "]"}]}], ";", "\[IndentingNewLine]", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{"Test", " ", "for", " ", "DecomposeIso"}], "\[Rule]", - "\"\\""}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"r", ",", "q1", ",", "q2"}], "}"}], "=", - RowBox[{"DecChannelRecursively", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", " ", "->", " ", "\"\\""}]}], "]"}]}], - ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "q2"}], "}"}], " ", "=", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"Flatten", "[", - RowBox[{"q1", ",", "1"}], "]"}], ",", - RowBox[{"Flatten", "[", - RowBox[{"q2", ",", "1"}], "]"}]}], "}"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"isZeroMatrix", "[", - RowBox[{ - RowBox[{ - RowBox[{"ArrayFlatten", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"q1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "q2"}], "}"}]}], "}"}], "]"}], ".", "r"}], - " ", "-", " ", - RowBox[{"Flatten", "[", - RowBox[{"krausList", ",", "1"}], "]"}]}], "]"}], ",", - "\[IndentingNewLine]", ",", "\[IndentingNewLine]", - RowBox[{"result", "=", "False"}]}], "\[IndentingNewLine]", "]"}], ";", - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{"return", " ", "result"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"If", "[", "\[IndentingNewLine]", - RowBox[{"result", ",", "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", "\"\\"", "]"}], ";", - " ", - RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}], - "\[IndentingNewLine]"}]], "Input", - CellChangeTimes->{{3.768994466423875*^9, 3.7689945115986624`*^9}, { - 3.7689974747871113`*^9, 3.7689974954169717`*^9}, {3.7689975356642604`*^9, - 3.768997556957325*^9}, {3.768997594121874*^9, 3.768997594410082*^9}, { - 3.7689976841130753`*^9, 3.7689977384866214`*^9}, {3.7689977742279916`*^9, - 3.7689977966989617`*^9}, {3.768997847904957*^9, 3.7689980222169476`*^9}, { - 3.7689980582974052`*^9, 3.7689981824731655`*^9}, {3.768998231007315*^9, - 3.7689982515214295`*^9}, {3.768998298863761*^9, 3.7689982990153275`*^9}, { - 3.768998408552254*^9, 3.7689984097271357`*^9}, {3.768998883332326*^9, - 3.7689989088530416`*^9}, {3.768999711222218*^9, 3.76899975835335*^9}}, - CellLabel-> - "In[551]:=",ExpressionUUID->"9798d75b-60f1-4f49-b22b-0702af6ff825"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestDecChannelRecursively", "[", "]"}]], "Input", - CellChangeTimes->{{3.7689984019858227`*^9, 3.768998402487481*^9}, { - 3.768998913804822*^9, 3.768998924127204*^9}}, - CellLabel-> - "In[552]:=",ExpressionUUID->"8e01fe3b-e883-4936-b8a1-545f47c17ab6"], - -Cell[BoxData[ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974487`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8382179512654817`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8382179512654833`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5212612190512562`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5212612190512562`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5087599822585493`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.0364016087207806`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.6764097603646575`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.880061098112293`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948963`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.4199496626989836`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.411111185600272`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6967592597592178`", ",", "3"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.1623835573931367`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.4979507906140284`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.299762968177868`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.361584612446967`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8085889453533375`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.389480147218162`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"Return", "[", "True", "]"}], ",", - RowBox[{ - RowBox[{"Print", "[", "\<\"Error in ReducedCSDSplit\"\>", "]"}], ";", - RowBox[{"Return", "[", "False", "]"}]}]}], "]"}]], "Output", - CellChangeTimes->{{3.768998900163292*^9, 3.768998927372521*^9}, { - 3.7689996974460773`*^9, 3.7689997032216244`*^9}, 3.7689997551948185`*^9, - 3.7697082500433345`*^9, 3.769708380532401*^9, 3.7697084441737523`*^9, - 3.769709862806589*^9, 3.770800451538142*^9, 3.7721254597631645`*^9, - 3.77212651703207*^9, 3.7721266624594545`*^9}, - CellLabel-> - "Out[552]=",ExpressionUUID->"1a3cf4d9-159e-4d17-915d-caff6fc13867"] -}, Open ]] -}, Closed]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["CreateIsometryFromList", "Section", - CellChangeTimes->{{3.7690150438669786`*^9, 3.7690150504982367`*^9}, - 3.7690150913853273`*^9, {3.7690157850884304`*^9, - 3.769015792930558*^9}},ExpressionUUID->"2294c72d-1942-4942-a648-\ -fe45d96700ac"], - -Cell[CellGroupData[{ - -Cell["Private methods moved here", "Subsection", - CellChangeTimes->{{3.7697052950562773`*^9, - 3.7697053003844614`*^9}},ExpressionUUID->"3f7ec25f-e802-4916-88b7-\ -7091d67ad854"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"NumberOfQubits", "[", "st_", "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"(", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"st", "==", - RowBox[{"{", "}"}]}], ",", "0", ",", "\n", - RowBox[{"Max", "[", - RowBox[{"Map", "[", " ", - RowBox[{ - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "1", "]"}], "]"}], " ", "==", " ", - RowBox[{"-", "1"}]}], " ", "||", " ", - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "1", "]"}], "]"}], " ", "==", " ", "0"}]}], ",", - " ", "\n", - RowBox[{"Max", "[", - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", " ", - RowBox[{"#", "[", - RowBox[{"[", "3", "]"}], "]"}]}], "]"}], ",", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "1", "]"}], "]"}], "==", - RowBox[{"-", "2"}]}], ",", - RowBox[{"Max", "[", - RowBox[{"#", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}], ",", "\n", " ", - RowBox[{"#", "[", - RowBox[{"[", "3", "]"}], "]"}]}], "]"}]}], "]"}], " ", "&"}], - " ", ",", "st"}], "]"}], "]"}]}], "\n", " ", "]"}], "\n", " ", - ")"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.7697055850723343`*^9, 3.7697055915384693`*^9}}, - CellLabel-> - "In[156]:=",ExpressionUUID->"14e4a956-35c2-4cc6-9e81-065a623e097c"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"IsListForm", "[", - RowBox[{"st_", ",", - RowBox[{"methodName_:", "\"\\""}]}], "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "postsel", ",", "postselnums", ",", "traceout", ",", "traceoutnums", ",", - "measure", ",", "measurenums", ",", "int1", ",", "int2", ",", "int3"}], - "}"}], ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"st", "==", - RowBox[{"{", "}"}]}], ",", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Length", "[", - RowBox[{"Dimensions", "[", "st", "]"}], "]"}], "==", "1"}], ",", - " ", - RowBox[{"IsListFormHelp", "[", - RowBox[{"st", ",", "methodName"}], "]"}], ",", - RowBox[{ - RowBox[{"postsel", "=", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"6", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"postsel", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"postselnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{"postselnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "postsel", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}]}], "]"}], ";", - RowBox[{"traceout", "=", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "_"}], "}"}]}], "]"}]}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"traceout", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"traceoutnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{"traceoutnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "traceout", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}]}], "]"}], ";", - RowBox[{"measure", "=", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "_"}], "}"}]}], "]"}]}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"measure", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"measurenums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{"measurenums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "measure", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}]}], "]"}], ";", - RowBox[{"int1", "=", - RowBox[{"Intersection", "[", - RowBox[{"postselnums", ",", "traceoutnums"}], "]"}]}], ";", - RowBox[{"int2", "=", - RowBox[{"Intersection", "[", - RowBox[{"postselnums", ",", "measurenums"}], "]"}]}], ";", - RowBox[{"int3", "=", - RowBox[{"Intersection", "[", - RowBox[{"traceoutnums", ",", "measurenums"}], "]"}]}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"int1", "===", - RowBox[{"{", "}"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "int1", "]"}], ",", - "\"\< appering as an input in method \>\"", ",", "methodName", - " ", ",", - "\"\< there is both a postselection and a trace.\>\""}], "]"}], - "]"}]}], "]"}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"int2", "===", - RowBox[{"{", "}"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "int2", "]"}], ",", - "\"\< appering as an input in method \>\"", ",", "methodName", - " ", ",", - "\"\< there is both a postselection and a measurement.\>\""}], - "]"}], "]"}]}], "]"}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"int3", "===", - RowBox[{"{", "}"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "int3", "]"}], ",", - "\"\< appering as an input in method \>\"", ",", "methodName", - " ", ",", "\"\< there is both a trace and a measurement.\>\""}], - "]"}], "]"}]}], "]"}], ";", - RowBox[{ - RowBox[{ - RowBox[{"IsListFormHelp", "[", - RowBox[{"#", ",", "methodName"}], "]"}], "&"}], "/@", "st"}]}]}], - "]"}]}], "]"}]}], "]"}]}]], "Input", - CellLabel-> - "In[157]:=",ExpressionUUID->"3c9cf093-b383-4ba0-ad98-e25381341bff"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Modified method", "Subsection", - CellChangeTimes->{{3.769705312969735*^9, - 3.7697053213344607`*^9}},ExpressionUUID->"7c02d92f-35da-45db-821d-\ -bc3e006296b4"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{ - RowBox[{"Options", "[", "CreateIsometryFromList", "]"}], "=", - RowBox[{"{", - RowBox[{"FullSimp", "->", "True"}], "}"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"CreateIsometryFromList", "[", - RowBox[{"st_", ",", - RowBox[{"n", ":", - RowBox[{"Except", "[", - RowBox[{"_", "?", "OptionQ"}], "]"}], ":", "Null"}], ",", - RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", " ", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "mat", ",", "mat2", ",", "i", ",", "k", ",", "ancillain", ",", - "ancillainnums", ",", "ancillainvals", ",", "ancillaout", ",", - "ancillaoutnums", ",", "ancillaoutvals", ",", "st2", ",", "id", ",", - "rest", ",", - RowBox[{"n1", "=", "n"}]}], "}"}], ",", "\n", - RowBox[{ - RowBox[{"IsListForm", "[", "st", "]"}], ";", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"n", "===", "Null"}], ",", - RowBox[{"n1", "=", - RowBox[{"NumberOfQubits", "[", - RowBox[{"ToSimpleGate", "[", "st", "]"}], "]"}]}]}], "]"}], ";", - RowBox[{"ancillain", "=", - RowBox[{"SortBy", "[", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{ - RowBox[{"ToSimpleGate", "[", "st", "]"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "_", ",", "_"}], "}"}]}], "]"}], ",", "Last"}], - "]"}]}], ";", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"ancillain", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"ancillainnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{ - RowBox[{"ancillainnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillain", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}], ";", - RowBox[{"ancillainvals", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillain", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}]}]}], "]"}], ";", - RowBox[{"ancillaout", "=", - RowBox[{"SortBy", "[", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{ - RowBox[{"ToSimpleGate", "[", "st", "]"}], ",", - RowBox[{"{", - RowBox[{"6", ",", "_", ",", "_"}], "}"}]}], "]"}], ",", "Last"}], - "]"}]}], ";", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"ancillaout", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"ancillaoutnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{ - RowBox[{"ancillaoutnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillaout", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}], ";", - RowBox[{"ancillaoutvals", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillaout", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}]}]}], "]"}], ";", - "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{"st2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x_", "/;", - RowBox[{"x", ">=", "5"}]}], ",", "_", ",", "_"}], "}"}]}], - "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", - RowBox[{"st2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x_", "/;", - RowBox[{"x", "\[Equal]", "6"}]}], ",", "_", ",", "_"}], "}"}]}], - "]"}]}], ";", - RowBox[{"(*", - RowBox[{ - RowBox[{"TODO", ":", " ", - RowBox[{ - "This", " ", "needs", " ", "to", " ", "be", " ", "chagned"}]}], ",", - " ", - RowBox[{"better", " ", "discuss", " ", "how"}]}], " ", "*)"}], - "\[IndentingNewLine]", - RowBox[{"mat", "=", - RowBox[{"{", - RowBox[{"{", "1", "}"}], "}"}]}], ";", - RowBox[{"k", "=", "0"}], ";", " ", "\n", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<=", "n1"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"mat", "=", - RowBox[{"KroneckerProduct", "[", - RowBox[{"mat", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{"ancillainnums", ",", "i"}], "]"}], ",", - RowBox[{ - RowBox[{"k", "++"}], ";", - RowBox[{"KetV", "[", - RowBox[{ - RowBox[{"ancillainvals", "[", - RowBox[{"[", "k", "]"}], "]"}], ",", "2"}], "]"}]}], ",", - RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "]"}]}], "]"}]}]}], - "]"}], ";", "\n", - RowBox[{"isAnalytic", "=", "True"}], ";", "\n", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<=", - RowBox[{"Length", "[", "st2", "]"}]}], ",", - RowBox[{"i", "++"}], ",", "\n", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"isAnalyticGate", "[", - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}], ",", ",", - RowBox[{"isAnalytic", "=", "False"}]}], "]"}], ";", "\n", - RowBox[{"If", "[", - RowBox[{"isAnalytic", ",", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"OptionValue", "[", "FullSimp", "]"}], ",", - RowBox[{"mat", "=", - RowBox[{"FullSimplifyNoRoots", "[", - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{ - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], ",", "n1"}], "]"}], ".", - "mat"}], "]"}]}], ",", - RowBox[{"mat", "=", - RowBox[{"Simplify", "[", - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{ - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], ",", "n1"}], "]"}], ".", - "mat"}], "]"}]}], ",", - RowBox[{ - "Print", "[", "\"\\"", "]"}]}], - "]"}], ",", "\n", - RowBox[{"mat", "=", - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{ - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], ",", "n1"}], "]"}], ".", - "mat"}]}]}], "\n", "]"}]}]}], "\n", "]"}], ";", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"ancillaoutnums", "==", - RowBox[{"{", "}"}]}], ",", "mat", ",", - RowBox[{ - RowBox[{"mat2", "=", - RowBox[{"{", - RowBox[{"{", "1", "}"}], "}"}]}], ";", - RowBox[{"k", "=", "0"}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "<=", "n1"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"(*", " ", - RowBox[{ - RowBox[{ - "usually", " ", "ancillaoutvals", " ", "will", " ", "be", " ", - "all", " ", "1", "s"}], ",", " ", - RowBox[{"so", " ", "create", " ", "ket", " ", "0"}], ",", " ", - RowBox[{"sometimes", " ", - RowBox[{"(", - RowBox[{"for", " ", "instrument", " ", "generation"}], ")"}], - " ", "we", " ", "want", " ", "to", " ", "create", " ", "ket", - " ", "1"}]}], " ", "*)"}], - RowBox[{"mat2", "=", - RowBox[{"KroneckerProduct", "[", - RowBox[{"mat2", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{"ancillaoutnums", ",", "i"}], "]"}], ",", - RowBox[{ - RowBox[{"k", "++"}], ";", - RowBox[{"KetV", "[", - RowBox[{ - RowBox[{"ancillaoutvals", "[", - RowBox[{"[", "k", "]"}], "]"}], ",", "2"}], "]"}]}], ",", - RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "]"}]}], - "]"}]}]}], "]"}], ";", "\n", - RowBox[{ - RowBox[{"CT", "[", "mat2", "]"}], ".", "mat"}]}]}], "]"}]}]}], - "]"}]}]}], "Input", - CellChangeTimes->{{3.7690151258802633`*^9, 3.7690151307243013`*^9}, - 3.7690157705253954`*^9, {3.769606100942575*^9, 3.769606116405916*^9}, - 3.7696078066900606`*^9, {3.769681196636158*^9, 3.7696812262669077`*^9}, { - 3.7696812894120197`*^9, 3.7696813016602974`*^9}, {3.769681350497677*^9, - 3.7696814106413317`*^9}, {3.7696829161012225`*^9, - 3.7696829328683767`*^9}, {3.769685528674261*^9, 3.769685563036352*^9}, - 3.769685928354865*^9, {3.7696880346236477`*^9, 3.7696880368556786`*^9}}, - CellLabel-> - "In[124]:=",ExpressionUUID->"9cdc9840-ba30-4788-ae4d-8076ae18dc15"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{ - RowBox[{"Options", "[", "CreateIsometryFromList", "]"}], "=", - RowBox[{"{", - RowBox[{"FullSimp", "\[Rule]", "True"}], "}"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"CreateIsometryFromList", "[", - RowBox[{"st_", ",", - RowBox[{"n", ":", - RowBox[{"Except", "[", - RowBox[{"_", "?", "OptionQ"}], "]"}], ":", "Null"}], ",", - RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "mat", ",", "mat2", ",", "i", ",", "k", ",", "ancillain", ",", - "ancillainnums", ",", "ancillainvals", ",", "ancillaout", ",", - "ancillaoutnums", ",", "ancillaoutvals", ",", "st2", ",", "id", ",", - "rest", ",", - RowBox[{"n1", "=", "n"}]}], "}"}], ",", - RowBox[{ - RowBox[{"IsListForm", "[", "st", "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"n", "===", "Null"}], ",", - RowBox[{"n1", "=", - RowBox[{"NumberOfQubits", "[", "st", "]"}]}]}], "]"}], ";", - RowBox[{"ancillain", "=", - RowBox[{"SortBy", "[", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"5", ",", "_", ",", "_"}], "}"}]}], "]"}], ",", "Last"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"ancillain", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"ancillainnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{ - RowBox[{"ancillainnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillain", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}], ";", - RowBox[{"ancillainvals", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillain", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}]}]}], "]"}], ";", - RowBox[{"ancillaout", "=", - RowBox[{"SortBy", "[", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"6", ",", "_", ",", "_"}], "}"}]}], "]"}], ",", "Last"}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"ancillaout", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"ancillaoutnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{ - RowBox[{"ancillaoutnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillaout", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}], ";", - RowBox[{"ancillaoutvals", "=", - RowBox[{ - RowBox[{"Transpose", "[", "ancillaout", "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}]}]}]}], "]"}], ";", - "\[IndentingNewLine]", - RowBox[{"st2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x_", "/;", - RowBox[{"x", "\[GreaterEqual]", "5"}]}], ",", "_", ",", "_"}], - "}"}]}], "]"}]}], ";", - RowBox[{"mat", "=", - RowBox[{"{", - RowBox[{"{", "1", "}"}], "}"}]}], ";", - RowBox[{"k", "=", "0"}], ";", "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", "n1"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"mat", "=", - RowBox[{"KroneckerProduct", "[", - RowBox[{"mat", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{"ancillainnums", ",", "i"}], "]"}], ",", - RowBox[{ - RowBox[{"k", "++"}], ";", - RowBox[{"KetV", "[", - RowBox[{ - RowBox[{"ancillainvals", "[", - RowBox[{"[", "k", "]"}], "]"}], ",", "2"}], "]"}]}], ",", - RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "]"}]}], "]"}]}]}], - "]"}], ";", "\[IndentingNewLine]", - RowBox[{"isAnalytic", "=", "True"}], ";", "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "st2", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"isAnalyticGate", "[", - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}], ",", ",", - RowBox[{"isAnalytic", "=", "False"}]}], "]"}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{"isAnalytic", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"OptionValue", "[", "FullSimp", "]"}], ",", - RowBox[{"mat", "=", - RowBox[{"FullSimplifyNoRoots", "[", - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{ - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], ",", "n1"}], "]"}], ".", - "mat"}], "]"}]}], ",", - RowBox[{"mat", "=", - RowBox[{"Simplify", "[", - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{ - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], ",", "n1"}], "]"}], ".", - "mat"}], "]"}]}], ",", - RowBox[{ - "Print", "[", "\"\\"", "]"}]}], - "]"}], ",", - RowBox[{"mat", "=", - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{ - RowBox[{"st2", "[", - RowBox[{"[", "i", "]"}], "]"}], ",", "n1"}], "]"}], ".", - "mat"}]}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"ancillaoutnums", "\[Equal]", - RowBox[{"{", "}"}]}], ",", "mat", ",", - RowBox[{ - RowBox[{"mat2", "=", - RowBox[{"{", - RowBox[{"{", "1", "}"}], "}"}]}], ";", - RowBox[{"k", "=", "0"}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", "n1"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"(*", - RowBox[{ - RowBox[{ - "usually", " ", "ancillaoutvals", " ", "will", " ", "be", " ", - "all", " ", "1", "s"}], ",", - RowBox[{"so", " ", "create", " ", "ket", " ", "0"}], ",", - RowBox[{"sometimes", " ", - RowBox[{"(", - RowBox[{"for", " ", "instrument", " ", "generation"}], ")"}], - " ", "we", " ", "want", " ", "to", " ", "create", " ", "ket", - " ", "1"}]}], "*)"}], - RowBox[{"mat2", "=", - RowBox[{"KroneckerProduct", "[", - RowBox[{"mat2", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{"ancillaoutnums", ",", "i"}], "]"}], ",", - RowBox[{ - RowBox[{"k", "++"}], ";", - RowBox[{"KetV", "[", - RowBox[{ - RowBox[{"ancillaoutvals", "[", - RowBox[{"[", "k", "]"}], "]"}], ",", "2"}], "]"}]}], ",", - RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "]"}]}], - "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"CT", "[", "mat2", "]"}], ".", "mat"}]}]}], "]"}]}]}], - "]"}]}]}], "Input", - CellChangeTimes->{{3.7708248297681684`*^9, - 3.7708248297851496`*^9}},ExpressionUUID->"c1b1ffdf-1d35-4349-b861-\ -0080cd91574a"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{"list_", ",", - RowBox[{"n_:", "Null"}]}], "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"numQubits", "=", "n"}], "}"}], ",", "\n", - RowBox[{ - RowBox[{"IsListForm", "[", - RowBox[{"list", ",", "\"\\""}], "]"}], ";", "\n", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"n", "==", "Null"}], ",", - RowBox[{"numQubits", "=", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Dimensions", "[", "list", "]"}], "==", - RowBox[{"{", "3", "}"}]}], ",", - RowBox[{"NumberOfQubits", "[", - RowBox[{"{", "list", "}"}], "]"}], ",", - RowBox[{"NumberOfQubits", "[", "list", "]"}]}], "]"}]}]}], "]"}], - ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Dimensions", "[", "list", "]"}], "==", - RowBox[{"{", "3", "}"}]}], ",", "\n", - RowBox[{"Which", "[", "\n", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", - RowBox[{"RotGateM", "[", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "numQubits"}], "]"}], ",", - "\n", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], "==", "0"}], ",", - RowBox[{"CNOTM", "[", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "numQubits"}], "]"}], ",", - "\n", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], "==", - RowBox[{"-", "1"}]}], ",", - RowBox[{"CZM", "[", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "numQubits"}], "]"}], ",", - "\n", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], "==", - RowBox[{"-", "2"}]}], ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Dimensions", "[", - RowBox[{"list", "[", - RowBox[{"[", "2", "]"}], "]"}], "]"}], "!=", " ", - RowBox[{"{", "}"}]}], ",", - RowBox[{"DiagMat", "[", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "numQubits"}], "]"}], ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}]}], "]"}], ",", "\n", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], "==", "4"}], ",", - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\\"", "]"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "labelCTRLST"}], ",", - RowBox[{"CTRLSTM", "[", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"list", "[", - RowBox[{"[", "3", "]"}], "]"}]}], "]"}], ",", " ", - RowBox[{"(*", "TODO", "*)"}], "\n", - RowBox[{ - RowBox[{"list", "[", - RowBox[{"[", "1", "]"}], "]"}], ">=", "5"}], ",", " ", - RowBox[{"(*", - RowBox[{"TODO", ":", " ", - RowBox[{ - RowBox[{"better", " ", "not", " ", "use"}], " ", - "\[GreaterEqual]"}]}], " ", "*)"}], - RowBox[{"Throw", "[", - RowBox[{ - "StringForm", "[", - "\"\ or postselection cannot be represented by \ -matrices using ListFormToOp[]\>\"", "]"}], "]"}]}], "\n", "]"}], ",", - RowBox[{ - RowBox[{ - RowBox[{"ListFormToOp", "[", - RowBox[{"#", ",", "numQubits"}], "]"}], "&"}], "/@", "list"}]}], - "]"}]}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.769688041167897*^9, 3.7696881113491917`*^9}, { - 3.769688661335548*^9, 3.7696886919596415`*^9}, {3.769688729543095*^9, - 3.769688730607278*^9}, {3.7696894785107713`*^9, 3.7696894867037034`*^9}, { - 3.769701567673459*^9, 3.769701597412918*^9}, {3.7697056222499933`*^9, - 3.7697056329280167`*^9}, 3.7727099699674797`*^9, - 3.7727100108930626`*^9},ExpressionUUID->"1b6d7101-1f34-4e69-b6f2-\ -7aef9ad55a92"], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"IsListFormHelp", "[", - RowBox[{"gate_", ",", "methodName_"}], "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", "\n", " ", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "2"}], ",", - RowBox[{"-", "1"}], ",", "0", ",", "1", ",", "2", ",", "3", ",", - "4", ",", "5", ",", "6", ",", "7", ",", "8", ",", "labelCTRLST"}], - "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "gate", "]"}], ",", - "\"\< appearing as an input in method \>\"", ",", "methodName", - " ", ",", "\"\< is of unknown type.\>\""}], "]"}], "]"}]}], "]"}], - ";", "\n", " ", - RowBox[{"Which", "[", "\n", " ", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"-", "2"}], "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}], "==", - RowBox[{"{", "}"}]}], "&&", - RowBox[{ - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "==", - RowBox[{"{", "}"}]}]}], ",", - RowBox[{ - RowBox[{"Goto", "[", "LabelEnd", "]"}], ";"}]}], "]"}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"Length", "[", - RowBox[{"Dimensions", "[", - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}], "]"}], "]"}], "==", "1"}], "&&", - RowBox[{ - RowBox[{"Length", "[", - RowBox[{"Dimensions", "[", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}], "]"}], "==", "1"}]}], - ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{ - "\"\\"", ",", - RowBox[{"ToString", "[", "gate", "]"}], ",", - "\"\< appearing in the input of method \>\"", ",", - "methodName", ",", "\"\< are not supported.\>\""}], "]"}], - "]"}]}], "]"}], ";", "\n", " ", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Log2", "[", - RowBox[{"Length", "[", - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}], "]"}], "]"}], "==", - RowBox[{"Length", "[", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"ToString", "[", - RowBox[{"StringForm", "[", - RowBox[{ - "\"\\"", ",", "gate", ",", "methodName", ",", - RowBox[{"Length", "[", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "]"}], "]"}], - "]"}]}], "]"}]}], ",", "\n", " ", - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"IntegerQ", "[", - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}], "]"}], "&&", - RowBox[{"IntegerQ", "[", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "gate", "]"}], ",", - "\"\< appearing as an input in method \>\"", ",", "methodName", - " ", ",", - "\"\< that has a control or a target qubit number that is not \ -an integer.\>\""}], "]"}], "]"}]}], "]"}], ";", "\n", " ", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}], "==", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}]}], ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "gate", "]"}], ",", - "\"\< appearing as an input in method \>\"", ",", "methodName", - " ", ",", - "\"\< that has a control qubit number equal to the target qubit \ -number (which is not supported).\>\""}], "]"}], "]"}]}], "]"}]}], ",", "\n", - " ", - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", " ", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"NumericQ", "[", - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}], "]"}], "&&", - RowBox[{"IntegerQ", "[", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"StringJoin", "[", - RowBox[{"\"\\"", ",", - RowBox[{"ToString", "[", "gate", "]"}], ",", - "\"\< appering as an input in method \>\"", ",", "methodName", - " ", ",", "\"\< that has a wrong types.\>\""}], "]"}], "]"}]}], - "]"}], ",", "\n", " ", - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"4", ",", "5", ",", "6"}], "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "&&", - RowBox[{"IntegerQ", "[", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}]}], ",", ",", - RowBox[{"Throw", "[", - RowBox[{"ToString", "[", - RowBox[{"StringForm", "[", - RowBox[{ - "\"\\"", ",", "gate", ",", "methodName"}], "]"}], "]"}], - "]"}]}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"MemberQ", "[", - RowBox[{ - RowBox[{"{", "labelCTRLST", "}"}], ",", - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", - "\[IndentingNewLine]", - RowBox[{"(*", " ", - RowBox[{ - "check", " ", "for", " ", "each", " ", "controlled", " ", "st"}], - " ", "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"IsListForm", "[", "#", "]"}], "&"}], " ", "/@", " ", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}]}]}], "\n", "]"}], ";", "\n", - RowBox[{"Label", "[", "LabelEnd", "]"}], ";"}]}], "\n", " ", "]"}]}], - ";"}]], "Input", - CellChangeTimes->{ - 3.7690176446817927`*^9, {3.7690183410406694`*^9, 3.7690183597037783`*^9}, { - 3.7690183945185857`*^9, 3.7690183968453603`*^9}, {3.7690194191012917`*^9, - 3.7690195326120763`*^9}, {3.7690195950301046`*^9, - 3.7690196057075014`*^9}, {3.769019635817939*^9, 3.7690196945797186`*^9}, { - 3.7690198387589607`*^9, 3.7690198645030823`*^9}, {3.7690199021164427`*^9, - 3.7690199032663655`*^9}, {3.76902005017929*^9, 3.769020050406683*^9}, { - 3.7690203955057116`*^9, 3.7690204448018165`*^9}, {3.769020531346261*^9, - 3.769020561720994*^9}, {3.7690206228813553`*^9, 3.769020697442959*^9}, { - 3.7690207279892297`*^9, 3.769020739889389*^9}, 3.7696859636678486`*^9, - 3.7697101431048*^9, {3.772709969972494*^9, 3.772709969974489*^9}, { - 3.772710012400525*^9, - 3.7727100142228575`*^9}},ExpressionUUID->"7943e7b3-8773-44b6-8afc-\ -bebe0192dff3"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ToSimpleGate", "[", "st_", "]"}], " ", ":=", " ", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", - RowBox[{"Flatten", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Map", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"(", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "labelCTRLST"}], - ",", "\[IndentingNewLine]", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "1"}], "]"}], ",", " ", - "\[IndentingNewLine]", - RowBox[{"{", "#", "}"}]}], "]"}], "\[IndentingNewLine]", ")"}], - "&"}], ",", " ", - RowBox[{"(*", - RowBox[{ - "This", " ", "acts", " ", "on", " ", "each", " ", "gate", " ", "in", - " ", "the", " ", "st"}], "*)"}], "\[IndentingNewLine]", "st"}], - "]"}], ",", "\[IndentingNewLine]", "1"}], "]"}]}], "]"}]}]], "Input", - CellChangeTimes->{3.7727099699784756`*^9, - 3.7727100151325874`*^9},ExpressionUUID->"c61b13d7-903c-4973-9e2f-\ -f62201f56bb5"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{ - RowBox[{"Options", "[", "CreateChannelFromList", "]"}], "=", - RowBox[{"{", - RowBox[{ - RowBox[{"POVM", "\[Rule]", "False"}], ",", - RowBox[{"DropZero", "\[Rule]", "True"}], ",", - RowBox[{"FullSimp", "\[Rule]", "True"}]}], "}"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"CreateChannelFromList", "[", - RowBox[{"st_", ",", - RowBox[{"n", ":", - RowBox[{"Except", "[", - RowBox[{"_", "?", "OptionQ"}], "]"}], ":", "Null"}], ",", - RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "mat", ",", "i", ",", "traces", ",", "tracesnums", ",", "postsel", ",", - "postselnums", ",", "posn", ",", "chanout", ",", "st2", ",", "dims", - ",", - RowBox[{"n1", "=", "n"}]}], "}"}], ",", - RowBox[{ - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Not", "[", - RowBox[{"OptionValue", "[", "POVM", "]"}], "]"}], "&&", - RowBox[{"MemberQ", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "_"}], "}"}]}], "]"}]}], ",", - RowBox[{ - "Print", "[", - "\"\\"", "]"}]}], - "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"n", "===", "Null"}], ",", - RowBox[{"n1", "=", - RowBox[{"NumberOfQubits", "[", "st", "]"}]}]}], "]"}], ";", - RowBox[{"traces", "=", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"4", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"traces", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"tracesnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{"tracesnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "traces", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}]}], "]"}], ";", - RowBox[{"postsel", "=", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"6", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"postsel", "===", - RowBox[{"{", "}"}]}], ",", - RowBox[{"postselnums", "=", - RowBox[{"{", "}"}]}], ",", - RowBox[{"postselnums", "=", - RowBox[{ - RowBox[{"Transpose", "[", "postsel", "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}]}]}], "]"}], ";", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Dimensions", "[", - RowBox[{"Intersection", "[", - RowBox[{"tracesnums", ",", "postselnums"}], "]"}], "]"}], - "\[Equal]", - RowBox[{"{", "0", "}"}]}], ",", ",", - RowBox[{ - "Print", "[", - "\"\\"", "]"}]}], "]"}], ";", - RowBox[{"st2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"4", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"mat", "=", - RowBox[{"CreateIsometryFromList", "[", - RowBox[{"st2", ",", "n1", ",", - RowBox[{"FullSimp", "\[Rule]", - RowBox[{"OptionValue", "[", "FullSimp", "]"}]}]}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"chanout", "=", - RowBox[{"{", "}"}]}], ";", - RowBox[{"posn", "=", - RowBox[{"{", "}"}]}], ";", - RowBox[{"dims", "=", - RowBox[{"{", "}"}]}], ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", "n1"}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{"postselnums", ",", "i"}], "]"}], ",", ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"MemberQ", "[", - RowBox[{"tracesnums", ",", "i"}], "]"}], ",", - RowBox[{ - RowBox[{"posn", "=", - RowBox[{"Insert", "[", - RowBox[{"posn", ",", "1", ",", - RowBox[{"-", "1"}]}], "]"}]}], ";", - RowBox[{"dims", "=", - RowBox[{"Insert", "[", - RowBox[{"dims", ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}], ",", - RowBox[{"-", "1"}]}], "]"}]}]}], ",", - RowBox[{ - RowBox[{"posn", "=", - RowBox[{"Insert", "[", - RowBox[{"posn", ",", "2", ",", - RowBox[{"-", "1"}]}], "]"}]}], ";", - RowBox[{"dims", "=", - RowBox[{"Insert", "[", - RowBox[{"dims", ",", - RowBox[{"{", - RowBox[{"2", ",", "2"}], "}"}], ",", - RowBox[{"-", "1"}]}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], - ";", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "0"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{ - RowBox[{"2", "^", - RowBox[{"(", - RowBox[{"Length", "[", "tracesnums", "]"}], ")"}]}], "-", "1"}]}], - ",", - RowBox[{"i", "++"}], ",", " ", - RowBox[{"chanout", "=", - RowBox[{"Insert", "[", - RowBox[{"chanout", ",", - RowBox[{ - RowBox[{"Tensor", "[", - RowBox[{ - RowBox[{"BraV", "[", - RowBox[{"i", ",", - RowBox[{"2", "^", - RowBox[{"(", - RowBox[{"Length", "[", "tracesnums", "]"}], ")"}]}]}], "]"}], - ",", - RowBox[{"IdentityMatrix", "[", - RowBox[{"2", "^", - RowBox[{"(", - RowBox[{"n1", "-", - RowBox[{"Length", "[", "postselnums", "]"}], "-", - RowBox[{"Length", "[", "tracesnums", "]"}]}], ")"}]}], "]"}], - ",", "posn", ",", "dims"}], "]"}], ".", "mat"}], ",", - RowBox[{"-", "1"}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"OptionValue", "[", "DropZero", "]"}], ",", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", - RowBox[{"Length", "[", "chanout", "]"}]}], ",", - RowBox[{"i", "\[GreaterEqual]", "1"}], ",", - RowBox[{"i", "--"}], ",", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{"chanout", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}], "\[Equal]", - RowBox[{"0", "*", - RowBox[{"chanout", "[", - RowBox[{"[", "i", "]"}], "]"}]}]}], ",", - RowBox[{"chanout", "=", - RowBox[{"Drop", "[", - RowBox[{"chanout", ",", - RowBox[{"{", "i", "}"}]}], "]"}]}]}], "]"}]}], "]"}]}], "]"}], - ";", "chanout"}]}], "]"}]}]}], "Input", - CellChangeTimes->{{3.7708229013825836`*^9, 3.770822901400561*^9}, - 3.7708236291964507`*^9},ExpressionUUID->"47c3893f-21cb-4900-abea-\ -b51a73e95e71"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Data preparation", "Subsection", - CellChangeTimes->{{3.7697027245478177`*^9, - 3.7697027283386106`*^9}},ExpressionUUID->"ea175baa-8a29-4712-bf2d-\ -a076998308d8"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7690164059134784`*^9, 3.769016414720914*^9}, { - 3.7690164753586736`*^9, 3.7690165092850075`*^9}, {3.769016560951773*^9, - 3.7690165641591887`*^9}, {3.7690166267109337`*^9, - 3.7690166324685698`*^9}, {3.7697068348428698`*^9, - 3.7697068538558245`*^9}, {3.7697070277234287`*^9, - 3.7697070433995285`*^9}, {3.7697104794633646`*^9, - 3.7697104818290033`*^9}, {3.769710532456193*^9, 3.769710540309111*^9}, - 3.7708023853798914`*^9, 3.7720247309192314`*^9, 3.7720248339292355`*^9, { - 3.772025172327856*^9, 3.77202517238271*^9}, 3.772028463545755*^9, { - 3.772029037650215*^9, 3.7720290404323215`*^9}, {3.7720290985768023`*^9, - 3.772029113696887*^9}, {3.7720298327638607`*^9, 3.772029833760165*^9}, - 3.772705602929178*^9, {3.7727057545780025`*^9, 3.772705784049359*^9}, { - 3.772705998008746*^9, 3.7727060002389345`*^9}, 3.7727063185979185`*^9, { - 3.772706416285428*^9, 3.7727064390640173`*^9}}, - CellLabel->"In[93]:=",ExpressionUUID->"4fb4e189-b39f-4fc1-90a1-6e99d0367177"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.35259925575303475`"}], ",", "0.651199510991049`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.5305926622309582`", ",", "0.1911051348965408`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.07936281649177998`", ",", - RowBox[{"-", "0.0013328324204048073`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.26076303022499653`", ",", "0.2647908721384079`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.6936107368347787`", ",", "0.022709173427490847`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.0157130701894736`"}], ",", "0.5549026594290895`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.11211370310221416`", ",", "0.39831173447748625`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.1610501158176691`", ",", "0.04708647437868821`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7720291013202114`*^9, 3.772029150603428*^9}, - 3.77202983623975*^9, 3.7727056435605497`*^9, 3.7727057852564397`*^9, - 3.7727060445605574`*^9, 3.7727060929764547`*^9, 3.7727063189041014`*^9, { - 3.772706430240512*^9, 3.7727064395513983`*^9}}, - CellLabel->"Out[93]=",ExpressionUUID->"f9fc71bf-251e-4642-9f6c-bbf5d827fbd3"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948897`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.1525326857355034`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.1306526214440833`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.831312901144839`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.83131290114484`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6105055157882289`", ",", "1"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7720291144729075`*^9, 3.772029151056217*^9}, - 3.7720298366975603`*^9, 3.7727056440153337`*^9, 3.772705785702282*^9, - 3.7727060450073786`*^9, 3.772706093436706*^9, 3.7727063193524747`*^9, { - 3.7727064306793394`*^9, 3.7727064400052156`*^9}}, - CellLabel-> - "During evaluation of \ -In[93]:=",ExpressionUUID->"9d3acff1-778f-43d9-a3e9-0c9d1667ecb5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.7720291144729075`*^9, 3.772029151056217*^9}, - 3.7720298366975603`*^9, 3.7727056440153337`*^9, 3.772705785702282*^9, - 3.7727060450073786`*^9, 3.772706093436706*^9, 3.7727063193524747`*^9, { - 3.7727064306793394`*^9, 3.7727064400072374`*^9}}, - CellLabel-> - "During evaluation of \ -In[93]:=",ExpressionUUID->"cf466d9a-b6d4-4d98-8f1f-6eefc23e2f78"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.662216895491977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.9862317375821457`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "\[Pi]", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5335581577010045`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6744424403443114`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1004337137038303`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.631476475541695`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.9980811615908753`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9546245772964235`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8425252744806307`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5624596412564464`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7834826665014727`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.820445830712576`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7720291144729075`*^9, 3.772029151056217*^9}, - 3.7720298366975603`*^9, 3.7727056440153337`*^9, 3.772705785702282*^9, - 3.7727060450073786`*^9, 3.772706093436706*^9, 3.7727063193524747`*^9, { - 3.7727064306793394`*^9, 3.772706440019201*^9}}, - CellLabel-> - "During evaluation of \ -In[93]:=",ExpressionUUID->"06efa1d4-455c-4048-80f6-a8608932f2ad"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"onecgtgate", "=", - RowBox[{"{", - RowBox[{"result", "[", - RowBox[{"[", "1", "]"}], "]"}], "}"}]}]], "Input", - CellChangeTimes->{{3.7696806177389097`*^9, 3.769680619194018*^9}, { - 3.769701850389907*^9, 3.7697018697401247`*^9}, 3.769702866603162*^9}, - CellLabel-> - "In[332]:=",ExpressionUUID->"66673c0e-36d1-45c8-b051-b10645fcc311"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.5690302213100216`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.714155085869564`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.386865433112383`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.386865433112382`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2565546586504153`", ",", "2"}], "}"}]}], "}"}], - "}"}]}], "}"}], "}"}]], "Output", - CellChangeTimes->{{3.7696806216484537`*^9, 3.769680639384017*^9}, - 3.7696810384894257`*^9, 3.7697017424226475`*^9, 3.7697018329365873`*^9, - 3.7697018700912137`*^9, 3.7697019448083324`*^9, 3.7697021637060657`*^9, - 3.7697025513988523`*^9, 3.769702585445198*^9, 3.7697027420157757`*^9, { - 3.769702879136159*^9, 3.7697028965177135`*^9}, 3.769710454299387*^9, - 3.769710552842589*^9, 3.7708007405892544`*^9, 3.770802227652132*^9, - 3.7720246916141863`*^9, 3.772024837854741*^9, 3.7720251743703957`*^9, - 3.772028470129863*^9, 3.772029154544594*^9}, - CellLabel-> - "Out[332]=",ExpressionUUID->"cd9a8000-1d33-44b1-b243-d8ccdc0afaa0"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"oneSt", "=", - RowBox[{"result", "[", - RowBox[{"[", - RowBox[{"1", ",", "3", ",", "1"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.7696812662749104`*^9, 3.7696812682655783`*^9}, { - 3.7696832866519938`*^9, 3.769683291079198*^9}, {3.769702885260702*^9, - 3.7697029002753935`*^9}}, - CellLabel-> - "In[333]:=",ExpressionUUID->"3311b375-2ffe-46e0-bc1f-c7d12402551d"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.5690302213100216`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.714155085869564`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.386865433112383`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.386865433112382`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2565546586504153`", ",", "2"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{ - 3.7696812700777316`*^9, 3.769683291450164*^9, {3.769702892571362*^9, - 3.769702901529475*^9}, 3.769710455252837*^9, 3.769710554534065*^9, - 3.7708007416986914`*^9, 3.770802227670083*^9, 3.7720246952803545`*^9, - 3.7720248387583256`*^9, 3.7720251751742473`*^9, 3.772028470955578*^9, - 3.7720291552033963`*^9}, - CellLabel-> - "Out[333]=",ExpressionUUID->"6886fb18-53ca-4e7e-bef9-38f129832f5f"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["oneSt"], "Input", - CellChangeTimes->{{3.7720292880427437`*^9, 3.772029290695857*^9}}, - CellLabel-> - "In[349]:=",ExpressionUUID->"41b4f0d6-e815-48c6-97cd-ab8d3679237c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.5690302213100216`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.714155085869564`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.386865433112383`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.386865433112382`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2565546586504153`", ",", "2"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7720292910100174`*^9}, - CellLabel-> - "Out[349]=",ExpressionUUID->"40eb5723-499e-4621-b85e-d4ebb0bdd418"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CreateCompactIsometryFromList", "[", "oneSt", "]"}]], "Input", - CellChangeTimes->{{3.7720251952753553`*^9, 3.772025229527314*^9}}, - CellLabel-> - "In[334]:=",ExpressionUUID->"690f50aa-8640-4a72-b1c1-74adff70eff7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.5720785267408278`", "\[VeryThinSpace]", "-", - RowBox[{"0.5720785267408285`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.23618900163102394`"}], "+", - RowBox[{"0.23618900163102413`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"1.8380394064967784`*^-16", "-", - RowBox[{"3.5325965064606836`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.5325459718708994`"}], "+", - RowBox[{"0.5325459718708996`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.4156033676981501`"}], "+", - RowBox[{"0.4156033676981504`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.32511443984159194`"}], "+", - RowBox[{"0.3251144398415922`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "2.1922649535799507`*^-16"}], "+", - RowBox[{"3.637567797936301`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.23432913681210774`"}], "+", - RowBox[{"0.23432913681210785`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7720252297676716`*^9, 3.772025263919031*^9, - 3.7720284836494856`*^9, 3.772029155911734*^9}, - CellLabel-> - "Out[334]=",ExpressionUUID->"0ec0e81a-7cac-4cd4-92d8-d62cc64f412a"] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["First task : RemoveUnusedQubits", "Subsection", - CellChangeTimes->{{3.770800523362481*^9, 3.7708005662747774`*^9}, - 3.771067725320469*^9, {3.771070360987138*^9, 3.7710703820450907`*^9}, { - 3.7710704947828627`*^9, 3.7710705059068117`*^9}, 3.771070596439391*^9, - 3.7710748772585306`*^9},ExpressionUUID->"8e780591-dbbf-4152-b3da-\ -cfe60b9b4a78"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{3.7712590455411143`*^9, 3.7720272487399397`*^9}, - CellLabel->"In[39]:=",ExpressionUUID->"b964208d-7401-4af6-b2fe-baebe13d200e"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"st", " ", "=", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "2"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "4"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "1"}], ",", "6", ",", "5"}], "}"}], ",", " ", - RowBox[{"{", - RowBox[{"0", ",", " ", "12", ",", "11"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "21", ",", "4"}], "}"}]}], "}"}]}]], "Input", - CellChangeTimes->{{3.771076272796693*^9, 3.7710762846345377`*^9}, { - 3.771076521627287*^9, 3.7710765321081486`*^9}}, - CellLabel->"In[40]:=",ExpressionUUID->"83421f76-0732-4402-a433-e8589d7398f5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "2"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "4"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "1"}], ",", "6", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "12", ",", "11"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "21", ",", "4"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7710744922124805`*^9, 3.771074558724196*^9, {3.771074600180588*^9, - 3.7710746521146145`*^9}, {3.771074723934499*^9, 3.7710747350626802`*^9}, - 3.771074766379079*^9, 3.7710751066060247`*^9, 3.7710762874738617`*^9, - 3.7710764474350195`*^9, {3.7710765228240414`*^9, 3.7710765329761477`*^9}, { - 3.7710765931629195`*^9, 3.7710765981682963`*^9}, 3.779634457319541*^9}, - CellLabel->"Out[40]=",ExpressionUUID->"a76335c6-c42e-418a-accd-94c4c057390e"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"RemoveUnusedQubits", "[", "st", "]"}]], "Input", - CellChangeTimes->{{3.771075124665966*^9, 3.77107513207187*^9}, { - 3.771076175413518*^9, 3.77107617677118*^9}}, - CellLabel->"In[41]:=",ExpressionUUID->"952d2740-2806-4484-bbcb-c758dbaafd87"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "2"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "1"}], ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "7", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "8", ",", "3"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7710751256015277`*^9, 3.771075132744855*^9}, - 3.771076177131216*^9, {3.7710762240152197`*^9, 3.771076250362299*^9}, - 3.7710762884988384`*^9, 3.771076347714199*^9, {3.771076448351184*^9, - 3.771076533794962*^9}, {3.771076589941184*^9, 3.7710765989518394`*^9}, - 3.7796344703982325`*^9}, - CellLabel->"Out[41]=",ExpressionUUID->"ebc078a2-4826-4e84-8b81-b9e368990ddc"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"TestRemoveUnusedQubits", "[", "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", "st", "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"st", " ", "=", " ", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "2"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "4"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "1"}], ",", "6", ",", "5"}], "}"}], ",", " ", - RowBox[{"{", - RowBox[{"0", ",", " ", "12", ",", "11"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "21", ",", "4"}], "}"}]}], "}"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"RemoveUnusedQubits", "[", "st", "]"}], "===", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "2"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "1"}], ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "7", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "8", ",", "3"}], "}"}]}], "}"}]}], ",", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "True", "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Print", "[", - RowBox[{"RemoveUnusedQubits", "[", "st", "]"}], "]"}], ";", - "\[IndentingNewLine]", - RowBox[{"Return", "[", "False", "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.7710748807613697`*^9, 3.771074979575977*^9}, { - 3.771076555258345*^9, 3.7710765666298466`*^9}, 3.771076606862797*^9, { - 3.772714202862876*^9, 3.7727142226300697`*^9}}, - CellLabel->"In[42]:=",ExpressionUUID->"29ffc519-8f32-41a1-90dd-f6efa8dd0f2a"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestRemoveUnusedQubits", "[", "]"}]], "Input", - CellChangeTimes->{{3.772714370651455*^9, 3.7727144412826843`*^9}, { - 3.7727145021822877`*^9, 3.7727145081407914`*^9}, {3.772714559265535*^9, - 3.7727146847087603`*^9}, 3.772714784928415*^9}, - CellLabel->"In[43]:=",ExpressionUUID->"301ab63a-5a8c-4313-9b65-91cd089ec430"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.7727146817091885`*^9, 3.7727146853769493`*^9}, { - 3.7727147799732323`*^9, 3.772714794116985*^9}, 3.7727149089906197`*^9, - 3.772715108977311*^9, 3.779634477293787*^9}, - CellLabel->"Out[43]=",ExpressionUUID->"990dd184-19e1-4885-bbb6-9daf913bdb1a"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Multiplex control", "Subsection", - CellChangeTimes->{{3.77108501261336*^9, - 3.7710850152751293`*^9}},ExpressionUUID->"3e03f543-4e5d-446f-b347-\ -9a938ce8e383"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"control", " ", "=", " ", - RowBox[{"{", - RowBox[{"1", ",", "3", ",", "7", ",", "6", ",", "2"}], "}"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"controlSorted", "=", - RowBox[{"Sort", "[", "control", "]"}]}]}], "Input", - CellChangeTimes->{{3.771083425857641*^9, 3.771083476968592*^9}, - 3.7710835101144896`*^9, 3.7710836034271674`*^9}, - CellLabel->"In[45]:=",ExpressionUUID->"16e1e846-db90-4fd2-8ca4-d2eaefcdea3c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3", ",", "6", ",", "7"}], "}"}]], "Output", - CellChangeTimes->{3.772703141874614*^9, 3.7796348068175545`*^9}, - CellLabel->"Out[46]=",ExpressionUUID->"7ab04497-4563-4253-b26b-a943b6088e01"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"newPos", "=", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{ - RowBox[{"Position", "[", - RowBox[{"controlSorted", ",", "i"}], "]"}], "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", - RowBox[{"{", - RowBox[{"i", ",", "control"}], "}"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.771083654875172*^9, 3.771083671449525*^9}, { - 3.771084333346782*^9, 3.7710843348860683`*^9}}, - CellLabel->"In[6]:=",ExpressionUUID->"f1771896-7637-4c47-b51e-0e5107cb78e0"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "3", ",", "5", ",", "4", ",", "2"}], "}"}]], "Output", - CellChangeTimes->{3.7710836191165266`*^9, 3.77108367179161*^9, - 3.7710843351003304`*^9, 3.7727031419087267`*^9}, - CellLabel->"Out[6]=",ExpressionUUID->"88f4221d-1729-46ea-ae84-398db8eff5e6"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Position", "[", - RowBox[{"controlSorted", ",", "6"}], "]"}], "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]], "Input", - CellChangeTimes->{{3.7710839460080156`*^9, 3.7710839692234316`*^9}}, - CellLabel->"In[7]:=",ExpressionUUID->"0ddcaf69-d0d3-450b-b037-1b328fbd9d07"], - -Cell[BoxData["4"], "Output", - CellChangeTimes->{{3.7710839469524927`*^9, 3.7710839695642285`*^9}, - 3.7727031419296694`*^9}, - CellLabel->"Out[7]=",ExpressionUUID->"5a5daa5b-ebb1-4489-ac7b-46fc5f4ff6a6"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Position", "[", - RowBox[{"controlSorted", ",", "i"}], "]"}]], "Input", - CellLabel->"In[8]:=",ExpressionUUID->"f679133c-95f4-4f27-b7fd-768d5acfb1dc"], - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Output", - CellChangeTimes->{3.7710834866387167`*^9, 3.771083605370997*^9, - 3.772703141942636*^9}, - CellLabel->"Out[8]=",ExpressionUUID->"226a8318-4a16-41ee-bc47-49a7496e1efe"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{ - RowBox[{"Position", "[", - RowBox[{"controlSorted", ",", "i"}], "]"}], "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", - RowBox[{"{", - RowBox[{"i", ",", "control"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.771083421728474*^9, 3.771083421752408*^9}}, - CellLabel->"In[9]:=",ExpressionUUID->"9e08bcb3-5275-45c9-b1b9-f3eba7913d41"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "3", ",", "5", ",", "4", ",", "2"}], "}"}]], "Output", - CellChangeTimes->{3.7710834227138643`*^9, 3.771083478512913*^9, - 3.771083608577307*^9, 3.7710836484636493`*^9, 3.772703141957595*^9}, - CellLabel->"Out[9]=",ExpressionUUID->"d422a7bf-003b-4b5a-86e8-0dd3accd28b6"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ExchangeSystems", "[", - RowBox[{ - RowBox[{"Transpose", "[", - RowBox[{"{", - RowBox[{"Range", "[", - RowBox[{"2", "^", - RowBox[{"Length", "[", "control", "]"}]}], "]"}], "}"}], "]"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3", ",", "5", ",", "4"}], "}"}], ",", - RowBox[{"ConstantArray", "[", - RowBox[{"2", ",", - RowBox[{"Length", "[", "control", "]"}]}], "]"}]}], "]"}]], "Input", - CellChangeTimes->{ - 3.77108444416837*^9, {3.7710844967595525`*^9, 3.7710845095119324`*^9}}, - CellLabel->"In[10]:=",ExpressionUUID->"d5c4b8e2-cf1b-4dec-99bc-4c11acac9535"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "4", "}"}], ",", - RowBox[{"{", "5", "}"}], ",", - RowBox[{"{", "7", "}"}], ",", - RowBox[{"{", "6", "}"}], ",", - RowBox[{"{", "8", "}"}], ",", - RowBox[{"{", "9", "}"}], ",", - RowBox[{"{", "11", "}"}], ",", - RowBox[{"{", "10", "}"}], ",", - RowBox[{"{", "12", "}"}], ",", - RowBox[{"{", "13", "}"}], ",", - RowBox[{"{", "15", "}"}], ",", - RowBox[{"{", "14", "}"}], ",", - RowBox[{"{", "16", "}"}], ",", - RowBox[{"{", "17", "}"}], ",", - RowBox[{"{", "19", "}"}], ",", - RowBox[{"{", "18", "}"}], ",", - RowBox[{"{", "20", "}"}], ",", - RowBox[{"{", "21", "}"}], ",", - RowBox[{"{", "23", "}"}], ",", - RowBox[{"{", "22", "}"}], ",", - RowBox[{"{", "24", "}"}], ",", - RowBox[{"{", "25", "}"}], ",", - RowBox[{"{", "27", "}"}], ",", - RowBox[{"{", "26", "}"}], ",", - RowBox[{"{", "28", "}"}], ",", - RowBox[{"{", "29", "}"}], ",", - RowBox[{"{", "31", "}"}], ",", - RowBox[{"{", "30", "}"}], ",", - RowBox[{"{", "32", "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7710844292008476`*^9, 3.771084445184073*^9}, { - 3.7710845043678937`*^9, 3.771084510344613*^9}, 3.772703141984522*^9}, - CellLabel->"Out[10]=",ExpressionUUID->"380e81f2-789f-495c-9f1c-3fe0fa97d627"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"orderForSQGs", "=", - RowBox[{"Flatten", "[", - RowBox[{"ExchangeSystems", "[", - RowBox[{ - RowBox[{"Transpose", "[", - RowBox[{"{", - RowBox[{"Range", "[", - RowBox[{"2", "^", - RowBox[{"Length", "[", "control", "]"}]}], "]"}], "}"}], "]"}], ",", - "newPos", ",", - RowBox[{"ConstantArray", "[", - RowBox[{"2", ",", - RowBox[{"Length", "[", "control", "]"}]}], "]"}]}], "]"}], "]"}]}], - ";"}]], "Input", - CellChangeTimes->{{3.7710843244631453`*^9, 3.771084324480129*^9}}, - CellLabel->"In[11]:=",ExpressionUUID->"1f45d4b0-8a3c-42f4-8008-39c98c87e088"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"mat", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"2", ",", "8"}], "]"}]}], ";", - RowBox[{"mat", "//", "MatrixForm"}]}]], "Input", - CellChangeTimes->{{3.7710850272474365`*^9, 3.7710850493061223`*^9}, { - 3.771085319522623*^9, 3.7710853276526103`*^9}}, - CellLabel->"In[12]:=",ExpressionUUID->"9721cd96-c8e1-4cab-b53a-c01074b892d0"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.4633663768016675`", - RowBox[{"-", "0.12169171535560722`"}]}, - {"0.2951023006117587`", "0.5372764720461698`"}, - {"0.3072286275746882`", "0.10154212779438815`"}, - {"0.3669729609567602`", "0.091443115021833`"}, - { - RowBox[{"-", "0.11059388206957319`"}], "0.582467193913409`"}, - { - RowBox[{"-", "0.12355855227265865`"}], "0.3786066872541523`"}, - {"0.10238078287559939`", "0.4157378036607371`"}, - {"0.6566339178380822`", - RowBox[{"-", "0.14967797094410923`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7710835108295765`*^9, 3.7710836042942667`*^9, 3.771083645878744*^9, { - 3.771085040123066*^9, 3.771085050000431*^9}, {3.771085320711632*^9, - 3.7710853280245714`*^9}, 3.772703142055338*^9}, - CellLabel-> - "Out[12]//MatrixForm=",ExpressionUUID->"6a3a4945-8160-4a8a-b5dc-\ -5ba38b68caa5"] -}, Open ]], - -Cell[BoxData[""], "Input", - CellChangeTimes->{3.772016112235772*^9}, - CellLabel->"In[13]:=",ExpressionUUID->"84604959-d020-4258-a2dc-67a313a6b368"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{"controls", "=", " ", - RowBox[{"{", "2", "}"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"targets", "=", - RowBox[{"{", - RowBox[{"3", ",", "4"}], "}"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{" ", - RowBox[{ - RowBox[{"totalBits", "=", "4"}], ";"}]}]}], "Input", - CellChangeTimes->{ - 3.771085040189888*^9, {3.771085252828806*^9, 3.771085291075657*^9}, { - 3.77108534323022*^9, 3.771085346605514*^9}, {3.77108608860752*^9, - 3.771086089076786*^9}, {3.77201593365792*^9, 3.772015967820063*^9}, - 3.7720160330505*^9, {3.77963619491591*^9, 3.779636203486328*^9}, { - 3.7796362669875374`*^9, 3.7796362671012*^9}}, - CellLabel->"In[87]:=",ExpressionUUID->"8f0a5ea8-a93e-4503-ab24-aa4bedc0c511"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"mat", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"ConstantArray", "[", - RowBox[{ - RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", - RowBox[{"2", "^", - RowBox[{"(", - RowBox[{"totalBits", "-", "1"}], ")"}]}]}], "]"}], ",", "1"}], - "]"}]}], ";", - RowBox[{"mat", "//", "MatrixForm"}]}]], "Input", - CellChangeTimes->{{3.7712587506434*^9, 3.7712587715198584`*^9}, { - 3.7712588179054675`*^9, 3.7712588915763717`*^9}, {3.772015771331333*^9, - 3.7720157949863234`*^9}, {3.772015864746521*^9, 3.772015870057719*^9}, { - 3.772016003482802*^9, 3.7720160064869385`*^9}, {3.77201605067485*^9, - 3.7720160551791487`*^9}}, - CellLabel->"In[90]:=",ExpressionUUID->"9b49293d-8c18-49ff-b7f5-f47b86f581df"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"}, - {"1", "0"}, - {"0", "1"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7720158703190165`*^9, {3.7720160433130765`*^9, 3.772016055448429*^9}, - 3.7720162917427945`*^9, 3.772703142091238*^9, 3.779634879726852*^9, { - 3.7796361998320704`*^9, 3.779636205416705*^9}, 3.7796362683738327`*^9}, - CellLabel-> - "Out[90]//MatrixForm=",ExpressionUUID->"0be92299-a0cf-4782-8bdc-\ -d26778b3da99"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"a", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"2", ",", "4"}], "]"}]}], ";", - RowBox[{"a", "//", "MatrixForm"}]}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"b", " ", "=", " ", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"2", ",", "4"}], "]"}]}], ";", - RowBox[{"b", "//", "MatrixForm"}]}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"gates", " ", "=", " ", - RowBox[{"{", - RowBox[{"a", ",", "b"}], "}"}]}], ";"}]}], "Input", - CellChangeTimes->{{3.7712586934883194`*^9, 3.771258723487095*^9}, { - 3.7712606621958055`*^9, 3.7712606633938484`*^9}, {3.771263214077918*^9, - 3.771263215177227*^9}, {3.7712669011015825`*^9, 3.7712669021071754`*^9}, { - 3.7720158496656313`*^9, 3.7720158600280333`*^9}, {3.7720159077775497`*^9, - 3.7720159196422815`*^9}}, - CellLabel->"In[91]:=",ExpressionUUID->"cfd2e5de-bf35-41a1-bb90-db8760709621"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.02566070013641998`"}], "0.6031865423985074`"}, - {"0.9683234412031912`", "0.005238341115230388`"}, - { - RowBox[{"-", "0.15594788954790412`"}], "0.5936136608873711`"}, - {"0.19331709037349284`", "0.5326925721836072`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7712632155611763`*^9, 3.771263566714904*^9, {3.7712637827279053`*^9, - 3.771263798776881*^9}, 3.7712668106856956`*^9, 3.771266932909268*^9, - 3.771267008099491*^9, 3.7712670436348248`*^9, {3.771267194418808*^9, - 3.771267217770482*^9}, {3.7712673259642963`*^9, 3.7712673554660196`*^9}, - 3.7712673873073835`*^9, 3.7720156185124583`*^9, 3.772015761179886*^9, - 3.7720158604887094`*^9, {3.7720160171849937`*^9, 3.7720160411782665`*^9}, - 3.7720162906659794`*^9, 3.772703142105201*^9, 3.77963488602768*^9, - 3.7796362064798613`*^9, 3.779636269098873*^9}, - CellLabel-> - "Out[91]//MatrixForm=",ExpressionUUID->"ffd4446f-3acf-451a-8c7f-\ -28b1de6830d3"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.35308887425298124`", "0.24669231685188336`"}, - {"0.34962009558340956`", "0.17266491082886387`"}, - {"0.08672109590848975`", "0.9166452209045262`"}, - {"0.863465973369791`", - RowBox[{"-", "0.2628521796896557`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7712632155611763`*^9, 3.771263566714904*^9, {3.7712637827279053`*^9, - 3.771263798776881*^9}, 3.7712668106856956`*^9, 3.771266932909268*^9, - 3.771267008099491*^9, 3.7712670436348248`*^9, {3.771267194418808*^9, - 3.771267217770482*^9}, {3.7712673259642963`*^9, 3.7712673554660196`*^9}, - 3.7712673873073835`*^9, 3.7720156185124583`*^9, 3.772015761179886*^9, - 3.7720158604887094`*^9, {3.7720160171849937`*^9, 3.7720160411782665`*^9}, - 3.7720162906659794`*^9, 3.772703142105201*^9, 3.77963488602768*^9, - 3.7796362064798613`*^9, 3.7796362691128674`*^9}, - CellLabel-> - "Out[92]//MatrixForm=",ExpressionUUID->"ea5532f6-8443-409e-bbb2-\ -0f98ad81b07e"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel->"In[94]:=",ExpressionUUID->"8811d4af-9a59-434d-8751-708522e54739"], - -Cell[BoxData[{"controls", "\[IndentingNewLine]", "targets", "\ -\[IndentingNewLine]", - RowBox[{" ", "totalBits"}]}], "Input", - CellChangeTimes->{{3.7720167555877967`*^9, 3.772016756594144*^9}, { - 3.772017335091739*^9, 3.7720173380265846`*^9}, 3.7720175826116247`*^9, { - 3.7720186411722107`*^9, 3.7720186707641325`*^9}, {3.7720187241251564`*^9, - 3.772018732844016*^9}}, - CellLabel->"In[95]:=",ExpressionUUID->"be4e4920-0e27-41ca-86c2-78f770c92454"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", "1", "}"}]], "Input", - CellChangeTimes->{{3.779636334947884*^9, 3.7796363351174283`*^9}}, - CellLabel->"In[99]:=",ExpressionUUID->"8605db4e-ed7a-4dde-a2b2-376ee45cae43"], - -Cell[BoxData[ - RowBox[{"{", "1", "}"}]], "Output", - CellChangeTimes->{3.7720187333546495`*^9, 3.772703142174017*^9, - 3.7796348942927227`*^9, 3.779636209230914*^9, 3.7796362707340918`*^9, - 3.779636335600159*^9}, - CellLabel->"Out[99]=",ExpressionUUID->"9d684bf2-ccf2-4636-94c0-b076c8495459"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"ApplyControl", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"gates", ",", "controls", ",", "targets", ",", "totalBits"}], - "}"}], ",", "mat"}], "]"}], "//", "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7712587352177587`*^9, 3.7712587467439594`*^9}, { - 3.771258903936838*^9, 3.7712589360405664`*^9}, 3.771258984145708*^9, { - 3.771266914215541*^9, 3.7712669144898443`*^9}, {3.771267319005623*^9, - 3.7712673207630816`*^9}, {3.7712673600167522`*^9, 3.771267377451975*^9}, - 3.771267428270006*^9, {3.772015738547476*^9, 3.772015756291704*^9}, { - 3.7720160215580444`*^9, 3.7720160362921505`*^9}, 3.772016319628264*^9, { - 3.77201669843589*^9, 3.772016707123168*^9}}, - CellLabel-> - "In[100]:=",ExpressionUUID->"a129af15-bcff-486f-96b5-cedbc8706265"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.02566070013641998`"}], "0.6031865423985074`"}, - {"0.9683234412031912`", "0.005238341115230388`"}, - { - RowBox[{"-", "0.15594788954790412`"}], "0.5936136608873711`"}, - {"0.19331709037349284`", "0.5326925721836072`"}, - {"0.35308887425298124`", "0.24669231685188336`"}, - {"0.34962009558340956`", "0.17266491082886387`"}, - {"0.08672109590848975`", "0.9166452209045262`"}, - {"0.863465973369791`", - RowBox[{"-", "0.2628521796896557`"}]}, - { - RowBox[{"-", "0.02566070013641998`"}], "0.6031865423985074`"}, - {"0.9683234412031912`", "0.005238341115230388`"}, - { - RowBox[{"-", "0.15594788954790412`"}], "0.5936136608873711`"}, - {"0.19331709037349284`", "0.5326925721836072`"}, - {"0.35308887425298124`", "0.24669231685188336`"}, - {"0.34962009558340956`", "0.17266491082886387`"}, - {"0.08672109590848975`", "0.9166452209045262`"}, - {"0.863465973369791`", - RowBox[{"-", "0.2628521796896557`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.772016656281751*^9, 3.7720167074515967`*^9}, - 3.772016760842671*^9, 3.7720172082250056`*^9, 3.7720173397240467`*^9, - 3.772017547139453*^9, 3.7720175845314918`*^9, {3.7720182968381147`*^9, - 3.77201832653198*^9}, {3.772018635218397*^9, 3.772018672487526*^9}, - 3.7720238399382687`*^9, 3.772703142191969*^9, 3.7796348969412503`*^9, - 3.7796362119031305`*^9, 3.7796362719458504`*^9, 3.779636345976282*^9}, - CellLabel-> - "Out[100]//MatrixForm=",ExpressionUUID->"3e0341af-5c28-438d-bba6-\ -11a6a8ddb57d"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["zero and one control", "Subsection", - CellChangeTimes->{{3.77996861920023*^9, - 3.779968629731641*^9}},ExpressionUUID->"7048d7e0-b7dc-4b46-9637-\ -431ff5e4c96e"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{"zeroControl", "=", - RowBox[{"{", "4", "}"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"oneControl", "=", - RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"multiControl", "=", - RowBox[{"{", "}"}]}], ";"}]}], "Input", - CellChangeTimes->{{3.7799687817330933`*^9, 3.779968829823499*^9}, { - 3.7799693684016104`*^9, 3.7799693685850925`*^9}, {3.779970571037431*^9, - 3.7799705757981544`*^9}, {3.7799714645390916`*^9, 3.779971486507475*^9}, { - 3.7799715299011593`*^9, 3.7799715656690283`*^9}, {3.7799782886828794`*^9, - 3.779978295240095*^9}, {3.7799783431972694`*^9, 3.7799783462097883`*^9}}, - CellLabel-> - "In[674]:=",ExpressionUUID->"fe281db4-8736-4f9a-a5c6-32cc88149a40"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mlist", "=", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"i", ",", - RowBox[{"-", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"i", ",", - RowBox[{"2", "^", - RowBox[{"Length", "[", "multiControl", "]"}]}]}], "}"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.779968734369511*^9, 3.779968767923465*^9}, { - 3.7799688354671755`*^9, 3.7799688484895782`*^9}, {3.779969005697506*^9, - 3.779969007004054*^9}, {3.7799693987624445`*^9, 3.779969403357156*^9}, { - 3.7799774709775267`*^9, 3.779977476201456*^9}}, - CellLabel-> - "In[677]:=",ExpressionUUID->"e4fbbc82-5d8f-4967-8ecc-ca0e87b274c3"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"1", ",", - RowBox[{"-", "1"}]}], "}"}], "}"}]], "Output", - CellChangeTimes->{{3.7799688432180085`*^9, 3.779968849166459*^9}, - 3.7799690079734488`*^9, 3.7799693732964835`*^9, 3.7799694041635537`*^9, { - 3.77997145345584*^9, 3.7799714881022525`*^9}, 3.7799715356557684`*^9, { - 3.779971567067294*^9, 3.7799715761869516`*^9}, 3.7799723618372135`*^9, - 3.7799774767031145`*^9, {3.779978296453919*^9, 3.779978303856491*^9}, - 3.7799783483202453`*^9}, - CellLabel-> - "Out[677]=",ExpressionUUID->"fc7616ad-ffeb-4498-9996-272533ca58d3"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"newMultiControl", " ", "=", " ", "multiControl"}], ";"}]], "Input", - CellChangeTimes->{{3.779969630006873*^9, 3.779969633472255*^9}}, - CellLabel-> - "In[678]:=",ExpressionUUID->"79efe1bd-6325-4fcc-b76b-878e4ddbfcdd"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"control0", "=", - RowBox[{"zeroControl", "[", - RowBox[{"[", "1", "]"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7799695694571905`*^9, 3.779969575279795*^9}, - 3.7799696361480956`*^9}, - CellLabel-> - "In[679]:=",ExpressionUUID->"a3405412-092f-41b5-81cc-b786881d9c7f"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"newMultiControl", "=", - RowBox[{"Sort", "@", - RowBox[{"Append", "[", - RowBox[{"newMultiControl", ",", "control0"}], "]"}]}]}]], "Input", - CellChangeTimes->{{3.7799695872911043`*^9, 3.779969643548361*^9}, { - 3.779970602400215*^9, 3.7799706110557947`*^9}, {3.779971490776081*^9, - 3.7799714924563017`*^9}}, - CellLabel-> - "In[680]:=",ExpressionUUID->"136d9986-96c7-4cd3-842e-e60b80d9aa22"], - -Cell[BoxData[ - RowBox[{"{", "4", "}"}]], "Output", - CellChangeTimes->{ - 3.77996964742836*^9, {3.7799705934602814`*^9, 3.7799706216075215`*^9}, { - 3.7799714562881174`*^9, 3.779971493304571*^9}, 3.779971538159604*^9, { - 3.7799715692414894`*^9, 3.7799715762966576`*^9}, 3.779972365702905*^9, - 3.7799774798846855`*^9, 3.7799783039612093`*^9, 3.779978385512619*^9}, - CellLabel-> - "Out[680]=",ExpressionUUID->"e335c007-79ca-45b9-8d6f-4e8a73bd112f"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"pos", " ", "=", " ", - RowBox[{ - RowBox[{"FirstPosition", "[", - RowBox[{"newMultiControl", ",", "control0"}], "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.7799695267970552`*^9, 3.779969564679431*^9}, { - 3.779969674069392*^9, 3.7799696812938504`*^9}, {3.779969970533224*^9, - 3.7799700164693546`*^9}, 3.779970561329601*^9, 3.7799706265221405`*^9}, - CellLabel-> - "In[681]:=",ExpressionUUID->"93c0346c-608b-4945-9d71-b57af3226346"], - -Cell[BoxData["1"], "Output", - CellChangeTimes->{ - 3.7799706269320765`*^9, {3.779971458310708*^9, 3.7799714944694242`*^9}, - 3.7799715389824085`*^9, {3.7799715699336376`*^9, 3.779971576337582*^9}, - 3.779972366789996*^9, 3.779977480736429*^9, 3.7799783040140824`*^9, - 3.7799783867978716`*^9}, - CellLabel-> - "Out[681]=",ExpressionUUID->"3ede2365-7dd5-4b24-aab4-d9d250274651"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"toAdd", "=", - RowBox[{"ConstantArray", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"2", "^", - RowBox[{"(", - RowBox[{ - RowBox[{"Length", "[", "newMultiControl", "]"}], "-", "pos"}], - ")"}]}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.7799703491880875`*^9, 3.7799703644925756`*^9}, { - 3.779970405093848*^9, 3.779970405328225*^9}, {3.779970452666045*^9, - 3.7799704528834677`*^9}, {3.7799705353817177`*^9, 3.7799705370609145`*^9}, { - 3.77997066901779*^9, 3.779970686046281*^9}, {3.779971547155656*^9, - 3.7799715473591156`*^9}, {3.7799756555288672`*^9, 3.779975657075699*^9}, { - 3.779977378868375*^9, 3.779977380087158*^9}, {3.779977411798401*^9, - 3.779977419727698*^9}}, - CellLabel-> - "In[682]:=",ExpressionUUID->"15ed2923-b31f-4e2e-9e8d-53d02b37fb47"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799756576309595`*^9, 3.7799773804481916`*^9, {3.7799774143043613`*^9, - 3.7799774200359106`*^9}, 3.779977481575712*^9, 3.7799783040549593`*^9, - 3.779978387970624*^9}, - CellLabel-> - "Out[682]=",ExpressionUUID->"f251efc4-45ff-4753-9476-3bd3305bc6fd"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"gates", "=", - RowBox[{ - RowBox[{ - RowBox[{"Join", "[", - RowBox[{"#", ",", "toAdd"}], "]"}], "&"}], "/@", - RowBox[{"Partition", "[", - RowBox[{"mlist", ",", - RowBox[{"2", "^", - RowBox[{"(", - RowBox[{ - RowBox[{"Length", "[", "newMultiControl", "]"}], "-", "pos"}], - ")"}]}]}], "]"}]}]}]], "Input", - CellChangeTimes->{{3.779970488625139*^9, 3.7799705165928698`*^9}, - 3.779970703001476*^9, {3.7799708356021347`*^9, 3.7799708550808644`*^9}, { - 3.7799709146681695`*^9, 3.7799709178717318`*^9}, {3.779971551473242*^9, - 3.7799715516407948`*^9}}, - CellLabel-> - "In[683]:=",ExpressionUUID->"8b22c3a7-7ffd-4597-85d2-f9437c456112"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", - RowBox[{"-", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}], "}"}]], "Output", - CellChangeTimes->{{3.7799705174005423`*^9, 3.7799705388022575`*^9}, { - 3.7799706927033205`*^9, 3.7799707035599813`*^9}, {3.7799708690198*^9, - 3.7799708880227494`*^9}, 3.779970918689499*^9, 3.7799714789237456`*^9, { - 3.7799715412169695`*^9, 3.7799715764283075`*^9}, 3.77997236888645*^9, - 3.779975663292847*^9, 3.7799757746771154`*^9, 3.779977381410616*^9, { - 3.779977417309308*^9, 3.7799774443479185`*^9}, 3.7799774824733577`*^9, - 3.7799783041058235`*^9, 3.7799783894382315`*^9}, - CellLabel-> - "Out[683]=",ExpressionUUID->"4c088c93-1bb1-4674-aea2-8d6af4d0be27"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"gates", "=", - RowBox[{"Flatten", "[", - RowBox[{"gates", ",", "1"}], "]"}]}]], "Input", - CellChangeTimes->{{3.7799708142200813`*^9, 3.7799708165476627`*^9}, { - 3.779970859848256*^9, 3.7799708796357694`*^9}, {3.7799756775161877`*^9, - 3.7799757111007724`*^9}, {3.779975765465535*^9, 3.7799757698728065`*^9}, { - 3.7799773956819057`*^9, 3.779977399446809*^9}, {3.7799774313579845`*^9, - 3.779977431971343*^9}}, - CellLabel-> - "In[684]:=",ExpressionUUID->"742caa33-1b11-41da-8322-a731f2102eeb"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", - RowBox[{"-", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7799757075211115`*^9, 3.7799757116123543`*^9}, { - 3.779975766804491*^9, 3.7799757756213455`*^9}, {3.779977385762474*^9, - 3.7799774452171607`*^9}, 3.779977483433745*^9, 3.77997830416918*^9, - 3.7799783906643515`*^9}, - CellLabel-> - "Out[684]=",ExpressionUUID->"f3382b0c-0d82-4d22-b6e1-383ac61d41b6"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"m", "=", "2"}], ";", - RowBox[{"n", "=", "4"}], ";"}], "\[IndentingNewLine]", - RowBox[{"idmat", "=", - RowBox[{"IdentityMatrix", "[", - RowBox[{"2", "^", - RowBox[{"Min", "[", - RowBox[{"m", ",", "n"}], "]"}]}], "]"}]}]}], "Input", - CellChangeTimes->{{3.7799723860616646`*^9, 3.779972427865265*^9}, { - 3.77997599560323*^9, 3.779975995669053*^9}}, - CellLabel-> - "In[685]:=",ExpressionUUID->"af34c77a-a7fe-4d1d-a26d-217763bede59"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.77997240944639*^9, 3.7799724300418043`*^9}, - 3.7799756653294115`*^9, 3.779975777975053*^9, 3.779975922154583*^9, - 3.7799759961832113`*^9, 3.779978304208077*^9, 3.7799783917324944`*^9}, - CellLabel-> - "Out[686]=",ExpressionUUID->"819d67b8-457c-4d12-9218-675c2043d882"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"idmat", "=", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"ConstantArray", "[", - RowBox[{"idmat", ",", - RowBox[{"2", "^", - RowBox[{"Abs", "[", - RowBox[{"m", "-", "n"}], "]"}]}]}], "]"}], ",", "1"}], - "]"}]}]], "Input", - CellChangeTimes->{{3.779972431780155*^9, 3.779972511400075*^9}, { - 3.7799747350820217`*^9, 3.779974736298769*^9}}, - CellLabel-> - "In[672]:=",ExpressionUUID->"f1b6fa0c-aff6-4d41-be55-99f4486246d9"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.77997245750572*^9, 3.77997251180902*^9}, - 3.7799747373250227`*^9, 3.7799756663527126`*^9, 3.779975779214735*^9, { - 3.7799759128338366`*^9, 3.7799759232796*^9}, 3.7799759975535455`*^9, - 3.77997830425397*^9}, - CellLabel-> - "Out[672]=",ExpressionUUID->"04217a7c-d567-496a-ab68-bd029269e3b0"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["example", "Subsubsection", - CellChangeTimes->{{3.7799782066151867`*^9, 3.779978214597002*^9}, { - 3.779978431973276*^9, - 3.7799784341698074`*^9}},ExpressionUUID->"1ed3bb61-cfec-438b-bdb5-\ -3942da2fe17c"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel->"In[12]:=",ExpressionUUID->"11d8f157-e308-4e21-af1d-2394aacfb41c"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"iso", "=", - RowBox[{"RPickRandomIsometry", "[", - RowBox[{"2", ",", "4"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7799784374809303`*^9, 3.7799784678475184`*^9}}, - CellLabel->"In[5]:=",ExpressionUUID->"254b74bb-5c1c-4072-832b-6e8f63bcdf72"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"stlist", "=", - RowBox[{"{", - RowBox[{ - RowBox[{"DecIsometry", "[", - RowBox[{"iso", ",", - RowBox[{"n", "=", - RowBox[{"{", - RowBox[{"4", ",", "3"}], "}"}]}]}], "]"}], ",", - RowBox[{"DecIsometry", "[", - RowBox[{"iso", ",", - RowBox[{"n", "=", - RowBox[{"{", - RowBox[{"4", ",", "3"}], "}"}]}]}], "]"}]}], "}"}]}], ";"}]], "Input", - CellChangeTimes->{{3.77997857836312*^9, 3.7799785995400205`*^9}, { - 3.7799789078622904`*^9, 3.7799789104737053`*^9}, {3.7799800294702034`*^9, - 3.7799800420490756`*^9}, {3.779980256822105*^9, 3.779980314591748*^9}}, - CellLabel->"In[6]:=",ExpressionUUID->"c98966fe-46bc-4d46-89e9-aa815000cce0"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat", "=", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"ConstantArray", "[", - RowBox[{ - RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", - RowBox[{"2", "^", "3"}]}], "]"}], ",", "1"}], "]"}]}]], "Input", - CellChangeTimes->{{3.7799786082504005`*^9, 3.779978665794978*^9}, { - 3.7799803250281787`*^9, 3.7799803251468616`*^9}}, - CellLabel->"In[7]:=",ExpressionUUID->"0a68b0a9-839e-4c8e-881a-1fc5529b1f6a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.779978648497476*^9, 3.779978666300626*^9}, - 3.7799789122406993`*^9, 3.7799791155795984`*^9, 3.7799793748746705`*^9, { - 3.7799803169364767`*^9, 3.77998032661195*^9}, 3.7799831118232794`*^9, - 3.7799831974258585`*^9, 3.779983274335801*^9}, - CellLabel->"Out[7]=",ExpressionUUID->"2522fb42-e755-4c61-bb8e-5cf8353e382d"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["stlist"], "Input", - CellChangeTimes->{{3.7799787331532803`*^9, 3.7799787340129776`*^9}}, - CellLabel->"In[8]:=",ExpressionUUID->"261e6472-558e-4745-aef4-e58205aeb6c7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8951893583914292`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.726817557094873`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.03271943165176`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.339858876630328`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.841010841922604`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.383737643949276`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8951893583914292`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.726817557094873`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.03271943165176`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "2.339858876630328`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.841010841922604`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.383737643949276`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{ - 3.779978734489437*^9, 3.779978913313308*^9, 3.7799791164263344`*^9, - 3.7799793755438805`*^9, {3.779980034083682*^9, 3.7799800455040426`*^9}, - 3.7799803308507943`*^9, 3.7799831124741716`*^9, 3.7799831984493585`*^9, - 3.7799832744554853`*^9}, - CellLabel->"Out[8]=",ExpressionUUID->"96d5d1b7-0a32-4a91-97e7-e2071252a544"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CTRLSTM", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", "stlist", ",", "4", ",", "mat"}], - "]"}]], "Input", - CellChangeTimes->{{3.77997849341969*^9, 3.7799785565778008`*^9}, - 3.779978604151105*^9, {3.7799802947634945`*^9, 3.779980297421373*^9}, { - 3.7799803691250997`*^9, 3.779980369285022*^9}, {3.7799804054909544`*^9, - 3.7799804075544224`*^9}, {3.7799807812715816`*^9, - 3.7799807871619816`*^9}, {3.779983156163785*^9, 3.779983157524953*^9}}, - CellLabel->"In[13]:=",ExpressionUUID->"ed632319-6852-4121-a8f9-172faed4d993"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.058728315345671606`"}], "+", - RowBox[{"4.3368086899420177`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.18498866290216093`", "\[VeryThinSpace]", "+", - RowBox[{"6.106226635438361`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.590792016796339`", "\[VeryThinSpace]", "+", - RowBox[{"3.3306690738754696`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.00543158909080752`"}], "+", - RowBox[{"6.683022191200649`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.094266505737505`", "\[VeryThinSpace]", "+", - RowBox[{"9.367506770274758`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.9778533531650633`", "\[VeryThinSpace]", "+", - RowBox[{"4.996003610813204`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.7991430433673405`", "\[VeryThinSpace]", "+", - RowBox[{"2.7755575615628914`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.0977369538171788`"}], "+", - RowBox[{"7.077671781985373`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.058728315345671606`"}], "+", - RowBox[{"4.3368086899420177`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.18498866290216093`", "\[VeryThinSpace]", "+", - RowBox[{"6.106226635438361`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.590792016796339`", "\[VeryThinSpace]", "+", - RowBox[{"3.3306690738754696`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.00543158909080752`"}], "+", - RowBox[{"6.683022191200649`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.094266505737505`", "\[VeryThinSpace]", "+", - RowBox[{"9.367506770274758`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.9778533531650633`", "\[VeryThinSpace]", "+", - RowBox[{"4.996003610813204`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.7991430433673405`", "\[VeryThinSpace]", "+", - RowBox[{"2.7755575615628914`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.0977369538171788`"}], "+", - RowBox[{"7.077671781985373`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.779979618944105*^9, 3.7799797553762336`*^9}, { - 3.7799798119568987`*^9, 3.7799798881880827`*^9}, {3.779979920539012*^9, - 3.779979936826373*^9}, {3.7799799692811947`*^9, 3.7799799808996935`*^9}, { - 3.7799800515364275`*^9, 3.779980081617144*^9}, {3.7799801340740137`*^9, - 3.77998016133267*^9}, 3.7799802144360285`*^9, {3.779980334568362*^9, - 3.779980408165758*^9}, {3.7799807836300597`*^9, 3.779980787794261*^9}, { - 3.77998310525695*^9, 3.7799831134567933`*^9}, {3.7799831525368195`*^9, - 3.779983158190178*^9}, 3.7799832004551063`*^9, {3.77998327458516*^9, - 3.779983314544655*^9}}, - CellLabel->"Out[13]=",ExpressionUUID->"bb515e1c-8452-4071-b379-ec183d121e94"] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Reconstruct QR decomposed channel", "Subsection", - CellChangeTimes->{{3.7697057140234365`*^9, 3.7697057214405427`*^9}, - 3.7697057587679043`*^9, {3.772703234184971*^9, - 3.7727032784341965`*^9}},ExpressionUUID->"f1fffc99-3589-4979-b550-\ -0d9ae2cb59cb"], - -Cell[CellGroupData[{ - -Cell["Not reuse ancilla", "Subsubsection", - CellChangeTimes->{{3.7727105119923897`*^9, - 3.772710546857482*^9}},ExpressionUUID->"8ad81ba9-5c81-4670-819e-\ -248c832783dc"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel-> - "In[239]:=",ExpressionUUID->"bde3563c-2203-4b00-82ee-45f37a410f70"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"ConstantArray", "[", - RowBox[{ - RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", "4"}], "]"}], ",", - "1"}], "]"}]}]], "Input", - CellChangeTimes->{{3.772025992756385*^9, 3.772026048384486*^9}}, - CellLabel-> - "In[240]:=",ExpressionUUID->"72827175-87ac-4221-9ff2-cbf3aa1d1593"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.77202603935861*^9, 3.772026057607686*^9}, - 3.7720261877865753`*^9, 3.77202848565559*^9, 3.7720291582732863`*^9, - 3.772705817704956*^9, 3.772706096487542*^9, 3.7727063232819915`*^9, - 3.772706943159218*^9, 3.7727071169445033`*^9, {3.7727073814371014`*^9, - 3.772707387756702*^9}, 3.772707466320668*^9, {3.7727075083913136`*^9, - 3.7727075493738346`*^9}, 3.772707584906558*^9, 3.7727076877568316`*^9, - 3.772708765080884*^9, 3.772709517843664*^9, 3.779636388581236*^9, - 3.779716715173791*^9}, - CellLabel-> - "Out[240]=",ExpressionUUID->"c97973f6-5733-4218-9d02-1b27cd9720c8"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], ";"}]], "Input", - CellLabel-> - "In[241]:=",ExpressionUUID->"d55f2a5a-3870-4e7b-8304-9861f51ea8ed"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{ - 3.7727069370634575`*^9, {3.772707102464822*^9, 3.7727071053587656`*^9}}, - CellLabel-> - "In[242]:=",ExpressionUUID->"1b35cba7-89d2-4861-8101-587635c2710f"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.35619449019234`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.367896348788299`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897967`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.36789634878830024`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.747829798085383`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7478297980853839`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8252160320146114`", ",", "1"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7727069344876285`*^9, 3.772706944936799*^9}, { - 3.7727070960859756`*^9, 3.772707117422868*^9}, 3.772707388249417*^9, - 3.77270746681343*^9, {3.7727075088636723`*^9, 3.772707549847028*^9}, - 3.772707585397309*^9, 3.772707688231538*^9, 3.7727087655796843`*^9, - 3.7727089192520857`*^9, 3.772709519280876*^9, 3.779636391709736*^9, - 3.77971672098876*^9}, - CellLabel-> - "During evaluation of \ -In[242]:=",ExpressionUUID->"d10e0f78-8254-4f87-918e-734185138568"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.7727069344876285`*^9, 3.772706944936799*^9}, { - 3.7727070960859756`*^9, 3.772707117422868*^9}, 3.772707388249417*^9, - 3.77270746681343*^9, {3.7727075088636723`*^9, 3.772707549847028*^9}, - 3.772707585397309*^9, 3.772707688231538*^9, 3.7727087655796843`*^9, - 3.7727089192520857`*^9, 3.772709519280876*^9, 3.779636391709736*^9, - 3.7797167209950294`*^9}, - CellLabel-> - "During evaluation of \ -In[242]:=",ExpressionUUID->"41dd9f10-e5ce-4045-b350-b99973382ba8"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.919007564537376`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.6933845171438264`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7218445861763509`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4730683981338817`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.33957524155209934`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589794`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.4155688782712605`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.4638147721230657`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.33262780408475956`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.355191618407174`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.1849046446747649`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.165521677461635`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.144454145812864`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7727069344876285`*^9, 3.772706944936799*^9}, { - 3.7727070960859756`*^9, 3.772707117422868*^9}, 3.772707388249417*^9, - 3.77270746681343*^9, {3.7727075088636723`*^9, 3.772707549847028*^9}, - 3.772707585397309*^9, 3.772707688231538*^9, 3.7727087655796843`*^9, - 3.7727089192520857`*^9, 3.772709519280876*^9, 3.779636391709736*^9, - 3.7797167210262904`*^9}, - CellLabel-> - "During evaluation of \ -In[242]:=",ExpressionUUID->"ef467880-e6e8-405c-9302-2b8775a21a34"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"oneControlled", " ", "=", " ", - RowBox[{"result", "[", - RowBox[{"[", "1", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.769704731634808*^9, 3.7697047323536377`*^9}, { - 3.7697105602078896`*^9, 3.7697105777878723`*^9}, {3.772025649512724*^9, - 3.772025701430848*^9}, 3.7720279940178895`*^9}, - CellLabel-> - "In[244]:=",ExpressionUUID->"1fa836fc-2d4f-41d3-9b4f-09852e6de0bf"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.35619449019234`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.367896348788299`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897967`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.36789634878830024`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.747829798085383`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589794`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7478297980853839`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8252160320146114`", ",", "1"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.769704719021367*^9, 3.769704732888208*^9}, - 3.769705080144116*^9, 3.7697104671867237`*^9, {3.7697105612551126`*^9, - 3.7697105783623333`*^9}, 3.770802215913149*^9, {3.7720256465131636`*^9, - 3.772025702559804*^9}, 3.7720260580774307`*^9, 3.772026188584442*^9, - 3.772027994757861*^9, 3.7720284867780333`*^9, 3.772029159287692*^9, - 3.772705818969184*^9, 3.772706048720948*^9, 3.772706097651674*^9, - 3.7727063238554573`*^9, 3.7727064439104433`*^9, 3.7727069451212378`*^9, { - 3.772707096249537*^9, 3.7727071174517775`*^9}, 3.7727073882793355`*^9, - 3.7727074668433*^9, {3.7727075088925967`*^9, 3.772707549875951*^9}, - 3.772707585427286*^9, 3.772707688257494*^9, 3.7727087656056147`*^9, - 3.7727089210103807`*^9, 3.7727095196631308`*^9, 3.7796363930560045`*^9, - 3.7797167228409333`*^9}, - CellLabel-> - "Out[244]=",ExpressionUUID->"d4dc2d26-3b65-4706-9344-fe1e2710910b"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"m1", "=", - RowBox[{"CTRLSTM", "[", - RowBox[{ - RowBox[{"oneControlled", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"oneControlled", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "3", ",", "mat"}], "]"}]}], ";", - " ", - RowBox[{"m1", "//", "MatrixForm"}], ";"}]], "Input", - CellChangeTimes->{{3.769701426112116*^9, 3.7697014731443233`*^9}, { - 3.7697018854860377`*^9, 3.7697018864125323`*^9}, {3.769704644419558*^9, - 3.769704652226653*^9}, {3.7697051862859745`*^9, 3.769705191250354*^9}, { - 3.769705770323189*^9, 3.7697057777698374`*^9}, {3.7697060029134865`*^9, - 3.7697060114905376`*^9}, {3.769710591400463*^9, 3.7697106161751995`*^9}, { - 3.7720257104005213`*^9, 3.772025734056565*^9}, {3.7720260542797494`*^9, - 3.7720260544483156`*^9}, {3.7720279849153547`*^9, 3.772028006984215*^9}, { - 3.7720280630580077`*^9, 3.7720280699603415`*^9}, 3.772706959334568*^9}, - CellLabel-> - "In[245]:=",ExpressionUUID->"118941da-7c0a-475c-bf88-fff0a5c3946e"], - -Cell[CellGroupData[{ - -Cell[BoxData["m1"], "Input", - CellChangeTimes->{{3.772709540221324*^9, 3.772709541122034*^9}}, - CellLabel-> - "In[246]:=",ExpressionUUID->"1ae434e9-bbc4-4a39-bb77-39d33d236134"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.23408157226441142`"}], "-", - RowBox[{"0.5651229064623573`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.04974828799204908`"}], "-", - RowBox[{"0.1201029915752481`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "2.5374333461953526`*^-17"}], "+", - RowBox[{"2.9918958989768564`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.1938805579823032`"}], "-", - RowBox[{"0.4680690725613399`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.23408157226441142`"}], "-", - RowBox[{"0.5651229064623573`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.04974828799204908`"}], "-", - RowBox[{"0.1201029915752481`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "2.5374333461953526`*^-17"}], "+", - RowBox[{"2.9918958989768564`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.1938805579823032`"}], "-", - RowBox[{"0.4680690725613399`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.30274151835013985`", "\[VeryThinSpace]", "+", - RowBox[{"0.7308826794943298`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.03846567703731093`"}], "-", - RowBox[{"0.09286435918933945`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"1.2071925946155353`*^-16", "-", - RowBox[{"6.106978852843041`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.3238864587708461`"}], "-", - RowBox[{"0.7819310814335683`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.30274151835013985`", "\[VeryThinSpace]", "+", - RowBox[{"0.7308826794943298`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.03846567703731093`"}], "-", - RowBox[{"0.09286435918933945`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"1.2071925946155353`*^-16", "-", - RowBox[{"6.106978852843041`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.3238864587708461`"}], "-", - RowBox[{"0.7819310814335683`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.772709543520133*^9, 3.779636395615842*^9, - 3.779716727216337*^9}, - CellLabel-> - "Out[246]=",ExpressionUUID->"96b58794-6d2a-4778-9fce-9a65cc692616"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"m2", "=", - RowBox[{"CTRLSTM", "[", - RowBox[{ - RowBox[{ - RowBox[{"result", "[", - RowBox[{"[", "3", "]"}], "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{ - RowBox[{"result", "[", - RowBox[{"[", "3", "]"}], "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "3", ",", "m1"}], "]"}]}], ";", - RowBox[{"m2", "//", "MatrixForm"}], ";"}]], "Input", - CellChangeTimes->{{3.772028072666094*^9, 3.772028097489423*^9}, { - 3.772028455555725*^9, 3.772028455647479*^9}, {3.7727058470830393`*^9, - 3.772705848418579*^9}, {3.772706081945285*^9, 3.772706086117523*^9}, { - 3.7727064511931963`*^9, 3.7727064525199385`*^9}, 3.7727071652699785`*^9}, - CellLabel-> - "In[247]:=",ExpressionUUID->"5ff2413f-4cc6-469b-92f2-5dcdc5553e16"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "1", "]"}], "]"}], "//", - "MatrixForm"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "2", "]"}], "]"}], "//", "MatrixForm"}]}], "Input", - CellChangeTimes->{{3.7720294334986773`*^9, 3.772029435890855*^9}, { - 3.772029716595066*^9, 3.7720297189012384`*^9}, 3.7727069726226735`*^9, - 3.7727070875575123`*^9, {3.772707674453638*^9, 3.7727076747348475`*^9}}, - CellLabel-> - "In[248]:=",ExpressionUUID->"921c32fb-f869-4db3-9584-87eb2cea9c1b"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.3676239727153305`", - RowBox[{"-", "0.04982331555275868`"}]}, - {"0.3807152492381337`", "0.1815785283181755`"}, - {"0.30263910488233325`", "0.014648272353150388`"}, - {"0.04976110690896432`", "0.4877604448841977`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.772707089704313*^9, 3.772707117499654*^9}, - 3.7727073883162365`*^9, 3.772707466880661*^9, {3.7727075089284725`*^9, - 3.7727075499238234`*^9}, 3.7727075854770794`*^9, 3.772707688296389*^9, - 3.7727087656445107`*^9, 3.779636398723999*^9, 3.7797167362737894`*^9}, - CellLabel-> - "Out[248]//MatrixForm=",ExpressionUUID->"aa0be6cc-c844-411b-aaf2-\ -cf8580a96dbb"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"-", "0.13088569533619338`"}], "0.554728667960121`"}, - {"0.3050000408826399`", "0.015808669911105966`"}, - {"0.6943801367681155`", - RowBox[{"-", "0.1806747145786433`"}]}, - {"0.18309028810289446`", "0.6211319426783094`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.772707089704313*^9, 3.772707117499654*^9}, - 3.7727073883162365`*^9, 3.772707466880661*^9, {3.7727075089284725`*^9, - 3.7727075499238234`*^9}, 3.7727075854770794`*^9, 3.772707688296389*^9, - 3.7727087656445107`*^9, 3.779636398723999*^9, 3.7797167362915354`*^9}, - CellLabel-> - "Out[249]//MatrixForm=",ExpressionUUID->"361f6400-7723-4c38-955f-\ -be1eb4307569"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"1", ";;", "4"}], "]"}], "]"}], "/", - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"1", ",", "1", ",", "1"}], "]"}], "]"}]}], "//", - "MatrixForm"}]], "Input", - CellLabel-> - "In[250]:=",ExpressionUUID->"d1b8d109-b4bd-49bd-b4bb-e73fe2f1b1e1"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.3676239727153305`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.049823315552759005`"}], "+", - RowBox[{"3.826355614806846`*^-17", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.38071524923813493`", "\[VeryThinSpace]", "-", - RowBox[{"2.040722994563651`*^-17", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.18157852831817572`", "\[VeryThinSpace]", "+", - RowBox[{"5.305879785865493`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.3026391048823336`", "\[VeryThinSpace]", "-", - RowBox[{"8.162891978254605`*^-17", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.014648272353149626`", "\[VeryThinSpace]", "+", - RowBox[{"1.5624285427127954`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.049761106908965035`", "\[VeryThinSpace]", "-", - RowBox[{"1.275451871602282`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.48776044488419834`", "\[VeryThinSpace]", "+", - RowBox[{"7.142530480972779`*^-16", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.772707508946015*^9, 3.7727075499407773`*^9}, - 3.7727075854940333`*^9, 3.7727076883173075`*^9, 3.7727087656654267`*^9, - 3.779636400938074*^9, 3.779716740340905*^9}, - CellLabel-> - "Out[250]//MatrixForm=",ExpressionUUID->"9b215597-5341-4d9b-a496-\ -97c062e5da34"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"5", ";;", "8"}], "]"}], "]"}], "/", - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"5", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"2", ",", "1", ",", "1"}], "]"}], "]"}]}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7720296085161486`*^9, 3.7720296138089113`*^9}, { - 3.772029644343336*^9, 3.772029674032715*^9}, {3.7720297087380204`*^9, - 3.7720297100531797`*^9}, 3.772706973718531*^9, 3.7727070883658934`*^9, { - 3.772707457064067*^9, 3.7727074606009293`*^9}, 3.772707680232662*^9}, - CellLabel-> - "In[251]:=",ExpressionUUID->"48e74a4c-54bc-4bb1-b542-97bab6b45c90"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{ - RowBox[{"-", "0.13088569533619338`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.5547286679601149`", "\[VeryThinSpace]", "-", - RowBox[{"3.1968708762389377`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.3050000408826391`", "\[VeryThinSpace]", "-", - RowBox[{"1.3078108130068382`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.015808669911103093`", "\[VeryThinSpace]", "+", - RowBox[{"7.901356995249647`*^-17", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.6943801367681077`", "\[VeryThinSpace]", "+", - RowBox[{"4.940618626914722`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.18067471457864118`"}], "-", - RowBox[{"5.6671801896962985`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.18309028810289418`", "\[VeryThinSpace]", "+", - RowBox[{"7.992177190597344`*^-17", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.6211319426783047`", "\[VeryThinSpace]", "-", - RowBox[{"1.7437477506757842`*^-16", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.772707098935543*^9, 3.7727071175166073`*^9}, - 3.7727073883332963`*^9, 3.7727074668976154`*^9, {3.772707508964964*^9, - 3.772707549956735*^9}, 3.772707585512983*^9, 3.772707688334262*^9, - 3.772708765682381*^9, 3.779636403013522*^9, 3.779716744744968*^9}, - CellLabel-> - "Out[251]//MatrixForm=",ExpressionUUID->"3dcca7d2-40e4-4c72-bdca-\ -697089692200"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"ConstantArray", "[", - RowBox[{ - RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", "4"}], "]"}], ",", - "1"}], "]"}]}]], "Input", - CellChangeTimes->{{3.772025992756385*^9, 3.772026048384486*^9}}, - CellLabel-> - "In[369]:=",ExpressionUUID->"933db7cd-1e2d-4688-a374-0219146ba961"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.77202603935861*^9, 3.772026057607686*^9}, - 3.7720261877865753`*^9, 3.77202848565559*^9, 3.7720291582732863`*^9, - 3.772705817704956*^9, 3.772706096487542*^9, 3.7727063232819915`*^9, - 3.772706943159218*^9, 3.772707117530571*^9, 3.772707388346249*^9, - 3.772707466911579*^9, {3.7727075089819183`*^9, 3.7727075499747114`*^9}, - 3.77270758552894*^9, 3.7727076883502474`*^9, 3.7727087657023287`*^9}, - CellLabel-> - "Out[369]=",ExpressionUUID->"a140e678-6801-4d51-b374-a819b62e4ff3"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["reuse ancilla", "Subsubsection", - CellChangeTimes->{{3.7727105119923897`*^9, - 3.7727105539935026`*^9}},ExpressionUUID->"44fc2d08-07b6-40c6-be40-\ -884154f577ee"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"result", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{ - 3.7727069370634575`*^9, 3.772706990446743*^9, {3.772707109400893*^9, - 3.772707111020396*^9}}, - CellLabel-> - "In[235]:=",ExpressionUUID->"b63d1dbc-dff9-430a-9040-66d1a871def2"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782132`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.093948765683466`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897873`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.093948765683467`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6942943214056656`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6942943214056647`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4559857921432535`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{{3.7727069344876285`*^9, 3.772706944936799*^9}, - 3.7727069915376263`*^9, {3.772707112020936*^9, 3.772707117990371*^9}, - 3.772707388828983*^9, 3.772707467376603*^9, {3.7727075094437294`*^9, - 3.7727075504355664`*^9}, 3.77270758600766*^9, 3.772707688803651*^9, - 3.772708766188651*^9, 3.779636430488329*^9, 3.7797166896385255`*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"d096f3bf-ccf7-4d93-9050-7414481cbcc2"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{{3.7727069344876285`*^9, 3.772706944936799*^9}, - 3.7727069915376263`*^9, {3.772707112020936*^9, 3.772707117990371*^9}, - 3.772707388828983*^9, 3.772707467376603*^9, {3.7727075094437294`*^9, - 3.7727075504355664`*^9}, 3.77270758600766*^9, 3.772707688803651*^9, - 3.772708766188651*^9, 3.779636430488329*^9, 3.779716689659307*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"0fc1dfeb-976b-4d74-978c-1f077a7aee38"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.7300466211899743`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.159879974730964`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.1325792984617857`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3584432819645504`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.14077334924414`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.345815770614987`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.3560204753922913`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.800265266658344`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.6193893345392043`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948968`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9153040907514528`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9823493220573918`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "6.265411361165486`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7727069344876285`*^9, 3.772706944936799*^9}, - 3.7727069915376263`*^9, {3.772707112020936*^9, 3.772707117990371*^9}, - 3.772707388828983*^9, 3.772707467376603*^9, {3.7727075094437294`*^9, - 3.7727075504355664`*^9}, 3.77270758600766*^9, 3.772707688803651*^9, - 3.772708766188651*^9, 3.779636430488329*^9, 3.7797166896914244`*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"ae508980-5e6e-4473-9b0f-28cdf262105f"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"oneControlled", " ", "=", " ", - RowBox[{"result", "[", - RowBox[{"[", "1", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.769704731634808*^9, 3.7697047323536377`*^9}, { - 3.7697105602078896`*^9, 3.7697105777878723`*^9}, {3.772025649512724*^9, - 3.772025701430848*^9}, 3.7720279940178895`*^9}, - CellLabel-> - "In[237]:=",ExpressionUUID->"cde5f7c7-9f75-41fe-8dea-87896d5c8878"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782132`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.093948765683466`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897873`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.093948765683467`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6942943214056656`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6942943214056647`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4559857921432535`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.769704719021367*^9, 3.769704732888208*^9}, - 3.769705080144116*^9, 3.7697104671867237`*^9, {3.7697105612551126`*^9, - 3.7697105783623333`*^9}, 3.770802215913149*^9, {3.7720256465131636`*^9, - 3.772025702559804*^9}, 3.7720260580774307`*^9, 3.772026188584442*^9, - 3.772027994757861*^9, 3.7720284867780333`*^9, 3.772029159287692*^9, - 3.772705818969184*^9, 3.772706048720948*^9, 3.772706097651674*^9, - 3.7727063238554573`*^9, 3.7727064439104433`*^9, 3.7727069451212378`*^9, - 3.772707023670822*^9, 3.772707118033258*^9, 3.772707388916747*^9, - 3.7727074674224806`*^9, {3.7727075094951277`*^9, 3.7727075504844356`*^9}, - 3.772707586049547*^9, 3.7727076888445377`*^9, 3.772708766240513*^9, - 3.7796364318945646`*^9, 3.7797166917321587`*^9}, - CellLabel-> - "Out[237]=",ExpressionUUID->"d85d318d-6c0a-430b-a189-d42ebe8a5fd9"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"m1", "=", - RowBox[{"CTRLSTM", "[", - RowBox[{ - RowBox[{"oneControlled", "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{"oneControlled", "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "3", ",", "mat"}], "]"}]}], ";", - " ", - RowBox[{"m1", "//", "MatrixForm"}], ";"}]], "Input", - CellChangeTimes->{{3.769701426112116*^9, 3.7697014731443233`*^9}, { - 3.7697018854860377`*^9, 3.7697018864125323`*^9}, {3.769704644419558*^9, - 3.769704652226653*^9}, {3.7697051862859745`*^9, 3.769705191250354*^9}, { - 3.769705770323189*^9, 3.7697057777698374`*^9}, {3.7697060029134865`*^9, - 3.7697060114905376`*^9}, {3.769710591400463*^9, 3.7697106161751995`*^9}, { - 3.7720257104005213`*^9, 3.772025734056565*^9}, {3.7720260542797494`*^9, - 3.7720260544483156`*^9}, {3.7720279849153547`*^9, 3.772028006984215*^9}, { - 3.7720280630580077`*^9, 3.7720280699603415`*^9}, 3.772706959334568*^9, - 3.7727075341737947`*^9}, - CellLabel-> - "In[117]:=",ExpressionUUID->"be4490df-cc91-4ec5-af9d-998492e0cd64"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"a", " ", "=", " ", - RowBox[{"Range", "[", "3", "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"a", "[", - RowBox[{"[", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}], "]"}], "]"}], "=", - RowBox[{"a", "[", - RowBox[{"[", - RowBox[{"{", - RowBox[{"2", ",", "1"}], "}"}], "]"}], "]"}]}], - ";"}], "\[IndentingNewLine]", "a"}], "Input", - CellChangeTimes->{{3.772708508919651*^9, 3.7727085493375406`*^9}, { - 3.7727086684547896`*^9, 3.7727087049698153`*^9}}, - CellLabel-> - "In[118]:=",ExpressionUUID->"04f0a047-f7eb-4989-a041-9394df35c51d"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"2", ",", "1", ",", "3"}], "}"}]], "Output", - CellChangeTimes->{ - 3.772708550016115*^9, {3.7727086791305027`*^9, 3.772708705453066*^9}, - 3.7727087662694354`*^9, 3.7796364341565456`*^9}, - CellLabel-> - "Out[120]=",ExpressionUUID->"e3b68f1f-d9ae-4b86-a01b-0f76d6c3e6dc"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"m1", "=", - RowBox[{ - RowBox[{ - RowBox[{"Flatten", "[", - RowBox[{"#", ",", "1"}], "]"}], "&"}], "@", - RowBox[{"ExchangeSystems", "[", - RowBox[{ - RowBox[{"Partition", "[", - RowBox[{"m1", ",", "1"}], "]"}], ",", "a", ",", - RowBox[{"ConstantArray", "[", - RowBox[{"2", ",", - RowBox[{"Length", "[", "a", "]"}]}], "]"}]}], "]"}]}]}]], "Input", - CellChangeTimes->{{3.772707978878492*^9, 3.772707995493518*^9}, { - 3.77270849142202*^9, 3.77270849729976*^9}, {3.77270871722322*^9, - 3.772708756195547*^9}}, - CellLabel-> - "In[121]:=",ExpressionUUID->"eb9c9ace-8c1a-4cc9-9353-cd372d2c0b47"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.6624254878993991`", "\[VeryThinSpace]", "+", - RowBox[{"0.2743856211495458`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.135933766113271`", "\[VeryThinSpace]", "+", - RowBox[{"0.05630560950856918`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"3.4520340929382805`*^-17", "+", - RowBox[{"1.9108655780463182`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.7124615928710579`", "\[VeryThinSpace]", "+", - RowBox[{"0.29511125443713077`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.6624254878993991`", "\[VeryThinSpace]", "+", - RowBox[{"0.2743856211495458`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.135933766113271`", "\[VeryThinSpace]", "+", - RowBox[{"0.05630560950856918`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"3.4520340929382805`*^-17", "+", - RowBox[{"1.9108655780463182`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.7124615928710579`", "\[VeryThinSpace]", "+", - RowBox[{"0.29511125443713077`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.6440076580092171`", "\[VeryThinSpace]", "+", - RowBox[{"0.2667567062195518`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.13982130525891592`"}], "-", - RowBox[{"0.057915880946951395`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "3.550758038077975`*^-17"}], "+", - RowBox[{"8.217146275756712`*^-17", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.5549088962188878`", "\[VeryThinSpace]", "+", - RowBox[{"0.22985079069534775`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.6440076580092171`", "\[VeryThinSpace]", "+", - RowBox[{"0.2667567062195518`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.13982130525891592`"}], "-", - RowBox[{"0.057915880946951395`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "3.550758038077975`*^-17"}], "+", - RowBox[{"8.217146275756712`*^-17", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.5549088962188878`", "\[VeryThinSpace]", "+", - RowBox[{"0.22985079069534775`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.7727087278621902`*^9, 3.7727087662863903`*^9}, - 3.7727103648773527`*^9, 3.779636435511671*^9}, - CellLabel-> - "Out[121]=",ExpressionUUID->"22014542-f2e0-4146-807b-9161c5c5124c"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"m2", "=", - RowBox[{"CTRLSTM", "[", - RowBox[{ - RowBox[{ - RowBox[{"result", "[", - RowBox[{"[", "3", "]"}], "]"}], "[", - RowBox[{"[", "2", "]"}], "]"}], ",", - RowBox[{ - RowBox[{"result", "[", - RowBox[{"[", "3", "]"}], "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}], ",", "3", ",", "m1"}], "]"}]}], ";", - RowBox[{"m2", "//", "MatrixForm"}], ";"}]], "Input", - CellChangeTimes->{{3.772028072666094*^9, 3.772028097489423*^9}, { - 3.772028455555725*^9, 3.772028455647479*^9}, {3.7727058470830393`*^9, - 3.772705848418579*^9}, {3.772706081945285*^9, 3.772706086117523*^9}, { - 3.7727064511931963`*^9, 3.7727064525199385`*^9}, {3.7727070284164534`*^9, - 3.7727070504708724`*^9}, {3.7796366663911695`*^9, 3.779636669223115*^9}}, - CellLabel-> - "In[123]:=",ExpressionUUID->"44f307c7-c1c7-4210-8780-c04559ca8a42"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "1", "]"}], "]"}], "//", - "MatrixForm"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"krausList", "[", - RowBox[{"[", "2", "]"}], "]"}], "//", "MatrixForm"}]}], "Input", - CellChangeTimes->{{3.7720294334986773`*^9, 3.772029435890855*^9}, { - 3.772029716595066*^9, 3.7720297189012384`*^9}, 3.7727069726226735`*^9, - 3.7727070526417613`*^9, {3.7727076492285595`*^9, 3.7727076592142563`*^9}}, - CellLabel-> - "In[124]:=",ExpressionUUID->"434248f8-7485-4839-b60f-4acc3988cb95"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.026910912744305737`", "0.5824907165155764`"}, - {"0.060821621806676454`", "0.2930536350183992`"}, - {"0.5608637930582838`", - RowBox[{"-", "0.18399306408047733`"}]}, - {"0.4417050314912969`", "0.3966247203461242`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7727070528312173`*^9, 3.7727071180641756`*^9, 3.7727073889476924`*^9, - 3.772707467455392*^9, {3.7727075095260706`*^9, 3.7727075505352993`*^9}, - 3.772707586094211*^9, {3.772707654092471*^9, 3.772707688885429*^9}, - 3.7727087663143163`*^9, 3.7796366799791174`*^9}, - CellLabel-> - "Out[124]//MatrixForm=",ExpressionUUID->"e90041df-8054-405b-a286-\ -b44e47d102a2"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.029796893429250994`", "0.019341236807309377`"}, - {"0.012244844346563533`", "0.5705654717369462`"}, - {"0.021786384893583366`", "0.17197241699030352`"}, - {"0.6959831652057282`", - RowBox[{"-", "0.16782718066863375`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7727070528312173`*^9, 3.7727071180641756`*^9, 3.7727073889476924`*^9, - 3.772707467455392*^9, {3.7727075095260706`*^9, 3.7727075505352993`*^9}, - 3.772707586094211*^9, {3.772707654092471*^9, 3.772707688885429*^9}, - 3.7727087663143163`*^9, 3.7796366799930787`*^9}, - CellLabel-> - "Out[125]//MatrixForm=",ExpressionUUID->"1edcfa58-6259-42fb-865f-\ -2a60da446e42"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"1", ";;", "4"}], "]"}], "]"}], "/", - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"1", ",", "1", ",", "1"}], "]"}], "]"}]}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7720296085161486`*^9, 3.7720296138089113`*^9}, { - 3.772029644343336*^9, 3.772029674032715*^9}, {3.7720297087380204`*^9, - 3.7720297100531797`*^9}, 3.772706973718531*^9, 3.7727070391473494`*^9}, - CellLabel-> - "In[126]:=",ExpressionUUID->"b1ecdc3b-a855-4a22-af61-0efc0530881d"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.026910912744305737`", "\[VeryThinSpace]", "-", - RowBox[{"1.4938557471203394`*^-18", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.5824907165155809`", "\[VeryThinSpace]", "-", - RowBox[{"2.007742124129736`*^-15", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.060821621806676864`", "\[VeryThinSpace]", "-", - RowBox[{"2.6889403448166107`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.29305363501840137`", "\[VeryThinSpace]", "-", - RowBox[{"8.007066804565019`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.5608637930582873`", "\[VeryThinSpace]", "-", - RowBox[{"2.007742124129736`*^-15", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.1839930640804783`"}], "+", - RowBox[{"8.724117563182782`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.44170503149129975`", "\[VeryThinSpace]", "-", - RowBox[{"1.2428879816041224`*^-15", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.39662472034612645`", "\[VeryThinSpace]", "-", - RowBox[{"1.5536099770051529`*^-15", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.772707039487582*^9, 3.7727071180801325`*^9, 3.7727073889626245`*^9, - 3.7727074674723473`*^9, {3.772707509543029*^9, 3.7727075505482936`*^9}, - 3.7727075861111655`*^9, 3.772707688904378*^9, 3.7727087663352594`*^9, - 3.7796366818137207`*^9}, - CellLabel-> - "Out[126]//MatrixForm=",ExpressionUUID->"bcdc5dd3-3eaa-4467-8ad2-\ -3057387e13f4"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"5", ";;", "8"}], "]"}], "]"}], "/", - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"5", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"2", ",", "1", ",", "1"}], "]"}], "]"}]}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.772707444701544*^9, 3.772707451246479*^9}, - 3.772707685386013*^9}, - CellLabel-> - "In[382]:=",ExpressionUUID->"dde4cbc7-4252-4b7b-bb44-610ccd566975"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.5481324650098677`", "\[VeryThinSpace]", "-", - RowBox[{"3.0427464159924904`*^-17", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.10243342523724087`"}], "+", - RowBox[{"1.2855603607568271`*^-15", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.26937593740943244`", "\[VeryThinSpace]", "+", - RowBox[{"1.9625714383151564`*^-15", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.507387927982396`", "\[VeryThinSpace]", "-", - RowBox[{"5.476943548786483`*^-16", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.490770420309372`", "\[VeryThinSpace]", "-", - RowBox[{"8.823964606378222`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.2888286815502326`"}], "-", - RowBox[{"1.7191517250357571`*^-15", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{ - RowBox[{"-", "0.03922227175849514`"}], "-", - RowBox[{"2.8221473008330348`*^-15", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.5000343630513941`", "\[VeryThinSpace]", "-", - RowBox[{"3.3470210575917396`*^-16", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.772707467488304*^9, {3.7727075095589857`*^9, 3.7727075505662174`*^9}, - 3.7727075861281204`*^9, 3.7727076889193344`*^9, 3.7727087663532104`*^9}, - CellLabel-> - "Out[382]//MatrixForm=",ExpressionUUID->"9e9c7040-5040-48ce-973a-\ -a6ec2d14d772"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["TestCreateIsometryFromList", "Subsubsection", - CellChangeTimes->{{3.7796378096479063`*^9, - 3.779637831126302*^9}},ExpressionUUID->"000fbd1a-6926-4c37-854a-\ -b18ba527de6e"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.779638351922721*^9, 3.779638371054328*^9}, { - 3.779639772867117*^9, 3.7796397917773547`*^9}, {3.7796398338244467`*^9, - 3.779639834155593*^9}}, - CellLabel->"In[27]:=",ExpressionUUID->"c439bc91-632c-44e4-9e5d-398176c7c4fc"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TestCreateIsometryFromList1", "[", "]"}]], "Input", - CellChangeTimes->{3.779639843978874*^9}, - CellLabel->"In[28]:=",ExpressionUUID->"513e8767-5a90-4af0-b8e3-51cc384dd35c"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.7796398816314573`*^9, 3.779639926734149*^9}, - 3.779716767781906*^9, 3.779944503619239*^9, 3.7799445467129755`*^9}, - CellLabel->"Out[28]=",ExpressionUUID->"6e113163-6b0f-4d03-bcab-696cc111a5f7"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Test1", "Subsubsection", - CellChangeTimes->{{3.7727105119923897`*^9, 3.772710559560375*^9}, { - 3.7727126921277914`*^9, - 3.77271269299815*^9}},ExpressionUUID->"b6f9be9c-5336-4401-8ff5-\ -190e1eaae591"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9}, - CellLabel->"In[29]:=",ExpressionUUID->"c5298448-0e3e-44e6-a824-430125cc34ba"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.2932452104311912`", ",", - RowBox[{"-", "0.08830948064623415`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.28282626643519926`", ",", - RowBox[{"-", "0.1304800884616653`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.03020339901551075`", ",", "0.34276382138301165`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.13766254742718748`", ",", "0.6095594486702784`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.27071315284152103`", ",", "0.5572212898861584`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.10806546596921529`", ",", "0.22985725289398778`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.5102753876970562`", ",", - RowBox[{"-", "0.3477253237518249`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.6846959908976671`", ",", - RowBox[{"-", "0.043402765373343366`"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{ - 3.7727110992157288`*^9, 3.772711449627305*^9, 3.7727122866175704`*^9, - 3.7733110419573116`*^9, 3.7733117368521557`*^9, 3.7733133815624704`*^9, - 3.773313618465979*^9, 3.773314103393114*^9, 3.7733143235061617`*^9, - 3.7733148132020063`*^9, 3.7733162185481863`*^9, 3.7733162665432825`*^9, - 3.773316349582368*^9, 3.7733169145773387`*^9, 3.779636809357911*^9, - 3.7796404095265503`*^9, {3.779642272129354*^9, 3.779642289293783*^9}, - 3.7797167740654936`*^9, 3.779717287066455*^9, 3.7799435215584826`*^9, - 3.779944483704572*^9, 3.779944970354251*^9}, - CellLabel->"Out[29]=",ExpressionUUID->"fc72293d-dfc8-4fd4-8f56-4c6fcd3a88f1"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3561944901923413`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.32667651235431894`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897967`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.3266765123543217`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4852804725127662`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4852804725127673`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.2501709878400464`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{{3.7727105875154257`*^9, 3.772710606420471*^9}, - 3.7727110996815434`*^9, 3.7727114501032104`*^9, 3.7727122870689363`*^9, - 3.7733110423926544`*^9, 3.7733117372984743`*^9, 3.773313382005316*^9, - 3.7733136189079075`*^9, 3.773314103828952*^9, 3.773314323937038*^9, - 3.7733148136438255`*^9, 3.7733162186827865`*^9, 3.7733162666714053`*^9, - 3.773316349709998*^9, 3.773316914709982*^9, 3.7796368103123903`*^9, - 3.7796404104829893`*^9, {3.779642272458476*^9, 3.7796422902258053`*^9}, - 3.7797167753012047`*^9, 3.779717288337862*^9, 3.7799435234611397`*^9, - 3.779944485860319*^9, 3.779944972428317*^9}, - CellLabel-> - "During evaluation of \ -In[29]:=",ExpressionUUID->"c296734c-edc8-4247-a795-b748d1bb7c45"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.7727105875154257`*^9, 3.772710606420471*^9}, - 3.7727110996815434`*^9, 3.7727114501032104`*^9, 3.7727122870689363`*^9, - 3.7733110423926544`*^9, 3.7733117372984743`*^9, 3.773313382005316*^9, - 3.7733136189079075`*^9, 3.773314103828952*^9, 3.773314323937038*^9, - 3.7733148136438255`*^9, 3.7733162186827865`*^9, 3.7733162666714053`*^9, - 3.773316349709998*^9, 3.773316914709982*^9, 3.7796368103123903`*^9, - 3.7796404104829893`*^9, {3.779642272458476*^9, 3.7796422902258053`*^9}, - 3.7797167753012047`*^9, 3.779717288337862*^9, 3.7799435234611397`*^9, - 3.779944485860319*^9, 3.779944972435706*^9}, - CellLabel-> - "During evaluation of \ -In[29]:=",ExpressionUUID->"95b1ef68-da9d-4881-8432-0226b21ecea7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.1332059533683365`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.534174884671215`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.3260658763699942`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.433548450345168`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.422054097282381`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.9512462131259087`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.29861938401968824`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3737978921048115`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.213060945200429`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.8377688786722635`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.066622374550839`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.3759998252592647`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7727105875154257`*^9, 3.772710606420471*^9}, - 3.7727110996815434`*^9, 3.7727114501032104`*^9, 3.7727122870689363`*^9, - 3.7733110423926544`*^9, 3.7733117372984743`*^9, 3.773313382005316*^9, - 3.7733136189079075`*^9, 3.773314103828952*^9, 3.773314323937038*^9, - 3.7733148136438255`*^9, 3.7733162186827865`*^9, 3.7733162666714053`*^9, - 3.773316349709998*^9, 3.773316914709982*^9, 3.7796368103123903`*^9, - 3.7796404104829893`*^9, {3.779642272458476*^9, 3.7796422902258053`*^9}, - 3.7797167753012047`*^9, 3.779717288337862*^9, 3.7799435234611397`*^9, - 3.779944485860319*^9, 3.779944972462634*^9}, - CellLabel-> - "During evaluation of \ -In[29]:=",ExpressionUUID->"7b797108-f7a5-4fed-8da5-d3afb76ea26d"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7796420341399236`*^9, 3.7796420342466383`*^9}}, - CellLabel->"In[36]:=",ExpressionUUID->"b3a6ebf6-1be3-4e90-b9bd-c5e9ae223931"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"m", " ", "=", " ", - RowBox[{"BoxiTest", "[", "result", "]"}]}]], "Input", - CellChangeTimes->{{3.772710399905365*^9, 3.772710415866135*^9}, - 3.7727104736423826`*^9, {3.772710577388398*^9, 3.772710578858229*^9}, { - 3.7727106457911396`*^9, 3.7727106476886997`*^9}, {3.7727113879371376`*^9, - 3.7727113883894024`*^9}}, - CellLabel->"In[35]:=",ExpressionUUID->"d69b9f73-153e-46bf-9a14-ac81bb9b6f98"], - -Cell[BoxData["\<\"CreateChannelFromList: measurement gate type found\"\>"], \ -"Print", - CellChangeTimes->{3.779944978642191*^9, 3.779945175717078*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"05bdfe48-beb8-48b3-a0c2-43c222987794"], - -Cell[BoxData[ - TemplateBox[{ - "IdentityMatrix","dims", - "\"Dimension specification \ -\\!\\(\\*RowBox[{\\\"35.095300541825694`\\\"}]\\) should be a positive \ -machine integer or a pair of positive machine integers.\"",2,35,23, - 19312690291264921287,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779944979148839*^9, 3.7799451758786483`*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"4dc189c4-879e-4a69-a67d-20b3b608cdd8"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"Tensor: inputs have incorrect dimensions\"\>"], "Print", - CellChangeTimes->{3.779944978642191*^9, 3.7799451758826337`*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"d4cc90f5-e054-482d-9ac1-655ac5a5acc0"], - -Cell[BoxData["\<\"ExchangeSystems: Wrong dimensions\"\>"], "Print", - CellChangeTimes->{3.779944978642191*^9, 3.7799451758876204`*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"9713ea9c-d6bf-4ef9-a3ab-e688098a42f3"] -}, Open ]], - -Cell[BoxData[ - TemplateBox[{ - "Part","partw", - "\"Part \\!\\(\\*RowBox[{\\\"2\\\"}]\\) of \\!\\(\\*RowBox[{\\\"{\\\", \ -\\\"2\\\", \\\"}\\\"}]\\) does not exist.\"",2,35,24,19312690291264921287, - "Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779944979148839*^9, 3.779945175979377*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"0a9af8b5-f493-4207-bd66-00924fc8dfd7"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partw", - "\"Part \\!\\(\\*RowBox[{\\\"2\\\"}]\\) of \\!\\(\\*RowBox[{\\\"{\\\", \ -\\\"2\\\", \\\"}\\\"}]\\) does not exist.\"",2,35,25,19312690291264921287, - "Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779944979148839*^9, 3.7799451760870876`*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"ebd35c88-959a-48bb-bc05-30ba6b477114"], - -Cell[BoxData[ - TemplateBox[{ - "IdentityMatrix","dims", - "\"Dimension specification \ -\\!\\(\\*RowBox[{\\\"35.095300541825694`\\\"}]\\) should be a positive \ -machine integer or a pair of positive machine integers.\"",2,35,26, - 19312690291264921287,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779944979148839*^9, 3.779945176158896*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"96afa6d7-0a00-4c2b-9e16-f0a5d37c1b3b"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"Tensor: inputs have incorrect dimensions\"\>"], "Print", - CellChangeTimes->{3.779944978642191*^9, 3.779945176164879*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"79140ff0-26a9-4600-9fab-6da07e7d523f"], - -Cell[BoxData["\<\"ExchangeSystems: Wrong dimensions\"\>"], "Print", - CellChangeTimes->{3.779944978642191*^9, 3.779945176168868*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"21a09e97-4f73-4068-b431-7a549cb5e9d3"] -}, Open ]], - -Cell[BoxData[ - TemplateBox[{ - "Part","partw", - "\"Part \\!\\(\\*RowBox[{\\\"2\\\"}]\\) of \\!\\(\\*RowBox[{\\\"{\\\", \ -\\\"2\\\", \\\"}\\\"}]\\) does not exist.\"",2,35,27,19312690291264921287, - "Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779944979148839*^9, 3.7799451762317*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"d290a533-8c96-40d5-8197-6812408616ef"], - -Cell[BoxData[ - TemplateBox[{ - "General","stop", - "\"Further output of \\!\\(\\*StyleBox[RowBox[{\\\"Part\\\", \\\"::\\\", \ -\\\"partw\\\"}], \\\"MessageName\\\"]\\) will be suppressed during this \ -calculation.\"",2,35,28,19312690291264921287,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779944979148839*^9, 3.7799451762915773`*^9}, - CellLabel-> - "During evaluation of \ -In[35]:=",ExpressionUUID->"5648bc88-3e67-41fc-b503-c47718c49112"], - -Cell[BoxData[ - InterpretationBox[ - TagBox[ - FrameBox[GridBox[{ - { - ItemBox[ - TagBox[ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"Transpose", "[", - RowBox[{"Transpose", "[", - RowBox[{"KroneckerProduct", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], "}"}], ",", - RowBox[{"IdentityMatrix", "[", "35.095300541825694`", "]"}]}], - "]"}], "]"}], "]"}], ".", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.27092324792434214`", "\[VeryThinSpace]", "+", - RowBox[{"0.11222008365243079`", " ", "\[ImaginaryI]"}]}], - ",", - RowBox[{"0.045871342155705784`", "\[VeryThinSpace]", "+", - RowBox[{"0.019000532045150002`", " ", "\[ImaginaryI]"}]}], - ",", - TemplateBox[{"12"}, - "OutputSizeLimit`Skeleton"], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - TemplateBox[{"62"}, - "OutputSizeLimit`Skeleton"], ",", - RowBox[{"{", - TemplateBox[{"1"}, - "OutputSizeLimit`Skeleton"], "}"}]}], "}"}]}], ",", - TemplateBox[{"1"}, - "OutputSizeLimit`Skeleton"]}], "}"}], - Short[#, 5]& ], - BaseStyle->{Deployed -> False}, - StripOnInput->False]}, - {GridBox[{ - { - TagBox[ - TooltipBox[ - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource[ - "FEStrings", "sizeBriefExplanation"], StandardForm], - ImageSizeCache->{72., {3., 10.}}], - StripOnInput->False, - DynamicUpdating->True], "OSLText", - StripOnInput->False], - StyleBox[ - DynamicBox[ - ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], - StandardForm]], DynamicUpdating -> True, StripOnInput -> - False]], - Annotation[#, - Style[ - Dynamic[ - FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"]], - DynamicUpdating -> True], "Tooltip"]& ], - ButtonBox[ - PaneSelectorBox[{False-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], - StandardForm], - ImageSizeCache->{59., {1., 10.}}], - StripOnInput->False, - DynamicUpdating->True], "OSLControl", - StripOnInput->False], True-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], - StandardForm]], - StripOnInput->False, - DynamicUpdating->True], "OSLControlActive", - StripOnInput->False]}, Dynamic[ - CurrentValue["MouseOver"]], - Alignment->Center, - FrameMargins->0, - ImageSize->{Automatic, 25}], - Appearance->None, - BaselinePosition->Baseline, - - ButtonFunction:>OutputSizeLimit`ButtonFunction[ - OutputSizeLimit`Defer, 35, 19312690291264921287, 5/2], - Enabled->True, - Evaluator->Automatic, - Method->"Queued"], - ButtonBox[ - PaneSelectorBox[{False-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], - StandardForm], - ImageSizeCache->{68., {1., 10.}}], - StripOnInput->False, - DynamicUpdating->True], "OSLControl", - StripOnInput->False], True-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], - StandardForm]], - StripOnInput->False, - DynamicUpdating->True], "OSLControlActive", - StripOnInput->False]}, Dynamic[ - CurrentValue["MouseOver"]], - Alignment->Center, - FrameMargins->0, - ImageSize->{Automatic, 25}], - Appearance->None, - BaselinePosition->Baseline, - - ButtonFunction:>OutputSizeLimit`ButtonFunction[ - OutputSizeLimit`Defer, 35, 19312690291264921287, 5 2], - Enabled->True, - Evaluator->Automatic, - Method->"Queued"], - ButtonBox[ - PaneSelectorBox[{False-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], - StandardForm], - ImageSizeCache->{51., {1., 10.}}], - StripOnInput->False, - DynamicUpdating->True], "OSLControl", - StripOnInput->False], True-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], - StandardForm]], - StripOnInput->False, - DynamicUpdating->True], "OSLControlActive", - StripOnInput->False]}, Dynamic[ - CurrentValue["MouseOver"]], - Alignment->Center, - FrameMargins->0, - ImageSize->{Automatic, 25}], - Appearance->None, - BaselinePosition->Baseline, - - ButtonFunction:>OutputSizeLimit`ButtonFunction[ - OutputSizeLimit`Defer, 35, 19312690291264921287, Infinity], - Enabled->True, - Evaluator->Automatic, - Method->"Queued"], - ButtonBox[ - PaneSelectorBox[{False-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], - StandardForm], - ImageSizeCache->{90., {1., 10.}}], - StripOnInput->False, - DynamicUpdating->True], "OSLControl", - StripOnInput->False], True-> - StyleBox[ - StyleBox[ - DynamicBox[ToBoxes[ - FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], - StandardForm]], - StripOnInput->False, - DynamicUpdating->True], "OSLControlActive", - StripOnInput->False]}, Dynamic[ - CurrentValue["MouseOver"]], - Alignment->Center, - FrameMargins->0, - ImageSize->{Automatic, 25}], - Appearance->None, - BaselinePosition->Baseline, - ButtonFunction:>FrontEndExecute[{ - FrontEnd`SetOptions[ - FrontEnd`$FrontEnd, - FrontEnd`PreferencesSettings -> {"Page" -> "Advanced"}], - FrontEnd`FrontEndToken["PreferencesDialog"]}], - Evaluator->None, - Method->"Preemptive"]} - }, - AutoDelete->False, - FrameStyle->GrayLevel[0.85], - GridBoxDividers->{"Columns" -> {False, {True}}}, - GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - GridBoxSpacings->{"Columns" -> {{2}}}]} - }, - DefaultBaseStyle->"Column", - GridBoxAlignment->{ - "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxDividers->{ - "Columns" -> {{False}}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, - "RowsIndexed" -> {}}, - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.5599999999999999]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], - Offset[1.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], - BaseStyle->"OutputSizeLimit", - FrameMargins->{{12, 12}, {0, 15}}, - FrameStyle->GrayLevel[0.85], - RoundingRadius->5, - StripOnInput->False], - Deploy, - DefaultBaseStyle->"Deploy"], - If[19312690291264921287 === $SessionID, - Out[35], Message[ - MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; - Null]]], "Output", - CellChangeTimes->{3.779944979530817*^9, 3.779945176314986*^9}, - CellLabel->"Out[35]=",ExpressionUUID->"e0782311-80f1-4182-9cfa-eea7879a6499"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"m1", " ", "=", " ", - RowBox[{ - RowBox[{"m", "[", - RowBox[{"[", "1", "]"}], "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"m2", "=", " ", - RowBox[{ - RowBox[{"m", "[", - RowBox[{"[", "2", "]"}], "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}]}], ";"}]}], "Input", - CellChangeTimes->{{3.77331180606057*^9, 3.7733118236074977`*^9}, - 3.773311913755708*^9, {3.7733120983251925`*^9, 3.773312098587145*^9}}, - CellLabel->"In[22]:=",ExpressionUUID->"0cb4a7a7-4a0a-41dd-8d9a-edd793cc58ac"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partd", - "\"Part specification \\!\\(\\*RowBox[{\\\"Null\\\", \\\"\ -\[LeftDoubleBracket]\\\", \\\"1\\\", \\\"\[RightDoubleBracket]\\\"}]\\) is \ -longer than depth of object.\"",2,22,15,19312690291264921287,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.7799444900727835`*^9}, - CellLabel-> - "During evaluation of \ -In[22]:=",ExpressionUUID->"bb884522-40e1-4f8f-b97c-5dee0a192c8e"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partd", - "\"Part specification \\!\\(\\*RowBox[{\\\"Null\\\", \\\"\ -\[LeftDoubleBracket]\\\", \\\"2\\\", \\\"\[RightDoubleBracket]\\\"}]\\) is \ -longer than depth of object.\"",2,23,16,19312690291264921287,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.7799444901336193`*^9}, - CellLabel-> - "During evaluation of \ -In[22]:=",ExpressionUUID->"0f7a9557-260c-41e0-8fd1-0e305a2235df"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["m"], "Input", - CellChangeTimes->{{3.7796368444134054`*^9, 3.779636859299067*^9}}, - CellLabel-> - "In[261]:=",ExpressionUUID->"b4f679ad-d5f1-491a-8056-68357e5307cf"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.024991749190663874`", "\[VeryThinSpace]", "+", - RowBox[{"0.01035192146219982`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.1567096556734604`", "\[VeryThinSpace]", "+", - RowBox[{"0.06491126473476458`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.4903332120988835`", "\[VeryThinSpace]", "+", - RowBox[{"0.2031026665333223`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.27895236773547066`", "\[VeryThinSpace]", "+", - RowBox[{"0.115545853972118`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.3677801816954947`"}], "-", - RowBox[{"0.15233953923031637`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.5243444277102666`", "\[VeryThinSpace]", "+", - RowBox[{"0.217190573312349`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.29451674898862257`", "\[VeryThinSpace]", "+", - RowBox[{"0.12199283177712059`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.37698554645861343`", "\[VeryThinSpace]", "+", - RowBox[{"0.15615252616178865`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.020475529788969455`", "\[VeryThinSpace]", "-", - RowBox[{"0.04943230171330362`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.18762432025744788`"}], "+", - RowBox[{"0.4529651785965568`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.06634123239957426`", "\[VeryThinSpace]", "-", - RowBox[{"0.1601619030035977`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.14386197274374718`"}], "+", - RowBox[{"0.34731352570769775`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.15649180153704023`"}], "+", - RowBox[{"0.3778046296709244`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.019311076206287713`", "\[VeryThinSpace]", "-", - RowBox[{"0.046621062081240006`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.19413674915680781`"}], "+", - RowBox[{"0.468687572769393`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.0324786971201379`"}], "+", - RowBox[{"0.07841051107564317`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.7796368450397577`*^9, 3.7796368598226643`*^9}, - 3.779716793345236*^9}, - CellLabel-> - "Out[261]=",ExpressionUUID->"24957bff-06a3-4d23-adbd-87fae1094311"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{ - RowBox[{"m1", "/", - RowBox[{"m1", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"1", ",", "1", ",", "1"}], "]"}], "]"}]}], "]"}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7727113911784105`*^9, 3.772711419049477*^9}, - 3.772711455570137*^9, {3.772712192705966*^9, 3.772712214114143*^9}, { - 3.773311837028804*^9, 3.7733118794724255`*^9}, 3.7796368327302203`*^9}, - CellLabel-> - "In[135]:=",ExpressionUUID->"4db5bb3e-4451-4590-95e8-9ccdf392f455"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partd", - "\"Part specification \\!\\(\\*RowBox[{RowBox[{\\\"(\\\", RowBox[{RowBox[{\ -\\\"-\\\", \\\"0.4099077102602322`\\\"}], \\\"+\\\", \ -RowBox[{\\\"0.1697893329110883`\\\", \\\" \\\", \\\"\[ImaginaryI]\\\"}]}], \\\ -\")\\\"}], \\\"\[LeftDoubleBracket]\\\", RowBox[{\\\"1\\\", \\\",\\\", \ -\\\"1\\\"}], \\\"\[RightDoubleBracket]\\\"}]\\) is longer than depth of \ -object.\"",2,135,23,19310650534635319756,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.779636835531392*^9}, - CellLabel-> - "During evaluation of \ -In[135]:=",ExpressionUUID->"493ec5bb-57bf-4010-b8c0-c2c0e914e5f0"], - -Cell[BoxData[ - TagBox[ - RowBox[{"-", - FractionBox[ - RowBox[{"0.1818682252588317`", "\[VeryThinSpace]", "-", - RowBox[{"0.07533228546693276`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{"-", "0.4099077102602322`"}], "+", - RowBox[{"0.1697893329110883`", " ", "\[ImaginaryI]"}]}], ")"}], - "\[LeftDoubleBracket]", - RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}]]}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.7727113949942837`*^9, 3.7727114194733334`*^9}, { - 3.7727114520769644`*^9, 3.7727114560907445`*^9}, {3.7727122043921447`*^9, - 3.7727122145942173`*^9}, 3.772712292218692*^9, 3.7727123425014286`*^9, { - 3.773311871011341*^9, 3.773311879949079*^9}, 3.7733141074579277`*^9, - 3.773314334585913*^9, 3.7733147064169407`*^9, 3.779636835548346*^9}, - CellLabel-> - "Out[135]//MatrixForm=",ExpressionUUID->"d9619bc1-4bdd-440c-adc5-\ -4e973fc16875"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{ - RowBox[{"m2", "/", - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"2", ",", "1", ",", "1"}], "]"}], "]"}]}], "]"}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7727123532169538`*^9, 3.772712360449857*^9}, { - 3.773311929227998*^9, 3.773311938460063*^9}}, - CellLabel-> - "In[151]:=",ExpressionUUID->"de7eb3e8-768c-406a-a799-f37bdbf3f68f"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.11770821193119836`", "0.22790025800162053`"}, - {"0.7299562473090746`", - RowBox[{"-", "0.09233814997961608`"}]}, - {"0.06068558500542342`", "0.3779774137976662`"}, - {"0.5215666779061722`", "0.17589020080191797`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7727123611947594`*^9, {3.773311934712596*^9, 3.773311938876993*^9}, - 3.7733141092625875`*^9, 3.7733143361856728`*^9, 3.7733147074267635`*^9}, - CellLabel-> - "Out[151]//MatrixForm=",ExpressionUUID->"383fa4ad-1719-455c-a4e8-\ -0d35a22bced2"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Test2", "Subsubsection", - CellChangeTimes->{{3.7727105119923897`*^9, 3.772710559560375*^9}, { - 3.7727126921277914`*^9, - 3.7727127012706413`*^9}},ExpressionUUID->"d6804da0-7e2e-4091-99bb-\ -a24d6dd9a5a7"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "result", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"result", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9, {3.772712705024062*^9, 3.772712706376652*^9}}, - CellLabel-> - "In[262]:=",ExpressionUUID->"9383a849-dabc-4178-bb37-69e6c59c599c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.17068534825792858`", ",", "0.08255945371633788`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.4124226586904366`", ",", "0.040607941163668476`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2594826217058315`"}], ",", "0.7743936230059093`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.6094988952452118`", ",", "0.028440065882630122`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.28573042664720144`", ",", "0.07237377299652253`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.1252538008140084`"}], ",", "0.4669379045029393`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.3721373268197896`", ",", "0.3886277527609982`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.3551581997834061`", ",", "0.12938358134427183`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7727110992157288`*^9, 3.772711449627305*^9, 3.7727122866175704`*^9, { - 3.7727127069616785`*^9, 3.772712730722234*^9}, {3.77271278752864*^9, - 3.772712815142162*^9}, 3.773311030737089*^9, 3.773312086852329*^9, - 3.7733138593207035`*^9, 3.7733141275287857`*^9, {3.773314207183671*^9, - 3.7733142283906136`*^9}, {3.773314261560733*^9, 3.7733142914728036`*^9}, - 3.773314839648018*^9, 3.773315151736693*^9, 3.7733155608381124`*^9, - 3.773315663453623*^9, 3.773315844014506*^9, 3.773315996894551*^9, - 3.7733162737515564`*^9, 3.7733163733133135`*^9, 3.7796399693826733`*^9, - 3.779642304758867*^9, 3.7797168024220147`*^9}, - CellLabel-> - "Out[262]=",ExpressionUUID->"704d13be-ab51-4abf-8d7e-8d8894771082"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.356194490192345`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.24728771212278`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2472877121227794`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.137500139607301`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653585151`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.1375001396073006`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2910704989213597`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{{3.7727105875154257`*^9, 3.772710606420471*^9}, - 3.7727110996815434`*^9, 3.7727114501032104`*^9, 3.7727122870689363`*^9, { - 3.772712707421617*^9, 3.7727127311874633`*^9}, {3.772712787979699*^9, - 3.7727128156129065`*^9}, 3.7733110312936287`*^9, 3.7733120872851706`*^9, - 3.773313859755568*^9, 3.7733141279805794`*^9, {3.773314207629511*^9, - 3.773314228839432*^9}, {3.773314262001588*^9, 3.773314291922614*^9}, - 3.7733148400958204`*^9, 3.773315152190073*^9, 3.773315561271991*^9, - 3.773315663895633*^9, 3.773315844455277*^9, 3.773315997361329*^9, - 3.7733162738742304`*^9, 3.7733163734340224`*^9, 3.7796399703131847`*^9, - 3.7796423056898856`*^9, 3.7797168036466465`*^9}, - CellLabel-> - "During evaluation of \ -In[262]:=",ExpressionUUID->"ec3c8d8a-ba22-41b2-a9e1-508483ec229b"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{{3.7727105875154257`*^9, 3.772710606420471*^9}, - 3.7727110996815434`*^9, 3.7727114501032104`*^9, 3.7727122870689363`*^9, { - 3.772712707421617*^9, 3.7727127311874633`*^9}, {3.772712787979699*^9, - 3.7727128156129065`*^9}, 3.7733110312936287`*^9, 3.7733120872851706`*^9, - 3.773313859755568*^9, 3.7733141279805794`*^9, {3.773314207629511*^9, - 3.773314228839432*^9}, {3.773314262001588*^9, 3.773314291922614*^9}, - 3.7733148400958204`*^9, 3.773315152190073*^9, 3.773315561271991*^9, - 3.773315663895633*^9, 3.773315844455277*^9, 3.773315997361329*^9, - 3.7733162738742304`*^9, 3.7733163734340224`*^9, 3.7796399703131847`*^9, - 3.7796423056898856`*^9, 3.7797168036530037`*^9}, - CellLabel-> - "During evaluation of \ -In[262]:=",ExpressionUUID->"4487e8a1-5d57-4130-bc90-395fedac0bc4"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.797189819989531`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.602421175020595`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.812967901951716`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.706201250063609`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5298902940590499`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1827663117578606`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948992`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.13915881553117`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4371401926431104`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.9916586094178825`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.7904124513370574`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.4171762142530975`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.383120510466523`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948968`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7727105875154257`*^9, 3.772710606420471*^9}, - 3.7727110996815434`*^9, 3.7727114501032104`*^9, 3.7727122870689363`*^9, { - 3.772712707421617*^9, 3.7727127311874633`*^9}, {3.772712787979699*^9, - 3.7727128156129065`*^9}, 3.7733110312936287`*^9, 3.7733120872851706`*^9, - 3.773313859755568*^9, 3.7733141279805794`*^9, {3.773314207629511*^9, - 3.773314228839432*^9}, {3.773314262001588*^9, 3.773314291922614*^9}, - 3.7733148400958204`*^9, 3.773315152190073*^9, 3.773315561271991*^9, - 3.773315663895633*^9, 3.773315844455277*^9, 3.773315997361329*^9, - 3.7733162738742304`*^9, 3.7733163734340224`*^9, 3.7796399703131847`*^9, - 3.7796423056898856`*^9, 3.779716803683576*^9}, - CellLabel-> - "During evaluation of \ -In[262]:=",ExpressionUUID->"c6fed127-fad7-4d1a-a6ab-d01a7ab90a24"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7796432609975424`*^9, 3.77964326163087*^9}}, - CellLabel-> - "In[265]:=",ExpressionUUID->"e05bd1ea-d865-4fe9-b0b2-266091b78e84"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"m", " ", "=", " ", - RowBox[{"BoxiTest", "[", "result", "]"}]}]], "Input", - CellChangeTimes->{{3.772710399905365*^9, 3.772710415866135*^9}, - 3.7727104736423826`*^9, {3.772710577388398*^9, 3.772710578858229*^9}, { - 3.7727106457911396`*^9, 3.7727106476886997`*^9}, {3.7727113879371376`*^9, - 3.7727113883894024`*^9}}, - CellLabel-> - "In[270]:=",ExpressionUUID->"de5908dc-6bff-4024-842b-7c33366813f8"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.06531845492540762`"}], "-", - RowBox[{"0.15769269975521355`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.031594135122530655`"}], "-", - RowBox[{"0.07627498950376481`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.15782731861190644`"}], "-", - RowBox[{"0.38102885310834955`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.015539986305876184`"}], "-", - RowBox[{"0.03751684569850139`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.0992997003129306`", "\[VeryThinSpace]", "+", - RowBox[{"0.239730683236615`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.29634760965520285`"}], "-", - RowBox[{"0.7154464184017317`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.23324512925385954`"}], "-", - RowBox[{"0.5631035544058342`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.010883542028710377`"}], "-", - RowBox[{"0.026275194772212268`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.26398049299532034`", "\[VeryThinSpace]", "-", - RowBox[{"0.10934430039988056`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.06686464756204125`", "\[VeryThinSpace]", "-", - RowBox[{"0.027696243863674145`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.11571942294141688`"}], "+", - RowBox[{"0.04793255441201351`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.4313943729235617`", "\[VeryThinSpace]", "-", - RowBox[{"0.17868939999754804`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.343810059532599`", "\[VeryThinSpace]", "-", - RowBox[{"0.14241078953776648`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.3590452265413986`", "\[VeryThinSpace]", "-", - RowBox[{"0.14872140233973968`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.3281233915837591`", "\[VeryThinSpace]", "-", - RowBox[{"0.13591315892495867`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.11953484264686745`", "\[VeryThinSpace]", "-", - RowBox[{"0.04951295300078839`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7796402907762547`*^9, 3.779642307776867*^9, - 3.7796424132242475`*^9, 3.7796432635183144`*^9, 3.779716805813696*^9, - 3.7797171788777094`*^9}, - CellLabel-> - "Out[270]=",ExpressionUUID->"8c64d48e-942f-4581-9160-0771e870d357"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"{", - RowBox[{"m1", ",", "m2"}], "}"}], "=", " ", - RowBox[{"Partition", "[", - RowBox[{"m", ",", "4"}], "]"}]}]], "Input", - CellChangeTimes->{ - 3.7733142167279835`*^9, {3.7797171494446425`*^9, 3.779717190966852*^9}}, - CellLabel-> - "In[271]:=",ExpressionUUID->"c91c8c8b-c5da-4ddd-8d68-febea55decb2"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.06531845492540762`"}], "-", - RowBox[{"0.15769269975521355`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.031594135122530655`"}], "-", - RowBox[{"0.07627498950376481`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.15782731861190644`"}], "-", - RowBox[{"0.38102885310834955`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.015539986305876184`"}], "-", - RowBox[{"0.03751684569850139`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.0992997003129306`", "\[VeryThinSpace]", "+", - RowBox[{"0.239730683236615`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.29634760965520285`"}], "-", - RowBox[{"0.7154464184017317`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.23324512925385954`"}], "-", - RowBox[{"0.5631035544058342`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.010883542028710377`"}], "-", - RowBox[{"0.026275194772212268`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.26398049299532034`", "\[VeryThinSpace]", "-", - RowBox[{"0.10934430039988056`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.06686464756204125`", "\[VeryThinSpace]", "-", - RowBox[{"0.027696243863674145`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.11571942294141688`"}], "+", - RowBox[{"0.04793255441201351`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.4313943729235617`", "\[VeryThinSpace]", "-", - RowBox[{"0.17868939999754804`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.343810059532599`", "\[VeryThinSpace]", "-", - RowBox[{"0.14241078953776648`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.3590452265413986`", "\[VeryThinSpace]", "-", - RowBox[{"0.14872140233973968`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.3281233915837591`", "\[VeryThinSpace]", "-", - RowBox[{"0.13591315892495867`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.11953484264686745`", "\[VeryThinSpace]", "-", - RowBox[{"0.04951295300078839`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.7797171913985815`*^9}, - CellLabel-> - "Out[271]=",ExpressionUUID->"2a709e4d-3482-47eb-9739-37b5685b9cf5"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["krausList"], "Input", - CellChangeTimes->{{3.779717222743239*^9, 3.7797172288816195`*^9}}, - CellLabel-> - "In[273]:=",ExpressionUUID->"24d04634-482c-4be7-b08a-be442028082f"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.17068534825792858`", ",", "0.08255945371633788`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.4124226586904366`", ",", "0.040607941163668476`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.2594826217058315`"}], ",", "0.7743936230059093`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.6094988952452118`", ",", "0.028440065882630122`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.28573042664720144`", ",", "0.07237377299652253`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.1252538008140084`"}], ",", "0.4669379045029393`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.3721373268197896`", ",", "0.3886277527609982`"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.3551581997834061`", ",", "0.12938358134427183`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.7797172294724736`*^9}, - CellLabel-> - "Out[273]=",ExpressionUUID->"428b5df9-6048-4048-b74e-6f868258e41b"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{ - RowBox[{"m1", "/", - RowBox[{"m1", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"1", ",", "1", ",", "1"}], "]"}], "]"}]}], "]"}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7727113911784105`*^9, 3.772711419049477*^9}, - 3.772711455570137*^9, {3.772712192705966*^9, 3.772712214114143*^9}, - 3.773312112658307*^9}, - CellLabel-> - "In[272]:=",ExpressionUUID->"fd437449-3c9b-40e3-88e9-f9de19507d15"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.17068534825792858`", "0.0825594537163379`"}, - {"0.41242265869043626`", "0.040607941163668684`"}, - { - RowBox[{"-", "0.25948262170583203`"}], "0.7743936230059083`"}, - {"0.6094988952452113`", "0.02844006588263104`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.7727113949942837`*^9, 3.7727114194733334`*^9}, { - 3.7727114520769644`*^9, 3.7727114560907445`*^9}, {3.7727122043921447`*^9, - 3.7727122145942173`*^9}, 3.772712292218692*^9, 3.7727123425014286`*^9, - 3.773313867306099*^9, {3.773314271141244*^9, 3.7733142974583597`*^9}, - 3.779640033888177*^9, 3.7797168186260185`*^9, 3.7797172057277994`*^9}, - CellLabel-> - "Out[272]//MatrixForm=",ExpressionUUID->"6333dfae-2aaa-4930-9b4f-\ -40a5ab9167a0"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{ - RowBox[{"m2", "/", - RowBox[{"m2", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"2", ",", "1", ",", "1"}], "]"}], "]"}]}], "]"}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7727123532169538`*^9, 3.772712360449857*^9}, - 3.773312118532036*^9}, - CellLabel-> - "In[274]:=",ExpressionUUID->"4a681e4f-28c4-4233-a851-79c898b0c453"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.28573042664720144`", "0.07237377299652203`"}, - { - RowBox[{"-", "0.12525380081400792`"}], "0.46693790450294026`"}, - {"0.37213732681979034`", "0.38862775276099765`"}, - {"0.3551581997834065`", "0.12938358134427125`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.7727123611947594`*^9, {3.7733142717353864`*^9, 3.773314298204398*^9}, - 3.779717246291353*^9}, - CellLabel-> - "Out[274]//MatrixForm=",ExpressionUUID->"22451453-58cf-429e-a82e-\ -850627599256"] -}, Open ]] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Find ancillain", "Subsection", - CellChangeTimes->{{3.7727033908667707`*^9, 3.772703416768778*^9}, { - 3.7733178595036907`*^9, - 3.773317863384427*^9}},ExpressionUUID->"3c1eaef5-6582-4783-9a09-\ -0f5af0d99b65"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{"Import", "[", "\"\\"", "]"}], - ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"labelInit", " ", "=", " ", "5"}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"labelCTRLST", " ", "=", " ", "100"}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"labelMmt2", " ", "=", " ", "7"}], ";"}]}], "Input", - CellChangeTimes->{{3.779648778546235*^9, 3.7796487912444444`*^9}, { - 3.7797160378357096`*^9, 3.7797160845336475`*^9}, 3.7797161550500145`*^9}, - CellLabel-> - "In[728]:=",ExpressionUUID->"e98bf08f-d7d9-400c-9f49-e957619bee3e"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"FindAncilla", "[", "st_", "]"}], ":=", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "result", ",", "gate", ",", "ancilla", ",", "ancilla1", ",", "ancilla2", - ",", "mmt2List", ",", "anciPos"}], "}"}], ",", - RowBox[{"(*", - RowBox[{"Deal", " ", "with", " ", "cgs", " ", "gates"}], "*)"}], - "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - RowBox[{"ancilla1", "=", - RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", - RowBox[{"ancilla1", "=", - RowBox[{ - RowBox[{ - RowBox[{"DeleteDuplicates", "@", - RowBox[{"(", - RowBox[{"FindAncilla", "/@", - RowBox[{"#", "[", - RowBox[{"[", "3", "]"}], "]"}]}], ")"}]}], "&"}], "/@", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"labelCTRLST", ",", "_", ",", "_"}], "}"}]}], "]"}]}]}], - ";", "\[IndentingNewLine]", - RowBox[{"ancilla1", "=", - RowBox[{"Flatten", "[", - RowBox[{"ancilla1", ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - "Deal", " ", "with", " ", "normal", " ", "simple", " ", "gates"}], - "*)"}], - RowBox[{"ancilla2", "=", - RowBox[{ - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", "3", "]"}], "]"}], "&"}], "/@", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"labelInit", ",", "_", ",", "_"}], "}"}]}], "]"}]}]}], ";", - "\[IndentingNewLine]", - RowBox[{"ancilla", "=", - RowBox[{"Join", "[", - RowBox[{"ancilla1", ",", "ancilla2"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"(*", - RowBox[{ - "We", " ", "assume", " ", "that", " ", "all", " ", "st", " ", "in", - " ", "the", " ", "controled", " ", "sequence", " ", "have", " ", - "the", " ", "same", " ", "ancilla"}], "*)"}], - RowBox[{"mmt2List", "=", - RowBox[{"Cases", "[", - RowBox[{"st", ",", - RowBox[{"{", - RowBox[{"labelMmt2", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"result", "=", - RowBox[{"{", "}"}]}]}], "*)"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"result", "=", - RowBox[{"{", "}"}]}], ";", " ", "\[IndentingNewLine]", - RowBox[{"Do", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"Which", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "labelInit"}], ",", - "\[IndentingNewLine]", - RowBox[{"AppendTo", "[", - RowBox[{"result", ",", "gate"}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "labelCTRLST"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"ancilla2", "=", - RowBox[{"DeleteDuplicates", "@", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"FindAncilla", "/@", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}]}], ",", "1"}], "]"}]}]}], ";", - "\[IndentingNewLine]", - RowBox[{"result", "=", - RowBox[{"Join", "[", - RowBox[{"result", ",", "ancilla2"}], "]"}]}]}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"gate", "[", - RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "labelMmt2"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"anciPos", "=", - RowBox[{"Position", "[", - RowBox[{"result", ",", - RowBox[{"{", - RowBox[{"5", ",", "_", ",", - RowBox[{"gate", "[", - RowBox[{"[", "3", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{ - RowBox[{"Length", "[", "anciPos", "]"}], "\[GreaterEqual]", - "1"}], ",", - RowBox[{ - RowBox[{ - RowBox[{"result", "[", - RowBox[{"[", - RowBox[{"Last", "@", "anciPos"}], "]"}], "]"}], "[", - RowBox[{"[", "3", "]"}], "]"}], "=", - RowBox[{"gate", "[", - RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}], ";"}]}], - "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"gate", ",", "st"}], "}"}]}], "\n", "]"}], ";", "\n", - RowBox[{"Return", "[", "result", "]"}]}]}], "\n", "]"}]}]], "Input", - CellChangeTimes->{{3.7733178671566463`*^9, 3.7733179475612392`*^9}, { - 3.773317988656184*^9, 3.7733180458000307`*^9}, {3.773331441947236*^9, - 3.7733315345705643`*^9}, 3.773331616592845*^9, {3.7733316625634675`*^9, - 3.773331665596404*^9}, {3.773331725428402*^9, 3.773331770920244*^9}, { - 3.7733318310830564`*^9, 3.7733318885036345`*^9}, {3.773331928225665*^9, - 3.773331979856469*^9}, {3.773332111161507*^9, 3.773332321336644*^9}, { - 3.7733324238481684`*^9, 3.7733324240785236`*^9}, {3.7733324767197657`*^9, - 3.773332501088364*^9}, {3.77333253407475*^9, 3.7733325481832438`*^9}, { - 3.773332856448041*^9, 3.773332857375207*^9}, {3.7733328926072383`*^9, - 3.7733328954868393`*^9}, {3.773332937883618*^9, 3.77333294098521*^9}, { - 3.773333100718772*^9, 3.773333109390121*^9}, {3.7733331629100018`*^9, - 3.7733332537815995`*^9}, {3.773333295286283*^9, 3.773333418053096*^9}, { - 3.7733334510945673`*^9, 3.773333495989855*^9}, 3.77333404605488*^9, { - 3.773334079949977*^9, 3.7733341131243715`*^9}, {3.773334164478031*^9, - 3.773334209524496*^9}, {3.773334248035482*^9, 3.7733342960499535`*^9}, { - 3.7733343942127337`*^9, 3.773334445012886*^9}, {3.7733345082585077`*^9, - 3.7733345511549625`*^9}, {3.7733348632295103`*^9, 3.773334863683296*^9}, { - 3.7796488129594097`*^9, 3.7796488886605215`*^9}, {3.7796489419392686`*^9, - 3.779648943668011*^9}, {3.779649473947097*^9, 3.779649552557247*^9}, { - 3.779649613749036*^9, 3.779649672523981*^9}, {3.779709364096504*^9, - 3.7797095745000763`*^9}, {3.779709720463456*^9, 3.779709724982386*^9}, - 3.779709766715674*^9, {3.7797098020391073`*^9, 3.7797098028933687`*^9}, { - 3.779709857582408*^9, 3.7797098974681377`*^9}, {3.779709989841689*^9, - 3.779709998455854*^9}, {3.779710182935817*^9, 3.779710183213756*^9}, { - 3.779710216852389*^9, 3.7797102170988007`*^9}, {3.7797103502756567`*^9, - 3.7797104059484034`*^9}, {3.779710450910351*^9, 3.7797105285542793`*^9}, { - 3.7797106714539127`*^9, 3.779710794909171*^9}, {3.7797108289708295`*^9, - 3.7797108552476625`*^9}, {3.77971090651932*^9, 3.779710962994958*^9}, { - 3.779710998709873*^9, 3.779711032081812*^9}, {3.779711064390499*^9, - 3.7797111111342645`*^9}, {3.7797111572511005`*^9, - 3.7797111756220093`*^9}, {3.7797112223334503`*^9, - 3.7797113963186326`*^9}, {3.7797115200344133`*^9, 3.7797115464750967`*^9}, - 3.779711585418621*^9, 3.779713025315459*^9, {3.7797131119588575`*^9, - 3.7797131314719167`*^9}, {3.7797131618776608`*^9, - 3.7797132061845646`*^9}, {3.7797133356546583`*^9, 3.779713404537847*^9}, { - 3.779713634746311*^9, 3.77971365114431*^9}, {3.7797137180875845`*^9, - 3.7797137528502893`*^9}, {3.779713848598752*^9, 3.7797138853713217`*^9}, { - 3.779715982733713*^9, 3.779716028393556*^9}, {3.7797161086926055`*^9, - 3.7797161854605336`*^9}, {3.779716215496724*^9, 3.7797164641756363`*^9}}, - CellLabel-> - "In[228]:=",ExpressionUUID->"239295bd-ec0d-49e0-8306-cf8ddfb32eca"], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"st", "=", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], "}"}]}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "4"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "4"}], "}"}], "}"}]}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{"7", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "3", ",", "5"}], "}"}]}], "}"}]}], ";"}], - "\[IndentingNewLine]"}]], "Input", - CellChangeTimes->{{3.7733315590758114`*^9, 3.7733316312243204`*^9}, { - 3.773332380715337*^9, 3.7733323840667295`*^9}, {3.773332967280001*^9, - 3.773332970894409*^9}, {3.773333427443303*^9, 3.773333442704629*^9}, { - 3.773333998293828*^9, 3.77333402350019*^9}, 3.7796466571606054`*^9, { - 3.7796476390578156`*^9, 3.7796476684082375`*^9}, {3.779648913292055*^9, - 3.7796489134675837`*^9}, {3.779649448663418*^9, 3.7796494494503117`*^9}, { - 3.7797090503729773`*^9, 3.7797090813574324`*^9}, 3.779711392601322*^9, { - 3.7797131473958197`*^9, 3.7797131560814285`*^9}, {3.779713691524742*^9, - 3.7797137050968466`*^9}}, - CellLabel-> - "In[166]:=",ExpressionUUID->"6abdfe11-9923-4846-8ebd-5f0dfda2adf4"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"result", "=", - RowBox[{"FindAncilla", "[", "st", "]"}]}]], "Input", - CellChangeTimes->{{3.779649580032651*^9, 3.779649589885589*^9}, { - 3.7797088490428524`*^9, 3.7797088507189617`*^9}, {3.779711732056101*^9, - 3.779711732953601*^9}}, - CellLabel-> - "In[229]:=",ExpressionUUID->"e7e5661a-223e-4d23-ad90-e270e9951869"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "4"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.7796495904061937`*^9, 3.77964962367476*^9}, { - 3.7796496625510454`*^9, 3.779649676687165*^9}, 3.779708851413433*^9, - 3.779709059273624*^9, 3.779709107715982*^9, {3.779709757027336*^9, - 3.7797097713344326`*^9}, 3.7797098074691715`*^9, {3.7797098615076437`*^9, - 3.779709901212055*^9}, 3.779709994017228*^9, 3.779710208092903*^9, - 3.7797102908052206`*^9, 3.77971035874848*^9, 3.779710410809335*^9, - 3.7797104633028*^9, {3.779710733319366*^9, 3.779710758163051*^9}, - 3.77971080003957*^9, {3.7797108377767625`*^9, 3.7797108608165355`*^9}, - 3.7797109762911096`*^9, {3.7797110190189295`*^9, 3.779711035185276*^9}, { - 3.779711107027988*^9, 3.779711115230361*^9}, 3.779711187603963*^9, - 3.779711291785266*^9, 3.7797113371061234`*^9, 3.779711399043937*^9, - 3.779711506098796*^9, 3.7797117335156374`*^9, 3.779713140009878*^9, { - 3.7797136659817533`*^9, 3.7797137102801085`*^9}, {3.7797138545391717`*^9, - 3.779713888571605*^9}, 3.7797141164424877`*^9, {3.7797162102706394`*^9, - 3.7797162314527006`*^9}, 3.7797163128105555`*^9, 3.77971634389828*^9, - 3.779716436667842*^9, 3.7797164686440926`*^9}, - CellLabel-> - "Out[229]=",ExpressionUUID->"6aef9264-a39c-4bc6-8012-cce36d83024c"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["CreateChannelFromList", "Subsection", - CellChangeTimes->{{3.7799453318350096`*^9, - 3.779945362355019*^9}},ExpressionUUID->"733d21f7-7961-40ee-a35a-\ -23d0e7a2eff4"], - -Cell[CellGroupData[{ - -Cell["DoNotReuseAncilla -> True", "Subsubsection", - CellChangeTimes->{ - 3.779949665135092*^9},ExpressionUUID->"aae63212-f658-455d-ae5a-\ -a4ed5aa0fdb3"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}]], "Input", - CellLabel->"In[41]:=",ExpressionUUID->"67cd0b26-b5b3-414a-a0f0-f99e01bc374e"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.019323332493299067`", ",", "0.3439413818528442`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.3248298636882916`", ",", "0.11283245470438968`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.6684002517937784`", ",", - RowBox[{"-", "0.047238340564308756`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.0689406102863056`"}], ",", "0.6919908977091163`"}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.05436991501080485`", ",", "0.3448225540450435`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.27395642830745176`", ",", "0.10994038396531818`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.13300477393669197`"}], ",", "0.49866630664365963`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.5889838554440658`", ",", "0.09073440635603947`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.779949357518876*^9}, - CellLabel->"Out[41]=",ExpressionUUID->"b9bdb75b-e3db-42d7-9c6a-f273a8bb22f9"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9, {3.779946432523148*^9, 3.779946433415761*^9}, { - 3.779948990564674*^9, 3.7799490114986277`*^9}, {3.7799493510139217`*^9, - 3.779949352029909*^9}}, - CellLabel->"In[47]:=",ExpressionUUID->"2ab6dc0e-b8b1-49b2-b078-7e1a0078da8a"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782138`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6626651860104378`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6626651860104384`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.481080983120904`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4810809831209037`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4557435949899862`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9}, - CellLabel-> - "During evaluation of \ -In[47]:=",ExpressionUUID->"b0a25be2-498d-44ea-befd-6a618be3119a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.779949418518791*^9}, - CellLabel-> - "During evaluation of \ -In[47]:=",ExpressionUUID->"763da706-7553-486e-8ef2-1058bd7afb3a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8903244193474701`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.717191671026991`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6773066245209141`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "6.058359262089842`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9274558284863408`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.026260736107445`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.473534429963039`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.180983724568165`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.300642361954897`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.903494689521106`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6197432474607676`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9648061619860513`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185427275`*^9}, - CellLabel-> - "During evaluation of \ -In[47]:=",ExpressionUUID->"81a17aef-0574-4c8b-b0af-5932d6a7c7fd"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7796420341399236`*^9, 3.7796420342466383`*^9}, { - 3.779948226974616*^9, 3.7799482277375107`*^9}}, - CellLabel->"In[37]:=",ExpressionUUID->"e8d11e34-a8d5-49e5-abb6-99a2868e17c2"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"gatelist2", " ", "=", " ", - RowBox[{"gatelist", "/.", - RowBox[{ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}], "\[Rule]", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}]}]}]}]], "Input", - CellChangeTimes->{{3.779949427011515*^9, 3.779949446989496*^9}}, - CellLabel->"In[49]:=",ExpressionUUID->"fa9b3aea-adb3-4309-9c7f-c7907e2a130b"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.497787143782138`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6626651860104378`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6626651860104384`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.481080983120904`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4810809831209037`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4557435949899862`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8903244193474701`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.717191671026991`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6773066245209141`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "6.058359262089842`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9274558284863408`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.026260736107445`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.473534429963039`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "6.180983724568165`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.300642361954897`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.903494689521106`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6197432474607676`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.9648061619860513`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.779949448330283*^9}, - CellLabel->"Out[49]=",ExpressionUUID->"94a3f698-58e9-49aa-a1ca-e51765afc52f"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"gatelist", ",", - RowBox[{"{", - RowBox[{"4", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.779946442358528*^9, 3.7799464492882566`*^9}}, - CellLabel->"In[21]:=",ExpressionUUID->"9dcc2b61-bc97-4401-b049-b83b830a0aa0"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CreateIsometryFromList", "[", "gatelist2", "]"}]], "Input", - CellChangeTimes->{{3.779948111569873*^9, 3.77994813006326*^9}}, - CellLabel->"In[31]:=",ExpressionUUID->"b1d77aa4-75c6-4a14-8f29-790bf74399ed"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.5867498481454251`", "\[VeryThinSpace]", "-", - RowBox[{"0.24303974482218907`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.3827027777779729`"}], "+", - RowBox[{"0.15852068091349306`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.10016858368581445`"}], "+", - RowBox[{"0.04149118588636889`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.4236998831374431`", "\[VeryThinSpace]", "-", - RowBox[{"0.17550223797142372`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.20873252725869057`", "\[VeryThinSpace]", "-", - RowBox[{"0.08645984369896101`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.25477081484495545`", "\[VeryThinSpace]", "-", - RowBox[{"0.10552952680562547`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.17153862315905472`", "\[VeryThinSpace]", "-", - RowBox[{"0.07105362418328795`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6359022192947286`", "\[VeryThinSpace]", "-", - RowBox[{"0.26339932357502627`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.01250863769849298`", "\[VeryThinSpace]", "-", - RowBox[{"0.030198522778512184`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.05089815884788824`", "\[VeryThinSpace]", "-", - RowBox[{"0.12287902539039179`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.10320935460493803`", "\[VeryThinSpace]", "-", - RowBox[{"0.2491694236510171`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.028513686795315612`"}], "+", - RowBox[{"0.06883812937450944`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.16366147816247717`", "\[VeryThinSpace]", "-", - RowBox[{"0.39511376021788025`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.05232384163620067`", "\[VeryThinSpace]", "-", - RowBox[{"0.12632092811357676`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.18851826151818443`", "\[VeryThinSpace]", "-", - RowBox[{"0.4551233437121987`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.062126046039751893`", "\[VeryThinSpace]", "-", - RowBox[{"0.14998554292578342`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.7799481180542517`*^9, 3.779948130564459*^9}, - 3.7799482678537416`*^9, 3.7799490282482014`*^9, 3.779949095534085*^9, { - 3.779949212093656*^9, 3.7799492342166586`*^9}}, - CellLabel->"Out[31]=",ExpressionUUID->"90d2067c-c217-4ead-9cf4-a12fa84e35ab"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"result", " ", "=", " ", - RowBox[{"BoxiTest", "[", "gatelist2", "]"}]}]], "Input", - CellChangeTimes->{{3.772710399905365*^9, 3.772710415866135*^9}, - 3.7727104736423826`*^9, {3.772710577388398*^9, 3.772710578858229*^9}, { - 3.7727106457911396`*^9, 3.7727106476886997`*^9}, {3.7727113879371376`*^9, - 3.7727113883894024`*^9}, {3.779946421237708*^9, 3.7799464408655095`*^9}, { - 3.779947767846183*^9, 3.779947768440566*^9}}, - CellLabel->"In[50]:=",ExpressionUUID->"c7a3e1b4-b28b-4f67-8f43-b076a2339914"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}], "}"}]], "Print", - CellChangeTimes->{3.779949238106361*^9, 3.7799494576219606`*^9}, - CellLabel-> - "During evaluation of \ -In[50]:=",ExpressionUUID->"1803f1a4-e53c-46a4-ad99-ad1b61c2dbb6"], - -Cell[BoxData[ - RowBox[{"{", "1", "}"}]], "Print", - CellChangeTimes->{3.779949238106361*^9, 3.779949457629938*^9}, - CellLabel-> - "During evaluation of \ -In[50]:=",ExpressionUUID->"ac3f77fb-415f-470e-8bdc-2e151f2c6746"], - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Print", - CellChangeTimes->{3.779949238106361*^9, 3.7799494576438665`*^9}, - CellLabel-> - "During evaluation of \ -In[50]:=",ExpressionUUID->"f4ce72ec-aeed-4bed-87f5-dfe98c7d666c"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.01785243139046805`", "\[VeryThinSpace]", "+", - RowBox[{"0.007394719203267113`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.3177604030774923`", "\[VeryThinSpace]", "+", - RowBox[{"0.13162066853983903`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.3001036626100441`", "\[VeryThinSpace]", "+", - RowBox[{"0.12430700717092007`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.10424359550439127`", "\[VeryThinSpace]", "+", - RowBox[{"0.04317911104845397`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.6175213121576626`", "\[VeryThinSpace]", "+", - RowBox[{"0.255785702550133`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.04364253599716296`"}], "-", - RowBox[{"0.01807733030638006`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.06369281880235403`"}], "-", - RowBox[{"0.026382429373706762`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6393162270775647`", "\[VeryThinSpace]", "+", - RowBox[{"0.2648134519007244`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.05023125166286044`", "\[VeryThinSpace]", "+", - RowBox[{"0.020806465693732967`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.3185745000304829`", "\[VeryThinSpace]", "+", - RowBox[{"0.13195787853885363`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.253102736913151`", "\[VeryThinSpace]", "+", - RowBox[{"0.10483858630317602`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.10157167054198998`", "\[VeryThinSpace]", "+", - RowBox[{"0.04207236349138399`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.12288038836640071`"}], "-", - RowBox[{"0.05089872341103633`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.4607075942610742`", "\[VeryThinSpace]", "+", - RowBox[{"0.19083133383121773`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.5441501290243596`", "\[VeryThinSpace]", "+", - RowBox[{"0.22539436340895885`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.0838276609269071`", "\[VeryThinSpace]", "+", - RowBox[{"0.0347225540579381`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799463661967525`*^9, {3.7799463988162427`*^9, 3.7799464244370136`*^9}, - 3.779946462234497*^9, 3.7799477699770303`*^9, 3.7799478500902176`*^9, { - 3.779947963544652*^9, 3.7799479733194685`*^9}, {3.7799482088294573`*^9, - 3.7799482805032625`*^9}, 3.779948324392984*^9, 3.7799483675081797`*^9, - 3.779949035261554*^9, 3.7799491008490224`*^9, 3.7799491649026337`*^9, { - 3.779949213761733*^9, 3.779949238123254*^9}, 3.779949457656866*^9}, - CellLabel->"Out[50]=",ExpressionUUID->"7ae7fab0-35e4-467f-b8f5-e68a72b8d05c"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist", "=", - RowBox[{"DecChannelInQCM", "[", "krausList", "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.779945847138178*^9, 3.7799458841150446`*^9}}, - CellLabel->"In[44]:=",ExpressionUUID->"deb96a21-d596-4f37-a01a-4689f1a32540"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"gatelist", ",", - RowBox[{"{", - RowBox[{"4", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";"}]], "Input", - CellLabel->"In[45]:=",ExpressionUUID->"2b6a8c00-e457-47e9-b437-d71152b68b9c"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CreateOperationFromGateList", "[", "gatelist", "]"}]], "Input", - CellLabel->"In[46]:=",ExpressionUUID->"5880e3f9-488a-4340-91b4-9fc746eb4cda"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}], "}"}]], "Print", - CellChangeTimes->{3.779946072619607*^9, 3.7799493317827573`*^9, - 3.779949376065608*^9}, - CellLabel-> - "During evaluation of \ -In[46]:=",ExpressionUUID->"715573a8-465a-4927-970f-44974a96bc38"], - -Cell[BoxData[ - RowBox[{"{", "1", "}"}]], "Print", - CellChangeTimes->{3.779946072619607*^9, 3.7799493317827573`*^9, - 3.7799493760812283`*^9}, - CellLabel-> - "During evaluation of \ -In[46]:=",ExpressionUUID->"221b2fa2-da5c-4388-b00a-0fb74f3b5580"], - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Print", - CellChangeTimes->{3.779946072619607*^9, 3.7799493317827573`*^9, - 3.7799493760812283`*^9}, - CellLabel-> - "During evaluation of \ -In[46]:=",ExpressionUUID->"c297f14b-9f77-4732-8cbb-d13005e33605"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.019170674897577483`", "\[VeryThinSpace]", "-", - RowBox[{"0.03027380390753802`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.23369118468176772`", "\[VeryThinSpace]", "-", - RowBox[{"0.3690387082235696`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.21178008470649964`", "\[VeryThinSpace]", "-", - RowBox[{"0.33443730020879364`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.07611493094618557`", "\[VeryThinSpace]", "-", - RowBox[{"0.12019861096240207`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.3155055663106696`", "\[VeryThinSpace]", "-", - RowBox[{"0.4982377353565598`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.06216240983104501`", "\[VeryThinSpace]", "-", - RowBox[{"0.09816517236348604`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.06676398258804454`", "\[VeryThinSpace]", "-", - RowBox[{"0.10543184983081288`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.36607476353887053`", "\[VeryThinSpace]", "-", - RowBox[{"0.5780952244031042`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.024196215093215526`"}], "+", - RowBox[{"0.03820999912367043`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.11523845002249462`"}], "+", - RowBox[{"0.18198139904977767`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.08265228928632665`"}], "+", - RowBox[{"0.13052222792007792`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.03619393167726236`"}], "+", - RowBox[{"0.057156464031358774`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.18273482833129862`", "\[VeryThinSpace]", "-", - RowBox[{"0.28856982811170373`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.26067013339789413`"}], "+", - RowBox[{"0.4116431239484831`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.31015168426453643`"}], "+", - RowBox[{"0.4897830316972114`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.07350975158701062`", "\[VeryThinSpace]", "-", - RowBox[{"0.11608458318377546`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.7799460726325417`*^9, 3.7799493317827573`*^9, - 3.7799493760968494`*^9}, - CellLabel->"Out[46]=",ExpressionUUID->"825d3cac-59e9-4e34-92b1-d3ec48e2652b"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["DoNotReuseAncilla -> False", "Subsubsection", - CellChangeTimes->{ - 3.779949665135092*^9, {3.779949711029231*^9, - 3.779949712727753*^9}},ExpressionUUID->"e11cd995-b69f-4c83-b732-\ -733cc811fefb"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}]], "Input", - CellLabel->"In[60]:=",ExpressionUUID->"adabbfc2-ed32-4bc1-a19a-638c4548d39c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.5596053211672138`", ",", "0.0031953481790030214`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.5448440930312204`", ",", "0.1885737199003163`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.33821837677173994`"}], ",", "0.5836951867895779`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.027979541058387722`", ",", "0.1993047971357194`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.11264228485571834`", ",", "0.5038600871948771`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.004409543272346134`"}], ",", "0.46799057321567106`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.5117253620107801`", ",", "0.05374303788884113`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.01554667719887598`", ",", "0.32898144394792045`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.779949357518876*^9, 3.779949719380636*^9, - 3.7799497680655365`*^9}, - CellLabel->"Out[60]=",ExpressionUUID->"c1421e83-fef9-4804-9a0d-bf58720cb69e"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9, {3.779946432523148*^9, 3.779946433415761*^9}, { - 3.779948990564674*^9, 3.7799490114986277`*^9}, {3.7799493510139217`*^9, - 3.779949352029909*^9}, {3.7799497152062817`*^9, 3.779949716627838*^9}}, - CellLabel->"In[61]:=",ExpressionUUID->"924725bf-d7a5-45a0-9b24-7dcffc9d15d4"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.356194490192345`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2033540350284795`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2033540350284784`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1465048474799144`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.146504847479914`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.103610517007626`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.779949722251322*^9, 3.779949771026052*^9}, - CellLabel-> - "During evaluation of \ -In[61]:=",ExpressionUUID->"673dca8c-3c4a-44af-ae15-5c6bd5ca36e5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.779949722251322*^9, 3.779949771026052*^9}, - CellLabel-> - "During evaluation of \ -In[61]:=",ExpressionUUID->"7e2a470c-f445-4817-91bd-516292d0a5e1"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.2195723014304645`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0182945288419092`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.078248827884121`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5338209833283032`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.42696976272407583`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4901348092959439`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.054073961708829`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.394605675981507`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.9655715538530467`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948957`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3738172234440107`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.9244460155714065`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.998661196124858`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.779949722251322*^9, 3.7799497710417156`*^9}, - CellLabel-> - "During evaluation of \ -In[61]:=",ExpressionUUID->"cd2a308f-4cbf-4b2a-98fb-11e9ae29c351"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7796420341399236`*^9, 3.7796420342466383`*^9}, { - 3.779948226974616*^9, 3.7799482277375107`*^9}}, - CellLabel->"In[63]:=",ExpressionUUID->"7292da75-52cf-4693-b235-3b9eddca451a"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"gatelist2", " ", "=", " ", - RowBox[{"Append", "[", - RowBox[{"gatelist", ",", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.779949427011515*^9, 3.779949446989496*^9}, { - 3.7799500256890945`*^9, 3.779950050180515*^9}}, - CellLabel->"In[65]:=",ExpressionUUID->"f7f6672b-fa53-4dc3-95a5-8b7d83bb3aef"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.356194490192345`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2033540350284795`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2033540350284784`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.1465048474799144`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.146504847479914`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.103610517007626`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948988`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.2195723014304645`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0182945288419092`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.078248827884121`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5338209833283032`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.42696976272407583`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4901348092959439`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.054073961708829`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.394605675981507`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.9655715538530467`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948957`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3738172234440107`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.9244460155714065`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.998661196124858`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.779949448330283*^9, 3.779949727756174*^9, {3.779949760232135*^9, - 3.7799497739345655`*^9}, 3.7799500526435337`*^9}, - CellLabel->"Out[65]=",ExpressionUUID->"6156c26a-8186-4891-b026-8174927f3b78"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"result", " ", "=", " ", - RowBox[{"BoxiTest", "[", "gatelist2", "]"}]}]], "Input", - CellChangeTimes->{{3.772710399905365*^9, 3.772710415866135*^9}, - 3.7727104736423826`*^9, {3.772710577388398*^9, 3.772710578858229*^9}, { - 3.7727106457911396`*^9, 3.7727106476886997`*^9}, {3.7727113879371376`*^9, - 3.7727113883894024`*^9}, {3.779946421237708*^9, 3.7799464408655095`*^9}, { - 3.779947767846183*^9, 3.779947768440566*^9}}, - CellLabel->"In[66]:=",ExpressionUUID->"521e67ed-9569-49a8-937d-024f1b4f948f"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.5170079025107946`", "\[VeryThinSpace]", "-", - RowBox[{"0.21415168507403798`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.0029521167818277877`", "\[VeryThinSpace]", "-", - RowBox[{"0.0012228068087425034`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.50337030596122`", "\[VeryThinSpace]", "-", - RowBox[{"0.20850280762503193`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.1742194001854182`", "\[VeryThinSpace]", "-", - RowBox[{"0.07216403838530631`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.3124730358186018`"}], "+", - RowBox[{"0.12943056931195812`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.5392640363002437`", "\[VeryThinSpace]", "-", - RowBox[{"0.22337047753561742`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.025849725312903478`", "\[VeryThinSpace]", "-", - RowBox[{"0.010707306808224099`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.18413362280500584`", "\[VeryThinSpace]", "-", - RowBox[{"0.07627064385472485`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.04310633619803285`", "\[VeryThinSpace]", "-", - RowBox[{"0.10406790147350445`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.1928189075995092`", "\[VeryThinSpace]", "-", - RowBox[{"0.46550602180870004`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.001687459154623781`"}], "+", - RowBox[{"0.004073886777043396`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.17909223887267908`", "\[VeryThinSpace]", "-", - RowBox[{"0.43236691200218413`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.19582881796255372`", "\[VeryThinSpace]", "-", - RowBox[{"0.47277258822868873`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.02056657020502907`", "\[VeryThinSpace]", "-", - RowBox[{"0.04965209272047906`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.005949455792337952`", "\[VeryThinSpace]", "-", - RowBox[{"0.014363256862601636`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.1258957481544139`", "\[VeryThinSpace]", "-", - RowBox[{"0.30393922263949325`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799463661967525`*^9, {3.7799463988162427`*^9, 3.7799464244370136`*^9}, - 3.779946462234497*^9, 3.7799477699770303`*^9, 3.7799478500902176`*^9, { - 3.779947963544652*^9, 3.7799479733194685`*^9}, {3.7799482088294573`*^9, - 3.7799482805032625`*^9}, 3.779948324392984*^9, 3.7799483675081797`*^9, - 3.779949035261554*^9, 3.7799491008490224`*^9, 3.7799491649026337`*^9, { - 3.779949213761733*^9, 3.779949238123254*^9}, 3.779949457656866*^9, - 3.779950067216813*^9}, - CellLabel->"Out[66]=",ExpressionUUID->"f9d5b152-9b8d-45d4-b1e6-63370115f862"] -}, Open ]] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["CreateInstrumentFromList", "Subsection", - CellChangeTimes->{{3.7799506392065525`*^9, - 3.779950659516597*^9}},ExpressionUUID->"0e73278c-18a9-472f-afee-\ -8ceff0f35ee1"], - -Cell[CellGroupData[{ - -Cell["DoNotReuseAncilla -> True", "Subsubsection", - CellChangeTimes->{ - 3.779950733894147*^9},ExpressionUUID->"bae7c1e2-b35d-484c-8768-\ -9b1a668b95a8"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}]], "Input", - CellLabel-> - "In[146]:=",ExpressionUUID->"dcb7ff03-0672-4f67-bc48-91855c366749"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.19109099770393845`", ",", "0.40883752289517067`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.007367254412863969`"}], ",", "0.5114366056513945`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.7701360964358163`", ",", - RowBox[{"-", "0.017332080388407042`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.21873861300060252`", ",", "0.06915705473756499`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.07228579697762684`", ",", "0.13988348195386452`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.41269361195867854`", ",", "0.23249399876962767`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.37568672643285334`"}], ",", "0.5683782668891771`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.07610516470043882`", ",", "0.4117361737603129`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.779949357518876*^9, 3.779950712767539*^9, - 3.7799507607532387`*^9, 3.7799526971437693`*^9, 3.7799620637941427`*^9, - 3.779962101928267*^9, 3.779962191990664*^9}, - CellLabel-> - "Out[146]=",ExpressionUUID->"8f81176e-a92e-4328-91a9-144e1a04d25c"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9, {3.779946432523148*^9, 3.779946433415761*^9}, { - 3.779948990564674*^9, 3.7799490114986277`*^9}, {3.7799493510139217`*^9, - 3.779949352029909*^9}}, - CellLabel-> - "In[147]:=",ExpressionUUID->"dc4bd3d9-8d0c-44fa-bc7a-8fef365b2786"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3561944901923453`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2772500122708035`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2772500122708033`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9728586880210403`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9728586880210411`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.207826136051721`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955176244`*^9}, - CellLabel-> - "During evaluation of \ -In[147]:=",ExpressionUUID->"c5caf712-c67a-41fa-9a47-a942305b2ff2"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955176244`*^9}, - CellLabel-> - "During evaluation of \ -In[147]:=",ExpressionUUID->"a6ec49c5-c8a9-45be-a2b2-4fa855e2c19c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.809951511354245`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.712388980384691`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.518706170262442`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.272413475369235`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4131830819826592`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7897122865903157`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.41273903475480866`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948974`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.9183499280927667`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.8502624100265432`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.8791377485711759`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "5.830458991628737`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9666043409468691`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.4006564721195063`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.570796326794896`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948983`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.570796326794897`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955332456`*^9}, - CellLabel-> - "During evaluation of \ -In[147]:=",ExpressionUUID->"85ec70ce-85b1-43c8-83f6-1e7884800825"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7796420341399236`*^9, 3.7796420342466383`*^9}, { - 3.779948226974616*^9, 3.7799482277375107`*^9}}, - CellLabel-> - "In[143]:=",ExpressionUUID->"aaf2e3d6-dc65-40a8-891e-55092d3d0d5d"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"result", "=", - RowBox[{"CreateOperationFromGateList", "[", "gatelist", "]"}]}]], "Input", - CellChangeTimes->{{3.7799507660317664`*^9, 3.779950787553157*^9}, - 3.779962175814495*^9, {3.779962211409792*^9, - 3.779962220403788*^9}},ExpressionUUID->"dcf5948c-3311-4aaa-89ae-\ -02f5c9fe502f"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.21288789787243428`", "\[VeryThinSpace]", "-", - RowBox[{"0.3982852433812181`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.0007059985229012607`", "\[VeryThinSpace]", "-", - RowBox[{"0.0013208303360670308`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.3250954115681074`", "\[VeryThinSpace]", "-", - RowBox[{"0.6082107363219786`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.2749062130808144`"}], "+", - RowBox[{"0.5143133502582613`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.16058697979900888`", "\[VeryThinSpace]", "-", - RowBox[{"0.30043710785157174`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.2300597016110739`", "\[VeryThinSpace]", "-", - RowBox[{"0.43041142856918174`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.20538734265648612`", "\[VeryThinSpace]", "-", - RowBox[{"0.3842526915569601`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.20929035773340915`", "\[VeryThinSpace]", "-", - RowBox[{"0.39155471917493734`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.014825016751054056`"}], "+", - RowBox[{"0.027735655543745318`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.16571781583567424`"}], "+", - RowBox[{"0.31003622691737315`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.028823608581547644`", "\[VeryThinSpace]", "-", - RowBox[{"0.05392517880915891`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.005410676510065336`"}], "+", - RowBox[{"0.010122663768712131`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.026607177347498713`", "\[VeryThinSpace]", "-", - RowBox[{"0.049778527626502256`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.09095697783182585`", "\[VeryThinSpace]", "-", - RowBox[{"0.1701685366576947`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.038417935686985`"}], "+", - RowBox[{"0.07187490232293142`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.11893778709248892`"}], "+", - RowBox[{"0.2225169488393185`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]}], "}"}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799507792395973`*^9, 3.779952716018617*^9, 3.7799527545202456`*^9, - 3.7799533735811377`*^9, {3.779953633891701*^9, 3.779953688588356*^9}, { - 3.7799537756205807`*^9, 3.779953784201335*^9}, 3.779962067331341*^9, { - 3.7799621050791616`*^9, 3.7799621172422237`*^9}, {3.7799621632371716`*^9, - 3.779962177143939*^9}}, - CellLabel-> - "Out[145]=",ExpressionUUID->"410023b5-0b8d-4d65-b0f3-0cd441d718a6"] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["DoNotReuseAncilla -> False", "Subsubsection", - CellChangeTimes->{ - 3.779950733894147*^9, {3.7799601333769054`*^9, - 3.7799601375596876`*^9}},ExpressionUUID->"8eefd489-eb43-4027-a2c5-\ -8de419030007"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel-> - "In[204]:=",ExpressionUUID->"2982b92c-6c19-4512-96f0-2ab291927e00"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}]], "Input", - CellLabel-> - "In[205]:=",ExpressionUUID->"bd872fd6-8394-417e-9768-f0701ae2f7da"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.32488824472202016`", ",", - RowBox[{"-", "0.20992391412156136`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.5495597321127157`", ",", - RowBox[{"-", "0.25668774054399585`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.128824495079469`", ",", "0.18117966273040725`"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.07120702683458163`"}], ",", "0.860764723198953`"}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.22328750168474432`", ",", "0.1624837676786707`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.4676755050226129`", ",", "0.14956124588691003`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.39782943554652006`", ",", "0.15675749066357927`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.3793673574314356`", ",", "0.20726534523162374`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.779949357518876*^9, 3.779950712767539*^9, 3.7799507607532387`*^9, - 3.7799526971437693`*^9, 3.779953886069868*^9, 3.7799620329615564`*^9, { - 3.7799622046430097`*^9, 3.779962226579892*^9}, 3.7799622905952716`*^9, { - 3.7799623318301315`*^9, 3.7799623603732376`*^9}, {3.779962734473343*^9, - 3.7799627439414673`*^9}, 3.7799628150121536`*^9}, - CellLabel-> - "Out[205]=",ExpressionUUID->"0b87787d-79c7-4340-a0af-f3269f9889d8"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist", "=", - RowBox[{"DecChannelInQCM", "[", "krausList", "]"}]}], - ";"}], "\[IndentingNewLine]", "gatelist"}], "Input", - CellChangeTimes->{{3.779945847138178*^9, 3.7799458841150446`*^9}, { - 3.7799628258141346`*^9, 3.7799628273850937`*^9}}, - CellLabel-> - "In[215]:=",ExpressionUUID->"5ebb4ecb-8658-44a2-825b-01da036cc795"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.123340357836604`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7174033550925578`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.258019719767662`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3633589993999076`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589792`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.363358999399907`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.33156330057460803`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3858400545179503`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1123233852874608`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9763361655732675`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5589450564901552`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7646756976209207`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4229578367759604`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.251298334481042`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.3288010161712878`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7675202152751813`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2582592624769313`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4685040399868916`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.699665675343664`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6982192983981994`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.7799628301933928`*^9, 3.7799629493777494`*^9}, - CellLabel-> - "Out[216]=",ExpressionUUID->"dfc50077-c3f4-465f-947a-fcca0b5be2e2"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"gatelist", "=", - RowBox[{"gatelist", "/.", - RowBox[{ - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}], "\[Rule]", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]}]}]}]], "Input", - CellChangeTimes->{{3.7799629977314644`*^9, 3.779963025445446*^9}}, - CellLabel-> - "In[220]:=",ExpressionUUID->"a584e136-7a7f-43c4-9f92-c531febfabbb"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.123340357836604`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7174033550925578`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.258019719767662`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.3633589993999076`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589792`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.363358999399907`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.33156330057460803`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3858400545179503`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1123233852874608`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9763361655732675`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5589450564901552`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7646756976209207`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4229578367759604`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.251298334481042`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.3288010161712878`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7675202152751813`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2582592624769313`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4685040399868916`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.699665675343664`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6982192983981994`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.779963012411791*^9, 3.7799630261773605`*^9}}, - CellLabel-> - "Out[220]=",ExpressionUUID->"65736a49-7d3c-4096-9600-efc0d10fb4a6"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist2", "=", - RowBox[{"DeleteCases", "[", - RowBox[{"gatelist", ",", - RowBox[{"{", - RowBox[{"4", ",", "_", ",", "_"}], "}"}]}], "]"}]}], ";"}]], "Input", - CellLabel-> - "In[221]:=",ExpressionUUID->"882b33db-8ce0-4dc7-b2bf-2c9901b3cf76"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CreateInstrumentFromList", "[", "gatelist", "]"}]], "Input", - CellChangeTimes->{3.7799622244385667`*^9}, - CellLabel-> - "In[223]:=",ExpressionUUID->"a48e9488-e6f4-493a-b87d-db20fe2f92d9"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Print", - CellChangeTimes->{ - 3.7799628174598455`*^9, {3.7799630163086414`*^9, 3.779963034279415*^9}}, - CellLabel-> - "During evaluation of \ -In[223]:=",ExpressionUUID->"037bf29d-3728-4fa6-94ff-e61fb98a5142"], - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Print", - CellChangeTimes->{ - 3.7799628174598455`*^9, {3.7799630163086414`*^9, 3.779963034286396*^9}}, - CellLabel-> - "During evaluation of \ -In[223]:=",ExpressionUUID->"391c1510-71ea-44cf-8fda-45e6be29eed7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}], "}"}]], "Print", - CellChangeTimes->{ - 3.7799628174598455`*^9, {3.7799630163086414`*^9, 3.779963034300394*^9}}, - CellLabel-> - "During evaluation of \ -In[223]:=",ExpressionUUID->"30a0a46b-3194-4185-bf1b-3edd84fef368"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.019243351384551095`", "\[VeryThinSpace]", "-", - RowBox[{"0.3917074161044918`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.005213091420005906`"}], "+", - RowBox[{"0.10611491362602567`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.03466877545211681`", "\[VeryThinSpace]", "-", - RowBox[{"0.705699136313531`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.00753059131640073`"}], "+", - RowBox[{"0.15328870773800232`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.014910817991569692`", "\[VeryThinSpace]", "-", - RowBox[{"0.30351667288948586`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.01149023191562867`", "\[VeryThinSpace]", "-", - RowBox[{"0.2338890437621766`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.005864314062020018`", "\[VeryThinSpace]", "-", - RowBox[{"0.11937085503221904`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.04193720145961423`", "\[VeryThinSpace]", "-", - RowBox[{"0.8536513465937494`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.001965571393982555`", "\[VeryThinSpace]", "-", - RowBox[{"0.040010124874814715`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.011936812172942037`", "\[VeryThinSpace]", "-", - RowBox[{"0.242979393731873`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.007198594429452483`", "\[VeryThinSpace]", "-", - RowBox[{"0.14653075585413425`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.012481240904333911`", "\[VeryThinSpace]", "-", - RowBox[{"0.25406149514783394`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.014095265491112027`", "\[VeryThinSpace]", "-", - RowBox[{"0.28691572036993296`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.0024840414269390104`", "\[VeryThinSpace]", "-", - RowBox[{"0.050563824845187524`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.018008989019864342`", "\[VeryThinSpace]", "-", - RowBox[{"0.36658139295260644`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.011338294371707277`"}], "+", - RowBox[{"0.2307962840058528`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799460726325417`*^9, 3.7799493317827573`*^9, 3.7799493760968494`*^9, - 3.779962038442383*^9, 3.7799622306129827`*^9, 3.7799622947688656`*^9, { - 3.7799623342223034`*^9, 3.779962362836714*^9}, {3.7799627378808503`*^9, - 3.779962747337323*^9}, 3.779962817491091*^9, {3.779963016331549*^9, - 3.7799630343133636`*^9}}, - CellLabel-> - "Out[223]=",ExpressionUUID->"0e2f540e-d5af-48e9-b915-bdf086436acf"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9, {3.779946432523148*^9, 3.779946433415761*^9}, { - 3.779948990564674*^9, 3.7799490114986277`*^9}, {3.7799493510139217`*^9, - 3.779949352029909*^9}, {3.77995388176014*^9, 3.779953883513714*^9}}, - CellLabel-> - "In[209]:=",ExpressionUUID->"8fe3ed0b-975b-47f9-9000-53b9db2a8edc"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.7853981633974454`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.627736315139918`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589791`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.6277363151399182`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9599816824855052`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9599816824855052`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7128042161328925`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799538888641105`*^9, - 3.779962243267125*^9, 3.77996229811691*^9, {3.7799623359735518`*^9, - 3.7799623646596622`*^9}, 3.77996275397165*^9, 3.7799628194091105`*^9}, - CellLabel-> - "During evaluation of \ -In[209]:=",ExpressionUUID->"fbda3e78-95d0-48ab-a8e0-541f16d5a41a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799538888641105`*^9, - 3.779962243267125*^9, 3.77996229811691*^9, {3.7799623359735518`*^9, - 3.7799623646596622`*^9}, 3.77996275397165*^9, 3.7799628194151*^9}, - CellLabel-> - "During evaluation of \ -In[209]:=",ExpressionUUID->"3ce40b56-31b4-474e-8c40-d3a0078db874"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.4404988530561784`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.20159781651950695`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2910351577550088`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3620719841940587`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.956819765523145`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589794`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.534945561619746`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948963`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.4892094580919288`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.14159265358979`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.1832995246012332`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948917`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.358882472199443`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.1826299164739345`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.2971391264577956`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5486112958885747`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.5707963267948961`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948968`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799538888641105`*^9, - 3.779962243267125*^9, 3.77996229811691*^9, {3.7799623359735518`*^9, - 3.7799623646596622`*^9}, 3.77996275397165*^9, 3.7799628194330473`*^9}, - CellLabel-> - "During evaluation of \ -In[209]:=",ExpressionUUID->"445bdfed-7dc0-417a-9456-cbce440c4a63"] -}, Open ]] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7796420341399236`*^9, 3.7796420342466383`*^9}, { - 3.779948226974616*^9, 3.7799482277375107`*^9}}, - CellLabel-> - "In[211]:=",ExpressionUUID->"84c8d2e8-ee2d-4fc0-abae-e3916df5d463"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"result", "=", - RowBox[{"BoxiTest", "[", "gatelist", "]"}]}]], "Input", - CellChangeTimes->{{3.7799507660317664`*^9, 3.779950787553157*^9}}, - CellLabel-> - "In[212]:=",ExpressionUUID->"4b64b5d2-23c6-4445-8ba2-1c2d3d55e23a"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Print", - CellChangeTimes->{3.7799628196180506`*^9}, - CellLabel-> - "During evaluation of \ -In[212]:=",ExpressionUUID->"2c193973-7518-4124-a88e-9125db2cee9b"], - -Cell[BoxData[ - RowBox[{"{", "}"}]], "Print", - CellChangeTimes->{3.7799628196180506`*^9}, - CellLabel-> - "During evaluation of \ -In[212]:=",ExpressionUUID->"20d0f976-ec46-468f-a769-41483b398e41"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}], "}"}]], "Print", - CellChangeTimes->{3.7799628196336756`*^9}, - CellLabel-> - "During evaluation of \ -In[212]:=",ExpressionUUID->"b39d259a-38d3-425a-af0c-af7c9caff186"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.30015759965219263`"}], "+", - RowBox[{"0.12432934862529192`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.19394440764156762`", "\[VeryThinSpace]", "-", - RowBox[{"0.08033440399155356`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.5077269883913241`"}], "+", - RowBox[{"0.21030740457453348`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.2371485497351654`", "\[VeryThinSpace]", "-", - RowBox[{"0.09823014559741633`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.11901831429002244`"}], "+", - RowBox[{"0.04929899994971069`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.16738818210392004`"}], "+", - RowBox[{"0.06933445520842137`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.06578671466345157`", "\[VeryThinSpace]", "-", - RowBox[{"0.027249749437571143`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7952429100712564`"}], "+", - RowBox[{"0.32940039873256266`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.08544842754894295`", "\[VeryThinSpace]", "-", - RowBox[{"0.2062907526721148`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.06217984591888554`", "\[VeryThinSpace]", "-", - RowBox[{"0.1501154273236432`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.17897166749512805`", "\[VeryThinSpace]", "-", - RowBox[{"0.4320758269472733`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.05723461092480096`", "\[VeryThinSpace]", "-", - RowBox[{"0.13817657393180435`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.15224273389080575`", "\[VeryThinSpace]", "-", - RowBox[{"0.3675464729319479`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.059988494576075906`", "\[VeryThinSpace]", "-", - RowBox[{"0.14482503719190973`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.14517760246913414`", "\[VeryThinSpace]", "-", - RowBox[{"0.35048973683379797`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.07931701372357292`", "\[VeryThinSpace]", "-", - RowBox[{"0.1914882102583838`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799507792395973`*^9, 3.779952716018617*^9, 3.7799527545202456`*^9, - 3.7799533735811377`*^9, {3.779953633891701*^9, 3.779953688588356*^9}, { - 3.7799537756205807`*^9, 3.779953784201335*^9}, 3.779953897107133*^9, { - 3.7799617737687254`*^9, 3.7799617950798693`*^9}, 3.7799619189718847`*^9, - 3.779961952786158*^9, 3.779962247967777*^9, 3.779962299112259*^9, { - 3.7799623362577868`*^9, 3.779962364910303*^9}, {3.7799626866815577`*^9, - 3.779962711925844*^9}, 3.7799627567228017`*^9, 3.7799628196649137`*^9}, - CellLabel-> - "Out[212]=",ExpressionUUID->"f188cf01-32d2-46bd-99a9-41f23c51d7c3"] -}, Open ]] -}, Closed]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["CreateOperationFromGateList", "Subsection", - CellChangeTimes->{{3.779963075252967*^9, - 3.779963093485779*^9}},ExpressionUUID->"c6088d53-3464-4d11-ba5d-\ -d4970b664a4d"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.7806284157289104`*^9, - 3.7806284169904547`*^9}},ExpressionUUID->"14565f40-1f4f-4275-ae55-\ -99e9d0ac4726"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"m", "=", "2"}], ";", - RowBox[{"n", "=", "4"}], ";", - RowBox[{"k", "=", "2"}], ";"}], "\[IndentingNewLine]", - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"m", ",", "n", ",", "k"}], "]"}]}]}], "Input", - CellChangeTimes->{{3.779965263581626*^9, 3.7799652636843066`*^9}, { - 3.779965536086134*^9, 3.779965536178892*^9}, {3.7806283924109087`*^9, - 3.7806284409100084`*^9}}, - CellLabel-> - "In[266]:=",ExpressionUUID->"546f017e-dcb5-4eb4-b60a-bb86fc6f94e7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.1735393419837429`"}], ",", "0.5789661886170885`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.16711127095919834`"}], ",", "0.4845803749023239`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.6033860487012284`", ",", "0.042170908162147025`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.09391891820503262`"}], ",", "0.4674323671617563`"}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.5072632636094231`", ",", - RowBox[{"-", "0.09231580059143463`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.023188828207459263`", ",", "0.019029962081647884`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.39752224598198777`", ",", "0.36850916986750704`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.3913882427031809`", ",", "0.2550004991366808`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.779949357518876*^9, 3.779950712767539*^9, 3.7799507607532387`*^9, - 3.7799526971437693`*^9, 3.7799620637941427`*^9, 3.779962101928267*^9, - 3.779962191990664*^9, 3.7799630996984067`*^9, 3.77996325220764*^9, - 3.7799636310050697`*^9, 3.7799642467135067`*^9, 3.779964420072791*^9, - 3.7799647602682247`*^9, 3.7799649147033525`*^9, {3.7799650900569286`*^9, - 3.7799651019941344`*^9}, 3.7799651365894456`*^9, 3.779965264422344*^9, - 3.7799655675994263`*^9, 3.7799656674239197`*^9, {3.779965717175597*^9, - 3.779965723398061*^9}, {3.779965943476394*^9, 3.7799659596424646`*^9}, - 3.7799671160339637`*^9, 3.7806284422357206`*^9}, - CellLabel-> - "Out[267]=",ExpressionUUID->"b078cbdf-64ce-4731-80ca-0ff492e6e4b6"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist1", "=", - RowBox[{"DecChannelInQCM", "[", "krausList", "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.779964417017*^9, 3.7799644172528315`*^9}, { - 3.780628535258747*^9, 3.780628538475444*^9}, 3.780628653003626*^9}, - CellLabel-> - "In[277]:=",ExpressionUUID->"e487663f-2913-4e70-b3ca-8d844ea12683"], - -Cell[CellGroupData[{ - -Cell[BoxData["gatelist1"], "Input", - CellChangeTimes->{{3.779965581806669*^9, 3.7799655836766677`*^9}, - 3.7806286561578016`*^9}, - CellLabel-> - "In[278]:=",ExpressionUUID->"f54341a8-82dd-4398-9697-b6a7878122f0"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535899468`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.595961914206777`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.4709620613487233`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535898344`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.7180584824319116`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8311705290913327`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897887`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8311705290913354`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.33916833005275326`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535894876`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.009798922293823`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.872765724987336`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535899334`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.06401715293665768`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0157976539885407`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3059157210483157`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7929509180621601`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.1024237231212566`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589759`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.035867342120714`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897936`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3873117895189813`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7464876670674446`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.1407617635610003`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.7454133223568453`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897913`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2584337073951564`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.779965584240159*^9, 3.779965669986318*^9, 3.7799657275871086`*^9, { - 3.779965945999693*^9, 3.779965966397831*^9}, 3.7799671196045055`*^9, { - 3.7806285448117504`*^9, 3.7806285486200004`*^9}, 3.780628677375515*^9}, - CellLabel-> - "Out[278]=",ExpressionUUID->"58f81f25-e3a9-46cc-abdc-037238957b0a"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist1", "=", - RowBox[{"gatelist1", "/.", - RowBox[{ - RowBox[{"{", - RowBox[{"4", ",", "0", ",", "1"}], "}"}], "->", - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]}]}]}], ";"}]], "Input", - CellChangeTimes->{{3.7799663199319715`*^9, 3.779966363372658*^9}, - 3.7799671248769493`*^9, 3.7806286046251693`*^9, {3.7806286598297095`*^9, - 3.7806286623854218`*^9}}, - CellLabel-> - "In[279]:=",ExpressionUUID->"b52df673-120e-4131-a7b7-af0e42b60db0"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"result1", "=", - RowBox[{ - RowBox[{"CreateOperationFromGateList", "[", "gatelist1", "]"}], "[", - RowBox[{"[", - RowBox[{";;", ",", "1"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{ - 3.7799651175986867`*^9, {3.779965299330333*^9, 3.779965304887238*^9}, - 3.7799663722029266`*^9, {3.780628608449904*^9, 3.7806286695568466`*^9}, { - 3.780629404403597*^9, 3.7806294179215603`*^9}}, - CellLabel-> - "In[285]:=",ExpressionUUID->"1ca9df86-52d2-463d-b16b-6f759118a237"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.01865697437453031`"}], "-", - RowBox[{"0.01056904543531001`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.4407088959960854`"}], "-", - RowBox[{"0.24965850582271173`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.12829171199461342`", "\[VeryThinSpace]", "+", - RowBox[{"0.07267635715330784`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.399132118928379`"}], "-", - RowBox[{"0.2261055525377194`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6144968902170175`"}], "-", - RowBox[{"0.3481081885075008`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.15005128414868601`"}], "-", - RowBox[{"0.08500300252092714`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.04683055363599764`"}], "-", - RowBox[{"0.026529180948761527`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.4593945377402414`"}], "-", - RowBox[{"0.260243791122403`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.4661036881513564`"}], "-", - RowBox[{"0.2640444778845118`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.25688993002447025`", "\[VeryThinSpace]", "+", - RowBox[{"0.14552634783071192`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.07134332590029971`"}], "-", - RowBox[{"0.04041549491388312`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.13688354428555435`", "\[VeryThinSpace]", "+", - RowBox[{"0.07754357002671396`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.13284983514677684`"}], "-", - RowBox[{"0.07525850202449147`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.28572323470386696`"}], "-", - RowBox[{"0.16186021317720578`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.34706397139390643`"}], "-", - RowBox[{"0.19660931129452558`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.05995461493765962`"}], "-", - RowBox[{"0.033963869843491284`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799671310763655`*^9, {3.7806285952408547`*^9, 3.7806286418559694`*^9}, - 3.780628677928445*^9, 3.7806294187987156`*^9}, - CellLabel-> - "Out[285]=",ExpressionUUID->"8590a636-2462-4255-adc0-f64b24232e5d"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist2", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist2", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist2", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7727105704334183`*^9, 3.7727106047219987`*^9}, - 3.772711098938466*^9, {3.779946432523148*^9, 3.779946433415761*^9}, { - 3.779948990564674*^9, 3.7799490114986277`*^9}, {3.7799493510139217`*^9, - 3.779949352029909*^9}, 3.779983895861006*^9, {3.780628726625243*^9, - 3.780628732670887*^9}}, - CellLabel-> - "In[283]:=",ExpressionUUID->"c597199c-48f1-4ac6-a27a-48fa35f1481c"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955176244`*^9, - 3.779963102753209*^9, 3.7799632552856846`*^9, 3.7799636340034556`*^9, - 3.779964249704393*^9, 3.779964773787367*^9, 3.7799649191765385`*^9, - 3.7799653170033484`*^9, 3.7799655721502934`*^9, 3.7799656718306684`*^9, - 3.7799657303354645`*^9, 3.779965948207779*^9, 3.779967142855815*^9, { - 3.780628716721496*^9, 3.780628736719003*^9}}, - CellLabel-> - "During evaluation of \ -In[283]:=",ExpressionUUID->"b992500b-fdb5-4cdd-8b6b-7cd20274ddac"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.570796326794896`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.4113925707568695`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8717927364227176`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.144552543501219`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.144552543501219`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.7093642087930783`", ",", "1"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955176244`*^9, - 3.779963102753209*^9, 3.7799632552856846`*^9, 3.7799636340034556`*^9, - 3.779964249704393*^9, 3.779964773787367*^9, 3.7799649191765385`*^9, - 3.7799653170033484`*^9, 3.7799655721502934`*^9, 3.7799656718306684`*^9, - 3.7799657303354645`*^9, 3.779965948207779*^9, 3.779967142855815*^9, { - 3.780628716721496*^9, 3.7806287367200017`*^9}}, - CellLabel-> - "During evaluation of \ -In[283]:=",ExpressionUUID->"e40a3235-6f0e-4320-8ad5-94208e48c0f4"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955176244`*^9, - 3.779963102753209*^9, 3.7799632552856846`*^9, 3.7799636340034556`*^9, - 3.779964249704393*^9, 3.779964773787367*^9, 3.7799649191765385`*^9, - 3.7799653170033484`*^9, 3.7799655721502934`*^9, 3.7799656718306684`*^9, - 3.7799657303354645`*^9, 3.779965948207779*^9, 3.779967142855815*^9, { - 3.780628716721496*^9, 3.7806287367315254`*^9}}, - CellLabel-> - "During evaluation of \ -In[283]:=",ExpressionUUID->"e07cdad2-c7cf-48fb-8e21-2db2e20f0eb7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.482861701459285`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7809462302529216`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9947289186795695`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5431121729750825`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.327082156017564`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.7821350168700333`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.3910355726666306`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.2319437150448067`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.460297883892144`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.7123889803846915`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.520989262138118`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.2568621257735997`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9341765912847616`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.779949014084446*^9, {3.779949348363883*^9, 3.7799493607835603`*^9}, - 3.7799494185117784`*^9, 3.7799507160215044`*^9, 3.7799507633883133`*^9, - 3.7799527002856874`*^9, 3.779952753077057*^9, 3.7799620665346556`*^9, { - 3.7799621046622295`*^9, 3.7799621160583124`*^9}, 3.7799621955176244`*^9, - 3.779963102753209*^9, 3.7799632552856846`*^9, 3.7799636340034556`*^9, - 3.779964249704393*^9, 3.779964773787367*^9, 3.7799649191765385`*^9, - 3.7799653170033484`*^9, 3.7799655721502934`*^9, 3.7799656718306684`*^9, - 3.7799657303354645`*^9, 3.779965948207779*^9, 3.779967142855815*^9, { - 3.780628716721496*^9, 3.7806287367524347`*^9}}, - CellLabel-> - "During evaluation of \ -In[283]:=",ExpressionUUID->"39269eb9-985e-487d-ad0c-57325af8d81d"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CreateOperationFromGateList", "[", "gatelist", "]"}]], "Input", - CellChangeTimes->{{3.779963105114794*^9, 3.7799631121344147`*^9}}, - CellLabel-> - "In[394]:=",ExpressionUUID->"28f66668-0464-4dd1-ab86-b2d0279bce87"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.2291224740558154`", "\[VeryThinSpace]", "+", - RowBox[{"4.7217849159485394`*^-17", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.5027232430716219`"}], "-", - RowBox[{"1.9081958235744878`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.06258618718779003`", "\[VeryThinSpace]", "+", - RowBox[{"4.0652804792675484`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.39536099346655784`"}], "-", - RowBox[{"4.0679265511656126`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.5684816791940697`"}], "-", - RowBox[{"1.6980980170995842`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.15982169407474434`"}], "-", - RowBox[{"4.371503159461554`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.4542600042085433`"}], "-", - RowBox[{"3.4245651747258174`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.2911898199908055`"}], "-", - RowBox[{"1.3877787807814457`*^-17", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.28171554416705014`", "\[VeryThinSpace]", "+", - RowBox[{"3.7320321911294967`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.34777399745775245`", "\[VeryThinSpace]", "-", - RowBox[{"4.753142324176451`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.27299569155016834`"}], "-", - RowBox[{"7.080359531673186`*^-17", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.45707133110172504`", "\[VeryThinSpace]", "-", - RowBox[{"5.412337245047638`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.09916517144370927`"}], "-", - RowBox[{"1.0414681223265158`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.3866015237620212`", "\[VeryThinSpace]", "-", - RowBox[{"4.701100619897147`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.5003381490504506`", "\[VeryThinSpace]", "-", - RowBox[{"6.685839991483778`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.03609497692926622`"}], "-", - RowBox[{"1.1796119636642288`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799631144709826`*^9, {3.779963256753557*^9, 3.7799632858524055`*^9}, - 3.7799636357534733`*^9, {3.779963857261918*^9, 3.7799639700492573`*^9}, - 3.779964136520891*^9, 3.779964331110629*^9, 3.7799647749133563`*^9, - 3.7799649194398437`*^9, 3.7799653202854843`*^9, 3.7799655722988963`*^9, - 3.7799656719762783`*^9, 3.7799657305105314`*^9, 3.7799659483603687`*^9, - 3.779967149046427*^9}, - CellLabel-> - "Out[394]=",ExpressionUUID->"f3ea8c0f-26aa-4d8d-afcc-7b762877c0cb"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"gatelist", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], - ";"}]], "Input", - CellChangeTimes->{{3.7799632601548524`*^9, 3.779963260565128*^9}, { - 3.779963316971818*^9, 3.779963321216395*^9}}, - CellLabel-> - "In[374]:=",ExpressionUUID->"511db751-78ac-4625-833e-291c10d87fcd"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CreateOperationFromGateList", "[", "gatelist", "]"}]], "Input", - CellLabel-> - "In[375]:=",ExpressionUUID->"e4bc50f9-9657-423e-8a37-24c45185aaf9"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3561944901923453`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9384933615387753`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9384933615387753`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8770445268422837`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.877044526842284`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2806430403107378`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8717573321792128`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4446107902117427`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.817251119871444`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.758141995697703`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.9293703950940728`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.7642139470170997`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.7786803214380265`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0274935290719396`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5885840350562465`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.278421476908306`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6981540483365284`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897944`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.452900348566515`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"6", ",", "0", ",", "1"}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7799657329669085`*^9, 3.779965950499192*^9}, - CellLabel-> - "During evaluation of \ -In[375]:=",ExpressionUUID->"6eea75ba-8279-43ac-99c6-48f0322c23ed"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.3561944901923453`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9384933615387753`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.9384933615387753`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.8770445268422837`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897927`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.877044526842284`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2806430403107378`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "2"}], "}"}]}], "}"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948977`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.8717573321792128`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.4446107902117427`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "5.817251119871444`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.758141995697703`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0.9293703950940728`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "2.7642139470170997`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948972`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.5707963267948981`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "4.71238898038469`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "3.7786803214380265`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948966`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0274935290719396`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.1415926535897922`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.5885840350562465`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.278421476908306`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.6981540483365284`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897944`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "5.452900348566515`", ",", "3"}], "}"}]}], - "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"6", ",", "1", ",", "1"}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{3.7799657329669085`*^9, 3.7799659505231323`*^9}, - CellLabel-> - "During evaluation of \ -In[375]:=",ExpressionUUID->"ce00576b-1fe0-4f0f-80fc-f64abe64c920"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.6562202762203302`", "\[VeryThinSpace]", "-", - RowBox[{"0.27181533831467947`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.5112874704407853`"}], "+", - RowBox[{"0.21178220452800625`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.23873281184066109`", "\[VeryThinSpace]", "-", - RowBox[{"0.09888636844786632`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.20097984186433615`", "\[VeryThinSpace]", "-", - RowBox[{"0.08324857626380752`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.03698298777740884`", "\[VeryThinSpace]", "-", - RowBox[{"0.015318855114481354`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.1399747136728484`", "\[VeryThinSpace]", "-", - RowBox[{"0.05797942479258481`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.24472633532116322`", "\[VeryThinSpace]", "-", - RowBox[{"0.10136896715989155`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.20056830613472906`", "\[VeryThinSpace]", "-", - RowBox[{"0.08307811258320374`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.06634543813982646`"}], "+", - RowBox[{"0.16017205655875372`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.17210653836863282`"}], "+", - RowBox[{"0.41550193910263833`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.11183002582183404`"}], "+", - RowBox[{"0.26998156501960496`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.13204528942136984`"}], "+", - RowBox[{"0.31878552856855225`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.08730514767214417`"}], "+", - RowBox[{"0.21077327157507617`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.1924274270584283`"}], "+", - RowBox[{"0.4645609041770167`", " ", "\[ImaginaryI]"}]}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.16656626887332807`"}], "+", - RowBox[{"0.4021265453478722`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.01777812196023698`", "\[VeryThinSpace]", "-", - RowBox[{"0.04292018314992757`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.77996332820885*^9, 3.779964921550252*^9, - 3.7799655744232917`*^9, 3.7799656738030987`*^9, 3.7799657330187683`*^9, - 3.779965950544075*^9}, - CellLabel-> - "Out[375]=",ExpressionUUID->"1ab8669d-6174-4802-9128-40c08402b308"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Test for reduced CSD", "Subsection", - CellChangeTimes->{{3.779983988998705*^9, - 3.7799840018072596`*^9}},ExpressionUUID->"494799d4-b902-4555-887f-\ -1afea5012226"], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel-> - "In[197]:=",ExpressionUUID->"2c4f0565-56ef-4a1e-81a1-42c451bae4f0"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat", "=", - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{"ConstantArray", "[", - RowBox[{ - RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", "4"}], "]"}], ",", - "1"}], "]"}]}]], "Input", - CellChangeTimes->{{3.780028532310069*^9, 3.7800285641055484`*^9}, { - 3.7800286725253067`*^9, 3.7800286769076915`*^9}}, - CellLabel->"In[32]:=",ExpressionUUID->"d327701d-5bc3-4ccd-a9f9-25bfdbb72d40"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.780028549826219*^9, 3.780028555566646*^9}, { - 3.780028652295267*^9, 3.7800286772965317`*^9}, 3.7800321662555923`*^9, - 3.780215249953596*^9}, - CellLabel->"Out[32]=",ExpressionUUID->"4345ca30-daae-497b-b054-8633d41f5e92"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"krausList", " ", "=", " ", - RowBox[{"RPickRandomChannel", "[", - RowBox[{"2", ",", "4", ",", "2"}], "]"}]}]], "Input", - CellLabel->"In[33]:=",ExpressionUUID->"fbf110d7-7155-4ec7-8ae3-ee26ff8c6a65"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.3718391722391748`", ",", - RowBox[{"-", "0.004486459894448208`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.35056463620369893`", ",", - RowBox[{"-", "0.039367001708247806`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.22023345873130373`", ",", "0.4586421295826557`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.34571948219352305`", ",", "0.41770392630736997`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.41629237137844766`", ",", - RowBox[{"-", "0.22771170793588588`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.39069688653963663`", ",", "0.22693412967274135`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.46129153111160537`", ",", - RowBox[{"-", "0.22150359434678418`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.17911464715091444`"}], ",", "0.6791063056130937`"}], - "}"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.7799840217779803`*^9, 3.7799840562570205`*^9, 3.779984247815317*^9, - 3.780026957158634*^9, {3.780027125713772*^9, 3.780027141016162*^9}, - 3.780028446922517*^9, 3.7800321682203693`*^9, 3.780215251078143*^9}, - CellLabel->"Out[33]=",ExpressionUUID->"2e5dcd2d-1933-4740-83d6-d6157b7be2e0"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist1", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "True"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist1", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.7799840373869743`*^9, 3.7799840380051885`*^9}, { - 3.780031469973859*^9, 3.7800314723670273`*^9}, {3.7800315231986923`*^9, - 3.780031525311537*^9}, {3.7800401155750303`*^9, 3.7800401171700344`*^9}, { - 3.7800407283913765`*^9, 3.780040755889414*^9}, {3.780040806808916*^9, - 3.780040807496224*^9}, {3.7802152424809055`*^9, 3.780215260186067*^9}, { - 3.780216243477727*^9, 3.7802162486883173`*^9}, {3.7802162933474693`*^9, - 3.7802162940806255`*^9}, {3.7802168163465877`*^9, 3.780216824606549*^9}, - 3.780216861399542*^9}, - CellLabel->"In[97]:=",ExpressionUUID->"e00ce674-2cce-4bc6-bb55-61a35854b878"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.7802152529843616`*^9, 3.7802152615004497`*^9}, - 3.7802162500191097`*^9, 3.7802162958540707`*^9, 3.78021682599729*^9, - 3.7802168630370293`*^9, 3.7802182454169035`*^9}, - CellLabel-> - "During evaluation of \ -In[97]:=",ExpressionUUID->"49a96afb-4a39-4a37-bff4-5ee560527f12"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "1", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6635626091762288`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7802152529843616`*^9, 3.7802152615004497`*^9}, - 3.7802162500191097`*^9, 3.7802162958540707`*^9, 3.78021682599729*^9, - 3.7802168630370293`*^9, 3.780218245427932*^9}, - CellLabel-> - "During evaluation of \ -In[97]:=",ExpressionUUID->"258fa990-e6d3-43ac-9a51-8bc0d8012348"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.273519163713304`", ",", "1"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2896415137913364`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7802152529843616`*^9, 3.7802152615004497`*^9}, - 3.7802162500191097`*^9, 3.7802162958540707`*^9, 3.78021682599729*^9, - 3.7802168630370293`*^9, 3.780218245453535*^9}, - CellLabel-> - "During evaluation of \ -In[97]:=",ExpressionUUID->"c584fb93-067f-4799-9529-c2df075c47d6"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4", ",", "1", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.7802152529843616`*^9, 3.7802152615004497`*^9}, - 3.7802162500191097`*^9, 3.7802162958540707`*^9, 3.78021682599729*^9, - 3.7802168630370293`*^9, 3.7802182454640074`*^9}, - CellLabel-> - "During evaluation of \ -In[97]:=",ExpressionUUID->"52a538db-796d-41f7-9451-1bf899676898"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.330123466222607`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948988`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.9953958851366074`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589795`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3315815702488079`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.495612473510721`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8115046313544942`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.03518679178600462`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.784893596925679`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.884429027426278`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5770265535763786`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794897`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0438121852532565`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5037254633155133`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.883638340245092`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.7802152529843616`*^9, 3.7802152615004497`*^9}, - 3.7802162500191097`*^9, 3.7802162958540707`*^9, 3.78021682599729*^9, - 3.7802168630370293`*^9, 3.7802182454843597`*^9}, - CellLabel-> - "During evaluation of \ -In[97]:=",ExpressionUUID->"e266b328-ae4c-4429-bd60-c902c4c72300"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"m1", "=", - RowBox[{"CreateOperationFromGateList", "[", - RowBox[{"gatelist1", "[", - RowBox[{"[", - RowBox[{"{", "3", "}"}], "]"}], "]"}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"m1", "//", "MatrixForm"}]}], "Input", - CellChangeTimes->{{3.780216274608001*^9, 3.7802162848784657`*^9}, { - 3.7802167446939044`*^9, 3.7802167464304266`*^9}, 3.780216829178026*^9, { - 3.780217698178444*^9, 3.7802176983133564`*^9}, {3.780219796287322*^9, - 3.780219797686013*^9}}, - CellLabel-> - "In[198]:=",ExpressionUUID->"aa6be9e5-a774-4b99-9510-35a6eefa9fd1"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.780582171492736*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"df9affc2-d048-4682-a650-1128ddc26c1f"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"1", "\[InvisibleSpace]", "1"}], - SequenceForm[1, 1], - Editable->False]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.7805821715062943`*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"2efa1e7c-dd06-4b40-a11f-d72c823536a6"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"3", ",", "2", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.7805821715185013`*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"df4c08af-66b1-42bb-b674-e373f766c9fb"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"1", "0", "0", "0", "0", "0", "0", "0"}, - {"0", "0", "0", "0", "1", "0", "0", "0"}, - {"0", "0", "1", "0", "0", "0", "0", "0"}, - {"0", "0", "0", "0", "0", "0", "1", "0"}, - {"0", "1", "0", "0", "0", "0", "0", "0"}, - {"0", "0", "0", "0", "0", "1", "0", "0"}, - {"0", "0", "0", "1", "0", "0", "0", "0"}, - {"0", "0", "0", "0", "0", "0", "0", "1"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.780582171533057*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"babfc018-83f2-4006-8330-5754fc48918d"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", - "0"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", - "0"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", - "0"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "1"}], "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.7805821715518117`*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"c181ed2c-6d1c-4719-a2ce-7732e22fe119"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.780582171568651*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"4a9967e6-2ff6-4aee-ad46-2ed0558ce558"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780218828347247*^9, 3.7802197981728387`*^9, {3.780220013816787*^9, - 3.780220021508644*^9}, 3.780582051873019*^9, 3.7805821393400526`*^9, - 3.7805821716131687`*^9}, - CellLabel-> - "During evaluation of \ -In[198]:=",ExpressionUUID->"633ed42a-c011-4287-b40c-00e814a2e608"] -}, Open ]], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.780216285751359*^9, 3.780216829930447*^9, {3.780217561761549*^9, - 3.780217575883444*^9}, 3.7802176272508097`*^9, 3.7802176990627255`*^9, - 3.780217899548687*^9, 3.7802180310251865`*^9, {3.78021823263673*^9, - 3.780218247258908*^9}, 3.780218693205491*^9, 3.780218828502804*^9, - 3.7802197982434444`*^9, {3.780220013894473*^9, 3.780220021592784*^9}, - 3.7805820520204463`*^9, 3.780582139495509*^9, 3.7805821716516438`*^9}, - CellLabel-> - "Out[199]//MatrixForm=",ExpressionUUID->"294a8018-2e86-4f5c-b942-\ -55cbfb515489"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellChangeTimes->{{3.780216270809877*^9, 3.780216271965085*^9}}, - CellLabel-> - "In[234]:=",ExpressionUUID->"80784273-a755-400a-8ff7-f824184561ee"], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"gatelist", "=", " ", - RowBox[{"MeasuredQCM", "[", - RowBox[{"krausList", ",", " ", - RowBox[{"DecomposeIso", "\[Rule]", "\"\\""}], ",", - RowBox[{"DoNotReuseAncilla", "\[Rule]", "False"}]}], "]"}]}], - ";"}], "\[IndentingNewLine]", - RowBox[{"For", "[", - RowBox[{ - RowBox[{"i", "=", "1"}], ",", - RowBox[{"i", "\[LessEqual]", - RowBox[{"Length", "[", "gatelist", "]"}]}], ",", - RowBox[{"i", "++"}], ",", - RowBox[{"Print", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.780216857780116*^9, 3.780216873487734*^9}}, - CellLabel-> - "In[141]:=",ExpressionUUID->"81f5c811-7500-47af-88ad-d98c83bd6e66"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.6034483632153964`", "0.6306794165953717`", - RowBox[{"-", "0.45336533823869296`"}], - RowBox[{"-", "0.1804256536618225`"}]}, - {"0.5027145211528758`", - RowBox[{"-", "0.7135716949308277`"}], - RowBox[{"-", "0.42141197567037564`"}], "0.24597864374203546`"}, - { - RowBox[{"-", "0.42141197567037564`"}], "0.24597864374203546`", - RowBox[{"-", "0.5027145211528756`"}], "0.7135716949308276`"}, - { - RowBox[{"-", "0.453365338238693`"}], - RowBox[{"-", "0.1804256536618225`"}], - RowBox[{"-", "0.6034483632153963`"}], - RowBox[{"-", "0.6306794165953717`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.7802203858006153`*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"7557b991-f08a-4d84-a9c7-82d7e8119e6b"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.49456537226086306`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.10517589550862899`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.5229151121993715`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.6862236581450333`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.4998848375047592`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.0759738485823154`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.4817468497321328`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.7157255733433022`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.48174684973213266`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.715725573343302`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.49988483750475915`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.07597384858231546`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.5229151121993714`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.6862236581450332`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.494565372260863`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.10517589550862905`", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.7802203862212934`*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"21ac5af1-fe59-45a4-a1f0-31ad1ef2caaa"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "1"}], "}"}]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.7802203863423204`*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"e50d9e19-f024-4a8e-ba69-722e3ff86f3c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "2", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "\[Pi]", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.6635626091762288`", ",", "3"}], "}"}]}], "}"}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.7802203863488297`*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"caed1c05-8002-4e21-b08d-420543fa6a6b"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "2.273519163713304`", ",", "2"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.2896415137913364`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "2"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.78022038636137*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"1687ecbc-7d05-474c-86c0-5a14fc740241"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"7", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.780220386366686*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"68406383-7c8b-491a-b1d7-b26bc8f3c54a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "1", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.330123466222607`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "1.5707963267948988`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.9953958851366074`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589795`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.3315815702488079`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.495612473510721`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.8115046313544942`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "3.1415926535897927`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "0.03518679178600462`", ",", "3"}], "}"}]}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.784893596925679`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.71238898038469`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.884429027426278`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "0.5770265535763786`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "1.570796326794897`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.0438121852532565`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "3", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "2.5037254633155133`", ",", "2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "4.883638340245092`", ",", "3"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.780216868700225*^9, 3.7802168747011027`*^9}, { - 3.780217614304389*^9, 3.780217632519993*^9}, 3.7802179041477017`*^9, - 3.7802203863922825`*^9}, - CellLabel-> - "During evaluation of \ -In[141]:=",ExpressionUUID->"515fe1ae-534d-4de3-85de-e0298df11230"] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"m1", "=", - RowBox[{"CreateOperationFromGateList", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", - RowBox[{"{", "3", "}"}], "]"}], "]"}], "]"}]}], ";", - RowBox[{"m1", "//", "MatrixForm"}]}]], "Input", - CellChangeTimes->{ - 3.7799840531113834`*^9, {3.7799841201280766`*^9, 3.7799841241583824`*^9}, { - 3.7799842628257885`*^9, 3.779984303237691*^9}, {3.7799844659547477`*^9, - 3.7799844759644012`*^9}, {3.7800271826450596`*^9, 3.780027189712844*^9}, { - 3.7800278718320684`*^9, 3.780027872017375*^9}, {3.7800279898742895`*^9, - 3.780027990001902*^9}, {3.780028099876832*^9, 3.7800281019493356`*^9}, { - 3.7800286435397825`*^9, 3.7800286480076933`*^9}, {3.780032209379817*^9, - 3.780032209457921*^9}, {3.780032403795867*^9, 3.7800324060651455`*^9}, { - 3.7800325298296075`*^9, 3.780032532958789*^9}, {3.780032678201336*^9, - 3.780032685568659*^9}, {3.7800330086997747`*^9, 3.7800330330343723`*^9}, { - 3.7800331378002033`*^9, 3.780033138159319*^9}, {3.780215668330575*^9, - 3.780215671533595*^9}, {3.780215717542944*^9, 3.7802157498533955`*^9}, { - 3.7802159855636463`*^9, 3.7802159865947356`*^9}, {3.780216167897195*^9, - 3.780216168254732*^9}, {3.7802162998457165`*^9, 3.7802163000457535`*^9}, { - 3.780216751137623*^9, 3.7802167526706915`*^9}, 3.7802168787723913`*^9, { - 3.780217687617668*^9, 3.7802176877453995`*^9}, {3.7802188585971727`*^9, - 3.780218858789075*^9}, {3.7802191007011757`*^9, 3.7802191097783575`*^9}, { - 3.780581016576062*^9, 3.780581022326189*^9}}, - CellLabel-> - "In[235]:=",ExpressionUUID->"b76eee9b-a4e8-4581-baed-4dc90dff9b69"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.7805945908005238`*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"78f31fff-c367-40ed-b48a-7b5dc20783b7"], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"1", "\[InvisibleSpace]", "1"}], - SequenceForm[1, 1], - Editable->False]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.780594590810607*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"35e6532a-056e-4a2b-9312-09c639efec59"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"3", ",", "1", ",", "2"}], "}"}]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.7805945908367043`*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"e3cc07f6-b295-4a10-b9a5-9073dc048470"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"1", "0", "0", "0", "0", "0", "0", "0"}, - {"0", "0", "1", "0", "0", "0", "0", "0"}, - {"0", "0", "0", "0", "1", "0", "0", "0"}, - {"0", "0", "0", "0", "0", "0", "1", "0"}, - {"0", "1", "0", "0", "0", "0", "0", "0"}, - {"0", "0", "0", "1", "0", "0", "0", "0"}, - {"0", "0", "0", "0", "0", "1", "0", "0"}, - {"0", "0", "0", "0", "0", "0", "0", "1"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.780594590855545*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"33f24f25-281f-4980-a2fd-4bcd3492bdda"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", - "0"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", - "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "1"}], "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.7805945908644114`*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"5fb2f353-4b70-451c-ac83-fc45fcb70e3b"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.780594590891124*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"2a9cff8f-fdd0-4924-b70b-260e75da55ed"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{ - 3.780581022814523*^9, 3.7805833330640283`*^9, 3.780590071289015*^9, { - 3.780590325409952*^9, 3.7805903544372606`*^9}, {3.780590622248364*^9, - 3.7805906402375913`*^9}, 3.7805909469224176`*^9, 3.780594535293461*^9, - 3.7805945909419065`*^9}, - CellLabel-> - "During evaluation of \ -In[235]:=",ExpressionUUID->"dd19c82d-8c04-43ed-83a7-8809c52d6aa3"] -}, Open ]], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.4205366588381587`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.907275547214427`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800385`"}], "+", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.6010551957342317`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.907275547214427`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.42053665883815855`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.6010551957342317`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.7992075147800384`"}], "-", - RowBox[{"1.6225790833437343`*^-16", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{ - 3.780581022970896*^9, 3.7805833331930127`*^9, 3.780590071460566*^9, { - 3.780590325599936*^9, 3.780590354594788*^9}, {3.7805906224160337`*^9, - 3.780590640421584*^9}, 3.7805909470951486`*^9, 3.7805945354601164`*^9, - 3.7805945909767466`*^9}, - CellLabel-> - "Out[235]//MatrixForm=",ExpressionUUID->"0cc2c1d7-f61c-41d4-a866-\ -a4c8670bff22"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"m2", "=", - RowBox[{"CreateOperationFromGateList", "[", - RowBox[{"gatelist", "[", - RowBox[{"[", - RowBox[{"{", "3", "}"}], "]"}], "]"}], "]"}]}], ";", - RowBox[{ - RowBox[{"Chop", "[", "m2", "]"}], "//", "MatrixForm"}]}]], "Input", - CellChangeTimes->{{3.780027993989058*^9, 3.7800280274009604`*^9}, { - 3.7800281098087378`*^9, 3.7800281272923174`*^9}, {3.780028384744068*^9, - 3.780028387506014*^9}, {3.7800286889217663`*^9, 3.780028689630868*^9}, { - 3.7800330829980907`*^9, 3.7800331420697255`*^9}}, - CellLabel-> - "In[313]:=",ExpressionUUID->"a2de6674-c7b6-47cf-9f00-33b169c0d258"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.6281140431123862`", "0", "0", "0", "0.7781212944297382`", "0", "0", - "0"}, - {"0", "0", - RowBox[{"-", "0.7742598172448482`"}], "0", "0", "0", - "0.6328678656717966`", "0"}, - { - RowBox[{"-", "0.7781212944297383`"}], "0", "0", "0", - "0.6281140431123863`", "0", "0", "0"}, - {"0", "0", - RowBox[{"-", "0.6328678656717966`"}], "0", "0", "0", - RowBox[{"-", "0.7742598172448484`"}], "0"}, - {"0", "0.6281140431123862`", "0", "0", "0", "0.7781212944297382`", "0", - "0"}, - {"0", "0", "0", - RowBox[{"-", "0.7742598172448482`"}], "0", "0", "0", - "0.6328678656717966`"}, - {"0", - RowBox[{"-", "0.7781212944297383`"}], "0", "0", "0", - "0.6281140431123863`", "0", "0"}, - {"0", "0", "0", - RowBox[{"-", "0.6328678656717966`"}], "0", "0", "0", - RowBox[{"-", "0.7742598172448484`"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.7800280204353104`*^9, 3.78002802825191*^9}, { - 3.780028118807557*^9, 3.7800281295945654`*^9}, 3.7800283879267845`*^9, - 3.780028452331477*^9, 3.780028690144493*^9, {3.7800330836813307`*^9, - 3.780033142412809*^9}, 3.7800372606840415`*^9, 3.780037291739152*^9, - 3.7800399208531375`*^9, 3.780040217519353*^9}, - CellLabel-> - "Out[313]//MatrixForm=",ExpressionUUID->"bc140a97-d009-41f5-970f-\ -f488a846a2ec"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"m3", "=", - RowBox[{"CreateOperationFromGateList", "[", "gatelist", "]"}]}], ";", - RowBox[{"m3", "//", "MatrixForm"}]}]], "Input", - CellChangeTimes->{{3.7800287814572725`*^9, 3.7800287959464025`*^9}, { - 3.7800289304642925`*^9, 3.780028932593542*^9}, {3.780028969434062*^9, - 3.780028999690104*^9}, {3.7800290338494678`*^9, 3.780029034019966*^9}, { - 3.7800290967930293`*^9, 3.7800290988701963`*^9}, {3.7800292444063034`*^9, - 3.7800292476339283`*^9}, {3.780030800461341*^9, 3.7800308037198863`*^9}, { - 3.780031347531439*^9, 3.7800313501651955`*^9}, {3.780031922925624*^9, - 3.7800319497462673`*^9}, {3.7800405947255*^9, 3.780040596662772*^9}, { - 3.780040775647911*^9, 3.780040783176231*^9}}, - CellLabel-> - "In[343]:=",ExpressionUUID->"2a7732bc-7052-43ac-a772-4c4bbd734acb"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{ - RowBox[{"-", "0.18165980737924634`"}], "+", - RowBox[{"0.18165980737924609`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.09055805463174325`", "\[VeryThinSpace]", "-", - RowBox[{"0.09055805463174313`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.08768522955839651`", "\[VeryThinSpace]", "-", - RowBox[{"0.08768522955839626`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.043711396171244594`"}], "+", - RowBox[{"0.04371139617124447`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.222472457969827`", "\[VeryThinSpace]", "-", - RowBox[{"0.2224724579698275`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.11090330488367263`"}], "+", - RowBox[{"0.11090330488367287`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{ - RowBox[{"-", "0.2604165733956162`"}], "+", - RowBox[{"0.2604165733956171`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.1298185802395924`", "\[VeryThinSpace]", "-", - RowBox[{"0.12981858023959283`", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, - "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}, - { - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.1685384552794815`", "\[VeryThinSpace]", "+", - RowBox[{"0.16853845527948164`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.08401701433540416`"}], "-", - RowBox[{"0.08401701433540423`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.20155606911411522`", "\[VeryThinSpace]", "+", - RowBox[{"0.20155606911411533`", " ", "\[ImaginaryI]"}]}], - RowBox[{ - RowBox[{"-", "0.10047641127401478`"}], "-", - RowBox[{"0.10047641127401484`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{ - RowBox[{"-", "0.0007137107024722623`"}], "-", - RowBox[{"0.0007137107024712235`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.0003557873022006015`", "\[VeryThinSpace]", "+", - RowBox[{"0.00035578730220008363`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{ - RowBox[{"-", "0.4164713513214251`"}], "-", - RowBox[{"0.4164713513214244`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.2076124373884493`", "\[VeryThinSpace]", "+", - RowBox[{"0.20761243738844895`", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, - "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{3.7800407841700974`*^9, 3.780040817316575*^9, - 3.780040878255934*^9, 3.7800410794938836`*^9}, - CellLabel-> - "Out[343]//MatrixForm=",ExpressionUUID->"947b03a9-2cbd-4c6c-9581-\ -9c3c5081ae6d"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{ - RowBox[{"m3", "/", - RowBox[{"m3", "[", - RowBox[{"[", - RowBox[{"1", ",", "1", ",", "1", ",", "1"}], "]"}], "]"}]}], "*", - RowBox[{"krausList", "[", - RowBox[{"[", - RowBox[{"1", ",", "1", ",", "1"}], "]"}], "]"}]}], "]"}], "//", - "MatrixForm"}]], "Input", - CellChangeTimes->{{3.7799843059534206`*^9, 3.7799843256303487`*^9}, { - 3.7799843626258926`*^9, 3.7799843650972557`*^9}, {3.7800319569541917`*^9, - 3.780031958333029*^9}, {3.780032089903971*^9, 3.780032091520676*^9}, - 3.780039805339497*^9, {3.780039837984561*^9, 3.780039862018013*^9}, { - 3.7800400292056885`*^9, 3.780040052002812*^9}}, - CellLabel-> - "In[332]:=",ExpressionUUID->"4c0ee346-fa4d-4b23-beb9-978fc46ad2e9"], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"(", "\[NoBreak]", GridBox[{ - {"0.292065007204804`", - RowBox[{"-", "0.05753885003164394`"}]}, - {"0.17566547605263608`", "0.6629586673294103`"}, - { - RowBox[{"-", "0.23234051329643943`"}], "0.3219010820656348`"}, - {"0.5149551248417363`", "0.11063034231110504`"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, - "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}, - { - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.04341238706931745`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.5098623403331091`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.1691924635204726`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.3744923821824524`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.10167085055009219`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.2014242210425753`", " ", "\[ImaginaryI]"}]}]}, - { - RowBox[{"0.`", "\[VeryThinSpace]", "+", - RowBox[{"0.7237617636040711`", " ", "\[ImaginaryI]"}]}], - RowBox[{"0.`", "\[VeryThinSpace]", "-", - RowBox[{"0.023234449631913644`", " ", "\[ImaginaryI]"}]}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, - "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.7799843262437515`*^9, 3.779984365604891*^9}, - 3.780031959257921*^9, 3.7800320921609645`*^9, 3.7800398091098843`*^9, { - 3.780039842121502*^9, 3.7800398624640903`*^9}, {3.7800400066182785`*^9, - 3.7800400454947853`*^9}, 3.780040132324524*^9, 3.7800403031596527`*^9, - 3.7800407877440667`*^9}, - CellLabel-> - "Out[332]//MatrixForm=",ExpressionUUID->"c6fba28b-c709-4f1c-aaa5-\ -1dc943a23e54"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["krausList"], "Input", - CellChangeTimes->{{3.7800321199357653`*^9, 3.7800321253071985`*^9}}, - CellLabel-> - "In[333]:=",ExpressionUUID->"be1350e5-dcc6-408b-8e6a-11187f7c51f6"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0.292065007204804`", ",", - RowBox[{"-", "0.057538850031644106`"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"0.17566547605263583`", ",", "0.6629586673294104`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.23234051329643976`"}], ",", "0.3219010820656348`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.514955124841736`", ",", "0.11063034231110488`"}], "}"}]}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.04341238706931795`"}], ",", "0.5098623403331088`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.1691924635204734`"}], ",", "0.37449238218245257`"}], - "}"}], ",", - RowBox[{"{", - RowBox[{"0.10167085055009176`", ",", "0.20142422104257635`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{"0.7237617636040714`", ",", - RowBox[{"-", "0.023234449631912762`"}]}], "}"}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.780032125775837*^9, 3.7800400717094193`*^9, - 3.7800401418971868`*^9, 3.7800407912813053`*^9}, - CellLabel-> - "Out[333]=",ExpressionUUID->"66ac8e87-5383-46af-bb85-c6e13ec80247"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Import", "[", "\"\\"", "]"}]], "Input", - CellLabel-> - "In[287]:=",ExpressionUUID->"61c01b31-25a6-4bfc-8cfd-1085d80101b8"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"gate", "=", - RowBox[{"gatelist", "[", - RowBox[{"[", "3", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.7800364871394105`*^9, 3.780036494888239*^9}, { - 3.7800371920440598`*^9, 3.7800371922001333`*^9}}, - CellLabel-> - "In[236]:=",ExpressionUUID->"5f476adf-8cad-4884-9d75-1d035ba343b7"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"100", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", "}"}], ",", - RowBox[{"{", "3", "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"{", - RowBox[{"2", ",", "1.7833384489897042`", ",", "1"}], "}"}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2", ",", "1.370503278397785`", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"3", ",", "3.141592653589793`", ",", "1"}], "}"}]}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.780036490187996*^9, 3.7800364953759084`*^9}, - 3.7800371926494513`*^9}, - CellLabel-> - "Out[236]=",ExpressionUUID->"1825ed8f-4d11-4ea2-b057-74f82d8dfd32"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat1", "=", - RowBox[{"CreateIsometryFromList", "[", - RowBox[{"gate", "[", - RowBox[{"[", - RowBox[{"3", ",", "1"}], "]"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.780037330306105*^9, 3.7800373446577826`*^9}, { - 3.7800374592922993`*^9, 3.7800374681277475`*^9}}, - CellLabel-> - "In[245]:=",ExpressionUUID->"1e6594cd-029d-4f2b-bd9e-780211d6642d"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.6281140431123862`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.7781212944297382`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7781212944297383`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6281140431123863`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.780037456100336*^9, 3.780037468451911*^9}}, - CellLabel-> - "Out[245]=",ExpressionUUID->"fbd95ee4-206b-4c5d-8670-191f561a8752"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat2", "=", - RowBox[{"CreateIsometryFromList", "[", - RowBox[{"gate", "[", - RowBox[{"[", - RowBox[{"3", ",", "2"}], "]"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.780037473001442*^9, 3.780037482307198*^9}}, - CellLabel-> - "In[246]:=",ExpressionUUID->"bd43e953-13ee-4818-9615-2babaecf102c"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7742598172448482`"}], "+", - RowBox[{"1.5719293941834333`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6328678656717966`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6328678656717966`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7742598172448484`"}], "-", - RowBox[{"1.5719293941834338`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.780037482785017*^9}, - CellLabel-> - "Out[246]=",ExpressionUUID->"5ea83f2d-8bef-4e2b-95f5-312e5b06c8eb"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ucg", "=", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"mat1", ",", "mat2"}], "}"}], ",", - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "1", "}"}], ",", "3"}], "}"}]}]], "Input", - CellChangeTimes->{{3.7800371592992444`*^9, 3.780037214662551*^9}, { - 3.780037264773997*^9, 3.7800373018897285`*^9}, {3.78003765160383*^9, - 3.7800376575423317`*^9}, {3.780038408964347*^9, 3.7800384106525545`*^9}, { - 3.780038450486225*^9, 3.7800384732152157`*^9}, {3.780038837988532*^9, - 3.780038840406494*^9}}, - CellLabel-> - "In[264]:=",ExpressionUUID->"78ac1f81-a28d-4900-ad95-d75ef8fb8241"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"0.6281140431123862`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.7781212944297382`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7781212944297383`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6281140431123863`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.7742598172448482`"}], "+", - RowBox[{"1.5719293941834333`*^-16", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{"0.6328678656717966`", "\[VeryThinSpace]", "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"-", "0.6328678656717966`"}], "+", - RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], ",", - RowBox[{ - RowBox[{"-", "0.7742598172448484`"}], "-", - RowBox[{"1.5719293941834338`*^-16", " ", "\[ImaginaryI]"}]}]}], - "}"}]}], "}"}]}], "}"}], ",", - RowBox[{"{", "3", "}"}], ",", - RowBox[{"{", "1", "}"}], ",", "3"}], "}"}]], "Output", - CellChangeTimes->{ - 3.7800371708149014`*^9, {3.7800372984377546`*^9, 3.7800373022238674`*^9}, { - 3.780037658078367*^9, 3.7800376818547096`*^9}, 3.7800384175244875`*^9, - 3.780038451117476*^9, 3.780038845306079*^9}, - CellLabel-> - "Out[264]=",ExpressionUUID->"8e2cd786-dc4b-4b78-9988-8966db3f3dde"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"Chop", "[", - RowBox[{"ApplyControl", "[", - RowBox[{"ucg", ",", - RowBox[{"{", - RowBox[{ - "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", - "0"}], "}"}]}], "]"}], "]"}], "//", "MatrixForm"}]], "Input", - CellChangeTimes->{{3.780036086305278*^9, 3.7800361023329334`*^9}, { - 3.7800363704246216`*^9, 3.780036393932639*^9}, {3.7800364785283833`*^9, - 3.7800364830073633`*^9}, {3.780037690140507*^9, 3.780037693855871*^9}, { - 3.7800380613947945`*^9, 3.780038080182156*^9}, {3.7800381337581263`*^9, - 3.7800381385750737`*^9}, {3.780038221665535*^9, 3.780038225311637*^9}, { - 3.7800384211301994`*^9, 3.780038438153884*^9}, {3.7800384865772676`*^9, - 3.7800384959231424`*^9}, {3.7800388083980722`*^9, 3.7800388175868044`*^9}, { - 3.7800388699542603`*^9, 3.780038871762992*^9}, {3.7800389901066456`*^9, - 3.780038990356589*^9}, {3.7800391379291973`*^9, 3.780039138179315*^9}, { - 3.7800394741719055`*^9, 3.7800394999470143`*^9}}, - CellLabel-> - "In[285]:=",ExpressionUUID->"86780af1-4286-43ba-93ab-95d3948907de"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0"}], - "}"}]], "Print", - CellChangeTimes->{{3.780038438618338*^9, 3.780038452102746*^9}, - 3.780038555222187*^9, {3.7800388186177735`*^9, 3.780038872231661*^9}, - 3.7800390798647566`*^9, 3.78003913867902*^9, 3.7800393934587116`*^9, - 3.7800394485016856`*^9, {3.780039500630629*^9, 3.780039544694045*^9}, - 3.78003958848783*^9, {3.780039620391064*^9, 3.7800396249797645`*^9}, - 3.7800397525651903`*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"d5a55656-aa79-4a10-b436-9c324b70537a"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0"}], "}"}]}], "}"}]], "Print", - CellChangeTimes->{{3.780038438618338*^9, 3.780038452102746*^9}, - 3.780038555222187*^9, {3.7800388186177735`*^9, 3.780038872231661*^9}, - 3.7800390798647566`*^9, 3.78003913867902*^9, 3.7800393934587116`*^9, - 3.7800394485016856`*^9, {3.780039500630629*^9, 3.780039544694045*^9}, - 3.78003958848783*^9, {3.780039620391064*^9, 3.7800396249797645`*^9}, - 3.780039752580807*^9}, - CellLabel-> - "During evaluation of \ -In[285]:=",ExpressionUUID->"aad8b67a-c634-4c45-8fb3-32ad704169e7"] -}, Open ]], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", - TagBox[GridBox[{ - {"0"}, - { - RowBox[{"-", "0.7742598172448482`"}]}, - {"0"}, - {"0"}, - {"0"}, - { - RowBox[{"-", "0.6328678656717966`"}]}, - {"0"}, - {"0"} - }, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.5599999999999999]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], - Column], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.780038438618338*^9, 3.780038452118369*^9}, - 3.7800385552378497`*^9, {3.780038818633397*^9, 3.780038872247249*^9}, - 3.7800390798804045`*^9, 3.7800391386946793`*^9, 3.7800393934743333`*^9, - 3.7800394485016856`*^9, {3.7800395006462545`*^9, 3.7800395447097173`*^9}, - 3.780039588521281*^9, {3.78003962040672*^9, 3.780039624995347*^9}, - 3.780039752596429*^9}, - CellLabel-> - "Out[285]//MatrixForm=",ExpressionUUID->"fa6b795f-97be-45cb-9d07-\ -44c2503ca5ac"] -}, Open ]] -}, Closed]], - -Cell["Check if {7, j, i} j is classical qubits", "Subsection", - CellChangeTimes->{{3.7727153970839977`*^9, - 3.772715421321403*^9}},ExpressionUUID->"fcc8d847-e109-420b-83c1-\ -2624799fc592"], - -Cell[CellGroupData[{ - -Cell["Add single control", "Subsection", - CellChangeTimes->{{3.7727154325779953`*^9, - 3.7727154480744443`*^9}},ExpressionUUID->"ced8dfb2-05b8-4589-bf0e-\ -be37ccdb1f23"], - -Cell[BoxData[ - RowBox[{"Add", " ", "measurement", " ", "in", " ", "MeasuredQCM"}]], "Input", - CellChangeTimes->{{3.7727154516823435`*^9, - 3.77271546098845*^9}},ExpressionUUID->"dab4193a-c942-4803-80d6-\ -aa8263858f17"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "x"}], "}"}], ",", - RowBox[{"{", - RowBox[{"x", ",", "1", ",", "10"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.779966998976698*^9, - 3.7799670270511904`*^9}},ExpressionUUID->"d675ebfd-6a4a-40ac-b47a-\ -f86e2ee341de"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "3"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "5"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "6"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "7"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "8"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "9"}], "}"}], ",", - RowBox[{"{", - RowBox[{"5", ",", "0", ",", "10"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.779967018214605*^9, 3.779967024398964*^9}}, - CellLabel-> - "Out[385]=",ExpressionUUID->"c06ea6af-55b9-442f-a1e5-b08de6143c5b"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"mat", "=", - RowBox[{"IdentityMatrix", "[", "5", "]"}]}]], "Input", - CellChangeTimes->{{3.7805060399325004`*^9, 3.780506051954313*^9}, { - 3.780506093893642*^9, 3.780506094359685*^9}}, - CellLabel-> - "In[145]:=",ExpressionUUID->"2db94739-56d7-4125-ab63-04cd8690fda5"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "0", ",", "0", ",", "0", ",", "1"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.7805060525748143`*^9, 3.7805060975935397`*^9}, - CellLabel-> - "Out[145]=",ExpressionUUID->"f827bfcd-c867-4f46-a8ae-1746db1726b2"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"ExchangeSystems", "[", - RowBox[{ - RowBox[{"Partition", "[", - RowBox[{"mat", ",", "1"}], "]"}], ","}]}]], "Input", - CellChangeTimes->{{3.7805060651492205`*^9, 3.7805061013902426`*^9}, { - 3.780506225128547*^9, 3.780506229459834*^9}, {3.7805063241467843`*^9, - 3.7805063307245173`*^9}},ExpressionUUID->"b7b58005-df46-447f-9077-\ -2d929ae2a509"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ConstantArray", "[", - RowBox[{"2", ",", "3"}], "]"}]], "Input", - CellChangeTimes->{{3.7805062371138673`*^9, 3.7805062423888702`*^9}}, - CellLabel-> - "In[146]:=",ExpressionUUID->"d5d96b18-d7c8-4a5f-a525-9e72dd64ba75"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"2", ",", "2", ",", "2"}], "}"}]], "Output", - CellChangeTimes->{3.7805062428357224`*^9}, - CellLabel-> - "Out[146]=",ExpressionUUID->"ea664372-c126-4dc6-a8d5-ea16497555cb"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"newOrder", "=", - RowBox[{"{", - RowBox[{"1", ",", "3", ",", "2"}], "}"}]}], ";"}]], "Input", - CellChangeTimes->{{3.7805941723862476`*^9, 3.7805941860545664`*^9}, { - 3.78059422339297*^9, 3.7805942248375745`*^9}}, - CellLabel-> - "In[223]:=",ExpressionUUID->"086c601e-eed4-4192-b66e-77adfdb4e143"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"asso", "=", - RowBox[{"AssociationThread", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}], "\[Rule]", "newOrder"}], - "]"}]}]], "Input", - CellChangeTimes->{{3.780594021765459*^9, 3.780594130260341*^9}, { - 3.780594180546717*^9, 3.7805941833804655`*^9}}, - CellLabel-> - "In[224]:=",ExpressionUUID->"6836381d-353e-40d4-9af5-a70ba9fffcf2"], - -Cell[BoxData[ - RowBox[{"\[LeftAssociation]", - RowBox[{ - RowBox[{"1", "\[Rule]", "1"}], ",", - RowBox[{"2", "\[Rule]", "3"}], ",", - RowBox[{"3", "\[Rule]", "2"}]}], "\[RightAssociation]"}]], "Output", - CellChangeTimes->{{3.7805941245875297`*^9, 3.78059413208863*^9}, - 3.78059418900987*^9, 3.780594226462586*^9}, - CellLabel-> - "Out[224]=",ExpressionUUID->"d356853a-2699-450c-ba3f-76b434075ad1"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}], "/.", "asso"}]], "Input", - CellChangeTimes->{{3.7805941340972123`*^9, 3.7805941412790623`*^9}}, - CellLabel-> - "In[219]:=",ExpressionUUID->"c7f05a68-4679-4fc2-807f-022d7139cc84"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"3", ",", "1", ",", "2"}], "}"}]], "Output", - CellChangeTimes->{3.7805941420263605`*^9, 3.780594191162194*^9}, - CellLabel-> - "Out[219]=",ExpressionUUID->"667c460e-443d-485e-a947-a0096b26b073"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"asso2", "=", - RowBox[{"AssociationThread", "[", - RowBox[{"newOrder", "\[Rule]", - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.7805941535634365`*^9, 3.7805941987681036`*^9}}, - CellLabel-> - "In[225]:=",ExpressionUUID->"ea38970a-e16c-46be-8928-c1746acd9da4"], - -Cell[BoxData[ - RowBox[{"\[LeftAssociation]", - RowBox[{ - RowBox[{"1", "\[Rule]", "1"}], ",", - RowBox[{"3", "\[Rule]", "2"}], ",", - RowBox[{"2", "\[Rule]", "3"}]}], "\[RightAssociation]"}]], "Output", - CellChangeTimes->{3.780594199395917*^9, 3.7805942303854012`*^9}, - CellLabel-> - "Out[225]=",ExpressionUUID->"903557d1-d671-4fbd-a36e-5f3894874649"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}], "/.", "asso"}], "/.", - "asso2"}]], "Input", - CellChangeTimes->{{3.7805942026275845`*^9, 3.7805942190199223`*^9}}, - CellLabel-> - "In[226]:=",ExpressionUUID->"237b6cab-c51a-4124-9658-0a3d57fe07f1"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3"}], "}"}]], "Output", - CellChangeTimes->{{3.780594207984613*^9, 3.7805942317212925`*^9}}, - CellLabel-> - "Out[226]=",ExpressionUUID->"e38fadd9-bea5-4ea6-8248-dc304bbe7a69"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{"n", ",", - RowBox[{"{", - RowBox[{"n", ",", "4"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.780594343425102*^9, 3.7805943666500387`*^9}, { - 3.7805944041931877`*^9, 3.780594404485278*^9}}, - CellLabel-> - "In[231]:=",ExpressionUUID->"42557e2b-dbf6-4d29-917a-157bc2761401"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}]], "Output", - CellChangeTimes->{{3.780594349781357*^9, 3.780594367174803*^9}, - 3.780594404932913*^9}, - CellLabel-> - "Out[231]=",ExpressionUUID->"aaeabef4-e3d9-409b-abde-8240cb9da8b7"], - -Cell[BoxData[ - TemplateBox[{ - "Thread","tdlen", - "\"Objects of unequal length in \\!\\(\\*RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{RowBox[{\\\"{\\\", RowBox[{RowBox[{RowBox[{\\\"0.08425561721469182`\\\ -\", \\\"\[VeryThinSpace]\\\"}], \\\"+\\\", RowBox[{\\\"0.`\\\", \\\" \\\", \\\ -\"\[ImaginaryI]\\\"}]}], \\\",\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.13159123067944142`\\\"}], \\\"-\\\", \ -RowBox[{\\\"2.8998183117583913`*^-16\\\", \\\" \\\", \ -\\\"\[ImaginaryI]\\\"}]}], \\\",\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.08383533735474437`\\\"}], \\\"+\\\", \ -RowBox[{\\\"5.659322834238151`*^-16\\\", \\\" \\\", \ -\\\"\[ImaginaryI]\\\"}]}], \\\",\\\", \ -RowBox[{RowBox[{\\\"0.23065066884256172`\\\", \\\"\[VeryThinSpace]\\\"}], \ -\\\"-\\\", RowBox[{\\\"6.54797683300282`*^-16\\\", \\\" \\\", \\\"\ -\[ImaginaryI]\\\"}]}]}], \\\"}\\\"}], \\\",\\\", \ -RowBox[{\\\"\[LeftSkeleton]\\\", \\\"30\\\", \\\"\[RightSkeleton]\\\"}], \ -\\\",\\\", RowBox[{\\\"{\\\", RowBox[{RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.17820070287688`\\\"}], \\\"+\\\", RowBox[{\\\"0.1782007028768801`\\\", \ -\\\" \\\", \\\"\[ImaginaryI]\\\"}]}], \\\",\\\", \ -RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}], \\\",\ -\\\", RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}], \ -\\\",\\\", RowBox[{RowBox[{\\\"0.1597523935556054`\\\", \ -\\\"\[VeryThinSpace]\\\"}], \\\"-\\\", RowBox[{\\\"0.1597523935556051`\\\", \ -\\\" \\\", \\\"\[ImaginaryI]\\\"}]}]}], \\\"}\\\"}]}], \\\"}\\\"}], \ -RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}], \ -RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}]}]\\) \ -cannot be combined.\"",2,471,359,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.780641425027089*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"e63c3c37-d66a-4932-b2cd-53ca93c2b6df"], - -Cell[BoxData[ - TemplateBox[{ - "Thread","tdlen", - "\"Objects of unequal length in \\!\\(\\*RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.08425561721469182`\\\"}], \\\",\\\", \\\"0.13159123067944195`\\\", \ -\\\",\\\", \\\"0.08383533735474485`\\\", \\\",\\\", RowBox[{\\\"-\\\", \ -\\\"0.23065066884256255`\\\"}]}], \\\"}\\\"}], \\\",\\\", RowBox[{\\\"\ -\[LeftSkeleton]\\\", \\\"6\\\", \\\"\[RightSkeleton]\\\"}], \\\",\\\", \ -RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.004951848764907452`\\\"}], \\\",\\\", \\\"0.1418303904808305`\\\", \ -\\\",\\\", RowBox[{\\\"-\\\", \\\"0.35464846142022843`\\\"}], \\\",\\\", \ -RowBox[{\\\"-\\\", \\\"0.20491149749867563`\\\"}]}], \\\"}\\\"}]}], \ -\\\"}\\\"}], \\\"+\\\", RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{\\\"0.08425561721469182`\\\", \\\",\\\", RowBox[{\\\"-\\\", \ -\\\"0.13159123067944142`\\\"}], \\\",\\\", RowBox[{\\\"-\\\", RowBox[{\\\"\ -\[LeftSkeleton]\\\", \\\"20\\\", \\\"\[RightSkeleton]\\\"}]}], \\\",\\\", \ -\\\"0.23065066884256172`\\\"}], \\\"}\\\"}], \\\",\\\", RowBox[{\\\"\ -\[LeftSkeleton]\\\", \\\"30\\\", \\\"\[RightSkeleton]\\\"}], \\\",\\\", \ -RowBox[{\\\"{\\\", RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\ -\[RightSkeleton]\\\"}], \\\"}\\\"}]}], \\\"}\\\"}]}]\\) cannot be \ -combined.\"",2,471,360,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.78064142509225*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"0c8dbd37-85a1-4a68-8500-ab8ae9b243b3"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partw", - "\"Part \\!\\(\\*RowBox[{\\\"2\\\"}]\\) of \\!\\(\\*RowBox[{\\\"{\\\", \ -RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{RowBox[{RowBox[{\\\"0.032243228791757464`\\\", \\\"\[VeryThinSpace]\\\ -\"}], \\\"+\\\", RowBox[{\\\"0.07784204024375985`\\\", \\\" \\\", \\\"\ -\[ImaginaryI]\\\"}]}], \\\",\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.05035778382555475`\\\"}], \\\"-\\\", \ -RowBox[{\\\"0.121574444682708`\\\", \\\" \\\", \\\"\[ImaginaryI]\\\"}]}], \ -\\\",\\\", RowBox[{RowBox[{\\\"-\\\", \\\"0.03208239465239937`\\\"}], \\\"-\\\ -\", RowBox[{\\\"0.07745375228322746`\\\", \\\" \\\", \ -\\\"\[ImaginaryI]\\\"}]}], \\\",\\\", \ -RowBox[{RowBox[{\\\"0.08826618962997593`\\\", \\\"\[VeryThinSpace]\\\"}], \ -\\\"+\\\", RowBox[{\\\"0.21309343210368248`\\\", \\\" \\\", \\\"\[ImaginaryI]\ -\\\"}]}]}], \\\"}\\\"}], \\\",\\\", RowBox[{\\\"\[LeftSkeleton]\\\", \\\"31\\\ -\", \\\"\[RightSkeleton]\\\"}]}], \\\"}\\\"}], \\\"}\\\"}]\\) does not exist.\ -\"",2,471,361,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.78064142513908*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"1a102929-3adf-41d6-af22-c72bc67a826a"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partw", - "\"Part \\!\\(\\*RowBox[{\\\"2\\\"}]\\) of \\!\\(\\*RowBox[{\\\"{\\\", \ -RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{RowBox[{RowBox[{\\\"0.032243228791757464`\\\", \\\"\[VeryThinSpace]\\\ -\"}], \\\"+\\\", RowBox[{\\\"0.07784204024375985`\\\", \\\" \\\", \\\"\ -\[ImaginaryI]\\\"}]}], \\\",\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.05035778382555475`\\\"}], \\\"-\\\", \ -RowBox[{\\\"0.121574444682708`\\\", \\\" \\\", \\\"\[ImaginaryI]\\\"}]}], \ -\\\",\\\", RowBox[{RowBox[{\\\"-\\\", \\\"0.03208239465239937`\\\"}], \\\"-\\\ -\", RowBox[{\\\"0.07745375228322746`\\\", \\\" \\\", \ -\\\"\[ImaginaryI]\\\"}]}], \\\",\\\", \ -RowBox[{RowBox[{\\\"0.08826618962997593`\\\", \\\"\[VeryThinSpace]\\\"}], \ -\\\"+\\\", RowBox[{\\\"0.21309343210368248`\\\", \\\" \\\", \\\"\[ImaginaryI]\ -\\\"}]}]}], \\\"}\\\"}], \\\",\\\", RowBox[{\\\"\[LeftSkeleton]\\\", \\\"31\\\ -\", \\\"\[RightSkeleton]\\\"}]}], \\\"}\\\"}], \\\"}\\\"}]\\) does not exist.\ -\"",2,471,362,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.7806414251967497`*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"cb4b53c6-a238-4c1b-bd6d-9762d41a7981"], - -Cell[BoxData[ - TemplateBox[{ - "Thread","tdlen", - "\"Objects of unequal length in \\!\\(\\*RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}], \\\"}\ -\\\"}], \\\"+\\\", RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{RowBox[{\\\"-\\\", \\\"0.01898929978625478`\\\"}], \\\",\\\", \ -RowBox[{\\\"-\\\", \\\"0.0678325544950642`\\\"}], \\\",\\\", \ -RowBox[{\\\"-\\\", \\\"0.12062157721492817`\\\"}], \\\",\\\", RowBox[{\\\"-\\\ -\", \\\"0.11251409477760309`\\\"}]}], \\\"}\\\"}], \\\",\\\", RowBox[{\\\"\ -\[LeftSkeleton]\\\", \\\"6\\\", \\\"\[RightSkeleton]\\\"}], \\\",\\\", \ -RowBox[{\\\"{\\\", RowBox[{\\\"0.0287108951554852`\\\", \\\",\\\", RowBox[{\\\ -\"-\\\", \\\"0.34778587392354904`\\\"}], \\\",\\\", RowBox[{\\\"-\\\", \ -\\\"0.02263046386383017`\\\"}], \\\",\\\", RowBox[{\\\"-\\\", \ -\\\"0.058967092543723`\\\"}]}], \\\"}\\\"}]}], \\\"}\\\"}]}]\\) cannot be \ -combined.\"",2,471,363,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.7806414252904873`*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"6076e4b4-7ad0-4127-9b04-c0f8222bf3e2"], - -Cell[BoxData[ - TemplateBox[{ - "General","stop", - "\"Further output of \\!\\(\\*StyleBox[RowBox[{\\\"Thread\\\", \\\"::\\\", \ -\\\"tdlen\\\"}], \\\"MessageName\\\"]\\) will be suppressed during this \ -calculation.\"",2,471,364,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.780641425353004*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"15d919cd-643b-4ae5-836a-fa0cc6c4f1cc"], - -Cell[BoxData[ - TemplateBox[{ - "Part","partw", - "\"Part \\!\\(\\*RowBox[{\\\"2\\\"}]\\) of \\!\\(\\*RowBox[{\\\"{\\\", \ -RowBox[{\\\"{\\\", RowBox[{RowBox[{\\\"{\\\", \ -RowBox[{RowBox[{RowBox[{\\\"0.032243228791757464`\\\", \\\"\[VeryThinSpace]\\\ -\"}], \\\"+\\\", RowBox[{\\\"0.07784204024375985`\\\", \\\" \\\", \\\"\ -\[ImaginaryI]\\\"}]}], \\\",\\\", RowBox[{RowBox[{\\\"-\\\", \ -\\\"0.05035778382555475`\\\"}], \\\"-\\\", \ -RowBox[{\\\"0.121574444682708`\\\", \\\" \\\", \\\"\[ImaginaryI]\\\"}]}], \ -\\\",\\\", RowBox[{RowBox[{\\\"-\\\", \\\"0.03208239465239937`\\\"}], \\\"-\\\ -\", RowBox[{\\\"0.07745375228322746`\\\", \\\" \\\", \ -\\\"\[ImaginaryI]\\\"}]}], \\\",\\\", \ -RowBox[{RowBox[{\\\"0.08826618962997593`\\\", \\\"\[VeryThinSpace]\\\"}], \ -\\\"+\\\", RowBox[{\\\"0.21309343210368248`\\\", \\\" \\\", \\\"\[ImaginaryI]\ -\\\"}]}]}], \\\"}\\\"}], \\\",\\\", RowBox[{\\\"\[LeftSkeleton]\\\", \\\"31\\\ -\", \\\"\[RightSkeleton]\\\"}]}], \\\"}\\\"}], \\\"}\\\"}]\\) does not exist.\ -\"",2,471,365,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.7806414254178762`*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"dc77be68-f69c-4423-a6c8-726812cb856b"], - -Cell[BoxData[ - TemplateBox[{ - "General","stop", - "\"Further output of \\!\\(\\*StyleBox[RowBox[{\\\"Part\\\", \\\"::\\\", \ -\\\"partw\\\"}], \\\"MessageName\\\"]\\) will be suppressed during this \ -calculation.\"",2,471,366,19314469402450435303,"Local"}, - "MessageTemplate"]], "Message", "MSG", - CellChangeTimes->{3.7806414254803324`*^9}, - CellLabel-> - "During evaluation of \ -In[475]:=",ExpressionUUID->"f0f00fa2-35f2-4b52-a9d7-b9970ada430f"], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{{3.780641285099409*^9, 3.7806413134483337`*^9}, - 3.780641425527199*^9}, - CellLabel-> - "Out[471]=",ExpressionUUID->"b07010ca-46b9-4da6-b119-76415a00f89a"] -}, Open ]] -}, Open ]] -}, Open ]] -}, -WindowSize->{748, 908}, -WindowMargins->{{Automatic, -7}, {Automatic, 0}}, -Magnification:>1.05 Inherited, -FrontEndVersion->"11.3 for Microsoft Windows (64-bit) (March 6, 2018)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[580, 22, 532, 9, 53, "Input",ExpressionUUID->"d5e7172c-e871-40fc-b9a8-dab8b5b0a457"], -Cell[1115, 33, 1668, 23, 35, "Output",ExpressionUUID->"e460719f-832d-4fbe-bb70-0df1cb6ffbb0"] -}, Open ]], -Cell[2798, 59, 736, 13, 53, "Input",ExpressionUUID->"718cd24d-ada6-4d18-9b0a-f972b8a8b51f"], -Cell[CellGroupData[{ -Cell[3559, 76, 157, 2, 30, "Input",ExpressionUUID->"3497a986-5550-422a-b972-8c6af90ad4ea"], -Cell[CellGroupData[{ -Cell[3741, 82, 244, 4, 23, "Print",ExpressionUUID->"be341b41-75d1-4374-b0a9-54d3279e335b"], -Cell[3988, 88, 231, 4, 23, "Print",ExpressionUUID->"0892d211-c412-4fad-9d5e-c8a9b1917917"], -Cell[4222, 94, 239, 4, 23, "Print",ExpressionUUID->"786ddeda-1823-46bb-9a5e-feae415bfd58"], -Cell[4464, 100, 269, 5, 23, "Print",ExpressionUUID->"82968c0e-ed6b-4a6e-9bba-66ff0c03fbe5"], -Cell[4736, 107, 261, 5, 23, "Print",ExpressionUUID->"bb6db158-5757-4f32-83d3-3288603b1013"], -Cell[5000, 114, 236, 4, 23, "Print",ExpressionUUID->"ca4f9f33-252a-47be-8ad5-f6db768967dd"], -Cell[5239, 120, 278, 5, 23, "Print",ExpressionUUID->"abeacc84-1eee-41d5-926c-62523250561f"], -Cell[5520, 127, 232, 4, 23, "Print",ExpressionUUID->"eae6cc73-527f-4fbd-9606-b727565edc2c"], -Cell[5755, 133, 242, 4, 23, "Print",ExpressionUUID->"24e43420-0143-458c-ab29-a5308f0555ed"], -Cell[6000, 139, 231, 4, 23, "Print",ExpressionUUID->"f7409e0c-cab7-418a-9958-d026ec0dc9b0"], -Cell[6234, 145, 248, 4, 23, "Print",ExpressionUUID->"bd617e61-7269-45fb-ab58-1c97fe6b14d8"], -Cell[6485, 151, 236, 4, 23, "Print",ExpressionUUID->"6ccf37dc-a45f-4785-bfa3-867e108983cc"], -Cell[6724, 157, 261, 5, 23, "Print",ExpressionUUID->"e1697742-66ed-4218-aa86-01f609070b2c"], -Cell[6988, 164, 243, 4, 23, "Print",ExpressionUUID->"f76513d3-2b6c-413d-b51d-25a4e8859020"], -Cell[7234, 170, 261, 5, 23, "Print",ExpressionUUID->"03597869-0a7f-48de-8970-2addadab0a5d"], -Cell[7498, 177, 239, 4, 23, "Print",ExpressionUUID->"e8dd33f6-2ffe-4844-aa73-96407ca54d9c"], -Cell[7740, 183, 407, 9, 23, "Print",ExpressionUUID->"047ab667-b81b-4a66-a41a-454c28ee4df2"], -Cell[8150, 194, 240, 4, 23, "Print",ExpressionUUID->"4c0fd90f-dc91-4c8c-8faf-06341b97ba96"], -Cell[8393, 200, 245, 4, 23, "Print",ExpressionUUID->"84bc3e8a-4345-45ba-a8a2-f6bb9c4d810d"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[8687, 210, 215, 3, 53, "Input",ExpressionUUID->"b5672cc2-ad7c-491d-bdc4-2ce2c6d19ae7"], -Cell[8905, 215, 246, 4, 23, "Print",ExpressionUUID->"58f9e6ca-5de7-454b-b2ef-8b15d411f1df"] -}, Open ]], -Cell[CellGroupData[{ -Cell[9188, 224, 196, 2, 30, "Input",ExpressionUUID->"dd70be94-d306-4da8-846a-7f1ef69dc5b3"], -Cell[9387, 228, 215, 4, 23, "Print",ExpressionUUID->"37014bf7-614c-4bc8-a23a-74026a376903"] -}, Open ]], -Cell[CellGroupData[{ -Cell[9639, 237, 198, 2, 30, "Input",ExpressionUUID->"e75b7d01-c3d1-4d00-9234-b90c6b4537aa"], -Cell[9840, 241, 156, 2, 35, "Output",ExpressionUUID->"f673e8d1-26c3-42dc-9073-753c2ba9ac7d"] -}, Open ]], -Cell[CellGroupData[{ -Cell[10033, 248, 199, 2, 30, "Input",ExpressionUUID->"563e9ad5-72f9-4e44-9a3b-d370694ae8f3"], -Cell[10235, 252, 219, 4, 23, "Print",ExpressionUUID->"2b8a27b5-3e80-43c1-b5a6-9a1fc0dade91"] -}, Open ]], -Cell[CellGroupData[{ -Cell[10491, 261, 188, 3, 30, "Input",ExpressionUUID->"e24c86f0-1f0a-4dc4-96f1-11f2c39c8540"], -Cell[10682, 266, 459, 9, 23, "Print",ExpressionUUID->"95dd1b3c-dc82-4ac7-9e64-3a5f4fd27790"] -}, Open ]], -Cell[CellGroupData[{ -Cell[11178, 280, 194, 2, 30, "Input",ExpressionUUID->"92e49e7e-3dbf-42c0-897a-517e74b8cae0"], -Cell[11375, 284, 206, 3, 35, "Output",ExpressionUUID->"9c9f4ae6-f163-44bb-9308-09f3b1e36ed9"] -}, Open ]], -Cell[CellGroupData[{ -Cell[11618, 292, 232, 4, 30, "Input",ExpressionUUID->"0ee638ea-56b2-4841-a480-f8e20ae5ef4f"], -Cell[CellGroupData[{ -Cell[11875, 300, 1206, 20, 23, "Print",ExpressionUUID->"056f319c-bd26-474c-9c6d-73e532d804a7"], -Cell[13084, 322, 1190, 20, 23, "Print",ExpressionUUID->"16cfb2b7-1dad-4a71-8bc1-58dd21aff62d"], -Cell[14277, 344, 1210, 20, 23, "Print",ExpressionUUID->"a49fa21b-a7d1-40a6-9f9f-9573a7d51675"], -Cell[15490, 366, 1198, 20, 23, "Print",ExpressionUUID->"7b1286af-7e0b-469f-87b9-54036f261e21"], -Cell[16691, 388, 1194, 20, 23, "Print",ExpressionUUID->"86d303dd-cf8e-4f17-88e7-7e4cc8f980a1"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[17934, 414, 377, 8, 45, "Input",ExpressionUUID->"8959ff37-984c-4d2a-a3e7-c8ff64f921dc"], -Cell[18314, 424, 4549, 118, 249, "Output",ExpressionUUID->"54d0d166-5985-44d2-ad2a-3421b377a18f"] -}, Open ]], -Cell[CellGroupData[{ -Cell[22900, 547, 786, 13, 97, "Input",ExpressionUUID->"8939ccda-2947-4654-bc8a-3646fe6f4f24"], -Cell[23689, 562, 628, 9, 35, "Output",ExpressionUUID->"94ab862a-7072-469c-b405-c54091287abb"], -Cell[24320, 573, 626, 9, 35, "Output",ExpressionUUID->"873c5959-c9e0-4f04-a655-cbe1853be047"], -Cell[24949, 584, 626, 9, 35, "Output",ExpressionUUID->"cb69f5af-2d2c-44df-acc8-b31e6732a1a5"], -Cell[25578, 595, 628, 9, 35, "Output",ExpressionUUID->"f2915da4-7eb6-4cee-b123-b707286a65f8"] -}, Open ]], -Cell[26221, 607, 199, 5, 30, "Input",ExpressionUUID->"ded3362b-96e8-498d-80d1-ff0a5daf8578"], -Cell[CellGroupData[{ -Cell[26445, 616, 765, 12, 30, "Input",ExpressionUUID->"7bbd7741-4663-45b1-a172-326de16535e7"], -Cell[27213, 630, 915, 13, 50, "Output",ExpressionUUID->"0fba72f0-73e3-4e01-9057-ef09a25aee0f"] -}, Open ]], -Cell[CellGroupData[{ -Cell[28165, 648, 973, 15, 30, "Input",ExpressionUUID->"a6e4f4c6-8b7f-4eaa-adb3-307e6ebb1893"], -Cell[CellGroupData[{ -Cell[29163, 667, 10002, 240, 385, "Print",ExpressionUUID->"b8b94016-ecfd-4747-999a-f6aa27da221f"], -Cell[39168, 909, 354, 8, 23, "Print",ExpressionUUID->"2b082659-41d0-4cd2-9983-d98a53ee9cd5"], -Cell[39525, 919, 356, 8, 23, "Print",ExpressionUUID->"ab403513-7bb4-4d9c-9e71-ecaf1bb2e94e"], -Cell[39884, 929, 5933, 140, 338, "Print",ExpressionUUID->"767141ef-dcd5-41e6-99d6-04f14fd08d2f"] -}, Open ]], -Cell[45832, 1072, 1332, 19, 50, "Output",ExpressionUUID->"8f25b8fe-3215-4e10-81a6-f295fd9a4690"] -}, Open ]], -Cell[CellGroupData[{ -Cell[47201, 1096, 400, 10, 30, "Input",ExpressionUUID->"b2d3543a-bfbf-4f6f-beac-b5da2204c0dd"], -Cell[47604, 1108, 196, 4, 35, "Output",ExpressionUUID->"2ecf3555-08d3-4093-a6d9-3e20127d9128"] -}, Open ]], -Cell[47815, 1115, 156, 3, 30, "Input",ExpressionUUID->"a7ef98d3-362f-423a-b859-8957666125f0"], -Cell[CellGroupData[{ -Cell[47996, 1122, 156, 3, 69, "Section",ExpressionUUID->"ef572160-aedc-4b5d-915c-aa090aba68bb"], -Cell[48155, 1127, 5634, 114, 169, "Input",ExpressionUUID->"0574746a-30ed-4d5c-b877-cc44f5503a42"], -Cell[53792, 1243, 12311, 261, 761, "Input",ExpressionUUID->"5f42cdaa-e43b-4846-8f5d-f7ea7532e652"], -Cell[66106, 1506, 1962, 36, 318, "Input",ExpressionUUID->"52f367e3-597d-490a-82a9-335c95c000aa"], -Cell[68071, 1544, 15868, 341, 1060, "Input",ExpressionUUID->"588a5cca-c270-4c4b-b168-5e806f92c1ea"], -Cell[83942, 1887, 26995, 566, 1687, "Input",ExpressionUUID->"e1c79a07-32a8-4d76-a312-1814641fe3e5"] -}, Closed]], -Cell[CellGroupData[{ -Cell[110974, 2458, 152, 3, 54, "Section",ExpressionUUID->"b02dfa1d-28bc-471f-824c-f84d11f65d5a"], -Cell[CellGroupData[{ -Cell[111151, 2465, 229, 4, 56, "Subsection",ExpressionUUID->"2a2efca1-a05b-4ca2-b092-a8965083ee65"], -Cell[111383, 2471, 6252, 147, 1159, "Input",ExpressionUUID->"e304fb25-1d9c-412d-85d4-14613c055d7a"], -Cell[CellGroupData[{ -Cell[117660, 2622, 212, 3, 42, "Input",ExpressionUUID->"c85804b2-328d-416a-808f-455205eda651"], -Cell[117875, 2627, 1611, 21, 49, "Output",ExpressionUUID->"c897db74-e96b-458f-a101-75389481d390"] -}, Open ]], -Cell[119501, 2651, 2647, 60, 633, "Input",ExpressionUUID->"46ae33b0-8443-4ffe-b406-153c7b476d98"], -Cell[CellGroupData[{ -Cell[122173, 2715, 138, 2, 42, "Input",ExpressionUUID->"b6e76dc2-d410-432d-8dc4-87d24e433d44"], -Cell[122314, 2719, 655, 9, 49, "Output",ExpressionUUID->"10d515d2-f494-4138-a9b6-94e3a197be8e"] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[123018, 2734, 182, 3, 39, "Subsection",ExpressionUUID->"f1bf7c60-e764-4d6a-b3ea-35f797a60804"], -Cell[CellGroupData[{ -Cell[123225, 2741, 242, 4, 66, "Subsubsection",ExpressionUUID->"0f40fa43-f7a9-49df-9f62-89ac7789b735"], -Cell[CellGroupData[{ -Cell[123492, 2749, 1166, 25, 74, "Input",ExpressionUUID->"899d248c-0c5a-4368-b9d4-d0a838593cd7"], -Cell[CellGroupData[{ -Cell[124683, 2778, 2383, 44, 104, "Print",ExpressionUUID->"8ab5fe66-1270-4a79-bbfd-c6f42ed009d2"], -Cell[127069, 2824, 2366, 43, 104, "Print",ExpressionUUID->"3667c2b7-8fc8-4441-bdbb-651227ff7aa0"] -}, Open ]] -}, Open ]], -Cell[129462, 2871, 803, 13, 42, "Input",ExpressionUUID->"582b2c41-feb5-46c3-b8a0-0584cd1ab818"], -Cell[CellGroupData[{ -Cell[130290, 2888, 391, 10, 42, "Input",ExpressionUUID->"9fd4fa04-0c82-4a9e-b64b-1f0add6a54c3"], -Cell[CellGroupData[{ -Cell[130706, 2902, 664, 21, 33, "Print",ExpressionUUID->"ec53ae30-040b-43ea-b76b-55ba58741d6c"], -Cell[131373, 2925, 914, 27, 33, "Print",ExpressionUUID->"b6bedd6e-c728-432d-b3bb-1cad7fdcf749"], -Cell[132290, 2954, 306, 8, 33, "Print",ExpressionUUID->"0b926c9d-e4c9-4bcd-9b4c-82ef2b0c8cb5"], -Cell[132599, 2964, 3288, 81, 180, "Print",ExpressionUUID->"5b1629dc-b025-447b-8aa9-515ad3b587c7"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[135948, 3052, 245, 4, 66, "Subsubsection",ExpressionUUID->"166c61ca-2b85-4882-ac90-06cfde79534d"], -Cell[136196, 3058, 466, 8, 42, "Input",ExpressionUUID->"648f7801-ea78-4b91-b185-630a9d4c69cf"], -Cell[CellGroupData[{ -Cell[136687, 3070, 671, 17, 74, "Input",ExpressionUUID->"5b49a435-ac7f-43bf-b8bd-9bdca9e4fdf1"], -Cell[CellGroupData[{ -Cell[137383, 3091, 1918, 49, 123, "Print",ExpressionUUID->"9f948fb0-eb23-478f-8441-ed038b8990c1"], -Cell[139304, 3142, 1390, 40, 65, "Print",ExpressionUUID->"28265972-2370-46f6-bce4-41bdd81af119"], -Cell[140697, 3184, 308, 8, 33, "Print",ExpressionUUID->"f267ac2b-c60b-4337-b792-414ad1ffd94d"], -Cell[141008, 3194, 3426, 83, 210, "Print",ExpressionUUID->"e6545cfc-77da-4b13-a144-8ab3535f0fc8"], -Cell[144437, 3279, 2520, 71, 152, "Print",ExpressionUUID->"4dc2dbb1-03f2-47ad-beee-82f8949a9b35"], -Cell[146960, 3352, 308, 8, 33, "Print",ExpressionUUID->"df92b177-7a34-442a-8a14-0441b82c89bf"], -Cell[147271, 3362, 22024, 502, 1147, "Print",ExpressionUUID->"67f15a3a-1ccc-49ce-a6fa-c869f9059252"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[169356, 3871, 162, 3, 66, "Subsubsection",ExpressionUUID->"70731bb5-c9ae-44dc-8d2b-6ff8e610e7d8"], -Cell[CellGroupData[{ -Cell[169543, 3878, 621, 17, 74, "Input",ExpressionUUID->"2bc8d0ec-6fc1-4d40-918e-083215024db2"], -Cell[CellGroupData[{ -Cell[170189, 3899, 1276, 30, 104, "Print",ExpressionUUID->"7206fda4-6239-4baa-84f1-12c9598ced1a"], -Cell[171468, 3931, 1275, 30, 104, "Print",ExpressionUUID->"3b9c6d44-082b-4540-82e4-c57911b68522"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[172792, 3967, 723, 18, 74, "Input",ExpressionUUID->"84946456-c973-4750-a6ae-458d53599b37"], -Cell[CellGroupData[{ -Cell[173540, 3989, 667, 21, 33, "Print",ExpressionUUID->"a1e2f480-7f70-43f5-bfc2-3d957cb90fb8"], -Cell[174210, 4012, 914, 27, 33, "Print",ExpressionUUID->"b528faca-e6e4-417f-9e1b-e2a4d81d9e66"], -Cell[175127, 4041, 308, 8, 33, "Print",ExpressionUUID->"165ebaea-0dff-4175-a54e-a74cf318c885"], -Cell[175438, 4051, 2824, 71, 152, "Print",ExpressionUUID->"0cd9ca3f-1257-400d-9d93-00c80b15bebf"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[178323, 4129, 163, 3, 66, "Subsubsection",ExpressionUUID->"af89b655-5ef3-413d-9a28-7282927f3fbe"], -Cell[178489, 4134, 491, 9, 42, "Input",ExpressionUUID->"fe6b7694-da49-4107-b3a0-c4ac1c7d5fab"], -Cell[CellGroupData[{ -Cell[179005, 4147, 751, 19, 74, "Input",ExpressionUUID->"963f98d8-31b2-4abf-9150-e2e3391f8298"], -Cell[CellGroupData[{ -Cell[179781, 4170, 2015, 51, 123, "Print",ExpressionUUID->"f3156549-2b78-4d73-8995-7c7f136b0c40"], -Cell[181799, 4223, 1184, 35, 65, "Print",ExpressionUUID->"9a49262f-a426-49f6-85fc-8258c3dd3d0b"], -Cell[182986, 4260, 308, 8, 33, "Print",ExpressionUUID->"ab8208f5-fd13-415f-b0fe-a132c3b5ba90"], -Cell[183297, 4270, 3758, 91, 210, "Print",ExpressionUUID->"0168b029-cafb-4cdd-bd2c-3f6972134f93"], -Cell[187058, 4363, 2305, 64, 123, "Print",ExpressionUUID->"e4510147-50c8-4d60-9b3b-b99db1413af3"], -Cell[189366, 4429, 308, 8, 33, "Print",ExpressionUUID->"cc3a56e4-68ee-4641-980c-2e8c6d922c87"], -Cell[189677, 4439, 21752, 496, 1119, "Print",ExpressionUUID->"cc2d9967-1c81-483d-b6cd-92c1f0a80e38"] -}, Open ]] -}, Open ]] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[211502, 4943, 171, 3, 39, "Subsection",ExpressionUUID->"e8cd5415-df61-49b4-8ef5-792286136d00"], -Cell[CellGroupData[{ -Cell[211698, 4950, 197, 3, 46, "Subsubsection",ExpressionUUID->"2352149d-4b91-46b1-a7b5-275a13b2eb61"], -Cell[CellGroupData[{ -Cell[211920, 4957, 662, 18, 53, "Input",ExpressionUUID->"7acbf3c3-2042-4ce9-9585-adfa6f9427ee"], -Cell[CellGroupData[{ -Cell[212607, 4979, 1473, 32, 88, "Print",ExpressionUUID->"ea55df68-2fae-40f0-8cea-f4e5b19eafdd"], -Cell[214083, 5013, 1498, 33, 88, "Print",ExpressionUUID->"ec0aca3a-0792-4078-8808-1ccd190ca0a8"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[215630, 5052, 1471, 28, 63, "Input",ExpressionUUID->"28554071-027f-41d4-a239-9f9ba926a235"], -Cell[CellGroupData[{ -Cell[217126, 5084, 1676, 42, 98, "Print",ExpressionUUID->"a5f176e5-bacf-4439-bf72-9dbdd3f8cbd9"], -Cell[218805, 5128, 446, 9, 27, "Print",ExpressionUUID->"e712d12f-7e4c-49b0-bc76-f967d81b832c"], -Cell[219254, 5139, 3429, 82, 190, "Print",ExpressionUUID->"b1247fc9-c1c4-4655-b2f1-3673174eac24"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[222744, 5228, 200, 3, 55, "Subsubsection",ExpressionUUID->"08a22a6b-263c-4482-a30e-3c4eb66b5928"], -Cell[CellGroupData[{ -Cell[222969, 5235, 1016, 23, 90, "Input",ExpressionUUID->"0b7db2ef-0273-4bb0-9aeb-a4eb4e944d0b"], -Cell[CellGroupData[{ -Cell[224010, 5262, 5760, 135, 305, "Print",ExpressionUUID->"53448b60-9096-414b-a248-1d284548e379"], -Cell[229773, 5399, 499, 10, 27, "Print",ExpressionUUID->"6b66a7a7-b290-4eef-a1a2-18b149feae1c"], -Cell[230275, 5411, 11110, 255, 560, "Print",ExpressionUUID->"f07fab41-8b05-4d9c-8ab0-e1792bbfd541"], -Cell[241388, 5668, 499, 10, 27, "Print",ExpressionUUID->"937a9ba3-2e68-4c30-9c83-a9034e34b2fe"], -Cell[241890, 5680, 21948, 497, 1113, "Print",ExpressionUUID->"6b60c265-68ca-4197-88e1-b75a0809f26a"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[263899, 6184, 201, 3, 55, "Subsubsection",ExpressionUUID->"4406a8e7-185f-4896-bc5b-36ec682d3262"], -Cell[CellGroupData[{ -Cell[264125, 6191, 987, 23, 116, "Input",ExpressionUUID->"e684450d-dc55-4683-a7b0-08745a67ecf4"], -Cell[CellGroupData[{ -Cell[265137, 6218, 1789, 44, 98, "Print",ExpressionUUID->"ec890902-f0b2-4b05-99fb-b73d01bb5a26"], -Cell[266929, 6264, 466, 9, 27, "Print",ExpressionUUID->"729cff7a-54ee-4779-96e8-43700d188980"], -Cell[267398, 6275, 3160, 76, 167, "Print",ExpressionUUID->"fe311434-705f-465c-b7aa-fa6a966a487e"] -}, Open ]] -}, Open ]], -Cell[270585, 6355, 239, 4, 36, "Input",ExpressionUUID->"2ba35661-f037-420b-a855-29f3f56d8059"], -Cell[CellGroupData[{ -Cell[270849, 6363, 215, 4, 36, "Input",ExpressionUUID->"5eeb9f45-fd92-45b0-9fe0-d3c8482d8987"], -Cell[CellGroupData[{ -Cell[271089, 6371, 206, 4, 27, "Print",ExpressionUUID->"d70b06e8-98db-4b25-997d-d6a4db947efc"], -Cell[271298, 6377, 204, 4, 27, "Print",ExpressionUUID->"c7412e6b-3540-4c44-bb4d-a74f63c8a0f2"] -}, Open ]], -Cell[271517, 6384, 1301, 20, 41, "Output",ExpressionUUID->"fbf0b8a8-f71e-41a0-8a11-3ea08ec1d049"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[272879, 6411, 180, 3, 67, "Subsection",ExpressionUUID->"6decde45-201b-4a90-bb32-84f44776e13c"], -Cell[CellGroupData[{ -Cell[273084, 6418, 1242, 27, 37, "Input",ExpressionUUID->"b1c623d2-e86a-4143-8737-7c6489f48013"], -Cell[CellGroupData[{ -Cell[274351, 6449, 2371, 48, 52, "Print",ExpressionUUID->"52cbbf97-2e9e-439b-b1ad-5e496fe867b7"], -Cell[276725, 6499, 2325, 45, 52, "Print",ExpressionUUID->"170fb8cf-c8bf-4e78-8468-0f234e3489f4"], -Cell[279053, 6546, 2305, 44, 52, "Print",ExpressionUUID->"6ed06276-7164-4b43-abc3-70cb7998da98"], -Cell[281361, 6592, 2365, 46, 52, "Print",ExpressionUUID->"e39be550-c012-463f-a3b7-07fc05d86dbb"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[283775, 6644, 613, 10, 20, "Input",ExpressionUUID->"26d4a316-7dd7-4c0a-9193-a3c6a3afa899"], -Cell[284391, 6656, 8884, 207, 223, "Output",ExpressionUUID->"ef27df12-bb4c-4b0a-b2dc-42357de18dbe"] -}, Open ]], -Cell[CellGroupData[{ -Cell[293312, 6868, 328, 7, 20, "Input",ExpressionUUID->"dab6a392-49ca-4274-b36f-215a5bf2fca1"], -Cell[293643, 6877, 9243, 219, 254, "Output",ExpressionUUID->"c7cadc5b-4982-402b-9645-9ff440df93cc"] -}, Open ]], -Cell[CellGroupData[{ -Cell[302923, 7101, 320, 6, 20, "Input",ExpressionUUID->"c24463c7-81bf-42aa-80d0-3caccdce0b0e"], -Cell[303246, 7109, 5716, 137, 188, "Output",ExpressionUUID->"560c90ff-fd28-4d1d-91b8-d73371524e29"] -}, Open ]], -Cell[308977, 7249, 4198, 97, 416, "Input",ExpressionUUID->"9798d75b-60f1-4f49-b22b-0702af6ff825"], -Cell[CellGroupData[{ -Cell[313200, 7350, 273, 5, 20, "Input",ExpressionUUID->"8e01fe3b-e883-4936-b8a1-545f47c17ab6"], -Cell[313476, 7357, 5356, 123, 138, "Output",ExpressionUUID->"1a3cf4d9-159e-4d17-915d-caff6fc13867"] -}, Open ]] -}, Closed]] -}, Open ]], -Cell[CellGroupData[{ -Cell[318893, 7487, 248, 4, 83, "Section",ExpressionUUID->"2294c72d-1942-4942-a648-fe45d96700ac"], -Cell[CellGroupData[{ -Cell[319166, 7495, 178, 3, 67, "Subsection",ExpressionUUID->"3f7ec25f-e802-4916-88b7-7091d67ad854"], -Cell[319347, 7500, 1785, 47, 223, "Input",ExpressionUUID->"14e4a956-35c2-4cc6-9e81-065a623e097c"], -Cell[321135, 7549, 4848, 120, 732, "Input",ExpressionUUID->"3c9cf093-b383-4ba0-ad98-e25381341bff"] -}, Open ]], -Cell[CellGroupData[{ -Cell[326020, 7674, 165, 3, 73, "Subsection",ExpressionUUID->"7c02d92f-35da-45db-821d-bc3e006296b4"], -Cell[326188, 7679, 8714, 225, 1219, "Input",ExpressionUUID->"9cdc9840-ba30-4788-ae4d-8076ae18dc15"], -Cell[334905, 7906, 7652, 199, 1013, "Input",ExpressionUUID->"c1b1ffdf-1d35-4349-b861-0080cd91574a"], -Cell[342560, 8107, 5149, 132, 866, "Input",ExpressionUUID->"1b6d7101-1f34-4e69-b6f2-7aef9ad55a92"], -Cell[347712, 8241, 8876, 211, 1513, "Input",ExpressionUUID->"7943e7b3-8773-44b6-8afc-bebe0192dff3"], -Cell[356591, 8454, 1278, 32, 276, "Input",ExpressionUUID->"c61b13d7-903c-4973-9e2f-f62201f56bb5"], -Cell[357872, 8488, 7168, 194, 984, "Input",ExpressionUUID->"47c3893f-21cb-4900-abea-b51a73e95e71"] -}, Open ]], -Cell[CellGroupData[{ -Cell[365077, 8687, 168, 3, 73, "Subsection",ExpressionUUID->"ea175baa-8a29-4712-bf2d-a076998308d8"], -Cell[CellGroupData[{ -Cell[365270, 8694, 1757, 34, 127, "Input",ExpressionUUID->"4fb4e189-b39f-4fc1-90a1-6e99d0367177"], -Cell[367030, 8730, 1386, 36, 106, "Output",ExpressionUUID->"f9fc71bf-251e-4642-9f6c-bbf5d827fbd3"], -Cell[CellGroupData[{ -Cell[368441, 8770, 1513, 38, 81, "Print",ExpressionUUID->"9d3acff1-778f-43d9-a3e9-0c9d1667ecb5"], -Cell[369957, 8810, 457, 9, 29, "Print",ExpressionUUID->"cf466d9a-b6d4-4d98-8f1f-6eefc23e2f78"], -Cell[370417, 8821, 3046, 74, 158, "Print",ExpressionUUID->"06efa1d4-455c-4048-80f6-a8608932f2ad"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[373512, 8901, 365, 8, 39, "Input",ExpressionUUID->"66673c0e-36d1-45c8-b051-b10645fcc311"], -Cell[373880, 8911, 1837, 42, 106, "Output",ExpressionUUID->"cd9a8000-1d33-44b1-b243-d8ccdc0afaa0"] -}, Open ]], -Cell[CellGroupData[{ -Cell[375754, 8958, 400, 9, 39, "Input",ExpressionUUID->"3311b375-2ffe-46e0-bc1f-c7d12402551d"], -Cell[376157, 8969, 1290, 31, 76, "Output",ExpressionUUID->"6886fb18-53ca-4e7e-bef9-38f129832f5f"] -}, Open ]], -Cell[CellGroupData[{ -Cell[377484, 9005, 182, 3, 39, "Input",ExpressionUUID->"41b4f0d6-e815-48c6-97cd-ab8d3679237c"], -Cell[377669, 9010, 995, 26, 76, "Output",ExpressionUUID->"40eb5723-499e-4621-b85e-d4ebb0bdd418"] -}, Open ]], -Cell[CellGroupData[{ -Cell[378701, 9041, 237, 4, 39, "Input",ExpressionUUID->"690f50aa-8640-4a72-b1c1-74adff70eff7"], -Cell[378941, 9047, 1474, 37, 154, "Output",ExpressionUUID->"0ec0e81a-7cac-4cd4-92d8-d62cc64f412a"] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[380464, 9090, 356, 5, 50, "Subsection",ExpressionUUID->"8e780591-dbbf-4152-b3da-cfe60b9b4a78"], -Cell[380823, 9097, 233, 3, 39, "Input",ExpressionUUID->"b964208d-7401-4af6-b2fe-baebe13d200e"], -Cell[CellGroupData[{ -Cell[381081, 9104, 756, 20, 39, "Input",ExpressionUUID->"83421f76-0732-4402-a433-e8589d7398f5"], -Cell[381840, 9126, 976, 23, 45, "Output",ExpressionUUID->"a76335c6-c42e-418a-accd-94c4c057390e"] -}, Open ]], -Cell[CellGroupData[{ -Cell[382853, 9154, 264, 4, 39, "Input",ExpressionUUID->"952d2740-2806-4484-bbcb-c758dbaafd87"], -Cell[383120, 9160, 894, 22, 45, "Output",ExpressionUUID->"ebc078a2-4826-4e84-8b81-b9e368990ddc"] -}, Open ]], -Cell[384029, 9185, 2200, 56, 276, "Input",ExpressionUUID->"29ffc519-8f32-41a1-90dd-f6efa8dd0f2a"], -Cell[CellGroupData[{ -Cell[386254, 9245, 345, 5, 39, "Input",ExpressionUUID->"301ab63a-5a8c-4313-9b65-91cd089ec430"], -Cell[386602, 9252, 304, 4, 45, "Output",ExpressionUUID->"990dd184-19e1-4885-bbb6-9daf913bdb1a"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[386955, 9262, 166, 3, 73, "Subsection",ExpressionUUID->"3e03f543-4e5d-446f-b347-9a938ce8e383"], -Cell[CellGroupData[{ -Cell[387146, 9269, 463, 10, 69, "Input",ExpressionUUID->"16e1e846-db90-4fd2-8ca4-d2eaefcdea3c"], -Cell[387612, 9281, 248, 4, 45, "Output",ExpressionUUID->"7ab04497-4563-4253-b26b-a943b6088e01"] -}, Open ]], -Cell[CellGroupData[{ -Cell[387897, 9290, 522, 13, 39, "Input",ExpressionUUID->"f1771896-7637-4c47-b51e-0e5107cb78e0"], -Cell[388422, 9305, 297, 5, 45, "Output",ExpressionUUID->"88f4221d-1729-46ea-ae84-398db8eff5e6"] -}, Open ]], -Cell[CellGroupData[{ -Cell[388756, 9315, 320, 7, 39, "Input",ExpressionUUID->"0ddcaf69-d0d3-450b-b037-1b328fbd9d07"], -Cell[389079, 9324, 204, 3, 45, "Output",ExpressionUUID->"5a5daa5b-ebb1-4489-ac7b-46fc5f4ff6a6"] -}, Open ]], -Cell[CellGroupData[{ -Cell[389320, 9332, 174, 3, 39, "Input",ExpressionUUID->"f679133c-95f4-4f27-b7fd-768d5acfb1dc"], -Cell[389497, 9337, 214, 4, 45, "Output",ExpressionUUID->"226a8318-4a16-41ee-bc47-49a7496e1efe"] -}, Open ]], -Cell[CellGroupData[{ -Cell[389748, 9346, 435, 11, 39, "Input",ExpressionUUID->"9e08bcb3-5275-45c9-b1b9-f3eba7913d41"], -Cell[390186, 9359, 318, 5, 45, "Output",ExpressionUUID->"d422a7bf-003b-4b5a-86e8-0dd3accd28b6"] -}, Open ]], -Cell[CellGroupData[{ -Cell[390541, 9369, 629, 15, 69, "Input",ExpressionUUID->"d5c4b8e2-cf1b-4dec-99bc-4c11acac9535"], -Cell[391173, 9386, 1385, 37, 106, "Output",ExpressionUUID->"380e81f2-789f-495c-9f1c-3fe0fa97d627"] -}, Open ]], -Cell[392573, 9426, 655, 17, 99, "Input",ExpressionUUID->"1f45d4b0-8a3c-42f4-8008-39c98c87e088"], -Cell[CellGroupData[{ -Cell[393253, 9447, 391, 8, 39, "Input",ExpressionUUID->"9721cd96-c8e1-4cab-b53a-c01074b892d0"], -Cell[393647, 9457, 1380, 34, 231, "Output",ExpressionUUID->"6a3a4945-8160-4a8a-b5dc-5ba38b68caa5"] -}, Open ]], -Cell[395042, 9494, 147, 2, 39, "Input",ExpressionUUID->"84604959-d020-4258-a2dc-67a313a6b368"], -Cell[395192, 9498, 755, 17, 99, "Input",ExpressionUUID->"8f0a5ea8-a93e-4503-ab24-aa4bedc0c511"], -Cell[CellGroupData[{ -Cell[395972, 9519, 791, 18, 69, "Input",ExpressionUUID->"9b49293d-8c18-49ff-b7f5-f47b86f581df"], -Cell[396766, 9539, 1162, 38, 424, "Output",ExpressionUUID->"0be92299-a0cf-4782-8bdc-d26778b3da99"] -}, Open ]], -Cell[CellGroupData[{ -Cell[397965, 9582, 914, 20, 99, "Input",ExpressionUUID->"cfd2e5de-bf35-41a1-bb90-db8760709621"], -Cell[398882, 9604, 1498, 33, 135, "Output",ExpressionUUID->"ffd4446f-3acf-451a-8c7f-28b1de6830d3"], -Cell[400383, 9639, 1477, 32, 135, "Output",ExpressionUUID->"ea5532f6-8443-409e-bbb2-0f98ad81b07e"] -}, Open ]], -Cell[401875, 9674, 165, 2, 39, "Input",ExpressionUUID->"8811d4af-9a59-434d-8751-708522e54739"], -Cell[402043, 9678, 454, 7, 99, "Input",ExpressionUUID->"be4e4920-0e27-41ca-86c2-78f770c92454"], -Cell[CellGroupData[{ -Cell[402522, 9689, 196, 3, 39, "Input",ExpressionUUID->"8605db4e-ed7a-4dde-a2b2-376ee45cae43"], -Cell[402721, 9694, 293, 5, 45, "Output",ExpressionUUID->"9d684bf2-ccf2-4636-94c0-b076c8495459"] -}, Open ]], -Cell[CellGroupData[{ -Cell[403051, 9704, 802, 15, 39, "Input",ExpressionUUID->"a129af15-bcff-486f-96b5-cedbc8706265"], -Cell[403856, 9721, 2083, 46, 424, "Output",ExpressionUUID->"3e0341af-5c28-438d-bba6-11a6a8ddb57d"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[405988, 9773, 167, 3, 73, "Subsection",ExpressionUUID->"7048d7e0-b7dc-4b46-9637-431ff5e4c96e"], -Cell[406158, 9778, 754, 16, 99, "Input",ExpressionUUID->"fe281db4-8736-4f9a-a5c6-32cc88149a40"], -Cell[CellGroupData[{ -Cell[406937, 9798, 663, 17, 39, "Input",ExpressionUUID->"e4fbbc82-5d8f-4967-8ecc-ca0e87b274c3"], -Cell[407603, 9817, 597, 12, 45, "Output",ExpressionUUID->"fc7616ad-ffeb-4498-9996-272533ca58d3"] -}, Open ]], -Cell[408215, 9832, 251, 5, 39, "Input",ExpressionUUID->"79efe1bd-6325-4fcc-b76b-878e4ddbfcdd"], -Cell[408469, 9839, 317, 8, 39, "Input",ExpressionUUID->"a3405412-092f-41b5-81cc-b786881d9c7f"], -Cell[CellGroupData[{ -Cell[408811, 9851, 422, 9, 39, "Input",ExpressionUUID->"136d9986-96c7-4cd3-842e-e60b80d9aa22"], -Cell[409236, 9862, 451, 8, 45, "Output",ExpressionUUID->"e335c007-79ca-45b9-8d6f-4e8a73bd112f"] -}, Open ]], -Cell[CellGroupData[{ -Cell[409724, 9875, 501, 10, 39, "Input",ExpressionUUID->"93c0346c-608b-4945-9d71-b57af3226346"], -Cell[410228, 9887, 382, 7, 45, "Output",ExpressionUUID->"3ede2365-7dd5-4b24-aab4-d9d250274651"] -}, Open ]], -Cell[CellGroupData[{ -Cell[410647, 9899, 855, 19, 39, "Input",ExpressionUUID->"15ed2923-b31f-4e2e-9e8d-53d02b37fb47"], -Cell[411505, 9920, 377, 9, 45, "Output",ExpressionUUID->"f251efc4-45ff-4753-9476-3bd3305bc6fd"] -}, Open ]], -Cell[CellGroupData[{ -Cell[411919, 9934, 702, 18, 39, "Input",ExpressionUUID->"8b22c3a7-7ffd-4597-85d2-f9437c456112"], -Cell[412624, 9954, 799, 17, 45, "Output",ExpressionUUID->"4c088c93-1bb1-4674-aea2-8d6af4d0be27"] -}, Open ]], -Cell[CellGroupData[{ -Cell[413460, 9976, 522, 10, 39, "Input",ExpressionUUID->"742caa33-1b11-41da-8322-a731f2102eeb"], -Cell[413985, 9988, 520, 13, 45, "Output",ExpressionUUID->"f3382b0c-0d82-4d22-b6e1-383ac61d41b6"] -}, Open ]], -Cell[CellGroupData[{ -Cell[414542, 10006, 478, 12, 69, "Input",ExpressionUUID->"af34c77a-a7fe-4d1d-a26d-217763bede59"], -Cell[415023, 10020, 665, 15, 45, "Output",ExpressionUUID->"819d67b8-457c-4d12-9218-675c2043d882"] -}, Open ]], -Cell[CellGroupData[{ -Cell[415725, 10040, 478, 13, 39, "Input",ExpressionUUID->"f1b6fa0c-aff6-4d41-be55-99f4486246d9"], -Cell[416206, 10055, 1637, 40, 106, "Output",ExpressionUUID->"04217a7c-d567-496a-ab68-bd029269e3b0"] -}, Open ]], -Cell[CellGroupData[{ -Cell[417880, 10100, 211, 4, 60, "Subsubsection",ExpressionUUID->"1ed3bb61-cfec-438b-bdb5-3942da2fe17c"], -Cell[418094, 10106, 165, 2, 39, "Input",ExpressionUUID->"11d8f157-e308-4e21-af1d-2394aacfb41c"], -Cell[418262, 10110, 289, 6, 39, "Input",ExpressionUUID->"254b74bb-5c1c-4072-832b-6e8f63bcdf72"], -Cell[418554, 10118, 732, 18, 39, "Input",ExpressionUUID->"c98966fe-46bc-4d46-89e9-aa815000cce0"], -Cell[CellGroupData[{ -Cell[419311, 10140, 448, 10, 39, "Input",ExpressionUUID->"0a68b0a9-839e-4c8e-881a-1fc5529b1f6a"], -Cell[419762, 10152, 1342, 39, 76, "Output",ExpressionUUID->"2522fb42-e755-4c61-bb8e-5cf8353e382d"] -}, Open ]], -Cell[CellGroupData[{ -Cell[421141, 10196, 180, 2, 39, "Input",ExpressionUUID->"261e6472-558e-4745-aef4-e58205aeb6c7"], -Cell[421324, 10200, 3271, 78, 253, "Output",ExpressionUUID->"96d5d1b7-0a32-4a91-97e7-e2071252a544"] -}, Open ]], -Cell[CellGroupData[{ -Cell[424632, 10283, 671, 14, 39, "Input",ExpressionUUID->"ed632319-6852-4121-a8f9-172faed4d993"], -Cell[425306, 10299, 3753, 90, 343, "Output",ExpressionUUID->"bb515e1c-8452-4071-b379-ec183d121e94"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[429120, 10396, 262, 4, 73, "Subsection",ExpressionUUID->"f1fffc99-3589-4979-b550-0d9ae2cb59cb"], -Cell[CellGroupData[{ -Cell[429407, 10404, 170, 3, 60, "Subsubsection",ExpressionUUID->"8ad81ba9-5c81-4670-819e-248c832783dc"], -Cell[429580, 10409, 169, 3, 39, "Input",ExpressionUUID->"bde3563c-2203-4b00-82ee-45f37a410f70"], -Cell[CellGroupData[{ -Cell[429774, 10416, 386, 10, 39, "Input",ExpressionUUID->"72827175-87ac-4221-9ff2-cbf3aa1d1593"], -Cell[430163, 10428, 1138, 28, 45, "Output",ExpressionUUID->"c97973f6-5733-4218-9d02-1b27cd9720c8"] -}, Open ]], -Cell[431316, 10459, 249, 6, 39, "Input",ExpressionUUID->"d55f2a5a-3870-4e7b-8304-9861f51ea8ed"], -Cell[CellGroupData[{ -Cell[431590, 10469, 772, 20, 99, "Input",ExpressionUUID->"1b35cba7-89d2-4861-8101-587635c2710f"], -Cell[CellGroupData[{ -Cell[432387, 10493, 1721, 42, 81, "Print",ExpressionUUID->"d10e0f78-8254-4f87-918e-734185138568"], -Cell[434111, 10537, 575, 11, 29, "Print",ExpressionUUID->"41dd9f10-e5ce-4045-b350-b99973382ba8"], -Cell[434689, 10550, 3467, 82, 184, "Print",ExpressionUUID->"ef467880-e6e8-405c-9302-2b8775a21a34"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[438205, 10638, 407, 8, 39, "Input",ExpressionUUID->"1fa836fc-2d4f-41d3-9b4f-09852e6de0bf"], -Cell[438615, 10648, 2147, 47, 135, "Output",ExpressionUUID->"d4dc2d26-3b65-4706-9344-fe1e2710910b"] -}, Open ]], -Cell[440777, 10698, 1029, 20, 69, "Input",ExpressionUUID->"118941da-7c0a-475c-bf88-fff0a5c3946e"], -Cell[CellGroupData[{ -Cell[441831, 10722, 177, 3, 39, "Input",ExpressionUUID->"1ae434e9-bbc4-4a39-bb77-39d33d236134"], -Cell[442011, 10727, 2668, 67, 282, "Output",ExpressionUUID->"96b58794-6d2a-4778-9fce-9a65cc692616"] -}, Open ]], -Cell[444694, 10797, 814, 19, 69, "Input",ExpressionUUID->"5ff2413f-4cc6-469b-92f2-5dcdc5553e16"], -Cell[CellGroupData[{ -Cell[445533, 10820, 547, 12, 69, "Input",ExpressionUUID->"921c32fb-f869-4db3-9584-87eb2cea9c1b"], -Cell[446083, 10834, 1177, 27, 135, "Output",ExpressionUUID->"aa0be6cc-c844-411b-aaf2-cf8580a96dbb"], -Cell[447263, 10863, 1197, 28, 135, "Output",ExpressionUUID->"361f6400-7723-4c38-955f-be1eb4307569"] -}, Open ]], -Cell[CellGroupData[{ -Cell[448497, 10896, 459, 15, 39, "Input",ExpressionUUID->"d1b8d109-b4bd-49bd-b4bb-e73fe2f1b1e1"], -Cell[448959, 10913, 1917, 42, 151, "Output",ExpressionUUID->"9b215597-5341-4d9b-a496-97c062e5da34"] -}, Open ]], -Cell[CellGroupData[{ -Cell[450913, 10960, 753, 19, 39, "Input",ExpressionUUID->"48e74a4c-54bc-4bb1-b542-97bab6b45c90"], -Cell[451669, 10981, 2011, 44, 151, "Output",ExpressionUUID->"3dcca7d2-40e4-4c72-bdca-697089692200"] -}, Open ]], -Cell[CellGroupData[{ -Cell[453717, 11030, 386, 10, 39, "Input",ExpressionUUID->"933db7cd-1e2d-4688-a374-0219146ba961"], -Cell[454106, 11042, 1037, 26, 45, "Output",ExpressionUUID->"a140e678-6801-4d51-b374-a819b62e4ff3"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[455192, 11074, 168, 3, 60, "Subsubsection",ExpressionUUID->"44fc2d08-07b6-40c6-be40-884154f577ee"], -Cell[CellGroupData[{ -Cell[455385, 11081, 735, 20, 69, "Input",ExpressionUUID->"b63d1dbc-dff9-430a-9040-66d1a871def2"], -Cell[CellGroupData[{ -Cell[456145, 11105, 1773, 43, 108, "Print",ExpressionUUID->"d096f3bf-ccf7-4d93-9050-7414481cbcc2"], -Cell[457921, 11150, 545, 10, 29, "Print",ExpressionUUID->"0fc1dfeb-976b-4d74-978c-1f077a7aee38"], -Cell[458469, 11162, 3151, 75, 184, "Print",ExpressionUUID->"ae508980-5e6e-4473-9b0f-28cdf262105f"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[461669, 11243, 407, 8, 39, "Input",ExpressionUUID->"cde5f7c7-9f75-41fe-8dea-87896d5c8878"], -Cell[462079, 11253, 2172, 48, 135, "Output",ExpressionUUID->"d85d318d-6c0a-430b-a189-d42ebe8a5fd9"] -}, Open ]], -Cell[464266, 11304, 1057, 21, 69, "Input",ExpressionUUID->"be4490df-cc91-4ec5-af9d-998492e0cd64"], -Cell[CellGroupData[{ -Cell[465348, 11329, 629, 18, 99, "Input",ExpressionUUID->"04f0a047-f7eb-4989-a041-9394df35c51d"], -Cell[465980, 11349, 311, 7, 45, "Output",ExpressionUUID->"e3b68f1f-d9ae-4b86-a01b-0f76d6c3e6dc"] -}, Open ]], -Cell[CellGroupData[{ -Cell[466328, 11361, 651, 17, 69, "Input",ExpressionUUID->"eb9c9ace-8c1a-4cc9-9353-cd372d2c0b47"], -Cell[466982, 11380, 2681, 59, 282, "Output",ExpressionUUID->"22014542-f2e0-4146-807b-9161c5c5124c"] -}, Open ]], -Cell[469678, 11442, 888, 20, 69, "Input",ExpressionUUID->"44f307c7-c1c7-4210-8780-c04559ca8a42"], -Cell[CellGroupData[{ -Cell[470591, 11466, 549, 12, 69, "Input",ExpressionUUID->"434248f8-7485-4839-b60f-4acc3988cb95"], -Cell[471143, 11480, 1182, 28, 135, "Output",ExpressionUUID->"e90041df-8054-405b-a286-b44e47d102a2"], -Cell[472328, 11510, 1187, 28, 135, "Output",ExpressionUUID->"1edcfa58-6259-42fb-865f-2a60da446e42"] -}, Open ]], -Cell[CellGroupData[{ -Cell[473552, 11543, 679, 18, 39, "Input",ExpressionUUID->"b1ecdc3b-a855-4a22-af61-0efc0530881d"], -Cell[474234, 11563, 2017, 44, 151, "Output",ExpressionUUID->"bcdc5dd3-3eaa-4467-8ad2-3057387e13f4"] -}, Open ]], -Cell[CellGroupData[{ -Cell[476288, 11612, 551, 17, 39, "Input",ExpressionUUID->"dde4cbc7-4252-4b7b-bb44-610ccd566975"], -Cell[476842, 11631, 1919, 44, 151, "Output",ExpressionUUID->"9e9c7040-5040-48ce-973a-a6ec2d14d772"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[478810, 11681, 179, 3, 60, "Subsubsection",ExpressionUUID->"000fbd1a-6926-4c37-854a-b18ba527de6e"], -Cell[478992, 11686, 333, 5, 39, "Input",ExpressionUUID->"c439bc91-632c-44e4-9e5d-398176c7c4fc"], -Cell[CellGroupData[{ -Cell[479350, 11695, 196, 3, 39, "Input",ExpressionUUID->"513e8767-5a90-4af0-b8e3-51cc384dd35c"], -Cell[479549, 11700, 250, 3, 45, "Output",ExpressionUUID->"6e113163-6b0f-4d03-bcab-696cc111a5f7"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[479848, 11709, 208, 4, 60, "Subsubsection",ExpressionUUID->"b6f9be9c-5336-4401-8ff5-190e1eaae591"], -Cell[CellGroupData[{ -Cell[480081, 11717, 916, 22, 127, "Input",ExpressionUUID->"c5298448-0e3e-44e6-a824-430125cc34ba"], -Cell[481000, 11741, 1715, 41, 106, "Output",ExpressionUUID->"fc72293d-dfc8-4fd4-8f56-4c6fcd3a88f1"], -Cell[CellGroupData[{ -Cell[482740, 11786, 2146, 49, 108, "Print",ExpressionUUID->"c296734c-edc8-4247-a795-b748d1bb7c45"], -Cell[484889, 11837, 823, 14, 29, "Print",ExpressionUUID->"95b1ef68-da9d-4881-8432-0226b21ecea7"], -Cell[485715, 11853, 3814, 87, 184, "Print",ExpressionUUID->"7b797108-f7a5-4fed-8da5-d3afb76ea26d"] -}, Open ]] -}, Open ]], -Cell[489556, 11944, 235, 3, 39, "Input",ExpressionUUID->"b3a6ebf6-1be3-4e90-b9bd-c5e9ae223931"], -Cell[CellGroupData[{ -Cell[489816, 11951, 426, 7, 39, "Input",ExpressionUUID->"d69b9f73-153e-46bf-9a14-ac81bb9b6f98"], -Cell[490245, 11960, 255, 5, 29, "Print",ExpressionUUID->"05bdfe48-beb8-48b3-a0c2-43c222987794"], -Cell[490503, 11967, 474, 11, 56, "Message",ExpressionUUID->"4dc189c4-879e-4a69-a67d-20b3b608cdd8"], -Cell[CellGroupData[{ -Cell[491002, 11982, 245, 4, 29, "Print",ExpressionUUID->"d4cc90f5-e054-482d-9ac1-655ac5a5acc0"], -Cell[491250, 11988, 238, 4, 29, "Print",ExpressionUUID->"9713ea9c-d6bf-4ef9-a3ab-e688098a42f3"] -}, Open ]], -Cell[491503, 11995, 420, 10, 29, "Message",ExpressionUUID->"0a9af8b5-f493-4207-bd66-00924fc8dfd7"], -Cell[491926, 12007, 422, 10, 29, "Message",ExpressionUUID->"ebd35c88-959a-48bb-bc05-30ba6b477114"], -Cell[492351, 12019, 472, 11, 56, "Message",ExpressionUUID->"96afa6d7-0a00-4c2b-9e16-f0a5d37c1b3b"], -Cell[CellGroupData[{ -Cell[492848, 12034, 243, 4, 29, "Print",ExpressionUUID->"79140ff0-26a9-4600-9fab-6da07e7d523f"], -Cell[493094, 12040, 236, 4, 29, "Print",ExpressionUUID->"21a09e97-4f73-4068-b431-7a549cb5e9d3"] -}, Open ]], -Cell[493345, 12047, 418, 10, 29, "Message",ExpressionUUID->"d290a533-8c96-40d5-8197-6812408616ef"], -Cell[493766, 12059, 467, 10, 29, "Message",ExpressionUUID->"5648bc88-3e67-41fc-b503-c47718c49112"], -Cell[494236, 12071, 8923, 231, 219, "Output",ExpressionUUID->"e0782311-80f1-4182-9cfa-eea7879a6499"] -}, Open ]], -Cell[CellGroupData[{ -Cell[503196, 12307, 594, 15, 69, "Input",ExpressionUUID->"0cb4a7a7-4a0a-41dd-8d9a-edd793cc58ac"], -Cell[503793, 12324, 446, 10, 29, "Message",ExpressionUUID->"bb884522-40e1-4f8f-b97c-5dee0a192c8e"], -Cell[504242, 12336, 446, 10, 29, "Message",ExpressionUUID->"0f7a9557-260c-41e0-8fd1-0e305a2235df"] -}, Open ]], -Cell[CellGroupData[{ -Cell[504725, 12351, 178, 3, 39, "Input",ExpressionUUID->"b4f679ad-d5f1-491a-8056-68357e5307cf"], -Cell[504906, 12356, 2676, 61, 253, "Output",ExpressionUUID->"24957bff-06a3-4d23-adbd-87fae1094311"] -}, Open ]], -Cell[CellGroupData[{ -Cell[507619, 12422, 630, 16, 39, "Input",ExpressionUUID->"4db5bb3e-4451-4590-95e8-9ccdf392f455"], -Cell[508252, 12440, 646, 13, 29, "Message",ExpressionUUID->"493ec5bb-57bf-4010-b8c0-c2c0e914e5f0"], -Cell[508901, 12455, 970, 22, 97, "Output",ExpressionUUID->"d9619bc1-4bdd-440c-adc5-4e973fc16875"] -}, Open ]], -Cell[CellGroupData[{ -Cell[509908, 12482, 531, 15, 39, "Input",ExpressionUUID->"de7eb3e8-768c-406a-a799-f37bdbf3f68f"], -Cell[510442, 12499, 1056, 26, 135, "Output",ExpressionUUID->"383fa4ad-1719-455c-a4e8-0d35a22bced2"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[511547, 12531, 211, 4, 60, "Subsubsection",ExpressionUUID->"d6804da0-7e2e-4091-99bb-a24d6dd9a5a7"], -Cell[CellGroupData[{ -Cell[511783, 12539, 905, 22, 99, "Input",ExpressionUUID->"9383a849-dabc-4178-bb37-69e6c59c599c"], -Cell[512691, 12563, 1761, 43, 106, "Output",ExpressionUUID->"704d13be-ab51-4abf-8d7e-8d8894771082"], -Cell[CellGroupData[{ -Cell[514477, 12610, 2216, 50, 108, "Print",ExpressionUUID->"ec3c8d8a-ba22-41b2-a9e1-508483ec229b"], -Cell[516696, 12662, 900, 15, 29, "Print",ExpressionUUID->"4487e8a1-5d57-4130-bc90-395fedac0bc4"], -Cell[517599, 12679, 4162, 94, 209, "Print",ExpressionUUID->"c6fed127-fad7-4d1a-a6ab-d01a7ab90a24"] -}, Open ]] -}, Open ]], -Cell[521788, 12777, 236, 4, 39, "Input",ExpressionUUID->"e05bd1ea-d865-4fe9-b0b2-266091b78e84"], -Cell[CellGroupData[{ -Cell[522049, 12785, 430, 8, 39, "Input",ExpressionUUID->"de5908dc-6bff-4024-842b-7c33366813f8"], -Cell[522482, 12795, 2756, 64, 253, "Output",ExpressionUUID->"8c64d48e-942f-4581-9160-0771e870d357"] -}, Open ]], -Cell[CellGroupData[{ -Cell[525275, 12864, 341, 9, 39, "Input",ExpressionUUID->"c91c8c8b-c5da-4ddd-8d68-febea55decb2"], -Cell[525619, 12875, 2861, 72, 253, "Output",ExpressionUUID->"2a709e4d-3482-47eb-9739-37b5685b9cf5"] -}, Open ]], -Cell[CellGroupData[{ -Cell[528517, 12952, 186, 3, 39, "Input",ExpressionUUID->"24d04634-482c-4be7-b08a-be442028082f"], -Cell[528706, 12957, 1147, 34, 106, "Output",ExpressionUUID->"428b5df9-6048-4048-b74e-6f868258e41b"] -}, Open ]], -Cell[CellGroupData[{ -Cell[529890, 12996, 580, 16, 39, "Input",ExpressionUUID->"fd437449-3c9b-40e3-88e9-f9de19507d15"], -Cell[530473, 13014, 1260, 28, 135, "Output",ExpressionUUID->"6333dfae-2aaa-4930-9b4f-40a5ab9167a0"] -}, Open ]], -Cell[CellGroupData[{ -Cell[531770, 13047, 508, 15, 39, "Input",ExpressionUUID->"4a681e4f-28c4-4233-a851-79c898b0c453"], -Cell[532281, 13064, 1010, 26, 135, "Output",ExpressionUUID->"22451453-58cf-429e-a82e-850627599256"] -}, Open ]] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[533352, 13097, 215, 4, 50, "Subsection",ExpressionUUID->"3c1eaef5-6582-4783-9a09-0f5af0d99b65"], -Cell[533570, 13103, 600, 13, 127, "Input",ExpressionUUID->"e98bf08f-d7d9-400c-9f49-e957619bee3e"], -Cell[534173, 13118, 7687, 163, 866, "Input",ExpressionUUID->"239295bd-ec0d-49e0-8306-cf8ddfb32eca"], -Cell[541863, 13283, 2078, 55, 99, "Input",ExpressionUUID->"6abdfe11-9923-4846-8ebd-5f0dfda2adf4"], -Cell[CellGroupData[{ -Cell[543966, 13342, 344, 7, 39, "Input",ExpressionUUID->"e7e5661a-223e-4d23-ad90-e270e9951869"], -Cell[544313, 13351, 1491, 26, 45, "Output",ExpressionUUID->"6aef9264-a39c-4bc6-8012-cce36d83024c"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[545853, 13383, 171, 3, 73, "Subsection",ExpressionUUID->"733d21f7-7961-40ee-a35a-23d0e7a2eff4"], -Cell[CellGroupData[{ -Cell[546049, 13390, 152, 3, 60, "Subsubsection",ExpressionUUID->"aae63212-f658-455d-ae5a-a4ed5aa0fdb3"], -Cell[CellGroupData[{ -Cell[546226, 13397, 225, 4, 39, "Input",ExpressionUUID->"67cd0b26-b5b3-414a-a0f0-f99e01bc374e"], -Cell[546454, 13403, 1167, 34, 106, "Output",ExpressionUUID->"b9bdb75b-e3db-42d7-9c6a-f273a8bb22f9"] -}, Open ]], -Cell[CellGroupData[{ -Cell[547658, 13442, 925, 21, 99, "Input",ExpressionUUID->"2ab6dc0e-b8b1-49b2-b078-7e1a0078da8a"], -Cell[CellGroupData[{ -Cell[548608, 13467, 1534, 41, 108, "Print",ExpressionUUID->"b0a25be2-498d-44ea-befd-6a618be3119a"], -Cell[550145, 13510, 306, 8, 29, "Print",ExpressionUUID->"763da706-7553-486e-8ef2-1058bd7afb3a"], -Cell[550454, 13520, 3195, 79, 184, "Print",ExpressionUUID->"81a17aef-0574-4c8b-b0af-5932d6a7c7fd"] -}, Open ]] -}, Open ]], -Cell[553676, 13603, 286, 4, 39, "Input",ExpressionUUID->"e8d11e34-a8d5-49e5-abb6-99a2868e17c2"], -Cell[CellGroupData[{ -Cell[553987, 13611, 395, 9, 39, "Input",ExpressionUUID->"fa9b3aea-adb3-4309-9c7f-c7907e2a130b"], -Cell[554385, 13622, 4704, 114, 371, "Output",ExpressionUUID->"94a3f698-58e9-49aa-a1ca-e51765afc52f"] -}, Open ]], -Cell[559104, 13739, 356, 8, 39, "Input",ExpressionUUID->"9dcc2b61-bc97-4401-b049-b83b830a0aa0"], -Cell[CellGroupData[{ -Cell[559485, 13751, 227, 3, 39, "Input",ExpressionUUID->"b1d77aa4-75c6-4a14-8f29-790bf74399ed"], -Cell[559715, 13756, 2772, 58, 253, "Output",ExpressionUUID->"90d2067c-c217-4ead-9cf4-a12fa84e35ab"] -}, Open ]], -Cell[CellGroupData[{ -Cell[562524, 13819, 532, 8, 39, "Input",ExpressionUUID->"c7a3e1b4-b28b-4f67-8f43-b076a2339914"], -Cell[CellGroupData[{ -Cell[563081, 13831, 277, 7, 29, "Print",ExpressionUUID->"1803f1a4-e53c-46a4-ad99-ad1b61c2dbb6"], -Cell[563361, 13840, 218, 5, 29, "Print",ExpressionUUID->"ac3f77fb-415f-470e-8bdc-2e151f2c6746"], -Cell[563582, 13847, 215, 5, 29, "Print",ExpressionUUID->"f4ce72ec-aeed-4bed-87f5-dfe98c7d666c"] -}, Open ]], -Cell[563812, 13855, 3262, 73, 253, "Output",ExpressionUUID->"7ae7fab0-35e4-467f-b8f5-e68a72b8d05c"] -}, Open ]], -Cell[567089, 13931, 272, 5, 39, "Input",ExpressionUUID->"deb96a21-d596-4f37-a01a-4689f1a32540"], -Cell[567364, 13938, 288, 7, 39, "Input",ExpressionUUID->"2b6a8c00-e457-47e9-b437-d71152b68b9c"], -Cell[CellGroupData[{ -Cell[567677, 13949, 166, 2, 39, "Input",ExpressionUUID->"5880e3f9-488a-4340-91b4-9fc746eb4cda"], -Cell[CellGroupData[{ -Cell[567868, 13955, 302, 8, 29, "Print",ExpressionUUID->"715573a8-465a-4927-970f-44974a96bc38"], -Cell[568173, 13965, 247, 6, 29, "Print",ExpressionUUID->"221b2fa2-da5c-4388-b00a-0fb74f3b5580"], -Cell[568423, 13973, 242, 6, 29, "Print",ExpressionUUID->"c297f14b-9f77-4732-8cbb-d13005e33605"] -}, Open ]], -Cell[568680, 13982, 2896, 69, 253, "Output",ExpressionUUID->"825d3cac-59e9-4e34-92b1-d3ec48e2652b"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[571625, 14057, 203, 4, 60, "Subsubsection",ExpressionUUID->"e11cd995-b69f-4c83-b732-733cc811fefb"], -Cell[CellGroupData[{ -Cell[571853, 14065, 225, 4, 39, "Input",ExpressionUUID->"adabbfc2-ed32-4bc1-a19a-638c4548d39c"], -Cell[572081, 14071, 1194, 34, 106, "Output",ExpressionUUID->"c1421e83-fef9-4804-9a0d-bf58720cb69e"] -}, Open ]], -Cell[CellGroupData[{ -Cell[573312, 14110, 974, 21, 99, "Input",ExpressionUUID->"924725bf-d7a5-45a0-9b24-7dcffc9d15d4"], -Cell[CellGroupData[{ -Cell[574311, 14135, 1670, 43, 108, "Print",ExpressionUUID->"673dca8c-3c4a-44af-ae15-5c6bd5ca36e5"], -Cell[575984, 14180, 352, 8, 29, "Print",ExpressionUUID->"7e2a470c-f445-4817-91bd-516292d0a5e1"], -Cell[576339, 14190, 3150, 77, 184, "Print",ExpressionUUID->"cd2a308f-4cbf-4b2a-98fb-11e9ae29c351"] -}, Open ]] -}, Open ]], -Cell[579516, 14271, 286, 4, 39, "Input",ExpressionUUID->"7292da75-52cf-4693-b235-3b9eddca451a"], -Cell[CellGroupData[{ -Cell[579827, 14279, 388, 8, 39, "Input",ExpressionUUID->"f7f6672b-fa53-4dc3-95a5-8b7d83bb3aef"], -Cell[580218, 14289, 4875, 118, 371, "Output",ExpressionUUID->"6156c26a-8186-4891-b026-8174927f3b78"] -}, Open ]], -Cell[CellGroupData[{ -Cell[585130, 14412, 532, 8, 39, "Input",ExpressionUUID->"521e67ed-9569-49a8-937d-024f1b4f948f"], -Cell[585665, 14422, 3296, 73, 253, "Output",ExpressionUUID->"f9d5b152-9b8d-45d4-b1e6-63370115f862"] -}, Open ]] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[589022, 14502, 174, 3, 50, "Subsection",ExpressionUUID->"0e73278c-18a9-472f-afee-8ceff0f35ee1"], -Cell[CellGroupData[{ -Cell[589221, 14509, 152, 3, 60, "Subsubsection",ExpressionUUID->"bae7c1e2-b35d-484c-8768-9b1a668b95a8"], -Cell[CellGroupData[{ -Cell[589398, 14516, 229, 5, 39, "Input",ExpressionUUID->"dcb7ff03-0672-4f67-bc48-91855c366749"], -Cell[589630, 14523, 1317, 37, 106, "Output",ExpressionUUID->"8f81176e-a92e-4328-91a9-144e1a04d25c"] -}, Open ]], -Cell[CellGroupData[{ -Cell[590984, 14565, 929, 22, 99, "Input",ExpressionUUID->"dc4bd3d9-8d0c-44fa-bc7a-8fef365b2786"], -Cell[CellGroupData[{ -Cell[591938, 14591, 1829, 45, 108, "Print",ExpressionUUID->"c5caf712-c67a-41fa-9a47-a942305b2ff2"], -Cell[593770, 14638, 509, 10, 29, "Print",ExpressionUUID->"a6ec49c5-c8a9-45be-a2b2-4fa855e2c19c"], -Cell[594282, 14650, 3304, 79, 184, "Print",ExpressionUUID->"85ec70ce-85b1-43c8-83f6-1e7884800825"] -}, Open ]] -}, Open ]], -Cell[597613, 14733, 290, 5, 39, "Input",ExpressionUUID->"aaf2e3d6-dc65-40a8-891e-55092d3d0d5d"], -Cell[CellGroupData[{ -Cell[597928, 14742, 316, 6, 39, "Input",ExpressionUUID->"dcf5948c-3311-4aaa-89ae-02f5c9fe502f"], -Cell[598247, 14750, 3257, 77, 253, "Output",ExpressionUUID->"410023b5-0b8d-4d65-b0f3-0cd441d718a6"] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[601553, 14833, 207, 4, 48, "Subsubsection",ExpressionUUID->"8eefd489-eb43-4027-a2c5-8de419030007"], -Cell[601763, 14839, 169, 3, 39, "Input",ExpressionUUID->"2982b92c-6c19-4512-96f0-2ab291927e00"], -Cell[CellGroupData[{ -Cell[601957, 14846, 229, 5, 39, "Input",ExpressionUUID->"bd872fd6-8394-417e-9768-f0701ae2f7da"], -Cell[602189, 14853, 1484, 38, 106, "Output",ExpressionUUID->"0b87787d-79c7-4340-a0af-f3269f9889d8"] -}, Open ]], -Cell[CellGroupData[{ -Cell[603710, 14896, 369, 8, 69, "Input",ExpressionUUID->"5ebb4ecb-8658-44a2-825b-01da036cc795"], -Cell[604082, 14906, 3446, 85, 253, "Output",ExpressionUUID->"dfc50077-c3f4-465f-947a-fcca0b5be2e2"] -}, Open ]], -Cell[CellGroupData[{ -Cell[607565, 14996, 390, 10, 39, "Input",ExpressionUUID->"a584e136-7a7f-43c4-9f92-c531febfabbb"], -Cell[607958, 15008, 3446, 85, 253, "Output",ExpressionUUID->"65736a49-7d3c-4096-9600-efc0d10fb4a6"] -}, Open ]], -Cell[611419, 15096, 292, 8, 39, "Input",ExpressionUUID->"882b33db-8ce0-4dc7-b2bf-2c9901b3cf76"], -Cell[CellGroupData[{ -Cell[611736, 15108, 211, 4, 39, "Input",ExpressionUUID->"a48e9488-e6f4-493a-b87d-db20fe2f92d9"], -Cell[CellGroupData[{ -Cell[611972, 15116, 245, 6, 29, "Print",ExpressionUUID->"037bf29d-3728-4fa6-94ff-e61fb98a5142"], -Cell[612220, 15124, 245, 6, 29, "Print",ExpressionUUID->"391c1510-71ea-44cf-8fda-45e6be29eed7"], -Cell[612468, 15132, 307, 8, 29, "Print",ExpressionUUID->"30a0a46b-3194-4185-bf1b-3edd84fef368"] -}, Open ]], -Cell[612790, 15143, 3266, 74, 253, "Output",ExpressionUUID->"0e2f540e-d5af-48e9-b915-bdf086436acf"] -}, Open ]], -Cell[CellGroupData[{ -Cell[616093, 15222, 975, 22, 99, "Input",ExpressionUUID->"8fe3ed0b-975b-47f9-9000-53b9db2a8edc"], -Cell[CellGroupData[{ -Cell[617093, 15248, 1896, 46, 108, "Print",ExpressionUUID->"fbda3e78-95d0-48ab-a8e0-541f16d5a41a"], -Cell[618992, 15296, 573, 11, 29, "Print",ExpressionUUID->"3ce40b56-31b4-474e-8c40-d3a0078db874"], -Cell[619568, 15309, 3471, 82, 184, "Print",ExpressionUUID->"445bdfed-7dc0-417a-9456-cbce440c4a63"] -}, Open ]] -}, Open ]], -Cell[623066, 15395, 290, 5, 39, "Input",ExpressionUUID->"84c8d2e8-ee2d-4fc0-abae-e3916df5d463"], -Cell[CellGroupData[{ -Cell[623381, 15404, 247, 5, 39, "Input",ExpressionUUID->"4b64b5d2-23c6-4445-8ba2-1c2d3d55e23a"], -Cell[CellGroupData[{ -Cell[623653, 15413, 194, 5, 29, "Print",ExpressionUUID->"2c193973-7518-4124-a88e-9125db2cee9b"], -Cell[623850, 15420, 194, 5, 29, "Print",ExpressionUUID->"20d0f976-ec46-468f-a769-41483b398e41"], -Cell[624047, 15427, 256, 7, 29, "Print",ExpressionUUID->"b39d259a-38d3-425a-af0c-af7c9caff186"] -}, Open ]], -Cell[624318, 15437, 3464, 79, 253, "Output",ExpressionUUID->"f188cf01-32d2-46bd-99a9-41f23c51d7c3"] -}, Open ]] -}, Closed]] -}, Open ]], -Cell[CellGroupData[{ -Cell[627843, 15523, 175, 3, 73, "Subsection",ExpressionUUID->"c6088d53-3464-4d11-ba5d-d4970b664a4d"], -Cell[628021, 15528, 216, 4, 39, "Input",ExpressionUUID->"14565f40-1f4f-4275-ae55-99e9d0ac4726"], -Cell[CellGroupData[{ -Cell[628262, 15536, 535, 12, 69, "Input",ExpressionUUID->"546f017e-dcb5-4eb4-b60a-bb86fc6f94e7"], -Cell[628800, 15550, 1817, 45, 106, "Output",ExpressionUUID->"b078cbdf-64ce-4731-80ca-0ff492e6e4b6"] -}, Open ]], -Cell[630632, 15598, 346, 7, 39, "Input",ExpressionUUID->"e487663f-2913-4e70-b3ca-8d844ea12683"], -Cell[CellGroupData[{ -Cell[631003, 15609, 214, 4, 39, "Input",ExpressionUUID->"f54341a8-82dd-4398-9697-b6a7878122f0"], -Cell[631220, 15615, 3723, 90, 282, "Output",ExpressionUUID->"58f81f25-e3a9-46cc-abdc-037238957b0a"] -}, Open ]], -Cell[634958, 15708, 517, 13, 39, "Input",ExpressionUUID->"b52df673-120e-4131-a7b7-af0e42b60db0"], -Cell[CellGroupData[{ -Cell[635500, 15725, 500, 11, 39, "Input",ExpressionUUID->"1ca9df86-52d2-463d-b16b-6f759118a237"], -Cell[636003, 15738, 2980, 79, 253, "Output",ExpressionUUID->"8590a636-2462-4255-adc0-f64b24232e5d"] -}, Open ]], -Cell[CellGroupData[{ -Cell[639020, 15822, 1004, 23, 99, "Input",ExpressionUUID->"c597199c-48f1-4ac6-a27a-48fa35f1481c"], -Cell[CellGroupData[{ -Cell[640049, 15849, 853, 15, 29, "Print",ExpressionUUID->"b992500b-fdb5-4cdd-8b6b-7cd20274ddac"], -Cell[640905, 15866, 1911, 44, 81, "Print",ExpressionUUID->"e40a3235-6f0e-4320-8ad5-94208e48c0f4"], -Cell[642819, 15912, 855, 15, 29, "Print",ExpressionUUID->"e07cdad2-c7cf-48fb-8e21-2db2e20f0eb7"], -Cell[643677, 15929, 3271, 76, 158, "Print",ExpressionUUID->"39269eb9-985e-487d-ad0c-57325af8d81d"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[646997, 16011, 238, 4, 39, "Input",ExpressionUUID->"28f66668-0464-4dd1-ab86-b2d0279bce87"], -Cell[647238, 16017, 3427, 82, 306, "Output",ExpressionUUID->"f3ea8c0f-26aa-4d8d-afcc-7b762877c0cb"] -}, Open ]], -Cell[650680, 16102, 482, 11, 69, "Input",ExpressionUUID->"511db751-78ac-4625-833e-291c10d87fcd"], -Cell[CellGroupData[{ -Cell[651187, 16117, 170, 3, 39, "Input",ExpressionUUID->"e4bc50f9-9657-423e-8a37-24c45185aaf9"], -Cell[CellGroupData[{ -Cell[651382, 16124, 5119, 124, 285, "Print",ExpressionUUID->"6eea75ba-8279-43ac-99c6-48f0322c23ed"], -Cell[656504, 16250, 5121, 124, 285, "Print",ExpressionUUID->"ce00576b-1fe0-4f0f-80fc-f64abe64c920"] -}, Open ]], -Cell[661640, 16377, 3102, 77, 253, "Output",ExpressionUUID->"1ab8669d-6174-4802-9128-40c08402b308"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[664791, 16460, 170, 3, 73, "Subsection",ExpressionUUID->"494799d4-b902-4555-887f-1afea5012226"], -Cell[664964, 16465, 169, 3, 39, "Input",ExpressionUUID->"2c4f0565-56ef-4a1e-81a1-42c451bae4f0"], -Cell[CellGroupData[{ -Cell[665158, 16472, 427, 10, 39, "Input",ExpressionUUID->"d327701d-5bc3-4ccd-a9f9-25bfdbb72d40"], -Cell[665588, 16484, 772, 22, 45, "Output",ExpressionUUID->"4345ca30-daae-497b-b054-8633d41f5e92"] -}, Open ]], -Cell[CellGroupData[{ -Cell[666397, 16511, 225, 4, 39, "Input",ExpressionUUID->"fbf110d7-7155-4ec7-8ae3-ee26ff8c6a65"], -Cell[666625, 16517, 1393, 36, 106, "Output",ExpressionUUID->"2e5dcd2d-1933-4740-83d6-d6157b7be2e0"] -}, Open ]], -Cell[CellGroupData[{ -Cell[668055, 16558, 1227, 25, 99, "Input",ExpressionUUID->"e00ce674-2cce-4bc6-bb55-61a35854b878"], -Cell[CellGroupData[{ -Cell[669307, 16587, 382, 8, 29, "Print",ExpressionUUID->"49a96afb-4a39-4a37-bff4-5ee560527f12"], -Cell[669692, 16597, 741, 21, 29, "Print",ExpressionUUID->"258fa990-e6d3-43ac-9a51-8bc0d8012348"], -Cell[670436, 16620, 987, 27, 56, "Print",ExpressionUUID->"c584fb93-067f-4799-9529-c2df075c47d6"], -Cell[671426, 16649, 382, 8, 29, "Print",ExpressionUUID->"52a538db-796d-41f7-9451-1bf899676898"], -Cell[671811, 16659, 2894, 71, 158, "Print",ExpressionUUID->"e266b328-ae4c-4429-bd60-c902c4c72300"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[674754, 16736, 609, 14, 69, "Input",ExpressionUUID->"aa6be9e5-a774-4b99-9510-35a6eefa9fd1"], -Cell[CellGroupData[{ -Cell[675388, 16754, 1615, 42, 97, "Print",ExpressionUUID->"df9affc2-d048-4682-a650-1128ddc26c1f"], -Cell[677006, 16798, 427, 11, 29, "Print",ExpressionUUID->"2efa1e7c-dd06-4b40-a11f-d72c823536a6"], -Cell[677436, 16811, 381, 9, 29, "Print",ExpressionUUID->"df4c08af-66b1-42bb-b674-e373f766c9fb"], -Cell[677820, 16822, 1223, 30, 187, "Print",ExpressionUUID->"babfc018-83f2-4006-8330-5754fc48918d"], -Cell[679046, 16854, 1611, 49, 108, "Print",ExpressionUUID->"c181ed2c-6d1c-4719-a2ce-7732e22fe119"], -Cell[680660, 16905, 2881, 75, 185, "Print",ExpressionUUID->"4a9967e6-2ff6-4aee-ad46-2ed0558ce558"], -Cell[683544, 16982, 7820, 170, 348, "Print",ExpressionUUID->"633ed42a-c011-4287-b40c-00e814a2e608"] -}, Open ]], -Cell[691379, 17155, 7666, 169, 253, "Output",ExpressionUUID->"294a8018-2e86-4f5c-b942-55cbfb515489"] -}, Open ]], -Cell[699060, 17327, 235, 4, 39, "Input",ExpressionUUID->"80784273-a755-400a-8ff7-f824184561ee"], -Cell[CellGroupData[{ -Cell[699320, 17335, 742, 19, 99, "Input",ExpressionUUID->"81f5c811-7500-47af-88ad-d98c83bd6e66"], -Cell[CellGroupData[{ -Cell[700087, 17358, 1446, 35, 97, "Print",ExpressionUUID->"7557b991-f08a-4d84-a9c7-82d7e8119e6b"], -Cell[701536, 17395, 2650, 57, 97, "Print",ExpressionUUID->"21ac5af1-fe59-45a4-a1f0-31ad1ef2caaa"], -Cell[704189, 17454, 358, 8, 29, "Print",ExpressionUUID->"e50d9e19-f024-4a8e-ba69-722e3ff86f3c"], -Cell[704550, 17464, 719, 21, 29, "Print",ExpressionUUID->"caed1c05-8002-4e21-b08d-420543fa6a6b"], -Cell[705272, 17487, 962, 27, 56, "Print",ExpressionUUID->"1687ecbc-7d05-474c-86c0-5a14fc740241"], -Cell[706237, 17516, 356, 8, 29, "Print",ExpressionUUID->"68406383-7c8b-491a-b1d7-b26bc8f3c54a"], -Cell[706596, 17526, 2870, 71, 158, "Print",ExpressionUUID->"515fe1ae-534d-4de3-85de-e0298df11230"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[709515, 17603, 1626, 27, 39, "Input",ExpressionUUID->"b76eee9b-a4e8-4581-baed-4dc90dff9b69"], -Cell[CellGroupData[{ -Cell[711166, 17634, 1693, 43, 97, "Print",ExpressionUUID->"78f31fff-c367-40ed-b48a-7b5dc20783b7"], -Cell[712862, 17679, 501, 12, 29, "Print",ExpressionUUID->"35e6532a-056e-4a2b-9312-09c639efec59"], -Cell[713366, 17693, 457, 10, 29, "Print",ExpressionUUID->"e3cc07f6-b295-4a10-b9a5-9073dc048470"], -Cell[713826, 17705, 1299, 31, 187, "Print",ExpressionUUID->"33f24f25-281f-4980-a2fd-4bcd3492bdda"], -Cell[715128, 17738, 1687, 50, 108, "Print",ExpressionUUID->"5fb2f353-4b70-451c-ac83-fc45fcb70e3b"], -Cell[716818, 17790, 2957, 76, 185, "Print",ExpressionUUID->"2a9cff8f-fdd0-4924-b70b-260e75da55ed"], -Cell[719778, 17868, 7896, 171, 348, "Print",ExpressionUUID->"dd19c82d-8c04-43ed-83a7-8809c52d6aa3"] -}, Open ]], -Cell[727689, 18042, 7479, 167, 253, "Output",ExpressionUUID->"0cc2c1d7-f61c-41d4-a866-a4c8670bff22"] -}, Open ]], -Cell[CellGroupData[{ -Cell[735205, 18214, 638, 14, 69, "Input",ExpressionUUID->"a2de6674-c7b6-47cf-9f00-33b169c0d258"], -Cell[735846, 18230, 1869, 45, 231, "Output",ExpressionUUID->"bc140a97-d009-41f5-970f-f488a846a2ec"] -}, Open ]], -Cell[CellGroupData[{ -Cell[737752, 18280, 819, 14, 39, "Input",ExpressionUUID->"2a7732bc-7052-43ac-a772-4c4bbd734acb"], -Cell[738574, 18296, 4157, 94, 242, "Output",ExpressionUUID->"947b03a9-2cbd-4c6c-9581-9c3c5081ae6d"] -}, Open ]], -Cell[CellGroupData[{ -Cell[742768, 18395, 780, 18, 39, "Input",ExpressionUUID->"4c0ee346-fa4d-4b23-beb9-978fc46ad2e9"], -Cell[743551, 18415, 3303, 75, 238, "Output",ExpressionUUID->"c6fba28b-c709-4f1c-aaa5-1dc943a23e54"] -}, Open ]], -Cell[CellGroupData[{ -Cell[746891, 18495, 188, 3, 39, "Input",ExpressionUUID->"be1350e5-dcc6-408b-8e6a-11187f7c51f6"], -Cell[747082, 18500, 1288, 38, 106, "Output",ExpressionUUID->"66ac8e87-5383-46af-bb85-c6e13ec80247"] -}, Open ]], -Cell[748385, 18541, 169, 3, 39, "Input",ExpressionUUID->"61c01b31-25a6-4bfc-8cfd-1085d80101b8"], -Cell[CellGroupData[{ -Cell[748579, 18548, 315, 7, 39, "Input",ExpressionUUID->"5f476adf-8cad-4884-9d75-1d035ba343b7"], -Cell[748897, 18557, 869, 25, 76, "Output",ExpressionUUID->"1825ed8f-4d11-4ea2-b057-74f82d8dfd32"] -}, Open ]], -Cell[CellGroupData[{ -Cell[749803, 18587, 388, 9, 39, "Input",ExpressionUUID->"1e6594cd-029d-4f2b-bd9e-780211d6642d"], -Cell[750194, 18598, 742, 18, 45, "Output",ExpressionUUID->"fbd95ee4-206b-4c5d-8670-191f561a8752"] -}, Open ]], -Cell[CellGroupData[{ -Cell[750973, 18621, 333, 8, 39, "Input",ExpressionUUID->"bd43e953-13ee-4818-9615-2babaecf102c"], -Cell[751309, 18631, 767, 21, 89, "Output",ExpressionUUID->"5ea83f2d-8bef-4e2b-95f5-312e5b06c8eb"] -}, Open ]], -Cell[CellGroupData[{ -Cell[752113, 18657, 625, 14, 39, "Input",ExpressionUUID->"78ac1f81-a28d-4900-ad95-d75ef8fb8241"], -Cell[752741, 18673, 1807, 45, 125, "Output",ExpressionUUID->"8e2cd786-dc4b-4b78-9988-8966db3f3dde"] -}, Open ]], -Cell[CellGroupData[{ -Cell[754585, 18723, 1093, 20, 39, "Input",ExpressionUUID->"86780af1-4286-43ba-93ab-95d3948907de"], -Cell[CellGroupData[{ -Cell[755703, 18747, 632, 13, 29, "Print",ExpressionUUID->"d5a55656-aa79-4a10-b436-9c324b70537a"], -Cell[756338, 18762, 780, 19, 29, "Print",ExpressionUUID->"aad8b67a-c634-4c45-8fb3-32ad704169e7"] -}, Open ]], -Cell[757133, 18784, 1275, 36, 231, "Output",ExpressionUUID->"fa6b795f-97be-45cb-9d07-44c2503ca5ac"] -}, Open ]] -}, Closed]], -Cell[758435, 18824, 190, 3, 50, "Subsection",ExpressionUUID->"fcc8d847-e109-420b-83c1-2624799fc592"], -Cell[CellGroupData[{ -Cell[758650, 18831, 170, 3, 50, "Subsection",ExpressionUUID->"ced8dfb2-05b8-4589-bf0e-be37ccdb1f23"], -Cell[758823, 18836, 219, 4, 39, "Input",ExpressionUUID->"dab4193a-c942-4803-80d6-aa8263858f17"], -Cell[CellGroupData[{ -Cell[759067, 18844, 328, 9, 39, "Input",ExpressionUUID->"d675ebfd-6a4a-40ac-b47a-f86e2ee341de"], -Cell[759398, 18855, 755, 21, 76, "Output",ExpressionUUID->"c06ea6af-55b9-442f-a1e5-b08de6143c5b"] -}, Open ]], -Cell[CellGroupData[{ -Cell[760190, 18881, 292, 6, 39, "Input",ExpressionUUID->"2db94739-56d7-4125-ab63-04cd8690fda5"], -Cell[760485, 18889, 652, 16, 45, "Output",ExpressionUUID->"f827bfcd-c867-4f46-a8ae-1746db1726b2"] -}, Open ]], -Cell[761152, 18908, 374, 8, 39, "Input",ExpressionUUID->"b7b58005-df46-447f-9077-2d929ae2a509"], -Cell[CellGroupData[{ -Cell[761551, 18920, 242, 5, 39, "Input",ExpressionUUID->"d5d96b18-d7c8-4a5f-a525-9e72dd64ba75"], -Cell[761796, 18927, 210, 5, 45, "Output",ExpressionUUID->"ea664372-c126-4dc6-a8d5-ea16497555cb"] -}, Open ]], -Cell[762021, 18935, 336, 8, 39, "Input",ExpressionUUID->"086c601e-eed4-4192-b66e-77adfdb4e143"], -Cell[CellGroupData[{ -Cell[762382, 18947, 398, 10, 39, "Input",ExpressionUUID->"6836381d-353e-40d4-9af5-a70ba9fffcf2"], -Cell[762783, 18959, 405, 9, 45, "Output",ExpressionUUID->"d356853a-2699-450c-ba3f-76b434075ad1"] -}, Open ]], -Cell[CellGroupData[{ -Cell[763225, 18973, 263, 6, 39, "Input",ExpressionUUID->"c7f05a68-4679-4fc2-807f-022d7139cc84"], -Cell[763491, 18981, 232, 5, 45, "Output",ExpressionUUID->"667c460e-443d-485e-a947-a0096b26b073"] -}, Open ]], -Cell[CellGroupData[{ -Cell[763760, 18991, 348, 8, 39, "Input",ExpressionUUID->"ea38970a-e16c-46be-8928-c1746acd9da4"], -Cell[764111, 19001, 357, 8, 45, "Output",ExpressionUUID->"903557d1-d671-4fbd-a36e-5f3894874649"] -}, Open ]], -Cell[CellGroupData[{ -Cell[764505, 19014, 296, 8, 39, "Input",ExpressionUUID->"237b6cab-c51a-4124-9658-0a3d57fe07f1"], -Cell[764804, 19024, 234, 5, 45, "Output",ExpressionUUID->"e38fadd9-bea5-4ea6-8248-dc304bbe7a69"] -}, Open ]], -Cell[CellGroupData[{ -Cell[765075, 19034, 332, 8, 39, "Input",ExpressionUUID->"42557e2b-dbf6-4d29-917a-157bc2761401"], -Cell[765410, 19044, 268, 6, 41, "Output",ExpressionUUID->"aaeabef4-e3d9-409b-abde-8240cb9da8b7"], -Cell[765681, 19052, 1887, 32, 115, "Message",ExpressionUUID->"e63c3c37-d66a-4932-b2cd-53ca93c2b6df"], -Cell[767571, 19086, 1555, 26, 74, "Message",ExpressionUUID->"0c8dbd37-85a1-4a68-8500-ab8ae9b243b3"], -Cell[769129, 19114, 1225, 22, 51, "Message",ExpressionUUID->"1a102929-3adf-41d6-af22-c72bc67a826a"], -Cell[770357, 19138, 1228, 22, 51, "Message",ExpressionUUID->"cb4b53c6-a238-4c1b-bd6d-9762d41a7981"], -Cell[771588, 19162, 1167, 20, 74, "Message",ExpressionUUID->"6076e4b4-7ad0-4127-9b04-c0f8222bf3e2"], -Cell[772758, 19184, 448, 10, 27, "Message",ExpressionUUID->"15d919cd-643b-4ae5-836a-fa0cc6c4f1cc"], -Cell[773209, 19196, 1228, 22, 51, "Message",ExpressionUUID->"dc77be68-f69c-4423-a6c8-726812cb856b"], -Cell[774440, 19220, 448, 10, 27, "Message",ExpressionUUID->"f0f00fa2-35f2-4b52-a9d7-b9970ada430f"], -Cell[774891, 19232, 208, 4, 41, "Output",ExpressionUUID->"b07010ca-46b9-4da6-b119-76415a00f89a"] -}, Open ]] -}, Open ]] -}, Open ]] -} -] -*) - diff --git a/QI.m b/QI.m deleted file mode 100644 index 1a335cf..0000000 --- a/QI.m +++ /dev/null @@ -1,478 +0,0 @@ -(* ::Package:: *) - -(* - Copyright 2019 (https://github.com/rogercolbeck/QI) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*) - - -BeginPackage["QI`"] - -CT::usage="CT[] is short for ConjugateTranspose[]." - -KetV::usage="KetV[i,d] gives |i> in dimension d." - -BraV::usage="BraV[i,d] gives = b." - -Prep::usage="Prep[M, b] converts inequality constraints to all be greater than form." - -FourierMotzkin::usage="FourierMotzkin[M, b, elim] performs Fourier-Motzkin elimination to a set of equations in the form Mx >= b removing the variables specified in the list elim." - -Elim::usage="Elim[M, b, i] removes the ith variable from the set of equations Mx >= b." - -IntDigs::usage="IntDigs[num, bases] writes the number num in terms of digits of the specified bases, with output length the same as the number of bases." - -Progress::usage="Progress[i, imin, imax, num] gives num progress indications where i is in a loop from imin to imax." - -ProgressTemporary::usage="ProgressTemporart[i, imin, imax, num] gives num progress indications where i is in a loop from imin to imax, removing after the evaluation is completed." - -ThreadSolve::usage="ThreadSolve[eqns, soln, var] solves the set of equations eqns[[i]]=soln for variables var." - -NThreadSolve::usage="NThreadSolve[eqns, soln, var] numerically solves the set of equations eqns[[i]]=soln for variables var." - -\[Sigma]::usage="\[Sigma][i] gives the ith Pauli matrix." - -Support::usage="Support[M] returns the projector onto the support of matrix M." - -PosPart::usage="PosPart[M (,assum)] returns the strictly positive part of matrix M with optional assumptions assum (useful for symbolic matrices." - -NegPart::usage="NegPart[M (,assum)] returns the strictly negative part of matrix M with optional assumptions assum (useful for symbolic matrices." - -AntiDiagonalMatrix::usage="AntiDiagonalMatrix[M] turns a matrix into a vector of its diagonal values." - -CreateMatrix::usage="CreateMatrix[W, r, c] generates a rxc matrix with elements W[i, j]." - -CreateHermitianMatrix::usage="CreateHermitianMatrix[W, r, c] generates a rxc Hermitian matrix with elements W[i, j] or Conjugate[W[i, j]]." - -CreateHermitianMatrixR::usage="CreateHermitianMatrixR[W, r, c] generates a rxc Hermitian matrix with elements WR[i, j] +/- I WC[i, j]." - -CreateSymmetricMatrix::usage="CreateSymmetricMatrix[W, r, c] generates a rxc symmetric matrix with elements W[i, j]." - -RemoveRepeatedInstances::usage="RemoveRepeatedInstances[list] removes any repeated elements of list, preserving the order." - -SetMinus::usage="SetMinus[S1, S2] removes elements of S2 from S1, maintaining the order." - -MajorizeQ::usage="MajorizeQ[A, B] checks whether A majorizes B, where A and B are lists of numbers." - -ManualDeriv::usage="ManualDeriv[fn, vars, point, steps] estimates the derivative of a function fn of the variables vars at point point, with stepsizes steps." - -QRDecomp::usage="QRDecomp[M] gives {Q, R} such that Q is unitary, R is right (upper) triangular and CT[Q].R = M." - -RQDecomp::usage="RQDecomp[M] gives {R, Q} such that R is right (upper) triangular, Q is unitary and R.CT[Q] = M." - -QLDecomp::usage="QLDecomp[M] gives {Q, L} such that Q is unitary, L is left (lower) triangular and CT[Q].L = M." - -LQDecomp::usage="LQDecomp[M] gives {L, Q} such that L is left (lower) triangular, Q is unitary and L.CT[Q] = M." - -QRDecompPos::usage="QRDecompPos[M] outputs as QRDecomp but ensures R has positive diagonal entries." - -QRDecompNeg::usage="QRDecompNeg[M] outputs as QRDecomp but ensures R has negative diagonal entries." - -RQDecompPos::usage="RQDecompPos[M] outputs as RQDecomp but ensures R has positive diagonal entries." - -RQDecompNeg::usage="RQDecompNeg[M] outputs as RQDecomp but ensures R has negative diagonal entries." - -QLDecompPos::usage="QLDecompPos[M] outputs as QLDecomp but ensures L has positive diagonal entries." - -QLDecompNeg::usage="QLDecompNeg[M] outputs as QLDecomp but ensures L has negative diagonal entries." - -LQDecompPos::usage="LQDecompPos[M] outputs as RQDecomp but ensures L has positive diagonal entries." - -LQDecompNeg::usage="LQDecompNeg[M] outputs as RQDecomp but ensures L has negative diagonal entries." - - - - - - -Begin["`Private`"] - -CT[M_]:=ConjugateTranspose[M] - -KetV[i_,d_]:=Module[{},If[i>=d||i<0,Print["KetV: input should be between 0 and d-1"]];Transpose[{UnitVector[d,i+1]}]] - -BraV[i_,d_]:=Module[{},If[i>=d||i<0,Print["BraV: input should be between 0 and d-1"]];Conjugate[{UnitVector[d,i+1]}]] - -DM[vec_]:=vec.CT[vec] - -CircleTimes[a__]:=KroneckerProduct[a] - -Tensor[rho_,sigma_,sys_,desc_]:=Module[{desc1,desc2},If[Length[Dimensions[desc]]==1,If[Dimensions[rho][[1]]==Dimensions[rho][[2]]&&Dimensions[sigma][[1]]==Dimensions[sigma][[2]],desc1=desc;desc2=desc1,If[Dimensions[rho][[2]]==1&&Dimensions[sigma][[2]]==1,desc1=desc;desc2=ConstantArray[1,Length[desc]],Print["Tensor: Fourth argument needs to be pairs of dimensions for given input."]]],{desc1,desc2}=Transpose[desc]];If[Dimensions[rho][[1]]!=Tr[DeleteCases[(2-sys)*desc1,0],Times]||Dimensions[sigma][[1]]!=Tr[DeleteCases[(sys-1)*desc1,0],Times]||Dimensions[rho][[2]]!=Tr[DeleteCases[(2-sys)*desc2,0],Times]||Dimensions[sigma][[2]]!=Tr[DeleteCases[(sys-1)*desc2,0],Times],Print["Tensor: inputs have incorrect dimensions"]];ExchangeSystems[rho\[CircleTimes]sigma,Flatten[Join[Position[sys,1],Position[sys,2]]],Transpose[{desc1[[Flatten[Join[Position[sys,1],Position[sys,2]]]]],desc2[[Flatten[Join[Position[sys,1],Position[sys,2]]]]]}]]] - -TensorPower[M_,power_]:=Module[{i,R},For[i=1;R={{1}},i<=power,i++,R=CircleTimes[R,M]];R] - -ExchangeSystems[vec_,newpos_,desc_]:=Module[{list1,list2,i,desc1,desc2},If[Length[Dimensions[desc]]==1,If[Dimensions[vec][[1]]==Dimensions[vec][[2]],desc1=desc;desc2=desc1,If[Dimensions[vec][[2]]==1,desc1=desc;desc2=ConstantArray[1,Length[desc]],Print["ExchangeSystems: Third argument needs to be pairs of dimensions for given input."]]],{desc1,desc2}=Transpose[desc]];If[Tr[desc1,Times]!=Dimensions[vec][[1]]||Tr[desc2,Times]!=Dimensions[vec][[2]],Print["ExchangeSystems: Wrong dimensions"]];list1={};list2={};For[i=0,i<=Dimensions[vec][[1]]-1,i++,list1=Insert[list1,1+FromDigits[Permute[IntDigs[i,desc1],newpos],MixedRadix[Permute[desc1,newpos]]],-1]];For[i=0,i<=Dimensions[vec][[2]]-1,i++,list2=Insert[list2,1+FromDigits[Permute[IntDigs[i,desc2],newpos],MixedRadix[Permute[desc2,newpos]]],-1]];Transpose[Permute[Transpose[Permute[vec,list1]],list2]]] - -DirectSum[a_,b_]:=Module[{dim1,dim2,out,m},dim1=Dimensions[a][[1]];dim2=Dimensions[b][[1]];out=Join[a,ConstantArray[0,{dim1,dim2}],2];out=Join[out,Join[ConstantArray[0,{dim2,dim1}],b,2]];out] - -DirectSum[list_]:=Module[{dim1,dim2,out,m,number,i},number=Dimensions[list][[1]];out=list[[1]];For[i=2,i<=number,i++,out=DirectSum[out,list[[i]]]];out] - -QubitPartialTrace[M_,sys_]:=PT[M,Table[If[MemberQ[sys,i],0,1],{i,1,Log[2,Dimensions[M][[1]]]}],ConstantArray[2,Log[2,Dimensions[M][[1]]]]] - -PartialTrace[mat_,dim1_,dim2_,s_]:=Module[{},If[(s==1||s==2)&&Dimensions[mat][[1]]==Dimensions[mat][[2]]==dim1*dim2,If[s==1,PT[mat,{0,1},{dim1,dim2}],PT[mat,{1,0},{dim1,dim2}]],Print["PartialTrace: input error"]]] - -PT[mat_,keep_,desc_]:=Module[{dim,parts,mat2,i},dim=Tr[DeleteCases[keep*desc,0],Times];parts=Join[Flatten[Position[keep,0]],Flatten[Position[keep,1]]];mat2=Partition[ExchangeSystems[mat,Permute[Range[Length[desc]],parts],desc],{dim,dim}];Sum[mat2[[i,i]],{i,1,Tr[desc,Times]/dim}]] - -BasisForm[vec_,desc_]:=Module[{i,dim,v=Flatten[vec]},dim=Tr[desc,Times];For[i=1,i<=dim,i++,If[v[[i]]!=0,Print[v[[i]],"|"<>StringDrop[StringDrop[ToString[IntDigs[i-1,desc]],1],-1]<>">"]]]] - -BasisFormS[vec_,desc_]:=Module[{i,dim,string,v=Flatten[vec]},string="";dim=Tr[desc,Times];For[i=1,i<=dim,i++,If[v[[i]]>0,string=string<>"+"<>ToString[v[[i]],FormatType->StandardForm]<>"|"<>StringDrop[StringDrop[ToString[IntDigs[i-1,desc]],1],-1]<>"> ",If[v[[i]]<0,string=string<>ToString[v[[i]],FormatType->StandardForm]<>"|"<>StringDrop[StringDrop[ToString[IntDigs[i-1,desc]],1],-1]<>"> "]]];string] - -Purify[rho_]:=Module[{dim,vals,vecs},dim=Dimensions[rho][[1]];{vals,vecs}=Eigensystem[rho];Sum[(vals[[i]])^(1/2)*Transpose[{vecs[[i]]}]\[CircleTimes]Transpose[{vecs[[i]]}],{i,1,dim}]] - -SchmidtDecomposition[vec_,sys_]:=Module[{coeffs,vecsa,vecsb,u,w,v,vecmat,i},If[Tr[sys,Times]!=Dimensions[vec][[1]],Print["SchmidtDecomposition: Wrong dimensions"];Break[]];vecmat=Partition[Flatten[vec],sys[[2]]];{u,w,v}=SingularValueDecomposition[vecmat];coeffs={};vecsa={};vecsb={};For[i=1,i<=Min[sys],i++,coeffs=Insert[coeffs,w[[i,i]],-1];vecsa=Insert[vecsa,Transpose[{Transpose[u][[i]]}],-1];vecsb=Insert[vecsb,Transpose[{CT[v][[i]]}],-1]];{coeffs,vecsa,vecsb}] - -DiagonalizingUnitary[M_]:=Module[{vals,vecs,i,U},{vals,vecs}=Eigensystem[M];U={};For[i=1,i<=Dimensions[M][[1]],i++,U=Insert[U,Normalize[vecs[[i]]],-1]];{Transpose[U],DiagonalMatrix[vals]}] - -OrderingF[vals_,prec_:Null]:=Module[{blocksizes,ord,ord2,v,i,start,out,block,blockv},v=vals;ord=Ordering[Map[Re,v]];blocksizes=Transpose[Tally[Map[Re,v[[ord]]],If[NumericQ[prec],Chop[N[#1-#2],prec]==0&,Chop[N[#1-#2]]==0&]]][[2]];(* note that numerical parts are taken before Tally *) start=1;out={};For[i=1,i<=Dimensions[blocksizes][[1]],i++,block=Take[ord,{start,start-1+blocksizes[[i]]}];blockv=Take[v[[ord]],{start,start-1+blocksizes[[i]]}];ord2=Ordering[Map[Im,blockv]];block=block[[ord2]];start = start + blocksizes[[i]];out=Join[out,block]];out] - -EigenvaluesExact[m_,prec_:Null]:=Module[{vals,ord},vals=Eigenvalues[m];Off[Tally::smtst];ord=OrderingF[N[vals]];On[Tally::smtst];vals[[ord]]] - -EigensystemExact[m_,prec_:Null]:=Module[{vals,vecs,i,blocksizes,ord,out,block,block2,startrow},{vals,vecs}=Eigensystem[m];Off[Tally::smtst];ord=OrderingF[N[vals]];vals=vals[[ord]];vecs=vecs[[ord]];blocksizes=Transpose[Tally[vals,If[NumericQ[prec], Chop[N[#1 - #2], prec] == 0 &,Chop[N[#1 - #2]] == 0 &]]][[2]];On[Tally::smtst];startrow = 1;out={};For[i=1,i<=Dimensions[blocksizes][[1]],i++,block=Take[vecs,{startrow,startrow-1+blocksizes[[i]]}];block2=Simplify[Orthogonalize[block]];block2=Simplify[Map[Normalize[#]&,block2]];startrow = startrow + blocksizes[[i]];out=Join[out,block2]];{vals,out}] - -SimultaneouslyDiagonalize[A_,B_,precision_:Null]:=Module[{vals,vecs,unitary,blocksizes,startrow,out,i,Bblock,vals2,vec2,unitary2,A1,B1,mA,nA,mB,nB,valA,valB,vec,ord},{mA,nA}=Dimensions[A];{mB,nB}=Dimensions[B];If[A.B-B.A!=ConstantArray[0,{mA,nA}],A1=Chop[A];B1=Chop[B],A1=A;B1=B,A1=Simplify[A];B1=Simplify[B]];{vals,unitary}=EigensystemExact[A1,precision];blocksizes=Transpose[Tally[vals,If[NumericQ[precision],Chop[N[#1-#2],precision]==0&,Chop[N[#1-#2]]==0&]]][[2]];startrow=1;out={};For[i=1,i<=Dimensions[blocksizes][[1]],i++,Bblock=Chop[Take[unitary.B1.CT[unitary],{startrow,startrow-1+blocksizes[[i]]},{startrow,startrow-1+blocksizes[[i]]}]];startrow=startrow+blocksizes[[i]];If[Bblock==DiagonalMatrix[Diagonal[Bblock]],unitary2=IdentityMatrix[Dimensions[Bblock][[1]]],{vals2,unitary2}=EigensystemExact[Bblock,precision]];If[i==1,out=unitary2,out=DirectSum[out,unitary2]]];out=out.unitary;{valA,valB,vec}={Diagonal[out.A1.CT[out]],Diagonal[out.B1.CT[out]],out};(* The next If is not needed, but can be useful to flag problems *)If[Chop[N[CT[vec].DiagonalMatrix[valA].vec-A1]]!=ConstantArray[0,{mA,nA}]||Chop[N[CT[vec].DiagonalMatrix[valB].vec - B1]]!=ConstantArray[0, {mA, nA}],Print["Error in SimultaneouslyDiagonalize with inputs ",A,", ",B,", ",precision]];{valA,valB,vec}] - -BlochSphere[rho_]:=Module[{x,y,z},x=Tr[rho.\[Sigma][1]];y=Tr[rho.\[Sigma][2]];z=Tr[rho.\[Sigma][3]];{{x},{y},{z}}] - -FromBlochSphere[{{x_},{y_},{z_}}]:=Simplify[(1/2)*(IdentityMatrix[2]+x*\[Sigma][1]+y*\[Sigma][2]+z*\[Sigma][3])] - -AppendCols[m_]:=Module[{vec,mat,dim},(dim=Dimensions[m];mat=Transpose[m];mat=Join[mat,Table[ConstantArray[0,dim[[1]]],{dim[[1]]-dim[[2]]}]];vec=NullSpace[mat];mat[[-Length[vec];;-1]]=Conjugate[vec];mat=Map[Normalize,mat];Transpose[mat])] - -FillZero[r_]:=Module[{dr,dc},{dr,dc}=Dimensions[r];If[dc-dr>0,Join[r,ConstantArray[0,{dc-dr,dc}]],r]] - -MeasureBasis[rho_,basis_]:=Module[{out,i,j,dimrho,dimU,proj},dimrho=Dimensions[rho][[1]];dimU=Dimensions[basis][[1]];out=rho*0;For[i=1,i<=dimU,i++,proj=Transpose[{basis[[i]]}].Conjugate[{basis[[i]]}];out=out+(proj\[CircleTimes]IdentityMatrix[dimrho/dimU]).rho.(proj\[CircleTimes]IdentityMatrix[dimrho/dimU])];out] - -MeasureBasis[rho_,basis_,sys_,desc_]:=Module[{out,i,j,dimrho,dimU,proj},dimrho=Dimensions[rho][[1]];If[Tr[desc,Times]!=dimrho,Print["MeasureBasis: Dimensions of desc should match those of matrix"]];dimU=Dimensions[basis][[1]];out=rho*0;For[i=1,i<=dimU,i++,proj=Transpose[{basis[[i]]}].Conjugate[{basis[[i]]}];out=out+Tensor[proj,IdentityMatrix[dimrho/dimU],sys,desc].rho.Tensor[proj,IdentityMatrix[dimrho/dimU],sys,desc]];out] - -MeasurePOVM[rho_,POVM_,sys_,desc_]:=Module[{i,j,dimU,pos1},pos1=Position[sys,1];If[Dimensions[pos1][[1]]!=1,Print["MeasurePOVM: Can only measure on one subsystem"]];pos1=Tr[pos1];If[Tr[desc,Times]!=Dimensions[rho][[1]],Print["MeasurePOVM: Dimensions of desc should match those of matrix"]];dimU=Dimensions[POVM][[1]];Sum[DM[KetV[i-1,dimU]]\[CircleTimes]PT[Tensor[POVM[[i]],IdentityMatrix[Tr[desc,Times]/Dimensions[POVM[[1]]][[1]]],sys,desc].rho,sys-1,desc],{i,1,dimU}]] - -POVMIsometry[rho_,POVM_,sys_,desc_]:=Module[{out,i,j,dimrho,dimU,proj,newdesc,pos1,kraus},dimrho=Dimensions[rho][[1]];pos1=Position[sys,1];If[Dimensions[pos1][[1]]!=1,Print["POVMIsometry: Can only measure on one subsystem"]];pos1=Tr[pos1];If[Tr[desc,Times]!=dimrho,Print["POVMIsometry: Dimensions of desc should match those of matrix"]];dimU=Dimensions[POVM][[1]];newdesc=ReplacePart[desc,pos1->dimU];kraus=Sum[Transpose[{UnitVector[dimU,i]}]\[CircleTimes]Transpose[{UnitVector[dimU,i]}]\[CircleTimes]Tensor[MatrixPower[POVM[[i]],1/2],IdentityMatrix[Tr[DeleteCases[desc*(sys-1),0],Times]],sys,desc],{i,1,dimU}];kraus.rho.CT[kraus]] - -ChoiState[set_]:=Module[{ent},ent=DM[Sum[(KetV[i-1,Dimensions[set[[1]]][[2]]]\[CircleTimes]KetV[i-1,Dimensions[set[[1]]][[2]]]),{i,1,Dimensions[set[[1]]][[2]]}]];Sum[(IdentityMatrix[Dimensions[set[[1]]][[2]]]\[CircleTimes]set[[k]]).ent.(IdentityMatrix[Dimensions[set[[1]]][[2]]]\[CircleTimes]CT[set[[k]]]),{k,1,Dimensions[set][[1]]}]] - -ChoiState[set1_,set2_]:=Module[{ent},If[Dimensions[set1][[1]]!=Dimensions[set2][[1]],Print["ChoiState Error: sets have different numbers of elements"]];ent=DM[Sum[(KetV[i-1,Dimensions[set1[[1]]][[2]]]\[CircleTimes]KetV[i-1,Dimensions[set1[[1]]][[2]]]),{i,1,Dimensions[set1[[1]]][[2]]}]];Sum[(IdentityMatrix[Dimensions[set1[[1]]][[2]]]\[CircleTimes]set1[[k]]).ent.(IdentityMatrix[Dimensions[set1[[1]]][[2]]]\[CircleTimes]CT[set2[[k]]]),{k,1,Dimensions[set1][[1]]}]] - -ChoiChannel[state_,dA_,dB_]:=Module[{set1={},set2={},i,j,w1,w2,u,d,v},{u,d,v}=SingularValueDecomposition[state];For[i=1,i<=dA*dB,i++,If[Chop[d[[i,i]]]!=0,w1=(d[[i,i]])^(1/2)*Transpose[{Transpose[u][[i]]}];w2=(d[[i,i]])^(1/2)*Transpose[{Transpose[v][[i]]}];set1=Insert[set1,Transpose[Partition[Flatten[w1],dB]],-1];set2=Insert[set2,Transpose[Partition[Flatten[w2],dB]],-1]]];Chop[{set1,set2}]] - -ChannelCompress[chan_]:=Module[{n,dA,dB},{n,dB,dA}=Dimensions[chan];ChoiChannel[ChoiState[chan], dA, dB][[1]]] - -ExtremeChannelQ[list_]:=Module[{dim=Dimensions[list][[1]],i,j,newlist},newlist={};For[i=1,i<=dim,i++,For[j=1,j<=dim,j++,newlist=Insert[newlist,Flatten[CT[list[[i]]].list[[j]]],-1]]];If[MatrixRank[Chop[newlist]]==dim^2,True,False]] - -PickRandomPsi[n_]:=Module[{psi,list1,i,R,phi},list1={};For[i=1,i<=n,i++,phi=Random[]*2*\[Pi];list1=Insert[list1,R[i,1]->Random[]*(Cos[phi]+I*Sin[phi]),-1]];psi=CreateMatrix[R,n,1]/.list1;psi/(Tr[Conjugate[Transpose[psi]].psi])^(1/2)] - -RPickRandomPsi[n_]:=Module[{psi,list1,i,R},list1={};For[i=1,i<=n,i++,list1=Insert[list1,R[i,1]->Random[],-1]];psi=CreateMatrix[R,n,1]/.list1;psi/(Tr[Transpose[psi].psi])^(1/2)] - -RPickRandomPsip[n_,rank_]:=Module[{psi,list1,i,R},list1={};For[i=1,i<=n,i++,If[i<=rank,list1=Insert[list1,R[i,1]->Random[],-1],list1=Insert[list1,R[i,1]->0,-1]]];psi=CreateMatrix[R,n,1]/.list1;psi/(Tr[CT[psi].psi])^(1/2)] - -FPickRandomPsi[n_,prec_]:=Module[{psi,list1,i,R},list1={};For[i=1,i<=n,i++,list1=Insert[list1,R[i,1]->1+Random[Integer,prec-1]/(1+Random[Integer,prec-1]),-1]];psi=CreateMatrix[R,n,1]/.list1;psi/(Tr[Transpose[psi].psi])^(1/2)] - -FPickRandomPsi[n_,prec_,rank_]:=Module[{psi,list1,i,R},list1={};For[i=1,i<=n,i++,If[i<=rank,list1=Insert[list1,R[i,1]->1+Random[Integer,prec-1]/(1+Random[Integer,prec-1]),-1],list1=Insert[list1,R[i,1]->0,-1]]];psi=CreateMatrix[R,n,1]/.list1;psi/(Tr[Transpose[psi].psi])^(1/2)] - -PickRandomPsi2[n_]:=Module[{i,tot=1,out={},re,phi},For[i=1,i<=n-1,i++,re=RandomReal[tot];tot=tot-re;phi=Random[]*2*\[Pi];out=Insert[out,re^(1/2)*(Cos[phi]+I*Sin[phi]),-1]];phi=Random[]*2*\[Pi];out=Insert[out,tot^(1/2)*(Cos[phi]+I*Sin[phi]),-1];Transpose[{out}]] - -RPickRandomPsi2[n_]:=Module[{i,tot=1,out={},re},For[i=1,i<=n-1,i++,re=RandomReal[tot];tot=tot-re;out=Insert[out,re^(1/2),-1]];out=Insert[out,tot^(1/2),-1];Transpose[{out}]] - -FPickRandomPsi2[n_,prec_]:=Module[{i,tot=1,out={},re},For[i=1,i<=n-1,i++,re=1+Random[Integer,prec-1];re=tot*re/(re+Random[Integer,prec-1]);tot=tot-re;out=Insert[out,re^(1/2),-1]];out=Insert[out,tot^(1/2),-1];Transpose[{out}]] - -PickRandomUnitary[n_]:=Module[{i,v,M},M={};For[i=1,i<=n,i++,v[i]=Flatten[PickRandomPsi[n]];M=Insert[M,v[i],-1]];Orthogonalize[M]] - -RPickRandomUnitary[n_]:=Module[{i,v,M},M={};For[i=1,i<=n,i++,v[i]=Flatten[RPickRandomPsi[n]];M=Insert[M,v[i],-1]];Orthogonalize[M]] - -FPickRandomUnitary[n_,prec_]:=Module[{i,v,M},M={};For[i=1,i<=n,i++,v[i]=Flatten[FPickRandomPsi[n,prec]];M=Insert[M,v[i],-1]];Orthogonalize[M]] - -PickRandomIsometry[dim1_,dim2_]:=Module[{i,M1,M2},M1={};M2={};For[i=1,i<=dim1,i++,M1=Insert[M1,Flatten[PickRandomPsi[dim1]],-1];M2=Insert[M2,Flatten[PickRandomPsi[dim2]],-1]];M1=Orthogonalize[M1];M2=Orthogonalize[M2];Sum[CT[{M2[[i]]}].{M1[[i]]},{i,1,dim1}]] - -RPickRandomIsometry[dim1_,dim2_]:=Module[{i,M1,M2},M1={};M2={};For[i=1,i<=dim1,i++,M1=Insert[M1,Flatten[RPickRandomPsi[dim1]],-1];M2=Insert[M2,Flatten[RPickRandomPsi[dim2]],-1]];M1=Orthogonalize[M1];M2=Orthogonalize[M2];Sum[CT[{M2[[i]]}].{M1[[i]]},{i,1,dim1}]] - -FPickRandomIsometry[dim1_,dim2_,prec_]:= Module[{i,M1,M2,ins1,ins2,recurse=0},M1={};M2={};For[i=1,i<=dim1,i++;recurse++,If[recurse==500,Print["FPickRandomIsometry:: failed to find an isometry after 500 tries, so output may not be an isometry, try increasing prec"];M1=Insert[M1,ins1,-1];M2=Insert[M2,ins2,-1];Break[]];ins1=Flatten[FPickRandomPsi[dim1,prec]];ins2=Flatten[FPickRandomPsi[dim2,prec]];If[MemberQ[M1,ins1]||MemberQ[M2,ins2],i--,M1=Insert[M1,ins1,-1];M2=Insert[M2,ins2,-1]]];M1=Orthogonalize[M1];M2=Orthogonalize[M2];Sum[CT[{M2[[i]]}].{M1[[i]]},{i,1,dim1}]] - -PickRandomRho[n_]:=Module[{U},U=PickRandomUnitary[n];Chop[U.DiagonalMatrix[Flatten[(RPickRandomPsi[n])^2]].CT[U]]] - -PickRandomRho[n_,rank_]:=Module[{U},U=PickRandomUnitary[n];Chop[U.DiagonalMatrix[Flatten[(RPickRandomPsip[n,rank])^2]].CT[U]]] - -RPickRandomRho[n_]:=Module[{U},U=RPickRandomUnitary[n];Chop[U.DiagonalMatrix[Flatten[(RPickRandomPsi[n])^2]].CT[U]]] - -RPickRandomRho[n_,rank_]:=Module[{U},U=RPickRandomUnitary[n];Chop[U.DiagonalMatrix[Flatten[(RPickRandomPsip[n,rank])^2]].CT[U]]] - -FPickRandomRho[n_,prec_]:=Module[{U},U=FPickRandomUnitary[n,prec];Chop[U.DiagonalMatrix[Flatten[(FPickRandomPsi[n,prec])^2]].CT[U]]] - -FPickRandomRho[n_,prec_,rank_]:=Module[{U},U=FPickRandomUnitary[n,prec];Chop[U.DiagonalMatrix[Flatten[(FPickRandomPsi[n,prec,rank])^2]].CT[U]]] - -PickRandomPOVM[dim_,numels_]:=Module[{out,i,tr,cand,left},out={};tr=1;left=IdentityMatrix[dim];For[i=1,i<=numels-1,i++,cand=Random[]*tr*PickRandomRho[dim];While[Min[Chop[Eigenvalues[left-cand]]]<=0,cand=Random[]*tr*PickRandomRho[dim]];out=Insert[out,cand,-1];left=left-cand;tr=tr-Tr[cand]];Insert[out,left,-1]] - -RPickRandomPOVM[dim_,numels_]:=Module[{out,i,tr,cand,left},out={};tr=1;left=IdentityMatrix[dim];For[i=1,i<=numels-1,i++,cand=Random[]*tr*RPickRandomRho[dim];While[Min[Chop[Eigenvalues[left-cand]]]<=0,cand=Random[]*tr*RPickRandomRho[dim]];out=Insert[out,cand,-1];left=left-cand;tr=tr-Tr[cand]];Insert[out,left,-1]] - -PickRandomMeasurement[dim_,numels_]:=Module[{out,i,tr,cand,left},out={};tr=1;left=IdentityMatrix[dim];For[i=1,i<=numels-1,i++,cand=Random[]*tr*PickRandomUnitary[dim].PickRandomRho[dim];While[Min[Chop[Eigenvalues[left-CT[cand].cand]]]<=0,cand=Random[]*tr*PickRandomUnitary[dim].PickRandomRho[dim]];out=Insert[out,cand,-1];left=left-CT[cand].cand;tr=tr-Tr[CT[cand].cand]];Insert[out,PickRandomUnitary[dim].MatrixPower[left,1/2],-1]] - -RPickRandomMeasurement[dim_,numels_]:=Module[{out,i,tr,cand,left},out={};tr=1;left=IdentityMatrix[dim];For[i=1,i<=numels-1,i++,cand=Random[]*tr*RPickRandomUnitary[dim].RPickRandomRho[dim];While[Min[Chop[Eigenvalues[left-CT[cand].cand]]]<=0,cand=Random[]*tr*RPickRandomUnitary[dim].RPickRandomRho[dim]];out=Insert[out,cand,-1];left=left-CT[cand].cand;tr=tr-Tr[CT[cand].cand]];Insert[out,RPickRandomUnitary[dim].MatrixPower[left,1/2],-1]] - -PickRandomChannel[dimA_,dimB_,n_]:=Module[{iso=PickRandomIsometry[dimA,dimB*n],list1={},i},For[i=1,i<=n,i++,list1=Insert[list1,(IdentityMatrix[dimB]\[CircleTimes]BraV[i-1,n]).iso,-1]];list1] - -RPickRandomChannel[dimA_,dimB_,n_]:=Module[{iso=RPickRandomIsometry[dimA,dimB*n],list1={},i},For[i=1,i<=n,i++,list1=Insert[list1,(IdentityMatrix[dimB]\[CircleTimes]BraV[i-1,n]).iso,-1]];list1] - -FPickRandomChannel[dimA_,dimB_,n_,prec_]:=Module[{iso=FPickRandomIsometry[dimA,dimB*n,prec],list1={},i},For[i=1,i<=n,i++,list1=Insert[list1,(IdentityMatrix[dimB]\[CircleTimes]BraV[i-1,n]).iso,-1]];list1] - -Dist[A_,B_]:=(1/2)*Tr[MatrixPower[CT[(A-B)].(A-B),1/2]] - -QuickDist[A_,B_]:=(1/2)*Tr[Abs[Eigenvalues[A-B]]] - -Fidelity[A_,B_]:=Tr[MatrixPower[MatrixPower[A,1/2].B.MatrixPower[A,1/2],1/2]] - -OptimumPOVM[A_,B_]:=Module[{dim,D1,U,F,Q,S,Q1,S1,i},dim=Extract[Dimensions[A],1];{U,D1}=DiagonalizingUnitary[A-B];F=AntiDiagonalMatrix[D1];Q1={};S1={};For[i=1,i<=dim,i++,If[Chop[Extract[Extract[F,i],1]]>0,Q1=Insert[Q1,1,-1];S1=Insert[S1,0,-1],S1=Insert[S1,1,-1];Q1=Insert[Q1,0,-1]]];Q=DiagonalMatrix[Q1];S=DiagonalMatrix[S1];Q=U.Q.CT[U];S=U.S.CT[U];{Q,S}] - -OptimumPOVM[A_,B_,pA_]:=Module[{dim,D1,U,F,Q,S,Q1,S1,i},dim=Extract[Dimensions[A],1];{U,D1}=DiagonalizingUnitary[pA*A-(1-pA)*B];F=AntiDiagonalMatrix[D1];Q1={};S1={};For[i=1,i<=dim,i++,If[Chop[Extract[Extract[F,i],1]]>0,Q1=Insert[Q1,1,-1];S1=Insert[S1,0,-1],S1=Insert[S1,1,-1];Q1=Insert[Q1,0,-1]]];Q=DiagonalMatrix[Q1];S=DiagonalMatrix[S1];Q=U.Q.CT[U];S=U.S.CT[U];{Q,S}] - -Matrixlog[A_]:=Module[{D1,U},{U,D1}=DiagonalizingUnitary[A];U.DiagonalMatrix[Log[Flatten[AntiDiagonalMatrix[D1]]]].Conjugate[Transpose[U]]] - -Matrixlog[b_,A_]:=Module[{D1,U},{U,D1}=DiagonalizingUnitary[A];U.DiagonalMatrix[Log[b,Flatten[AntiDiagonalMatrix[D1]]]].Conjugate[Transpose[U]]] - -Matrixlog0[A_]:=Module[{D1,U,f},f[x_]:=If[x==0,0,Log[x]];{U,D1}=DiagonalizingUnitary[A];D1=Chop[D1];U.DiagonalMatrix[Map[f,Flatten[Diagonal[D1]]]].CT[U]] - -Matrixlog0[b_,A_]:=Module[{D1,U,f},f[x_]:=If[x==0,0,Log[b,x]];{U,D1}=DiagonalizingUnitary[A];D1=Chop[D1];U.DiagonalMatrix[Map[f,Flatten[Diagonal[D1]]]].CT[U]] - -Matrixxlogx[A_]:=Module[{D1,U,f},f[x_]:=If[x==0,0,x*Log[x]];{U,D1}=DiagonalizingUnitary[A];D1=Chop[D1];U.DiagonalMatrix[Map[f,Flatten[Diagonal[D1]]]].CT[U]] - -Matrixxlogx[b_,A_]:=Module[{D1,U,f},f[x_]:=If[x==0,0,x*Log[b,x]];{U,D1}=DiagonalizingUnitary[A];D1=Chop[D1];U.DiagonalMatrix[Map[f,Flatten[Diagonal[D1]]]].CT[U]] - -MatrixPower0[A_,a_]:=Module[{U,D1,f},f[x_]:=If[x==0,0,x^a];{U,D1}=DiagonalizingUnitary[A];D1=Chop[D1];U.DiagonalMatrix[Map[f,Flatten[Diagonal[D1]]]].CT[U]] - -ShanEntropy[q_]:=Module[{i,p,ent},ent=0;If[!VectorQ[q],If[q<0||q>1,Print["ShanEntropy: Invalid input"]];ent=Limit[-(p*Log[p]+(1-p)*Log[1-p])/Log[2],p->q],For[i=1,i<=Dimensions[q][[1]],i++,If[q[[i]]<0||q[[i]]>1,Print["ShanEntropy: Invalid input"]];ent=ent-Limit[p*Log[p]/Log[2],p->q[[i]]]]];ent] - -vNEntropy[rho_,keep_,desc_]:=Module[{i,keep2={},keep3={},rhoAB,rhoB},For[i=1,i<=Dimensions[desc][[1]],i++,If[keep[[i]]==2,keep2=Insert[keep2,1,-1];keep3=Insert[keep3,1,-1],keep2=Insert[keep2,keep[[i]],-1];keep3=Insert[keep3,0,-1]]];rhoAB=PT[rho,keep2,desc];rhoB=PT[rho,keep3,desc];ShanEntropy[Chop[Eigenvalues[rhoAB]]]-ShanEntropy[Chop[Eigenvalues[rhoB]]]] - -vNInfo[rho_,keep_,desc_]:=Module[{i,keep1={},keep2={},keep3={}},For[i=1,i<=Dimensions[desc][[1]],i++,If[keep[[i]]==1,keep1=Insert[keep1,1,-1],keep1=Insert[keep1,0,-1]];If[keep[[i]]==2,keep2=Insert[keep2,1,-1],keep2=Insert[keep2,0,-1]];If[keep[[i]]==3,keep3=Insert[keep3,1,-1],keep3=Insert[keep3,0,-1]]];-vNEntropy[rho,keep1+keep2+keep3,desc]-vNEntropy[rho,keep3,desc]+vNEntropy[rho,keep1+keep3,desc]+vNEntropy[rho,keep2+keep3,desc]] - -RelEnt[A_,B_]:=Module[{suppB},suppB=Support[B];If[Chop[suppB.A.CT[suppB]-A]==0*A,(Tr[Matrixxlogx[2,A]]-Tr[A.Matrixlog0[2,B]])/Tr[A],\[Infinity]]] - -RelEnt[alpha_,A_,B_]:=Module[{supp,out},If[alpha==1,out=RelEnt[A,B]];If[alpha>1,supp=Support[B];If[Chop[supp.A.CT[supp]-A]==0*A,out=(1/(alpha-1))*Log[2,Tr[MatrixPower[A,alpha].MatrixPower0[B,1-alpha]]],out=\[Infinity]]];If[0=1,i--,If[b[[i]][[2]]==-1,obj=outM[[i]];Mp=Drop[outM,{i}];bp=Drop[outb,{i}];ans=LinearProgramming[-obj,Mp,bp];If[ans.obj>b[[i]][[1]]||ans.obj===Indeterminate,j=1,outM=Mp;outb=bp,-1]];If[b[[i]][[2]]==1,obj=outM[[i]];Mp=Drop[outM,{i}];bp=Drop[outb,{i}];ans=LinearProgramming[obj,Mp,bp];If[ans.obj=1,i--,obj=outM[[i]];Mp=Drop[outM,{i}];bp=Drop[outb,{i}];ans=LinearProgramming[obj,Mp,bp];If[ans.obj=1,i--,If[b[[i]][[2]]==-1,obj=outM[[i]];Mp=Drop[outM,{i}];bp=Drop[outb,{i}];ans=LinearProgramming[-obj*1.0,Mp,bp];If[Chop[ans.obj-b[[i]][[1]]]>0||ans.obj===Indeterminate,j=1,outM=Mp;outb=bp,-1]];If[b[[i]][[2]]==1,obj=outM[[i]];Mp=Drop[outM,{i}];bp=Drop[outb,{i}];ans=LinearProgramming[obj*1.0,Mp,bp];If[Chop[ans.obj-b[[i]][[1]]]<0||ans.obj===Indeterminate,j=1,outM=Mp;outb=bp]]]];If[Dimensions[Dimensions[b]]=={1},For[i=Dimensions[M][[1]],i>=1,i--,obj=outM[[i]];Mp=Drop[outM,{i}];bp=Drop[outb,{i}];ans=LinearProgramming[obj*1.0,Mp,bp];If[Chop[ans.obj-b[[i]]]<0||ans.obj===Indeterminate,j=1,outM=Mp;outb=bp]]];On[LinearProgramming::lpsub];{outM,outb}] - -RemoveDuplicateConstraints[M_,b_]:=Module[{i,j,Mp,Mg,Ml,bp,gathered,max,maxpos,min,minpos,pos,drop,posg,posl},drop={};If[Dimensions[Dimensions[b]]=={2},Mp=Join[M,Transpose[{b[[All,2]]}],2];gathered=Gather[Mp];Mg=Join[M,Sign[Transpose[{b[[All,2]]}]+1/2],2];Ml=Join[M,Sign[Transpose[{b[[All,2]]}]-1/2],2];For[i=1,i<=Dimensions[gathered][[1]],i++,If[Dimensions[gathered[[i]]][[1]]>=2&&gathered[[i]][[1]][[-1]]==1,pos=Position[Mp,gathered[[i]][[1]]];posg=Position[Mg,gathered[[i]][[1]]];If[Dimensions[posg]!=Dimensions[pos],drop=Join[drop,pos],max=-\[Infinity];For[j=1,j<=Dimensions[pos][[1]],j++,If[b[[pos[[j]][[1]]]][[1]]>max,max=b[[pos[[j]][[1]]]][[1]];maxpos=pos[[j]][[1]]]];drop=Join[drop,DeleteCases[pos,{maxpos}]]]];If[Dimensions[gathered[[i]]][[1]]>=2&&gathered[[i]][[1]][[-1]]==-1,pos=Position[Mp,gathered[[i]][[1]]];posl=Position[Ml,gathered[[i]][[1]]];If[Dimensions[posl]!=Dimensions[pos],drop=Join[drop,pos],min=\[Infinity];For[j=1,j<=Dimensions[pos][[1]],j++,If[b[[pos[[j]][[1]]]][[1]]=2&&gathered[[i]][[1]][[-1]]==0,pos=Position[Mp,gathered[[i]][[1]]];drop=Join[drop,DeleteCases[pos,{i}]]]]];If[Dimensions[Dimensions[b]]=={1},gathered=Gather[M];For[i=1,i<=Dimensions[gathered][[1]],i++,If[Dimensions[gathered[[i]][[1]]][[1]]>=2,pos=Position[M,gathered[[i]][[1]]];max=-\[Infinity];For[j=1,j<=Dimensions[pos][[1]],j++,If[b[[pos[[j]][[1]]]]>max,max=b[[pos[[j]][[1]]]];maxpos=pos[[j]][[1]]]];drop=Join[drop,DeleteCases[pos,{maxpos}]]]]];{Delete[M,drop],Delete[b,drop]}] - -Prep[M_,b_]:=Module[{out,bout,i,j},If[Dimensions[Dimensions[b]]!={2},Print["Prep: Error, expecting b to have the form {{b1,s1},{b2,s2},...}"]];out={};bout={};For[i=1,i<=Dimensions[M][[1]],i++,If[b[[i]][[2]]==0,out=Insert[out,M[[i]],-1];out=Insert[out,-M[[i]],-1];bout=Insert[bout,b[[i]][[1]],-1];bout=Insert[bout,-b[[i]][[1]],-1],If[b[[i]][[2]]==1,out=Insert[out,M[[i]],-1];bout=Insert[bout,b[[i]][[1]],-1],If[b[[i]][[2]]==-1,out=Insert[out,-M[[i]],-1];bout=Insert[bout,-b[[i]][[1]],-1]]]]];{out,bout}] - -FourierMotzkin[M_, b_, elim_]:=Module[{out, bout, outp, i, j, min, mini, na, nb, el},If[Dimensions[Dimensions[b]] == {1}, out = M; bout = b,Print["FourierMotzkin: Error, expecting b to have the form {b1,b2,...}. Use Prep[M,b] first if in the form {{b1,s1},{b2,s2},...}"]];el = Sort[elim];For[j = 1, j <= Dimensions[elim][[1]], j++, min = \[Infinity];mini = 1; outp = Join[out, IdentityMatrix[Dimensions[out][[2]]]];For[i = 1, i <= Dimensions[el][[1]], i++,na = Dimensions[PosInstances[outp, el[[i]]]][[1]];nb = Dimensions[NegInstances[outp, el[[i]]]][[1]];If[Dimensions[outp][[1]] - na - nb + na*nb < min,min = Dimensions[outp][[1]] - na - nb + na*nb; mini = i]];{out,bout} = Elim[out, bout, el[[mini]]]; {out, bout}=RemoveIneqConstraints[out, bout]; el = Drop[el, {mini}];el=el+PadRight[PadLeft[{}, mini - 1], Dimensions[el], -1]]; {out,bout}] - -PosInstances[M_,i_]:=Module[{j,out={}},For[j=1,j<=Dimensions[M][[1]],j++,If[M[[j]][[i]]>0,out=Insert[out,j,-1]]];out] - -NegInstances[M_,i_]:=Module[{j,out={}},For[j=1,j<=Dimensions[M][[1]],j++,If[M[[j]][[i]]<0,out=Insert[out,j,-1]]];out] - -Elim[M_, b_, i_]:=Module[{out, bout, Mp, bp, j, k, insta, instb, c1, c2, d}, out = {};bout = {}; Mp = Insert[M, UnitVector[Dimensions[M][[2]], i], -1];bp = Insert[b, 0, -1];For[j = 1, j <= Dimensions[Mp][[1]], j++,If[Mp[[j]][[i]] == 0, out = Insert[out, Drop[Mp[[j]], {i}], -1];bout=Insert[bout,bp[[j]],-1]]];insta=PosInstances[Mp,i];instb=NegInstances[Mp,i];For[j=1,j<=Dimensions[insta][[1]],j++,For[k=1,k<=Dimensions[instb][[1]],k++,c1=Mp[[insta[[j]]]][[i]];c2=-Mp[[instb[[k]]]][[i]];d=LCM[c1,c2];out=Insert[out,Drop[d/c1*Mp[[insta[[j]]]]+d/c2*Mp[[instb[[k]]]], {i}], -1];bout=Insert[bout,d/c1*bp[[insta[[j]]]] + d/c2*bp[[instb[[k]]]], -1]]];{out,bout}] - -IntDigs[num_,bases_]:=Module[{out,i,prod,prevprod,nm=num},out=Table[0,{Dimensions[bases][[1]]}];prod=1;For[i=1,i<=Dimensions[bases][[1]],i++,prevprod=prod;prod=bases[[-i]];out=ReplacePart[out,-i->Mod[nm,prod]];nm=(nm-Mod[nm,prod])/bases[[-i]]];out] - -Progress[i_,imin_,imax_,num_]:=If[Floor[num*(i-imin)/(imax-imin)]-Floor[num*(i-imin-1)/(imax-imin)]==1,Print[100*Floor[num*(i-imin)/(imax-imin)]/num,"%"]] - -ProgressTemporary[i_,imin_,imax_,num_]:=If[Floor[num*(i-imin)/(imax-imin)]-Floor[num*(i-imin-1)/(imax-imin)]==1,PrintTemporary[100*Floor[num*(i-imin)/(imax-imin)]/num,"%"]] - -ThreadSolve[eqns_,soln_,var_]:=Module[{i,out={}},For[i=1,i<=Dimensions[eqns][[1]],i++,out=Insert[out,var/.Solve[eqns[[i]]==soln,var],-1]];Flatten[out,1]] - -NThreadSolve[eqns_,soln_,var_]:=Module[{i,out={}},For[i=1,i<=Dimensions[eqns][[1]],i++,out=Insert[out,var/.NSolve[eqns[[i]]==soln,var],-1]];Flatten[out,1]] - -\[Sigma][i_]:=If[i==0,{{1,0},{0,1}},If[i==1,{{0,1},{1,0}},If[i==2,{{0,-I},{I,0}},If[i==3,\[Sigma][3]={{1,0},{0,-1}}]]]]; - -Support[rho_]:=Module[{dim,i,U,Di,vals,a},dim=Dimensions[rho][[1]];{U,Di}=DiagonalizingUnitary[rho];vals=Flatten[AntiDiagonalMatrix[Chop[Di]]];vals=Limit[vals^a,a->0,Direction->-1];U.DiagonalMatrix[vals].CT[U]] - -PosPart[mat_]:=Module[{i,vals,vecs,proj,warn=0},{vals,vecs}=Chop[Eigensystem[mat]];proj=0*IdentityMatrix[Dimensions[mat][[1]]];For[i=1,i<=Dimensions[vals][[1]],i++,If[vals[[i]]>0,proj=proj+Transpose[{Normalize[vecs[[i]]]}].Conjugate[{Normalize[vecs[[i]]]}],Null,If[warn==0,warn=1;Print["PosPart: unable to determine a sign"]]]];proj.mat.proj] - -PosPart[mat_,assum_]:=Module[{i,vals,vecs,proj,warn=0},{vals,vecs}=Chop[Eigensystem[mat]];proj=0*IdentityMatrix[Dimensions[mat][[1]]];For[i=1,i<=Dimensions[vals][[1]],i++,If[Simplify[vals[[i]]>0,assum],proj=proj+Transpose[{Normalize[vecs[[i]]]}].Conjugate[{Normalize[vecs[[i]]]}],Null,If[warn==0,warn=1;Print["PosPart: unable to determine a sign"]]]];proj.mat.proj] - -NegPart[mat_]:=Module[{i,vals,vecs,proj,warn=0},{vals,vecs}=Chop[Eigensystem[mat]];proj=0*IdentityMatrix[Dimensions[mat][[1]]];For[i=1,i<=Dimensions[vals][[1]],i++,If[vals[[i]]<0,proj=proj+Transpose[{Normalize[vecs[[i]]]}].Conjugate[{Normalize[vecs[[i]]]}],Null,If[warn==0,warn=1;Print["NegPart: unable to determine a sign"]]]];proj.mat.proj] - -NegPart[mat_,assum_]:=Module[{i,vals,vecs,proj,warn=0},{vals,vecs}=Chop[Eigensystem[mat]];proj=0*IdentityMatrix[Dimensions[mat][[1]]];For[i=1,i<=Dimensions[vals][[1]],i++,If[Simplify[vals[[i]]<0,assum],proj=proj+Transpose[{Normalize[vecs[[i]]]}].Conjugate[{Normalize[vecs[[i]]]}],Null,If[warn==0,warn=1;Print["NegPart: unable to determine a sign"]]]];proj.mat.proj] - -AntiDiagonalMatrix[M_]:=Module[{k,n,v},n=Extract[Dimensions[M],1];v={Extract[Extract[M,1],1]};For[k=2,k<=n,k++,v=Insert[v,Extract[Extract[M,k],k],k]];Transpose[{v}]] - -CreateMatrix[W_,r_,c_]:=Module[{i,j,out,t},out={};For[i=1,i<=r,i++,For[j=1;t={},j<=c,j++,t=Insert[t,W[i,j],-1]];out=Insert[out,t,-1]];out] - -CreateHermitianMatrix[W_,r_,c_]:=Module[{i,j,out,t},out={};For[i=1,i<=r,i++,For[j=1;t={},j<=c,j++,If[i<=j,t=Insert[t,W[i,j],-1],t=Insert[t,Conjugate[W[j,i]],-1]]];out=Insert[out,t,-1]];out] - -CreateHermitianMatrixR[W_,r_,c_]:=Module[{i,j,out,t,WR,WC},WR=ToExpression[ToString[W]<>"R"];WC=ToExpression[ToString[W]<>"C"];out={};For[i=1,i<=r,i++,For[j=1;t={},j<=c,j++,If[i==j,t=Insert[t,WR[i,j],-1],If[i=1&&exit==0,i--,For[j1=i-1,j1>=1&&exit==0,j1--,If[Extract[listg,i]==Extract[listg,j1],exit=1;list1=Delete[list1,i]]]];list1];list2=list;dim=Extract[Dimensions[list2],1];list2=RRI[list,dim];While[i>=1,list2=RRI[list2,i]];list2] - -SetMinus[s1_,s2_]:=Module[{out,i},out=s1;For[i=1,i<=Dimensions[s2][[1]],i++,out=DeleteCases[out,s2[[i]]]];out] - -MajorizeQ[A_,B_]:=Module[{dim,i,out,Ap,Bp},dim=Dimensions[A][[1]];Ap=Sort[A,Greater];Bp=Sort[B,Greater];out=True;For[i=1,i<=dim,i++,If[Sum[Ap[[j]],{j,1,i}]point+Insert[zero,steps[[i]],i]])-(fn/.Thread[vars->point]))/steps[[i]]],-1]];out] - -QRDecomp[M_]:=Module[{q,r,dimq,dimm=Dimensions[M]},If[dimm[[1]]!=dimm[[2]],Print["QRDecomp warning: input not a square matrix, so output may not be of expected form."]];{q,r}=QRDecomposition[M];dimq=Dimensions[q];If[dimq[[1]]!=dimq[[2]],q=CT[AppendCols[CT[q]]];r=FillZero[r]];{q,r}] - -RQDecomp[M_]:=Module[{Q,R},{Q,R}=QRDecomp[CT[Reverse[M]]];{M.CT[Reverse[Q]],CT[Reverse[Q]]}] - -LQDecomp[M_]:=Module[{Q,R},{Q,R}=QRDecomp[CT[M]];{CT[R],CT[Q]}] - -QLDecomp[M_]:=Module[{Q,R},{R,Q}=RQDecomp[CT[M]];{CT[Q],CT[R]}] - -SignZeroPos[x_]:=Module[{out={},i},For[i=1,i<=Dimensions[x][[1]],i++,out=Insert[out,If[Re[x[[i]]]<0,-1,1],-1]];out] - -SignZeroNeg[x_]:=Module[{out={},i},For[i=1,i<=Dimensions[x][[1]],i++,out=Insert[out,If[Re[x[[i]]]>0,1,-1],-1]];out] - -QRDecompPos[m_]:=Module[{q,r,s},{q,r}=QRDecomp[m];s=DiagonalMatrix[SignZeroPos[Diagonal[r]]];{s.q,s.r}] - -QRDecompNeg[m_]:=Module[{q,r,s},{q,r}=QRDecomp[m];s=DiagonalMatrix[-SignZeroNeg[Diagonal[r]]];{s.q,s.r}] - -RQDecompPos[m_]:=Module[{q,r,s},{r,q}=RQDecomp[m];s=DiagonalMatrix[SignZeroPos[Diagonal[r]]];{r.s,q.s}] - -RQDecompNeg[m_]:=Module[{q,r,s},{r,q}=RQDecomp[m];s=DiagonalMatrix[-SignZeroNeg[Diagonal[r]]];{r.s,q.s}] - -LQDecompPos[m_]:=Module[{q,l,s},{l,q}=LQDecomp[m];s=DiagonalMatrix[SignZeroPos[Diagonal[l]]];{l.s,q.s}] - -LQDecompNeg[m_]:=Module[{q,l,s},{l,q}=LQDecomp[m];s=DiagonalMatrix[-SignZeroNeg[Diagonal[l]]];{l.s,q.s}] - -QLDecompPos[m_]:=Module[{q,l,s},{q,l}=QLDecomp[m];s=DiagonalMatrix[SignZeroPos[Diagonal[l]]];{s.q,s.l}] - -QLDecompNeg[m_]:=Module[{q,l,s},{q,l}=QLDecomp[m];s=DiagonalMatrix[-SignZeroNeg[Diagonal[l]]];{s.q,s.l}] - - - -End[ ] - -EndPackage[ ] From 4004a6896cddf2d16325683ea29b87d074e41551 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Tue, 22 Oct 2019 16:46:23 +0200 Subject: [PATCH 14/20] Finish testChannelRecursively --- UniversalQCompiler.m | 136 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 107 insertions(+), 29 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 95b9723..2d9f7de 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -192,7 +192,7 @@ TestCreateIsometryFromList1::usage="TBA" CreateIsometryFromList::usage="TBA" CreateInstrumentFromList::usage="TBA" -TestCreateOperationFromGateList::usage="TBA" +testDecChannelRecursively::usage="TBA" Begin["`Private`"]; @@ -375,7 +375,7 @@ CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, IsListForm[st]; If[n===Null,n1=NumberOfQubits[st]];ancillain=SortBy[FindAncilla[st],Last]; - (* Deal with Mmt2 {labelMmt2,j,i}, if i is in ancillain, we add j *) + (* Deal with Mmt2 {measType2,j,i}, if i is in ancillain, we add j *) If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]]; ancillaout=SortBy[Cases[st,{postselType,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; @@ -422,7 +422,7 @@ gate[[1]]==controlledStType, CTRLSTM[gate[[2]],gate[[3]], numQubits, mat], (*Measure and store the result*) - gate[[1]]==labelMmt2, + gate[[1]]==measType2, i=gate[[2]];j=gate[[3]];newOrder=Range[numQubits];newOrder[[{i,j}]]=newOrder[[{j,i}]]; Flatten[#, 1] &@ ExchangeSystems[Partition[mat, 1], newOrder, ConstantArray[2, Length[newOrder]]], True, @@ -4176,7 +4176,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) ] IsListFormHelp[gate_,methodName_]:=Module[{}, - If[MemberQ[{diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,xxType,rType},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; + If[MemberQ[{diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,xxType,rType,measType2,controlledStType},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; Which[ MemberQ[{diagType},gate[[1]]], If[gate[[2]]=={}&&gate[[3]]=={},Goto[LabelEnd];]; @@ -4455,7 +4455,7 @@ and returns a gate sequence (including tracing out operations and measurement op measType2=7; controlledStType=100; -Mmt2[j_,i_]:={labelMmt2,j,i}; +Mmt2[j_,i_]:={measType2,j,i}; CTRLST[z_,o_,u_,stList_]:=Module[{}, Return[{controlledStType, {z,o,u}, stList}]] (*MeasuredQCM*) @@ -4542,7 +4542,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If DecomposeIso\[Rule]"DecIsometryGeneric"/"ColumnByColumnDec"/"DecIsometry"/"KnillDecomposition": Use QRSplit and the isometry is decomposed by the corresponding decomposition methods *) DecChannelRecursively[krausList_,OptionsPattern[{DecomposeIso->"None"}]] := -Module[{k,n,e2n,m,DecMethod,q,v,r,rList,q1,q2,gateSequence}, +Module[{k,n,e2n,m,DecMethod,q,v,r,rList,q1,q2,qBegin,qEnd,gateSequence}, e2n = Dimensions[krausList][[2]]; {k,n,m} = Log2[Dimensions[krausList]]; If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; @@ -4550,44 +4550,60 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; - q= Flatten[krausList,1]; + q = Flatten[krausList,1]; (* If the stacked kraus operators is already a m to n isometry with n<=m+1 *) - If[n+k<=m+1, + If[mTrue]; - gateSequence = - {Ancilla[0,1], - CTRLST[{1},{},{}, - {DecMethod[v,action=Range[Max[m,n]-m+2,Max[n,m]+1]]} - ], - CTRLST[{},{},Range[Max[m,n]-m+2,Max[n,m]+1], - Map[DecMethod[#,action={1}]&,rList] - ] - }; + qBegin = If[m= 1, result[[Last@anciPos]][[3]] = gate[[2]]]; ], @@ -4902,6 +4918,68 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Return[check] ] +CheckDecChannelRecursively[m_, n_, k_] := Module[{krausList, loopNum, output, channout, mat, mat1, mat2, gateList}, + krausList = RPickRandomChannel[2^m,2^n,2^k]; + {gateList, mat1, mat2} = DecChannelRecursively[krausList, DecomposeIso -> "DecIsometry"]; + + (* Case 1, this is the last step of the decomposition *) + If[mat1=={}, + output = CreateOperationFromGateList[gateList]; + If[Length[Dimensions[output]]==2, + channout = {output}, + channout = Flatten[output,1] + ]; + If[Dimensions[channout]=={2^k,2^n,2^m}, + , + Print["The output does not have the correct dimension."]; + Return[False] + ]; + For[i=1, i<=Length[krausList], i++, + mat1 = channout[[i]]; + mat = krausList[[i]]; + mat1 = mat1/mat1[[1,1]] * mat[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat]], ,Return[False]] + ]; + Return[True] + ]; + + (* Case 2, this is a middle step *) + output = CreateOperationFromGateList[gateList]; + mat3List = Partition[output, 2^m]; + + mat1 = Flatten[mat1,1].mat3List[[1]]; + mat = Flatten[krausList[[1;;2^k/2]],1]; + mat1 = mat1/mat1[[1,1]] * mat[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat]], ,Return[False]]; + + mat2 = Flatten[mat2,1].mat3List[[2]]; + mat = Flatten[krausList[[2^k/2+1;;]],1]; + mat2 = mat2/mat2[[1,1]] * mat[[1,1]]; + If[isZeroMatrix[Chop[mat2-mat]], ,Return[False]]; + + Return[True] +] + +testDecChannelRecursively := Module[{error = 0}, + If[ + (*Last step*) + Quiet[Check[CheckDecChannelRecursively[1, 2, 0], error = 1; False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 1],error=2;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 0],error=4;False]]&& + Quiet[Check[CheckDecChannelRecursively[3, 1, 2],error=5;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 4, 0],error=6;False]]&& + (*Middle step*) + Quiet[Check[CheckDecChannelRecursively[1, 1, 2],error=7;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 1, 2],error=8;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 3, 2],error=9;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 3],error=9;False]] + , + True, + Print["Error in DecChannelRecursively[] with error message code ",error];False + ] +] + + End[]; EndPackage[] From 16d89e2095b222b6a44fd090795aa936cec4a93b Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Wed, 23 Oct 2019 08:23:06 +0200 Subject: [PATCH 15/20] Complete descriptions --- UniversalQCompiler.m | 349 ++++++++++--------------------------------- 1 file changed, 83 insertions(+), 266 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 2d9f7de..2a5fb8b 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -179,20 +179,14 @@ and it acts on the n qubits whose numbers are given in the list actionAndAncilla[[2]] (default: action=Range[q+1,q+n])." NearbyIsometry::usage="NearbyIsometry[iso] uses the singular value decomposition to generate an isometry near to iso." (* MeasuredQCM *) -QRSplit::usage="TBA" -ReducedCSDSplit::usage="TBA" -DecChannelRecursively::usage="TBA" -MeasuredQCM::usage="TBA" -CTRLSTM::usage="TBA" -RepalceQubitsInd::usage="TBA" -CreateCompactIsometryFromList::usage="TBA" -ApplyControl::usage="TBA" -FindAncilla::usage="TBA" -BoxiTest::usage="temp" -TestCreateIsometryFromList1::usage="TBA" -CreateIsometryFromList::usage="TBA" -CreateInstrumentFromList::usage="TBA" -testDecChannelRecursively::usage="TBA" +QRSplit::usage="QRSplitv] splits an isometry into two half-size ones and a multiplex controlled gate using QR decomposition." +ReducedCSDSplit::usage="ReducedCSDSplit[q] splits an isometry into two half-size ones and multiplex controlled gates using Reduced Consin-Sine decomposition." +DecChannelRecursively::usage="DecChannelRecursively[krausList] recursively decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." +MeasuredQCM::usage="MeasuredQCM[krausList] decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." +CTRLSTM::usage="CTRLSTM[controls, stList, numQubits, mat] applies a controlled gate sequence to a matrix." +RepalceQubitsInd::usage="RepalceQubitsInd[st, asso] replaces the label of qubits according to the association." +ApplyControlledGate::usage="ApplyControlledGate[ucg, mat] applies a list of controlled isometries to a matrix." +FindAncilla::usage="FindAncilla[st] finds the input ancilla qubits. It will dig into the sub sequence inside a control gate sequence and also take care of the MeasType2 gate." Begin["`Private`"]; @@ -415,33 +409,22 @@ CT[mat2].mat] ] -(*This is seperated from CreateIsometryFromList to deal with matrix that can be applied efficently to mat without create the whole operator, such as uniformly controlled gate*) +(* +Apply a gate to a matrix without create the full size unitary matrix of the gate. +Currently only the controlled gate sequence and type 2 measurement is implemented, but it is posssible to optimize gate in ListFormToOp into this form. +*) ApplyGate[gate_, mat_, numQubits_]:=Module[{i,j,newOrder}, Which[ (*Multi-controled gate*) gate[[1]]==controlledStType, CTRLSTM[gate[[2]],gate[[3]], numQubits, mat], - (*Measure and store the result*) + (*Type 2 measurement and store the result*) gate[[1]]==measType2, i=gate[[2]];j=gate[[3]];newOrder=Range[numQubits];newOrder[[{i,j}]]=newOrder[[{j,i}]]; Flatten[#, 1] &@ ExchangeSystems[Partition[mat, 1], newOrder, ConstantArray[2, Length[newOrder]]], True, ListFormToOp[gate,numQubits].mat ] -(* -IsListForm[st]; -If[n===Null,n1=NumberOfQubits[st]];ancillain=SortBy[Cases[st,{ancillaType,_,_}],Last]; -If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]];ancillaout=SortBy[Cases[st,{postselType,_,_}],Last]; -If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; -st2=DeleteCases[st,{x_/;x==ancillaType||x==postselType,_,_}];mat={{1}};k=0; -For[i=1,i<=n1,i++,mat=KroneckerProduct[mat,If[MemberQ[ancillainnums,i],k++;KetV[ancillainvals[[k]],2],IdentityMatrix[2]]]]; -isAnalytic=True; -For[i=1,i<=Length[st2],i++, -If[isAnalyticGate[st2[[i]]],,isAnalytic=False]; -If[isAnalytic, -If[OptionValue[FullSimp],mat=FullSimplifyNoRoots[ListFormToOp[st2[[i]],n1].mat],mat=Simplify[ListFormToOp[st2[[i]],n1].mat],Print["CreateIsometryFromList: Error"]], -mat=ListFormToOp[st2[[i]],n1].mat -*) ] (*Create an n qubit isometry from list form. Multiplies the unitaries described in the list (numerically) and outputs the first m columns*) @@ -492,44 +475,6 @@ ]; chanout ] -(* github confliction -CreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,i,traces,tracesnums,postsel,postselnums,posn,chanout,st2,dims,n1=n}, - If[Not[OptionValue[POVM]]&&MemberQ[st,{measType,1,_}], - Print["CreateChannelFromList: measurement gate type found"] - ]; - If[n===Null, - n1=NumberOfQubits[st]]; - traces=Cases[st,{measType,_,_}]; - If[traces==={},tracesnums={}, - tracesnums=Transpose[traces][[3]] - ]; - postsel=Cases[st,{postselType,_,_}]; - If[postsel==={}, - postselnums={}, - postselnums=Transpose[postsel][[3]] - ]; - If[Dimensions[Intersection[tracesnums,postselnums]]=={0}, - , - Print["CreateChannelFromList: Cannot postselect on zero and measure/trace on the same qubit."] - ]; - st2=DeleteCases[st,{measType,_,_}]; - mat=CreateIsometryFromList[st2,n1,FullSimp->OptionValue[FullSimp]]; - chanout={}; - posn={}; - dims={}; - For[i=1,i<=n1,i++, - If[MemberQ[postselnums,i], - , - If[MemberQ[tracesnums,i], - posn=Insert[posn,1,-1];dims=Insert[dims,{1,2},-1], - posn=Insert[posn,2,-1];dims=Insert[dims,{2,2},-1]] - ] - ]; - For[i=0,i<=2^(Length[tracesnums])-1,i++, - chanout=Insert[chanout,Tensor[BraV[i,2^(Length[tracesnums])],IdentityMatrix[2^(n1-Length[postselnums]-Length[tracesnums])],posn,dims].mat,-1] - ]; -If[OptionValue[DropZero],For[i=Length[chanout],i>=1,i--,If[Chop[chanout[[i]]]==0*chanout[[i]],chanout=Drop[chanout,{i}]]]];chanout] -*) Options[NCreateChannelFromList]={POVM->False,DropZero->True}; NCreateChannelFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateIsometryFromList[NGateList[st],n,{POVM->OptionValue[POVM],DropZero->OptionValue[DropZero]}] @@ -555,7 +500,7 @@ mmt=Cases[pesudoSt,{measType,1,_}]; If[mmt==={}, mmtnums={}, - mmtnums=Transpose[mmt][[3]] + mmtnums=Sort[Transpose[mmt][[3]]] ]; If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0}, , @@ -564,42 +509,19 @@ inst={}; st2=DeleteCases[st,{measType,1,_}]; For[j=1,j<=2^(Length[mmtnums]),j++, - digs=IntegerDigits[j-1,2,Length[mmtnums] - ]; - st3=st2; - For[i=1,i<=Length[mmtnums], - i++,st3=Insert[st3,{postselType,digs[[i]],mmtnums[[i]]},-1] + digs=IntegerDigits[j-1,2,Length[mmtnums]]; + st3=st2; + For[i=1,i<=Length[mmtnums], + i++,st3=Insert[st3,{postselType,digs[[i]],mmtnums[[i]]},-1] + ]; + inst=Insert[ + inst, + CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}], + -1 + ] ]; - inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1]]; inst ] -(* github confliction - If[n===Null, - n1=NumberOfQubits[st] - ]; - traces=Cases[st,{measType,0,_}]; - If[traces==={}, - tracesnums={}, - tracesnums=Transpose[traces][[3]] - ]; - postsel=Cases[st,{postselType,_,_}]; - If[postsel==={}, - postselnums={}, - postselnums=Transpose[postsel][[3]] - ]; - mmt=Cases[st,{measType,1,_}];If[mmt==={},mmtnums={},mmtnums=Transpose[mmt][[3]]]; - If[Dimensions[Intersection[tracesnums,postselnums,mmtnums]]=={0}, - , - Print["CreateInstrumentFromList: Cannot have combinations of postselect on zero/measure/trace on the same qubit."]]; - inst={};st2=DeleteCases[st,{measType,1,_}]; - For[j=1,j<=2^(Length[mmtnums]),j++, - digs=IntegerDigits[j-1,2,Length[mmtnums] - ]; - st3=st2; - For[i=1,i<=Length[mmtnums], - i++,st3=Insert[st3,{postselType,digs[[i]],mmtnums[[i]]},-1]]; -inst=Insert[inst,CreateChannelFromList[st3,n1,{DropZero->OptionValue[DropZero],FullSimp->OptionValue[FullSimp]}],-1]];inst] -*) Options[NCreateInstrumentFromList]={DropZero->True};(* using DropZero here prevents identification using Length[Dimensions[out]], where out is the output of CreateOperationFromGateList *) NCreateInstrumentFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=CreateInstrumentFromList[NGateList[st],n,{DropZero->OptionValue[DropZero]}] @@ -612,14 +534,6 @@ NCreateOperationFromGateList[st_,n_: Null]:=Module[{four0s,four1s},four1s=(MemberQ[st,{measType,1,_}] || MemberQ[st,{measType2,_,_}]); If[four1s,NCreateInstrumentFromList[st,n,DropZero->False],four0s=MemberQ[st,{measType,0,_}]; -(* github confliction -CreateOperationFromGateList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{four0s,four1s},four1s=MemberQ[st,{measType,1,_}]; -If[four1s,CreateInstrumentFromList[st,n,{DropZero->False,FullSimp->OptionValue[FullSimp]}],four0s=MemberQ[st,{measType,0,_}]; -If[four0s,CreateChannelFromList[st,n,FullSimp->OptionValue[FullSimp]],CreateIsometryFromList[st,n,FullSimp->OptionValue[FullSimp]]]]] - -NCreateOperationFromGateList[st_,n_: Null]:=Module[{four0s,four1s},four1s=MemberQ[st,{measType,1,_}]; -If[four1s,NCreateInstrumentFromList[st,n,DropZero->False],four0s=MemberQ[st,{measType,0,_}]; -*) If[four0s,NCreateChannelFromList[st,n],NCreateIsometryFromList[st,n]]]] ListFormToStrSingleGate[list_]:=Switch[list[[1]], @@ -2615,16 +2529,6 @@ This is fixed in ArcTan2 by ignoring the imaginary part (hence, ArcTan2 should o ]& /@ st] ] ] -(* github confliction -NumberOfQubits[st_]:=Module[{},( -If[st=={},0, -Max[Map[ If[#[[1]] == czType || #[[1]] == cnotType, -Max[#[[2]], #[[3]]], -If[#[[1]]==diagType||#[[1]]==xxType,Max[#[[3]]], - #[[3]]]] & ,st]] - ] - )] - *) (*------------------------------------------- Adapted matrix decompositions (private)--------------------------------------------*) @@ -4450,18 +4354,32 @@ and returns a gate sequence (including tracing out operations and measurement op u.w.CT[v] ] + + (*####################################################################*) -(*Boxi definded gates*) +(* Boxi's code *) + +(* New gate types *) + measType2=7; controlledStType=100; + +(* New gate functions *) + Mmt2[j_,i_]:={measType2,j,i}; CTRLST[z_,o_,u_,stList_]:=Module[{}, Return[{controlledStType, {z,o,u}, stList}]] -(*MeasuredQCM*) + +(* Functions for MeasuredQCM *) + + +(* +Split an isometry into two half-size ones and a multiplex controlled gate using QR decomposition. +Input: a rectangular matrix V=[V1:V2] with an even number of rows; +Output: {R,{Q1,Q2}} where R=[R1:R2] is an isometry and V1=Q1*R1, V2=Q2*R2; +*) QRSplit[v_]:= -(*Input: a rectangular matrix [q1:q2] with an even number of rows; - Output: {R,{Q1,Q2}} where R=[R1:R2] is an isometry and V1=Q1*R1, V2=Q2*R2;*) Module[{v1, v2,q1,q2,r1,r2}, If[!EvenQ[Length[v]], Throw[Stringform["The number of rows has to be even for QRSplit."]]]; {v1,v2} = Partition[v, Length[v]/2]; @@ -4470,13 +4388,16 @@ and returns a gate sequence (including tracing out operations and measurement op Return[{Join[r1,r2],{Transpose[q1],Transpose[q2]}}] ] -ReducedCSDSplit[q_, OptionsPattern[EfficientRepresentation->False]] := -(*Use reduced CSD decomposition to decompose an isometry [q1:q2] in to q1=u1*c*v and q2=u2*s*v,where c and s are diagonal matrix with entries of the form cos and sin (means that c^2+s^2=I). -This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessEqual]n, ortherwise the removal of 0s in s has to be modified. +(* +Split an isometry into two with half size and a multiplex controlled gate using Reduced Cosine-Sine decomposition. +Input: a rectangular matrix q=[q1:q2] with an even number of rows; +Output: Decomposed matrices. q1=u1*c*v and q2=u2*s*v, where c and s are diagonal matrix with entries of the form cos and sin (means that c^2+s^2=I). +This version works ONLY if q is an isometry with dimention (m,n) where 2m<=n, ortherwise the removal of 0s in s has to be modified. If EfficientRepresentation->False, it returns three matrix m1,m2,m3 so that m1*m2*m3=[q1:q2] If EfficiqentRepresentation->True, it only returns v, a list of diagonal elements c and s and {u1, u2} *) +ReducedCSDSplit[q_, OptionsPattern[EfficientRepresentation->False]] := Module[{n,m, u1,u2,s,c,v,q1,q2,x, r,reducedDim,cDial}, If[!EvenQ[Length[q]], Throw[Stringform["The number of rows has to be even for ReducedCSDSplit."]]]; {n,m}=Dimensions[q]; @@ -4511,6 +4432,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] ] +(* Choose the availble decomposition method for isometry *) ChooseDecMethod[MethodName_]:= Module[{method}, Switch[ @@ -4530,18 +4452,20 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] ] -(* Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; -After those gates, the first qubit is to be measured but the measurement gates are not included here; -The total number of qubis involved is max(m,n)+1; +(* +Recursively decompose a list of 2^k Kraus operators into elementry gates and measurement operators. +If it is a middle step, it will return {gatelist, krausList1, krausList2}. +If it is the last step (can no longer be decomposed with measurement), it will return {gatelist, {}, {}} +After each step, the first qubit is to be measured and the result determins which krausList to use. The measurement gates are not included here; Input: a list of Kraus operator; -Output: isometry/st, a list of Kraus operators, a list of Kraus operators;(If the list of Kraus operators is no longer decomposible with QR, it will returns {isometry/st,None,None})\:ff1b -If DecomposeIso\[Rule]"None": Use QRSplit and the isometry is in the matrix representation; +If DecomposeIso\[Rule]"None": Use QRSplit and the isometry is in a matrix representation; If DecomposeIso\[Rule]"QSD": Use ReducedCSDSplit and the isometry is give as gate sequence; -If DecomposeIso\[Rule]"DecIsometryGeneric"/"ColumnByColumnDec"/"DecIsometry"/"KnillDecomposition": Use QRSplit and the isometry is decomposed by the corresponding decomposition methods +If DecomposeIso\[Rule]"DecIsometryGeneric"/"ColumnByColumnDec"/"DecIsometry"/"KnillDecomposition": Use QRSplit and the isometry is decomposed by the corresponding decomposition methods into gate sequence. *) -DecChannelRecursively[krausList_,OptionsPattern[{DecomposeIso->"None"}]] := +Options[DecChannelRecursively] = {DecomposeIso->"None"} +DecChannelRecursively[krausList_, OptionsPattern[]] := Module[{k,n,e2n,m,DecMethod,q,v,r,rList,q1,q2,qBegin,qEnd,gateSequence}, e2n = Dimensions[krausList][[2]]; {k,n,m} = Log2[Dimensions[krausList]]; @@ -4558,9 +4482,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE If[OptionValue[DecomposeIso]=="None", Return[{q,{},{}}], DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; - qBegin = 1; - qEnd = If[m"QSD", DecomposeLastIso->"DecIsometry", DoNotReuseAncilla->False} -MeasuredQCM[krausList_,OptionsPattern[]]:= -(*Recursively decompose a list of 2^k Kraus operators into an m x n Isometry and two list of Krau operators controlled by the measured result after the isometry; +(* +Decompose a list of 2^k Kraus operators into elementry gates and measurement operators. + Input: a list of kraus operators {K1,K2,...K_(2^k)}; -Output: {{st[r1]} , {st[r21],st[r22]} , {st[r31],st[r32],st[r33],st[r34]} , ..., {st[q1}, st[q2], ..., st[q_(2^k)]}}, where st[g] is the gate sequence of gate g. +Output: {{st[r1]} , {st[r21],st[r22]} , {st[r31],st[r32],st[r33],st[r34]} , ..., {st[q1}, st[q2], ..., st[q_(2^k)]}}, where st[mat] is the gate sequence of matrix mat. + *) +Options[MeasuredQCM]={DecomposeIso->"QSD", DecomposeLastIso->"DecIsometry", DoNotReuseAncilla->False} +MeasuredQCM[krausList_,OptionsPattern[]]:= Module[{SplitResult, gateSequence, DecMethod,l,n,m,k,loopNum, i,v,vList, qList,rList,temp}, {k,n,m} = Log2[Dimensions[krausList]]; (* (n,m) size of each kraus operator *) If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; + If[n+k<=m, Throw[StringForm["The list of kraus operators should full fill n+k>m"]]]; (* loopNum = number of iteration with qr decomposition *) If[mqubits{2,3,1}*) +(* Replace the label of qubits according to the association *) RepalceQubitsInd[st_, asso_] := Module[{oldQubitsLabel, newQubitsLabel}, implementedGate={diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType}; If[ @@ -4755,13 +4681,13 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE ] ] -(*Create a compact isometry with all not used qubits neglected.*) +(* Create a compact isometry with all not used qubits neglected. *) CreateCompactIsometryFromList[st_, targetQubits_] := Module[{asso, st2}, asso = AssociationThread[Sort[targetQubits] -> Range[Length[targetQubits]]]; Return[CreateIsometryFromList[RepalceQubitsInd[st, asso]]]; ] -(*If the gate is controlledStType gate, this function maps all the gate in to a gate list to perform some validity check like NumberOfQubits*) +(* If the gate is controlledStType gate, this function takes all the gate sequences and join them into one sequence for gate statistics like NumberOfQubits *) ToSimpleGate[st_] := Module[{}, Flatten[ Map[ @@ -4773,29 +4699,15 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE 1] ] -BoxiNumberOfQubits[st_] := Module[{}, - If[st == {}, 0, Max[ - Which[ - #[[1]] == czType || #[[1]] == cnotType, - Max[#[[2]], - #[[3]]], - #[[1]] == diagType, - Max[#[[3]]], - #[[1]] == controlledStType, - Max[Max[Flatten[#[[2]], 1]], BoxiNumberOfQubits[ToSimpleGate[{#}]]], - True, - #[[3]] - ]& /@ st] - ] -] - -(*Each gate matrix must be a m to n qubits isometry of the same size with m= 1, result[[Last@anciPos]][[3]] = gate[[2]]]; ], {gate, st} @@ -4883,103 +4797,6 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m\[LessE Return[result] ] -TestCreateIsometryFromList1[m_,n_,k_, decmeth_,useanci_] := Module[{check, krausList, gatelist, matList}, - krausList = RPickRandomChannel[2^m, 2^n, 2^k]; - (* no ancilla*) - check = True; - gatelist = MeasuredQCM[krausList, DecomposeIso -> decmeth, - DoNotReuseAncilla -> Not[useanci]]; - result = CreateIsometryFromList[DeleteCases[gatelist, {measType, _, _}]]; - channout = Partition[result, 2^n]; - For[i=1, i<=2^k, i++, - mat1 = channout[[i]]; - mat2 = krausList[[i]]; - mat1 = mat1/mat1[[1,1]] * mat2[[1,1]]; - If[isZeroMatrix[Chop[mat1-mat2]], ,check=False]; - ] - If[check, ,"Error in QR dec without ancilla"]; - Return[check] -] - -TestCreateOperationFromGateList[m_,n_,k_,decMeth_,useAncilla_] := Module[{check, krausList, gatelist, mat1,mat2}, - check = True; - krausList = RPickRandomChannel[2^m, 2^n, 2^k]; - gatelist = MeasuredQCM[krausList, DecomposeIso->decMeth, DoNotReuseAncilla->Not[useAncilla]]; - Print[gatelist]; - channout = CreateOperationFromGateList[gatelist][[;;,1]]; - Print[CreateOperationFromGateList[gatelist]]; - For[i=1,i<=2^k,i++, - mat1 = channout[[i]]; - mat2 = krausList[[i]]; - mat1 = mat1/mat1[[1,1]] * mat2[[1,1]]; - If[isZeroMatrix[Chop[mat1-mat2]], ,check=False] - ]; - If[check, ,"Error in creating operation from the MeasuredQCM gate list"]; - Return[check] -] - -CheckDecChannelRecursively[m_, n_, k_] := Module[{krausList, loopNum, output, channout, mat, mat1, mat2, gateList}, - krausList = RPickRandomChannel[2^m,2^n,2^k]; - {gateList, mat1, mat2} = DecChannelRecursively[krausList, DecomposeIso -> "DecIsometry"]; - - (* Case 1, this is the last step of the decomposition *) - If[mat1=={}, - output = CreateOperationFromGateList[gateList]; - If[Length[Dimensions[output]]==2, - channout = {output}, - channout = Flatten[output,1] - ]; - If[Dimensions[channout]=={2^k,2^n,2^m}, - , - Print["The output does not have the correct dimension."]; - Return[False] - ]; - For[i=1, i<=Length[krausList], i++, - mat1 = channout[[i]]; - mat = krausList[[i]]; - mat1 = mat1/mat1[[1,1]] * mat[[1,1]]; - If[isZeroMatrix[Chop[mat1-mat]], ,Return[False]] - ]; - Return[True] - ]; - - (* Case 2, this is a middle step *) - output = CreateOperationFromGateList[gateList]; - mat3List = Partition[output, 2^m]; - - mat1 = Flatten[mat1,1].mat3List[[1]]; - mat = Flatten[krausList[[1;;2^k/2]],1]; - mat1 = mat1/mat1[[1,1]] * mat[[1,1]]; - If[isZeroMatrix[Chop[mat1-mat]], ,Return[False]]; - - mat2 = Flatten[mat2,1].mat3List[[2]]; - mat = Flatten[krausList[[2^k/2+1;;]],1]; - mat2 = mat2/mat2[[1,1]] * mat[[1,1]]; - If[isZeroMatrix[Chop[mat2-mat]], ,Return[False]]; - - Return[True] -] - -testDecChannelRecursively := Module[{error = 0}, - If[ - (*Last step*) - Quiet[Check[CheckDecChannelRecursively[1, 2, 0], error = 1; False]]&& - Quiet[Check[CheckDecChannelRecursively[2, 2, 1],error=2;False]]&& - Quiet[Check[CheckDecChannelRecursively[2, 2, 0],error=4;False]]&& - Quiet[Check[CheckDecChannelRecursively[3, 1, 2],error=5;False]]&& - Quiet[Check[CheckDecChannelRecursively[2, 4, 0],error=6;False]]&& - (*Middle step*) - Quiet[Check[CheckDecChannelRecursively[1, 1, 2],error=7;False]]&& - Quiet[Check[CheckDecChannelRecursively[2, 1, 2],error=8;False]]&& - Quiet[Check[CheckDecChannelRecursively[2, 3, 2],error=9;False]]&& - Quiet[Check[CheckDecChannelRecursively[2, 2, 3],error=9;False]] - , - True, - Print["Error in DecChannelRecursively[] with error message code ",error];False - ] -] - - End[]; EndPackage[] From 2c47521bad8daa2e7e009e12e3d64eb915858c47 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Wed, 23 Oct 2019 17:04:32 +0200 Subject: [PATCH 16/20] unit test --- Unit_tests.m | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 1 deletion(-) diff --git a/Unit_tests.m b/Unit_tests.m index 64c1d21..fa06954 100644 --- a/Unit_tests.m +++ b/Unit_tests.m @@ -1750,9 +1750,213 @@ Print["testInstrumentDecompositions neither returned True nor False"]] +(* Unit test for MeasuredQCM *) + +testReducedCSDSplit := + Module[{m, n, v, m1, m2, m3, rotList, u1, u2, c, s, , q, reducedDim}, + (* 2m\[LessEqual]n and n must be even*) + result = True; + m = RandomInteger[{2, 10}]; + n = RandomInteger[{2*m, 30}]*2; + v = RPickRandomIsometry[m, n]; + + (* test without EfficientRepresentation *) + {m3, m2, m1} = ReducedCSDSplit[v]; + If[ + isZeroMatrix[v - m1.m2.m3], + result = False + ]; + + (* test with EfficientRepresentation *) + {q, rotList, {u1, u2}} = + ReducedCSDSplit[v, EfficientRepresentation -> True]; + c = DiagonalMatrix[Map[#[[1, 1]] &, rotList]]; + s = DiagonalMatrix[Map[#[[1, 2]] &, rotList]]; + reducedDim = Dimensions[s][[1]]; + m3 = ArrayFlatten[{{q}, {SparseArray[{}, {reducedDim, + reducedDim}]}}]; + m2 = ArrayFlatten[{{c, s}, {s, c}}]; + m1 = ArrayFlatten[{{u1, 0}, {0, u2}}]; + If[ + isZeroMatrix[v - m1.m2.m3], + , + result = False + ]; + + (* return result *) + If[ + result, + Return[True], + Print["Error in ReducedCSDSplit function"]; Return[False] + ] + ] + +testQRSplit := + Module[{result, m, n, v, r, q1, q2}, + result = True; + m = RandomInteger[{2, 10}]; + n = RandomInteger[{2*m, 30}]*2; + v = RPickRandomIsometry[m, n]; + {r, {q1, q2}} = QRSplit[v]; + + If[ + isZeroMatrix[v - ArrayFlatten[{{q1, 0}, {0, q2}}].r], + , + result = False + ]; + + If[ + result, + Return[True], + Print["Error in QRSplit function"]; Return [False] + ] + ] + +testFindAncilla := Module[{st, check}, + st = {{5, 0, + 1}, {100, {{}, {}, {}}, {{{5, 0, 3}}, {{5, 0, + 3}}}}, {100, {{}, {}, {}}, {{{5, 0, 4}}, {{5, 0, 4}}}}, {7, 2, + 3}, {7, 3, 5}}; + check = (FindAncilla[st]=={{5, 0, 1}, {5, 0, 2}, {5, 0, 4}}); + If[Not[check], Print["Error in FindAncilla[]"]]; + Return[check] +] + +CheckMeasuredQCM[m_,n_,k_,decMeth_,useAncilla_] := Module[{check, krausList, gatelist, output, mat1, mat2, chanout}, + check = True; + krausList = RPickRandomChannel[2^m, 2^n, 2^k]; + gatelist = MeasuredQCM[krausList, DecomposeIso->decMeth, DoNotReuseAncilla->Not[useAncilla]]; + output = CreateOperationFromGateList[gatelist]; + If[Length[Dimensions[output]]==2, + chanout = {output}, + chanout = output[[;;,1]] + ]; + For[i=1,i<=2^k,i++, + mat1 = chanout[[i]]; + mat2 = krausList[[i]]; + mat1 = mat1/mat1[[1,1]] * mat2[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat2]], ,check=False] + ]; + Return[check]; +] + +testMeasuredQCM := Module[{error = 0}, + If[ + Quiet[Check[CheckMeasuredQCM[1, 1, 3, "DecIsometry", True],error=1;False]]&& + Quiet[Check[CheckMeasuredQCM[3, 1, 3, "DecIsometry", True],error=2;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 2, 1, "DecIsometry", True],error=3;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 3, 1, "DecIsometry", True],error=4;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 1, 3, "DecIsometry", True],error=5;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 2, 0, "DecIsometry", True],error=6;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 1, 3, "QSD", True],error=7;False]]&& + Quiet[Check[CheckMeasuredQCM[3, 1, 3, "QSD", True],error=8;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 2, 1, "QSD", True],error=9;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 3, 1, "QSD", True],error=10;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 1, 3, "QSD", True],error=11;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 2, 0, "QSD", True],error=12;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 1, 3, "DecIsometry", False],error=13;False]]&& + Quiet[Check[CheckMeasuredQCM[3, 1, 3, "DecIsometry", False],error=14;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 2, 1, "DecIsometry", False],error=15;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 3, 1, "DecIsometry", False],error=16;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 1, 3, "DecIsometry", False],error=17;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 2, 0, "DecIsometry", False],error=18;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 1, 3, "QSD", False],error=19;False]]&& + Quiet[Check[CheckMeasuredQCM[3, 1, 3, "QSD", False],error=20;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 2, 1, "QSD", False],error=21;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 3, 1, "QSD", False],error=22;False]]&& + Quiet[Check[CheckMeasuredQCM[2, 1, 3, "QSD", False],error=23;False]]&& + Quiet[Check[CheckMeasuredQCM[1, 2, 0, "QSD", False],error=24;False]] + , + True, + Print["Error in TestMeasuredQCM[] with error message code ",error];False + ] +] + +CheckDecChannelRecursively[m_, n_, k_, decMeth_] := Module[{krausList, loopNum, output, chanout, mat, mat1, mat2, mat3List, gateList}, + krausList = RPickRandomChannel[2^m,2^n,2^k]; + {gateList, mat1, mat2} = DecChannelRecursively[krausList, DecomposeIso -> decMeth]; + + (* Case 1, this is the last step of the decomposition *) + If[mat1=={}, + output = CreateOperationFromGateList[gateList]; + If[Length[Dimensions[output]]==2, + chanout = {output}, + chanout = Flatten[output,1] + ]; + If[Dimensions[chanout]=={2^k,2^n,2^m}, + , + Print["The output does not have the correct dimension."]; + Return[False] + ]; + For[i=1, i<=Length[krausList], i++, + mat1 = chanout[[i]]; + mat = krausList[[i]]; + mat1 = mat1/mat1[[1,1]] * mat[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat]], ,Return[False]] + ]; + Return[True] + ]; + + (* Case 2, this is a middle step *) + output = CreateOperationFromGateList[gateList]; + mat3List = Partition[output, 2^m]; + + mat1 = Flatten[mat1,1].mat3List[[1]]; + mat = Flatten[krausList[[1;;2^k/2]],1]; + mat1 = mat1/mat1[[1,1]] * mat[[1,1]]; + If[isZeroMatrix[Chop[mat1-mat]], ,Return[False]]; + + mat2 = Flatten[mat2,1].mat3List[[2]]; + mat = Flatten[krausList[[2^k/2+1;;]],1]; + mat2 = mat2/mat2[[1,1]] * mat[[1,1]]; + If[isZeroMatrix[Chop[mat2-mat]], ,Return[False]]; + + Return[True] +] + +testDecChannelRecursively := Module[{error = 0}, + If[ + (*Last step*) + Quiet[Check[CheckDecChannelRecursively[1, 2, 0, "DecIsometry"],error=1;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 1, "DecIsometry"],error=2;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 0, "DecIsometry"],error=4;False]]&& + Quiet[Check[CheckDecChannelRecursively[3, 1, 2, "DecIsometry"],error=5;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 4, 0, "DecIsometry"],error=6;False]]&& + Quiet[Check[CheckDecChannelRecursively[1, 2, 0, "QSD"],error=7;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 1, "QSD"],error=8;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 0, "QSD"],error=9;False]]&& + Quiet[Check[CheckDecChannelRecursively[3, 1, 2, "QSD"],error=10;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 4, 0, "QSD"],error=11;False]]&& + (*Middle step*) + Quiet[Check[CheckDecChannelRecursively[1, 1, 2, "DecIsometry"],error=12;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 1, 2, "DecIsometry"],error=13;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 3, 2, "DecIsometry"],error=14;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 3, "DecIsometry"],error=15;False]]&& + Quiet[Check[CheckDecChannelRecursively[1, 1, 2, "QSD"],error=16;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 1, 2, "QSD"],error=17;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 3, 2, "QSD"],error=18;False]]&& + Quiet[Check[CheckDecChannelRecursively[2, 2, 3, "QSD"],error=19;False]] + , + True, + Print["Error in DecChannelRecursively[] with error message code ",error];False + ] +] + +testMeasuredQCMAll := Module[{}, + If[testReducedCSDSplit&& + testQRSplit&& + testFindAncilla&& + testMeasuredQCM&& + testDecChannelRecursively, + Print["All tests for MeasuredQCM pass."], + , + Print["testMeasuredQCMAll neither returned True nor False"] + ] +] + (*Run all tests*) -runAllTests:=Module[{},(testAllBasicMethods;testUCGs;testAllDiagGateMethods;testIsoSmall;testCCDec;testDec2Qubit;testDecSingleQubit;testQSDAll;testQSD;testStatePreparationAll;testAllMCGMethods;testKnill;testIsometryDecompositions;testStinespring;testPOVM;testXXCNOTAll;testChannelDecompositions;testInstrumentDecompositions)] +runAllTests:=Module[{},(testAllBasicMethods;testUCGs;testAllDiagGateMethods;testIsoSmall;testCCDec;testDec2Qubit;testDecSingleQubit;testQSDAll;testQSD;testStatePreparationAll;testAllMCGMethods;testKnill;testIsometryDecompositions;testStinespring;testPOVM;testXXCNOTAll;testChannelDecompositions;testInstrumentDecompositions;testMeasuredQCMAll)] Timing[runAllTests] From 67ec95c29de6463d7c647b5f3fd47cfd1dff43a4 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Wed, 23 Oct 2019 20:45:24 +0200 Subject: [PATCH 17/20] typo and name change --- UniversalQCompiler.m | 87 +++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 49 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 2a5fb8b..8b08bc8 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -185,7 +185,7 @@ MeasuredQCM::usage="MeasuredQCM[krausList] decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." CTRLSTM::usage="CTRLSTM[controls, stList, numQubits, mat] applies a controlled gate sequence to a matrix." RepalceQubitsInd::usage="RepalceQubitsInd[st, asso] replaces the label of qubits according to the association." -ApplyControlledGate::usage="ApplyControlledGate[ucg, mat] applies a list of controlled isometries to a matrix." +ApplyMultiControlledGate::usage="ApplyMultiControlledGate[ucg, mat] applies a list of controlled isometries to a matrix." FindAncilla::usage="FindAncilla[st] finds the input ancilla qubits. It will dig into the sub sequence inside a control gate sequence and also take care of the MeasType2 gate." Begin["`Private`"]; @@ -4361,14 +4361,14 @@ and returns a gate sequence (including tracing out operations and measurement op (* New gate types *) -measType2=7; -controlledStType=100; +measType2 = 7; +controlledStType = 100; (* New gate functions *) -Mmt2[j_,i_]:={measType2,j,i}; -CTRLST[z_,o_,u_,stList_]:=Module[{}, Return[{controlledStType, {z,o,u}, stList}]] +Mmt2[j_,i_] := {measType2,j,i}; +CTRLST[z_,o_,u_,stList_] := Module[{}, Return[{controlledStType, {z,o,u}, stList}]] (* Functions for MeasuredQCM *) @@ -4380,12 +4380,12 @@ and returns a gate sequence (including tracing out operations and measurement op Output: {R,{Q1,Q2}} where R=[R1:R2] is an isometry and V1=Q1*R1, V2=Q2*R2; *) QRSplit[v_]:= - Module[{v1, v2,q1,q2,r1,r2}, + Module[{v1, v2, q1, q2, r1, r2}, If[!EvenQ[Length[v]], Throw[Stringform["The number of rows has to be even for QRSplit."]]]; {v1,v2} = Partition[v, Length[v]/2]; {q1,r1} = QRDecomposition[v1]; {q2,r2} = QRDecomposition[v2]; - Return[{Join[r1,r2],{Transpose[q1],Transpose[q2]}}] + Return[{Join[r1,r2], {Transpose[q1],Transpose[q2]}}] ] (* @@ -4398,7 +4398,7 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m<=n, or If EfficiqentRepresentation->True, it only returns v, a list of diagonal elements c and s and {u1, u2} *) ReducedCSDSplit[q_, OptionsPattern[EfficientRepresentation->False]] := -Module[{n,m, u1,u2,s,c,v,q1,q2,x, r,reducedDim,cDial}, +Module[{n, m, u1, u2, s, c, v, q1, q2, x, r, reducedDim, cDial}, If[!EvenQ[Length[q]], Throw[Stringform["The number of rows has to be even for ReducedCSDSplit."]]]; {n,m}=Dimensions[q]; If[2*m>n, Throw[Stringform["The input has to be an isometry with 2m<=n, where m, n are the nunber of columns and rows in the matrix representation."]]]; @@ -4406,8 +4406,8 @@ This version works ONLY if q is an isometry with dimention (m,n) where 2m<=n, or {q1,q2} = Partition[q, Length[q]/2]; (* calculate reduced u2 and s *) - {u2,s,v} = SingularValueDecomposition[q2]; - reducedDim =Dimensions[q1][[2]]; + {u2,s,v} = SingularValueDecomposition[q2]; + reducedDim = Dimensions[q1][[2]]; u2 = u2[[All,1;;reducedDim]]; (* Cut unnecessary columns *) s = s[[1;;reducedDim,1;;reducedDim]]; (* Cut zeros *) @@ -4470,8 +4470,8 @@ If it is the last step (can no longer be decomposed with measurement), it will r e2n = Dimensions[krausList][[2]]; {k,n,m} = Log2[Dimensions[krausList]]; If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; - If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; - If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; + If[IntegerQ[m],,Throw[StringForm["The number of rows in one Kraus operator is not a power of two."]]]; + If[IntegerQ[n],,Throw[StringForm["The number of columns of one Kraus operator is not a power of two."]]]; If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; q = Flatten[krausList,1]; @@ -4539,13 +4539,13 @@ If it is the last step (can no longer be decomposed with measurement), it will r *) Options[MeasuredQCM]={DecomposeIso->"QSD", DecomposeLastIso->"DecIsometry", DoNotReuseAncilla->False} MeasuredQCM[krausList_,OptionsPattern[]]:= -Module[{SplitResult, gateSequence, DecMethod,l,n,m,k,loopNum, i,v,vList, qList,rList,temp}, +Module[{SplitResult, gateSequence, DecMethod, l, n, m, k, loopNum, i, v, vList, qList, rList}, {k,n,m} = Log2[Dimensions[krausList]]; (* (n,m) size of each kraus operator *) If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; - If[IntegerQ[m],,Throw[StringForm["The number of rows of the Kraus representation is not a power of two."]]]; - If[IntegerQ[n],,Throw[StringForm["The number of columns of the Kraus representation is not a power of two."]]]; + If[IntegerQ[m],,Throw[StringForm["The number of rows in one Kraus operator is not a power of two."]]]; + If[IntegerQ[n],,Throw[StringForm["The number of columns in one Kraus operator is not a power of two."]]]; If[StringQ[OptionValue[DecomposeIso]],,Throw[StringForm["The name of decomposition method is not a string"]]]; - If[n+k<=m, Throw[StringForm["The list of kraus operators should full fill n+k>m"]]]; + If[n+k<=m, Throw[StringForm["The list of kraus operators should fulfil n+k>m"]]]; (* loopNum = number of iteration with qr decomposition *) If[mTrue]&, qList],1]; - (* A list bellow contains all gate sequences multiplex controlled by the first i-1 bits*) - vList =SplitResult[[1;;-1;;3]]; (* Zero controlled gate v *) - rList = Flatten[SplitResult[[2;;-1;;3]],1]; (* Matrices with cos and sin elements *) - qList = Flatten[SplitResult[[3;;-1;;3]],1]; (* Isometry for the decomposition in the next round*) - + vList = SplitResult[[1;;-1;;3]]; (* Zero controlled gate v *) + rList = Flatten[SplitResult[[2;;-1;;3]],1]; (* Matrices with cos and sin elements *) + qList = Flatten[SplitResult[[3;;-1;;3]],1]; (* Isometry for the decomposition in the next round*) (* Append results *) Which[ OptionValue[DoNotReuseAncilla]==False, @@ -4577,9 +4575,6 @@ If it is the last step (can no longer be decomposed with measurement), it will r Map[DecMethod[#,action={loopNum+1}]&,rList] ], Mmt2[i,loopNum+1] - (*CTRLST[{},{i},{}, - {{NOT[loopNum+1]}} - ]*) } ], OptionValue[DoNotReuseAncilla]==True, @@ -4600,9 +4595,9 @@ If it is the last step (can no longer be decomposed with measurement), it will r OptionValue[DecomposeIso]!="CSD", DecMethod = ChooseDecMethod[OptionValue[DecomposeIso]]; (* Matrix calculation *) - qrSplitResult = Flatten[Map[QRSplit, qList],1]; - rList = qrSplitResult[[1;;-1;;2]]; - qList = Flatten[qrSplitResult[[2;;-1;;2]],1]; + SplitResult = Flatten[Map[QRSplit, qList],1]; + rList = SplitResult[[1;;-1;;2]]; + qList = Flatten[SplitResult[[2;;-1;;2]],1]; (* Append results *) Which[ OptionValue[DoNotReuseAncilla]==False, @@ -4612,9 +4607,6 @@ If it is the last step (can no longer be decomposed with measurement), it will r Map[DecMethod[#,action=Join[{loopNum+1},Range[loopNum+l+1,loopNum+l+m]]]&,rList] ], Mmt2[i,loopNum+1] - (*CTRLST[{},{i},{}, - {{NOT[loopNum+1]}} - ]*) } ], OptionValue[DoNotReuseAncilla]==True, @@ -4626,9 +4618,9 @@ If it is the last step (can no longer be decomposed with measurement), it will r Mmt[i] } ] - ] (* end whether reuse qubit *) - ] (* end which decomposition *) - ]; (* end for the loop *) + ] (* end whether reuse qubit *) + ] (* end which decomposition *) + ]; (* end for the loop *) DecMethod=ChooseDecMethod[OptionValue[DecomposeLastIso]]; AppendTo[gateSequence, @@ -4643,11 +4635,11 @@ If it is the last step (can no longer be decomposed with measurement), it will r ] (*###########################################################################*) -(* Functions for reconstruction of the kraus operators*) +(* Functions for reconstruction the list of kraus operators*) (* Find the label of all qubits used *) -FindUsedBits[st_]:= Module[{QubitsLabel,implementedGate}, - implementedGate={diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,measType2}; +FindUsedBits[st_]:= Module[{QubitsLabel, implementedGate}, + implementedGate={diagType, czType, cnotType, xType, yType, zType, measType, ancillaType, postselType, measType2}; If[ Not[AllTrue[st, MemberQ[implementedGate, #[[1]]] &]], Throw[StringForm["Gate type not implemented in FindUsedBits"]], @@ -4656,7 +4648,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r st=={}, QubitsLabel={}, QubitsLabel=Map[ - If[MemberQ[{diagType,czType,cnotType,measType2}, #[[1]]], + If[MemberQ[{diagType, czType, cnotType, measType2}, #[[1]]], {#[[2]], #[[3]]}, #[[3]] ]&, @@ -4681,8 +4673,8 @@ If it is the last step (can no longer be decomposed with measurement), it will r ] ] -(* Create a compact isometry with all not used qubits neglected. *) -CreateCompactIsometryFromList[st_, targetQubits_] := Module[{asso, st2}, +(* Create a isometry with qubits relabeled to be the given target qubits *) +CreateIsometryFromListRelabeled[st_, targetQubits_] := Module[{asso, st2}, asso = AssociationThread[Sort[targetQubits] -> Range[Length[targetQubits]]]; Return[CreateIsometryFromList[RepalceQubitsInd[st, asso]]]; ] @@ -4700,15 +4692,14 @@ If it is the last step (can no longer be decomposed with measurement), it will r ] (* -Apply a controlled gate to a matrix. +Apply a list of matrix that are multiplex controlled. Each gate matrix must be a m to n qubits isometry of the same size with m0, + If[Length[zeroControls] > 0, Do[ multiControls = Sort@Append[multiControls, controlqubit]; pos = FirstPosition[multiControls, controlqubit][[1]]; @@ -4762,7 +4752,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r {controlqubit, zeroControls} ] ]; - If[Length[oneControls]>0, + If[Length[oneControls] > 0, Do[ multiControls = Sort@Append[multiControls, controlqubit]; pos = FirstPosition[multiControls, controlqubit][[1]]; @@ -4773,11 +4763,10 @@ If it is the last step (can no longer be decomposed with measurement), it will r {controlqubit, oneControls} ] ]; - ApplyControlledGate[{gates, multiControls, isoTargets, numQubits}, mat] + ApplyMultiControlledGate[{gates, multiControls, isoTargets, numQubits}, mat] ] (* Find the input ancilla qubits. It will dig into the sub sequence inside a control gate sequence and also take care of the MeasType2 gate *) - FindAncilla[st_] := Module[{result, gate, ancilla, ancilla1, ancilla2, mmt2List, anciPos}, result = {}; From 80fddf528a7d0f421bcc84ad6fb46ea64a898929 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 27 Oct 2019 21:23:35 +0100 Subject: [PATCH 18/20] remove redundant control --- UniversalQCompiler.m | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 8b08bc8..5b683a7 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -182,7 +182,7 @@ QRSplit::usage="QRSplitv] splits an isometry into two half-size ones and a multiplex controlled gate using QR decomposition." ReducedCSDSplit::usage="ReducedCSDSplit[q] splits an isometry into two half-size ones and multiplex controlled gates using Reduced Consin-Sine decomposition." DecChannelRecursively::usage="DecChannelRecursively[krausList] recursively decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." -MeasuredQCM::usage="MeasuredQCM[krausList] decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." +DecChannelInMeasuredQCM::usage="DecChannelInMeasuredQCM[krausList] decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." CTRLSTM::usage="CTRLSTM[controls, stList, numQubits, mat] applies a controlled gate sequence to a matrix." RepalceQubitsInd::usage="RepalceQubitsInd[st, asso] replaces the label of qubits according to the association." ApplyMultiControlledGate::usage="ApplyMultiControlledGate[ucg, mat] applies a list of controlled isometries to a matrix." @@ -4363,13 +4363,14 @@ and returns a gate sequence (including tracing out operations and measurement op measType2 = 7; controlledStType = 100; +BitType = 9; (* New gate functions *) Mmt2[j_,i_] := {measType2,j,i}; CTRLST[z_,o_,u_,stList_] := Module[{}, Return[{controlledStType, {z,o,u}, stList}]] - +Bit[p,i] := {BitType, p, i}; (* Functions for MeasuredQCM *) @@ -4505,7 +4506,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r gateSequence = Table[Ancilla[0,i], {i,1,If[m"QSD", DecomposeLastIso->"DecIsometry", DoNotReuseAncilla->False} -MeasuredQCM[krausList_,OptionsPattern[]]:= +Options[DecChannelInMeasuredQCM]={DecomposeIso->"QSD", DecomposeLastIso->"DecIsometry", DoNotReuseAncilla->False} +DecChannelInMeasuredQCM[krausList_,OptionsPattern[]]:= Module[{SplitResult, gateSequence, DecMethod, l, n, m, k, loopNum, i, v, vList, qList, rList}, {k,n,m} = Log2[Dimensions[krausList]]; (* (n,m) size of each kraus operator *) If[IntegerQ[k],,Throw[StringForm["The number of Kraus operators is not a power of two."]]]; @@ -4568,7 +4569,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r OptionValue[DoNotReuseAncilla]==False, gateSequence=Join[gateSequence, { - CTRLST[{loopNum+1},{},Range[1,i-1], + CTRLST[{},{},Range[1,i-1], Map[DecMethod[#,action=Range[loopNum+l+1,loopNum+l+m]]&,vList] ], CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], @@ -4580,7 +4581,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r OptionValue[DoNotReuseAncilla]==True, gateSequence=Join[gateSequence, { - CTRLST[{i},{},Range[1,i-1], + CTRLST[{},{},Range[1,i-1], Map[DecMethod[#,action=Range[loopNum+l+1,loopNum+l+m]]&,vList] ], CTRLST[{},{},Join[Range[1,i-1],Range[loopNum+l+1,loopNum+l+m]], From 8ea8bff8d1c349e6b63cbfbc2a048362461e7de1 Mon Sep 17 00:00:00 2001 From: Boxi Li Date: Sun, 27 Oct 2019 23:00:49 +0100 Subject: [PATCH 19/20] add classical initialisation --- Unit_tests.m | 2 +- UniversalQCompiler.m | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Unit_tests.m b/Unit_tests.m index fa06954..b8400c1 100644 --- a/Unit_tests.m +++ b/Unit_tests.m @@ -1825,7 +1825,7 @@ CheckMeasuredQCM[m_,n_,k_,decMeth_,useAncilla_] := Module[{check, krausList, gatelist, output, mat1, mat2, chanout}, check = True; krausList = RPickRandomChannel[2^m, 2^n, 2^k]; - gatelist = MeasuredQCM[krausList, DecomposeIso->decMeth, DoNotReuseAncilla->Not[useAncilla]]; + gatelist = DecChannelInMeasuredQCM[krausList, DecomposeIso->decMeth, DoNotReuseAncilla->Not[useAncilla]]; output = CreateOperationFromGateList[gatelist]; If[Length[Dimensions[output]]==2, chanout = {output}, diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index 5b683a7..e415173 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -366,14 +366,15 @@ (*Create an n qubit isometry from list form. Multiplies the unitaries described in the list (in reversed order!) and outputs the first m columns*) (* Use FullSimp\[Rule]False to avoid attempts to use FullSimplify *) Options[CreateIsometryFromList]={FullSimp->True}; -CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, - IsListForm[st]; - If[n===Null,n1=NumberOfQubits[st]];ancillain=SortBy[FindAncilla[st],Last]; +CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{st3,mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, + st3 = st/.{{BitType,1,x_}->Ancilla[0,x], {BitType,0,x_}->Ancilla[1,x]}; + IsListForm[st3]; + If[n===Null,n1=NumberOfQubits[st3]];ancillain=SortBy[FindAncilla[st3],Last]; (* Deal with Mmt2 {measType2,j,i}, if i is in ancillain, we add j *) If[ancillain==={},ancillainnums={},ancillainnums=Transpose[ancillain][[3]];ancillainvals=Transpose[ancillain][[2]]]; - ancillaout=SortBy[Cases[st,{postselType,_,_}],Last]; + ancillaout=SortBy[Cases[st3,{postselType,_,_}],Last]; If[ancillaout==={},ancillaoutnums={},ancillaoutnums=Transpose[ancillaout][[3]];ancillaoutvals=Transpose[ancillaout][[2]]]; - st2=DeleteCases[st,{x_/;x==ancillaType||x==postselType,_,_}];mat={{1}};k=0; + st2=DeleteCases[st3,{x_/;x==ancillaType||x==postselType,_,_}];mat={{1}};k=0; For[i=1,i<=n1,i++, mat=KroneckerProduct[mat, If[MemberQ[ancillainnums,i], @@ -4080,7 +4081,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) ] IsListFormHelp[gate_,methodName_]:=Module[{}, - If[MemberQ[{diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,xxType,rType,measType2,controlledStType},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; + If[MemberQ[{diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,xxType,rType,measType2,controlledStType, BitType},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; Which[ MemberQ[{diagType},gate[[1]]], If[gate[[2]]=={}&&gate[[3]]=={},Goto[LabelEnd];]; @@ -4093,7 +4094,9 @@ outputs set1 and set2 should be equal (may be useful for checking) *) MemberQ[{xxType},gate[[1]]],If[Length[gate[[3]]]==2&&IntegerQ[gate[[3]][[1]]]&&IntegerQ[gate[[3]][[2]]]&&NumericQ[gate[[2]]],,Throw[StringJoin["There is an XX gate ",ToString[gate]," appering as an input in method ",methodName ," that has incorrect parameters."]]], MemberQ[{rType},gate[[1]]],If[Length[gate[[2]]]==2&&NumericQ[gate[[2]][[1]]]&&NumericQ[gate[[2]][[2]]]&&IntegerQ[gate[[3]]],,Throw[StringJoin["There is an R gate ",ToString[gate]," appering as an input in method ",methodName ," that has incorrect parameters."]]], MemberQ[{controlledStType},gate[[1]]], - Map[IsListFormHelp[#]&,gate[[3]]] + Map[IsListFormHelp[#]&,gate[[3]]], + MemberQ[{BitType},gate[[1]]], + If[gate[[2]]>=0 && gate[[2]]<=1,,Throw[StringJoin["The probability p in Bit gate does not belong to [0,1]."]]] ]; Label[LabelEnd]; ]; @@ -4370,7 +4373,7 @@ and returns a gate sequence (including tracing out operations and measurement op Mmt2[j_,i_] := {measType2,j,i}; CTRLST[z_,o_,u_,stList_] := Module[{}, Return[{controlledStType, {z,o,u}, stList}]] -Bit[p,i] := {BitType, p, i}; +Bit[p_,i_] := {BitType, p, i}; (* Functions for MeasuredQCM *) @@ -4552,7 +4555,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r If[m Date: Wed, 22 Jan 2020 13:23:25 +0100 Subject: [PATCH 20/20] update name --- UniversalQCompiler.m | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/UniversalQCompiler.m b/UniversalQCompiler.m index e415173..3a78132 100644 --- a/UniversalQCompiler.m +++ b/UniversalQCompiler.m @@ -185,7 +185,7 @@ DecChannelInMeasuredQCM::usage="DecChannelInMeasuredQCM[krausList] decomposes a list of 2^k Kraus operators into elementry gates and measurement operators." CTRLSTM::usage="CTRLSTM[controls, stList, numQubits, mat] applies a controlled gate sequence to a matrix." RepalceQubitsInd::usage="RepalceQubitsInd[st, asso] replaces the label of qubits according to the association." -ApplyMultiControlledGate::usage="ApplyMultiControlledGate[ucg, mat] applies a list of controlled isometries to a matrix." +ApplyMultiplexControlledGate::usage="ApplyMultiplexControlledGate[ucg, mat] applies a multiplex controlled gate." FindAncilla::usage="FindAncilla[st] finds the input ancilla qubits. It will dig into the sub sequence inside a control gate sequence and also take care of the MeasType2 gate." Begin["`Private`"]; @@ -324,7 +324,11 @@ Print["{",postselType,",0,n}: qubit n is postselected on |0>"]; Print["{",postselType,",1,n}: qubit n is postselected on |1>"]; Print["{",xxType,",t,{n,m}}: XX-gate with angle t on qubits n,m"]; -Print["{",rType,",{t,p},n}: R-gate with angles t,p on qubit n"]] +Print["{",rType,",{t,p},n}: R-gate with angles t,p on qubit n"]; +Print["{",measType2,",j,i}: measure qubit i and store the result in bit j"]; +Print["{",bitType,",p, i}: intialize classical bit i in state 0 with probability p"]; +Print["{",controlledStTyp",z,o,u,stList}: A sequence of gate list stList that are multiplex controlled by qubits u and controlled by qubits z/o on zero or one."] +] (*Transforms a list in list format to a list containing the corresponding matrices*) ListFormToOp[list_,n_:Null]:=Module[{numQubits=n}, @@ -367,7 +371,7 @@ (* Use FullSimp\[Rule]False to avoid attempts to use FullSimplify *) Options[CreateIsometryFromList]={FullSimp->True}; CreateIsometryFromList[st_,n:Except[_?OptionQ]:Null,OptionsPattern[]]:=Module[{st3,mat,mat2,i,k,ancillain,ancillainnums,ancillainvals,ancillaout,ancillaoutnums,ancillaoutvals,st2,id,rest,n1=n}, - st3 = st/.{{BitType,1,x_}->Ancilla[0,x], {BitType,0,x_}->Ancilla[1,x]}; + st3 = st/.{{bitType,1,x_}->Ancilla[0,x], {bitType,0,x_}->Ancilla[1,x]}; IsListForm[st3]; If[n===Null,n1=NumberOfQubits[st3]];ancillain=SortBy[FindAncilla[st3],Last]; (* Deal with Mmt2 {measType2,j,i}, if i is in ancillain, we add j *) @@ -4081,7 +4085,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) ] IsListFormHelp[gate_,methodName_]:=Module[{}, - If[MemberQ[{diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,xxType,rType,measType2,controlledStType, BitType},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; + If[MemberQ[{diagType,czType,cnotType,xType,yType,zType,measType,ancillaType,postselType,xxType,rType,measType2,controlledStType, bitType},gate[[1]]],,Throw[StringJoin["The gate ",ToString[gate]," appearing as an input in method ",methodName ," is of unknown type."]]]; Which[ MemberQ[{diagType},gate[[1]]], If[gate[[2]]=={}&&gate[[3]]=={},Goto[LabelEnd];]; @@ -4095,7 +4099,7 @@ outputs set1 and set2 should be equal (may be useful for checking) *) MemberQ[{rType},gate[[1]]],If[Length[gate[[2]]]==2&&NumericQ[gate[[2]][[1]]]&&NumericQ[gate[[2]][[2]]]&&IntegerQ[gate[[3]]],,Throw[StringJoin["There is an R gate ",ToString[gate]," appering as an input in method ",methodName ," that has incorrect parameters."]]], MemberQ[{controlledStType},gate[[1]]], Map[IsListFormHelp[#]&,gate[[3]]], - MemberQ[{BitType},gate[[1]]], + MemberQ[{bitType},gate[[1]]], If[gate[[2]]>=0 && gate[[2]]<=1,,Throw[StringJoin["The probability p in Bit gate does not belong to [0,1]."]]] ]; Label[LabelEnd]; @@ -4366,14 +4370,16 @@ and returns a gate sequence (including tracing out operations and measurement op measType2 = 7; controlledStType = 100; -BitType = 9; +bitType = 9; (* New gate functions *) Mmt2[j_,i_] := {measType2,j,i}; -CTRLST[z_,o_,u_,stList_] := Module[{}, Return[{controlledStType, {z,o,u}, stList}]] -Bit[p_,i_] := {BitType, p, i}; +CTRLST[z_,o_,u_,stList_] := Module[{}, + Return[{controlledStType, {z,o,u}, stList}] +] +Bit[p_,i_] := {bitType, p, i}; (* Functions for MeasuredQCM *) @@ -4703,7 +4709,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r ucg: {gates, controls, isoTargets, numQubits}, where gates is a list of isometry, controls and isoTargets are lists of qubits indices and numQubits is the total number of qubits. mat: a two dimensional matrix, can be a state or operator *) -ApplyMultiControlledGate[ucg_, mat_] := Module[{gates, controls, isoTargets, numQubits, ids, n, m, targetMats, gateMats, newOrder, asso, mat2, matlist, mat3}, +ApplyMultiplexControlledGate[ucg_, mat_] := Module[{gates, controls, isoTargets, numQubits, ids, n, m, targetMats, gateMats, newOrder, asso, mat2, matlist, mat3}, {gates, controls, isoTargets, numQubits} = ucg; {n,m} = Log2[Dimensions[gates[[1]]]]; (*Validity check*) @@ -4767,7 +4773,7 @@ If it is the last step (can no longer be decomposed with measurement), it will r {controlqubit, oneControls} ] ]; - ApplyMultiControlledGate[{gates, multiControls, isoTargets, numQubits}, mat] + ApplyMultiplexControlledGate[{gates, multiControls, isoTargets, numQubits}, mat] ] (* Find the input ancilla qubits. It will dig into the sub sequence inside a control gate sequence and also take care of the MeasType2 gate *)