Skip to content

Commit

Permalink
Change normalization in reality check
Browse files Browse the repository at this point in the history
  • Loading branch information
mhauru committed Sep 9, 2020
1 parent ecd7f44 commit 06ddb91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/genericmera.jl
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ function expect(op, m::GenericMERA, pars = (;), opscale = 1, evalscale = 1)
rho = densitymatrix(m, evalscale, pars)
op = ascended_operator(op, m, evalscale)
value = dot(rho, op)
if abs(imag(value)/norm(op)) > 1e-13
if abs(imag(value)/(norm(op)*norm(rho))) > 1e-13
@warn("Non-real expectation value: $value")
end
return real(value)
Expand Down

0 comments on commit 06ddb91

Please sign in to comment.