Skip to content

Commit 885fc05

Browse files
committed
update
1 parent 2d111a4 commit 885fc05

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/source/tutorials/qaoa_nae3sat.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"id": "b533d43e",
2222
"metadata": {},
2323
"source": [
24-
"Quantum Approximation Optimization Algorithm (QAOA) is a hybrid classical-quantum algorithm used for solving the combinatorial optimization problem, which is proposed by [Farhi, Goldstone, and Gutmann (2014)](https://arxiv.org/abs/1411.4028). In QAOA, the parameterized quantum circuit is regarded as an oracle, we sample the circuit to obtain the gradient of the parameters, and update them through the classical optimizer. Before this tutorial, there was already a tutorial of [QAOA for Max-Cut](qaoa.ipynb). In this tutorial, we will focus on another combinatorial optimization problem - Not-all-equal 3-satisfiability (NAE3SAT), and discuss the performance of QAOA in different hardness cases.\n"
24+
"Quantum Approximation Optimization Algorithm (QAOA) is a hybrid classical-quantum algorithm used for solving the combinatorial optimization problem, which is proposed by [Farhi, Goldstone, and Gutmann (2014)](https://arxiv.org/abs/1411.4028). In QAOA, the parameterized quantum circuit is regarded as an oracle, we sample the circuit to obtain the gradient of the parameters, and update them through the classical optimizer. Before this tutorial, there was already a tutorial of [QAOA for Max-Cut](qaoa.ipynb). In this tutorial, we will focus on another combinatorial optimization problem - Not-all-equal 3-satisfiability (NAE3SAT), and discuss the performance of QAOA in different hardness cases."
2525
]
2626
},
2727
{
@@ -49,7 +49,7 @@
4949
" (x_1\\lor x_2\\lor x_m)\\land(\\lnot x_5\\lor x_9\\lor x_m)\\land\\cdots\\land(x_m\\lor \\lnot x_{m+3}\\lor \\lnot x_n).\n",
5050
"\\end{equation}\n",
5151
"$$\n",
52-
"When $k$ is not less than 3, SAT is NP-complete. On the other hand, NAE3SAT requires the three literals in each clause are not all equal to each other, in other words, at least one is true, and at least one is false. It is different from 3-SAT, which requires at least one literal is true in each clause. However, NAE3SAT is still NP-complete, [which can be proven by a reduction from 3-SAT](https://en.wikipedia.org/wiki/Not-all-equal_3-satisfiability).\n"
52+
"When $k$ is not less than 3, SAT is NP-complete. On the other hand, NAE3SAT requires the three literals in each clause are not all equal to each other, in other words, at least one is true, and at least one is false. It is different from 3-SAT, which requires at least one literal is true in each clause. However, NAE3SAT is still NP-complete, [which can be proven by a reduction from 3-SAT](https://en.wikipedia.org/wiki/Not-all-equal_3-satisfiability)."
5353
]
5454
},
5555
{
@@ -94,7 +94,7 @@
9494
" U(\\boldsymbol{\\beta}, \\boldsymbol{\\gamma}) = V_{p}U_{p} \\cdots V_{1}U_{1},\n",
9595
"\\end{equation}\n",
9696
"$$\n",
97-
"where $U_{j}= e^{-i\\gamma_{j}\\hat{H}_{C}}$ is the driving layer and $V_{j}= e^{-i \\beta_{j} \\hat{H}_m}$ is the mixing layer. $H_C$ is the driving and cost Hamiltonian introduced in previous section and the mixing Hamiltonian $\\hat{H}_m=\\sum_{j=1}^{n}\\sigma_j^x$ is used to mix the quantum state to explore different solutions. The unitary operator is parameterized by $2p$ angle parameters $\\gamma_1, \\gamma_2, \\dots, \\gamma_p$ and $\\beta_1, \\beta_2, \\dots ,\\beta_p$ and each $\\gamma$ and $\\beta$ are restricted to lie between $0$ and $2\\pi$."
97+
"where $U_{j}= e^{-\\text{i}\\gamma_{j}\\hat{H}_{C}}$ is the driving layer and $V_{j}= e^{-\\text{i}\\beta_{j} \\hat{H}_m}$ is the mixing layer. $H_C$ is the driving and cost Hamiltonian introduced in previous section and the mixing Hamiltonian $\\hat{H}_m=\\sum_{j=1}^{n}\\sigma_j^x$ is used to mix the quantum state to explore different solutions. The unitary operator is parameterized by $2p$ angle parameters $\\gamma_1, \\gamma_2, \\dots, \\gamma_p$ and $\\beta_1, \\beta_2, \\dots ,\\beta_p$ and each $\\gamma$ and $\\beta$ are restricted to lie between $0$ and $2\\pi$."
9898
]
9999
},
100100
{
@@ -179,7 +179,7 @@
179179
}
180180
],
181181
"source": [
182-
"# a easy graph instance\n",
182+
"# an easy graph instance\n",
183183
"easy_clauses = [[4, 7, 6], [0, 5, 9], [2, 6, 9], [2, 6, 7], [3, 1, 9], [5, 9, 11], [4, 8, 9], [5, 1, 9], [3, 8, 6], [2, 8, 10], [5, 6, 8], [2, 9, 6], [2, 6, 8], [5, 3, 9], [4, 11, 7], [3, 11, 10], [5, 10, 7], [3, 9, 8], [3, 6, 9], [2, 4, 7], [4, 0, 6], [3, 4, 6], [3, 11, 6], [4, 5, 6], [4, 0, 10], [5, 4, 10], [3, 7, 9], [0, 11, 6], [5, 11, 9], [3, 5, 9], [3, 4, 7], [3, 4, 7], [3, 0, 7], [1, 7, 8], [0, 3, 10], [0, 8, 9], [5, 7, 8], [2, 9, 6], [0, 8, 6], [4, 6, 8], [3, 2, 9], [4, 3, 8], [0, 2, 8], [4, 5, 10], [2, 4, 8], [5, 8, 9], [4, 8, 9], [3, 5, 11], [5, 4, 10], [2, 7, 9], [3, 0, 7], [2, 8, 6], [5, 3, 6], [0, 6, 10], [3, 2, 8], [4, 6, 9], [3, 2, 6], [1, 5, 6], [2, 8, 11], [2, 10, 8], [2, 0, 6], [2, 6, 9], [0, 8, 7], [0, 10, 8], [3, 5, 7], [2, 10, 8], [5, 7, 9], [0, 1, 6], [0, 3, 8], [0, 6, 9], [0, 5, 11], [1, 2, 10]]\n",
184184
"factor = 1 / len(easy_clauses) / 4\n",
185185
"\n",

docs/source/tutorials/qaoa_quantum_dropout.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{
2222
"cell_type": "markdown",
2323
"source": [
24-
"Quantum Approximation Optimization Algorithm (QAOA) is a hybrid classical-quantum algorithm used for solving the combinatorial optimization problem, which is proposed by [Farhi, Goldstone, and Gutmann (2014)](https://arxiv.org/abs/1411.4028). In the [previous tutorial](qaoa_nae3sat.ipynb), we introduced solving the [Not-all-equal 3-satisfiability (NAE3SAT)](https://en.wikipedia.org/wiki/Not-all-equal_3-satisfiability) by QAOA and the dilemma of QAOA on the hard problem. In this tutorial, we will introduce a simple trick to alleviate this dilemma, namely quantum dropout, please refer to [Wang, Zheng, Wu, and Zhang (2023)](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.023171) for more details.\n"
24+
"Quantum Approximation Optimization Algorithm (QAOA) is a hybrid classical-quantum algorithm used for solving the combinatorial optimization problem, which is proposed by [Farhi, Goldstone, and Gutmann (2014)](https://arxiv.org/abs/1411.4028). In the [previous tutorial](qaoa_nae3sat.ipynb), we introduced solving the [Not-all-equal 3-satisfiability (NAE3SAT)](https://en.wikipedia.org/wiki/Not-all-equal_3-satisfiability) by QAOA and the dilemma of QAOA on the hard problem. In this tutorial, we will introduce a simple trick to alleviate this dilemma, namely quantum dropout, please refer to [Wang, Zheng, Wu, and Zhang (2023)](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.023171) for more details."
2525
],
2626
"metadata": {
2727
"collapsed": false

0 commit comments

Comments
 (0)