From de12f85dfc284402c87ec4803ab6ab0e51c1e94d Mon Sep 17 00:00:00 2001 From: "matthias@quintern.xyz" <matthias.quintern@posteo.de> Date: Sun, 9 Mar 2025 22:02:52 +0100 Subject: [PATCH] add doc --- src/mps.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mps.hpp b/src/mps.hpp index 0d3ffd1..a916314 100644 --- a/src/mps.hpp +++ b/src/mps.hpp @@ -116,6 +116,12 @@ std::tuple<e::Tensor<dtype, 3>, e::Tensor<dtype, 1>, e::Tensor<dtype, 3>> split_truncate_theta(const e::MatrixX<dtype>& theta, e::Index chivL, e::Index dL, e::Index dR, e::Index chivR, size_t chiMax, dtype eps); +/** + * @brief Apply a pertubation to the entries in the physical dimension of the B tensors + * @details + * For each value in the physical dimension, adds a random value between 0 and `pertubationStrength`. + * Then, every tensor is normalized again. + */ template<typename T> void applyPertubationOnB(std::vector<e::Tensor<T, 3>>& Bs, double pertubationStrength) { std::mt19937 generator(493852934); // Mersenne twister rng