From 662fc340f9bb1f17270d6511b5ee16657fedfc15 Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 8 Feb 2024 14:17:05 +0100 Subject: [PATCH] Address review comments --- src/algorithms/IDmrg.m | 2 +- src/algorithms/IDmrg2.m | 2 +- src/algorithms/Vomps.m | 2 +- src/algorithms/Vumps.m | 2 +- src/mps/UniformMps.m | 28 ----------------------- src/tensors/Tensor.m | 34 ++++++++++++++-------------- src/tensors/charges/AbstractCharge.m | 2 +- src/utility/swapvars.m | 2 +- 8 files changed, 23 insertions(+), 51 deletions(-) diff --git a/src/algorithms/IDmrg.m b/src/algorithms/IDmrg.m index 9825268..12e5d65 100644 --- a/src/algorithms/IDmrg.m +++ b/src/algorithms/IDmrg.m @@ -21,7 +21,7 @@ % % dynamical_tols : :class:`logical` % indicate whether or not to use a dynamical tolerance scaling for the algorithm's - % subroutines based on the current error measure, defaults to :code:`false` + % subroutines based on the current error measure, defaults to :code:`false`. % % tol_min : :class:`double` % smallest allowed convergence tolerance for soubroutines, defaults to :code:`1e-12`. diff --git a/src/algorithms/IDmrg2.m b/src/algorithms/IDmrg2.m index 5ae2264..b6b51cf 100644 --- a/src/algorithms/IDmrg2.m +++ b/src/algorithms/IDmrg2.m @@ -24,7 +24,7 @@ % % dynamical_tols : :class:`logical` % indicate whether or not to use a dynamical tolerance scaling for the algorithm's - % subroutines based on the current error measure, defaults to :code:`false` + % subroutines based on the current error measure, defaults to :code:`false`. % % tol_min : :class:`double` % smallest allowed convergence tolerance for soubroutines, defaults to :code:`1e-12`. diff --git a/src/algorithms/Vomps.m b/src/algorithms/Vomps.m index 05ddcb1..9880ec8 100644 --- a/src/algorithms/Vomps.m +++ b/src/algorithms/Vomps.m @@ -21,7 +21,7 @@ % % dynamical_tols : :class:`logical` % indicate whether or not to use a dynamical tolerance scaling for the algorithm's - % subroutines based on the current error measure, defaults to :code:`true` + % subroutines based on the current error measure, defaults to :code:`true`. % % tol_min : :class:`double` % smallest allowed convergence tolerance for soubroutines, defaults to :code:`1e-12`. diff --git a/src/algorithms/Vumps.m b/src/algorithms/Vumps.m index 0a745f3..a936b22 100644 --- a/src/algorithms/Vumps.m +++ b/src/algorithms/Vumps.m @@ -24,7 +24,7 @@ % % dynamical_tols : :class:`logical` % indicate whether or not to use a dynamical tolerance scaling for the algorithm's - % subroutines based on the current error measure, defaults to :code:`true` + % subroutines based on the current error measure, defaults to :code:`true`. % % tol_min : :class:`double` % smallest allowed convergence tolerance for soubroutines, defaults to :code:`1e-12`. diff --git a/src/mps/UniformMps.m b/src/mps/UniformMps.m index 0475a87..7ab6db4 100644 --- a/src/mps/UniformMps.m +++ b/src/mps/UniformMps.m @@ -940,34 +940,6 @@ function plot_entanglementspectrum(mps, d, w, ax, kwargs) end end -% S = EntanglementEntropy(mps, loc); -% S = RenyiEntropy(mps,n, loc); -% E = ExpectationValue(mps, W, GL, GR) -% rho = LeftFixedPoint(mps1, mps2, w, choice) -% rho = RightFixedPoint(mps1, mps2, w, choice) -% sf=StaticStructureFactor(mps,S,k) -% -% out = Block(mps, opts) -% out = Split(mps, varargin) -% %[out, lambda] = Truncate(mps, control, opts) -% -% [f, rho] = Fidelity(mps1, mps2, tol) -% -% mps = Conj(mps) -% -% mps = mtimes(mps, lambda) -% -% mps = ShiftUnitCell(mps,dd,dw) -% out = Rotate180(mps) -% out = Transpose(mps) -% -% mps = SendToGpu(mps) -% mps = GetFromGpu(mps) -% -% [mps, xi] = Retract(mps, eta, alpha) -% n = Inner(x, eta, xi) - - end %% Subroutines diff --git a/src/tensors/Tensor.m b/src/tensors/Tensor.m index 3ad91bf..b9d1d98 100644 --- a/src/tensors/Tensor.m +++ b/src/tensors/Tensor.m @@ -1566,12 +1566,12 @@ % alg : :class:`char` or :class:`string` % selection of algorithms for the decomposition: % - % - 'qr' produces an upper triangular remainder R - % - 'qrpos' corrects the diagonal elements of R to be positive. - % - 'ql' produces a lower triangular remainder R - % - 'qlpos' corrects the diagonal elements of R to be positive. - % - 'polar' produces a Hermitian and positive semidefinite R. - % - 'svd' uses a singular value decomposition. + % - :code:`'qr'` produces an upper triangular remainder R + % - :code:`'qrpos'` corrects the diagonal elements of R to be positive. + % - :code:`'ql'` produces a lower triangular remainder R + % - :code:`'qlpos'` corrects the diagonal elements of R to be positive. + % - :code:`'polar'` produces a Hermitian and positive semidefinite R. + % - :code:`'svd'` uses a singular value decomposition. % % Returns % ------- @@ -1647,12 +1647,12 @@ % alg : :class:`char` or :class:`string` % selection of algorithms for the decomposition: % - % - 'rq' produces an upper triangular remainder R - % - 'rqpos' corrects the diagonal elements of R to be positive. - % - 'lq' produces a lower triangular remainder R - % - 'lqpos' corrects the diagonal elements of R to be positive. - % - 'polar' produces a Hermitian and positive semidefinite R. - % - 'svd' uses a singular value decomposition. + % - :code:`'rq'` produces an upper triangular remainder R + % - :code:`'rqpos'` corrects the diagonal elements of R to be positive. + % - :code:`'lq'` produces a lower triangular remainder R + % - :code:`'lqpos'` corrects the diagonal elements of R to be positive. + % - :code:`'polar'` produces a Hermitian and positive semidefinite R. + % - :code:`'svd'` uses a singular value decomposition. % % Returns % ------- @@ -1723,8 +1723,8 @@ % alg : :class:`char` or :class:`string` % selection of algorithms for the nullspace: % - % - 'svd' - % - 'qr' + % - :code:`'svd'` + % - :code:`'qr'` % % Returns % ------- @@ -1793,8 +1793,8 @@ % alg : :class:`char` or :class:`string` % selection of algorithms for the nullspace: % - % - 'svd' - % - 'lq' + % - :code:`'svd'` + % - :code:`'lq'` % % Returns % ------- @@ -2224,7 +2224,7 @@ % Returns % ------- % bool : :class:`logical` - % true if t is isometric. + % true if :code:`t` is isometric. arguments t diff --git a/src/tensors/charges/AbstractCharge.m b/src/tensors/charges/AbstractCharge.m index 6563ad8..9f97052 100644 --- a/src/tensors/charges/AbstractCharge.m +++ b/src/tensors/charges/AbstractCharge.m @@ -34,7 +34,7 @@ % Returns % ------- % abar : :class:`.AbstractCharge` - % conjugate charge suche that :code:`one(a)` is an element of :code:`a * abar` + % conjugate charge such that :code:`one(a)` is an element of :code:`a * abar` error('AbstractCharge:requiredMethod', ... 'Error. \nMethod must be overloaded.') end diff --git a/src/utility/swapvars.m b/src/utility/swapvars.m index 405d65d..5a53f00 100644 --- a/src/utility/swapvars.m +++ b/src/utility/swapvars.m @@ -4,7 +4,7 @@ % Usage % ----- % :code:`[a, b] = swapvars(a, b)` -% stores the value of :code:`a` in :code:`b`, and the value of :code:`b in :code:`a`. +% stores the value of :code:`a` in :code:`b`, and the value of :code:`b` in :code:`a`. end