Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed May 15, 2024
1 parent d58d354 commit 72941b5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/tensor_operations/tensor_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,14 @@ function directsum_projectors(
return D1, D2
end

function directsum_projectors(::Type{<:EmptyNumber}, ::Type{<:EmptyNumber}, ::Index, ::Index, ::Index)
error("It is not possible to call directsum on two tensors with element type EmptyNumber.
If you are inputting ITensors constructor like ITensor(i, j), try specifying the element type,
e.g. ITensor(Float64, i, j), or filling them with zero value, e.g. ITensor(0.0, i, j).")
function directsum_projectors(
::Type{<:EmptyNumber}, ::Type{<:EmptyNumber}, ::Index, ::Index, ::Index
)
return error(
"It is not possible to call directsum on two tensors with element type EmptyNumber.
If you are inputting ITensors constructor like ITensor(i, j), try specifying the element type,
e.g. ITensor(Float64, i, j), or filling them with zero value, e.g. ITensor(0.0, i, j).",
)
end

function check_directsum_inds(A::ITensor, I, B::ITensor, J)
Expand Down

0 comments on commit 72941b5

Please sign in to comment.