Skip to content

Commit

Permalink
move variable definition closer to where its needed
Browse files Browse the repository at this point in the history
rileyjmurray committed Nov 1, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 8699c78 commit 35de4a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygsti/optimize/simplerlm.py
Original file line number Diff line number Diff line change
@@ -580,7 +580,6 @@ def simplish_leastsq(
norm_JTf = ari.infnorm_x(minus_JTf)
norm_x = ari.norm2_x(x)
pre_reg_data = ari.jtj_pre_regularization_data(JTJ)
max_jtj_diag = ari.jtj_max_diagonal_element(JTJ)

if norm_JTf < jac_norm_tol:
if oob_check_interval <= 1:
@@ -595,6 +594,7 @@ def simplish_leastsq(
continue

if k == 0:
max_jtj_diag = ari.jtj_max_diagonal_element(JTJ)
mu, nu = (tau * max_jtj_diag, 2) if init_munu == 'auto' else init_munu
best_x_state = (mu, nu, norm_f, f.copy())

0 comments on commit 35de4a7

Please sign in to comment.