Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
eliottrosenberg committed Mar 13, 2024
1 parent a6fdb92 commit 3c107ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cirq-core/cirq/experiments/t1_decay_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@ def exp_decay(x, t1, a, b):

# Fit to exponential decay to find the t1 constant
try:
popt, _ = optimize.curve_fit(exp_decay, xs, probs, p0=[t1_guess, 1.0, 0.0])
self.popt = popt
t1 = popt[0]
self.popt, _ = optimize.curve_fit(exp_decay, xs, probs, p0=[t1_guess, 1.0, 0.0])
t1 = self.popt[0]
return t1
except RuntimeError:
warnings.warn("Optimal parameters could not be found for curve fit", RuntimeWarning)
Expand Down

0 comments on commit 3c107ec

Please sign in to comment.