Skip to content

Commit

Permalink
verbose check
Browse files Browse the repository at this point in the history
  • Loading branch information
Farquhar13 committed Feb 23, 2024
1 parent 05a0d90 commit a8c88e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/relaqs/environments/single_qubit_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def hamiltonian(self, delta, alpha, gamma_magnitude, gamma_phase):
return (delta + alpha) * Z + gamma_magnitude * (np.cos(gamma_phase) * X + np.sin(gamma_phase) * Y)

def reset(self, *, seed=None, options=None):
print("resetting")
self.U = self.U_initial.copy()
starting_observeration = self.get_observation()
self.state = self.get_observation()
Expand All @@ -85,7 +84,9 @@ def reset(self, *, seed=None, options=None):
self.prev_fidelity = 0
info = {}
self.episode_id += 1
print("episode id: ", self.episode_id)
if self.verbose is True:
print("resetting")
print("episode id: ", self.episode_id)
return starting_observeration, info

def hamiltonian_update(self, alpha, gamma_magnitude, gamma_phase):
Expand Down

0 comments on commit a8c88e3

Please sign in to comment.