File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ using KrylovKit
66using LinearAlgebra
77using TensorKit
88using DocStringExtensions
9+ using Observers
10+ using DataFrames
911
1012export ITC
1113
@@ -48,6 +50,7 @@ include("convergenceinfo.jl")
4850include (" utils.jl" )
4951include (" callback.jl" )
5052
53+ include (" compositetensor.jl" )
5154include (" abstractunitcell.jl" )
5255include (" abstractproblem.jl" )
5356include (" networks.jl" )
Original file line number Diff line number Diff line change 2323 @test virtualspace (ct, 2 ) == s * s'
2424 @test virtualspace (ct, 3 ) == w' * w
2525 @test virtualspace (ct, 4 ) == n' * n
26+
27+ @testset " SquareSymmetric" verbose = true begin
28+ data = [
29+ 1 2 3
30+ 2 3 1
31+ 3 1 2
32+ ]
33+
34+ ucsym = UnitCell {SquareSymmetric} ([1 , 2 , 3 ])
35+
36+ @test UnitCell {Square} (data) == ucsym
37+
38+ @test ucsym == UnitCell {SquareSymmetric} ([1 2 3 ])
39+ @test ucsym == UnitCell {SquareSymmetric} ([1 ; 2 ; 3 ;;])
40+
41+ for i in 1 : 3
42+ @test ucsym[i, :] == data[i, :]
43+ @test ucsym[:, i] == data[:, i]
44+ end
45+
46+ @test identity .(ucsym) == ucsym
47+ @test exp2 .(ucsym) == UnitCell {SquareSymmetric} ([2 , 4 , 8 ])
48+ @test ucsym .+ ucsym == 2 * ucsym
49+ @test ucsym + ucsym == 2 * ucsym
50+
51+ let rv1 = ucsym + data, rv2 = ucsym .+ data
52+ for rv in (rv1, rv2)
53+ @test rv == 2 * data
54+ @test isa (rv, UnitCell{Square})
55+ end
56+ end
57+
58+ @test ucsym == ucsym'
59+ end
2660end
You can’t perform that action at this time.
0 commit comments