make pyright happy

This commit is contained in:
Valentin Boettcher 2022-11-24 21:24:18 +01:00
parent 1a2d9d7f3c
commit 22bef09695
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE

View file

@ -210,6 +210,7 @@ class QubitModel(Model):
return self.bcf
def thermal_bcf(t):
assert self.thermal_correlations is not None
return self.bcf(t) + 2 * (self.thermal_correlations(t).real)
return thermal_bcf
@ -230,16 +231,21 @@ class QubitModel(Model):
return float(self.δ) / self.full_thermal_bcf(0).real
if self.bcf_norm_method == "sd_peak":
return (
float(self.δ) / self.spectral_density(self.ω_c * self.s + self.ω_s).real
return float(self.δ) / float(
self.spectral_density(
float(self.ω_c) * float(self.s) + float(self.ω_s)
).real
)
if self.bcf_norm_method == "sd_peak_therm":
return (
float(self.δ)
/ self.full_thermal_spectral_density(self.ω_c * self.s + self.ω_s).real
return float(self.δ) / float(
self.full_thermal_spectral_density(
float(self.ω_c) * float(self.s) + float(self.ω_s)
).real
)
return 1.0
@property
def bcf_scales(self) -> list[float]:
"""The scaling factors for the bath correlation functions."""