Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix document site design #39

Merged
merged 4 commits into from
May 10, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix tutorial
Jacomichi committed May 8, 2024
commit 39478d5a70e0a47361c3d781a430f5757fd77b52
6 changes: 3 additions & 3 deletions docs/tutorial/alternating_ansatz_graph_coloring_qiskit.ipynb
Original file line number Diff line number Diff line change
@@ -145,13 +145,13 @@
"# Quantum Approximate Optimazation Algorithm (QAOA)\n",
"The Quantum Approximate Optimization Algorithm (QAOA) is one of the quantum optimization algorithms that use a variational quantum circuit. For a detailed explanation, please refer to paper [1], but here we will only give a rough overview.\n",
"In QAOA, a variational quantum circuit is constructed by applying the Ising Hamiltonian $H_P = \\sum_{ij}J_{ij}Z_iZ_j$ and the $X$-mixer Hamiltonian $H_M = \\sum_iX_i$ in the following way:\n",
"If we start with an initial state $\\ket{\\psi_0}$, then\n",
"$$\\ket{\\psi(\\beta,\\gamma)} = e^{-\\beta_pH_M}e^{-\\gamma_pH_P}\\cdots e^{-\\beta_1H_M}e^{-\\gamma_1H_P}\\ket{\\psi_0}$$\n",
"If we start with an initial state $|\\psi_0\\rangle$, then\n",
"$$|\\psi(\\beta,\\gamma)\\rangle = e^{-\\beta_pH_M}e^{-\\gamma_pH_P}\\cdots e^{-\\beta_1H_M}e^{-\\gamma_1H_P}|\\psi_0\\rangle$$\n",
"can be written. Here, $\\beta_k,\\gamma_k$ are the parameters to be optimized, and since the operation $e^{-\\beta_kH_M}e^{-\\gamma_kH_P}$ is repeated $p$ times, there are a total of $2p$ parameters. In the standard QAOA, the total number of parameters is independent of the number of qubits and depends only on the number of repetitions.\n",
"\n",
"Optimization of $\\beta_k,\\gamma_k$ is performed by repeating the following steps 1 and 2:\n",
"\n",
"1. Compute the expectation value $\\bra{\\psi(\\beta,\\gamma)}H_P\\ket{\\psi(\\beta,\\gamma)}$ on a quantum device.\n",
"1. Compute the expectation value $\\langle\\psi(\\beta,\\gamma)|H_P|\\psi(\\beta,\\gamma)\\rangle$ on a quantum device.\n",
"2. Update the parameters on a classical computer to minimize the expectation value.\n",
"\n",
"By repeating this calculation of the expectation value on the quantum computer and optimization of parameters on the classical computer, we obtain the minimum energy $\\langle H_P \\rangle$ and the corresponding final state. If we consider QAOA as a mathematical optimization algorithm, this minimum energy corresponds to the minimum objective function value, and the final state becomes the optimal solution."
17 changes: 10 additions & 7 deletions docs/tutorial/alternating_ansatz_graph_coloring_quri.ipynb
Original file line number Diff line number Diff line change
@@ -145,13 +145,13 @@
"# Quantum Approximate Optimazation Algorithm (QAOA)\n",
"The Quantum Approximate Optimization Algorithm (QAOA) is one of the quantum optimization algorithms that use a variational quantum circuit. For a detailed explanation, please refer to paper [1], but here we will only give a rough overview.\n",
"In QAOA, a variational quantum circuit is constructed by applying the Ising Hamiltonian $H_P = \\sum_{ij}J_{ij}Z_iZ_j$ and the $X$-mixer Hamiltonian $H_M = \\sum_iX_i$ in the following way:\n",
"If we start with an initial state $\\ket{\\psi_0}$, then\n",
"$$\\ket{\\psi(\\beta,\\gamma)} = e^{-\\beta_pH_M}e^{-\\gamma_pH_P}\\cdots e^{-\\beta_1H_M}e^{-\\gamma_1H_P}\\ket{\\psi_0}$$\n",
"If we start with an initial state $|\\psi_0\\rangle$, then\n",
"$$|\\psi(\\beta,\\gamma)\\rangle = e^{-\\beta_pH_M}e^{-\\gamma_pH_P}\\cdots e^{-\\beta_1H_M}e^{-\\gamma_1H_P}|\\psi_0\\rangle$$\n",
"can be written. Here, $\\beta_k,\\gamma_k$ are the parameters to be optimized, and since the operation $e^{-\\beta_kH_M}e^{-\\gamma_kH_P}$ is repeated $p$ times, there are a total of $2p$ parameters. In the standard QAOA, the total number of parameters is independent of the number of qubits and depends only on the number of repetitions.\n",
"\n",
"Optimization of $\\beta_k,\\gamma_k$ is performed by repeating the following steps 1 and 2:\n",
"\n",
"1. Compute the expectation value $\\bra{\\psi(\\beta,\\gamma)}H_P\\ket{\\psi(\\beta,\\gamma)}$ on a quantum device.\n",
"1. Compute the expectation value $\\langle\\psi(\\beta,\\gamma)|H_P|\\psi(\\beta,\\gamma)\\rangle$ on a quantum device.\n",
"2. Update the parameters on a classical computer to minimize the expectation value.\n",
"\n",
"By repeating this calculation of the expectation value on the quantum computer and optimization of parameters on the classical computer, we obtain the minimum energy $\\langle H_P \\rangle$ and the corresponding final state. If we consider QAOA as a mathematical optimization algorithm, this minimum energy corresponds to the minimum objective function value, and the final state becomes the optimal solution."
@@ -769,11 +769,14 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": []
"source": [
"## References\n",
"[1] E. Farhi et al., \"A Quantum Approximate Optimization Algorithm\" arXiv (2014)\n",
"\n",
"[2] S. Hadfield et al., \"From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz\", algorithms (2019)"
]
}
],
"metadata": {