Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Sep 13, 2023
1 parent 4f13eb6 commit 5d9e2a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions test/base/test_emptyitensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,29 @@ end
@test hassameinds(C, (i'', i))
storage(C)
storage(C)
@test storage(C) isa BlockSparse{NDTensors.UnspecifiedZero, NDTensors.UnallocatedZeros{NDTensors.UnspecifiedZero, 1, Tuple{Base.OneTo{Int64}}, Vector{NDTensors.UnspecifiedZero}}, 2}
@test storage(C) isa BlockSparse{
NDTensors.UnspecifiedZero,
NDTensors.UnallocatedZeros{
NDTensors.UnspecifiedZero,1,Tuple{Base.OneTo{Int64}},Vector{NDTensors.UnspecifiedZero}
},
2,
}

B = randomITensor(dag(i), i')

C = A' * B

@test hassameinds(C, (i'', i))
@test storage(C) isa BlockSparse{Float64, NDTensors.UnallocatedZeros{Float64, 1, Tuple{Base.OneTo{Int64}}, Vector{Float64}}, 2}
@test storage(C) isa BlockSparse{
Float64,NDTensors.UnallocatedZeros{Float64,1,Tuple{Base.OneTo{Int64}},Vector{Float64}},2
}

C = B' * A

@test hassameinds(C, (i'', i))
@test storage(C) isa BlockSparse{Float64, NDTensors.UnallocatedZeros{Float64, 1, Tuple{Base.OneTo{Int64}}, Vector{Float64}}, 2}
@test storage(C) isa BlockSparse{
Float64,NDTensors.UnallocatedZeros{Float64,1,Tuple{Base.OneTo{Int64}},Vector{Float64}},2
}

C = B + A
@test inds(C) == inds(B)
Expand Down
2 changes: 1 addition & 1 deletion test/base/test_fermions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ import ITensors: Out, In
s = siteinds("Fermion", N; conserve_qns=true)

T = ITensor(QN("Nf", 0, -1), dag(s[1]), s[1]')
T[2, 2] = 1.
T[2, 2] = 1.0

F = eigen(T; ishermitian=true, cutoff=cutoff)
D, U, spec = F
Expand Down

0 comments on commit 5d9e2a0

Please sign in to comment.