We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfb622d commit cdd507dCopy full SHA for cdd507d
4 files changed
Project.toml
@@ -62,3 +62,6 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
62
63
[targets]
64
test = ["Aqua", "Combinatorics", "LinearAlgebra", "TensorOperations", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "FiniteDifferences", "Zygote"]
65
+
66
+[sources]
67
+MatrixAlgebraKit = {url="https://github.com/QuantumKitHub/MatrixAlgebraKit.jl", rev="ksh/copyfix"}
src/TensorKit.jl
@@ -73,6 +73,8 @@ export mul!, lmul!, rmul!, adjoint!, pinv, axpy!, axpby!
73
export leftorth, rightorth, leftnull, rightnull,
74
leftorth!, rightorth!, leftnull!, rightnull!,
75
left_polar, left_polar!, right_polar, right_polar!,
76
+ qr_full, qr_compact, qr_null, lq_full, lq_compact, lq_null,
77
+ qr_full!, qr_compact!, qr_null!, lq_full!, lq_compact!, lq_null!,
78
tsvd!, tsvd, eigen, eigen!, eig, eig!, eigh, eigh!, exp, exp!,
79
isposdef, isposdef!, ishermitian, isisometry, isunitary, sylvester, rank, cond
80
export braid, braid!, permute, permute!, transpose, transpose!, twist, twist!, repartition,
src/tensors/factorizations/factorizations.jl
@@ -7,6 +7,10 @@ export eig, eig!, eigh, eigh!
7
export tsvd, tsvd!, svdvals, svdvals!
8
export leftorth, leftorth!, rightorth, rightorth!
9
export leftnull, leftnull!, rightnull, rightnull!
10
+export qr_full, qr_compact, qr_null
11
+export qr_full!, qr_compact!, qr_null!
12
+export lq_full, lq_compact, lq_null
13
+export lq_full!, lq_compact!, lq_null!
14
export copy_oftype, permutedcopy_oftype, one!
15
export TruncationScheme, notrunc, truncbelow, truncerr, truncdim, truncspace, PolarViaSVD
16
test/factorizations.jl
@@ -29,6 +29,36 @@ for V in spacelist
29
# Test both a normal tensor and an adjoint one.
30
ts = (rand(T, W, W'), rand(T, W, W')', rand(T, V1, W'), rand(T, V1, W')')
31
@testset for t in ts
32
+ @testset "qr_full" begin
33
+ Q, R = @constinferred qr_full(t)
34
+ @test isisometry(Q)
35
+ @test Q * R ≈ t
36
+ end
37
+ @testset "qr_compact" begin
38
+ Q, R = @constinferred qr_compact(t)
39
40
41
42
+ @testset "qr_null" begin
43
+ N = @constinferred qr_null(t)
44
+ @test isisometry(N)
45
+ @test norm(N' * t) < 100 * eps(norm(t))
46
47
+ @testset "lq_full" begin
48
+ L, Q = @constinferred lq_full(t)
49
+ @test isisometry(Q; side=:right)
50
+ @test L * Q ≈ t
51
52
+ @testset "lq_compact" begin
53
+ L, Q = @constinferred lq_compact(t)
54
55
56
57
+ @testset "lq_null" begin
58
+ Nᴴ = @constinferred lq_null(t)
59
+ @test isisometry(Nᴴ; side=:right)
60
+ @test norm(t * Nᴴ') < 100 * eps(norm(t))
61
@testset "leftorth with $alg" for alg in
(TensorKit.LAPACK_HouseholderQR(),
TensorKit.LAPACK_HouseholderQR(;
0 commit comments