full name: tenpy.tools.optimization.OptimizationFlag
Class Attributes and Properties
- class tenpy.tools.optimization.OptimizationFlag(value)¶
Options for the global ‘optimization level’ used for dynamical optimizations.
Whether we optimize dynamically is decided by comparison of the global “optimization level” with one of the following flags. A higher level includes all the previous optimizations.
Don’t do any optimizations, i.e., run many sanity checks. Used for testing.
Skip really unnecessary sanity checks, but also don’t try any optional optimizations if they might give an overhead.
Activate safe optimizations in algorithms, even if they might give a small overhead. Example: Try to compress the MPO representing the hamiltonian.
Unsafe! Skip (some) class sanity tests and (function) argument checks.
When unsafe optimizations are enabled, errors will not be detected that easily, debugging is much harder, and you might even get segmentation faults in the compiled parts. Use this kind of optimization only for code which you succesfully ran before with (very) similar parmeters and disabled optimiztions! Enable this optimization only during the parts of the code where it is really necessary. Check whether it actually helps - if it doesn’t, keep the optimization disabled!