Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Jul 31, 2023
1 parent 63a58ee commit 0269dd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion NDTensors/src/blocksparse/diagblocksparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ function similar(
end

# NDTensors.similar
function similar(storagetype::Type{<:DiagBlockSparse}, blockoffsets::BlockOffsets, dims::Tuple)
function similar(
storagetype::Type{<:DiagBlockSparse}, blockoffsets::BlockOffsets, dims::Tuple
)
# TODO: Improve this with FillArrays.jl
# data = similar(datatype(storagetype), nnz(blockoffsets, dims))
data = zero(datatype(storagetype))
Expand Down
2 changes: 1 addition & 1 deletion test/base/test_qndiagitensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ using ITensors, Test
@test x[1, 1] == c
@test dag(x)[1, 1] == conj(c)
@test (x * dag(x))[] == 2 * abs2(c)
@test (x * dag(x))[] norm(x) ^ 2
@test (x * dag(x))[] norm(x)^2
end

@testset "Regression test for printing a QN Diag ITensor" begin
Expand Down

0 comments on commit 0269dd4

Please sign in to comment.