Difference between revisions of "Appendix A: internal tolerances"
(Document bosonic mode dissipation and basis/tolerance behaviour (Spinach 2.12, PR 195)) |
|||
| (26 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | This section contains the names and default values of all tolerance parameters in Spinach. | + | This section contains the names and default values of all internal tolerance parameters in ''Spinach''. Defaults are safe for all intents and purposes. The cowboy switch (intended for quick and dirty calculations) may be enabled by adding 'cowboy' to [[sys]].enable cell array. The paranoia switch (intended for debugging) may be enabled by adding 'paranoia' to [[sys]].enable cell array. Manually specified values override everything. |
{| class="wikitable" | {| class="wikitable" | ||
!Tolerance | !Tolerance | ||
!Default value | !Default value | ||
| − | !Cowboy | + | !Cowboy value |
!Paranoid value | !Paranoid value | ||
!Description | !Description | ||
| Line 12: | Line 12: | ||
|<center>1e-2</center> | |<center>1e-2</center> | ||
|<center>eps()</center> | |<center>eps()</center> | ||
| − | |If the 2-norm of an interaction tensor is below this threshold (in rad/s), the interaction is ignored. | + | |If the 2-norm of an interaction tensor is below this threshold (in rad/s), the interaction is ignored. The same threshold applies to bosonic mode couplings declared in [[Spin system specification#Bosonic modes|inter.modes]]; dropped mode couplings are reported to the console by channel and particle pair. |
|- | |- | ||
|sys.tols.liouv_zero | |sys.tols.liouv_zero | ||
| Line 31: | Line 31: | ||
|<center>eps()</center> | |<center>eps()</center> | ||
|If the 2-norm of the state vector projection into an independently evolving subspace is found to be smaller than this threshold, the subspace is dropped from the simulation. | |If the 2-norm of the state vector projection into an independently evolving subspace is found to be smaller than this threshold, the subspace is dropped from the simulation. | ||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.irrep_drop |
| + | |<center>1e-10</center> | ||
| + | |<center>1e-2</center> | ||
| + | |<center>eps()</center> | ||
| + | |If the 2-norm of the state vector projection into an irreducible representation of the symmetry group is found to be smaller than this threshold, the irrep is dropped from the simulation. | ||
|- | |- | ||
| − | |sys.tols.zte_tol||<center>1e- | + | |sys.tols.zte_tol |
| + | |<center>1e-24</center> | ||
| + | |<center>1e-6</center> | ||
| + | |<center>ZTE disabled</center> | ||
| + | |In the Zero Track Elimination procedure, any states yielding tracks with infinity-norm below this threshold are dropped from the basis. | ||
|- | |- | ||
| − | |sys.tols.zte_nsteps||<center> | + | |sys.tols.zte_nsteps |
| + | |<center>32</center> | ||
| + | |<center>16</center> | ||
| + | |<center>ZTE disabled</center> | ||
| + | |The number of time steps in the trajectory used to identify zero tracks. The time step is set automatically to the reciprocal 1-norm of the Liouvillian. | ||
|- | |- | ||
| − | |sys.tols.zte_maxden||<center>0.5</center>||The fraction of non-zeros in the state vector, above which the | + | |sys.tols.zte_maxden |
| + | |<center>0.5</center> | ||
| + | |<center>0.5</center> | ||
| + | |<center>ZTE disabled</center> | ||
| + | |The fraction of non-zeros in the state vector, above which the Zero Track Elimination procedure would be skipped automatically. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.prox_cutoff |
| + | |<center>100</center> | ||
| + | |<center>100</center> | ||
| + | |<center>inf()</center> | ||
| + | |The distance, in Angstroms, beyond which dipolar interactions are ignored. For simulations that only involve nuclei the appropriate value is 5 Angstrom. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.krylov_switchover |
| + | |<center>100,000</center> | ||
| + | |<center>100,000</center> | ||
| + | |<center>100,000</center> | ||
| + | |The number of non-zeros in the Liouvillian, above which the Krylov propagation method would be used. | ||
|- | |- | ||
| − | |sys.tols.basis_hush||<center>256</center>||If the number of vectors in the basis is above this threshold the full state list is not printed to the log. | + | |sys.tols.basis_hush |
| + | |<center>256</center> | ||
| + | |<center>256</center> | ||
| + | |<center>256</center> | ||
| + | |If the number of vectors in the basis is above this threshold the full state list is not printed to the log. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.merge_dim |
| + | |<center>16</center> | ||
| + | |<center>16</center> | ||
| + | |<center>16</center> | ||
| + | |If independently evolving subspaces with dimension smaller than this threshold are identified during the trajectory-level state space reduction process, they are bundled together. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.small_matrix |
| + | |<center>200</center> | ||
| + | |<center>200</center> | ||
| + | |<center>200</center> | ||
| + | |If a matrix is found to be smaller than this threshold, dense algebra is used. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.dense_matrix |
| + | |<center>0.15</center> | ||
| + | |<center>0.15</center> | ||
| + | |<center>0.15</center> | ||
| + | |If the fraction of non-zeros in a matrix is found to be greater than this threshold, dense matrix algebra is used. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.rlx_integration |
| + | |<center>1e-4</center> | ||
| + | |<center>1e-2</center> | ||
| + | |<center>1e-6</center> | ||
| + | |Relative accuracy of numerical integration in the evaluation of Redfield superoperator. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.dP_method |
| + | |<center>'auxmat'</center> | ||
| + | |<center>'auxmat'</center> | ||
| + | |<center>'auxmat'</center> | ||
| + | |A switch controlling the selection of the exponential propagator differentiation method. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.dd_ncells |
| + | |<center>2</center> | ||
| + | |<center>2</center> | ||
| + | |<center>2</center> | ||
| + | |Number of periodic boundary condition images on either side of the central cell to be used for the evaluation of dipolar couplings. | ||
|- | |- | ||
| − | |sys.tols. | + | |sys.tols.cache_mem |
| − | | | + | |<center>7</center> |
| − | + | |<center>7</center> | |
| + | |<center>Caching disabled</center> | ||
| + | |Number of days days before a cache record is deleted. | ||
|} | |} | ||
| Line 71: | Line 121: | ||
!Parameter!!Value!!Comment | !Parameter!!Value!!Comment | ||
|- | |- | ||
| − | |spin_system.tols.hbar||<center> | + | |spin_system.tols.hbar||<center>6.62607015e-34/(2*pi)</center>||Reduced Planck constant |
|- | |- | ||
| − | | | + | |spin_system.tols.kbol||<center>1.380649e-23</center>||Boltzmann constant |
|- | |- | ||
| − | |spin_system.tols.freeg||<center>2. | + | |spin_system.tols.freeg||<center>2.00231930436092</center>||Free electron ''g''-factor |
|- | |- | ||
| − | |spin_system.tols.mu0||<center> | + | |spin_system.tols.mu0||<center>1.25663706127e-6</center>||Vacuum permeability |
| + | |- | ||
| + | |spin_system.tols.muB||<center>9.2740100657e-24</center>||Bohr magneton | ||
|} | |} | ||
| − | + | ''Version 2.11, authors: [[Ilya Kuprov]]'' | |
| − | ''Version | ||
Latest revision as of 05:44, 6 August 2026
This section contains the names and default values of all internal tolerance parameters in Spinach. Defaults are safe for all intents and purposes. The cowboy switch (intended for quick and dirty calculations) may be enabled by adding 'cowboy' to sys.enable cell array. The paranoia switch (intended for debugging) may be enabled by adding 'paranoia' to sys.enable cell array. Manually specified values override everything.
| Tolerance | Default value | Cowboy value | Paranoid value | Description |
|---|---|---|---|---|
| sys.tols.inter_cutoff | If the 2-norm of an interaction tensor is below this threshold (in rad/s), the interaction is ignored. The same threshold applies to bosonic mode couplings declared in inter.modes; dropped mode couplings are reported to the console by channel and particle pair. | |||
| sys.tols.liouv_zero | Elements of the Liouvillian with absolute values below this threshold (in rad/s) are set to zero and dropped from the sparse array. | |||
| sys.tols.prop_chop | If the exponential propagator is generated using a series expansion, the elements of the series terms with absolute values below this threshold are set to zero and dropped from the sparse array. | |||
| sys.tols.subs_drop | If the 2-norm of the state vector projection into an independently evolving subspace is found to be smaller than this threshold, the subspace is dropped from the simulation. | |||
| sys.tols.irrep_drop | If the 2-norm of the state vector projection into an irreducible representation of the symmetry group is found to be smaller than this threshold, the irrep is dropped from the simulation. | |||
| sys.tols.zte_tol | In the Zero Track Elimination procedure, any states yielding tracks with infinity-norm below this threshold are dropped from the basis. | |||
| sys.tols.zte_nsteps | The number of time steps in the trajectory used to identify zero tracks. The time step is set automatically to the reciprocal 1-norm of the Liouvillian. | |||
| sys.tols.zte_maxden | The fraction of non-zeros in the state vector, above which the Zero Track Elimination procedure would be skipped automatically. | |||
| sys.tols.prox_cutoff | The distance, in Angstroms, beyond which dipolar interactions are ignored. For simulations that only involve nuclei the appropriate value is 5 Angstrom. | |||
| sys.tols.krylov_switchover | The number of non-zeros in the Liouvillian, above which the Krylov propagation method would be used. | |||
| sys.tols.basis_hush | If the number of vectors in the basis is above this threshold the full state list is not printed to the log. | |||
| sys.tols.merge_dim | If independently evolving subspaces with dimension smaller than this threshold are identified during the trajectory-level state space reduction process, they are bundled together. | |||
| sys.tols.small_matrix | If a matrix is found to be smaller than this threshold, dense algebra is used. | |||
| sys.tols.dense_matrix | If the fraction of non-zeros in a matrix is found to be greater than this threshold, dense matrix algebra is used. | |||
| sys.tols.rlx_integration | Relative accuracy of numerical integration in the evaluation of Redfield superoperator. | |||
| sys.tols.dP_method | A switch controlling the selection of the exponential propagator differentiation method. | |||
| sys.tols.dd_ncells | Number of periodic boundary condition images on either side of the central cell to be used for the evaluation of dipolar couplings. | |||
| sys.tols.cache_mem | Number of days days before a cache record is deleted. |
The following fundamental constants are built in:
| Parameter | Value | Comment |
|---|---|---|
| spin_system.tols.hbar | Reduced Planck constant | |
| spin_system.tols.kbol | Boltzmann constant | |
| spin_system.tols.freeg | Free electron g-factor | |
| spin_system.tols.mu0 | Vacuum permeability | |
| spin_system.tols.muB | Bohr magneton |
Version 2.11, authors: Ilya Kuprov