File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ class PEPS_AD_Config:
137
137
Maximal retries for optimization with random noise.
138
138
optimizer_random_noise_relative_amplitude (:obj:`float`):
139
139
Relative amplitude used for random noise.
140
+ optimizer_reuse_env_eps (:obj:`float`):
141
+ Reuse CTMRG environment of previous step if norm of gradient is below
142
+ this threshold.
140
143
line_search_method (:obj:`Line_Search_Methods`):
141
144
Method used for the line search routine.
142
145
line_search_initial_step_size (:obj:`float`):
@@ -208,6 +211,7 @@ class PEPS_AD_Config:
208
211
optimizer_random_noise_eps : float = 1e-4
209
212
optimizer_random_noise_max_retries : int = 5
210
213
optimizer_random_noise_relative_amplitude : float = 1e-1
214
+ optimizer_reuse_env_eps : float = 1e-3
211
215
212
216
# Line search
213
217
line_search_method : Line_Search_Methods = Line_Search_Methods .WOLFE
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ def line_search(
147
147
generate_unitcell : bool = False ,
148
148
spiral_indices : Optional [Sequence [int ]] = None ,
149
149
additional_input : Dict [str , jnp .ndarray ] = {},
150
+ reinitialize_env_as_identities : bool = True ,
150
151
) -> Tuple [
151
152
List [jnp .ndarray ],
152
153
PEPS_Unit_Cell ,
@@ -243,7 +244,8 @@ def line_search(
243
244
new_unitcell = unitcell .replace_unique_tensors (
244
245
[
245
246
unitcell_tensors [i ].replace_tensor (
246
- new_tensors [i ], reinitialize_env_as_identities = True
247
+ new_tensors [i ],
248
+ reinitialize_env_as_identities = reinitialize_env_as_identities ,
247
249
)
248
250
for i in range (unitcell .get_len_unique_tensors ())
249
251
]
Original file line number Diff line number Diff line change @@ -435,6 +435,7 @@ def random_noise(a):
435
435
generate_unitcell ,
436
436
spiral_indices ,
437
437
additional_input ,
438
+ conv > peps_ad_config .optimizer_reuse_env_eps ,
438
439
)
439
440
except NoSuitableStepSizeError :
440
441
if peps_ad_config .optimizer_fail_if_no_step_size_found :
You can’t perform that action at this time.
0 commit comments