Skip to content

Commit

Permalink
Merge pull request #863 from qiboteam/copygroundstate
Browse files Browse the repository at this point in the history
Copy ground state before passing to adiabatic evolution
  • Loading branch information
scarrazza authored Apr 25, 2023
2 parents 4b9e1c8 + 6a8abdf commit 76a2fcc
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 76a2fcc

Please sign in to comment.