From 7fe1419cf8b24020e2eb2eed30d0d07b910a7bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Designolle?= Date: Wed, 27 Nov 2024 01:17:32 +0100 Subject: [PATCH] Fix wrong sign before adding Ket dependency --- src/quantum_utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quantum_utils.jl b/src/quantum_utils.jl index fa4d1b0..f5a5dd5 100755 --- a/src/quantum_utils.jl +++ b/src/quantum_utils.jl @@ -201,7 +201,7 @@ function correlation_tensor(p::AbstractArray{T, N2}; marg::Bool = false) where { for x in cix y = [x[i] ≤ m ? x[i] : Colon() for i in 1:N] res[x] = - sum((-1)^sum(x[i] ≤ m ? a[i] : 0 for i in 1:N) * sum(p[a, y...]) for a in cia) / + sum((-1)^sum(x[i] ≤ m ? a[i] - 1 : 0 for i in 1:N) * sum(p[a, y...]) for a in cia) / m^sum(x[i] ≤ m ? 0 : 1 for i in 1:N) if T <: AbstractFloat if abs(res[x]) < Base.rtoldefault(T)