Skip to content

Commit

Permalink
core: fix expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Jan 17, 2024
1 parent 6f2488b commit 070df83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyblock2/driver/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3282,7 +3282,7 @@ def get_bipartite_entanglement(self, ket=None):
import numpy as np

if ket is not None:
self.expectation(ket, self.get_identity_mpo(), ket)
self.expectation(ket, self.get_identity_mpo(), ket, store_ket_spectra=True)
bip_ent = np.zeros(len(self._sweep_wfn_spectra), dtype=np.float64)
for ix, x in enumerate(self._sweep_wfn_spectra):
if hasattr(np, "float128"):
Expand Down Expand Up @@ -4309,7 +4309,7 @@ def addition(

# return < bra | mpo | ket >
def expectation(
self, bra, mpo, ket, store_bra_spectra=False, store_ket_spectra=True, iprint=0
self, bra, mpo, ket, store_bra_spectra=False, store_ket_spectra=False, iprint=0
):
bw = self.bw
mbra = bra.deep_copy("EXPE-BRA@TMP")
Expand Down

0 comments on commit 070df83

Please sign in to comment.