Skip to content

Commit 8ba2b5b

Browse files
fix: Use h instead of hbar for effective temperature
1 parent f298596 commit 8ba2b5b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/qibocal/protocols/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
LEGEND_FONT_SIZE = 20
2929
TITLE_SIZE = 25
3030
EXTREME_CHI = 1e4
31-
KB = constants.k
32-
HBAR = constants.hbar
3331
"""Chi2 output when errors list contains zero elements"""
32+
KB = constants.k
33+
H = constants.h
3434
COLORBAND = "rgba(0,100,80,0.2)"
3535
COLORBAND_LINE = "rgba(255,255,255,0)"
3636
CONFIDENCE_INTERVAL_FIRST_MASK = 99
@@ -162,7 +162,7 @@ def effective_qubit_temperature(
162162
163163
The formula used is the following one:
164164
165-
kB Teff = - hbar qubit_freq / ln(prob_1/prob_0)
165+
kB Teff = - h qubit_freq / ln(prob_1/prob_0)
166166
167167
Args:
168168
prob_0 (NDArray): population 0 samples
@@ -178,7 +178,7 @@ def effective_qubit_temperature(
178178
error_prob_1 = np.sqrt(prob_1 * (1 - prob_1) / nshots)
179179
# TODO: find way to handle this exception
180180
try:
181-
temp = -HBAR * qubit_frequency / (np.log(prob_1 / prob_0) * KB)
181+
temp = -H * qubit_frequency / (np.log(prob_1 / prob_0) * KB)
182182
dT_dp0 = temp / prob_0 / np.log(prob_1 / prob_0)
183183
dT_dp1 = -temp / prob_1 / np.log(prob_1 / prob_0)
184184
error = np.sqrt((dT_dp0 * error_prob_0) ** 2 + (dT_dp1 * error_prob_1) ** 2)

0 commit comments

Comments
 (0)