|
159 | 159 | "$I$ operators in the Pauli product terms\n", |
160 | 160 | "</h3>\n", |
161 | 161 | "\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", |
163 | 163 | "\n", |
164 | 164 | "$$e^{i\\sigma_z \\otimes I \\otimes \\sigma_z t} = CNOT^{(1,3)}R_z^{(3)}(-2t)CNOT^{(1,3)}$$\n", |
165 | 165 | "\n", |
166 | | - "For the left side we have:\n", |
| 166 | + "For the left side, we have:\n", |
167 | 167 | "\n", |
168 | 168 | "$$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", |
169 | 169 | "\n", |
|
177 | 177 | "&= \\cos(t) I \\otimes I \\otimes I + \\sin(t) \\sigma_z \\otimes I \\otimes \\sigma_z\n", |
178 | 178 | "\\end{align}\n", |
179 | 179 | "\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", |
181 | 181 | "\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", |
183 | 183 | "\n", |
184 | 184 | "\\begin{align}\n", |
185 | 185 | "&e^{i I \\otimes P \\otimes I t} = \\cos(t) I \\otimes I \\otimes I + i\\sin(t) I \\otimes P \\otimes I \n", |
186 | 186 | "\\\\\n", |
187 | 187 | "&= I \\otimes \\big( \\cos(t) I + i \\sin(t) P \\big) \\otimes = I \\otimes e^{i P t} \\otimes I\n", |
188 | 188 | "\\end{align}\n", |
189 | 189 | "\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", |
191 | 191 | "\n", |
192 | 192 | " [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", |
193 | 193 | " [2]: https://quantumcomputing.stackexchange.com/questions/8725/can-arbitrary-matrices-be-decomposed-using-the-pauli-basis\n", |
|
206 | 206 | "Controlled version of $e^{iHt}$\n", |
207 | 207 | "</h3>\n", |
208 | 208 | "\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", |
210 | 210 | "\n", |
211 | 211 | "<img src=\"images/exp_pauli_and_controled.png\" alt=\"drawing\" width=\"670\"/>\n", |
212 | 212 | "\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", |
214 | 214 | "\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", |
216 | 216 | "\n", |
217 | 217 | "$$ 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", |
218 | 218 | "\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", |
220 | 220 | "\n", |
221 | 221 | "$$u1(t) = \\begin{pmatrix} 1 & 0 \\\\ 0 & e^{it}\\end{pmatrix}$$\n", |
222 | 222 | "\n", |
|
251 | 251 | "\\end{pmatrix}\n", |
252 | 252 | "\\end{equation*}\n", |
253 | 253 | "\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", |
255 | 255 | "\n", |
256 | 256 | "Firstly we should define what Hamiltonian we want to simulate. Let's do simulation for this Hamiltonian:\n", |
257 | 257 | "\n", |
|
0 commit comments