Skip to content

Commit

Permalink
Add final HPC result. Go back to reps=2 and rotoselect longer.
Browse files Browse the repository at this point in the history
  • Loading branch information
towynlin committed Apr 15, 2023
1 parent c3111cc commit 856b338
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
Binary file added 04-15-22-45-34+0000-fig-values.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions crockett-zachary-osp-2022.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -282,10 +283,23 @@
"- When using the simple rotational symmetry ansatz at the top of this notebook, noisy simulations typically result in values around -16, sometimes as low as **-16.4758333333333** as in IBM QASM simulator session cgqqrgc5firqikfnuki0 using the `L_BFGS_B` optimizer, which ran for about 20 hours.\n",
"- On April 13, I had one noisy Aer simulation that reached **-14.890625**. This one used Rotosolve only (no gate modification) on the expressible Josephson sampler ansatz. It ran for 19.4 hours on a 128 vCPU cloud VM.\n",
"- Also on April 13, another simulation reached a similar value: **-14.8203125**. It used Rotoselect (switching to Rotosolve after some iterations) and the Josephson sampler ansatz. It ran for 13.2 hours on that same HPC machine.\n",
"- On April 15, in a final noisy HPC Aer simulation I tried significantly more iterations as well as 3 Josephson sampler layers instead of 2. The final value was unremarkable at **-13.80859375**. However, the graph indicates that perhaps Rotoselect might be able to continue descending if given extensive run time. The algorithm switched to Rotosolve halfway through, which then remained flat around -14.\n",
"\n",
"My source code is available at https://github.com/towynlin/kagome-vqe. Sometime soon after OSP22 closes, I plan to contribute various pull requests to qiskit, qiskit nature, qiskit ionq, or others as appropriate.\n",
"![rotoselect-rotosolve noisy simulation](04-15-22-45-34+0000-fig-values.png)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Source Code\n",
"\n",
"This submission is exactly the v1.0.0 release zip file of a github repository made public on April 15.\n",
"\n",
"All source code is available at https://github.com/towynlin/kagome-vqe. Sometime soon after OSP22 closes, I plan to contribute various pull requests to qiskit, qiskit nature, qiskit ionq, or other repositories as appropriate.\n",
"\n",
"The easiest way to run my experiment, on guadalupe or anywhere else, is to clone that repo, set up the python 3.10 virtual environment per the readme, and then to run it on the command line, for example:\n",
"The easiest way to run my experiment, on guadalupe or anywhere else, is to clone that repo (or use the submitted zip file, which is the same), set up the python 3.10 virtual environment per the readme, and then to run it on the command line, for example:\n",
"\n",
"`python -m kagomevqe --backend guadalupe`\n",
"\n",
Expand Down
4 changes: 3 additions & 1 deletion kagomevqe/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,18 @@
print("Running on the IonQ simulator")


reps = 2
variant = "original"
ham_class = KagomeHamiltonian
if args.lattice == "asymmetric":
reps = 3
variant = "fill16"
ham_class = Kagome16AsymmetricHamiltonian
print("Using asymmetric extended Kagome lattice Hamiltonian")

prepend_rotsym = args.ansatz == "combo"
ansatz = GuadalupeExpressibleJosephsonSampler(
reps=3, variant=variant, prepend_rotsym=prepend_rotsym
reps=reps, variant=variant, prepend_rotsym=prepend_rotsym
)

if args.ansatz == "rotsym":
Expand Down
2 changes: 1 addition & 1 deletion kagomevqe/rotoselect_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def compute_minimum_eigenvalue(
𝜃 = np.tile(x0, batch_size)
iteration = 0
minimized_energy = np.inf
while iteration < self._maxiter / 2:
while iteration < self._maxiter * 0.8:
for d in range(D):
circuits = self._get_circuit_structure_variants(d)
assert len(circuits) == batch_size
Expand Down
Binary file modified results.ods
Binary file not shown.

0 comments on commit 856b338

Please sign in to comment.