Skip to content

Commit d577c4c

Browse files
committed
Use def rather than lambda
1 parent 812cda8 commit d577c4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qiskit/algorithms/time_evolvers/variational/solvers/var_qte_linear_solver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def lse_solver(self) -> Callable[[np.ndarray, np.ndarray], np.ndarray]:
8484
def lse_solver(self, lse_solver: Callable[[np.ndarray, np.ndarray], np.ndarray] | None) -> None:
8585
"""Sets an LSE solver. Uses a ``np.linalg.lstsq`` callable if ``None`` provided."""
8686
if lse_solver is None:
87-
lse_solver = lambda a, b: np.linalg.lstsq(a, b, rcond=1e-2)[0]
87+
def lse_solver(a, b): return np.linalg.lstsq(a, b, rcond=1e-2)[0]
8888

8989
self._lse_solver = lse_solver
9090

0 commit comments

Comments
 (0)