From 64ffb7b9cedc953bf11c6914019a319b4dfb5a14 Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Tue, 12 Mar 2024 15:38:43 +0000 Subject: [PATCH] Update src/qibo/backends/numpy.py --- src/qibo/backends/numpy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qibo/backends/numpy.py b/src/qibo/backends/numpy.py index 7eb2907aa1..ce7eb49e15 100644 --- a/src/qibo/backends/numpy.py +++ b/src/qibo/backends/numpy.py @@ -764,7 +764,7 @@ def calculate_expectation_density_matrix(self, hamiltonian, state, normalize): ev = self.np.real(self.np.trace(self.cast(hamiltonian @ state))) if normalize: norm = self.np.real(self.np.trace(state)) - ev = ev / norm + ev /= norm return ev # TODO: remove this method