Skip to content

Commit

Permalink
Remove unecessary variable 'jac'
Browse files Browse the repository at this point in the history
  • Loading branch information
EnBr55 committed Apr 22, 2022
1 parent 083452f commit 90f4554
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/qutip_qip/vqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,6 @@ def optimize_parameters(
" nor a string specifying initialization."
)

# Function for computing jacobian
jac = self.compute_jac if use_jac else None

# Run the scipy minimization function
if layer_by_layer:
max_layers = self.n_layers
Expand Down Expand Up @@ -363,7 +360,7 @@ def layer_jac(a, p):
self.evaluate_parameters,
angles,
method=method,
jac=jac,
jac=self.compute_jac if use_jac else None,
bounds=bounds,
constraints=constraints,
options={"disp": False},
Expand Down

0 comments on commit 90f4554

Please sign in to comment.