From c14474a9af6407bea6b941878b504716a7d06eb2 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Wed, 15 Apr 2015 21:44:53 +1000 Subject: [PATCH 1/7] New Hinton diagram fn based on SK's prototype New function implements Hinton diagrams for complex matrices, w/ nice support for channels. Based on prototype written by Sarah Kaiser. --- doc/api-doc/Visualization.nb | 626 +++++++++++++++++++++++++++-------- src/Visualization.m | 72 +++- 2 files changed, 545 insertions(+), 153 deletions(-) diff --git a/doc/api-doc/Visualization.nb b/doc/api-doc/Visualization.nb index 27da317..ab690f3 100644 --- a/doc/api-doc/Visualization.nb +++ b/doc/api-doc/Visualization.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] -NotebookDataLength[ 1153302, 23282] -NotebookOptionsPosition[ 1144076, 22987] -NotebookOutlinePosition[ 1146266, 23052] -CellTagsIndexPosition[ 1145694, 23036] +NotebookDataLength[ 1164469, 23614] +NotebookOptionsPosition[ 1154218, 23287] +NotebookOutlinePosition[ 1156719, 23360] +CellTagsIndexPosition[ 1156060, 23342] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -45,13 +45,15 @@ documentation notebook.\ Cell[BoxData[{ RowBox[{"Needs", "[", "\"\\"", "]"}], "\[IndentingNewLine]", + RowBox[{"Needs", "[", "\"\\"", + "]"}], "\[IndentingNewLine]", RowBox[{"Needs", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{"Needs", "[", "\"\\"", "]"}]}], "Input", CellChangeTimes->{{3.634314144340521*^9, 3.634314148861907*^9}, { 3.635168647903007*^9, 3.635168651903873*^9}, {3.635173133962139*^9, - 3.6351731399802923`*^9}}] -}, Closed]], + 3.6351731399802923`*^9}, {3.6380867292922087`*^9, 3.638086737835305*^9}}] +}, Open ]], Cell[CellGroupData[{ @@ -2007,6 +2009,304 @@ Cell[BoxData[ 3.634315065427843*^9}] }, Open ]] }, Closed]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["HintonPlot", "Subsection", + CellChangeTimes->{{3.6343136519607687`*^9, 3.634313663136846*^9}, { + 3.638086159522276*^9, 3.6380861618329153`*^9}}], + +Cell[TextData[{ + StyleBox["HintonPlot[", "Input"], + StyleBox["mtx", "Input", + FontWeight->"Plain", + FontSlant->"Italic"], + StyleBox["]", "Input"], + " plots a real-valued matrix ", + StyleBox["mtx", "Input", + FontWeight->"Plain", + FontSlant->"Italic"], + " as an array of squares. The size of each square indicates the magnitude of \ +that matrix element, while the color indicates positive (white) and negative \ +(black) elements. Tooltips on each square give the exact magnitude." +}], "Text", + CellDingbat->"\[FilledSquare]", + CellChangeTimes->{{3.634313681543186*^9, 3.634313767583549*^9}, { + 3.6380861687728405`*^9, 3.638086243363751*^9}, {3.638086320492544*^9, + 3.6380863299402494`*^9}}, + CellTags->"HintonPlot::usage"], + +Cell[CellGroupData[{ + +Cell["Example", "Subsubsection", + CellChangeTimes->{{3.634313799258635*^9, 3.634313800077886*^9}}], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"HintonPlot", "[", + RowBox[{"RandomReal", "[", + RowBox[{ + RowBox[{"{", + RowBox[{ + RowBox[{"-", "1"}], ",", " ", "1"}], "}"}], ",", " ", + RowBox[{"{", + RowBox[{"3", ",", "3"}], "}"}]}], "]"}], "]"}]], "Input", + CellChangeTimes->{{3.634314243085985*^9, 3.634314279362772*^9}, { + 3.638086258955757*^9, 3.6380863111757903`*^9}, {3.638086342516712*^9, + 3.6380863542032394`*^9}}], + +Cell[BoxData[ + GraphicsBox[ + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + RectangleBox[NCache[{Rational[1, 4], Rational[1, 4]}, {0.25, 0.25}], + NCache[{Rational[15, 4], Rational[15, 4]}, {3.75, 3.75}]], { + {GrayLevel[0], + TagBox[ + TooltipBox[RectangleBox[{1.0579594037398619`, 1.0579594037398619`}, {0.942040596260138, 0.942040596260138}], + RowBox[{"-", "0.11951580919720461`"}]], + Annotation[#, -0.11951580919720461`, "Tooltip"]& ]}, + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{0.5280454668434887, 1.5280454668434889`}, {1.4719545331565111`, 2.471954533156511}], + "0.973198899485844`"], + Annotation[#, 0.973198899485844, "Tooltip"]& ]}, + {GrayLevel[0], + TagBox[ + TooltipBox[RectangleBox[{1.475, 3.475}, {0.525, 2.525}], + RowBox[{"-", "0.9794788370058445`"}]], + Annotation[#, -0.9794788370058445, "Tooltip"]& ]}}, { + {GrayLevel[0], + TagBox[ + TooltipBox[RectangleBox[{2.108910471819128, 1.1089104718191278`}, {1.8910895281808722`, 0.8910895281808722}], + RowBox[{"-", "0.22458000478980455`"}]], + Annotation[#, -0.22458000478980455`, "Tooltip"]& ]}, + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{1.9152839704108908`, 1.9152839704108908`}, {2.084716029589109, 2.084716029589109}], + "0.17468959607935464`"], + Annotation[#, 0.17468959607935464`, "Tooltip"]& ]}, + {GrayLevel[0], + TagBox[ + TooltipBox[RectangleBox[{2.4598757349673988`, 3.4598757349673988`}, {1.5401242650326012`, 2.5401242650326012`}], + RowBox[{"-", "0.9482916843222644`"}]], + Annotation[#, -0.9482916843222644, "Tooltip"]& ]}}, { + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{2.651896507362168, 0.6518965073621679}, {3.348103492637832, 1.3481034926378321`}], + "0.7178105350033186`"], + Annotation[#, 0.7178105350033186, "Tooltip"]& ]}, + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{2.9288782390948476`, 1.9288782390948473`}, {3.0711217609051524`, 2.0711217609051524`}], + "0.14665738875197176`"], + Annotation[#, 0.14665738875197176`, "Tooltip"]& ]}, + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{2.6061559526935594`, 2.6061559526935594`}, {3.3938440473064406`, 3.3938440473064406`}], + "0.8121303356155525`"], + Annotation[#, 0.8121303356155525, "Tooltip"]& ]}}}]], "Output", + CellChangeTimes->{ + 3.6380863115981035`*^9, {3.6380863435894413`*^9, 3.6380863575614223`*^9}}] +}, Open ]] +}, Open ]] +}, Open ]], + +Cell[CellGroupData[{ + +Cell["ChannelHintonPlot", "Subsection", + CellChangeTimes->{{3.6343136519607687`*^9, 3.634313663136846*^9}, { + 3.638086159522276*^9, 3.6380861618329153`*^9}, {3.638086382726696*^9, + 3.6380863844469414`*^9}}], + +Cell[TextData[{ + StyleBox["ChannelHintonPlot[", "Input"], + StyleBox["chan", "Input", + FontWeight->"Plain", + FontSlant->"Italic"], + StyleBox["]", "Input"], + " plots a quantum channel ", + StyleBox["chan", "Input", + FontWeight->"Plain", + FontSlant->"Italic"], + " as a Hinton diagram, using the Pauli-basis superoperator representation of \ +", + StyleBox["chan", "Input", + FontWeight->"Plain", + FontSlant->"Italic"], + "." +}], "Text", + CellDingbat->"\[FilledSquare]", + CellChangeTimes->{{3.634313681543186*^9, 3.634313767583549*^9}, { + 3.6380861687728405`*^9, 3.638086243363751*^9}, {3.638086320492544*^9, + 3.6380863299402494`*^9}, {3.6380863858369284`*^9, 3.6380864553672423`*^9}}, + CellTags->"ComplexHintonPlot::usage"], + +Cell[CellGroupData[{ + +Cell["Example", "Subsubsection", + CellChangeTimes->{{3.634313799258635*^9, 3.634313800077886*^9}}], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"ChannelHintonPlot", "[", + RowBox[{"FunctionChannel", "[", + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{"(", + RowBox[{"1", "/", "2"}], ")"}], + RowBox[{ + RowBox[{"TP", "[", "X", "]"}], ".", "#", ".", + RowBox[{"TP", "[", "X", "]"}]}]}], "+", + RowBox[{ + RowBox[{"(", + RowBox[{"1", "/", "2"}], ")"}], + RowBox[{"Tr", "[", "#", "]"}], + RowBox[{"Projector", "[", + RowBox[{"UnitVector", "[", + RowBox[{"2", ",", "1"}], "]"}], "]"}]}]}], "&"}], ",", + RowBox[{"InputDim", "\[Rule]", "2"}]}], "]"}], "]"}]], "Input", + CellChangeTimes->{{3.634314243085985*^9, 3.634314279362772*^9}, { + 3.638086258955757*^9, 3.6380863111757903`*^9}, {3.638086342516712*^9, + 3.6380863542032394`*^9}, {3.638086461359494*^9, 3.638086518360927*^9}, { + 3.6380865839700603`*^9, 3.6380865965696535`*^9}, {3.638086638202485*^9, + 3.638086668764914*^9}}], + +Cell[BoxData[ + GraphicsBox[ + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + RectangleBox[NCache[{Rational[1, 4], Rational[1, 4]}, {0.25, 0.25}], + NCache[{Rational[19, 4], Rational[19, 4]}, {4.75, 4.75}]], { + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{0.7625, 0.7625}, {1.2375, 1.2375}], + FractionBox["1", "2"]], + Annotation[#, + Rational[1, 2], "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{1., 2.}, {1., 2.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{1., 3.}, {1., 3.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{0.525, 3.525}, {1.475, 4.475}], + "1"], + Annotation[#, 1, "Tooltip"]& ]}}, { + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{2., 1.}, {2., 1.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{2., 2.}, {2., 2.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[1], + TagBox[ + TooltipBox[RectangleBox[{1.7625, 2.7625}, {2.2375, 3.2375}], + FractionBox["1", "2"]], + Annotation[#, + Rational[1, 2], "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{2., 4.}, {2., 4.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}}, { + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{3., 1.}, {3., 1.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[0], + TagBox[ + TooltipBox[RectangleBox[{3.2375, 2.2375}, {2.7625, 1.7625}], + RowBox[{"-", + FractionBox["1", "2"]}]], + Annotation[#, + Rational[-1, 2], "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{3., 3.}, {3., 3.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{3., 4.}, {3., 4.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}}, { + {GrayLevel[0], + TagBox[ + TooltipBox[RectangleBox[{4.2375, 1.2375}, {3.7625, 0.7625}], + RowBox[{"-", + FractionBox["1", "2"]}]], + Annotation[#, + Rational[-1, 2], "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{4., 2.}, {4., 2.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{4., 3.}, {4., 3.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}, + {GrayLevel[ + NCache[ + Rational[1, 2], 0.5]], + TagBox[ + TooltipBox[RectangleBox[{4., 4.}, {4., 4.}], + "0"], + Annotation[#, 0, "Tooltip"]& ]}}, + InsetBox["\<\"I\"\>", NCache[{1, Rational[19, 4]}, {1, 4.75}], {0, -2}], + InsetBox["\<\"X\"\>", NCache[{2, Rational[19, 4]}, {2, 4.75}], {0, -2}], + InsetBox["\<\"Y\"\>", NCache[{3, Rational[19, 4]}, {3, 4.75}], {0, -2}], + InsetBox["\<\"Z\"\>", NCache[{4, Rational[19, 4]}, {4, 4.75}], {0, -2}], + InsetBox["\<\"Z\"\>", {0, 1}, {1, 0}], + InsetBox["\<\"Y\"\>", {0, 2}, {1, 0}], + InsetBox["\<\"X\"\>", {0, 3}, {1, 0}], + InsetBox["\<\"I\"\>", {0, 4}, {1, 0}]}]], "Output", + CellChangeTimes->{ + 3.6380863115981035`*^9, {3.6380863435894413`*^9, 3.6380863575614223`*^9}, { + 3.6380865064834986`*^9, 3.6380865189223175`*^9}, {3.638086588422076*^9, + 3.6380865968948555`*^9}, {3.638086646857444*^9, 3.638086669299281*^9}}] +}, Open ]] +}, Open ]] }, Open ]] }, Open ]], @@ -22985,9 +23285,9 @@ ez+CUF9ulzbTTPMhCILDeZ6Cv+l+yoJQOu8YcP0MO38QmqPS7idconrMbqhK }, Open ]] }, Open ]] }, -WindowSize->{1631, 1026}, -WindowMargins->{{Automatic, -1680}, {Automatic, 1050}}, -FrontEndVersion->"10.0 for Linux x86 (64-bit) (June 27, 2014)", +WindowSize->{1440, 880}, +WindowMargins->{{-8, Automatic}, {Automatic, -8}}, +FrontEndVersion->"10.1 for Microsoft Windows (64-bit) (March 23, 2015)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) @@ -22996,289 +23296,321 @@ StyleDefinitions->"Default.nb" (*CellTagsOutline CellTagsIndex->{ "ComplexMatrixPlot::usage"->{ - Cell[3284, 99, 794, 19, 52, "Text", + Cell[3416, 101, 794, 19, 50, "Text", CellTags->"ComplexMatrixPlot::usage"]}, "BlockForm::usage"->{ - Cell[73692, 1730, 1392, 51, 53, "Text", + Cell[73824, 1732, 1392, 51, 51, "Text", CellTags->"BlockForm::usage"]}, "MatrixListForm::usage"->{ - Cell[80894, 1939, 631, 21, 32, "Text", + Cell[81026, 1941, 631, 21, 31, "Text", CellTags->"MatrixListForm::usage"]}, + "HintonPlot::usage"->{ + Cell[83580, 2019, 727, 18, 50, "Text", + CellTags->"HintonPlot::usage"]}, + "ComplexHintonPlot::usage"->{ + Cell[87650, 2124, 724, 21, 31, "Text", + CellTags->"ComplexHintonPlot::usage"]}, "BlochPlot::usage"->{ - Cell[83529, 2022, 11215, 347, 414, "Text", + Cell[93671, 2322, 11215, 347, 403, "Text", CellTags->"BlochPlot::usage"]}, "BlochPlotColors::usage"->{ - Cell[94870, 2376, 433, 11, 32, "Text", + Cell[105012, 2676, 433, 11, 32, "Text", CellTags->"BlochPlotColors::usage"]}, "BlochPlotEndPoints::usage"->{ - Cell[95306, 2389, 381, 9, 32, "Text", + Cell[105448, 2689, 381, 9, 32, "Text", CellTags->"BlochPlotEndPoints::usage"]}, "BlochPlotJoined::usage"->{ - Cell[95690, 2400, 616, 21, 53, "Text", + Cell[105832, 2700, 616, 21, 53, "Text", CellTags->"BlochPlotJoined::usage"]}, "BlochPlotLabels::usage"->{ - Cell[96309, 2423, 364, 10, 32, "Text", + Cell[106451, 2723, 364, 10, 32, "Text", CellTags->"BlochPlotLabels::usage"]}, "BlochPlot2D::usage"->{ - Cell[960631, 18525, 342, 10, 32, "Text", + Cell[970773, 18825, 342, 10, 31, "Text", CellTags->"BlochPlot2D::usage"]}, "ListBlochPlot2D::usage"->{ - Cell[965276, 18657, 408, 9, 32, "Text", + Cell[975418, 18957, 408, 9, 31, "Text", CellTags->"ListBlochPlot2D::usage"]}, "EigensystemForm::usage"->{ - Cell[1066733, 21227, 430, 13, 32, "Text", + Cell[1076875, 21527, 430, 13, 32, "Text", CellTags->"EigensystemForm::usage"]}, "FourierListPlot::usage"->{ - Cell[1071375, 21374, 1117, 31, 74, "Text", + Cell[1081517, 21674, 1117, 31, 74, "Text", CellTags->"FourierListPlot::usage"]} } *) (*CellTagsIndex CellTagsIndex->{ - {"ComplexMatrixPlot::usage", 1144383, 22997}, - {"BlockForm::usage", 1144487, 23000}, - {"MatrixListForm::usage", 1144592, 23003}, - {"BlochPlot::usage", 1144696, 23006}, - {"BlochPlotColors::usage", 1144805, 23009}, - {"BlochPlotEndPoints::usage", 1144919, 23012}, - {"BlochPlotJoined::usage", 1145032, 23015}, - {"BlochPlotLabels::usage", 1145143, 23018}, - {"BlochPlot2D::usage", 1145250, 23021}, - {"ListBlochPlot2D::usage", 1145359, 23024}, - {"EigensystemForm::usage", 1145471, 23027}, - {"FourierListPlot::usage", 1145585, 23030} + {"ComplexMatrixPlot::usage", 1154528, 23297}, + {"BlockForm::usage", 1154633, 23300}, + {"MatrixListForm::usage", 1154738, 23303}, + {"HintonPlot::usage", 1154843, 23306}, + {"ComplexHintonPlot::usage", 1154951, 23309}, + {"BlochPlot::usage", 1155058, 23312}, + {"BlochPlotColors::usage", 1155167, 23315}, + {"BlochPlotEndPoints::usage", 1155282, 23318}, + {"BlochPlotJoined::usage", 1155396, 23321}, + {"BlochPlotLabels::usage", 1155508, 23324}, + {"BlochPlot2D::usage", 1155616, 23327}, + {"ListBlochPlot2D::usage", 1155725, 23330}, + {"EigensystemForm::usage", 1155837, 23333}, + {"FourierListPlot::usage", 1155951, 23336} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ -Cell[580, 22, 211, 3, 66, "Chapter"], +Cell[580, 22, 211, 3, 64, "Chapter"], Cell[CellGroupData[{ -Cell[816, 29, 240, 3, 44, "Subsection"], -Cell[1059, 34, 194, 3, 32, "Input"], -Cell[1256, 39, 182, 4, 31, "Text"], -Cell[1441, 45, 395, 7, 77, "Input"] -}, Closed]], +Cell[816, 29, 240, 3, 43, "Subsection"], +Cell[1059, 34, 194, 3, 31, "Input"], +Cell[1256, 39, 182, 4, 30, "Text"], +Cell[1441, 45, 527, 9, 92, "Input"] +}, Open ]], Cell[CellGroupData[{ -Cell[1873, 57, 101, 1, 36, "Subsection"], -Cell[1977, 60, 531, 12, 39, "Output"] +Cell[2005, 59, 101, 1, 43, "Subsection"], +Cell[2109, 62, 531, 12, 39, "Output"] }, Closed]], Cell[CellGroupData[{ -Cell[2545, 77, 110, 1, 51, "Section"], -Cell[2658, 80, 166, 3, 31, "Text"] +Cell[2677, 79, 110, 1, 49, "Section"], +Cell[2790, 82, 166, 3, 30, "Text"] }, Open ]], Cell[CellGroupData[{ -Cell[2861, 88, 240, 3, 65, "Section"], +Cell[2993, 90, 240, 3, 63, "Section"], Cell[CellGroupData[{ -Cell[3126, 95, 155, 2, 45, "Subsection"], -Cell[3284, 99, 794, 19, 52, "Text", +Cell[3258, 97, 155, 2, 43, "Subsection"], +Cell[3416, 101, 794, 19, 50, "Text", CellTags->"ComplexMatrixPlot::usage"], Cell[CellGroupData[{ -Cell[4103, 122, 98, 1, 35, "Subsubsection"], -Cell[4204, 125, 260, 7, 31, "Text"], -Cell[4467, 134, 30860, 675, 2833, "Text"] +Cell[4235, 124, 98, 1, 34, "Subsubsection"], +Cell[4336, 127, 260, 7, 31, "Text"], +Cell[4599, 136, 30860, 675, 2613, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[35364, 814, 151, 2, 29, "Subsubsection"], -Cell[35518, 818, 158, 3, 31, "Text"], +Cell[35496, 816, 151, 2, 28, "Subsubsection"], +Cell[35650, 820, 158, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[35701, 825, 322, 10, 32, "Input"], -Cell[36026, 837, 21240, 501, 296, "Output"] +Cell[35833, 827, 322, 10, 32, "Input"], +Cell[36158, 839, 21240, 501, 296, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[57315, 1344, 102, 1, 29, "Subsubsection"], -Cell[57420, 1347, 166, 3, 31, "Text"], +Cell[57447, 1346, 102, 1, 28, "Subsubsection"], +Cell[57552, 1349, 166, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[57611, 1354, 809, 25, 32, "Input"], -Cell[58423, 1381, 15057, 338, 297, "Output"] +Cell[57743, 1356, 809, 25, 32, "Input"], +Cell[58555, 1383, 15057, 338, 297, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[73541, 1726, 148, 2, 44, "Subsection"], -Cell[73692, 1730, 1392, 51, 53, "Text", +Cell[73673, 1728, 148, 2, 43, "Subsection"], +Cell[73824, 1732, 1392, 51, 51, "Text", CellTags->"BlockForm::usage"], Cell[CellGroupData[{ -Cell[75109, 1785, 100, 1, 35, "Subsubsection"], +Cell[75241, 1787, 100, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[75234, 1790, 308, 9, 32, "Input"], -Cell[75545, 1801, 2398, 55, 116, "Output"] +Cell[75366, 1792, 308, 9, 32, "Input"], +Cell[75677, 1803, 2398, 55, 116, "Output"] }, Open ]], Cell[CellGroupData[{ -Cell[77980, 1861, 343, 10, 32, "Input"], -Cell[78326, 1873, 2400, 56, 116, "Output"] +Cell[78112, 1863, 343, 10, 32, "Input"], +Cell[78458, 1875, 2400, 56, 116, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[80787, 1936, 104, 1, 44, "Subsection"], -Cell[80894, 1939, 631, 21, 32, "Text", +Cell[80919, 1938, 104, 1, 43, "Subsection"], +Cell[81026, 1941, 631, 21, 31, "Text", CellTags->"MatrixListForm::usage"], Cell[CellGroupData[{ -Cell[81550, 1964, 98, 1, 35, "Subsubsection"], +Cell[81682, 1966, 98, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[81673, 1969, 285, 8, 32, "Input"], -Cell[81961, 1979, 1272, 27, 80, "Output"] +Cell[81805, 1971, 285, 8, 31, "Input"], +Cell[82093, 1981, 1272, 27, 72, "Output"] }, Open ]] }, Closed]] +}, Open ]], +Cell[CellGroupData[{ +Cell[83426, 2015, 151, 2, 43, "Subsection"], +Cell[83580, 2019, 727, 18, 50, "Text", + CellTags->"HintonPlot::usage"], +Cell[CellGroupData[{ +Cell[84332, 2041, 98, 1, 34, "Subsubsection"], +Cell[CellGroupData[{ +Cell[84455, 2046, 426, 11, 31, "Input"], +Cell[84884, 2059, 2493, 53, 374, "Output"] +}, Open ]] +}, Open ]] +}, Open ]], +Cell[CellGroupData[{ +Cell[87438, 2119, 209, 3, 43, "Subsection"], +Cell[87650, 2124, 724, 21, 31, "Text", + CellTags->"ComplexHintonPlot::usage"], +Cell[CellGroupData[{ +Cell[88399, 2149, 98, 1, 34, "Subsubsection"], +Cell[CellGroupData[{ +Cell[88522, 2154, 955, 24, 31, "Input"], +Cell[89480, 2180, 3895, 126, 369, "Output"] +}, Open ]] +}, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[83306, 2014, 98, 1, 65, "Section"], +Cell[93448, 2314, 98, 1, 63, "Section"], Cell[CellGroupData[{ -Cell[83429, 2019, 97, 1, 44, "Subsection"], -Cell[83529, 2022, 11215, 347, 414, "Text", +Cell[93571, 2319, 97, 1, 43, "Subsection"], +Cell[93671, 2322, 11215, 347, 403, "Text", CellTags->"BlochPlot::usage"], Cell[CellGroupData[{ -Cell[94769, 2373, 98, 1, 35, "Subsubsection"], -Cell[94870, 2376, 433, 11, 32, "Text", +Cell[104911, 2673, 98, 1, 34, "Subsubsection"], +Cell[105012, 2676, 433, 11, 32, "Text", CellTags->"BlochPlotColors::usage"], -Cell[95306, 2389, 381, 9, 32, "Text", +Cell[105448, 2689, 381, 9, 32, "Text", CellTags->"BlochPlotEndPoints::usage"], -Cell[95690, 2400, 616, 21, 53, "Text", +Cell[105832, 2700, 616, 21, 53, "Text", CellTags->"BlochPlotJoined::usage"], -Cell[96309, 2423, 364, 10, 32, "Text", +Cell[106451, 2723, 364, 10, 32, "Text", CellTags->"BlochPlotLabels::usage"], -Cell[96676, 2435, 37221, 832, 3813, "Text"] +Cell[106818, 2735, 37221, 832, 3813, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[133934, 3272, 102, 1, 29, "Subsubsection"], -Cell[134039, 3275, 247, 5, 31, "Text"], +Cell[144076, 3572, 102, 1, 28, "Subsubsection"], +Cell[144181, 3575, 247, 5, 31, "Text"], Cell[CellGroupData[{ -Cell[134311, 3284, 447, 11, 32, "Input"], -Cell[134761, 3297, 24349, 417, 375, "Output"] +Cell[144453, 3584, 447, 11, 32, "Input"], +Cell[144903, 3597, 24349, 417, 375, "Output"] }, Open ]], -Cell[159125, 3717, 176, 4, 31, "Text"], +Cell[169267, 4017, 176, 4, 31, "Text"], Cell[CellGroupData[{ -Cell[159326, 3725, 662, 20, 32, "Input"], -Cell[159991, 3747, 30355, 557, 377, "Output"] +Cell[169468, 4025, 662, 20, 32, "Input"], +Cell[170133, 4047, 30355, 557, 377, "Output"] }, Open ]], -Cell[190361, 4307, 193, 4, 31, "Text"], +Cell[200503, 4607, 193, 4, 31, "Text"], Cell[CellGroupData[{ -Cell[190579, 4315, 973, 29, 32, "Input"], -Cell[191555, 4346, 36997, 693, 377, "Output"] +Cell[200721, 4615, 973, 29, 32, "Input"], +Cell[201697, 4646, 36997, 693, 377, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[228601, 5045, 102, 1, 29, "Subsubsection"], +Cell[238743, 5345, 102, 1, 28, "Subsubsection"], Cell[CellGroupData[{ -Cell[228728, 5050, 831, 19, 32, "Input"], -Cell[229562, 5071, 68583, 1303, 367, "Output"] +Cell[238870, 5350, 831, 19, 32, "Input"], +Cell[239704, 5371, 68583, 1303, 367, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[298194, 6380, 147, 2, 29, "Subsubsection"], -Cell[298344, 6384, 176, 2, 31, "Text"], -Cell[298523, 6388, 945, 27, 55, "Input"], -Cell[299471, 6417, 159, 3, 31, "Text"], +Cell[308336, 6680, 147, 2, 28, "Subsubsection"], +Cell[308486, 6684, 176, 2, 31, "Text"], +Cell[308665, 6688, 945, 27, 55, "Input"], +Cell[309613, 6717, 159, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[299655, 6424, 1082, 22, 121, "Input"], -Cell[300740, 6448, 182234, 3316, 367, "Output"] +Cell[309797, 6724, 1082, 22, 121, "Input"], +Cell[310882, 6748, 182234, 3316, 367, "Output"] }, Open ]], -Cell[482989, 9767, 112, 1, 30, "Text"], +Cell[493131, 10067, 112, 1, 30, "Text"], Cell[CellGroupData[{ -Cell[483126, 9772, 966, 24, 143, "Input"], -Cell[484095, 9798, 155276, 2987, 367, "Output"] +Cell[493268, 10072, 966, 24, 143, "Input"], +Cell[494237, 10098, 155276, 2987, 367, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[639420, 12791, 202, 3, 29, "Subsubsection"], -Cell[639625, 12796, 165, 3, 31, "Text"], +Cell[649562, 13091, 202, 3, 28, "Subsubsection"], +Cell[649767, 13096, 165, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[639815, 12803, 1333, 33, 121, "Input"], -Cell[641151, 12838, 134069, 2293, 217, "Output"] +Cell[649957, 13103, 1333, 33, 121, "Input"], +Cell[651293, 13138, 134069, 2293, 217, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[775269, 15137, 300, 4, 29, "Subsubsection"], -Cell[775572, 15143, 285, 6, 32, "Text"], +Cell[785411, 15437, 300, 4, 28, "Subsubsection"], +Cell[785714, 15443, 285, 6, 32, "Text"], Cell[CellGroupData[{ -Cell[775882, 15153, 1867, 42, 209, "Input"], -Cell[777752, 15197, 182716, 3318, 367, "Output"] +Cell[786024, 15453, 1867, 42, 209, "Input"], +Cell[787894, 15497, 182716, 3318, 367, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[960529, 18522, 99, 1, 44, "Subsection"], -Cell[960631, 18525, 342, 10, 32, "Text", +Cell[970671, 18822, 99, 1, 43, "Subsection"], +Cell[970773, 18825, 342, 10, 31, "Text", CellTags->"BlochPlot2D::usage"], Cell[CellGroupData[{ -Cell[960998, 18539, 100, 1, 35, "Subsubsection"], +Cell[971140, 18839, 100, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[961123, 18544, 815, 28, 32, "Input"], -Cell[961941, 18574, 3166, 73, 213, "Output"] +Cell[971265, 18844, 815, 28, 32, "Input"], +Cell[972083, 18874, 3166, 73, 213, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[965168, 18654, 105, 1, 44, "Subsection"], -Cell[965276, 18657, 408, 9, 32, "Text", +Cell[975310, 18954, 105, 1, 43, "Subsection"], +Cell[975418, 18957, 408, 9, 31, "Text", CellTags->"ListBlochPlot2D::usage"], Cell[CellGroupData[{ -Cell[965709, 18670, 98, 1, 35, "Subsubsection"], +Cell[975851, 18970, 98, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[965832, 18675, 461, 14, 51, "Input"], -Cell[966296, 18691, 100134, 2520, 213, "Output"] +Cell[975974, 18975, 461, 14, 51, "Input"], +Cell[976438, 18991, 100134, 2520, 213, "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[1066503, 21219, 99, 1, 65, "Section"], +Cell[1076645, 21519, 99, 1, 65, "Section"], Cell[CellGroupData[{ -Cell[1066627, 21224, 103, 1, 45, "Subsection"], -Cell[1066733, 21227, 430, 13, 32, "Text", +Cell[1076769, 21524, 103, 1, 45, "Subsection"], +Cell[1076875, 21527, 430, 13, 32, "Text", CellTags->"EigensystemForm::usage"], Cell[CellGroupData[{ -Cell[1067188, 21244, 97, 1, 35, "Subsubsection"], +Cell[1077330, 21544, 97, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[1067310, 21249, 203, 5, 32, "Input"], -Cell[1067516, 21256, 3298, 98, 114, "Output"] +Cell[1077452, 21549, 203, 5, 32, "Input"], +Cell[1077658, 21556, 3298, 98, 114, "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[1070887, 21362, 308, 4, 65, "Section"], +Cell[1081029, 21662, 308, 4, 65, "Section"], Cell[CellGroupData[{ -Cell[1071220, 21370, 152, 2, 44, "Subsection"], -Cell[1071375, 21374, 1117, 31, 74, "Text", +Cell[1081362, 21670, 152, 2, 44, "Subsection"], +Cell[1081517, 21674, 1117, 31, 74, "Text", CellTags->"FourierListPlot::usage"], Cell[CellGroupData[{ -Cell[1072517, 21409, 100, 1, 35, "Subsubsection"], -Cell[1072620, 21412, 164, 5, 31, "Text"], -Cell[1072787, 21419, 24844, 547, 2297, "Text"] +Cell[1082659, 21709, 100, 1, 35, "Subsubsection"], +Cell[1082762, 21712, 164, 5, 31, "Text"], +Cell[1082929, 21719, 24844, 547, 2297, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[1097668, 21971, 204, 3, 29, "Subsubsection"], -Cell[1097875, 21976, 181, 4, 31, "Text"], -Cell[1098059, 21982, 817, 24, 32, "Input"], +Cell[1107810, 22271, 204, 3, 29, "Subsubsection"], +Cell[1108017, 22276, 181, 4, 31, "Text"], +Cell[1108201, 22282, 817, 24, 32, "Input"], Cell[CellGroupData[{ -Cell[1098901, 22010, 517, 13, 32, "Input"], -Cell[1099421, 22025, 4138, 78, 238, "Output"] +Cell[1109043, 22310, 517, 13, 32, "Input"], +Cell[1109563, 22325, 4138, 78, 238, "Output"] }, Open ]], Cell[CellGroupData[{ -Cell[1103596, 22108, 668, 16, 55, "Input"], -Cell[1104267, 22126, 19551, 392, 245, "Output"] +Cell[1113738, 22408, 668, 16, 55, "Input"], +Cell[1114409, 22426, 19551, 392, 245, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[1123867, 22524, 159, 2, 29, "Subsubsection"], -Cell[1124029, 22528, 132, 1, 31, "Text"], -Cell[1124164, 22531, 1243, 39, 55, "Input"], +Cell[1134009, 22824, 159, 2, 29, "Subsubsection"], +Cell[1134171, 22828, 132, 1, 31, "Text"], +Cell[1134306, 22831, 1243, 39, 55, "Input"], Cell[CellGroupData[{ -Cell[1125432, 22574, 510, 13, 32, "Input"], -Cell[1125945, 22589, 14182, 287, 242, "Output"] +Cell[1135574, 22874, 510, 13, 32, "Input"], +Cell[1136087, 22889, 14182, 287, 242, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[1140176, 22882, 158, 2, 29, "Subsubsection"], -Cell[1140337, 22886, 186, 5, 32, "Text"], -Cell[1140526, 22893, 702, 22, 32, "Input"], +Cell[1150318, 23182, 158, 2, 29, "Subsubsection"], +Cell[1150479, 23186, 186, 5, 32, "Text"], +Cell[1150668, 23193, 702, 22, 32, "Input"], Cell[CellGroupData[{ -Cell[1141253, 22919, 426, 11, 32, "Input"], -Cell[1141682, 22932, 2330, 48, 233, "Output"] +Cell[1151395, 23219, 426, 11, 32, "Input"], +Cell[1151824, 23232, 2330, 48, 233, "Output"] }, Open ]] }, Closed]] }, Open ]] diff --git a/src/Visualization.m b/src/Visualization.m index 4ad6c98..96fac65 100644 --- a/src/Visualization.m +++ b/src/Visualization.m @@ -22,8 +22,8 @@ (*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*) -(* ::Subsection::Closed:: *) -(*Preample*) +(* ::Subsection:: *) +(*Preamble*) BeginPackage["Visualization`",{"QUDoc`"}]; @@ -36,6 +36,7 @@ Needs["QUDevTools`"]; Needs["Predicates`"]; Needs["Tensor`"]; +Needs["QuantumChannel`"]; $VisualizationUsages = LoadUsages[FileNameJoin[{$QUDocumentationPath, "api-doc", "Visualization.nb"}]]; @@ -45,16 +46,17 @@ (*Usage Declaration*) -(* ::Subsection::Closed:: *) +(* ::Subsection:: *) (*Matrices*) -Unprotect[ComplexMatrixPlot,BlockForm,MatrixListForm]; +Unprotect[ComplexMatrixPlot,BlockForm,MatrixListForm, HintonPlot]; AssignUsage[ComplexMatrixPlot,$VisualizationUsages]; AssignUsage[BlockForm,$VisualizationUsages]; AssignUsage[MatrixListForm,$VisualizationUsages]; +AssignUsage[{Gap, HintonPlot, ChannelHintonPlot}, $VisualizationUsages]; (* ::Subsection::Closed:: *) @@ -108,7 +110,7 @@ Begin["`Private`"]; -(* ::Subsection::Closed:: *) +(* ::Subsection:: *) (*Matrices*) @@ -147,6 +149,64 @@ MatrixListForm[mats_]:=Row[Riffle[MatrixForm/@mats,","]] +Options[HintonPlot] = { + AxesLabel -> None, + Gap -> 0.05 +}; + + +HintonPlot[dat_,OptionsPattern[]] := With[{data=Reverse[dat\[Transpose],{2}]},With[{n=Dimensions[data][[1]],m=Dimensions[data][[2]],normdata=(1-OptionValue[Gap])data/Max[Abs[data]],graydata=Map[GrayLevel,(Sign[data]+1)/2,{2}]}, + Module[{plot}, + plot = Graphics[ + {GrayLevel[1/2],Rectangle[{1/4,1/4},{n+3/4,m+3/4}]}~Join~ + Table[ + { + graydata[[i,j]], + Tooltip[Rectangle[ + {i-normdata[[i,j]]/2,j-normdata[[i,j]]/2}, + {i+normdata[[i,j]]/2,j+normdata[[i,j]]/2} + ], data[[i,j]]] + }, + {i,n}, {j,m} + ] + ]; + + If[OptionValue[AxesLabel]=!=None, + plot[[1]]=Join[ + plot[[1]], + Table[ + Text[OptionValue[AxesLabel][[1,i]],{i,m+3/4},{0,-2}], + {i,n} + ], + Table[ + Text[Reverse[OptionValue[AxesLabel][[2]]][[j]],{0,j},{1,0}], + {j,m} + ] + ]; + ]; + plot + ] +]]; + + +(* Not exposed by intention. *) +PauliLabels[nq_] := Table[ + StringJoin@@(Reverse[IntegerDigits[i,4,nq]]/.{ + 0->"I",1->"X",2->"Y",3->"Z" + }), + {i,0,4^nq-1} +]; + + +ChannelHintonPlot[chan_]:=With[{ + mtx=First@Super[chan,Basis->"Pauli"], + nqIn=Log2 @ InputDim@ chan, + nqOut=Log2 @ OutputDim @ chan + }, + HintonPlot[mtx,AxesLabel->PauliLabels/@{nqOut,nqIn}] +] + + (* ::Subsection::Closed:: *) (*Bloch Plots*) @@ -459,7 +519,7 @@ Protect[ComplexMatrixPlot,BlockForm,MatrixListForm]; -Protect[BlochPlot,BlochPlot2D,ListBlochPlot2D,BlochPlotColors,BlochPlotEndPoints,BlochPlotJoined,BlochPlotLabels]; +Protect[BlochPlot,BlochPlot2D,ListBlochPlot2D,BlochPlotColors,BlochPlotEndPoints,BlochPlotJoined,BlochPlotLabels,HintonPlot]; Protect[EigensystemForm]; Protect[FourierListPlot]; From 3ebd4bf85f1d1557a1182fda84fa46c9627a7fb7 Mon Sep 17 00:00:00 2001 From: Ian Hincks Date: Wed, 15 Apr 2015 11:07:03 -0400 Subject: [PATCH 2/7] Closed example subsections. --- doc/api-doc/Visualization.nb | 323 ++++++++++++++++++----------------- 1 file changed, 162 insertions(+), 161 deletions(-) diff --git a/doc/api-doc/Visualization.nb b/doc/api-doc/Visualization.nb index ab690f3..97972e6 100644 --- a/doc/api-doc/Visualization.nb +++ b/doc/api-doc/Visualization.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] -NotebookDataLength[ 1164469, 23614] -NotebookOptionsPosition[ 1154218, 23287] -NotebookOutlinePosition[ 1156719, 23360] -CellTagsIndexPosition[ 1156060, 23342] +NotebookDataLength[ 1164511, 23615] +NotebookOptionsPosition[ 1154267, 23288] +NotebookOutlinePosition[ 1156761, 23361] +CellTagsIndexPosition[ 1156102, 23343] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -78,7 +78,8 @@ Cell[BoxData[ Cell[CellGroupData[{ Cell["Introduction and Overview", "Section", - CellChangeTimes->{{3.633351563673402*^9, 3.633351567143589*^9}}], + CellChangeTimes->{{3.633351563673402*^9, 3.633351567143589*^9}, { + 3.638099193036283*^9, 3.638099193130165*^9}}], Cell["\<\ This package provides tools for visualizing and plotting various quantities.\ @@ -2112,7 +2113,7 @@ Cell[BoxData[ CellChangeTimes->{ 3.6380863115981035`*^9, {3.6380863435894413`*^9, 3.6380863575614223`*^9}}] }, Open ]] -}, Open ]] +}, Closed]] }, Open ]], Cell[CellGroupData[{ @@ -2306,7 +2307,7 @@ Cell[BoxData[ 3.6380865064834986`*^9, 3.6380865189223175`*^9}, {3.638086588422076*^9, 3.6380865968948555`*^9}, {3.638086646857444*^9, 3.638086669299281*^9}}] }, Open ]] -}, Open ]] +}, Closed]] }, Open ]] }, Open ]], @@ -23286,8 +23287,8 @@ ez+CUF9ulzbTTPMhCILDeZ6Cv+l+yoJQOu8YcP0MO38QmqPS7idconrMbqhK }, Open ]] }, WindowSize->{1440, 880}, -WindowMargins->{{-8, Automatic}, {Automatic, -8}}, -FrontEndVersion->"10.1 for Microsoft Windows (64-bit) (March 23, 2015)", +WindowMargins->{{-10, Automatic}, {Automatic, -10}}, +FrontEndVersion->"10.0 for Linux x86 (64-bit) (June 27, 2014)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) @@ -23296,321 +23297,321 @@ StyleDefinitions->"Default.nb" (*CellTagsOutline CellTagsIndex->{ "ComplexMatrixPlot::usage"->{ - Cell[3416, 101, 794, 19, 50, "Text", + Cell[3465, 102, 794, 19, 52, "Text", CellTags->"ComplexMatrixPlot::usage"]}, "BlockForm::usage"->{ - Cell[73824, 1732, 1392, 51, 51, "Text", + Cell[73873, 1733, 1392, 51, 53, "Text", CellTags->"BlockForm::usage"]}, "MatrixListForm::usage"->{ - Cell[81026, 1941, 631, 21, 31, "Text", + Cell[81075, 1942, 631, 21, 32, "Text", CellTags->"MatrixListForm::usage"]}, "HintonPlot::usage"->{ - Cell[83580, 2019, 727, 18, 50, "Text", + Cell[83629, 2020, 727, 18, 52, "Text", CellTags->"HintonPlot::usage"]}, "ComplexHintonPlot::usage"->{ - Cell[87650, 2124, 724, 21, 31, "Text", + Cell[87699, 2125, 724, 21, 32, "Text", CellTags->"ComplexHintonPlot::usage"]}, "BlochPlot::usage"->{ - Cell[93671, 2322, 11215, 347, 403, "Text", + Cell[93720, 2323, 11215, 347, 414, "Text", CellTags->"BlochPlot::usage"]}, "BlochPlotColors::usage"->{ - Cell[105012, 2676, 433, 11, 32, "Text", + Cell[105061, 2677, 433, 11, 32, "Text", CellTags->"BlochPlotColors::usage"]}, "BlochPlotEndPoints::usage"->{ - Cell[105448, 2689, 381, 9, 32, "Text", + Cell[105497, 2690, 381, 9, 32, "Text", CellTags->"BlochPlotEndPoints::usage"]}, "BlochPlotJoined::usage"->{ - Cell[105832, 2700, 616, 21, 53, "Text", + Cell[105881, 2701, 616, 21, 53, "Text", CellTags->"BlochPlotJoined::usage"]}, "BlochPlotLabels::usage"->{ - Cell[106451, 2723, 364, 10, 32, "Text", + Cell[106500, 2724, 364, 10, 32, "Text", CellTags->"BlochPlotLabels::usage"]}, "BlochPlot2D::usage"->{ - Cell[970773, 18825, 342, 10, 31, "Text", + Cell[970822, 18826, 342, 10, 32, "Text", CellTags->"BlochPlot2D::usage"]}, "ListBlochPlot2D::usage"->{ - Cell[975418, 18957, 408, 9, 31, "Text", + Cell[975467, 18958, 408, 9, 32, "Text", CellTags->"ListBlochPlot2D::usage"]}, "EigensystemForm::usage"->{ - Cell[1076875, 21527, 430, 13, 32, "Text", + Cell[1076924, 21528, 430, 13, 32, "Text", CellTags->"EigensystemForm::usage"]}, "FourierListPlot::usage"->{ - Cell[1081517, 21674, 1117, 31, 74, "Text", + Cell[1081566, 21675, 1117, 31, 74, "Text", CellTags->"FourierListPlot::usage"]} } *) (*CellTagsIndex CellTagsIndex->{ - {"ComplexMatrixPlot::usage", 1154528, 23297}, - {"BlockForm::usage", 1154633, 23300}, - {"MatrixListForm::usage", 1154738, 23303}, - {"HintonPlot::usage", 1154843, 23306}, - {"ComplexHintonPlot::usage", 1154951, 23309}, - {"BlochPlot::usage", 1155058, 23312}, - {"BlochPlotColors::usage", 1155167, 23315}, - {"BlochPlotEndPoints::usage", 1155282, 23318}, - {"BlochPlotJoined::usage", 1155396, 23321}, - {"BlochPlotLabels::usage", 1155508, 23324}, - {"BlochPlot2D::usage", 1155616, 23327}, - {"ListBlochPlot2D::usage", 1155725, 23330}, - {"EigensystemForm::usage", 1155837, 23333}, - {"FourierListPlot::usage", 1155951, 23336} + {"ComplexMatrixPlot::usage", 1154570, 23298}, + {"BlockForm::usage", 1154675, 23301}, + {"MatrixListForm::usage", 1154780, 23304}, + {"HintonPlot::usage", 1154885, 23307}, + {"ComplexHintonPlot::usage", 1154993, 23310}, + {"BlochPlot::usage", 1155100, 23313}, + {"BlochPlotColors::usage", 1155209, 23316}, + {"BlochPlotEndPoints::usage", 1155324, 23319}, + {"BlochPlotJoined::usage", 1155438, 23322}, + {"BlochPlotLabels::usage", 1155550, 23325}, + {"BlochPlot2D::usage", 1155658, 23328}, + {"ListBlochPlot2D::usage", 1155767, 23331}, + {"EigensystemForm::usage", 1155879, 23334}, + {"FourierListPlot::usage", 1155993, 23337} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ -Cell[580, 22, 211, 3, 64, "Chapter"], +Cell[580, 22, 211, 3, 66, "Chapter"], Cell[CellGroupData[{ -Cell[816, 29, 240, 3, 43, "Subsection"], -Cell[1059, 34, 194, 3, 31, "Input"], -Cell[1256, 39, 182, 4, 30, "Text"], -Cell[1441, 45, 527, 9, 92, "Input"] +Cell[816, 29, 240, 3, 44, "Subsection"], +Cell[1059, 34, 194, 3, 32, "Input"], +Cell[1256, 39, 182, 4, 31, "Text"], +Cell[1441, 45, 527, 9, 99, "Input"] }, Open ]], Cell[CellGroupData[{ -Cell[2005, 59, 101, 1, 43, "Subsection"], +Cell[2005, 59, 101, 1, 44, "Subsection"], Cell[2109, 62, 531, 12, 39, "Output"] }, Closed]], Cell[CellGroupData[{ -Cell[2677, 79, 110, 1, 49, "Section"], -Cell[2790, 82, 166, 3, 30, "Text"] +Cell[2677, 79, 159, 2, 51, "Section"], +Cell[2839, 83, 166, 3, 31, "Text"] }, Open ]], Cell[CellGroupData[{ -Cell[2993, 90, 240, 3, 63, "Section"], +Cell[3042, 91, 240, 3, 65, "Section"], Cell[CellGroupData[{ -Cell[3258, 97, 155, 2, 43, "Subsection"], -Cell[3416, 101, 794, 19, 50, "Text", +Cell[3307, 98, 155, 2, 45, "Subsection"], +Cell[3465, 102, 794, 19, 52, "Text", CellTags->"ComplexMatrixPlot::usage"], Cell[CellGroupData[{ -Cell[4235, 124, 98, 1, 34, "Subsubsection"], -Cell[4336, 127, 260, 7, 31, "Text"], -Cell[4599, 136, 30860, 675, 2613, "Text"] +Cell[4284, 125, 98, 1, 35, "Subsubsection"], +Cell[4385, 128, 260, 7, 31, "Text"], +Cell[4648, 137, 30860, 675, 2613, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[35496, 816, 151, 2, 28, "Subsubsection"], -Cell[35650, 820, 158, 3, 31, "Text"], +Cell[35545, 817, 151, 2, 29, "Subsubsection"], +Cell[35699, 821, 158, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[35833, 827, 322, 10, 32, "Input"], -Cell[36158, 839, 21240, 501, 296, "Output"] +Cell[35882, 828, 322, 10, 32, "Input"], +Cell[36207, 840, 21240, 501, 296, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[57447, 1346, 102, 1, 28, "Subsubsection"], -Cell[57552, 1349, 166, 3, 31, "Text"], +Cell[57496, 1347, 102, 1, 29, "Subsubsection"], +Cell[57601, 1350, 166, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[57743, 1356, 809, 25, 32, "Input"], -Cell[58555, 1383, 15057, 338, 297, "Output"] +Cell[57792, 1357, 809, 25, 32, "Input"], +Cell[58604, 1384, 15057, 338, 297, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[73673, 1728, 148, 2, 43, "Subsection"], -Cell[73824, 1732, 1392, 51, 51, "Text", +Cell[73722, 1729, 148, 2, 44, "Subsection"], +Cell[73873, 1733, 1392, 51, 53, "Text", CellTags->"BlockForm::usage"], Cell[CellGroupData[{ -Cell[75241, 1787, 100, 1, 34, "Subsubsection"], +Cell[75290, 1788, 100, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[75366, 1792, 308, 9, 32, "Input"], -Cell[75677, 1803, 2398, 55, 116, "Output"] +Cell[75415, 1793, 308, 9, 32, "Input"], +Cell[75726, 1804, 2398, 55, 116, "Output"] }, Open ]], Cell[CellGroupData[{ -Cell[78112, 1863, 343, 10, 32, "Input"], -Cell[78458, 1875, 2400, 56, 116, "Output"] +Cell[78161, 1864, 343, 10, 32, "Input"], +Cell[78507, 1876, 2400, 56, 116, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[80919, 1938, 104, 1, 43, "Subsection"], -Cell[81026, 1941, 631, 21, 31, "Text", +Cell[80968, 1939, 104, 1, 44, "Subsection"], +Cell[81075, 1942, 631, 21, 32, "Text", CellTags->"MatrixListForm::usage"], Cell[CellGroupData[{ -Cell[81682, 1966, 98, 1, 34, "Subsubsection"], +Cell[81731, 1967, 98, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[81805, 1971, 285, 8, 31, "Input"], -Cell[82093, 1981, 1272, 27, 72, "Output"] +Cell[81854, 1972, 285, 8, 31, "Input"], +Cell[82142, 1982, 1272, 27, 72, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[83426, 2015, 151, 2, 43, "Subsection"], -Cell[83580, 2019, 727, 18, 50, "Text", +Cell[83475, 2016, 151, 2, 44, "Subsection"], +Cell[83629, 2020, 727, 18, 52, "Text", CellTags->"HintonPlot::usage"], Cell[CellGroupData[{ -Cell[84332, 2041, 98, 1, 34, "Subsubsection"], +Cell[84381, 2042, 98, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[84455, 2046, 426, 11, 31, "Input"], -Cell[84884, 2059, 2493, 53, 374, "Output"] -}, Open ]] +Cell[84504, 2047, 426, 11, 32, "Input"], +Cell[84933, 2060, 2493, 53, 374, "Output"] }, Open ]] +}, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[87438, 2119, 209, 3, 43, "Subsection"], -Cell[87650, 2124, 724, 21, 31, "Text", +Cell[87487, 2120, 209, 3, 44, "Subsection"], +Cell[87699, 2125, 724, 21, 32, "Text", CellTags->"ComplexHintonPlot::usage"], Cell[CellGroupData[{ -Cell[88399, 2149, 98, 1, 34, "Subsubsection"], +Cell[88448, 2150, 98, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[88522, 2154, 955, 24, 31, "Input"], -Cell[89480, 2180, 3895, 126, 369, "Output"] -}, Open ]] +Cell[88571, 2155, 955, 24, 32, "Input"], +Cell[89529, 2181, 3895, 126, 363, "Output"] }, Open ]] +}, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[93448, 2314, 98, 1, 63, "Section"], +Cell[93497, 2315, 98, 1, 65, "Section"], Cell[CellGroupData[{ -Cell[93571, 2319, 97, 1, 43, "Subsection"], -Cell[93671, 2322, 11215, 347, 403, "Text", +Cell[93620, 2320, 97, 1, 44, "Subsection"], +Cell[93720, 2323, 11215, 347, 414, "Text", CellTags->"BlochPlot::usage"], Cell[CellGroupData[{ -Cell[104911, 2673, 98, 1, 34, "Subsubsection"], -Cell[105012, 2676, 433, 11, 32, "Text", +Cell[104960, 2674, 98, 1, 35, "Subsubsection"], +Cell[105061, 2677, 433, 11, 32, "Text", CellTags->"BlochPlotColors::usage"], -Cell[105448, 2689, 381, 9, 32, "Text", +Cell[105497, 2690, 381, 9, 32, "Text", CellTags->"BlochPlotEndPoints::usage"], -Cell[105832, 2700, 616, 21, 53, "Text", +Cell[105881, 2701, 616, 21, 53, "Text", CellTags->"BlochPlotJoined::usage"], -Cell[106451, 2723, 364, 10, 32, "Text", +Cell[106500, 2724, 364, 10, 32, "Text", CellTags->"BlochPlotLabels::usage"], -Cell[106818, 2735, 37221, 832, 3813, "Text"] +Cell[106867, 2736, 37221, 832, 3813, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[144076, 3572, 102, 1, 28, "Subsubsection"], -Cell[144181, 3575, 247, 5, 31, "Text"], +Cell[144125, 3573, 102, 1, 29, "Subsubsection"], +Cell[144230, 3576, 247, 5, 31, "Text"], Cell[CellGroupData[{ -Cell[144453, 3584, 447, 11, 32, "Input"], -Cell[144903, 3597, 24349, 417, 375, "Output"] +Cell[144502, 3585, 447, 11, 32, "Input"], +Cell[144952, 3598, 24349, 417, 375, "Output"] }, Open ]], -Cell[169267, 4017, 176, 4, 31, "Text"], +Cell[169316, 4018, 176, 4, 31, "Text"], Cell[CellGroupData[{ -Cell[169468, 4025, 662, 20, 32, "Input"], -Cell[170133, 4047, 30355, 557, 377, "Output"] +Cell[169517, 4026, 662, 20, 32, "Input"], +Cell[170182, 4048, 30355, 557, 377, "Output"] }, Open ]], -Cell[200503, 4607, 193, 4, 31, "Text"], +Cell[200552, 4608, 193, 4, 31, "Text"], Cell[CellGroupData[{ -Cell[200721, 4615, 973, 29, 32, "Input"], -Cell[201697, 4646, 36997, 693, 377, "Output"] +Cell[200770, 4616, 973, 29, 32, "Input"], +Cell[201746, 4647, 36997, 693, 377, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[238743, 5345, 102, 1, 28, "Subsubsection"], +Cell[238792, 5346, 102, 1, 29, "Subsubsection"], Cell[CellGroupData[{ -Cell[238870, 5350, 831, 19, 32, "Input"], -Cell[239704, 5371, 68583, 1303, 367, "Output"] +Cell[238919, 5351, 831, 19, 32, "Input"], +Cell[239753, 5372, 68583, 1303, 367, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[308336, 6680, 147, 2, 28, "Subsubsection"], -Cell[308486, 6684, 176, 2, 31, "Text"], -Cell[308665, 6688, 945, 27, 55, "Input"], -Cell[309613, 6717, 159, 3, 31, "Text"], +Cell[308385, 6681, 147, 2, 29, "Subsubsection"], +Cell[308535, 6685, 176, 2, 31, "Text"], +Cell[308714, 6689, 945, 27, 55, "Input"], +Cell[309662, 6718, 159, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[309797, 6724, 1082, 22, 121, "Input"], -Cell[310882, 6748, 182234, 3316, 367, "Output"] +Cell[309846, 6725, 1082, 22, 121, "Input"], +Cell[310931, 6749, 182234, 3316, 367, "Output"] }, Open ]], -Cell[493131, 10067, 112, 1, 30, "Text"], +Cell[493180, 10068, 112, 1, 30, "Text"], Cell[CellGroupData[{ -Cell[493268, 10072, 966, 24, 143, "Input"], -Cell[494237, 10098, 155276, 2987, 367, "Output"] +Cell[493317, 10073, 966, 24, 143, "Input"], +Cell[494286, 10099, 155276, 2987, 367, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[649562, 13091, 202, 3, 28, "Subsubsection"], -Cell[649767, 13096, 165, 3, 31, "Text"], +Cell[649611, 13092, 202, 3, 29, "Subsubsection"], +Cell[649816, 13097, 165, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[649957, 13103, 1333, 33, 121, "Input"], -Cell[651293, 13138, 134069, 2293, 217, "Output"] +Cell[650006, 13104, 1333, 33, 121, "Input"], +Cell[651342, 13139, 134069, 2293, 217, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[785411, 15437, 300, 4, 28, "Subsubsection"], -Cell[785714, 15443, 285, 6, 32, "Text"], +Cell[785460, 15438, 300, 4, 29, "Subsubsection"], +Cell[785763, 15444, 285, 6, 32, "Text"], Cell[CellGroupData[{ -Cell[786024, 15453, 1867, 42, 209, "Input"], -Cell[787894, 15497, 182716, 3318, 367, "Output"] +Cell[786073, 15454, 1867, 42, 209, "Input"], +Cell[787943, 15498, 182716, 3318, 367, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[970671, 18822, 99, 1, 43, "Subsection"], -Cell[970773, 18825, 342, 10, 31, "Text", +Cell[970720, 18823, 99, 1, 44, "Subsection"], +Cell[970822, 18826, 342, 10, 32, "Text", CellTags->"BlochPlot2D::usage"], Cell[CellGroupData[{ -Cell[971140, 18839, 100, 1, 34, "Subsubsection"], +Cell[971189, 18840, 100, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[971265, 18844, 815, 28, 32, "Input"], -Cell[972083, 18874, 3166, 73, 213, "Output"] +Cell[971314, 18845, 815, 28, 32, "Input"], +Cell[972132, 18875, 3166, 73, 213, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[975310, 18954, 105, 1, 43, "Subsection"], -Cell[975418, 18957, 408, 9, 31, "Text", +Cell[975359, 18955, 105, 1, 44, "Subsection"], +Cell[975467, 18958, 408, 9, 32, "Text", CellTags->"ListBlochPlot2D::usage"], Cell[CellGroupData[{ -Cell[975851, 18970, 98, 1, 34, "Subsubsection"], +Cell[975900, 18971, 98, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[975974, 18975, 461, 14, 51, "Input"], -Cell[976438, 18991, 100134, 2520, 213, "Output"] +Cell[976023, 18976, 461, 14, 51, "Input"], +Cell[976487, 18992, 100134, 2520, 213, "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[1076645, 21519, 99, 1, 65, "Section"], +Cell[1076694, 21520, 99, 1, 65, "Section"], Cell[CellGroupData[{ -Cell[1076769, 21524, 103, 1, 45, "Subsection"], -Cell[1076875, 21527, 430, 13, 32, "Text", +Cell[1076818, 21525, 103, 1, 45, "Subsection"], +Cell[1076924, 21528, 430, 13, 32, "Text", CellTags->"EigensystemForm::usage"], Cell[CellGroupData[{ -Cell[1077330, 21544, 97, 1, 35, "Subsubsection"], +Cell[1077379, 21545, 97, 1, 35, "Subsubsection"], Cell[CellGroupData[{ -Cell[1077452, 21549, 203, 5, 32, "Input"], -Cell[1077658, 21556, 3298, 98, 114, "Output"] +Cell[1077501, 21550, 203, 5, 32, "Input"], +Cell[1077707, 21557, 3298, 98, 114, "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[1081029, 21662, 308, 4, 65, "Section"], +Cell[1081078, 21663, 308, 4, 65, "Section"], Cell[CellGroupData[{ -Cell[1081362, 21670, 152, 2, 44, "Subsection"], -Cell[1081517, 21674, 1117, 31, 74, "Text", +Cell[1081411, 21671, 152, 2, 44, "Subsection"], +Cell[1081566, 21675, 1117, 31, 74, "Text", CellTags->"FourierListPlot::usage"], Cell[CellGroupData[{ -Cell[1082659, 21709, 100, 1, 35, "Subsubsection"], -Cell[1082762, 21712, 164, 5, 31, "Text"], -Cell[1082929, 21719, 24844, 547, 2297, "Text"] +Cell[1082708, 21710, 100, 1, 35, "Subsubsection"], +Cell[1082811, 21713, 164, 5, 31, "Text"], +Cell[1082978, 21720, 24844, 547, 2297, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[1107810, 22271, 204, 3, 29, "Subsubsection"], -Cell[1108017, 22276, 181, 4, 31, "Text"], -Cell[1108201, 22282, 817, 24, 32, "Input"], +Cell[1107859, 22272, 204, 3, 29, "Subsubsection"], +Cell[1108066, 22277, 181, 4, 31, "Text"], +Cell[1108250, 22283, 817, 24, 32, "Input"], Cell[CellGroupData[{ -Cell[1109043, 22310, 517, 13, 32, "Input"], -Cell[1109563, 22325, 4138, 78, 238, "Output"] +Cell[1109092, 22311, 517, 13, 32, "Input"], +Cell[1109612, 22326, 4138, 78, 238, "Output"] }, Open ]], Cell[CellGroupData[{ -Cell[1113738, 22408, 668, 16, 55, "Input"], -Cell[1114409, 22426, 19551, 392, 245, "Output"] +Cell[1113787, 22409, 668, 16, 55, "Input"], +Cell[1114458, 22427, 19551, 392, 245, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[1134009, 22824, 159, 2, 29, "Subsubsection"], -Cell[1134171, 22828, 132, 1, 31, "Text"], -Cell[1134306, 22831, 1243, 39, 55, "Input"], +Cell[1134058, 22825, 159, 2, 29, "Subsubsection"], +Cell[1134220, 22829, 132, 1, 31, "Text"], +Cell[1134355, 22832, 1243, 39, 55, "Input"], Cell[CellGroupData[{ -Cell[1135574, 22874, 510, 13, 32, "Input"], -Cell[1136087, 22889, 14182, 287, 242, "Output"] +Cell[1135623, 22875, 510, 13, 32, "Input"], +Cell[1136136, 22890, 14182, 287, 242, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[1150318, 23182, 158, 2, 29, "Subsubsection"], -Cell[1150479, 23186, 186, 5, 32, "Text"], -Cell[1150668, 23193, 702, 22, 32, "Input"], +Cell[1150367, 23183, 158, 2, 29, "Subsubsection"], +Cell[1150528, 23187, 186, 5, 32, "Text"], +Cell[1150717, 23194, 702, 22, 32, "Input"], Cell[CellGroupData[{ -Cell[1151395, 23219, 426, 11, 32, "Input"], -Cell[1151824, 23232, 2330, 48, 233, "Output"] +Cell[1151444, 23220, 426, 11, 32, "Input"], +Cell[1151873, 23233, 2330, 48, 233, "Output"] }, Open ]] }, Closed]] }, Open ]] From 82102cb3c6e0fa05a10d2bff713f93fb9a7b9000 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Thu, 16 Apr 2015 14:58:58 +1000 Subject: [PATCH 3/7] Added docs for HintonPlot options. --- doc/api-doc/Visualization.nb | 344 +++++++++++++++++++++-------------- 1 file changed, 206 insertions(+), 138 deletions(-) diff --git a/doc/api-doc/Visualization.nb b/doc/api-doc/Visualization.nb index ab690f3..204c1ce 100644 --- a/doc/api-doc/Visualization.nb +++ b/doc/api-doc/Visualization.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] -NotebookDataLength[ 1164469, 23614] -NotebookOptionsPosition[ 1154218, 23287] -NotebookOutlinePosition[ 1156719, 23360] -CellTagsIndexPosition[ 1156060, 23342] +NotebookDataLength[ 1166710, 23682] +NotebookOptionsPosition[ 1156153, 23345] +NotebookOutlinePosition[ 1158773, 23422] +CellTagsIndexPosition[ 1158081, 23403] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -2039,6 +2039,64 @@ that matrix element, while the color indicates positive (white) and negative \ Cell[CellGroupData[{ +Cell["Options", "Subsubsection", + CellChangeTimes->{{3.6381489367158732`*^9, 3.638148937745573*^9}}], + +Cell[TextData[{ + StyleBox["Gap", "Input"], + " is an option for ", + StyleBox["HintonPlot", "Input"], + " which specifies the gap that should be left between full squares in the \ +plot." +}], "Text", + CellDingbat->"\[FilledSquare]", + CellChangeTimes->{{3.635175894438929*^9, 3.6351759179781713`*^9}, { + 3.6381489455071125`*^9, 3.638148981015304*^9}}, + CellTags->"Gap::usage"], + +Cell[BoxData[GridBox[{ + { + StyleBox["Option", "Text", + FontWeight->Bold], + StyleBox[ + RowBox[{"Default", " ", "Value"}], "Text", + FontWeight->Bold], + StyleBox["Description", "Text", + FontWeight->Bold]}, + {"AxesLabel", "None", + StyleBox[ + RowBox[{ + "AxesLabel", " ", "is", " ", "an", " ", "option", " ", "for", " ", + "graphics", " ", "functions", " ", "that", " ", "specifies", " ", + "labels", " ", "for", " ", + RowBox[{"axes", ".", " "}]}], "Text"]}, + {"Gap", "0.05`", + StyleBox[ + RowBox[{ + TagBox[ + StyleBox["Gap", "Input", + FontFamily->"Courier"], + DisplayForm], " ", "is", " ", "an", " ", "option", " ", "for", " ", + TagBox[ + StyleBox["HintonPlot", "Input", + FontFamily->"Courier"], + DisplayForm], " ", "which", " ", "specifies", " ", "the", " ", "gap", + " ", "that", " ", "should", " ", "be", " ", "left", " ", "between", " ", + "full", " ", "squares", " ", "in", " ", "the", " ", + RowBox[{"plot", "."}]}], "Text"]} + }, + GridBoxAlignment->{"Columns" -> {{Left}}}, + GridBoxDividers->{"Columns" -> {{False}}, "Rows" -> {{True}}}, + GridBoxItemSize->{"Columns" -> {Automatic, Automatic, { + Scaled[0.5]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, + "RowsIndexed" -> {}}]], "Text", + GeneratedCell->True, + CellAutoOverwrite->True, + CellChangeTimes->{3.638149108622855*^9}] +}, Open ]], + +Cell[CellGroupData[{ + Cell["Example", "Subsubsection", CellChangeTimes->{{3.634313799258635*^9, 3.634313800077886*^9}}], @@ -2143,7 +2201,7 @@ Cell[TextData[{ CellChangeTimes->{{3.634313681543186*^9, 3.634313767583549*^9}, { 3.6380861687728405`*^9, 3.638086243363751*^9}, {3.638086320492544*^9, 3.6380863299402494`*^9}, {3.6380863858369284`*^9, 3.6380864553672423`*^9}}, - CellTags->"ComplexHintonPlot::usage"], + CellTags->"ChannelHintonPlot::usage"], Cell[CellGroupData[{ @@ -3566,7 +3624,7 @@ Cell[BoxData[GridBox[{ GeneratedCell->True, CellAutoOverwrite->True, CellChangeTimes->{3.635178011264412*^9}] -}, Closed]], +}, Open ]], Cell[CellGroupData[{ @@ -23286,7 +23344,7 @@ ez+CUF9ulzbTTPMhCILDeZ6Cv+l+yoJQOu8YcP0MO38QmqPS7idconrMbqhK }, Open ]] }, WindowSize->{1440, 880}, -WindowMargins->{{-8, Automatic}, {Automatic, -8}}, +WindowMargins->{{-8, Automatic}, {Automatic, 0}}, FrontEndVersion->"10.1 for Microsoft Windows (64-bit) (March 23, 2015)", StyleDefinitions->"Default.nb" ] @@ -23295,66 +23353,70 @@ StyleDefinitions->"Default.nb" (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ - "ComplexMatrixPlot::usage"->{ - Cell[3416, 101, 794, 19, 50, "Text", - CellTags->"ComplexMatrixPlot::usage"]}, - "BlockForm::usage"->{ - Cell[73824, 1732, 1392, 51, 51, "Text", - CellTags->"BlockForm::usage"]}, - "MatrixListForm::usage"->{ - Cell[81026, 1941, 631, 21, 31, "Text", - CellTags->"MatrixListForm::usage"]}, - "HintonPlot::usage"->{ - Cell[83580, 2019, 727, 18, 50, "Text", - CellTags->"HintonPlot::usage"]}, - "ComplexHintonPlot::usage"->{ - Cell[87650, 2124, 724, 21, 31, "Text", - CellTags->"ComplexHintonPlot::usage"]}, - "BlochPlot::usage"->{ - Cell[93671, 2322, 11215, 347, 403, "Text", - CellTags->"BlochPlot::usage"]}, "BlochPlotColors::usage"->{ - Cell[105012, 2676, 433, 11, 32, "Text", + Cell[106947, 2734, 433, 11, 31, "Text", CellTags->"BlochPlotColors::usage"]}, "BlochPlotEndPoints::usage"->{ - Cell[105448, 2689, 381, 9, 32, "Text", + Cell[107383, 2747, 381, 9, 31, "Text", CellTags->"BlochPlotEndPoints::usage"]}, "BlochPlotJoined::usage"->{ - Cell[105832, 2700, 616, 21, 53, "Text", + Cell[107767, 2758, 616, 21, 51, "Text", CellTags->"BlochPlotJoined::usage"]}, "BlochPlotLabels::usage"->{ - Cell[106451, 2723, 364, 10, 32, "Text", + Cell[108386, 2781, 364, 10, 31, "Text", CellTags->"BlochPlotLabels::usage"]}, + "BlochPlot::usage"->{ + Cell[95606, 2380, 11215, 347, 403, "Text", + CellTags->"BlochPlot::usage"]}, "BlochPlot2D::usage"->{ - Cell[970773, 18825, 342, 10, 31, "Text", + Cell[972708, 18883, 342, 10, 31, "Text", CellTags->"BlochPlot2D::usage"]}, - "ListBlochPlot2D::usage"->{ - Cell[975418, 18957, 408, 9, 31, "Text", - CellTags->"ListBlochPlot2D::usage"]}, + "BlockForm::usage"->{ + Cell[73824, 1732, 1392, 51, 51, "Text", + CellTags->"BlockForm::usage"]}, + "ChannelHintonPlot::usage"->{ + Cell[89585, 2182, 724, 21, 31, "Text", + CellTags->"ChannelHintonPlot::usage"]}, + "ComplexMatrixPlot::usage"->{ + Cell[3416, 101, 794, 19, 50, "Text", + CellTags->"ComplexMatrixPlot::usage"]}, "EigensystemForm::usage"->{ - Cell[1076875, 21527, 430, 13, 32, "Text", + Cell[1078810, 21585, 430, 13, 31, "Text", CellTags->"EigensystemForm::usage"]}, "FourierListPlot::usage"->{ - Cell[1081517, 21674, 1117, 31, 74, "Text", - CellTags->"FourierListPlot::usage"]} + Cell[1083452, 21732, 1117, 31, 71, "Text", + CellTags->"FourierListPlot::usage"]}, + "Gap::usage"->{ + Cell[84435, 2044, 372, 10, 31, "Text", + CellTags->"Gap::usage"]}, + "HintonPlot::usage"->{ + Cell[83580, 2019, 727, 18, 50, "Text", + CellTags->"HintonPlot::usage"]}, + "ListBlochPlot2D::usage"->{ + Cell[977353, 19015, 408, 9, 31, "Text", + CellTags->"ListBlochPlot2D::usage"]}, + "MatrixListForm::usage"->{ + Cell[81026, 1941, 631, 21, 31, "Text", + CellTags->"MatrixListForm::usage"]} } *) (*CellTagsIndex CellTagsIndex->{ - {"ComplexMatrixPlot::usage", 1154528, 23297}, - {"BlockForm::usage", 1154633, 23300}, - {"MatrixListForm::usage", 1154738, 23303}, - {"HintonPlot::usage", 1154843, 23306}, - {"ComplexHintonPlot::usage", 1154951, 23309}, - {"BlochPlot::usage", 1155058, 23312}, - {"BlochPlotColors::usage", 1155167, 23315}, - {"BlochPlotEndPoints::usage", 1155282, 23318}, - {"BlochPlotJoined::usage", 1155396, 23321}, - {"BlochPlotLabels::usage", 1155508, 23324}, - {"BlochPlot2D::usage", 1155616, 23327}, - {"ListBlochPlot2D::usage", 1155725, 23330}, - {"EigensystemForm::usage", 1155837, 23333}, - {"FourierListPlot::usage", 1155951, 23336} + {"BlochPlotColors::usage", 1156460, 23355}, + {"BlochPlotEndPoints::usage", 1156575, 23358}, + {"BlochPlotJoined::usage", 1156689, 23361}, + {"BlochPlotLabels::usage", 1156801, 23364}, + {"BlochPlot::usage", 1156907, 23367}, + {"BlochPlot2D::usage", 1157012, 23370}, + {"BlockForm::usage", 1157115, 23373}, + {"ChannelHintonPlot::usage", 1157223, 23376}, + {"ComplexMatrixPlot::usage", 1157338, 23379}, + {"EigensystemForm::usage", 1157449, 23382}, + {"FourierListPlot::usage", 1157563, 23385}, + {"Gap::usage", 1157666, 23388}, + {"HintonPlot::usage", 1157760, 23391}, + {"ListBlochPlot2D::usage", 1157866, 23394}, + {"MatrixListForm::usage", 1157977, 23397} } *) (*NotebookFileOutline @@ -23436,181 +23498,187 @@ Cell[83426, 2015, 151, 2, 43, "Subsection"], Cell[83580, 2019, 727, 18, 50, "Text", CellTags->"HintonPlot::usage"], Cell[CellGroupData[{ -Cell[84332, 2041, 98, 1, 34, "Subsubsection"], +Cell[84332, 2041, 100, 1, 34, "Subsubsection"], +Cell[84435, 2044, 372, 10, 31, "Text", + CellTags->"Gap::usage"], +Cell[84810, 2056, 1420, 38, 80, "Text"] +}, Open ]], +Cell[CellGroupData[{ +Cell[86267, 2099, 98, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[84455, 2046, 426, 11, 31, "Input"], -Cell[84884, 2059, 2493, 53, 374, "Output"] +Cell[86390, 2104, 426, 11, 31, "Input"], +Cell[86819, 2117, 2493, 53, 374, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[87438, 2119, 209, 3, 43, "Subsection"], -Cell[87650, 2124, 724, 21, 31, "Text", - CellTags->"ComplexHintonPlot::usage"], +Cell[89373, 2177, 209, 3, 43, "Subsection"], +Cell[89585, 2182, 724, 21, 31, "Text", + CellTags->"ChannelHintonPlot::usage"], Cell[CellGroupData[{ -Cell[88399, 2149, 98, 1, 34, "Subsubsection"], +Cell[90334, 2207, 98, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[88522, 2154, 955, 24, 31, "Input"], -Cell[89480, 2180, 3895, 126, 369, "Output"] +Cell[90457, 2212, 955, 24, 31, "Input"], +Cell[91415, 2238, 3895, 126, 369, "Output"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[93448, 2314, 98, 1, 63, "Section"], +Cell[95383, 2372, 98, 1, 63, "Section"], Cell[CellGroupData[{ -Cell[93571, 2319, 97, 1, 43, "Subsection"], -Cell[93671, 2322, 11215, 347, 403, "Text", +Cell[95506, 2377, 97, 1, 43, "Subsection"], +Cell[95606, 2380, 11215, 347, 403, "Text", CellTags->"BlochPlot::usage"], Cell[CellGroupData[{ -Cell[104911, 2673, 98, 1, 34, "Subsubsection"], -Cell[105012, 2676, 433, 11, 32, "Text", +Cell[106846, 2731, 98, 1, 34, "Subsubsection"], +Cell[106947, 2734, 433, 11, 31, "Text", CellTags->"BlochPlotColors::usage"], -Cell[105448, 2689, 381, 9, 32, "Text", +Cell[107383, 2747, 381, 9, 31, "Text", CellTags->"BlochPlotEndPoints::usage"], -Cell[105832, 2700, 616, 21, 53, "Text", +Cell[107767, 2758, 616, 21, 51, "Text", CellTags->"BlochPlotJoined::usage"], -Cell[106451, 2723, 364, 10, 32, "Text", +Cell[108386, 2781, 364, 10, 31, "Text", CellTags->"BlochPlotLabels::usage"], -Cell[106818, 2735, 37221, 832, 3813, "Text"] -}, Closed]], +Cell[108753, 2793, 37221, 832, 3115, "Text"] +}, Open ]], Cell[CellGroupData[{ -Cell[144076, 3572, 102, 1, 28, "Subsubsection"], -Cell[144181, 3575, 247, 5, 31, "Text"], +Cell[146011, 3630, 102, 1, 28, "Subsubsection"], +Cell[146116, 3633, 247, 5, 31, "Text"], Cell[CellGroupData[{ -Cell[144453, 3584, 447, 11, 32, "Input"], -Cell[144903, 3597, 24349, 417, 375, "Output"] +Cell[146388, 3642, 447, 11, 32, "Input"], +Cell[146838, 3655, 24349, 417, 375, "Output"] }, Open ]], -Cell[169267, 4017, 176, 4, 31, "Text"], +Cell[171202, 4075, 176, 4, 31, "Text"], Cell[CellGroupData[{ -Cell[169468, 4025, 662, 20, 32, "Input"], -Cell[170133, 4047, 30355, 557, 377, "Output"] +Cell[171403, 4083, 662, 20, 32, "Input"], +Cell[172068, 4105, 30355, 557, 377, "Output"] }, Open ]], -Cell[200503, 4607, 193, 4, 31, "Text"], +Cell[202438, 4665, 193, 4, 31, "Text"], Cell[CellGroupData[{ -Cell[200721, 4615, 973, 29, 32, "Input"], -Cell[201697, 4646, 36997, 693, 377, "Output"] +Cell[202656, 4673, 973, 29, 32, "Input"], +Cell[203632, 4704, 36997, 693, 377, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[238743, 5345, 102, 1, 28, "Subsubsection"], +Cell[240678, 5403, 102, 1, 28, "Subsubsection"], Cell[CellGroupData[{ -Cell[238870, 5350, 831, 19, 32, "Input"], -Cell[239704, 5371, 68583, 1303, 367, "Output"] +Cell[240805, 5408, 831, 19, 32, "Input"], +Cell[241639, 5429, 68583, 1303, 367, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[308336, 6680, 147, 2, 28, "Subsubsection"], -Cell[308486, 6684, 176, 2, 31, "Text"], -Cell[308665, 6688, 945, 27, 55, "Input"], -Cell[309613, 6717, 159, 3, 31, "Text"], +Cell[310271, 6738, 147, 2, 28, "Subsubsection"], +Cell[310421, 6742, 176, 2, 31, "Text"], +Cell[310600, 6746, 945, 27, 55, "Input"], +Cell[311548, 6775, 159, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[309797, 6724, 1082, 22, 121, "Input"], -Cell[310882, 6748, 182234, 3316, 367, "Output"] +Cell[311732, 6782, 1082, 22, 121, "Input"], +Cell[312817, 6806, 182234, 3316, 367, "Output"] }, Open ]], -Cell[493131, 10067, 112, 1, 30, "Text"], +Cell[495066, 10125, 112, 1, 30, "Text"], Cell[CellGroupData[{ -Cell[493268, 10072, 966, 24, 143, "Input"], -Cell[494237, 10098, 155276, 2987, 367, "Output"] +Cell[495203, 10130, 966, 24, 143, "Input"], +Cell[496172, 10156, 155276, 2987, 367, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[649562, 13091, 202, 3, 28, "Subsubsection"], -Cell[649767, 13096, 165, 3, 31, "Text"], +Cell[651497, 13149, 202, 3, 28, "Subsubsection"], +Cell[651702, 13154, 165, 3, 31, "Text"], Cell[CellGroupData[{ -Cell[649957, 13103, 1333, 33, 121, "Input"], -Cell[651293, 13138, 134069, 2293, 217, "Output"] +Cell[651892, 13161, 1333, 33, 121, "Input"], +Cell[653228, 13196, 134069, 2293, 217, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[785411, 15437, 300, 4, 28, "Subsubsection"], -Cell[785714, 15443, 285, 6, 32, "Text"], +Cell[787346, 15495, 300, 4, 28, "Subsubsection"], +Cell[787649, 15501, 285, 6, 32, "Text"], Cell[CellGroupData[{ -Cell[786024, 15453, 1867, 42, 209, "Input"], -Cell[787894, 15497, 182716, 3318, 367, "Output"] +Cell[787959, 15511, 1867, 42, 209, "Input"], +Cell[789829, 15555, 182716, 3318, 367, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[970671, 18822, 99, 1, 43, "Subsection"], -Cell[970773, 18825, 342, 10, 31, "Text", +Cell[972606, 18880, 99, 1, 43, "Subsection"], +Cell[972708, 18883, 342, 10, 31, "Text", CellTags->"BlochPlot2D::usage"], Cell[CellGroupData[{ -Cell[971140, 18839, 100, 1, 34, "Subsubsection"], +Cell[973075, 18897, 100, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[971265, 18844, 815, 28, 32, "Input"], -Cell[972083, 18874, 3166, 73, 213, "Output"] +Cell[973200, 18902, 815, 28, 32, "Input"], +Cell[974018, 18932, 3166, 73, 213, "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ -Cell[975310, 18954, 105, 1, 43, "Subsection"], -Cell[975418, 18957, 408, 9, 31, "Text", +Cell[977245, 19012, 105, 1, 43, "Subsection"], +Cell[977353, 19015, 408, 9, 31, "Text", CellTags->"ListBlochPlot2D::usage"], Cell[CellGroupData[{ -Cell[975851, 18970, 98, 1, 34, "Subsubsection"], +Cell[977786, 19028, 98, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[975974, 18975, 461, 14, 51, "Input"], -Cell[976438, 18991, 100134, 2520, 213, "Output"] +Cell[977909, 19033, 461, 14, 51, "Input"], +Cell[978373, 19049, 100134, 2520, 213, "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[1076645, 21519, 99, 1, 65, "Section"], +Cell[1078580, 21577, 99, 1, 63, "Section"], Cell[CellGroupData[{ -Cell[1076769, 21524, 103, 1, 45, "Subsection"], -Cell[1076875, 21527, 430, 13, 32, "Text", +Cell[1078704, 21582, 103, 1, 43, "Subsection"], +Cell[1078810, 21585, 430, 13, 31, "Text", CellTags->"EigensystemForm::usage"], Cell[CellGroupData[{ -Cell[1077330, 21544, 97, 1, 35, "Subsubsection"], +Cell[1079265, 21602, 97, 1, 34, "Subsubsection"], Cell[CellGroupData[{ -Cell[1077452, 21549, 203, 5, 32, "Input"], -Cell[1077658, 21556, 3298, 98, 114, "Output"] +Cell[1079387, 21607, 203, 5, 32, "Input"], +Cell[1079593, 21614, 3298, 98, 114, "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[1081029, 21662, 308, 4, 65, "Section"], +Cell[1082964, 21720, 308, 4, 63, "Section"], Cell[CellGroupData[{ -Cell[1081362, 21670, 152, 2, 44, "Subsection"], -Cell[1081517, 21674, 1117, 31, 74, "Text", +Cell[1083297, 21728, 152, 2, 43, "Subsection"], +Cell[1083452, 21732, 1117, 31, 71, "Text", CellTags->"FourierListPlot::usage"], Cell[CellGroupData[{ -Cell[1082659, 21709, 100, 1, 35, "Subsubsection"], -Cell[1082762, 21712, 164, 5, 31, "Text"], -Cell[1082929, 21719, 24844, 547, 2297, "Text"] +Cell[1084594, 21767, 100, 1, 34, "Subsubsection"], +Cell[1084697, 21770, 164, 5, 31, "Text"], +Cell[1084864, 21777, 24844, 547, 2297, "Text"] }, Closed]], Cell[CellGroupData[{ -Cell[1107810, 22271, 204, 3, 29, "Subsubsection"], -Cell[1108017, 22276, 181, 4, 31, "Text"], -Cell[1108201, 22282, 817, 24, 32, "Input"], +Cell[1109745, 22329, 204, 3, 28, "Subsubsection"], +Cell[1109952, 22334, 181, 4, 31, "Text"], +Cell[1110136, 22340, 817, 24, 32, "Input"], Cell[CellGroupData[{ -Cell[1109043, 22310, 517, 13, 32, "Input"], -Cell[1109563, 22325, 4138, 78, 238, "Output"] +Cell[1110978, 22368, 517, 13, 32, "Input"], +Cell[1111498, 22383, 4138, 78, 238, "Output"] }, Open ]], Cell[CellGroupData[{ -Cell[1113738, 22408, 668, 16, 55, "Input"], -Cell[1114409, 22426, 19551, 392, 245, "Output"] +Cell[1115673, 22466, 668, 16, 55, "Input"], +Cell[1116344, 22484, 19551, 392, 245, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[1134009, 22824, 159, 2, 29, "Subsubsection"], -Cell[1134171, 22828, 132, 1, 31, "Text"], -Cell[1134306, 22831, 1243, 39, 55, "Input"], +Cell[1135944, 22882, 159, 2, 28, "Subsubsection"], +Cell[1136106, 22886, 132, 1, 31, "Text"], +Cell[1136241, 22889, 1243, 39, 55, "Input"], Cell[CellGroupData[{ -Cell[1135574, 22874, 510, 13, 32, "Input"], -Cell[1136087, 22889, 14182, 287, 242, "Output"] +Cell[1137509, 22932, 510, 13, 32, "Input"], +Cell[1138022, 22947, 14182, 287, 242, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ -Cell[1150318, 23182, 158, 2, 29, "Subsubsection"], -Cell[1150479, 23186, 186, 5, 32, "Text"], -Cell[1150668, 23193, 702, 22, 32, "Input"], +Cell[1152253, 23240, 158, 2, 29, "Subsubsection"], +Cell[1152414, 23244, 186, 5, 32, "Text"], +Cell[1152603, 23251, 702, 22, 32, "Input"], Cell[CellGroupData[{ -Cell[1151395, 23219, 426, 11, 32, "Input"], -Cell[1151824, 23232, 2330, 48, 233, "Output"] +Cell[1153330, 23277, 426, 11, 32, "Input"], +Cell[1153759, 23290, 2330, 48, 233, "Output"] }, Open ]] }, Closed]] }, Open ]] From c24e29c556950e40007a58f6af7238f167b196f1 Mon Sep 17 00:00:00 2001 From: "Christopher J. Wood" Date: Fri, 17 Apr 2015 14:00:29 -0400 Subject: [PATCH 4/7] Added options to HintonPlot. - "Color" option specifies colors of negative, positive and background colors. - AxesStyle functions as axes style for Plot. - Changed Gap option to "Gap" (since Gap isn't a predefined or protected symbol, "Gap" is immutable) --- src/Visualization.m | 47 +++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/src/Visualization.m b/src/Visualization.m index 96fac65..4355b02 100644 --- a/src/Visualization.m +++ b/src/Visualization.m @@ -22,7 +22,7 @@ (*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*) -(* ::Subsection:: *) +(* ::Subsection::Closed:: *) (*Preamble*) @@ -46,11 +46,11 @@ (*Usage Declaration*) -(* ::Subsection:: *) +(* ::Subsection::Closed:: *) (*Matrices*) -Unprotect[ComplexMatrixPlot,BlockForm,MatrixListForm, HintonPlot]; +Unprotect[ComplexMatrixPlot,BlockForm,MatrixListForm, HintonPlot,ChannelHintonPlot]; AssignUsage[ComplexMatrixPlot,$VisualizationUsages]; @@ -110,7 +110,7 @@ Begin["`Private`"]; -(* ::Subsection:: *) +(* ::Subsection::Closed:: *) (*Matrices*) @@ -151,14 +151,24 @@ Options[HintonPlot] = { AxesLabel -> None, - Gap -> 0.05 + "Gap" -> 0.05, + "Colors" -> {Black,Gray,White}, + AxesStyle -> {} }; -HintonPlot[dat_,OptionsPattern[]] := With[{data=Reverse[dat\[Transpose],{2}]},With[{n=Dimensions[data][[1]],m=Dimensions[data][[2]],normdata=(1-OptionValue[Gap])data/Max[Abs[data]],graydata=Map[GrayLevel,(Sign[data]+1)/2,{2}]}, +HintonPlot[dat_,OptionsPattern[]] := + With[{ + data=Reverse[dat\[Transpose],{2}], + colors=OptionValue["Colors"]}, + With[{ + n=Dimensions[data][[1]], + m=Dimensions[data][[2]], + normdata=(1-OptionValue["Gap"])data/Max[Abs[data]], + graydata=Map[colors[[#]]&,Sign[data]+2,{2}]}, Module[{plot}, plot = Graphics[ - {GrayLevel[1/2],Rectangle[{1/4,1/4},{n+3/4,m+3/4}]}~Join~ + {colors[[2]],Rectangle[{1/4,1/4},{n+3/4,m+3/4}]}~Join~ Table[ { graydata[[i,j]], @@ -174,14 +184,14 @@ If[OptionValue[AxesLabel]=!=None, plot[[1]]=Join[ plot[[1]], - Table[ - Text[OptionValue[AxesLabel][[1,i]],{i,m+3/4},{0,-2}], + {Gray,Table[ + Style[Text[OptionValue[AxesLabel][[1,i]],{i,m+3/4},{0,-2}],OptionValue[AxesStyle]], {i,n} - ], - Table[ - Text[Reverse[OptionValue[AxesLabel][[2]]][[j]],{0,j},{1,0}], + ]}, + {Gray,Table[ + Style[Text[Reverse[OptionValue[AxesLabel][[2]]][[j]],{0,j},{1,0}],OptionValue[AxesStyle]], {j,m} - ] + ]} ]; ]; plot @@ -198,12 +208,15 @@ ]; -ChannelHintonPlot[chan_]:=With[{ +ChannelHintonPlot[chan_,opts:OptionsPattern[HintonPlot]]:=With[{ mtx=First@Super[chan,Basis->"Pauli"], nqIn=Log2 @ InputDim@ chan, nqOut=Log2 @ OutputDim @ chan }, - HintonPlot[mtx,AxesLabel->PauliLabels/@{nqOut,nqIn}] + HintonPlot[mtx, + If[AnyMatchQ[AxesLabel->_,{opts}], + {opts}, + Append[{opts},AxesLabel->PauliLabels/@{nqOut,nqIn}]]] ] @@ -514,12 +527,12 @@ End[]; -(* ::Section:: *) +(* ::Section::Closed:: *) (*End Package*) Protect[ComplexMatrixPlot,BlockForm,MatrixListForm]; -Protect[BlochPlot,BlochPlot2D,ListBlochPlot2D,BlochPlotColors,BlochPlotEndPoints,BlochPlotJoined,BlochPlotLabels,HintonPlot]; +Protect[BlochPlot,BlochPlot2D,ListBlochPlot2D,BlochPlotColors,BlochPlotEndPoints,BlochPlotJoined,BlochPlotLabels,HintonPlot,ChannelHintonPlot]; Protect[EigensystemForm]; Protect[FourierListPlot]; From 0b8520fa29637c5e4e62ceeeb82fc7b8b3417959 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Mon, 20 Apr 2015 15:39:23 +1000 Subject: [PATCH 5/7] Changed ChannelHintonPlot to use new BasisLabels option. --- src/Visualization.m | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Visualization.m b/src/Visualization.m index 4355b02..2834668 100644 --- a/src/Visualization.m +++ b/src/Visualization.m @@ -46,7 +46,7 @@ (*Usage Declaration*) -(* ::Subsection::Closed:: *) +(* ::Subsection:: *) (*Matrices*) @@ -110,7 +110,7 @@ Begin["`Private`"]; -(* ::Subsection::Closed:: *) +(* ::Subsection:: *) (*Matrices*) @@ -199,15 +199,6 @@ ]]; -(* Not exposed by intention. *) -PauliLabels[nq_] := Table[ - StringJoin@@(Reverse[IntegerDigits[i,4,nq]]/.{ - 0->"I",1->"X",2->"Y",3->"Z" - }), - {i,0,4^nq-1} -]; - - ChannelHintonPlot[chan_,opts:OptionsPattern[HintonPlot]]:=With[{ mtx=First@Super[chan,Basis->"Pauli"], nqIn=Log2 @ InputDim@ chan, @@ -216,7 +207,14 @@ HintonPlot[mtx, If[AnyMatchQ[AxesLabel->_,{opts}], {opts}, - Append[{opts},AxesLabel->PauliLabels/@{nqOut,nqIn}]]] + Append[{opts}, + (* + Note that we use PO, instead of Pauli, to suppress normalization in plot labels. + It should be understood that the plot is with respect to the normalized basis, + but that the normalizations are omitted for brevity. + *) + AxesLabel->(BasisLabels["PO", #, Join->StringJoin]&/@{nqOut,nqIn})]] + ] ] From ce0bf40b9b4aa35674c9086650b8d4e930f626ee Mon Sep 17 00:00:00 2001 From: "Christopher J. Wood" Date: Mon, 20 Apr 2015 12:38:46 -0400 Subject: [PATCH 6/7] Fixed ChannelHintonPlot to unravel superoperator --- src/Visualization.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Visualization.m b/src/Visualization.m index 2834668..38df6ea 100644 --- a/src/Visualization.m +++ b/src/Visualization.m @@ -46,7 +46,7 @@ (*Usage Declaration*) -(* ::Subsection:: *) +(* ::Subsection::Closed:: *) (*Matrices*) @@ -110,7 +110,7 @@ Begin["`Private`"]; -(* ::Subsection:: *) +(* ::Subsection::Closed:: *) (*Matrices*) @@ -200,7 +200,7 @@ ChannelHintonPlot[chan_,opts:OptionsPattern[HintonPlot]]:=With[{ - mtx=First@Super[chan,Basis->"Pauli"], + mtx=Unravel[First@Super[chan,Basis->"Pauli"],2], nqIn=Log2 @ InputDim@ chan, nqOut=Log2 @ OutputDim @ chan }, @@ -213,7 +213,7 @@ It should be understood that the plot is with respect to the normalized basis, but that the normalizations are omitted for brevity. *) - AxesLabel->(BasisLabels["PO", #, Join->StringJoin]&/@{nqOut,nqIn})]] + AxesLabel->(BasisLabels["PO", #, Join->True]&/@{nqOut,nqIn})]] ] ] From 12368b8a5878eec581d1f344a636bedf0d8368b0 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Fri, 24 Apr 2015 15:06:27 +1000 Subject: [PATCH 7/7] Added Chop, Re to prevent taking Part of I. --- src/Visualization.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Visualization.m b/src/Visualization.m index 38df6ea..3fdb1a7 100644 --- a/src/Visualization.m +++ b/src/Visualization.m @@ -110,7 +110,7 @@ Begin["`Private`"]; -(* ::Subsection::Closed:: *) +(* ::Subsection:: *) (*Matrices*) @@ -153,18 +153,19 @@ AxesLabel -> None, "Gap" -> 0.05, "Colors" -> {Black,Gray,White}, - AxesStyle -> {} + AxesStyle -> {}, + "Normalization" -> Automatic }; HintonPlot[dat_,OptionsPattern[]] := With[{ - data=Reverse[dat\[Transpose],{2}], + data=Re@Reverse[dat\[Transpose],{2}], colors=OptionValue["Colors"]}, With[{ n=Dimensions[data][[1]], m=Dimensions[data][[2]], - normdata=(1-OptionValue["Gap"])data/Max[Abs[data]], + normdata=(1-OptionValue["Gap"]) data / If[OptionValue@"Normalization" === Automatic, Max[Abs[data]], OptionValue@"Normalization"], graydata=Map[colors[[#]]&,Sign[data]+2,{2}]}, Module[{plot}, plot = Graphics[ @@ -204,7 +205,7 @@ nqIn=Log2 @ InputDim@ chan, nqOut=Log2 @ OutputDim @ chan }, - HintonPlot[mtx, + HintonPlot[Chop @ mtx, If[AnyMatchQ[AxesLabel->_,{opts}], {opts}, Append[{opts},