Skip to content

Commit

Permalink
update notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Dec 9, 2023
1 parent fcdd6bc commit 8e3f5aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/tutorials/05-entanglement-forging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"interaction_pairs = list(brickwork(norb, n_layers))\n",
"rng = np.random.default_rng(1234)\n",
"thetas = rng.uniform(-np.pi, np.pi, size=len(interaction_pairs))\n",
"operator = ffsim.HopGateAnsatzOperator(interaction_pairs, thetas=thetas)\n",
"operator = ffsim.HopGateAnsatzOperator(norb, interaction_pairs, thetas)\n",
"\n",
"# Compute energy of ansatz state\n",
"reference_occupations_spatial = [(0, 1, 2, 3), (1, 2, 3, 4), (0, 1, 2, 4)]\n",
Expand All @@ -114,10 +114,10 @@
" message: STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT\n",
" success: False\n",
" status: 1\n",
" fun: -75.68085278176007\n",
" fun: -75.68085225170408\n",
" x: [ 2.996e+00 -7.549e-01 ... 2.650e+00 8.012e-01]\n",
" nit: 6\n",
" jac: [ 1.759e-03 9.119e-03 ... -1.192e-02 9.436e-04]\n",
" jac: [ 1.756e-03 9.118e-03 ... -1.192e-02 9.521e-04]\n",
" nfev: 112\n",
" njev: 7\n",
" hess_inv: <15x15 LbfgsInvHessProduct with dtype=float64>\n"
Expand All @@ -130,7 +130,7 @@
"\n",
"def fun(x):\n",
" # Initialize the ansatz operator from the parameter vector\n",
" operator = ffsim.HopGateAnsatzOperator(interaction_pairs, x)\n",
" operator = ffsim.HopGateAnsatzOperator(norb, interaction_pairs, x)\n",
" # Compute energy\n",
" energy, _ = ffsim.multireference_state(\n",
" mol_hamiltonian, operator, reference_occupations, norb=norb, nelec=nelec\n",
Expand Down

0 comments on commit 8e3f5aa

Please sign in to comment.