@@ -5,18 +5,8 @@ const OFA = OrthogonalFactorizationAlgorithm
55import LinearAlgebra: svd!, svd
66const SVDAlg = Union{SVD,SDD}
77
8- Base. @deprecate (svd (t:: AbstractTensorMap , leftind:: IndexTuple , rightind:: IndexTuple ;
9- trunc:: TruncationScheme = notrunc (), p:: Real = 2 , alg:: SVDAlg = SDD ()),
10- tsvd (t, leftind, rightind; trunc= trunc, p= p, alg= alg))
11- Base. @deprecate (svd (t:: AbstractTensorMap ;
12- trunc:: TruncationScheme = notrunc (), p:: Real = 2 , alg:: SVDAlg = SDD ()),
13- tsvd (t; trunc= trunc, p= p, alg= alg))
14- Base. @deprecate (svd! (t:: AbstractTensorMap ;
15- trunc:: TruncationScheme = notrunc (), p:: Real = 2 , alg:: SVDAlg = SDD ()),
16- tsvd (t; trunc= trunc, p= p, alg= alg))
17-
188"""
19- tsvd(t::AbstractTensorMap, leftind::Tuple , rightind::Tuple ;
9+ tsvd(t::AbstractTensorMap, ( leftind, rightind)::Index2Tuple ;
2010 trunc::TruncationScheme = notrunc(), p::Real = 2, alg::Union{SVD, SDD} = SDD())
2111 -> U, S, V, ϵ
2212
@@ -47,12 +37,12 @@ algorithm that computes the decomposition (`_gesvd` or `_gesdd`).
4737Orthogonality requires `InnerProductStyle(t) <: HasInnerProduct`, and `tsvd(!)`
4838is currently only implemented for `InnerProductStyle(t) === EuclideanProduct()`.
4939"""
50- function tsvd (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ; kwargs... )
51- return tsvd! (permute (t, (p1, p2 ); copy= true ); kwargs... )
40+ function tsvd (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ; kwargs... )
41+ return tsvd! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
5242end
5343
5444"""
55- leftorth(t::AbstractTensorMap, leftind::Tuple , rightind::Tuple ;
45+ leftorth(t::AbstractTensorMap, ( leftind, rightind)::Index2Tuple ;
5646 alg::OrthogonalFactorizationAlgorithm = QRpos()) -> Q, R
5747
5848Create orthonormal basis `Q` for indices in `leftind`, and remainder `R` such that
@@ -73,12 +63,12 @@ Orthogonality requires `InnerProductStyle(t) <: HasInnerProduct`, and
7363`leftorth(!)` is currently only implemented for
7464 `InnerProductStyle(t) === EuclideanProduct()`.
7565"""
76- function leftorth (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ; kwargs... )
77- return leftorth! (permute (t, (p1, p2 ); copy= true ); kwargs... )
66+ function leftorth (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ; kwargs... )
67+ return leftorth! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
7868end
7969
8070"""
81- rightorth(t::AbstractTensorMap, leftind::Tuple , rightind::Tuple ;
71+ rightorth(t::AbstractTensorMap, ( leftind, rightind)::Index2Tuple ;
8272 alg::OrthogonalFactorizationAlgorithm = LQpos()) -> L, Q
8373
8474Create orthonormal basis `Q` for indices in `rightind`, and remainder `L` such that
@@ -101,12 +91,12 @@ Orthogonality requires `InnerProductStyle(t) <: HasInnerProduct`, and
10191`rightorth(!)` is currently only implemented for
10292`InnerProductStyle(t) === EuclideanProduct()`.
10393"""
104- function rightorth (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ; kwargs... )
105- return rightorth! (permute (t, (p1, p2 ); copy= true ); kwargs... )
94+ function rightorth (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ; kwargs... )
95+ return rightorth! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
10696end
10797
10898"""
109- leftnull(t::AbstractTensor, leftind::Tuple , rightind::Tuple ;
99+ leftnull(t::AbstractTensor, ( leftind, rightind)::Index2Tuple ;
110100 alg::OrthogonalFactorizationAlgorithm = QRpos()) -> N
111101
112102Create orthonormal basis for the orthogonal complement of the support of the indices in
@@ -127,12 +117,12 @@ Orthogonality requires `InnerProductStyle(t) <: HasInnerProduct`, and
127117`leftnull(!)` is currently only implemented for
128118`InnerProductStyle(t) === EuclideanProduct()`.
129119"""
130- function leftnull (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ; kwargs... )
131- return leftnull! (permute (t, (p1, p2 ); copy= true ); kwargs... )
120+ function leftnull (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ; kwargs... )
121+ return leftnull! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
132122end
133123
134124"""
135- rightnull(t::AbstractTensor, leftind::Tuple , rightind::Tuple ;
125+ rightnull(t::AbstractTensor, ( leftind, rightind)::Index2Tuple ;
136126 alg::OrthogonalFactorizationAlgorithm = LQ(),
137127 atol::Real = 0.0,
138128 rtol::Real = eps(real(float(one(scalartype(t)))))*iszero(atol)) -> N
@@ -155,12 +145,12 @@ Orthogonality requires `InnerProductStyle(t) <: HasInnerProduct`, and
155145`rightnull(!)` is currently only implemented for
156146`InnerProductStyle(t) === EuclideanProduct()`.
157147"""
158- function rightnull (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ; kwargs... )
159- return rightnull! (permute (t, (p1, p2 ); copy= true ); kwargs... )
148+ function rightnull (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ; kwargs... )
149+ return rightnull! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
160150end
161151
162152"""
163- eigen(t::AbstractTensor, leftind::Tuple , rightind::Tuple ; kwargs...) -> D, V
153+ eigen(t::AbstractTensor, ( leftind, rightind)::Index2Tuple ; kwargs...) -> D, V
164154
165155Compute eigenvalue factorization of tensor `t` as linear map from `rightind` to `leftind`.
166156
@@ -178,13 +168,13 @@ matrices. See the corresponding documentation for more information.
178168
179169See also `eig` and `eigh`
180170"""
181- function LinearAlgebra. eigen (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ;
171+ function LinearAlgebra. eigen (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ;
182172 kwargs... )
183- return eigen! (permute (t, (p1, p2 ); copy= true ); kwargs... )
173+ return eigen! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
184174end
185175
186176"""
187- eig(t::AbstractTensor, leftind::Tuple , rightind::Tuple ; kwargs...) -> D, V
177+ eig(t::AbstractTensor, ( leftind, rightind)::Index2Tuple ; kwargs...) -> D, V
188178
189179Compute eigenvalue factorization of tensor `t` as linear map from `rightind` to `leftind`.
190180The function `eig` assumes that the linear map is not hermitian and returns type stable
@@ -204,12 +194,12 @@ Accepts the same keyword arguments `scale`, `permute` and `sortby` as `eigen` of
204194
205195See also `eigen` and `eigh`.
206196"""
207- function eig (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple ; kwargs... )
208- return eig! (permute (t, (p1, p2 ); copy= true ); kwargs... )
197+ function eig (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple ; kwargs... )
198+ return eig! (permute (t, (p₁, p₂ ); copy= true ); kwargs... )
209199end
210200
211201"""
212- eigh(t::AbstractTensorMap, leftind::Tuple , rightind::Tuple ) -> D, V
202+ eigh(t::AbstractTensorMap, ( leftind, rightind)::Index2Tuple ) -> D, V
213203
214204Compute eigenvalue factorization of tensor `t` as linear map from `rightind` to `leftind`.
215205The function `eigh` assumes that the linear map is hermitian and `D` and `V` tensors with
@@ -228,26 +218,23 @@ permute(t, (leftind, rightind)) * V = V * D
228218
229219See also `eigen` and `eig`.
230220"""
231- function eigh (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple )
232- return eigh! (permute (t, (p1, p2 ); copy= true ))
221+ function eigh (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple )
222+ return eigh! (permute (t, (p₁, p₂ ); copy= true ))
233223end
234224
235225"""
236- isposdef(t::AbstractTensor, leftind::Tuple , rightind::Tuple ) -> ::Bool
226+ isposdef(t::AbstractTensor, ( leftind, rightind)::Index2Tuple ) -> ::Bool
237227
238228Test whether a tensor `t` is positive definite as linear map from `rightind` to `leftind`.
239229
240230If `leftind` and `rightind` are not specified, the current partition of left and right
241231indices of `t` is used. In that case, less memory is allocated if one allows the data in
242232`t` to be destroyed/overwritten, by using `isposdef!(t)`. Note that the permuted tensor on
243233which `isposdef!` is called should have equal domain and codomain, as otherwise it is
244- meaningless
245-
246- Accepts the same keyword arguments `scale`, `permute` and `sortby` as `eigen` of dense
247- matrices. See the corresponding documentation for more information.
234+ meaningless.
248235"""
249- function LinearAlgebra. isposdef (t:: AbstractTensorMap , p1 :: IndexTuple , p2 :: IndexTuple )
250- return isposdef! (permute (t, (p1, p2 ); copy= true ))
236+ function LinearAlgebra. isposdef (t:: AbstractTensorMap , (p₁, p₂) :: Index2Tuple )
237+ return isposdef! (permute (t, (p₁, p₂ ); copy= true ))
251238end
252239
253240function tsvd (t:: AbstractTensorMap ; trunc:: TruncationScheme = NoTruncation (),
0 commit comments