(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 22739, 599]*) (*NotebookOutlinePosition[ 23369, 621]*) (* CellTagsIndexPosition[ 23325, 617]*) (*WindowFrame->Normal*) Notebook[{ Cell[BoxData[ \(\(\(Needs["\"]\)\(\ \[IndentingNewLine]\) \)\)], "Input"], Cell[BoxData[ RowBox[{ ButtonBox["Figures", ButtonData:>{ URL[ "http://www.physics.unlv.edu/~bernard/phy771/figures.pdf"], None}, ButtonStyle->"Hyperlink"], "\[IndentingNewLine]"}]], "Input"], Cell[BoxData[{ \(A\ classical\ gate\ \ \ maps\ \ \ \ a\ string\ of\ bits\ \((which\ can\ \ be\ represent\ a\ number)\)\), "\[IndentingNewLine]", \(into\ \ \ another\ string\ of\ bits\ \((another\ number)\), \ i . e . \ it\ is\ a\ function, \[IndentingNewLine]and\ a\ classical\ \ computation\ consists\ of\ an\ evaluation\ \ of\ that\ function . \ \[IndentingNewLine]\[IndentingNewLine]\[IndentingNewLine]If\ the\ domain\ \ \((input)\)\ consists\ only\ of\ \ a\ single\ bit, \ the\ gate\ input\ has\), "\[IndentingNewLine]", \(a\ possible\ values\ 0, \ 1. \ \ \ The\ output\ \((range)\)\ also\ is\ spanned\ by\ these\ two\ \ values . \[IndentingNewLine]\[IndentingNewLine]so\ all\ \ possibilities\ \ for\ \ \ 1\ bit\ \[RightArrow] 1\ bit\ gates\ \ \((functions)\)\ can\ be\ \ itemized\[IndentingNewLine]\), "\[IndentingNewLine]", \(x\ | \ \(f\_1\) \((x)\)\ \ \ \ \ \ \ \ \), "\[IndentingNewLine]", \(0\ \ \ | \ 0\), "\[IndentingNewLine]", \(1\ \ \ | \ 0\[IndentingNewLine]\), "\[IndentingNewLine]", \(x\ | \ \(f\_2\) \((x)\)\ \ \ \ \ \ \ \ \), "\[IndentingNewLine]", \(0\ \ \ | \ 1\), "\[IndentingNewLine]", \(1\ \ \ | \ 1\[IndentingNewLine]\), "\[IndentingNewLine]", \(x\ | \ \(f\_3\) \((x)\)\ \ \ \ \ \ \ \ \), "\[IndentingNewLine]", \(0\ \ \ | \ 1\), "\[IndentingNewLine]", \(1\ \ \ | \ 0\[IndentingNewLine]\), "\[IndentingNewLine]", \(x\ | \ \(f\_4\) \((x)\)\ \ \ \ \ \ \ \ \), "\[IndentingNewLine]", \(0\ \ \ | \ 0\), "\[IndentingNewLine]", \(1\ \ \ | \ 1\[IndentingNewLine]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Suppose\ we\ have\ a\ black\ \(box : \ \ with\ some\ unknown\ \ function\ \ f\), \ how\ many\ computations\ \), "\[IndentingNewLine]", \(do\ we\ require\ in\ order\ to\ \ figure\ out\ wich\ function\ the\ \ black\ box\ evaluates . \ \[IndentingNewLine]\[IndentingNewLine]\(Answer : \ two\ classical\ computations\)\), "\[IndentingNewLine]", \(Or : \ construct\ a\ classically\ \ \ parallel\ computer\ \), "\ \[IndentingNewLine]", \(\((perform\ both\ calculations\ at\ the\ same\ time\ but\ with\ double\ \ the\ hardware\ costs)\)\), "\[IndentingNewLine]", \(\)}], "Input", Evaluatable->False], Cell[BoxData[{ \(Deutsch\ posed\ this\ problem, \ for\ a\ quantum\ mechanical\ \(computer : \[IndentingNewLine]\ \[IndentingNewLine]\[IndentingNewLine]\[IndentingNewLine]Lets\ \ \ \ define\ \ a\ 2 - qubit\ transformation\), \ where\ f \((x)\)\ can\ represent\ any\ of\ the\ four\), "\ \[IndentingNewLine]", \(itemized\ functions\ given\ \(\(above\)\(.\)\)\)}], "Input", Evaluatable->False], Cell[BoxData[ \(\(\(|\)\(\(\(xy\)\(>\)\)\(\[RightArrow]\)\)\(|\)\(\(x\ y\[CirclePlus]f \ \((x)\)\)\(>\)\)\)\)], "Input", Evaluatable->False], Cell[BoxData[{ \(\(\(|\)\(\(\(00\)\(>\)\)\(\[RightArrow]\)\)\(|\)\(\(0\ \ f \((0)\)\)\(>\ \)\)\)\), "\[IndentingNewLine]", \(\(\(|\)\(\(\(01\)\(>\)\)\(\[RightArrow]\)\)\(|\)\(\(0\ \ 1\[CirclePlus]\ f \((0)\)\)\(>\)\)\)\[IndentingNewLine] \(\(|\)\(\(\(10\)\(>\)\)\(\[RightArrow]\)\)\(|\)\(\(1\ \ f \((1)\)\)\(>\)\ \)\)\), "\[IndentingNewLine]", \(\(\(|\)\(\(\(11\)\(>\)\)\(\[RightArrow]\)\)\(|\)\(\(1\ \ 1\[CirclePlus]\ f \((1)\)\)\(>\)\)\)\)}], "Input", Evaluatable->False], Cell[BoxData[ \(or\)], "Input", Evaluatable->False], Cell[BoxData[{ \(\(\(U = \(\(|\)\(0\ \ f \((0)\) > < 00\)\(|\)\(+\ \(\(|\)\(0\ \ 1\[CirclePlus]f \((0)\) > < 10\)\(|\)\(\ \)\(+\[IndentingNewLine]\(\(|\)\(1\ \ f \((1)\) > \ < 01\)\(|\)\(+\(\(|\)\(1\ \ 1\[CirclePlus]f \((1)\) > < 11\)\(|\)\(\[IndentingNewLine]\)\(thus\)\)\)\)\)\)\)\)\)\ \(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(U\^\[Dagger] = \(\(|\)\(00 > < 0 f \((0)\)\)\(|\)\(+\(\(|\)\(01 > < 0\ \ 1\[CirclePlus]f \((0)\)\)\(|\)\(+\(\(|\)\(10 > < 1\ \ f \((1)\)\)\(|\)\(+\(\(|\)\(11 > < 1\ \ 1\[CirclePlus]f \ \((1)\)\)\(|\)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\(\ \[IndentingNewLine]\)\)\)\)\)\)\)\)\)}], "Input", PageWidth->Infinity, Evaluatable->False, TextAlignment->Left, TextJustification->1], Cell[BoxData[{ \(\(\(UU\^\[Dagger] = \(U\^\[Dagger]\ U = \(\(\(|\)\(0 f \((0)\) > < 0 f \((0)\)\)\(|\)\(\ \)\(+\(\(|\)\(0\ 1\[CirclePlus]f \((0)\) \ > < 0\ \ 1\[CirclePlus]f \((0)\)\)\(|\)\(+\ \(\(|\)\(1\ \ f \((1)\) > < 1\ f \((1)\)\)\(|\)\(\[IndentingNewLine]\)\(+\ \ \(\(|\)\(1\ \ 1\[CirclePlus]f \((1)\) > < 1\ \ 1\[CirclePlus]f \((1)\)\)\(|\)\)\)\)\)\)\)\) = I\)\)\ \ ; \((for\ any\ function\ f)\)\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(and\ therefore\ the\ above\ transformation\ is\ \ \(\(unitary\)\(.\)\)\)}], "Input", Evaluatable->False], Cell[BoxData[ \(Lets\ take\ the\ matrix\ representation\ of\ U, \ using\ the\ 2 - qubit\ \ computational\ basis\ | \(\(00\)\(>\)\), \(\(|\)\(\(01\)\(>\ \)\)\), \(\(|\)\(\(10\)\(>\)\)\), \(\(|\)\(\(11\)\(>\)\)\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(For\ the\ first\ term\ \ \ \ | 0\ \ f \((0)\) > < 00 | \)], "Input", Evaluatable->False], Cell[BoxData[ \(we\ get\)], "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[BoxData[{ \(\(u1 = {{"\<<0|f(0)>\>", 0, 0, 0}, {"\<<1|f(0)>\>", 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};\)\), "\[IndentingNewLine]", \(MatrixForm[u1]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\<\"<0|f(0)>\"\>", "0", "0", "0"}, {"\<\"<1|f(0)>\"\>", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"} }], "\[NoBreak]", ")"}], Function[ BoxForm`e$, MatrixForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[BoxData[{ \(\("\<|1 1\[CirclePlus]f(0)><01|\>";\)\), "\[IndentingNewLine]", \(is\)}], "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[BoxData[{ \(\(u2 = {{0, "\<<0|1\[CirclePlus]f(0)>\>", 0, 0}, {0, "\<<1|1\[CirclePlus]f(0)>\>", 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};\)\), "\[IndentingNewLine]", \(MatrixForm[u2]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "\<\"<0|1\[CirclePlus]f(0)>\"\>", "0", "0"}, {"0", "\<\"<1|1\[CirclePlus]f(0)>\"\>", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"} }], "\[NoBreak]", ")"}], Function[ BoxForm`e$, MatrixForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[BoxData[ \(\("\<|1 f(1)><1 f(1)|\>";\)\)], "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[BoxData[{ \(\(u3 = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, "\<<0|f(1)>\>", 0}, {0, 0, "\<<1|f(1)>\>", 0}};\)\), "\[IndentingNewLine]", \(MatrixForm[u3]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "\<\"<0|f(1)>\"\>", "0"}, {"0", "0", "\<\"<1|f(1)>\"\>", "0"} }], "\[NoBreak]", ")"}], Function[ BoxForm`e$, MatrixForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\("\<|1 1\[CirclePlus]f(1)><11|\>";\)\), "\[IndentingNewLine]", \(\(u4 = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, "\<<0|1\[CirclePlus]f(1)>\>"}, {0, 0, 0, "\<<1|1\[CirclePlus]f(1)>\>"}};\)\), "\[IndentingNewLine]", \(MatrixForm[u4]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "\<\"<0|1\[CirclePlus]f(1)>\"\>"}, {"0", "0", "0", "\<\"<1|1\[CirclePlus]f(1)>\"\>"} }], "\[NoBreak]", ")"}], Function[ BoxForm`e$, MatrixForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\(deutschgate = u1 + u2 + u3 + u4;\)\), "\[IndentingNewLine]", \(MatrixForm[deutschgate]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\<\"<0|f(0)>\"\>", "\<\"<0|1\[CirclePlus]f(0)>\"\>", "0", "0"}, {"\<\"<1|f(0)>\"\>", "\<\"<1|1\[CirclePlus]f(0)>\"\>", "0", "0"}, {"0", "0", "\<\"<0|f(1)>\"\>", "\<\"<0|1\[CirclePlus]f(1)>\"\>"}, {"0", "0", "\<\"<1|f(1)>\"\>", "\<\"<1|1\[CirclePlus]f(1)>\"\>"} }], "\[NoBreak]", ")"}], Function[ BoxForm`e$, MatrixForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[BoxData[ \("\< consider incoming state is\>"\)], "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[BoxData[{ \(\(zero = {1, 0};\)\), "\[IndentingNewLine]", \(\(one = {0, 1};\)\), "\[IndentingNewLine]", \(in = Flatten[Outer[Times, zero, zero]]\)}], "Input"], Cell[BoxData[ \({1, 0, 0, 0}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(deutschgate . in\)], "Input", Evaluatable->False], Cell[BoxData[ \({"<0|f(0)>", "<1|f(0)>", 0, 0}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(\(\(=\)\(\(|\)\(00 > \ < 0\)\(|\)\(f \((0)\) > \ +\)\(\ \)\(|\)\(01 > < 1\)\(|\)\(\(f \((0)\)\)\(>\)\)\)\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(\(=\)\(\(\(|\)\(0 > \(\[CircleTimes]\((\(|\)\(0 > \ < 0\)\(|\)\(f \((0)\) > +\)\(|\)\(1 > < 1\)\(|\)\(\(f \((0)\)\)\(>\)\))\)\)\)\) = \ \[IndentingNewLine]\(\(|\)\(0 > \((\(|\)\(0 > \ < 0\)\(|\)\(+\(\(|\)\(1 > < 1\)\(|\)\)\))\)\)\(|\)\(\(f \((0)\)\)\(>=\)\)\(|\)\(\(0\ \)\(>\)\)\(|\)\(f \((0)\) > \[IndentingNewLine]\[IndentingNewLine]as\ \ expected\ since\)\(\ \)\(|\)\(\(\(00\)\(>\)\)\(\[RightArrow]\)\)\(|\)\(\(0\ f \ \((0)\)\)\(>\)\)\)\)\)\)}], "Input", Evaluatable->False], Cell[BoxData[{ \(Suppose\ the\ input\ state\ is\), "\[IndentingNewLine]", \(now\ a\ linear\ \(superposition : \ \((no\ classical\ anaglog)\)\)\)}], \ "Input", Evaluatable->False], Cell[BoxData[ \(\(\(\((\(|\)\(0 > +\)\(|\)\(\(1\)\(>\)\))\)/\@2\)\(\ \)\(\[CircleTimes]\ \)\)\ | \(\(0\)\(>\)\)\ \ \ = \ \ \((\(|\)\(00 > \ +\)\(|\)\(\(10\)\(>\)\))\)/\@2\)], "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[BoxData[ \(superposition = {1, 0, 1, 0}/\@2\)], "Input"], Cell[BoxData[ \({1\/\@2, 0, 1\/\@2, 0}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(deutschgate . superposition\)], "Input"], Cell[BoxData[ \({"<0|f(0)>"\/\@2, "<1|f(0)>"\/\@2, "<0|f(1)>"\/\@2, "<1|f(1)>"\/\@2}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(\(1/\@2 \((\(|\)\(00 > \ < 0\)\(|\)\(f \((0)\) > +\)\(|\)\(01 > < 1\)\(|\)\(\(f \((0)\)\)\(>\)\))\) + 1/\@2 \((\(|\)\(10 > \ < 0\)\(|\)\(f \((1)\) > +\)\(|\)\(11 > < 1\)\(|\)\(\(f \((1)\)\)\(>\)\))\)\)\(=\)\(\[IndentingNewLine]\ \)\(\[IndentingNewLine]\)\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(1/\@2 | \(\(0\)\(>\)\)\ | f \((0)\) > \(+1\)/\@2 | \(\(1\)\(>\)\)\ | \(\(f \((1)\)\)\(>\)\)\)], \ "Input", Evaluatable->False], Cell[BoxData[{ \(Notice\ this\ output\ two - qubit\ contains\ information\ about\ both\ , \ f \((0)\), \ \(\(f\) \((1)\)\(\ \ \)\)\), "\[IndentingNewLine]", \(Quantum\ Parallelism\)}], "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[BoxData[ \(hadamard = 1/Sqrt[2] {{1, 1}, {1, \(-1\)}}\)], "Input"], Cell[BoxData[ \({{1\/\@2, 1\/\@2}, {1\/\@2, \(-\(1\/\@2\)\)}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(hadhad = BlockMatrix[Outer[Times, hadamard, hadamard]]\)], "Input"], Cell[BoxData[ \({{1\/2, 1\/2, 1\/2, 1\/2}, {1\/2, \(-\(1\/2\)\), 1\/2, \(-\(1\/2\)\)}, {1\/2, 1\/2, \(-\(1\/2\)\), \(-\(1\/2\)\)}, {1\/2, \(-\(1\/2\)\), \ \(-\(1\/2\)\), 1\/2}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(unit = {{1, 0}, {0, 1}};\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(hadunit = BlockMatrix[Outer[Times, hadamard, unit]]\)], "Input"], Cell[BoxData[ \({{1\/\@2, 0, 1\/\@2, 0}, {0, 1\/\@2, 0, 1\/\@2}, {1\/\@2, 0, \(-\(1\/\@2\)\), 0}, {0, 1\/\@2, 0, \(-\(1\/\@2\)\)}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\(newgate = FullSimplify[ hadunit . deutschgate . hadhad];\)\), "\[IndentingNewLine]", \(MatrixForm[%]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {\(\("<0|1\[CirclePlus]f(0)>" + "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" + "<0|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<0|1\[CirclePlus]f(0)>"\) - "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" + "<0|f(1)>"\)\/\(2\ \@2\)\), \(\("<0|1\[CirclePlus]f(0)>" \ - "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" - "<0|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<0|1\[CirclePlus]f(0)>"\) + "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" - "<0|f(1)>"\)\/\(2\ \@2\)\)}, {\(\("<1|1\[CirclePlus]f(0)>" + "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" + "<1|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<1|1\[CirclePlus]f(0)>"\) - "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" + "<1|f(1)>"\)\/\(2\ \@2\)\), \(\("<1|1\[CirclePlus]f(0)>" \ - "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" - "<1|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<1|1\[CirclePlus]f(0)>"\) + "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" - "<1|f(1)>"\)\/\(2\ \@2\)\)}, {\(\("<0|1\[CirclePlus]f(0)>" - "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" - "<0|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<0|1\[CirclePlus]f(0)>"\) + "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" - "<0|f(1)>"\)\/\(2\ \@2\)\), \(\("<0|1\[CirclePlus]f(0)>" \ + "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" + "<0|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<0|1\[CirclePlus]f(0)>"\) - "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" + "<0|f(1)>"\)\/\(2\ \@2\)\)}, {\(\("<1|1\[CirclePlus]f(0)>" - "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" - "<1|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<1|1\[CirclePlus]f(0)>"\) + "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" - "<1|f(1)>"\)\/\(2\ \@2\)\), \(\("<1|1\[CirclePlus]f(0)>" \ + "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" + "<1|f(1)>"\)\/\(2\ \@2\)\), \ \(\(\(-"<1|1\[CirclePlus]f(0)>"\) - "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" + "<1|f(1)>"\)\/\(2\ \@2\)\)} }], "\[NoBreak]", ")"}], Function[ BoxForm`e$, MatrixForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(newgate . in\)], "Input"], Cell[BoxData[ \({\("<0|1\[CirclePlus]f(0)>" + "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" + \ "<0|f(1)>"\)\/\(2\ \@2\), \("<1|1\[CirclePlus]f(0)>" + \ "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" + "<1|f(1)>"\)\/\(2\ \@2\), \("<0|1\ \[CirclePlus]f(0)>" - "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" - \ "<0|f(1)>"\)\/\(2\ \@2\), \("<1|1\[CirclePlus]f(0)>" - \ "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" - "<1|f(1)>"\)\/\(2\ \@2\)}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zerone = Flatten[Outer[Times, zero, one]]\)], "Input"], Cell[BoxData[ \({0, 1, 0, 0}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FullSimplify[newgate . zerone]\)], "Input"], Cell[BoxData[ \({\(\(-"<0|1\[CirclePlus]f(0)>"\) - "<0|1\[CirclePlus]f(1)>" + \ "<0|f(0)>" + "<0|f(1)>"\)\/\(2\ \@2\), \(\(-"<1|1\[CirclePlus]f(0)>"\) - \ "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" + "<1|f(1)>"\)\/\(2\ \@2\), \(\(-"<0|1\ \[CirclePlus]f(0)>"\) + "<0|1\[CirclePlus]f(1)>" + "<0|f(0)>" - \ "<0|f(1)>"\)\/\(2\ \@2\), \(\(-"<1|1\[CirclePlus]f(0)>"\) + \ "<1|1\[CirclePlus]f(1)>" + "<1|f(0)>" - "<1|f(1)>"\)\/\(2\ \@2\)}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(\(\(|\)\(00 > \ \((\(\(-\(\(<\)\(0\)\)\) | 1\[CirclePlus]f \((0)\) > \ \(-\(\(<\)\(0\)\)\) | 1\[CirclePlus]f \((1)\) > \(+\(\(<\)\(0\)\)\) | f \((0)\ \) > \(+\(\(<\)\(0\)\)\) | \(\(f \((1)\)\)\(>\)\)\)\/\(2\ \@2\))\)\)\)\(\ \[IndentingNewLine]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(\(+\ \(\(|\)\(01 > \((\(\(-\(\(<\)\(1\)\)\) | 1\[CirclePlus]f \((0)\) \ > \(-\(\(<\)\(1\)\)\) | 1\[CirclePlus]f \((1)\) > \(+\(\(<\)\(1\)\)\) | f \ \((0)\) > \(+\(\(<\)\(1\)\)\) | \(\(f \((1)\)\)\(>\)\)\)\/\(2\ \@2\))\)\)\)\)\ \(\[IndentingNewLine]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(\(\(|\)\(10 > \ \((\ \(\(-"\<<0|1\[CirclePlus]f(0)>\>"\) + "\<<0|1\ \[CirclePlus]f(1)>\>" + "\<<0|f(0)>\>" - "\<<0|f(1)>\>"\)\/\(2\ \ \@2\))\)\)\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(+\[IndentingNewLine]\[IndentingNewLine]\(\(|\)\(11 > \((\(\(-"\<<1|1\ \[CirclePlus]f(0)>\>"\) + "\<<1|1\[CirclePlus]f(1)>\>" + "\<<1|f(0)>\>" - \ "\<<1|f(1)>\>"\)\/\(2\ \@2\))\)\)\)\)\)}], "Input", Evaluatable->False], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(\(|\)\(0 > \(\[CircleTimes]\((\(|\)\(0 > \ \ \(\((\(\(-\(\(<\)\(0\)\)\) | 1\[CirclePlus]f \((0)\) > \(-\(\(<\)\(0\)\)\) | \ 1\[CirclePlus]f \((1)\) > \(+\(\(<\)\(0\)\)\) | f \((0)\) > \(+\(\(<\)\(0\)\)\ \) | \(\(f \((1)\)\)\(>\)\)\)\/\(2\ \ \@2\))\)\(+\)\)\)\(\[IndentingNewLine]\)\(|\)\(1 > \((\(\(-\(\(<\)\(1\)\)\) | \ 1\[CirclePlus]f \((0)\) > \(-\(\(<\)\(1\)\)\) | 1\[CirclePlus]f \((1)\) > \(+\ \(\(<\)\(1\)\)\) | f \((0)\) > \(+\(\(<\)\(1\)\)\) | \(\(f \((1)\)\)\(>\)\)\)\ \/\(2\ \@2\))\)\))\)\)\)\)\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(\(\(|\)\(1 > \ \(\[CircleTimes]\((\(|\)\(0 > \ \ \(\((\ \(\(-"\<<0|1\[CirclePlus]f(0)>\>"\) + "\<<0|1\[CirclePlus]f(1)>\>" + \ "\<<0|f(0)>\>" - "\<<0|f(1)>\>"\)\/\(2\ \@2\))\)\[IndentingNewLine]\ \[IndentingNewLine] +\)\)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\(|\)\(1 > \ \((\(\(-"\<<1|1\[CirclePlus]f(0)>\>"\) + "\<<1|1\[CirclePlus]f(1)>\>" + \ "\<<1|f(0)>\>" - "\<<1|f(1)>\>"\)\/\(2\ \@2\))\)\))\)\)\)\)\(\ \[IndentingNewLine]\)\(\[IndentingNewLine]\) \)\)\)], "Input", Evaluatable->False], Cell[BoxData[ \(Suppose\ f \((0)\) = f \((1)\); \ then\ we\ get\)], "Input", Evaluatable->False], Cell[BoxData[ \(\(\(|\)\(0 > \(\[CircleTimes]\ \((\(|\)\(0 > +\)\(|\)\(\(1\)\(>\)\))\)\ \ \((\(\(-\(\(<\)\(0\)\)\) | 1\[CirclePlus]f \((0)\) > \(+\(\(<\)\(0\)\)\) | \(\ \(f \((0)\)\)\(>\)\)\)\/\(\(\ \)\(\@2\)\))\)\)\)\) = \(\[PlusMinus]\(\(|\)\(0 \ > \(\[CircleTimes]\ \((\(|\)\(0 > +\)\(|\)\(\(1\)\(>\)\))\)/\@2\)\)\)\)\)], \ "Input", Evaluatable->False], Cell[BoxData[ \(\(\(In\)\(\ \ \ \)\(a\)\(\ \ \)\(measurement\)\(\ \ \ \ \)\(half\)\(\ \ \)\(the\)\(\ \)\(time\)\(\ \)\(we\)\(\ \)\(get\)\(\ \ \ \)\(00\)\(\ \ \)\(and\ \)\(\ \)\(half\)\(\ \)\(the\)\(\ \)\(time\)\(\ \)\(we\)\(\ \)\(get\)\(\ \ \)\(01\)\(\ \ \)\)\)], "Input", Evaluatable->False], Cell[BoxData[{ \(\(\(If\ \ \ \ f \((0)\)\ \ \[NotEqual] \ f \((1)\); \ then\ we\ get\)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(\(|\)\(1 > \ \(\[CircleTimes]\((\(|\)\(0 > \ \ +\)\(\ \ \)\(|\)\(\(1\)\(>\)\))\)\)\)\)\ \), "\[IndentingNewLine]", \(\(\(\((\ \(\(-"\<<0|1\[CirclePlus]f(0)>\>"\) + \ "\<<0|1\[CirclePlus]f(1)>\>" + "\<<0|f(0)>\>" - "\<<0|f(1)>\>"\)\/\@2)\) = \(\ \(|\)\(1 > \ \(\[CircleTimes]\((\(|\)\(0 > \ \ +\)\(\ \ \)\(|\)\(\(1\)\(>\)\))\)\ /\@2\)\)\)\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(In\ \ \ a\ \ measurement\ \ \ \ half\ the\ time\ we\ get\ \ \ 10\ \ and\ \ half\ the\ time\ we\ get\ 11\ \ \), "\[IndentingNewLine]", \(\)}], "Input", Evaluatable->False], Cell[BoxData[{ \(In\ a\ single\ quantum\ computation\ we\ can\ figure\ out\ \ whether\ \ we\ have\ \(f\_1\) \((x)\), \(f\_2\) \((x)\)\ \((case\ 1)\)\), "\ \[IndentingNewLine]", \(or\ \ \(f\_3\) \((x)\)\ \ \ \ \(f\_4\) \((x)\)\ \ \((case\ II)\)\)}], \ "Input", Evaluatable->False], Cell[BoxData[ \(This\ is\ not\ too\ impressive\ since\ one\ classical\ calculation\ can\ \ also\ tell\ us\ similar\ information, \[IndentingNewLine]however\ \ Quantum\ \ parallelism\ can\ be\ exploited\ efficiently\ for\ higer\ dimensional\ \ qubits . \[IndentingNewLine]\[IndentingNewLine]Quantum\ Fourier\ \ Transform\)], "Input", Evaluatable->False] }, FrontEndVersion->"4.1 for X", ScreenRectangle->{{0, 1280}, {0, 1024}}, WindowSize->{899, 636}, WindowMargins->{{Automatic, 89}, {Automatic, 87}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1705, 50, 117, 3, 43, "Input"], Cell[1825, 55, 238, 6, 53, "Input"], Cell[2066, 63, 2289, 40, 555, "Input", Evaluatable->False], Cell[4358, 105, 410, 8, 107, "Input", Evaluatable->False], Cell[4771, 115, 146, 3, 27, "Input", Evaluatable->False], Cell[4920, 120, 493, 9, 75, "Input", Evaluatable->False], Cell[5416, 131, 57, 2, 27, "Input", Evaluatable->False], Cell[5476, 135, 872, 18, 141, "Input", Evaluatable->False], Cell[6351, 155, 660, 11, 77, "Input", Evaluatable->False], Cell[7014, 168, 264, 5, 43, "Input", Evaluatable->False], Cell[7281, 175, 112, 2, 27, "Input", Evaluatable->False], Cell[7396, 179, 62, 2, 27, "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[7483, 185, 188, 3, 43, "Input"], Cell[7674, 190, 345, 9, 94, "Output"] }, Open ]], Cell[8034, 202, 131, 3, 43, "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[8190, 209, 229, 4, 43, "Input"], Cell[8422, 215, 373, 9, 94, "Output"] }, Open ]], Cell[8810, 227, 83, 2, 27, "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[8918, 233, 188, 3, 43, "Input"], Cell[9109, 238, 345, 9, 94, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9491, 252, 300, 5, 59, "Input"], Cell[9794, 259, 373, 9, 94, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10204, 273, 128, 2, 43, "Input"], Cell[10335, 277, 491, 9, 94, "Output"] }, Open ]], Cell[10841, 289, 88, 2, 27, "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[10954, 295, 176, 3, 59, "Input"], Cell[11133, 300, 46, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[11216, 306, 71, 2, 27, "Input", Evaluatable->False], Cell[11290, 310, 64, 1, 27, "Output"] }, Open ]], Cell[11369, 314, 786, 14, 108, "Input", Evaluatable->False], Cell[12158, 330, 189, 4, 43, "Input", Evaluatable->False], Cell[12350, 336, 211, 4, 33, "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[12586, 344, 65, 1, 33, "Input"], Cell[12654, 347, 56, 1, 48, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[12747, 353, 60, 1, 27, "Input"], Cell[12810, 356, 109, 2, 48, "Output"] }, Open ]], Cell[12934, 361, 360, 6, 66, "Input", Evaluatable->False], Cell[13297, 369, 157, 4, 33, "Input", Evaluatable->False], Cell[13457, 375, 236, 5, 43, "Input", Evaluatable->False], Cell[CellGroupData[{ Cell[13718, 384, 75, 1, 27, "Input"], Cell[13796, 387, 79, 1, 48, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13912, 393, 87, 1, 27, "Input"], Cell[14002, 396, 212, 4, 44, "Output"] }, Open ]], Cell[14229, 403, 61, 1, 27, "Input"], Cell[CellGroupData[{ Cell[14315, 408, 84, 1, 27, "Input"], Cell[14402, 411, 157, 2, 48, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14596, 418, 161, 4, 43, "Input"], Cell[14760, 424, 2303, 41, 154, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17100, 470, 45, 1, 27, "Input"], Cell[17148, 473, 424, 6, 90, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17609, 484, 74, 1, 27, "Input"], Cell[17686, 487, 46, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17769, 493, 63, 1, 27, "Input"], Cell[17835, 496, 444, 6, 90, "Output"] }, Open ]], Cell[18294, 505, 1081, 18, 297, "Input", Evaluatable->False], Cell[19378, 525, 589, 9, 113, "Input", Evaluatable->False], Cell[19970, 536, 568, 10, 197, "Input", Evaluatable->False], Cell[20541, 548, 102, 2, 27, "Input", Evaluatable->False], Cell[20646, 552, 361, 6, 50, "Input", Evaluatable->False], Cell[21010, 560, 298, 5, 27, "Input", Evaluatable->False], Cell[21311, 567, 770, 14, 169, "Input", Evaluatable->False], Cell[22084, 583, 290, 6, 43, "Input", Evaluatable->False], Cell[22377, 591, 358, 6, 75, "Input", Evaluatable->False] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)