From 90afb3b525d0f52e25bda6baa22bdb7f2a0ccdf5 Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Wed, 13 Apr 2022 13:48:20 +0200 Subject: [PATCH] fix total energy --- hiro_models/model_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiro_models/model_base.py b/hiro_models/model_base.py index a190f8f..b42d122 100644 --- a/hiro_models/model_base.py +++ b/hiro_models/model_base.py @@ -348,7 +348,7 @@ class Model(ABC): system = self.system_energy(data, **kwargs) bath = self.bath_energy(data, **kwargs) - total = float(qt.expect(self.system, self.ψ_0)) + total = float(qt.expect(qt.Qobj(self.system(0)), self.ψ_0)) return total - (system + bath)