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

tiny adjustments of nnvqe tutorial & its Chinese version #177

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading