Skip to content

Commit

Permalink
Added support for OccupationNumberFS
Browse files Browse the repository at this point in the history
Co-authored-by: Joachim Brand <j.brand@massey.ac.nz>
  • Loading branch information
rohan-kumar-uoa and joachimbrand authored Jan 18, 2024
1 parent 2a3afca commit 77c8022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Hamiltonians/correlation_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function diagonal_element(::StringCorrelator{D}, add::SingleComponentFockAddress
N = num_particles(add)
d = mod(D, M)

if iszero(N % M)
if !ismissing(N) && iszero(N % M)
return _string_diagonal_real(d, add)
else
return _string_diagonal_complex(d, add)
Expand Down Expand Up @@ -372,4 +372,4 @@ function _string_diagonal_real(d, add)
end

return result / M
end
end

0 comments on commit 77c8022

Please sign in to comment.