diff --git a/src/state-tomo.jl b/src/state-tomo.jl index 85a6d74..08cf20d 100644 --- a/src/state-tomo.jl +++ b/src/state-tomo.jl @@ -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])