File tree Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -346,21 +346,24 @@ def line_search(
346346 if last_step_size is None :
347347 alpha = _hager_zhang_initial_zero (input_tensors , gradient , varipeps_config )
348348 elif varipeps_config .line_search_hager_zhang_quad_step :
349- alpha = _hager_zhang_initial_quad_step (
350- input_tensors ,
351- unitcell ,
352- gradient ,
353- descent_direction ,
354- last_step_size ,
355- current_value ,
356- spiral_indices ,
357- convert_to_unitcell_func ,
358- generate_unitcell ,
359- expectation_func ,
360- additional_input ,
361- reinitialize_env_as_identities ,
362- enforce_elementwise_convergence ,
363- )
349+ try :
350+ alpha = _hager_zhang_initial_quad_step (
351+ input_tensors ,
352+ unitcell ,
353+ gradient ,
354+ descent_direction ,
355+ last_step_size ,
356+ current_value ,
357+ spiral_indices ,
358+ convert_to_unitcell_func ,
359+ generate_unitcell ,
360+ expectation_func ,
361+ additional_input ,
362+ reinitialize_env_as_identities ,
363+ enforce_elementwise_convergence ,
364+ )
365+ except CTMRGNotConvergedError :
366+ alpha = varipeps_config .line_search_hager_zhang_psi_2 * last_step_size
364367 else :
365368 alpha = varipeps_config .line_search_hager_zhang_psi_2 * last_step_size
366369 else :
You can’t perform that action at this time.
0 commit comments