TruncationError¶
full name: tenpy.algorithms.truncation.TruncationError
parent module:
tenpy.algorithms.truncation
type: class
Inheritance Diagram
Methods
|
Initialize self. |
Return a copy of self. |
|
|
Construct TruncationError from discarded singular values. |
|
Construct TruncationError from norm after and before the truncation. |
Class Attributes and Properties
Error |
-
class
tenpy.algorithms.truncation.
TruncationError
(eps=0.0, ov=1.0)[source]¶ Bases:
object
Class representing a truncation error.
The default initialization represents “no truncation”.
Warning
For imaginary time evolution, this is not the error you are interested in!
-
eps
¶ The total sum of all discared Schmidt values squared. Note that if you keep singular values up to 1.e-14 (= a bit more than machine precision for 64bit floats), eps is on the order of 1.e-28 (due to the square)!
- Type
-
ov
¶ A lower bound for the overlap \(|\langle \psi_{trunc} | \psi_{correct} \rangle|^2\) (assuming normalization of both states). This is probably the quantity you are actually interested in. Takes into account the factor 2 explained in the section on Errors in the TEBD Wikipedia article <https://en.wikipedia.org/wiki/Time-evolving_block_decimation>.
- Type
Examples
>>> TE = TruncationError() >>> TE += tebd.time_evolution(...) # add `eps`, multiply `ov`
-
classmethod
from_norm
(norm_new, norm_old=1.0)[source]¶ Construct TruncationError from norm after and before the truncation.
-
classmethod
from_S
(S_discarded, norm_old=None)[source]¶ Construct TruncationError from discarded singular values.
- Parameters
S_discarded (1D numpy array) – The singular values discarded.
norm_old (float) – Norm of all Schmidt values before truncation, \(\sqrt{\sum_{a} \lambda_a^2}\). Default (
None
) is 1.
-
property
ov_err
¶ Error
1.-ov
of the overlap with the correct state.
-