Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,16 @@
"\n",
"$$\n",
"M_a \\vert \\psi_1 \\rangle\n",
"= \\sum_{k = 0}^{r-1} \\omega_r^{-k} M_a\\vert a^k \\rangle\n",
"= \\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^{k+1} \\rangle\n",
"= \\sum_{k = 1}^{r} \\omega_r^{-(k - 1)} \\vert a^{k} \\rangle\n",
"= \\omega_r \\sum_{k = 1}^{r} \\omega_r^{-k} \\vert a^{k} \\rangle\n",
"= \\frac{1}{\\sqrt{r}}\\sum_{k = 0}^{r-1} \\omega_r^{-k} M_a\\vert a^k \\rangle\n",
"= \\frac{1}{\\sqrt{r}}\\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^{k+1} \\rangle\n",
"= \\frac{1}{\\sqrt{r}}\\sum_{k = 1}^{r} \\omega_r^{-(k - 1)} \\vert a^{k} \\rangle\n",
"= \\frac{1}{\\sqrt{r}}\\omega_r \\sum_{k = 1}^{r} \\omega_r^{-k} \\vert a^{k} \\rangle\n",
"$$\n",
"\n",
"Then, because $\\omega_r^{-r} = 1 = \\omega_r^0$ and $\\vert a^r \\rangle = \\vert 1\\rangle = \\vert a^0\\rangle,$ we see that\n",
"\n",
"$$\n",
"\\sum_{k = 1}^{r} \\omega_r^{-k} \\vert a^{k} \\rangle = \\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^k \\rangle\n",
"\\frac{1}{\\sqrt{r}}\\sum_{k = 1}^{r} \\omega_r^{-k} \\vert a^{k} \\rangle = \\frac{1}{\\sqrt{r}}\\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^k \\rangle\n",
"= \\vert\\psi_1\\rangle,\n",
"$$\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
"\\det(\\tilde{A}_2-\\lambda I)=0\n",
"$$\n",
"$$\n",
"\\begin{vmatrix}4-\\lambda&1&0\\\\1&4-\\lambda&1\\\\0&1&4-\\lambda\\end{vmatrix} = (4-\\lambda)((4-\\lambda)^3-1)-(4-\\lambda)=0\\\\\n",
"\\begin{vmatrix}4-\\lambda&1&0\\\\1&4-\\lambda&1\\\\0&1&4-\\lambda\\end{vmatrix} = (4-\\lambda)((4-\\lambda)^2-1)-(4-\\lambda)=0\\\\\n",
"$$\n",
"$$\n",
"4-\\lambda=0,4-\\lambda=±2^{1/2}→\\lambda=4-2^{1/2},4,4+2^{1/2}≈2.59,4,5.41\n",
Expand Down
4 changes: 2 additions & 2 deletions learning/modules/computer-science/qft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"\n",
"$$ | \\phi_y \\rangle = \\frac{1}{\\sqrt{N}}\\sum_{x=0}^{N-1}\\omega_N^{y x} \\vert x \\rangle$$\n",
"\n",
"with $\\omega_N^{yx} = e^{\\frac{2\\pi y x}{N}}$ as above, and $N$ is the number of basis states in your quantum system. Note that, since we're working with qubits now, $m$ qubits gives you $2^m$ basis states, so $N=2^m$. Here, the basis states are written as a single number $|x\\rangle$ where $x$ ranges from $0$ to $N-1$, but you might more typically see the basis states expressed as $|00...00\\rangle$, $|00...01\\rangle$, $|00...11\\rangle$, ..., $|11...11\\rangle$, where each binary digit represents the state of qubit 0 through $m-1$, from right to left. There's an easy way to convert these binary states to a single number: simply treat them like binary numbers! So, $|00...00\\rangle = |0\\rangle$, $|00...01\\rangle = |1\\rangle$, $|00...10\\rangle = |2\\rangle$, $|00...11\\rangle = |3\\rangle$, and so on, all the way up to $|11...11\\rangle = |2^m -1\\rangle = |N-1\\rangle$."
"with $\\omega_N^{yx} = e^{\\frac{2\\pi i y x}{N}}$ as above, and $N$ is the number of basis states in your quantum system. Note that, since we're working with qubits now, $m$ qubits gives you $2^m$ basis states, so $N=2^m$. Here, the basis states are written as a single number $|x\\rangle$ where $x$ ranges from $0$ to $N-1$, but you might more typically see the basis states expressed as $|00...00\\rangle$, $|00...01\\rangle$, $|00...11\\rangle$, ..., $|11...11\\rangle$, where each binary digit represents the state of qubit 0 through $m-1$, from right to left. There's an easy way to convert these binary states to a single number: simply treat them like binary numbers! So, $|00...00\\rangle = |0\\rangle$, $|00...01\\rangle = |1\\rangle$, $|00...10\\rangle = |2\\rangle$, $|00...11\\rangle = |3\\rangle$, and so on, all the way up to $|11...11\\rangle = |2^m -1\\rangle = |N-1\\rangle$."
]
},
{
Expand Down Expand Up @@ -159,7 +159,7 @@
"\n",
"\n",
"\n",
"In general, for an $n$-qubit state, there will be $2^n$ Fourier basis states, whose frequency in phase variation ranges from constant, for $|\\phi_0\\rangle$, to rapidly varying for $|\\phi_{2^n-1}\\rangle$, completing $2^n-1$ windings around $2\\pi$ over the superposition of states. So, when we take a QFT of a quantum state, we're essentially doing the same basic analysis that we did for the musical waveform in the Intro. We're determining the Fourier frequency components that contribute to creating the quantum state of interest.\n",
"In general, for an $m$-qubit state, there will be $2^m$ Fourier basis states, whose frequency in phase variation ranges from constant, for $|\\phi_0\\rangle$, to rapidly varying for $|\\phi_{2^m-1}\\rangle$, completing $2^m-1$ windings around $2\\pi$ over the superposition of states. So, when we take a QFT of a quantum state, we're essentially doing the same basic analysis that we did for the musical waveform in the Intro. We're determining the Fourier frequency components that contribute to creating the quantum state of interest.\n",
"\n",
"### Try some example QFTs\n",
"\n",
Expand Down
Loading