Skip to content

Commit 13f7c5d

Browse files
committed
remove TensorKitSectors dependency + unspecify TK.sectortype
1 parent 8d5b989 commit 13f7c5d

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1010
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1111
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
1212
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
13-
TensorKitSectors = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f"
1413
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
1514
TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"
1615
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
@@ -25,7 +24,6 @@ Random = "1"
2524
SafeTestsets = "0.1"
2625
Strided = "2"
2726
TensorKit = "0.14"
28-
TensorKitSectors = "0.1.6"
2927
TensorOperations = "5"
3028
Test = "1"
3129
TestExtras = "0.2, 0.3"

src/BlockTensorKit.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export sparse
1414
export dropzeros!, droptol!
1515
export undef_blocks
1616

17-
using TensorKitSectors
1817
using TensorKit
1918
using TensorKit:
2019
OneOrNoneIterator,
@@ -46,7 +45,6 @@ using Compat
4645

4746
import VectorInterface as VI
4847
import TensorKit as TK
49-
import TensorKitSectors as TKS
5048
import TensorOperations as TO
5149
import TupleTools as TT
5250

src/tensors/tensoroperations.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ function TO.tensoradd_type(
44
TC, A::AbstractBlockTensorMap, ::Index2Tuple{N₁,N₂}, ::Bool
55
) where {N₁,N₂}
66
TA = eltype(A)
7-
I = TK.sectortype(A)
8-
Tnew = TKS.sectorscalartype(I) <: Real ? TC : complex(TC)
7+
I = sectortype(A)
8+
Tnew = sectorscalartype(I) <: Real ? TC : complex(TC)
99
if TA isa Union
1010
M = Union{TK.similarstoragetype(TA.a, Tnew),TK.similarstoragetype(TA.b, Tnew)}
1111
else
@@ -35,9 +35,9 @@ function TO.tensorcontract_type(
3535
) where {N₁,N₂}
3636
spacetype(A) == spacetype(B) ||
3737
throw(SpaceMismatch("incompatible space types: $(spacetype(A))$(spacetype(B))"))
38-
39-
I = TK.sectortype(A)
40-
Tnew = TKS.sectorscalartype(I) <: Real ? TC : complex(TC)
38+
39+
I = sectortype(A)
40+
Tnew = sectorscalartype(I) <: Real ? TC : complex(TC)
4141
M = promote_storagetype(Tnew, eltype(A), eltype(B))
4242
return if issparse(A) && issparse(B)
4343
sparseblocktensormaptype(spacetype(A), N₁, N₂, M)
@@ -57,9 +57,9 @@ function TO.tensorcontract_type(
5757
) where {N₁,N₂}
5858
spacetype(A) == spacetype(B) ||
5959
throw(SpaceMismatch("incompatible space types: $(spacetype(A))$(spacetype(B))"))
60-
61-
I = TK.sectortype(A)
62-
Tnew = TKS.sectorscalartype(I) <: Real ? TC : complex(TC)
60+
61+
I = sectortype(A)
62+
Tnew = sectorscalartype(I) <: Real ? TC : complex(TC)
6363
M = promote_storagetype(Tnew, typeof(A), eltype(B))
6464
return if issparse(A) && issparse(B)
6565
sparseblocktensormaptype(spacetype(A), N₁, N₂, M)
@@ -79,9 +79,9 @@ function TO.tensorcontract_type(
7979
) where {N₁,N₂}
8080
spacetype(A) == spacetype(B) ||
8181
throw(SpaceMismatch("incompatible space types: $(spacetype(A))$(spacetype(B))"))
82-
83-
I = TK.sectortype(A)
84-
Tnew = TKS.sectorscalartype(I) <: Real ? TC : complex(TC)
82+
83+
I = sectortype(A)
84+
Tnew = sectorscalartype(I) <: Real ? TC : complex(TC)
8585
M = promote_storagetype(Tnew, eltype(A), typeof(B))
8686
return if issparse(A) && issparse(B)
8787
sparseblocktensormaptype(spacetype(A), N₁, N₂, M)

0 commit comments

Comments
 (0)