Skip to content

Commit

Permalink
Fix typo in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillermoAbadLopez authored Oct 15, 2024
1 parent 1a09ddb commit 0385d6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiskit_algorithms/optimizers/gradient_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GradientDescent(SteppableOptimizer):
from qiskit_algorithms.optimizers import GradientDescent
def f(x):
def fun(x):
return (np.linalg.norm(x) - 1) ** 2
initial_point = np.array([1, 0.5, -0.2])
Expand Down Expand Up @@ -106,7 +106,7 @@ def power_law():
return power_law()
def f(x):
def fun(x):
return (np.linalg.norm(x) - 1) ** 2
def grad_f(x):
Expand Down

0 comments on commit 0385d6c

Please sign in to comment.