diff --git a/strawberryfields/backends/gaussianbackend/gaussiancircuit.py b/strawberryfields/backends/gaussianbackend/gaussiancircuit.py index 73e767e34..083f47140 100644 --- a/strawberryfields/backends/gaussianbackend/gaussiancircuit.py +++ b/strawberryfields/backends/gaussianbackend/gaussiancircuit.py @@ -439,7 +439,7 @@ def thermal_loss(self, T, nbar, k): raise ValueError("Cannot apply loss channel, mode does not exist") self.loss(T, k) - self.nmat += (1 - T) * nbar + self.nmat[k, k] += (1 - T) * nbar def init_thermal(self, population, mode): """Initializes a state of mode in a thermal state with the given population"""