Skip to content

Commit

Permalink
Use lazy formatting in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
declanmillar committed Sep 13, 2022
1 parent 9eb5c41 commit 7d05317
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ def __init__(
def filter_criterion(
self,
) -> Callable[[list | np.ndarray, float, ListOrDict[float] | None], bool] | None:
"""returns the filter criterion if set"""
"""Filters the eigenstates/eigenvalues."""
return self._ces.filter_criterion

@filter_criterion.setter
def filter_criterion(
self,
filter_criterion: Callable[[list | np.ndarray, float, ListOrDict[float] | None], bool],
) -> None:
"""set the filter criterion"""
self._ces.filter_criterion = filter_criterion

@classmethod
Expand All @@ -84,7 +83,7 @@ def compute_minimum_eigenvalue(
if result_ces.aux_operator_eigenvalues:
result.aux_operator_eigenvalues = result_ces.aux_operator_eigenvalues[0]

logger.debug(f"MinimumEigensolver:\n{result}")
logger.debug("NumPy minimum eigensolver result: %s", result)

return result

Expand All @@ -98,10 +97,9 @@ def __init__(self) -> None:

@property
def eigenstate(self) -> np.ndarray | None:
"""Return eigenstate."""
"""The eigenstate corresponding to the computed minimum eigenvalue."""
return self._eigenstate

@eigenstate.setter
def eigenstate(self, value: np.ndarray) -> None:
"""Set eigenstate."""
self._eigenstate = value

0 comments on commit 7d05317

Please sign in to comment.