File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,8 @@ class PEPS_AD_Config:
135135 gradient norm is below this threshold.
136136 optimizer_random_noise_max_retries (:obj:`int`):
137137 Maximal retries for optimization with random noise.
138+ optimizer_random_noise_relative_amplitude (:obj:`float`):
139+ Relative amplitude used for random noise.
138140 line_search_method (:obj:`Line_Search_Methods`):
139141 Method used for the line search routine.
140142 line_search_initial_step_size (:obj:`float`):
@@ -205,6 +207,7 @@ class PEPS_AD_Config:
205207 optimizer_autosave_step_count : int = 2
206208 optimizer_random_noise_eps : float = 1e-4
207209 optimizer_random_noise_max_retries : int = 5
210+ optimizer_random_noise_relative_amplitude : float = 1e-1
208211
209212 # Line search
210213 line_search_method : Line_Search_Methods = Line_Search_Methods .WOLFE
Original file line number Diff line number Diff line change @@ -235,7 +235,12 @@ def optimize_peps_network(
235235 rng = PEPS_Random_Number_Generator .get_generator (backend = "jax" )
236236
237237 def random_noise (a ):
238- return a + a * rng .block (a .shape , dtype = a .dtype ) * 5e-1
238+ return (
239+ a
240+ + a
241+ * rng .block (a .shape , dtype = a .dtype )
242+ * peps_ad_config .optimizer_random_noise_relative_amplitude
243+ )
239244
240245 if isinstance (input_tensors , PEPS_Unit_Cell ):
241246 working_tensors = cast (
You can’t perform that action at this time.
0 commit comments