Skip to content

Commit

Permalink
Revert dense matrix (quantumlib#804)
Browse files Browse the repository at this point in the history
- Oops, I got too aggressive changing matrices to dense.
- These two were not sparse matrices.
  • Loading branch information
dstrain115 authored Sep 26, 2022
1 parent 62fcd84 commit de0290e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/fqe/tutorials/fermi_hubbard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
"source": [
"from fqe.algorithm.low_rank import evolve_fqe_givens\n",
"\n",
"umat = expm(-1j * e_time * hopping_matrix.todense())\n",
"umat = expm(-1j * e_time * hopping_matrix)\n",
"evolved_wfn = evolve_fqe_givens(init_wfn, umat)"
]
},
Expand Down Expand Up @@ -530,7 +530,7 @@
"trotter_steps = 10\n",
"\n",
"# Evolution under the hopping Hamiltonian for a single Trotter step.\n",
"umat = expm(-1j * hopping_matrix.todense() * (e_time / trotter_steps))\n",
"umat = expm(-1j * hopping_matrix * (e_time / trotter_steps))\n",
"\n",
"# Simulate each Trotter step.\n",
"current_wfn = copy.deepcopy(init_wfn)\n",
Expand Down

0 comments on commit de0290e

Please sign in to comment.