Skip to content

Commit

Permalink
Fix floating point check for ML tomo
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewware committed May 3, 2020
1 parent d07828a commit a87bcd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state-tomo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ struct MLStateTomo
end
end
sv = sum(v)
if ! LinearAlgebra.isdiag(sv) || !isapprox(maximum(abs.(LinearAlgebra.diag(sv)))-minimum(abs.(LinearAlgebra.diag(sv))),0.0)
if ! LinearAlgebra.isdiag(sv) || !isapprox(maximum(abs.(LinearAlgebra.diag(sv)))-minimum(abs.(LinearAlgebra.diag(sv))),0.0,atol=1e-12)
error("POVM effects must add up to the identity.")
end
if !all([size(e,1)==size(e,2) for e in v]) || !all([size(v[1],1)==size(e,1) for e in v])
Expand Down

0 comments on commit a87bcd5

Please sign in to comment.