Skip to content

Commit

Permalink
Merge pull request #177 from JachyMeow/master
Browse files Browse the repository at this point in the history
tiny adjustments of nnvqe tutorial & its Chinese version
  • Loading branch information
refraction-ray authored Aug 9, 2023
2 parents d1e9bb9 + 00f94cc commit 1eef036
Show file tree
Hide file tree
Showing 2 changed files with 4,019 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/source/tutorials/nnvqe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"id": "64ba95d6",
"metadata": {},
"source": [
"# <center> NN-VQE"
"# <center> Neural Network encoded Variational Quantum Eigensolver (NN-VQE)"
]
},
{
Expand Down Expand Up @@ -105,7 +105,7 @@
"source": [
"## Ansatz circuit\n",
"\n",
"Now we design the circuit. We choose multi-scale entangled renormalization ansatz (MERA) as the ansatz here, $d$ is the circuit depth. (see tutorial of MERA [here](https://tensorcircuit.readthedocs.io/en/latest/tutorials/mera.html))"
"Now we design the circuit. We choose multi-scale entangled renormalization ansatz (MERA) as the ansatz here, $d$ is the circuit depth. (see [MERA tutorial](https://tensorcircuit.readthedocs.io/en/latest/tutorials/mera.html))"
]
},
{
Expand Down Expand Up @@ -2909,7 +2909,7 @@
"source": [
"## NN-VQE\n",
"\n",
"Design the NN-VQE. We use a neural network to transform the Hamiltonian parameters to the optimized parameters in the PQC for VQE."
"Design the NN-VQE. We use a neural network to transform the Hamiltonian parameters to the optimized parameters in the parameterized quantum circuit (PQC) for VQE."
]
},
{
Expand Down Expand Up @@ -3062,7 +3062,7 @@
"test_delta = np.linspace(-4.0, 4.0, 201) # test set\n",
"test_energies = tf.zeros_like(test_delta).numpy()\n",
"m = NN_MERA(n, d, lamb, NN_shape, stddev)\n",
"m.load_weights(\"DNN-MERA_2[20](-3.0,3.0,20)_drop05.weights.h5\")\n",
"m.load_weights(\"NN-VQE.weights.h5\")\n",
"for i, de in tqdm(enumerate(test_delta)):\n",
" test_energies[i] = m(K.reshape(de, [1]))"
]
Expand All @@ -3074,7 +3074,7 @@
"source": [
"## Compare\n",
"\n",
"We compare the results of NN-VQE with the analytical ones to calculate the ground-state relative error. From the figure, we can see that NN-VQE is able to estimate the ground-state energies of parameterized Hamiltonians with high precision without fine-tuning and has a favorable generalization capability."
"We compare the results of NN-VQE with the analytical ones to calculate the ground-state energy relative error. From the figure, we can see that NN-VQE is able to estimate the ground-state energies of parameterized Hamiltonians with high precision without fine-tuning and has a favorable generalization capability."
]
},
{
Expand Down Expand Up @@ -3982,7 +3982,7 @@
"id": "5f9bda8a",
"metadata": {},
"source": [
"To get more detailed information or further study, please refer to [our paper](https://arxiv.org/abs/2308.01068) and [GitHub](https://github.com/JachyMeow/NN-VQA)."
"To get more detailed information or further study, please refer to our [paper](https://arxiv.org/abs/2308.01068) and [GitHub](https://github.com/JachyMeow/NN-VQA)."
]
}
],
Expand Down
Loading

0 comments on commit 1eef036

Please sign in to comment.