Skip to content

Commit

Permalink
Fix a bug of expand! of Term.
Browse files Browse the repository at this point in the history
  • Loading branch information
waltergu committed Apr 18, 2022
1 parent eb4af62 commit 7d2cb95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Essentials/DegreesOfFreedom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ function expand!(operators::Operators, term::Term, bond::AbstractBond, hilbert::
value = term.value * term.amplitude(bond) * term.factor
if abs(value) 0
hermitian = ishermitian(term)
record = (isnothing(hermitian) && length(operators)>0) ? Set{idtype(M)}() : nothing
record = (isnothing(hermitian) && length(operators)>0) ? Set{idtype(eltype(operators))}() : nothing
for coupling in term.couplings(bond)
for opt in expand(coupling, bond, hilbert, term|>kind|>Val)
isapprox(opt.value, 0.0, atol=atol, rtol=rtol) && continue
Expand Down

0 comments on commit 7d2cb95

Please sign in to comment.