Skip to content

Commit

Permalink
Copy Hamiltonian ground state before passing to adiabatic evolution
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Apr 25, 2023
1 parent 87ed54f commit 6a8abdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qibo/models/evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ def execute(self, final_time, start_time=0.0, initial_state=None):
)
self.hamiltonian.total_time = final_time - start_time
if initial_state is None:
initial_state = self.hamiltonian.ground_state()
initial_state = self.backend.cast(
self.hamiltonian.ground_state(), copy=True
)
return super().execute(final_time, start_time, initial_state)

@staticmethod
Expand Down

0 comments on commit 6a8abdf

Please sign in to comment.