Skip to content

Commit b067e18

Browse files
committed
review HS
1 parent e946705 commit b067e18

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Hamiltonian_simulation.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@
159159
"$I$ operators in the Pauli product terms\n",
160160
"</h3>\n",
161161
"\n",
162-
"Here we will try to show that we can ignore $I$ operators in the Pauli products when we try to construct circuits for them. For example, we will take $\\sigma_z \\otimes I \\otimes \\sigma_z$ operator and show that we can forget about the second qubit and simulate the circuit for $e^{i\\sigma_z \\otimes \\sigma_z t}$ applied on the first and third qubits. We should proof that:\n",
162+
"Here we will show that we can ignore $I$ operators in the Pauli products when we construct the circuits for $e^{iPt}$ terms. For example, let's take $\\sigma_z \\otimes I \\otimes \\sigma_z$ operator and show that we can forget about the second qubit and simulate the circuit for $e^{i\\sigma_z \\otimes \\sigma_z t}$ applied on the first and the third qubits. We should proof that:\n",
163163
"\n",
164164
"$$e^{i\\sigma_z \\otimes I \\otimes \\sigma_z t} = CNOT^{(1,3)}R_z^{(3)}(-2t)CNOT^{(1,3)}$$\n",
165165
"\n",
166-
"For the left side we have:\n",
166+
"For the left side, we have:\n",
167167
"\n",
168168
"$$e^{i\\sigma_z \\otimes I \\otimes \\sigma_z t} = \\cos(t) I \\otimes I \\otimes I + \\sin(t) \\sigma_z \\otimes I \\otimes \\sigma_z$$\n",
169169
"\n",
@@ -177,17 +177,17 @@
177177
"&= \\cos(t) I \\otimes I \\otimes I + \\sin(t) \\sigma_z \\otimes I \\otimes \\sigma_z\n",
178178
"\\end{align}\n",
179179
"\n",
180-
"So, they are equal to each other: we can forget about $I$ operator for constructing a circuit in this case. This solution can be generalized for $n$ $I$ operators between two $\\sigma_z$ terms.\n",
180+
"So, as one can see they are equal to each other: we can forget about $I$ operator for constructing a circuit in this case. This solution can be generalized for $n$ $I$ operators between two $\\sigma_z$ terms.\n",
181181
"\n",
182-
"Also, let's proof that $I \\otimes P \\otimes I$ can be simulated by $e^{i I \\otimes P \\otimes I t} = I \\otimes e^{i P t} \\otimes I$, where $P$ is some Pauli product:\n",
182+
"Also, let's proof that $e^{i I \\otimes P \\otimes I t} = I \\otimes e^{i P t} \\otimes I$, where $P$ is some Pauli term:\n",
183183
"\n",
184184
"\\begin{align}\n",
185185
"&e^{i I \\otimes P \\otimes I t} = \\cos(t) I \\otimes I \\otimes I + i\\sin(t) I \\otimes P \\otimes I \n",
186186
"\\\\\n",
187187
"&= I \\otimes \\big( \\cos(t) I + i \\sin(t) P \\big) \\otimes = I \\otimes e^{i P t} \\otimes I\n",
188188
"\\end{align}\n",
189189
"\n",
190-
"In this manner it can be shown for general cases that we can ignore $I$ operators when we simulate Pauli terms in the quantum circuits.\n",
190+
"In this manner, it can be shown for general cases that $I$ operators in $P$ Pauli terms can be ignored for constructing circuits for $e^{iPt}$.\n",
191191
"\n",
192192
" [1]: https://www.cambridge.org/am/academic/subjects/physics/quantum-physics-quantum-information-and-quantum-computation/quantum-computation-and-quantum-information-10th-anniversary-edition?format=HB\n",
193193
" [2]: https://quantumcomputing.stackexchange.com/questions/8725/can-arbitrary-matrices-be-decomposed-using-the-pauli-basis\n",
@@ -206,17 +206,17 @@
206206
"Controlled version of $e^{iHt}$\n",
207207
"</h3>\n",
208208
"\n",
209-
"Often in the algorithms (e.g. in HHL or PEA), we want to construct not the circuit for Hamiltonian simulation $e^{iHt}$, but the controlled version of it. First of all, note that if we have $ABC$ circuit, where $A$, $B$ and $C$ are operators, then the controlled version of that circuit will equal $cA$ $cB$ $cC$, where $c$ denotes control version of an operator. We already know that $e^{iHt}$ consists of $e^{iPt}$ terms, where $P$ is some Pauli product. So, for solving the problem we should find a way for constructing controlled versions of $e^{iPt}$ terms. Here is a general form for the circuit that implements any given $e^{iPt}$ and the controlled version of it (like was done similarly in this paper [[3]]):\n",
209+
"Often in the algorithms (e.g. in HHL or [QPE][4]), we need to construct not the circuit for Hamiltonian simulation $e^{iHt}$, but the controlled version of it. First of all, note that if we have $U = ABC$ circuit, where $A$, $B$ and $C$ are operators, then the controlled version of that circuit will equal $cU = cA cB cC$, where $c$ denotes control version of an operator. We already know that $e^{iHt}$ consists of $e^{iPt}$ terms, where $P$ is a Pauli term. So, for solving the problem the controlled versions of $e^{iPt}$ terms should be constructed. Here is a general form for the circuit that implements any given $e^{iPt}$ and the controlled version of it (like was done in the paper [[3]]):\n",
210210
"\n",
211211
"<img src=\"images/exp_pauli_and_controled.png\" alt=\"drawing\" width=\"670\"/>\n",
212212
"\n",
213-
"where $O_i$ are gates from this set $\\{I, H, H_y\\}$, and they are chosen differently for each Pauli term. The right circuit in the picture implements the controlled version of the $e^{iPt}$, because, if control qubit is in the $|0\\rangle$ state the $R_z$ gate will not work and the rest gates will cancel each other (they are self-inverse gates). \n",
213+
"where $O_i$ are gates from this set $\\{I, H, H_y\\}$, and they are chosen differently for each Pauli term. The right circuit in the picture implements the controlled version of the $e^{iPt}$, because, if control qubit is in the $|0\\rangle$ state the $R_z$ gate will not work and the rest gates will cancel each other (they are self-inverse gates) [[3]]. \n",
214214
"\n",
215-
"When we are talking about the controlled version of the circuit we shouldn't forget about $e^{iIt}$ term (the global phase in the $e^{iHt}$). We should also construct a circuit that implements controlled version of $e^{iIt}$. Let's call it controlled-global phase ($CGP$) gate and try to implement it. The effect of $CGP$ for controlled qubit $\\alpha|0_c\\rangle + \\beta|1_c\\rangle$ acting on multi-qubit $| \\psi \\rangle$ state:\n",
215+
"For $e^{iHt}$ the circuit for $e^{iIt}$ wasn't implemented above, because it corresponds to a global phase gate. In contrast, the controlled-$e^{iIt}$ in the controlled-$e^{iHt}$ is not a global phase and it also should be implemented. Let's call it controlled-global phase gate ($CGP$). The effect of $CGP$ for controlled qubit $\\alpha|0_c\\rangle + \\beta|1_c\\rangle$ acting on multi-qubit $| \\psi \\rangle$ state:\n",
216216
"\n",
217217
"$$ CGP \\left( \\alpha|0_c\\rangle + \\beta|1_c\\rangle \\right) |\\psi\\rangle = \\left( \\alpha|0_c\\rangle + e^{it}\\beta|1_c\\rangle \\right) |\\psi\\rangle$$\n",
218218
"\n",
219-
"where $t$ is the phase. This action can be done just by one Qiskit's [u1][6] phase gate acting on the control qubit [[1]]:\n",
219+
"This action can be done just by one Qiskit's [u1][6] phase gate acting on the control qubit [[1]]:\n",
220220
"\n",
221221
"$$u1(t) = \\begin{pmatrix} 1 & 0 \\\\ 0 & e^{it}\\end{pmatrix}$$\n",
222222
"\n",
@@ -251,7 +251,7 @@
251251
"\\end{pmatrix}\n",
252252
"\\end{equation*}\n",
253253
"\n",
254-
"So, in the code we will use $u2(\\frac{\\pi}{2}, \\frac{\\pi}{2})$ gate for implementing $H_y$. For $H$ gate we can use either `.h()` or `.u2()` and for better readability we will use `.h()` in the code.\n",
254+
"That is why we will implement $H_y$ with $u2(\\frac{\\pi}{2}, \\frac{\\pi}{2})$ gate in the code. For $H$ gate we can use either `h` or $u2(0, \\pi)$.\n",
255255
"\n",
256256
"Firstly we should define what Hamiltonian we want to simulate. Let's do simulation for this Hamiltonian:\n",
257257
"\n",

0 commit comments

Comments
 (0)