aboutsummaryrefslogtreecommitdiff
path: root/takagi.m
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-11-20 17:47:16 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-11-20 17:47:16 -0500
commitfa3ed5eaf67bd54e8f1fa4a1bc2c7ffbd1898d6f (patch)
tree1d311297c6738f8026e8199f26ae8cd02d5b6de1 /takagi.m
parentdb7ee776d2a10f50752c23f57b11184cb3347a15 (diff)
downloadmatlab_strawberryfields-fa3ed5eaf67bd54e8f1fa4a1bc2c7ffbd1898d6f.tar.gz
matlab_strawberryfields-fa3ed5eaf67bd54e8f1fa4a1bc2c7ffbd1898d6f.zip
remove rounding of significant figures from takagi and bloch_messiah code
Diffstat (limited to 'takagi.m')
-rw-r--r--takagi.m8
1 files changed, 2 insertions, 6 deletions
diff --git a/takagi.m b/takagi.m
index f9375a8..dafd632 100644
--- a/takagi.m
+++ b/takagi.m
@@ -1,10 +1,9 @@
-function [rl, U] = takagi(N, tol, rounding)
+function [rl, U] = takagi(N, tol)
% Autonne-Takagi decomposition of a complex symmetric (not Hermitian!) matrix.
%
% Args:
% N (complex matrix): square, symmetric matrix N
% tol (double): tolerance for symmetry check (default: 1e-13)
- % rounding (integer): decimal places for rounding singular values (default: 13)
%
% Returns:
% rl (vector): rounded singular values
@@ -13,9 +12,6 @@ function [rl, U] = takagi(N, tol, rounding)
if nargin < 2
tol = 1e-13;
end
- if nargin < 3
- rounding = 13;
- end
[n, m] = size(N);
@@ -55,7 +51,7 @@ function [rl, U] = takagi(N, tol, rounding)
[v, l, ws] = svd(N);
w = ws';
- rl = round(diag(l), rounding);
+ rl = diag(l);
% Group degenerate singular values
[~, ~, ic] = unique(rl);