Skip to content

Commit d870644

Browse files
committed
bring back Int for truncrank dimensions
1 parent 496a701 commit d870644

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/tensors/factorizations.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ spacelist = try
99
if ENV["CI"] == "true"
1010
println("Detected running on CI")
1111
if Sys.iswindows()
12-
(Vtr, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VIB_diag)
12+
(Vtr, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VIB_diag, VIB_M)
1313
elseif Sys.isapple()
14-
(Vtr, Vℤ₃, VfU₁, VfSU₂, VIB_diag)
14+
(Vtr, Vℤ₃, VfU₁, VfSU₂, VIB_diag, VIB_M)
1515
else
16-
(Vtr, VU₁, VCU₁, VSU₂, VfSU₂, VIB_diag)
16+
(Vtr, VU₁, VCU₁, VSU₂, VfSU₂, VIB_diag, VIB_M)
1717
end
1818
else
19-
(Vtr, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VfSU₂, VIB_diag)
19+
(Vtr, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VfSU₂, VIB_diag, VIB_M)
2020
end
2121
catch
22-
(Vtr, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VfSU₂, VIB_diag)
22+
(Vtr, Vℤ₃, VU₁, VfU₁, VCU₁, VSU₂, VfSU₂, VIB_diag, VIB_M)
2323
end
2424

2525
eltypes = (Float32, ComplexF64)
2626

27-
for V in spacelist
27+
for V in (VIB_M, VIB_diag)
2828
I = sectortype(first(V))
2929
Istr = TensorKit.type_repr(I)
3030
println("---------------------------------------")
@@ -237,7 +237,7 @@ for V in spacelist
237237
@test isisometry(Vᴴ; side = :right)
238238

239239
#FIXME: dimension of S is a float, might be a real issue if it's a decimal
240-
trunc = truncrank(dim(domain(S)) ÷ 2)
240+
trunc = truncrank(Int(dim(domain(S)) ÷ 2))
241241
U1, S1, Vᴴ1 = @constinferred svd_trunc(t; trunc)
242242
@test t * Vᴴ1' U1 * S1
243243
@test isisometry(U1)
@@ -269,7 +269,7 @@ for V in spacelist
269269
@test isisometry(Vᴴ4; side = :right)
270270
@test norm(t - U4 * S4 * Vᴴ4) <= 0.5
271271

272-
trunc = truncrank(dim(domain(S)) ÷ 2) & trunctol(; atol = λ - 10eps(λ))
272+
trunc = truncrank(Int(dim(domain(S)) ÷ 2)) & trunctol(; atol = λ - 10eps(λ))
273273
U5, S5, Vᴴ5 = @constinferred svd_trunc(t; trunc)
274274
@test t * Vᴴ5' U5 * S5
275275
@test isisometry(U5)
@@ -299,7 +299,7 @@ for V in spacelist
299299
@test @constinferred isposdef(vdv)
300300
t isa DiagonalTensorMap || @test !isposdef(t) # unlikely for non-hermitian map
301301

302-
d, v = @constinferred eig_trunc(t; trunc = truncrank(dim(domain(t)) ÷ 2))
302+
d, v = @constinferred eig_trunc(t; trunc = truncrank(Int(dim(domain(t)) ÷ 2)))
303303
@test t * v v * d
304304
@test dim(domain(d)) dim(domain(t)) ÷ 2
305305

@@ -330,7 +330,7 @@ for V in spacelist
330330
@test isposdef(t - λ * one(t) + 0.1 * one(t))
331331
@test !isposdef(t - λ * one(t) - 0.1 * one(t))
332332

333-
d, v = @constinferred eigh_trunc(t; trunc = truncrank(dim(domain(t)) ÷ 2))
333+
d, v = @constinferred eigh_trunc(t; trunc = truncrank(Int(dim(domain(t)) ÷ 2)))
334334
@test t * v v * d
335335
@test dim(domain(d)) dim(domain(t)) ÷ 2
336336
end

0 commit comments

Comments
 (0)