@@ -29,7 +29,7 @@ function ChainRulesTestUtils.test_approx(actual::AbstractTensorMap,
2929end
3030
3131# make sure that norms are computed correctly:
32- function FiniteDifferences. to_vec (t:: TensorKit .SectorDict )
32+ function FiniteDifferences. to_vec (t:: TK .SectorDict )
3333 T = scalartype (valtype (t))
3434 vec = mapreduce (vcat, t; init= T[]) do (c, b)
3535 return reshape (b, :) .* sqrt (dim (c))
@@ -39,7 +39,7 @@ function FiniteDifferences.to_vec(t::TensorKit.SectorDict)
3939 function from_vec (x_real)
4040 x = T <: Real ? x_real : reinterpret (T, x_real)
4141 ctr = 0
42- return TensorKit . SectorDict (c => (n = length (b);
42+ return TK . SectorDict (c => (n = length (b);
4343 b′ = reshape (view (x, ctr .+ (1 : n)), size (b)) ./
4444 sqrt (dim (c));
4545 ctr += n;
6161
6262# rrules for functions that destroy inputs
6363# ----------------------------------------
64- function ChainRulesCore. rrule (:: typeof (TensorKit . tsvd), args... ; kwargs... )
64+ function ChainRulesCore. rrule (:: typeof (TK . tsvd), args... ; kwargs... )
6565 return ChainRulesCore. rrule (tsvd!, args... ; kwargs... )
6666end
6767function ChainRulesCore. rrule (:: typeof (LinearAlgebra. svdvals), args... ; kwargs... )
6868 return ChainRulesCore. rrule (svdvals!, args... ; kwargs... )
6969end
70- function ChainRulesCore. rrule (:: typeof (TensorKit . eig), args... ; kwargs... )
70+ function ChainRulesCore. rrule (:: typeof (TK . eig), args... ; kwargs... )
7171 return ChainRulesCore. rrule (eig!, args... ; kwargs... )
7272end
73- function ChainRulesCore. rrule (:: typeof (TensorKit . eigh), args... ; kwargs... )
73+ function ChainRulesCore. rrule (:: typeof (TK . eigh), args... ; kwargs... )
7474 return ChainRulesCore. rrule (eigh!, args... ; kwargs... )
7575end
7676function ChainRulesCore. rrule (:: typeof (LinearAlgebra. eigvals), args... ; kwargs... )
7777 return ChainRulesCore. rrule (eigvals!, args... ; kwargs... )
7878end
79- function ChainRulesCore. rrule (:: typeof (TensorKit . leftorth), args... ; kwargs... )
79+ function ChainRulesCore. rrule (:: typeof (TK . leftorth), args... ; kwargs... )
8080 return ChainRulesCore. rrule (leftorth!, args... ; kwargs... )
8181end
82- function ChainRulesCore. rrule (:: typeof (TensorKit . rightorth), args... ; kwargs... )
82+ function ChainRulesCore. rrule (:: typeof (TK . rightorth), args... ; kwargs... )
8383 return ChainRulesCore. rrule (rightorth!, args... ; kwargs... )
8484end
8585
@@ -134,7 +134,7 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
134134 ℂ[FibonacciAnyon](:I => 2 , :τ => 3 ),
135135 ℂ[FibonacciAnyon](:I => 2 , :τ => 2 )))
136136
137- @timedtestset " Automatic Differentiation with spacetype $(TensorKit . type_repr (eltype (V))) " verbose = true for V in
137+ @timedtestset " Automatic Differentiation with spacetype $(TK . type_repr (eltype (V))) " verbose = true for V in
138138 Vlist
139139 eltypes = isreal (sectortype (eltype (V))) ? (Float64, ComplexF64) : (ComplexF64,)
140140 symmetricbraiding = BraidingStyle (sectortype (eltype (V))) isa SymmetricBraiding
@@ -149,9 +149,9 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
149149
150150 test_rrule (copy, T1)
151151 test_rrule (copy, T2)
152- test_rrule (TensorKit . copy_oftype, T1, ComplexF64)
152+ test_rrule (TK . copy_oftype, T1, ComplexF64)
153153 if symmetricbraiding
154- test_rrule (TensorKit . permutedcopy_oftype, T1, ComplexF64, ((3 , 1 ), (2 , 4 )))
154+ test_rrule (TK . permutedcopy_oftype, T1, ComplexF64, ((3 , 1 ), (2 , 4 )))
155155
156156 test_rrule (convert, Array, T1)
157157 test_rrule (TensorMap, convert (Array, T1), codomain (T1), domain (T1);
@@ -364,13 +364,13 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
364364 H = (H + H' ) / 2
365365 atol = precision (T)
366366
367- for alg in (TensorKit . QR (), TensorKit . QRpos ())
367+ for alg in (TK . QR (), TK . QRpos ())
368368 test_rrule (leftorth, A; fkwargs= (; alg= alg), atol)
369369 test_rrule (leftorth, B; fkwargs= (; alg= alg), atol)
370370 test_rrule (leftorth, C; fkwargs= (; alg= alg), atol)
371371 end
372372
373- for alg in (TensorKit . LQ (), TensorKit . LQpos ())
373+ for alg in (TK . LQ (), TK . LQpos ())
374374 test_rrule (rightorth, A; fkwargs= (; alg= alg), atol)
375375 test_rrule (rightorth, B; fkwargs= (; alg= alg), atol)
376376 test_rrule (rightorth, C; fkwargs= (; alg= alg), atol)
@@ -428,7 +428,7 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
428428 T <: Complex && remove_svdgauge_depence! (ΔU, ΔV, U, S, V)
429429 test_rrule (tsvd, B; atol, output_tangent= (ΔU, ΔS, ΔV, 0.0 ))
430430
431- Vtrunc = spacetype (S)(TensorKit . SectorDict (c => ceil (Int, size (b, 1 ) / 2 )
431+ Vtrunc = spacetype (S)(TK . SectorDict (c => ceil (Int, size (b, 1 ) / 2 )
432432 for (c, b) in blocks (S)))
433433
434434 U, S, V, ϵ = tsvd (B; trunc= truncspace (Vtrunc))
@@ -447,7 +447,7 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
447447 T <: Complex && remove_svdgauge_depence! (ΔU, ΔV, U, S, V)
448448 test_rrule (tsvd, C; atol, output_tangent= (ΔU, ΔS, ΔV, 0.0 ))
449449
450- c, = TensorKit . MatrixAlgebra. _argmax (x -> sqrt (dim (x[1 ])) * maximum (diag (x[2 ])),
450+ c, = TK . MatrixAlgebra. _argmax (x -> sqrt (dim (x[1 ])) * maximum (diag (x[2 ])),
451451 blocks (S))
452452 trunc = truncdim (round (Int, 2 * dim (c)))
453453 U, S, V, ϵ = tsvd (C; trunc)
0 commit comments