@@ -188,14 +188,19 @@ diagspacelist = ((ℂ^4)', ℂ[Z2Irrep](0 => 2, 1 => 3),
188188 @timedtestset " Factorization" begin
189189 for T in (Float32, ComplexF64)
190190 t = DiagonalTensorMap (rand (T, reduceddim (V)), V)
191- @testset " eig" begin
191+ @testset " eig/eigh" begin
192+ D, W = @constinferred eig_full (t)
193+ @test t * W ≈ W * D
192194 D, W = @constinferred eig (t)
193195 @test t * W ≈ W * D
194196 t2 = t + t'
195197 D2, V2 = @constinferred eigh (t2)
196198 VdV2 = V2' * V2
197199 @test VdV2 ≈ one (VdV2)
198200 @test t2 * V2 ≈ V2 * D2
201+
202+ D3 = @constinferred eigh_vals (t2)
203+ @test D2 ≈ D3
199204
200205 @test rank (D) ≈ rank (t)
201206 @test cond (D) ≈ cond (t)
@@ -231,6 +236,26 @@ diagspacelist = ((ℂ^4)', ℂ[Z2Irrep](0 => 2, 1 => 3),
231236 @test isposdef (L)
232237 end
233238 end
239+ @testset " qr_full with $alg " for alg in (TensorKit. DiagonalAlgorithm (),)
240+ Q, R = @constinferred qr_full (t; alg= alg)
241+ @test isisometry (Q)
242+ @test Q * R ≈ t
243+ end
244+ @testset " qr_compact with $alg " for alg in (TensorKit. DiagonalAlgorithm (),)
245+ Q, R = @constinferred qr_compact (t; alg= alg)
246+ @test isisometry (Q)
247+ @test Q * R ≈ t
248+ end
249+ @testset " lq_full with $alg " for alg in (TensorKit. DiagonalAlgorithm (),)
250+ L, Q = @constinferred lq_full (t; alg= alg)
251+ @test isisometry (Q; side= :right )
252+ @test L * Q ≈ t
253+ end
254+ @testset " lq_compact with $alg " for alg in (TensorKit. DiagonalAlgorithm (),)
255+ L, Q = @constinferred lq_compact (t; alg= alg)
256+ @test isisometry (Q; side= :right )
257+ @test L * Q ≈ t
258+ end
234259 @testset " tsvd with $alg " for alg in (TensorKit. DiagonalAlgorithm (),)
235260 U, S, Vᴴ = @constinferred tsvd (t; alg= alg)
236261 UdU = U' * U
0 commit comments