Skip to content

Commit

Permalink
fix the bug in thermal loss for gaussian backend
Browse files Browse the repository at this point in the history
  • Loading branch information
sylviemonet committed May 13, 2024
1 parent 9cd6444 commit ab05a83
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit ab05a83

Please sign in to comment.