Config of variPEPS module (varipeps.config)
- class varipeps.config.Grad_Fixed_Point_Method(*values)
Bases:
IntEnum- EIGEN_SOLVER = 3
Use eigen solver method to calculate gradient of CTMRG routine
- ITERATIVE = 1
Use iterative method to calculate gradient of CTMRG routine
- LINEAR_SOLVER = 2
Use linear solver method to calculate gradient of CTMRG routine
- class varipeps.config.Line_Search_Methods(*values)
Bases:
IntEnum- ARMIJO = 2
Armijo line search method
- HAGERZHANG = 4
Hager-Zhang line search method
- SIMPLE = 1
Simple line search method
- WOLFE = 3
Wolfe line search method
- class varipeps.config.Optimizing_Methods(*values)
Bases:
IntEnum- BFGS = 3
BFGS method
- CG = 2
Conjugate gradient method
- L_BFGS = 4
L-BFGS method
- STEEPEST = 1
Steepest gradient descent
- class varipeps.config.Projector_Method(*values)
Bases:
IntEnum- FISHMAN = 3
Use the Fishman method for projector calculation
- FULL = 2
Use full network for projector calculation
- HALF = 1
Use only half network for projector calculation
- HALF_FISHMAN = 4
Use the Fishman method but with half projectors as basis
- class varipeps.config.Slurm_Restart_Mode(*values)
Bases:
IntEnum- AUTOMATIC_RESTART = 4
Write restart script and start new slurm job with it
- DISABLED = 1
Disable automatic restart of slurm job if maximal runtime limit is reached
- WRITE_NEED_RESTART_FILE = 2
Write file to indicate that restart is needed but no slurm scripts
- WRITE_RESTART_SCRIPT = 3
Write slurm restart script but do not submit new slurm job
- class varipeps.config.VariPEPS_Config(ad_use_custom_vjp: bool = True, ad_custom_print_steps: bool = False, ad_custom_verbose_output: bool = False, ad_custom_convergence_eps: float = 1e-07, ad_custom_max_steps: int = 75, ad_custom_fixed_point_method: Grad_Fixed_Point_Method = Grad_Fixed_Point_Method.LINEAR_SOLVER, checkpointing_ncon: bool = False, checkpointing_projectors: bool = False, ctmrg_convergence_eps: float = 1e-08, ctmrg_enforce_elementwise_convergence: bool = True, ctmrg_max_steps: int = 75, ctmrg_print_steps: bool = False, ctmrg_verbose_output: bool = False, ctmrg_truncation_eps: float = 1e-12, ctmrg_fail_if_not_converged: bool = True, ctmrg_full_projector_method: Projector_Method = Projector_Method.FISHMAN, ctmrg_increase_truncation_eps: bool = True, ctmrg_increase_truncation_eps_factor: float = 100.0, ctmrg_increase_truncation_eps_max_value: float = 1e-06, ctmrg_heuristic_increase_chi: bool = True, ctmrg_heuristic_increase_chi_threshold: float = 1e-06, ctmrg_heuristic_increase_chi_step_size: int = 2, ctmrg_heuristic_decrease_chi: bool = True, ctmrg_heuristic_decrease_chi_step_size: int = 1, triangular_ctmrg_use_split: bool = False, svd_sign_fix_eps: float = 0.1, svd_ad_use_lorentz_broadening: bool = False, svd_ad_lorentz_broadening_eps: float = 1e-13, optimizer_method: Optimizing_Methods = Optimizing_Methods.L_BFGS, optimizer_max_steps: int = 300, optimizer_convergence_eps: float = 1e-05, optimizer_ctmrg_preconverged_eps: float = 1e-05, optimizer_fail_if_no_step_size_found: bool = False, optimizer_l_bfgs_maxlen: int = 15, optimizer_preconverge_with_half_projectors: bool = False, optimizer_preconverge_with_half_projectors_eps: float = 0.001, optimizer_autosave_step_count: int = 2, optimizer_random_noise_eps: float = 0.0001, optimizer_random_noise_max_retries: int = 5, optimizer_random_noise_relative_amplitude: float = 0.1, optimizer_reuse_env_eps: float = 0.001, optimizer_use_preconditioning: bool = True, optimizer_precond_gmres_krylov_subspace_size: int = 30, optimizer_precond_gmres_maxiter: int = 3, line_search_method: Line_Search_Methods = Line_Search_Methods.HAGERZHANG, line_search_initial_step_size: float = 1.0, line_search_reduction_factor: float = 0.5, line_search_max_steps: int = 40, line_search_armijo_const: float = 0.0001, line_search_wolfe_const: float = 0.9, line_search_use_last_step_size: bool = False, line_search_hager_zhang_quad_step: bool = True, line_search_hager_zhang_delta: float = 0.1, line_search_hager_zhang_sigma: float = 0.9, line_search_hager_zhang_psi_0: float = 0.01, line_search_hager_zhang_psi_1: float = 0.1, line_search_hager_zhang_psi_2: float = 2.0, line_search_hager_zhang_eps: float = 1e-06, line_search_hager_zhang_theta: float = 0.5, line_search_hager_zhang_gamma: float = 0.66, line_search_hager_zhang_rho: float = 5, line_search_hager_zhang_eps_use_grad_norm: bool = True, line_search_hager_zhang_eps_grad_norm_factor: float = 0.01, basinhopping_niter: int = 20, basinhopping_T: float = 0.001, basinhopping_niter_success: int = 5, spiral_wavevector_type: Wavevector_Type = Wavevector_Type.TWO_PI_POSITIVE_ONLY, slurm_restart_mode: Slurm_Restart_Mode = Slurm_Restart_Mode.WRITE_NEED_RESTART_FILE, jax_compilation_cache_memory_factor: float = 0.5)
Bases:
objectConfig class for varipeps module. Normally only the blow created instance
configis used.- Parameters:
ad_use_custom_vjp (
bool, optional) – Use custom VJP rule for the CTMRG routine during AD calculation.Default:Truead_custom_print_steps (
bool, optional) – Print steps of fix-point iteration in custom VJP function.Default:Falsead_custom_verbose_output (
bool, optional) – Print verbose output in custom VJP function.Default:Falsead_custom_convergence_eps (
float, optional) – Convergence criterion for the custom VJP function.Default:1e-07ad_custom_max_steps (
int, optional) – Maximal number of steps for fix-pointer iteration of the custom VJP function.Default:75ad_custom_fixed_point_method (
Grad_Fixed_Point_Method, optional) – Select method how the gradient of the CTMRG fixed point routine is calculated.Default:Grad_Fixed_Point_Method.LINEAR_SOLVERcheckpointing_ncon (
bool, optional) – Enable AD checkpointing for the ncon calls.Default:Falsecheckpointing_projectors (
bool, optional) – Enable AD checkpointing for the the calculation of the proejctors.Default:Falsectmrg_convergence_eps (
float, optional) – Convergence criterion for the CTMRG routine.Default:1e-08ctmrg_enforce_elementwise_convergence (
bool, optional) – Enforce elementwise convergence of the CTM tensors instead of only convergence of the singular values of the corners.Default:Truectmrg_max_steps (
int, optional) – Maximal number of steps for fix-pointer iteration of the CTMRG routine.Default:75ctmrg_print_steps (
bool, optional) – Print steps of fix-point iteration in CTMRG routine.Default:Falsectmrg_verbose_output (
bool, optional) – Print verbose output in CTMRG routine.Default:Falsectmrg_truncation_eps (
float, optional) – Value for cut off of the singular values compared to the biggest one. Used in the calculation of the CTMRG projectors.Default:1e-12ctmrg_fail_if_not_converged (
bool, optional) – Flag if the CTMRG routine should fail with an error if no convergence can be reached within the maximal number of steps. If disabled, the result converged so far is returned.Default:Truectmrg_full_projector_method (
Projector_Method, optional) – Set which projector method should be used as default (full) projector method during the CTMRG routine. Sensible values areFULLorFISHMAN.Default:Projector_Method.FISHMANctmrg_increase_truncation_eps (
bool, optional) – Flag if the CTMRG routine should try higher truncation thresholds for the SVD based projector methods if the routine does not converge in the maximum number of steps.Default:Truectmrg_increase_truncation_eps_factor (
float, optional) – Factor by which the truncation threshold should be increased.Default:100.0ctmrg_increase_truncation_eps_max_value (
float, optional) – Maximal value for the truncation threshold. Do not increase higher than this value.Default:1e-06ctmrg_heuristic_increase_chi (
bool, optional) – Flag if the CTMRG routine should try higher environment bond dimension for if the routine found singular values above a threshold during the projector calculation of the last absorption step.Default:Truectmrg_heuristic_increase_chi_threshold (
float, optional) – Threshold for the heuristic environment bond dimension increase.Default:1e-06ctmrg_heuristic_increase_chi_step_size (
int, optional) – Step size for the heuristic environment bond dimension increase.Default:2ctmrg_heuristic_decrease_chi (
bool, optional) – Flag if the CTMRG routine should try lower environment bond dimension for if the routine found singular values below the SVD threshold during the projector calculation of the last absorption step.Default:Truectmrg_heuristic_decrease_chi_step_size (
int, optional) – Step size for the heuristic environment bond dimension decrease.Default:1triangular_ctmrg_use_split (
bool, optional) – Flag if the split projector method should be used in the triangular CTMRG.Default:Falsesvd_sign_fix_eps (
float, optional) – Value for numerical stability threshold in sign-fixed SVD.Default:0.1svd_ad_use_lorentz_broadening (
bool, optional) – Enable Lorentz broadening in the AD rule for the SVD.Default:Falsesvd_ad_lorentz_broadening_eps (
float, optional) – Numerical stabilization constant in the Lorentz broadening in the AD rule for the SVD.Default:1e-13optimizer_method (
Optimizing_Methods, optional) – Method used for variational optimization of the PEPS network.Default:Optimizing_Methods.L_BFGSoptimizer_max_steps (
int, optional) – Maximal number of steps for fix-pointer iteration in optimization routine.Default:300optimizer_convergence_eps (
float, optional) – Convergence criterion for the optimization routine.Default:1e-05optimizer_ctmrg_preconverged_eps (
float, optional) – Convergence criterion for the optimization routine using the gradient calculations with the preconverged environment.Default:1e-05optimizer_fail_if_no_step_size_found (
bool, optional) – Flag if the optimizer routine should fail with an error if no step size can be found before the gradient norm is below the convergence threshold. If disabled, the result converged so far is returned.Default:Falseoptimizer_l_bfgs_maxlen (
int, optional) – Maximal number of previous steps used for the L-BFGS method.Default:15optimizer_preconverge_with_half_projectors (
bool, optional) – Flag if the optimizer should use only CTM half projectors for the steps till some converge is reached.Default:Falseoptimizer_preconverge_with_half_projectors_eps (
float, optional) – Convergence criterion for the preconvergence with only the half CTM projectors.Default:0.001optimizer_autosave_step_count (
int, optional) – Step count after which the optimizer result is automatically saved.Default:2optimizer_random_noise_eps (
float, optional) – Optimizer should try best state sofar with some random noise if gradient norm is below this threshold.Default:0.0001optimizer_random_noise_max_retries (
int, optional) – Maximal retries for optimization with random noise.Default:5optimizer_random_noise_relative_amplitude (
float, optional) – Relative amplitude used for random noise.Default:0.1optimizer_reuse_env_eps (
float, optional) – Reuse CTMRG environment of previous step if norm of gradient is below this threshold.Default:0.001optimizer_use_preconditioning (
bool, optional) – Use (local) preconditioning method as described in https://arxiv.org/abs/2511.09546.Default:Trueoptimizer_precond_gmres_krylov_subspace_size (
int, optional) – Size of Krylov subspace built up during GMRES method for the inversion of the preconditioner.Default:30optimizer_precond_gmres_maxiter (
int, optional) – Maximal number of outer iterations inside the GMRES method for the inversion of the preconditioner.Default:3line_search_method (
Line_Search_Methods, optional) – Method used for the line search routine.Default:Line_Search_Methods.HAGERZHANGline_search_initial_step_size (
float, optional) – Initial step size for the line search routine.Default:1.0line_search_reduction_factor (
float, optional) – Reduction factor between two line search steps.Default:0.5line_search_max_steps (
int, optional) – Maximal number of steps in the line search routine.Default:40line_search_armijo_const (
float, optional) – Constant used in Armijo line search method.Default:0.0001line_search_wolfe_const (
float, optional) – Constant used in Wolfe line search method.Default:0.9line_search_use_last_step_size (
bool, optional) – Flag if the line search should start from the step size of the previous optimizer step.Default:Falseline_search_hager_zhang_quad_step (
bool, optional) – Use QuadStep method in Hager-Zhang line search to find initial step size.Default:Trueline_search_hager_zhang_delta (
float, optional) – Constant used in Hager-Zhang line search method.Default:0.1line_search_hager_zhang_sigma (
float, optional) – Constant used in Hager-Zhang line search method.Default:0.9line_search_hager_zhang_psi_0 (
float, optional) – Constant used in Hager-Zhang line search method.Default:0.01line_search_hager_zhang_psi_1 (
float, optional) – Constant used in Hager-Zhang line search method.Default:0.1line_search_hager_zhang_psi_2 (
float, optional) – Constant used in Hager-Zhang line search method.Default:2.0line_search_hager_zhang_eps (
float, optional) – Constant used in Hager-Zhang line search method.Default:1e-06line_search_hager_zhang_theta (
float, optional) – Constant used in Hager-Zhang line search method.Default:0.5line_search_hager_zhang_gamma (
float, optional) – Constant used in Hager-Zhang line search method.Default:0.66line_search_hager_zhang_rho (
float, optional) – Constant used in Hager-Zhang line search method.Default:5line_search_hager_zhang_eps_use_grad_norm (
bool, optional) – Use norm of gradient multiplied byVariPEPS_Config.line_search_hager_zhang_eps_grad_norm_factorto calculate eps value in Hager-Zhang line search. If disabled, the fixed value from config parameterVariPEPS_Config.line_search_hager_zhang_epsis used.Default:Trueline_search_hager_zhang_eps_grad_norm_factor (
float, optional) – Factor used for gradient based eps calculation. See parameterVariPEPS_Config.line_search_hager_zhang_eps_use_grad_normfor details.Default:0.01basinhopping_niter (
int, optional) – Value for parameter niter ofscipy.optimize.basinhopping. See this function for details.Default:20basinhopping_T (
int, optional) – Value for parameter T ofscipy.optimize.basinhopping. See this function for details.Default:0.001basinhopping_niter_success (
int, optional) – Value for parameter niterniter_success ofscipy.optimize.basinhopping. See this function for details.Default:5spiral_wavevector_type (
Wavevector_Type, optional) – Type of wavevector to be used (only positive/symmetric interval/…).Default:Wavevector_Type.TWO_PI_POSITIVE_ONLYslurm_restart_mode (
Slurm_Restart_Mode, optional) – Mode of operation to restart slurm job if maximal runtime is reached.Default:Slurm_Restart_Mode.WRITE_NEED_RESTART_FILEjax_compilation_cache_memory_factor (
float, optional) – Limit the jax compilation cache to maximal this factor times the total available memory.