Skip to content

Commit dae587f

Browse files
committed
update
1 parent 885fc05 commit dae587f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/source/tutorials/qaoa_nae3sat.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@
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^{-\\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$."
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. $\\hat{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
{
101101
"cell_type": "markdown",
102102
"id": "949be36e",
103103
"metadata": {},
104104
"source": [
105-
"Begin with a set of initial $\\boldsymbol{\\gamma}$ and $\\boldsymbol{\\beta}$, the quantum state is obtained from the PQC and then the expectation value of $H_C$ is calculated. A classical optimizer is then used to vary the parameters until a lower expectation value is found. This process is iterated a certain number of times until the expectation value of $H_C$ is approximated to 0. Then we perform projective measurement on the quantum state output by PQC, and obtain a bit string, which is very likely to be the solution of NAE3SAT. Since NAE3SAT is an NP-complete problem, we can verify whether the solution is correct in polynomial time on classical computer. Even if this bit string is not the correct solution, we can repeat the projective measurement and verify the obtained solution until we get the correct solution.\n",
105+
"Begin with a set of initial $\\boldsymbol{\\gamma}$ and $\\boldsymbol{\\beta}$, the quantum state is obtained from the PQC and then the expectation value of $\\hat{H}_C$ is calculated. A classical optimizer is then used to vary the parameters until a lower expectation value is found. This process is iterated a certain number of times until the expectation value of $\\hat{H}_C$ is approximated to 0. Then we perform projective measurement on the quantum state output by PQC, and obtain a bit string, which is very likely to be the solution of NAE3SAT. Since NAE3SAT is an NP-complete problem, we can verify whether the solution is correct in polynomial time on classical computer. Even if this bit string is not the correct solution, we can repeat the projective measurement and verify the obtained solution until we get the correct solution.\n",
106106
"\n",
107107
"For other details of QAOA, such as the selection of $p$ and the overall algorithm loop, please refer to [Farhi, Goldstone, and Gutmann (2014)](https://arxiv.org/abs/1411.4028) or the tutorial of [QAOA for Max-Cut](qaoa.ipynb)."
108108
]

docs/source/tutorials/qaoa_quantum_dropout.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
{
125125
"cell_type": "markdown",
126126
"source": [
127-
"We use the same NAE3SAT as the previous tutorial."
127+
"We use the same NAE3SAT as the [previous tutorial](qaoa_nae3sat.ipynb)."
128128
],
129129
"metadata": {
130130
"collapsed": false
@@ -659,7 +659,7 @@
659659
{
660660
"cell_type": "markdown",
661661
"source": [
662-
"Because the dropout of each layer is different, we need to generate $\\text{nlayers}$ graphs after dropout. In order to perform just-in-time (JIT) compilation more conveniently, here we only save the weights in the order of the edges of the original $\\text{hard\\_graph}$, instead of saving each graph after dropout."
662+
"Because the dropout of each layer is different, we need to generate $\\text{nlayers}$ graphs after dropout. In order to perform just-in-time (JIT) compilation more conveniently, here we only save the weights in the order of the edges of the original hard graph, instead of saving each graph after dropout."
663663
],
664664
"metadata": {
665665
"collapsed": false

0 commit comments

Comments
 (0)