Skip to content

Commit

Permalink
Add tests ProjectTo
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jun 28, 2024
1 parent 8a821e0 commit 1148fe9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),

@timedtestset "Automatic Differentiation with spacetype $(TensorKit.type_repr(eltype(V)))" verbose = true for V in
Vlist
@timedtestset "Basic utility" begin
T1 = TensorMap(randn, Float64, V[1] V[2] V[3] V[4])
T2 = TensorMap(randn, ComplexF64, V[1] V[2] V[3] V[4])

P1 = ProjectTo(T1)
@test P1(T1) == T1
@test P1(T2) == real(T2)
end

@timedtestset "Basic Linear Algebra with scalartype $T" for T in (Float64, ComplexF64)
A = TensorMap(randn, T, V[1] V[2] V[3] V[4] V[5])
B = TensorMap(randn, T, space(A))
Expand Down

0 comments on commit 1148fe9

Please sign in to comment.