Skip to content

Commit

Permalink
fix get_max_bond_dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Sep 24, 2024
1 parent 142463a commit e4a0cc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dmrg/mps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ template <typename S> struct MPSInfo {
}
ubond_t get_max_bond_dimension() const {
total_bond_t max_bdim = 0;
for (int i = 0; i <= n_sites; i++)
for (int i = 0; i < n_sites; i++)
max_bdim = max(left_dims[i]->n_states_total, max_bdim);
for (int i = n_sites; i >= 0; i--)
for (int i = n_sites; i > 0; i--)
max_bdim = max(right_dims[i]->n_states_total, max_bdim);
return (ubond_t)min((uint64_t)max_bdim,
(uint64_t)numeric_limits<ubond_t>::max());
Expand Down

0 comments on commit e4a0cc8

Please sign in to comment.