Skip to content

Commit

Permalink
Fix typo in descent.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulaGarciaMolina authored Jan 19, 2024
1 parent 5da107c commit e40aab0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/seemps/optimization/descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ def energy_and_variance(state: MPS) -> tuple[MPS, float, float, float]:
for step in range(maxiter):
H_state, E, variance, avg_H2 = energy_and_variance(state)
if callback is not None:
callback(
state
),
)
callback(state)
if DEBUG:
log(f"step = {step:5d}, energy = {E}, variance = {variance}")
energies.append(E)
Expand Down Expand Up @@ -145,10 +142,7 @@ def energy_and_variance(state: MPS) -> tuple[MPS, float, float, float]:
if not converged:
H_state, E, variance, _ = energy_and_variance(state)
if callback is not None:
callback(
state,
),
)
callback(state)
if E < best_energy:
best_energy, best_vector, _ = E, state, variance
energies.append(E)
Expand Down

0 comments on commit e40aab0

Please sign in to comment.