Skip to content

Commit

Permalink
restore append in overlapo with density mode and added pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoRobbiati committed Aug 10, 2023
1 parent 503a2d0 commit 219db62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/qibo/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ def apply(self, backend, state):
self.append(overlap)
return overlap

def apply_density_matrix(self, backend, state):
return backend.calculate_overlap_density_matrix(self.state, state)
def apply_density_matrix(self, backend, state): # pragma: no cover
overlap = backend.calculate_overlap_density_matrix(self.state, state)
self.append(overlap)
return overlap


class Energy(Callback):
Expand Down

0 comments on commit 219db62

Please sign in to comment.