Skip to content

Commit

Permalink
Fix error: missing argument d in gradient_onsite_Z
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-XiaoyueLi committed Feb 23, 2024
1 parent 08fb837 commit 3cd9338
Show file tree
Hide file tree
Showing 5 changed files with 687 additions and 18 deletions.
8 changes: 8 additions & 0 deletions examples/dbi/dbi_strategies_compare.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
"steps_gradient_plot= [0]\n",
"for _ in range(NSTEPS):\n",
" step, d_coef, d = gradient_descent_onsite_Z(dbi_gradient, d_coef, d, onsite_Z_ops=onsite_Z_ops, max_evals=50, n_taylor=5)\n",
" dbi_gradient(d=d,step=step)\n",
" off_diagonal_norm_history_gradient.append(dbi_gradient.off_diagonal_norm)\n",
" print(f\"New optimized step at iteration {_+1}/{NSTEPS}: {step} with d_coef {d_coef}, loss {dbi_gradient.off_diagonal_norm}\")\n",
" steps_gradient_plot.append(steps_gradient_plot[-1]+step)"
Expand Down Expand Up @@ -228,6 +229,13 @@
"plt.xlabel('Iteration')\n",
"plt.ylabel(r'$|| \\sigma(e^{sW}He^{-sW}) || $')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 3cd9338

Please sign in to comment.